Kaynağa Gözat

指标css样式优化

wu 4 hafta önce
ebeveyn
işleme
e39cdfff03
1 değiştirilmiş dosya ile 45 ekleme ve 12 silme
  1. 45 12
      src/views/basic/dynamicModel/list/index.vue

+ 45 - 12
src/views/basic/dynamicModel/list/index.vue

@@ -273,6 +273,16 @@
             <el-tag v-else-if="scope.row.status == 5" type="info">审核终止</el-tag>
             <el-tag v-else type="info">等待提交</el-tag>
           </template>
+          <template #dataRemind="scope">
+            <template v-if="scope.row.DATA_REMIND">
+              <template v-for="remindItem in scope.row.DATA_REMIND">
+                <span :title="remindItem.remindName" v-if="remindItem.config && JSON.parse(remindItem.config)" style="margin-right:10px;cursor: pointer;">
+                  <i v-if="remindItem.status === '0' " :class="JSON.parse(remindItem.config).notExtended" :style="{color:JSON.parse(remindItem.config).notExtendedColor,fontSize:'20px'}"></i>
+                  <i v-else :class="JSON.parse(remindItem.config).delayed" :style="{color:JSON.parse(remindItem.config).delayedColor,fontSize:'20px'}"></i>
+                </span>
+              </template>
+            </template>
+          </template>
           <!--          <template #completion="scope">-->
           <!--            <p v-if="scope.row.status==5 || scope.row.completion == 0">&#45;&#45;&#45;&#45;</p>-->
           <!--            <p v-else-if=" scope.row.completion == 100">已完成</p>-->
@@ -526,8 +536,8 @@
             <vxe-button v-if="columnData.tableRefreshFlag === undefined ? true : columnData.tableRefreshFlag"  title="刷新" style="margin-right: 12px" circle icon="el-icon-refresh" @click="refreshTableLayout()"></vxe-button>
           </template>
           <template #top>
-            <div :style="{ height: permLabelList && permLabelList.length ? 'auto' : '42px'}" v-if="permLabelList.length">
-              <div style="padding: 0 0 10px 0; background: #ffffff" >
+            <div :style="{height:'42px'}" v-if="permLabelListFlag">
+              <div style="padding: 0 0 10px 0; background: #ffffff" v-if="permLabelList.length">
                 <el-button
                   :style="{
                   color: permLabelList[0].labelCss && JSON.parse(permLabelList[0].labelCss).defaultBgColor ? '#ffffff' : '',
@@ -1121,6 +1131,8 @@ export default {
       systemBtnFlag: {},
       dataControllerConfig:{},
       dataControllerList:[],
+      defaultPerLabel:null,
+      permLabelListFlag:true,
     }
   },
   filters: {
@@ -1180,7 +1192,17 @@ export default {
         searchType: getSearchType(o)
       }))
       .filter((o) => o.__config__.jnpfKey !== 'table')
-    this.$refs.Search.search()
+    getDataPermLabel(this.modelId).then((res) => {
+      this.permLabelList = res.data.data || []
+      if (this.permLabelList.length) {
+        let permDef = this.permLabelList.find(o => o.defaultState == 1)
+        if (permDef) {
+          this.defaultPerLabel = permDef
+        }
+      }
+    }).finally(() => {
+      this.$refs.Search.search()
+    })
   },
   computed: {
     headerSearch() {
@@ -2496,6 +2518,7 @@ export default {
       this.treeFilter = ''
       this.filterListSearch = ''
       this.treeBoxList = this.$refs.treeBox
+      this.defaultPerLabel = null
       this.treeBoxList?.forEach((i) => {
         i.setCurrentKey(null)
       })
@@ -2508,7 +2531,15 @@ export default {
       this.labelBrowserRequest = ''
       this.subTableQueryRequest = ''
       this.paramLabelId = ''
-      this.refreshTableLayout()
+      this.permLabelList.forEach(o=> o.active = false)
+      if (!this.permLabelList.length) {
+        this.permLabelListFlag = false
+      }
+      if(this.defaultPerLabel){
+        this.permLabelSeach(this.defaultPerLabel)
+      }else {
+        this.refreshTableLayout()
+      }
     },
     // 新版表格开始
     async initData(foreignTableId = [], isRefresh = false) {
@@ -3125,7 +3156,10 @@ export default {
             columnList = columnList.filter((i) => i.title !== '操作')
           }
         }
+        if (res.data.data.remindDataStatus === 1) {
+          columnList.push({ title: '数据提醒', width: 100, align: 'center', slots: { default: 'dataRemind' } })
 
+        }
         if (!columnList.find((i) => i?.title === '操作')) {
           if (this.columnData.type != 5) {
             columnList.push({
@@ -3183,13 +3217,6 @@ export default {
           this.cardData = res.data.data.pageData.records
         }
         this.loading = false
-        getDataPermLabel(this.modelId).then((res) => {
-          this.permLabelList = res.data.data || []
-          if (this.permLabelList.length)
-            this.permLabelList.forEach((item) => {
-              item.active = item.id === this.paramLabelId
-            })
-        })
       })
     },
     // 组装数据
@@ -3261,7 +3288,7 @@ export default {
       const newList = list.flat()
       let fields = {}
       const columnMergeCells = columnListTable.filter((v) => {
-        if (v.visible || v.type === 'checkbox' || v.title === '序号' || v.title === '功能') {
+        if (v.visible || v.type === 'checkbox' || v.title === '序号' || v.title === '功能' || v.title === '数据提醒') {
           return v
         }
       })
@@ -3354,6 +3381,12 @@ export default {
                 rowspan: i.mergeRow,
                 colspan: 1
               })
+              mergeCells.push({
+                row: num,
+                col: columnMergeCells.findIndex((o) => o.title === '数据提醒'),
+                rowspan: i.mergeRow,
+                colspan: 1
+              })
               // this.mergeCells.push({
               //   row: num,
               //   col: columnListTable.findIndex((o) => o.title === '流程进度'),