浏览代码

维修优化

yuhan 1 年之前
父节点
当前提交
34502627cf

+ 25 - 29
src/views/module_cmms/repairManage/RepairManageList.vue

@@ -112,7 +112,7 @@
 
         <span slot="status" slot-scope="text, record">
           <a-tag v-if="record.status === '0'" color="orange">{{ text }}</a-tag>
-          <a-tag v-if="record.status === '1' || record.priority === '2'" color="blue">{{ text }}</a-tag>
+          <a-tag v-if="record.status === '1' || record.status === '2'" color="blue">{{ text }}</a-tag>
           <a-tag v-if="record.status === '3'">{{ text }}</a-tag>
         </span>
 
@@ -187,7 +187,7 @@
             scopedSlots: { customRender: 'priority' }
           },
           {
-            title:'维修工单编号',
+            title:'工单编号',
             align:"center",
             dataIndex: 'repaircode',
             // customCell: (record, index)=>{ return this.customCellDetail(record, index, 'customerName')}
@@ -199,19 +199,6 @@
             dataIndex: 'repairname'
           },
           {
-            title:'维修时间',
-            align:"center",
-            dataIndex: 'repairdate',
-            customRender:function (text) {
-              return !text?"":(text.length>10?text.substr(0,10):text)
-            }
-          },
-          // {
-          //   title:'设备ID',
-          //   align:"center",
-          //   dataIndex: 'equipmentid'
-          // },
-          {
             title:'设备名称',
             align:"center",
             dataIndex: 'equipmentname'
@@ -247,31 +234,40 @@
           {
             title:'维修时间',
             align:"center",
-            dataIndex: ''
+            dataIndex: 'repairdate',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
           },
           {
             title:'维修反馈',
             align:"center",
             dataIndex: 'feedback'
           },
+
+          // {
+          //   title:'设备ID',
+          //   align:"center",
+          //   dataIndex: 'equipmentid'
+          // },
           // {
           //   title:'维修结果',
           //   align:"center",
           //   dataIndex: 'result'
           // },
           // {
-            //   title:'关联ID',
-            //   align:"center",
-            //   dataIndex: 'relid'
-            // },
-            {
-              title:'创建时间',
-              align:"center",
-              dataIndex: 'createTime',
-              customRender:function (text) {
-                return !text?"":(text.length>10?text.substr(0,10):text)
-              }
-          },
+          //   title:'关联ID',
+          //   align:"center",
+          //   dataIndex: 'relid'
+          // },
+          // {
+          //   title:'创建时间',
+          //   align:"center",
+          //   dataIndex: 'createTime',
+          //   customRender:function (text) {
+          //     return !text?"":(text.length>10?text.substr(0,10):text)
+          //   }
+          // },
           // {
           //   title:'备注',
           //   align:"center",
@@ -305,7 +301,7 @@
           deleteBatch: "/cmmsRepair/cmmsRepair/deleteBatch",
           exportXlsUrl: "/cmmsRepair/cmmsRepair/exportXls",
           importExcelUrl: "cmmsRepair/cmmsRepair/importExcel",
-          
+          freeze: "/cmmsRepair/cmmsRepair/freeze",
         },
         dictOptions:{},
         superFieldList:[],

+ 39 - 19
src/views/module_cmms/repairManage/modules/RepairManageDetail.vue

@@ -9,39 +9,56 @@
     >
     <a-spin :spinning="confirmLoading">
       <!-- 基础信息详情 -->
-      <a-descriptions title="" bordered size="middle">
+      <a-descriptions title="" bordered size="middle" :column="2">
         <a-descriptions-item label="维修工单编号">
           {{detailData.repaircode}}
         </a-descriptions-item>
-        <a-descriptions-item label="工单名称">
+        <a-descriptions-item label="维修工单名称">
           {{detailData.repairname}}
         </a-descriptions-item>
+        <a-descriptions-item label="录入人">
+          {{detailData.createBy}}
+        </a-descriptions-item>
+        <a-descriptions-item label="工单创建时间">
+          {{detailData.createTime}}
+        </a-descriptions-item>
         <a-descriptions-item label="设备编号">
           {{detailData.equipmentcode}}
         </a-descriptions-item>
-        <a-descriptions-item label="优先级">
-          {{detailData.priority}}
-        </a-descriptions-item>
         <a-descriptions-item label="设备名称">
           {{detailData.equipmentname}}
         </a-descriptions-item>
+        <a-descriptions-item label="优先级">
+          <!-- 0 普通 1 紧急 2 特急	 -->
+          <a-tag v-if="detailData.priority === '0'">普通</a-tag>
+          <a-tag v-if="detailData.priority === '1'" color="orange">紧急</a-tag>
+          <a-tag v-if="detailData.priority === '2'" color="red">特急</a-tag>
+        </a-descriptions-item>
         <a-descriptions-item label="故障日期">
           {{detailData.faultdate}}
         </a-descriptions-item>
         <a-descriptions-item label="故障描述" :span="2">
-          {{detailData.repaircode}}
-        </a-descriptions-item>
-        <a-descriptions-item label="上一次维修时间">
-          {{detailData.repaircode}}
+          {{detailData.faultdesc}}
         </a-descriptions-item>
-        <a-descriptions-item label="维修反馈">
-          {{detailData.repaircode}}
+        <a-descriptions-item label="待办人">
+          {{detailData.repairuser}}
         </a-descriptions-item>
-        <a-descriptions-item label="处理结果">
+
+        <!-- <a-descriptions-item label="维修时间">
+          {{detailData.repairdate}}
+        </a-descriptions-item> -->
+        <!-- <a-descriptions-item label="维修反馈">
           {{detailData.repaircode}}
-        </a-descriptions-item>
-        <a-descriptions-item label="当前状态">
+        </a-descriptions-item> -->
+        <!-- <a-descriptions-item label="处理结果">
           {{detailData.repaircode}}
+        </a-descriptions-item> -->
+        <a-descriptions-item label="当前维修状态">
+          <!-- 0 上报故障 1 维修检查 2 维修挂单 3 维修结束 -->
+          <a-tag v-if="detailData.status === '0'" color="orange">上报故障</a-tag>
+          <a-tag v-if="detailData.status === '1'" color="blue">维修检查</a-tag>
+          <a-tag v-if="detailData.status === '2'" color="blue">维修挂单</a-tag>
+          <a-tag v-if="detailData.status === '3'">维修结束</a-tag>
         </a-descriptions-item>
       </a-descriptions>
       <!-- 分割线 -->
@@ -57,10 +74,12 @@
         :dataSource="logData"
         class="j-table-force-nowrap cmms-table">
 
-        <span slot="status" slot-scope="text, record">
-          <a-tag v-if="record.status === '0'" color="orange">{{ text }}</a-tag>
-          <a-tag v-if="record.status === '1' || record.priority === '2'" color="blue">{{ text }}</a-tag>
-          <a-tag v-if="record.status === '3'">{{ text }}</a-tag>
+        <span slot="nodename" slot-scope="text">
+          <!-- 0 上报故障 1 维修检查 2 维修挂单 3 维修结束 -->
+          <span v-if="text === '0'">上报故障</span>
+          <span v-if="text === '1'">维修检查</span>
+          <span v-if="text === '2'">维修挂单</span>
+          <span v-if="text === '3'">维修结束</span>
         </span>
 
       </a-table>
@@ -96,7 +115,8 @@
           {
             title:'节点名称',
             align:"center",
-            dataIndex: 'nodename'
+            dataIndex: 'nodename',
+            scopedSlots: { customRender: 'nodename' }
           },
           {
             title:'日期',

+ 2 - 2
src/views/module_cmms/repairManage/modules/RepairManageForm.vue

@@ -25,7 +25,7 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="故障描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="faultdesc">
-              <a-input v-model="model.faultdesc" placeholder="请输入故障描述"  ></a-input>
+              <a-textarea v-model="model.faultdesc" placeholder="请输入故障描述"  ></a-textarea>
             </a-form-model-item>
           </a-col>
           <!-- <a-col :span="24">
@@ -35,7 +35,7 @@
           </a-col> -->
           <a-col :span="24">
             <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
+              <a-textarea v-model="model.remark" placeholder="请输入备注"  ></a-textarea>
             </a-form-model-item>
           </a-col>
         </a-row>