Selaa lähdekoodia

-优化页面

jiangbiao 2 vuotta sitten
vanhempi
commit
14ca2ceef4

+ 18 - 2
ui/src/views/apply/offlinevalve/index.vue

@@ -505,11 +505,27 @@ export default {
   methods: {
     // 字典翻译
     statusFormat(row, column) {
-      return this.selectDictLabel(this.statusList, row.status);
+      let s = this.selectDictLabel(this.statusList, row.status);
+      let type = '';
+      if (row.status === 1) {
+        type = 'success';
+      }
+      return <el-tag type={type}>{s}</el-tag>;
     },
     // 字典翻译
     approveStatusFormat(row, column) {
-      return this.selectDictLabel(this.approveStatusList, row.approveStatus);
+      let s = this.selectDictLabel(this.approveStatusList, row.approveStatus)
+      let type = '';
+      if (row.approveStatus === '0') {
+        type = 'info';
+      } else if (row.approveStatus === '2') {
+        type = 'success';
+      } else if (row.approveStatus === '3') {
+        type = 'warning';
+      } else if (row.approveStatus === '4') {
+        type = 'danger';
+      }
+      return <el-tag type={type}>{s}</el-tag>;
     },
     getExecutorName(userId){
       for (let item of this.executorList) {

+ 18 - 2
ui/src/views/apply/safetychange/index.vue

@@ -527,11 +527,27 @@ export default {
     },
     // 字典翻译
     statusFormat(row, column) {
-      return this.selectDictLabel(this.statusList, row.status);
+      let s = this.selectDictLabel(this.statusList, row.status);
+      let type = '';
+      if (row.status === 1) {
+        type = 'success';
+      }
+      return <el-tag type={type}>{s}</el-tag>;
     },
     // 字典翻译
     approveStatusFormat(row, column) {
-      return this.selectDictLabel(this.approveStatusList, row.approveStatus);
+      let s = this.selectDictLabel(this.approveStatusList, row.approveStatus)
+      let type = '';
+      if (row.approveStatus === '0') {
+        type = 'info';
+      } else if (row.approveStatus === '2') {
+        type = 'success';
+      } else if (row.approveStatus === '3') {
+        type = 'warning';
+      } else if (row.approveStatus === '4') {
+        type = 'danger';
+      }
+      return <el-tag type={type}>{s}</el-tag>;
     },
     /** 查询组织保护措施状态变更申请列表 */
     getList() {