guarantee-lsq 2 år sedan
förälder
incheckning
479e4c3151

+ 13 - 1
src/utils/dict.js

@@ -316,7 +316,8 @@ DictCache.TYPE = {
   REPAIR_HOLIDAY: 'REPAIR_HOLIDAY', // 节假日列表
   // 隐患管理
   PROFESSOR_TYPE: 'PROFESSOR_TYPE',
-  CHECK_LEVEL: 'CHECK_LEVEL'
+  CHECK_LEVEL: 'CHECK_LEVEL',
+  HIDDEN_DANGER_STATUS: 'HIDDEN_DANGER_STATUS'
 
 }
 DictCache.CODE = {
@@ -1530,6 +1531,17 @@ DictCache.COLOR = {
     21: 'warning' // 	大修审核中
 
   },
+  HIDDEN_DANGER_COMMON_STATUS: {
+    1: 'processing', // 待接收
+    2: 'processing', // 维修中
+    3: 'processing', // 待提交审核
+    4: 'processing' // 审核中
+  },
+  HIDDEN_DANGER_STATUS: {
+    0: 'warning', // 待接收
+    1: 'processing', // 维修中
+    2: 'success' // 已完成
+  },
   /**
    * 维修状态
    */

+ 46 - 9
src/views/hidden/hidden/HiddenDanger.vue

@@ -82,6 +82,15 @@
               @confirm="batchDelete(record.id)">删除</operation-button>
           </template>
         </span>
+        <span slot="professorType" slot-scope="text">
+          <badge :text="BaseTool.Object.getField(professorTypeMap,text)" :status="DictCache.COLOR.HIDDEN_DANGER_COMMON_STATUS[text]"/>
+        </span>
+        <span slot="checkLevel" slot-scope="text">
+          <badge :text="BaseTool.Object.getField(checkLevelMap,text)" :status="DictCache.COLOR.HIDDEN_DANGER_COMMON_STATUS[text]"/>
+        </span>
+        <span slot="status" slot-scope="text">
+          <badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.HIDDEN_DANGER_STATUS[text]"/>
+        </span>
       </s-table>
     </div>
     <base-form ref="baseModal" @ok="handleOk" />
@@ -113,11 +122,15 @@ export default {
       visible: true,
       // 查询参数
       queryParam: {},
+      professorTypeMap: {},
+      checkLevelMap: {},
+      statusMap: {},
       // 表头
       columns: [
         {
           title: '序号',
           dataIndex: 'index',
+          checked: true,
           width: '70px',
           customRender: (text, record, index) => {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
@@ -125,83 +138,104 @@ export default {
         },
         {
           title: '检查区域',
+          checked: true,
           width: '150px',
           dataIndex: 'positionName'
         },
         {
           title: '设备位号',
+          checked: true,
           width: '150px',
           dataIndex: 'positionNo'
         },
         {
           title: '设备',
+          checked: true,
           width: '150px',
           dataIndex: 'sbName'
         },
         {
           title: '存在问题',
           width: '150px',
+          checked: true,
           dataIndex: 'existsQuestion'
         },
         {
           title: '可能风险',
           width: '150px',
+          checked: true,
           dataIndex: 'hiddenRisk'
         },
         {
           title: '整改建议',
           width: '150px',
+          checked: true,
           dataIndex: 'opition'
         },
         {
           title: '整改责任人',
           width: '150px',
+          checked: true,
           dataIndex: 'dutyUserName'
         },
         {
           title: '属地负责人',
           width: '150px',
+          checked: true,
           dataIndex: 'areaUserName'
         },
         {
           title: '备注',
           width: '150px',
+          checked: true,
           dataIndex: 'remark'
         },
         {
           title: '添加人',
           width: '150px',
+          checked: true,
           dataIndex: 'createdUserName'
         },
         {
-          title: '完成状态 closed,delay,on going',
+          title: '专业类型',
           width: '150px',
-          dataIndex: 'status'
+          checked: true,
+          dataIndex: 'professorType',
+          scopedSlots: { customRender: 'professorType' }
         },
         {
-          title: '专业类型 仪表 电气 机械',
+          title: '检查级别',
           width: '150px',
-          dataIndex: 'professorType'
-        },
-        {
-          title: '检查级别  公司级-部门组织-专业自查',
-          width: '150px',
-          dataIndex: 'checkLevel'
+          checked: true,
+          dataIndex: 'checkLevel',
+          scopedSlots: { customRender: 'checkLevel' }
         },
         {
           title: '整改时限',
           width: '150px',
+          checked: true,
           dataIndex: 'requireTime'
         },
         {
           title: '添加时间',
           width: '150px',
+          checked: true,
           dataIndex: 'createdTime'
         },
+        {
+          title: '状态',
+          width: '150px',
+          checked: true,
+          fixed: 'right',
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
+        },
         {
           title: '操作',
           key: 'action',
           width: '200px',
+          checked: true,
+          fixed: 'right',
           align: 'center',
           scopedSlots: { customRender: 'action' }
         }
@@ -243,6 +277,9 @@ export default {
   created () {
     // 下拉框map
     this.tableOption()
+    this.professorTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROFESSOR_TYPE)
+    this.checkLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_LEVEL)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.HIDDEN_DANGER_STATUS)
   },
   methods: {
     tableOption () {

+ 4 - 4
src/views/hidden/hidden/modules/RepairBaseForm.vue

@@ -16,7 +16,7 @@
       </a-form-item>
 
       <row-list :col="2">
-        <row-item>
+<!--        <row-item>
           <a-form-item
             label="设备名称"
             :labelCol="BaseTool.Constant.labelCol"
@@ -37,7 +37,7 @@
           >
             <a-input v-decorator="['parentSbNo']" />
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <!--        <row-item>
           <a-form-item
             label="设备部位"
@@ -103,7 +103,7 @@
             </a-tree-select>
           </a-form-item>
         </row-item>
-        <row-item>
+<!--        <row-item>
           <a-form-item
             label="生产装置"
             :labelCol="BaseTool.Constant.labelCol"
@@ -117,7 +117,7 @@
               v-decorator="['sbPosition', {rules: [{required: true, message: '生产装置不能为空'}]}]"
             />
           </a-form-item>
-        </row-item>
+        </row-item>-->
         <row-item>
           <a-form-item
             label="特殊作业类型"