smartReportImgSet.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. <template>
  2. <div class="smart-report-img-set-page">
  3. <div class="top-wrap">
  4. <el-input v-model="keyword" :placeholder="$t('SystemManage.BaseConfig.resource_placeholder01')" clearable style="width:200px;margin-right:20px" @input="handleSearch"></el-input>
  5. <el-select :placeholder="$t('SystemManage.BaseConfig.resource_placeholder02')" v-model="type" clearable style="width:200px" @change="handleSearch">
  6. <el-option :label="$t('SystemManage.BaseConfig.resource_type01')" :value="1"></el-option>
  7. <el-option :label="$t('SystemManage.BaseConfig.resource_type02')" :value="2"></el-option>
  8. </el-select>
  9. <el-button type="primary" style="float:right" @click="handleShowUploadPop" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_source_upload">{{$t('SystemManage.BaseConfig.resource_btn04')}}</el-button>
  10. </div>
  11. <div class="select-status-box" v-if="selectIds.length>0">
  12. <el-checkbox
  13. :indeterminate="isIndeterminate"
  14. v-model="checkAll"
  15. @change="handleCheckAllChange"
  16. >全选</el-checkbox>
  17. <span>已选择{{selectIds.length}}项</span>
  18. <span @click="selectIds=[]" style="color:#1146DB;margin-left:20px;cursor: pointer;">{{$t('SystemManage.BaseConfig.resource_btn03')}}</span>
  19. <span @click="handleBatchDel" style="color:#1146DB;margin-left:20px;cursor: pointer;">{{$t('Table.delete_btn')}}</span>
  20. </div>
  21. <ul class="img-list-wrap">
  22. <li class="img-item" v-for="item in list" :key="item.ResourceId">
  23. <div :class="['select-box',selectIds.includes(item.ResourceId)?'select-box-active':'']" @click="handleSelectItem(item)"></div>
  24. <div class="opt-box">
  25. <div class="item" @click="handleShowImgFull(item)">
  26. <img src="~@/assets/img/icons/fullsreen.png" alt="">
  27. </div>
  28. <el-dropdown @command="handleClickOpt">
  29. <div class="item">
  30. <img src="~@/assets/img/icons/more.png" alt="">
  31. </div>
  32. <el-dropdown-menu slot="dropdown">
  33. <el-dropdown-item :command="{type:'edit',data:item}">{{$t('Dialog.title_prefix_edit')}}</el-dropdown-item>
  34. <el-dropdown-item :command="{type:'del',data:item}" style="color: #AD352F;">{{$t('Table.delete_btn')}}</el-dropdown-item>
  35. </el-dropdown-menu>
  36. </el-dropdown>
  37. </div>
  38. <img class="img" :src="item.ImgUrl" alt="">
  39. <p class="name">{{item.ImgName}}</p>
  40. </li>
  41. </ul>
  42. <tableNoData :text="$t('Table.prompt_slogan')" v-if="list.length===0"/>
  43. <!-- <el-col :span="24" class="toolbar">
  44. <el-pagination
  45. layout="total,prev,pager,next"
  46. background
  47. @current-change="handleCurrentChange"
  48. :page-size="pageSize"
  49. :total="total"
  50. style="float: right"
  51. />
  52. </el-col> -->
  53. <!-- 上传图片弹窗 -->
  54. <el-dialog
  55. :visible.sync="uploadImgPop"
  56. :title="formData.id?$t('SystemManage.BaseConfig.resource_btn05'):$t('SystemManage.BaseConfig.resource_btn04')"
  57. :close-on-click-modal="false"
  58. :append-to-body="true"
  59. @close="cancelHandle"
  60. custom-class="classify-dialog"
  61. center
  62. width="550px"
  63. v-dialogDrag
  64. >
  65. <el-form
  66. :model="formData"
  67. :rules="formRules"
  68. ref="ruleForm"
  69. label-width="120px"
  70. class="upload-img-form"
  71. >
  72. <div class="step-box">
  73. <div class="step-item" v-for="(item,index) in steps">
  74. <div class="step" :class="[step==(index+1) && 'active',step>(index+1) && 'finish']">
  75. <template v-if="!(step>(index+1))">
  76. <div class="step-number" >{{ index+1 }}</div>
  77. <span class="step-text">{{ item }}</span>
  78. </template>
  79. <template v-else>
  80. <i class="el-icon-success" style="font-size: 18px;color: #0052D9;"></i>
  81. <span class="step-text" style="color: #333333;">{{$t('SystemManage.BaseConfig.completed_step')}}</span>
  82. </template>
  83. </div>
  84. <div class="line" v-if="index==0"></div>
  85. </div>
  86. </div>
  87. <template v-if="step==1">
  88. <el-form-item :label="$t('SystemManage.BaseConfig.resource_label01')" prop="name">
  89. <el-input v-model="formData.name" :placeholder="$t('SystemManage.BaseConfig.resource_placeholder01')"></el-input>
  90. </el-form-item>
  91. <el-form-item :label="$t('SystemManage.BaseConfig.resource_label02')" prop="type">
  92. <el-radio-group v-model="formData.type">
  93. <el-radio :label="1">{{$t('SystemManage.BaseConfig.resource_type01')}}</el-radio>
  94. <el-radio :label="2">{{$t('SystemManage.BaseConfig.resource_type02')}}</el-radio>
  95. </el-radio-group>
  96. </el-form-item>
  97. <el-form-item
  98. :label="$t('SystemManage.BaseConfig.resource_btn01')"
  99. prop="imgUrl"
  100. >
  101. <el-upload
  102. action=""
  103. accept="image/*"
  104. :http-request="handleUploadImg"
  105. :show-file-list="false"
  106. >
  107. <div class="upload-box">
  108. <template v-if="!formData.imgUrl">
  109. <i class="el-icon-plus" style="font-size: 24px;"></i>
  110. </template>
  111. <template v-else>
  112. <img class="upload-img" :src="formData.imgUrl" alt="">
  113. </template>
  114. </div>
  115. </el-upload>
  116. <p>{{$t('SystemManage.BaseConfig.upload_suggest')}}</p>
  117. </el-form-item>
  118. </template>
  119. <template v-else>
  120. <draggable tag="div" class="layout-options" :sort="false" :list="layoutOptions" @start="dropStart">
  121. <div class="option-item" v-for="item in layoutOptions" :key="item.value">
  122. <div class="option-item-title">{{ item.label }}</div>
  123. <img src="~@/assets/img/icons/layout-option-icon.png" class="option-item-icon" />
  124. </div>
  125. </draggable>
  126. <div class="layout-background" @dragover.prevent @drop="handleAddOption">
  127. <img :src="formData.imgUrl" class="layout-image" ref="layoutImage" />
  128. <vue-drag-resize :parentLimitation="true" :sticks="['bl','br']" :minw="10" :minh="10"
  129. :w="item.width" :h="item.height" @resizestop="(p)=>resizeStop(p,item.value)" @dragstop="(p)=>dragStop(p,item.value)"
  130. v-for="item in layoutItems" :key="item.value" :x="item.x" :y="item.y" :z="item.z" @clicked="()=>optionClick(item)">
  131. <div class="layout-item" @contextmenu.prevent="(e)=>rightClick(e,item)" @blur="blur" tabindex="-1"
  132. :style="{fontFamily:item.family,fontSize:item.size+'px',fontWeight:item.weight,textAlign:item.align,color:item.color}">{{ item.label }}</div>
  133. </vue-drag-resize>
  134. <div
  135. class="right-mouse-menu"
  136. ref="rightMenuRef"
  137. v-if="rightMouseMenu.show"
  138. :style="{
  139. left: rightMouseMenu.left,
  140. top: rightMouseMenu.top,
  141. }"
  142. >
  143. <div class="item" @click="optionDel" style="color: #AD352F;">{{$t('Table.delete_btn')}}</div>
  144. </div>
  145. </div>
  146. <div class="layout-font">
  147. <div class="layout-font-title">{{$t('SystemManage.BaseConfig.text_style')}}</div>
  148. <div class="layout-font-options">
  149. <el-select v-model="layoutFont.family" class="font-options-row">
  150. <el-option :label="item" :value="item" v-for="item in layoutFontF" :key="item"></el-option>
  151. </el-select>
  152. <el-select v-model="layoutFont.size" class="font-options-row">
  153. <el-option :label="item" :value="item" v-for="item in layoutFontS" :key="item"></el-option>
  154. </el-select>
  155. <el-select v-model="layoutFont.weight" class="font-options-row">
  156. <el-option :label="item.label" :value="item.value" v-for="item in layoutFontW" :key="item.value"></el-option>
  157. </el-select>
  158. <el-select v-model="layoutFont.align" class="font-options-row">
  159. <el-option :label="item.label" :value="item.value" v-for="item in layoutFontAlign" :key="item.value"></el-option>
  160. </el-select>
  161. <el-color-picker v-model="layoutFont.color"></el-color-picker>
  162. </div>
  163. </div>
  164. </template>
  165. <div style="text-align: center;padding: 30px 0;margin-top: 60px;">
  166. <el-button type="primary" style="width:120px;" @click="Steptoggle('+')" v-if="step==1">{{$t('Dialog.next_step')}}</el-button>
  167. <el-button type="primary" plain style="width:120px;" @click="Steptoggle('-')" v-else>{{$t('Dialog.prev_step')}}</el-button>
  168. <el-button type="primary" style="margin-left:20px;width:120px;" @click="handleSave" v-if="step==2">{{$t('Dialog.complete_btn')}}</el-button>
  169. </div>
  170. </el-form>
  171. </el-dialog>
  172. <el-image-viewer
  173. v-if="showViewer"
  174. :on-close="()=>{this.picShowList=[];this.showViewer = false}"
  175. :url-list="picShowList"
  176. />
  177. </div>
  178. </template>
  179. <script>
  180. import {bannerupload} from '@/api/api.js';
  181. import {apiSmartReport} from '@/api/modules/smartReport'
  182. import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
  183. import draggable from 'vuedraggable'
  184. import VueDragResize from 'vue-drag-resize'
  185. export default {
  186. components:{ElImageViewer,draggable,VueDragResize},
  187. data() {
  188. return {
  189. keyword:'',
  190. type:'',
  191. page:1,
  192. pageSize:1000,
  193. list:[],
  194. total:0,
  195. uploadImgPop:false,
  196. formData:{
  197. id:0,
  198. name:'',
  199. type:'',
  200. imgUrl:'',
  201. layout:''
  202. },
  203. formRules:{
  204. name:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder01')||'请输入图片名称', trigger: 'blur' }],
  205. type:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder02')||'请选择图片类型', trigger: 'change' }],
  206. imgUrl:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder03')||'请上传图片', trigger: 'change' }]
  207. },
  208. step:1,
  209. steps:[this.$t('SystemManage.BaseConfig.select_layout'),this.$t('SystemManage.BaseConfig.edit_layout')],
  210. /**
  211. * value不能变
  212. * 一开始定义为创建时间,后面改为发布时间
  213. */
  214. layoutOptions:[{value:'研报标题',label:this.$t('SystemManage.BaseConfig.report_title')},//研报标题
  215. {value:'研报作者',label:this.$t('SystemManage.BaseConfig.report_author')},//研报作者
  216. {value:'创建时间',label:this.$t('SystemManage.BaseConfig.report_release_time')}],//发布时间
  217. layoutItems:[],
  218. // currentLayout:{},
  219. layoutFont:{
  220. family:'Arial',
  221. size:'14',
  222. weight:'normal',
  223. align:'left',
  224. color:'#333333'
  225. },
  226. rightMouseMenu:{
  227. show: false,
  228. left: '99999px',
  229. top: '99999px',
  230. value: '',
  231. },
  232. dragIndex:0,
  233. layoutFontF:['Arial','Georgia','Impact','Tahoma','Times New Roman','Verdana','思源宋体','思源黑体'],
  234. layoutFontS:['12','13','14','15','16','18','20','24','28','32','36','40'],
  235. layoutFontW:[{value:'normal',label:this.$t('SystemManage.BaseConfig.style_font_w_normal')},
  236. {value:'bold',label:this.$t('SystemManage.BaseConfig.style_font_w_bold')}],
  237. layoutFontAlign:[{value:'left',label:this.$t('SystemManage.BaseConfig.style_text_align_left')},
  238. {value:'center',label:this.$t('SystemManage.BaseConfig.style_text_align_center')},
  239. {value:'right',label:this.$t('SystemManage.BaseConfig.style_text_align_right')}],
  240. showViewer:false,
  241. picShowList:[],
  242. rigtMenuHideTimer:null,
  243. delIds:[],//要删除的id集合
  244. selectIds:[],
  245. isIndeterminate:false,
  246. checkAll:false
  247. }
  248. },
  249. created() {
  250. this.getImgList()
  251. },
  252. mounted(){
  253. },
  254. methods: {
  255. handleSelectItem(e){
  256. const index=this.selectIds.indexOf(e.ResourceId)
  257. if(index>-1){
  258. this.selectIds.splice(index,1)
  259. }else{
  260. this.selectIds.push(e.ResourceId)
  261. }
  262. this.checkAll=this.selectIds.length===this.list.length?true:false
  263. this.isIndeterminate=this.selectIds.length>0&&this.selectIds.length<this.list.length
  264. },
  265. handleCheckAllChange(val){
  266. if(val){
  267. this.selectIds=this.list.map(item=>item.ResourceId)
  268. }else{
  269. this.selectIds=[]
  270. }
  271. },
  272. //分页页码跳转
  273. handleCurrentChange(current) {
  274. this.page = current;
  275. this.getImgList();
  276. },
  277. //资源库列表
  278. async getImgList(){
  279. // 获取列表数据重置选择数据
  280. this.selectIds=[]
  281. this.isIndeterminate=false
  282. this.checkAll=false
  283. this.delIds=[]
  284. const res=await apiSmartReport.imgReourceList({
  285. CurrentIndex:this.page,
  286. PageSize:this.pageSize,
  287. Type:this.type,
  288. Keyword:this.keyword
  289. })
  290. if(res.Ret===200){
  291. this.list=res.Data.List||[]
  292. this.total=res.Data.Paging.Totals
  293. }
  294. },
  295. handleSearch(){
  296. this.page=1
  297. this.getImgList()
  298. },
  299. handleUploadImg(file){
  300. //图片大小和格式限制
  301. const {size,type} = file.file
  302. let form = new FormData();
  303. form.append('file',file.file);
  304. bannerupload(form).then(res=>{
  305. // console.log(res);
  306. if(res.Ret!==200) return
  307. this.formData.imgUrl=res.Data.ResourceUrl
  308. })
  309. },
  310. handleSave(){
  311. this.$refs.ruleForm.validate((valid)=>{
  312. if(valid){
  313. let backgroundWidth = this.$refs.layoutImage.width
  314. let backgroundGHeight = this.$refs.layoutImage.height
  315. let layoutStr = this.layoutItems.map(item =>{
  316. return {
  317. value:item.value,
  318. label:item.label,
  319. left:item.x/backgroundWidth*100+'%',
  320. top:item.y/backgroundGHeight*100+'%',
  321. width:item.width/backgroundWidth*100+'%',
  322. height:item.height/backgroundGHeight*100+'%',
  323. family:item.family,
  324. size:item.size,
  325. weight:item.weight,
  326. align:item.align,
  327. color:item.color,
  328. }
  329. })
  330. const params={
  331. Type:this.formData.type,
  332. ImgUrl:this.formData.imgUrl,
  333. ImgName:this.formData.name,
  334. Style:JSON.stringify(layoutStr)
  335. }
  336. if(this.formData.id){
  337. // 编辑
  338. apiSmartReport.imgReourceEdit({
  339. ResourceId:this.formData.id,
  340. ...params
  341. }).then(res=>{
  342. if(res.Ret===200){
  343. this.$message.success(this.$t('MsgPrompt.edit_msg'))
  344. this.page=1
  345. this.getImgList()
  346. this.handleCloseImgUpload()
  347. }
  348. })
  349. return
  350. }
  351. apiSmartReport.imgReourceAdd(params).then(res=>{
  352. if(res.Ret===200){
  353. this.$message.success(this.$t('MsgPrompt.add_msg'))
  354. this.page=1
  355. this.getImgList()
  356. this.handleCloseImgUpload()
  357. }
  358. })
  359. }
  360. })
  361. },
  362. convertLabel(value){
  363. let row = this.layoutOptions.find(it => it.value==value)
  364. return row?row.label:value
  365. },
  366. handleCloseImgUpload(){
  367. this.uploadImgPop=false
  368. },
  369. cancelHandle(){
  370. this.step=1
  371. this.formData.id=0
  372. this.formData.name=''
  373. this.formData.type=''
  374. this.formData.imgUrl=''
  375. this.formData.layout=''
  376. this.layoutItems=[]
  377. this.layoutFont={
  378. family:'Arial',
  379. size:'14',
  380. weight:'normal',
  381. align:'left',
  382. color:'#333333'
  383. }
  384. this.rightMouseMenu={
  385. show: false,
  386. left: '99999px',
  387. top: '99999px',
  388. value: '',
  389. },
  390. this.$nextTick(()=>{
  391. this.$refs.ruleForm.clearValidate()
  392. })
  393. },
  394. handleShowImgFull(e){
  395. console.log(e);
  396. this.picShowList=[e.ImgUrl]
  397. this.showViewer=true
  398. },
  399. handleClickOpt(e){
  400. if(e.type==='del'){
  401. this.delIds=[e.data.ResourceId]
  402. this.handleImgDel()
  403. }
  404. if(e.type==='edit'){
  405. this.formData.id=e.data.ResourceId
  406. this.formData.name=e.data.ImgName
  407. this.formData.type=e.data.Type
  408. this.formData.imgUrl=e.data.ImgUrl
  409. this.formData.layout=e.data.Style
  410. this.uploadImgPop=true
  411. }
  412. },
  413. handleShowUploadPop(){
  414. this.formData.id=0
  415. this.formData.name=''
  416. this.formData.type=''
  417. this.formData.imgUrl=''
  418. this.formData.layout=''
  419. this.uploadImgPop=true
  420. },
  421. handleBatchDel(){
  422. this.delIds=this.selectIds
  423. this.handleImgDel()
  424. },
  425. handleImgDel(){
  426. this.$confirm(this.$t('SystemManage.BaseConfig.resource_del_msg'),this.$t('Confirm.prompt'),{
  427. // confirmButtonText: '确定',
  428. // cancelButtonText: '取消',
  429. type: 'warning'
  430. }).then(()=>{
  431. apiSmartReport.imgReourceDel({ResourceIds:this.delIds.join(',')}).then(res=>{
  432. if(res.Ret===200){
  433. this.$message.success(this.$t('MsgPrompt.delete_msg'))
  434. this.page=1
  435. this.getImgList()
  436. }
  437. })
  438. })
  439. },
  440. // 切换步骤
  441. Steptoggle(t){
  442. if(t=='+'){
  443. this.$refs.ruleForm.validate((valid)=>{
  444. if(valid){
  445. this.step++
  446. }
  447. })
  448. }else{
  449. this.step--
  450. }
  451. if(this.step==2){
  452. this.setLayoutItems()
  453. }
  454. },
  455. // 设置布局设置
  456. setLayoutItems(){
  457. this.$nextTick(()=>{
  458. let backgroundWidth = this.$refs.layoutImage?this.$refs.layoutImage.width:400
  459. let backgroundGHeight = this.$refs.layoutImage?this.$refs.layoutImage.height:100
  460. try {
  461. this.layoutItems=this.formData.layout?JSON.parse(this.formData.layout).map(it =>{
  462. return {
  463. value:it.value,
  464. label:this.convertLabel(it.value),
  465. x:this.percent2Number(it.left,backgroundWidth),
  466. y:this.percent2Number(it.top,backgroundGHeight),
  467. z:1,
  468. width:this.percent2Number(it.width,backgroundWidth),
  469. height:this.percent2Number(it.height,backgroundGHeight),
  470. family:it.family,
  471. size:it.size,
  472. weight:it.weight,
  473. align:it.align,
  474. color:it.color,
  475. }
  476. }):[]
  477. } catch (error) {
  478. console.log(error,'error');
  479. this.layoutItems=[]
  480. }
  481. // console.log(this.layoutItems,'this.layoutItems');
  482. })
  483. },
  484. percent2Number(per,entirety){
  485. per=per+''
  486. let decimals = (+per.substring(0,per.length-1))/100
  487. return entirety*decimals
  488. },
  489. dropStart(e){
  490. this.dragIndex = e.oldIndex
  491. },
  492. handleAddOption(e){
  493. let options = this.layoutOptions[this.dragIndex]
  494. let layoutItem = this.layoutItems.find(it => it.value == options.value)
  495. if(layoutItem){
  496. layoutItem.z = Math.max(...this.layoutItems.map(t => t.z))+1
  497. this.$message.warning(this.$i18nt.locale==='zh'?`已添加${options.label}!`:`${options.label} already added!`)
  498. return
  499. }
  500. this.layoutItems.push({
  501. value:options.value,
  502. label:options.label,
  503. x:e.layerX,
  504. y:e.layerY,
  505. z:1,
  506. width:120,
  507. height:20,
  508. family:"Arial",
  509. size:"14px",
  510. weight:"normal",
  511. align:"left",
  512. color:'#333333'
  513. })
  514. },
  515. resizeStop({width,height},value){
  516. let item = this.layoutItems.find(it => it.value==value)
  517. if(!item) return
  518. item.width=width
  519. item.height=height
  520. },
  521. dragStop({left,top},value){
  522. let item = this.layoutItems.find(it => it.value==value)
  523. if(!item) return
  524. item.x=left
  525. item.y=top
  526. },
  527. optionClick(op){
  528. this.layoutFont = op
  529. },
  530. rightClick(e,item){
  531. clearTimeout(this.rigtMenuHideTimer)
  532. this.rightMouseMenu.left = e.clientX + "px";
  533. this.rightMouseMenu.top = e.clientY + "px";
  534. this.rightMouseMenu.value = item.value;
  535. this.rightMouseMenu.show = true;
  536. },
  537. optionDel(){
  538. this.layoutItems=this.layoutItems.filter(it => it.value!=this.rightMouseMenu.value)
  539. this.rightMouseMenu.show=false
  540. },
  541. blur(){
  542. this.$refs.rightMenuRef.style.opacity=0
  543. setTimeout(()=>{
  544. this.rightMouseMenu.show=false
  545. },300)
  546. }
  547. },
  548. }
  549. </script>
  550. <style lang="scss" scoped>
  551. .ghost-class{
  552. display: none;
  553. }
  554. .smart-report-img-set-page{
  555. padding: 30px;
  556. padding-bottom: 100px;
  557. .select-status-box{
  558. background-color: #F8F8F8;
  559. padding: 10px 20px;
  560. margin-top: 20px;
  561. }
  562. }
  563. .img-list-wrap{
  564. margin-top: 20px;
  565. display: flex;
  566. flex-wrap: wrap;
  567. gap: 20px;
  568. .img-item{
  569. position: relative;
  570. width: 160px;
  571. cursor: pointer;
  572. .img{
  573. display: block;
  574. width: 100%;
  575. height: 160px;
  576. background-color: var(--gary-gy-3-disabled, #EBEFF6);
  577. object-fit: contain !important;
  578. box-sizing: border-box;
  579. &:hover{
  580. border: 1px solid #3375e1;
  581. }
  582. }
  583. .name{
  584. margin-top: 5px;
  585. display: -webkit-box;
  586. overflow: hidden;
  587. text-overflow: ellipsis;
  588. -webkit-line-clamp: 2;
  589. line-break: anywhere;
  590. -webkit-box-orient: vertical;
  591. }
  592. .select-box{
  593. position: absolute;
  594. left: 1px;
  595. top: 1px;
  596. width: 12px;
  597. height: 12px;
  598. background-color: #EBEFF6;
  599. display: none;
  600. }
  601. .select-box-active{
  602. background-image: url('~@/assets/img/smartReport/icon17.png');
  603. background-repeat: no-repeat;
  604. background-size: cover;
  605. display: block;
  606. }
  607. .opt-box{
  608. display: none;
  609. position: absolute;
  610. top: 10px;
  611. right: 10px;
  612. z-index: 5;
  613. .item{
  614. width: 24px;
  615. height: 24px;
  616. display: flex;
  617. align-items: center;
  618. justify-content: center;
  619. background-color: #fff;
  620. border-radius: 50%;
  621. margin-left: 10px;
  622. img{
  623. width: 16px;
  624. height: 16px;
  625. }
  626. }
  627. }
  628. &:hover{
  629. .opt-box{
  630. display: flex;
  631. }
  632. .select-box{
  633. display: block;
  634. }
  635. }
  636. }
  637. }
  638. .upload-img-form{
  639. .el-upload {
  640. .upload-box {
  641. position: relative;
  642. width: 120px;
  643. height: 120px;
  644. background-color: #F5F7F9;
  645. border: 1px dashed #DCDFE6;
  646. display: flex;
  647. flex-direction: column;
  648. align-items: center;
  649. justify-content: center;
  650. box-sizing: border-box;
  651. padding: 4px;
  652. overflow: hidden;
  653. &:hover {
  654. border: 1px dashed #3375e1;
  655. .upload-mask {
  656. opacity: 1;
  657. }
  658. }
  659. .form-hint {
  660. margin-top: 10px;
  661. color: #999999;
  662. }
  663. .upload-img,
  664. .upload-mask {
  665. width: 100%;
  666. height: 100%;
  667. }
  668. .upload-mask {
  669. position: absolute;
  670. left: 0;
  671. top: 0;
  672. cursor: default;
  673. text-align: center;
  674. color: #fff;
  675. opacity: 0;
  676. font-size: 20px;
  677. background-color: rgba(0, 0, 0, .5);
  678. transition: opacity .3s;
  679. z-index: 2;
  680. line-height: 120px;
  681. .mask-icon {
  682. cursor: pointer;
  683. }
  684. }
  685. }
  686. }
  687. .step-box{
  688. padding-left: 43px;
  689. display: flex;
  690. align-items: center;
  691. margin-bottom: 25px;
  692. .step-item{
  693. display: flex;
  694. align-items: center;
  695. .step{
  696. display: flex;
  697. align-items: center;
  698. .step-number{
  699. font-size: 14px;
  700. font-weight: 600;
  701. color: #C0C4CC;
  702. border-radius: 50%;
  703. width: 18px;
  704. height: 18px;
  705. box-sizing: border-box;
  706. border: solid 2px #C0C4CC;
  707. display: flex;
  708. align-items: center;
  709. justify-content: center;
  710. }
  711. .step-text{
  712. margin-left: 10px;
  713. font-size: 16px;
  714. color: #C0C4CC;
  715. line-height: 24px;
  716. }
  717. }
  718. .active{
  719. .step-number{
  720. border: solid 2px #0052D9;
  721. color: white;
  722. background-color: #0052D9;
  723. }
  724. .step-text{
  725. color: #0052D9;
  726. }
  727. }
  728. .line{
  729. margin: 0 10px;
  730. width: 40px;
  731. height: 2px;
  732. background-color: #C8CDD9;
  733. }
  734. }
  735. }
  736. .layout-options{
  737. padding-left: 43px;
  738. display: inline-flex;
  739. align-items: center;
  740. margin-bottom: 20px;
  741. .option-item{
  742. display: flex;
  743. align-items: center;
  744. flex-direction: column;
  745. margin-right: 30px;
  746. background-color: white;
  747. .option-item-title{
  748. font-size: 14px;
  749. color: #333333;
  750. }
  751. .option-item-icon{
  752. margin-top: 6px;
  753. width: 32px;
  754. height: 32px;
  755. }
  756. }
  757. }
  758. .layout-background{
  759. // background-color: #D9D9D9;
  760. border: solid 1px #D9D9D9;
  761. margin-left: 43px;
  762. width: 400px;
  763. text-align: center;
  764. margin-bottom: 20px;
  765. position: relative;
  766. .layout-image{
  767. vertical-align: bottom;
  768. width: 100%;
  769. }
  770. .layout-item{
  771. text-align: left;
  772. cursor: move;
  773. background-color: white;
  774. border: dashed 1px #B2B9CB;
  775. color: #C0C4CC;
  776. border-radius: 2px;
  777. width: 100%;
  778. height: 100%;
  779. overflow: hidden;
  780. box-sizing: border-box
  781. }
  782. }
  783. .layout-font{
  784. padding-left: 43px;
  785. .layout-font-title{
  786. font-size: 14px;
  787. font-weight: bold;
  788. color: #333333;
  789. }
  790. .layout-font-options{
  791. margin-top: 12px;
  792. display: flex;
  793. align-items: center;
  794. gap: 16px;
  795. .font-options-row{
  796. width: 90px;
  797. }
  798. }
  799. }
  800. }
  801. .right-mouse-menu{
  802. position: fixed;
  803. z-index: 9999999;
  804. background: #ffffff;
  805. border: 1px solid #ececec;
  806. box-shadow: 0px 3px 6px rgba(143, 143, 143, 0.16);
  807. border-radius: 4px;
  808. color: #333;
  809. font-size: 15px;
  810. padding: 13px 0;
  811. .item {
  812. line-height: 30px;
  813. padding: 0 20px;
  814. cursor: pointer;
  815. &:hover {
  816. background-color: #f5f7fa;
  817. }
  818. }
  819. }
  820. </style>