From b3f2a8eada63deec3c920de15725491a2c508677 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 18 六月 2025 16:33:52 +0800
Subject: [PATCH] 1、设备TEEP页面新增故障率、故障时间以及加工时间(去除故障时间)字段的展示与筛选查询 2、设备管理页面新增设备与配送小组关联用于配送小组利用率图表页面

---
 src/views/mdc/base/modules/EquipmentList/UserModal.vue         |  137 +++++++++++++--------------------------------
 src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue |   36 +++++------
 2 files changed, 57 insertions(+), 116 deletions(-)

diff --git a/src/views/mdc/base/modules/EquipmentList/UserModal.vue b/src/views/mdc/base/modules/EquipmentList/UserModal.vue
index c102595..aa7a7a5 100644
--- a/src/views/mdc/base/modules/EquipmentList/UserModal.vue
+++ b/src/views/mdc/base/modules/EquipmentList/UserModal.vue
@@ -2,34 +2,25 @@
   <a-modal
     :title="title"
     :maskClosable="true"
-    :width="drawerWidth"
+    :width="modalWidth"
     @cancel="visible=false"
     :visible="visible"
     :footer="null"
     centered
     style="height: 100%;overflow: auto;padding-bottom: 53px;">
 
-    <template slot="title">
-      <div style="width: 100%;">
-        <span>{{ title }}</span>
-        <span style="display:inline-block;width:calc(100% - 51px);padding-right:10px;text-align: right">
-          <a-button @click="toggleScreen" icon="appstore" style="height:20px;width:20px;border:0px"></a-button>
-        </span>
-      </div>
-
-    </template>
-
     <a-spin :spinning="confirmLoading">
-      <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules">
+      <a-form-model ref="form" :form="form" :model="model" :rules="validatorRules" :labelCol="labelCol"
+                    :wrapperCol="wrapperCol">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item label="缁熶竴缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId">
+            <a-form-model-item label="缁熶竴缂栫爜" prop="equipmentId">
               <a-input-search v-model="model.equipmentId" :disabled="disableSubmit" @search="deviceSearch" enter-button
                               placeholder='璇烽�夋嫨缁熶竴缂栫爜'/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="璁惧鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="璁惧鍚嶇О">
               <a-input :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧悕绉�"
                        v-model="model.equipmentName"/>
             </a-form-model-item>
@@ -38,15 +29,15 @@
 
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item v-if="isDepartType == 0" label="閮ㄩ棬鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol"
+            <a-form-model-item v-if="isDepartType == 0" label="閮ㄩ棬鍒嗛厤"
                                v-show="!departDisabled">
               <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false"
                                          @back="backDepartInfo" :backDepart="true"
                                          :treeOpera="true"></j-select-equipment-depart>
             </a-form-model-item>
 
-            <a-form-model-item v-if="isDepartType == -1" label="璁惧绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷"
+            <a-form-model-item v-if="isDepartType == -1" label="璁惧绫诲瀷">
+              <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" allow-clear
                         :triggerChange="true"
                         v-model="model.equipmentType">
                 <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
@@ -56,7 +47,7 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="杞﹂棿鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled"
+            <a-form-model-item label="杞﹂棿鍒嗛厤" v-show="!productionDisabled"
                                ref="selectedProduction" prop="selectedProduction">
               <!--<j-select-equipment-production  v-decorator="['selectedProduction',{rules:[{required:true,message:'璇烽�夋嫨杞﹂棿!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>-->
               <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false"
@@ -68,11 +59,11 @@
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item v-if="isDepartType == -1" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item v-if="isDepartType == -1" label="绯荤粺鐗堟湰鍙�">
               <a-input :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿"
                        v-model="model.systemVersion"/>
             </a-form-model-item>
-            <a-form-model-item v-if="isDepartType == 0" label="璁惧绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item v-if="isDepartType == 0" label="璁惧绫诲瀷">
               <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷"
                         :triggerChange="true"
                         v-model="model.equipmentType">
@@ -84,7 +75,7 @@
 
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="璁惧鍔熺巼(kw)" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="璁惧鍔熺巼(kw)">
               <a-input :disabled="disableSubmit" allow-clear placeholder="璇疯緭鍏ヨ澶囧姛鐜�"
                        v-model="model.devicePower"/>
             </a-form-model-item>
@@ -93,13 +84,13 @@
 
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item label="鏈哄簥IP" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="鏈哄簥IP">
               <a-input :disabled="true" placeholder="璇疯緭鍏ユ満搴奍P"
                        v-model="model.equipmentIp"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="鏈哄簥绔彛" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="鏈哄簥绔彛">
               <a-input :disabled="true" placeholder="璇疯緭鍏ユ満搴婄鍙�"
                        v-model="model.dataPort"/>
             </a-form-model-item>
@@ -108,14 +99,14 @@
 
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item label="椹卞姩绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="椹卞姩绫诲瀷">
               <j-dict-select-tag :disabled="true" placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
                                  :triggerChange="true" dictCode="mdc_driveType"
-                                 v-model="model.driveType" allow-clear/>
+                                 v-model="model.driveType"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="璁惧鍨嬪彿" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="璁惧鍨嬪彿">
               <a-input :disabled="true" allow-clear placeholder="璇疯緭鍏ヨ澶囧瀷鍙�"
                        v-model="model.equipmentModel"/>
             </a-form-model-item>
@@ -124,30 +115,28 @@
 
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item label="绯荤粺绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="绯荤粺绫诲瀷">
               <j-dict-select-tag placeholder="璇烽�夋嫨绯荤粺绫诲瀷" :triggerChange="true" dictCode="system_type"
-                                 :disabled="disableSubmit"
-                                 v-model="model.systemType" allow-clear/>
+                                 :disabled="disableSubmit" v-model="model.systemType"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="璁惧绾у埆" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="璁惧绾у埆">
               <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="model.deviceLevel"
-                                 :disabled="disableSubmit" allow-clear/>
+                                 :disabled="disableSubmit"/>
             </a-form-model-item>
           </a-col>
         </a-row>
 
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item label="璁惧绉嶇被" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="璁惧绉嶇被">
               <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="model.deviceCategory"
-                                 :disabled="disableSubmit"
-                                 allow-clear/>
+                                 :disabled="disableSubmit"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="鎺掑簭" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item label="鎺掑簭">
               <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="璇疯緭鍏ユ帓搴�"
                        v-model="model.sortNo" style="width: 100%"/>
             </a-form-model-item>
@@ -155,8 +144,14 @@
         </a-row>
 
         <a-row :gutter="24">
-          <a-col :span='24'>
-            <a-form-model-item label="璁惧鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
+          <a-col :span='12'>
+            <a-form-model-item label="閰嶉�佸皬缁�" prop="teamCode">
+              <j-dict-select-tag placeholder="璇烽�夋嫨閰嶉�佸皬缁�" dictCode="mdc_staff_team" v-model="model.teamCode"
+                                 :disabled="disableSubmit"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span='12'>
+            <a-form-model-item label="璁惧鍥剧墖">
               <j-image-upload v-model="model.equipmentImage" :disabled="disableSubmit"/>
             </a-form-model-item>
           </a-col>
@@ -177,7 +172,7 @@
 
         <a-row :gutter="24">
           <a-col :span='12'>
-            <a-form-model-item v-if="isDepartType == 0" label="绯荤粺鐗堟湰鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
+            <a-form-model-item v-if="isDepartType == 0" label="绯荤粺鐗堟湰鍙�">
               <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="璇疯緭鍏ョ郴缁熺増鏈彿"
                        v-model="model.systemVersion"/>
             </a-form-model-item>
@@ -235,36 +230,16 @@
         departDisabled: false, //鏄惁鏄垜鐨勯儴闂ㄨ皟鐢ㄨ椤甸潰
         productionDisabled: false, //鏄惁鏄垜鐨勮溅闂磋皟鐢ㄨ椤甸潰
         roleDisabled: false, //鏄惁鏄鑹茬淮鎶よ皟鐢ㄨ椤甸潰
-        modalWidth: 800,
-        drawerWidth: 700,
-        modalToggleFlag: true,
+        modalWidth: 900,
         confirmDirty: false,
         userId: '', //淇濆瓨鐢ㄦ埛id
-        // disableSubmit:false,
         disableSubmit: true,
         dateFormat: 'YYYY-MM-DD',
         form: this.$form.createForm(this),
-
         validatorRules: {
-          // equipmentId: [{required: false, message: '璇烽�夋嫨璁惧缂栧彿!'}, {validator: this.validatequipmentId}],
-          equipmentId:
-            [
-              {
-                required: true, message: '璇烽�夋嫨璁惧缂栧彿!'
-              }
-              // {
-              // validator: this.validatequipmentId
-              // }
-            ],
-          // trigger: 'blur' // 瑙﹀彂鏂瑰紡
-
-          selectedProduction:
-            [
-              {
-                required: true, message: '璇烽�夋嫨杞﹂棿'
-              }
-            ]
-
+          equipmentId: [{ required: true, message: '璇烽�夋嫨璁惧缂栧彿!' }],
+          selectedProduction: [{ required: true, message: '璇烽�夋嫨杞﹂棿' }],
+          teamCode: [{ required: true, message: '璇烽�夋嫨閰嶉�佸皬缁�' }]
         },
         departIdShow: false,
         title: '鎿嶄綔',
@@ -328,8 +303,6 @@
       this.queryGroup()
       this.queryTreeData()
       this.getAppPlatformName()
-      // this.initRoleList()
-      // this.initTenantList()
     },
     computed: {
       uploadAction: function() {
@@ -363,11 +336,7 @@
         getAction(this.url.queryEquipmentType).then(res => {
           if (res.success) {
             this.selectList = res.result
-            // this.selectList = res.result.map((item, index, arr) => {
-            //   return { label: item.id, value: item.equipmentTypeName + '' }
-            // })
           } else {
-            // this.$message.warning(res.message)
             this.$notification.warning({
               message: '娑堟伅',
               description: res.message
@@ -417,46 +386,31 @@
         //鏍规嵁灞忓箷瀹藉害鑷�傚簲鎶藉眽瀹藉害
         this.resetScreenSize()
 
-        // that.userId = record.id;
-        // console.log(record)
         if (record.systemValue != null) {
           this.systemValue = record.systemValue
         } else {
           this.systemValue = '3'
         }
         that.model = Object.assign({}, record)
-        // that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record);
-        // this.model = Object.assign({}, record)
 
         this.$nextTick(() => {
           this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort',
             'driveType', 'sortNo', 'remark', 'systemVersion', 'devicePower', 'controlSystem', 'saveTableName', 'systemValue'))
         })
         if (record.hasOwnProperty('id')) {
-          // that.getUserRoles(record.id);
           that.getUserDeparts(record.id)
         }
-        // console.log('that.model=',that.model)
       },
       isDisabledAuth(code) {
         return disabledAuthFilter(code)
       },
-      //绐楀彛鏈�澶у寲鍒囨崲
-      toggleScreen() {
-        if (this.modalToggleFlag) {
-          this.modalWidth = window.innerWidth
-        } else {
-          this.modalWidth = 800
-        }
-        this.modalToggleFlag = !this.modalToggleFlag
-      },
       // 鏍规嵁灞忓箷鍙樺寲,璁剧疆鎶藉眽灏哄
       resetScreenSize() {
         let screenWidth = document.body.clientWidth
-        if (screenWidth < 500) {
-          this.drawerWidth = screenWidth
+        if (screenWidth < 900) {
+          this.modalWidth = screenWidth
         } else {
-          this.drawerWidth = 700
+          this.modalWidth = 900
         }
       },
       getUserDeparts(userid) {
@@ -477,10 +431,7 @@
             }
 
             that.model.selectedDeparts = selectDepartKeys.join(',')
-            // that.model.selectedProduction = selectDepartKeys.join(",")
-
             that.nextDepartOptions = departOptions
-            // console.log('that.nextDepartOptions=',that.nextDepartOptions)
           }
         })
 
@@ -502,13 +453,11 @@
             that.model.selectedProduction = selectProductKeys.join(',')
 
             that.nextProductionOptions = ProductionOptions
-            // console.log('that.nextProductionOptions=',that.nextProductionOptions)
           }
         })
         //杞﹂棿鐨剈rl
       },
       backDepartInfo(info) {
-        // console.log(info)
         this.model.departIds = this.model.selectedDeparts
         this.nextDepartOptions = info.map((item, index, arr) => {
           let c = { label: item.text, value: item.value + '' }
@@ -516,7 +465,6 @@
         })
       },
       backProductionInfo(info) {
-        // console.log(info)
         this.model.productionIds = this.model.selectedProduction
         this.nextProductionOptions = info.map((item, index, arr) => {
           let c = { label: item.text, value: item.value + '' }
@@ -537,7 +485,6 @@
         this.nextDepartOptions = []
         this.nextProductionOptions = []
         this.departIdShow = false
-        // this.$refs.form.resetFields();
       },
       moment,
       handleSubmit() {
@@ -546,10 +493,6 @@
         this.$refs.form.validate(valid => {
           if (valid) {
             that.confirmLoading = true
-            //濡傛灉鏄笂绾ф嫨浼犲叆departIds,鍚﹀垯涓虹┖
-            // if(this.model.userIdentity!==2){
-            //   this.model.departIds="";
-            // }
             if (this.systemValue == null) {
               this.$message.warning('璇烽�夋嫨绯荤粺绫诲瀷!')
               return false
diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
index a5ab8df..011b86f 100644
--- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
+++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
@@ -82,7 +82,7 @@
               <a-col :md="24" :sm="24" :xs="24"
                      style="display: flex;justify-content: space-between;align-items: flex-start">
                 <div>
-                  <a-space style="margin-right: 20px">
+                  <a-space style="margin-right: 20px;margin-bottom: 20px">
                     <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
                     <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
                     <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
@@ -137,12 +137,14 @@
                 <template v-for="(tableHead, index) in tableHeads">
                   <th v-if="checkedList.indexOf('lyl') > -1">鍒╃敤鐜�(%)</th>
                   <th v-if="checkedList.indexOf('kjl') > -1">寮�鏈虹巼(%)</th>
+                  <th v-if="checkedList.indexOf('gzl') > -1">鏁呴殰鐜�(%)</th>
                   <th v-if="checkedList.indexOf('kjsj') > -1">寮�鏈烘椂闂�(灏忔椂)</th>
                   <th v-if="checkedList.indexOf('jgsj') > -1">鍔犲伐鏃堕棿(灏忔椂)</th>
+                  <th v-if="checkedList.indexOf('qcgz') > -1">鍔犲伐鏃堕棿(灏忔椂)锛堝幓闄ゆ晠闅滄椂闂达級</th>
                   <th v-if="checkedList.indexOf('djsj') > -1">寰呮満鏃堕棿(灏忔椂)</th>
                   <th v-if="checkedList.indexOf('gjsj') > -1">鍏虫満鏃堕棿(灏忔椂)</th>
+                  <th v-if="checkedList.indexOf('gzsj') > -1">鏁呴殰鏃堕棿(灏忔椂)</th>
                 </template>
-
               </tr>
               </thead>
               <tbody>
@@ -186,11 +188,17 @@
                   <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
                     {{tableHead.openRate | numFilter}}
                   </td>
+                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1">
+                    {{tableHead.faultRate | numFilter}}
+                  </td>
                   <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                     {{tableHead.openLong | getFormattedTime}}
                   </td>
                   <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
                     {{tableHead.processLong | getFormattedTime}}
+                  </td>
+                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('qcgz') > -1">
+                    {{tableHead.removeFaultRunLong | getFormattedTime}}
                   </td>
                   <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
                     {{tableHead.waitLong | getFormattedTime}}
@@ -198,13 +206,15 @@
                   <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
                     {{tableHead.closeLong | getFormattedTime}}
                   </td>
+                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzsj') > -1">
+                    {{tableHead.faultLong | getFormattedTime}}
+                  </td>
                 </template>
 
               </tr>
 
               </tbody>
             </table>
-
           </div>
         </div>
       </a-spin>
@@ -228,8 +238,6 @@
         typeTree: '',
         typeParent: 1,
         typeEquipment: 1,
-        TreeIDOne: 1,
-        TreeIDTwo: 2,
         deviceTypeDict: '',
         dates: [],
         equipmentTypeList: [],
@@ -249,10 +257,13 @@
         efficiencyOptions: [
           { label: '鍒╃敤鐜�', value: 'lyl' },
           { label: '寮�鏈虹巼', value: 'kjl' },
+          { label: '鏁呴殰鐜�', value: 'gzl' },
           { label: '寮�鏈烘椂闂�', value: 'kjsj' },
           { label: '鍔犲伐鏃堕棿', value: 'jgsj' },
+          { label: '鍔犲伐鏃堕棿锛堝幓闄ゆ晠闅滄椂闂达級', value: 'qcgz' },
           { label: '寰呮満鏃堕棿', value: 'djsj' },
-          { label: '鍏虫満鏃堕棿', value: 'gjsj' }
+          { label: '鍏虫満鏃堕棿', value: 'gjsj' },
+          { label: '鏁呴殰鏃堕棿', value: 'gzsj' }
         ],
         checkedList: ['lyl'],
         dataList: [],
@@ -263,12 +274,6 @@
         },
         tableHeads: [],
         distinguishColorList: [],
-        utilizationRateRowAverage: '',
-        openRateRowAverage: '',
-        openLongRowAverage: '',
-        processLongRowAverage: '',
-        waitLongRowAverage: '',
-        closeLongRowAverage: '',
         spinning: false
       }
     },
@@ -728,17 +733,10 @@
 
   .dataContent {
     white-space: nowrap;
-    /*margin: 0;*/
-    /*border: none;*/
     border-collapse: separate;
     border-spacing: 0;
-    /*table-layout: fixed;*/
     border: 1px solid #ccc;
-    /*border: 1px solid #ccc;*/
     width: 100%;
-    /*height: 100%;*/
-    /*overflow: hidden;*/
-    /*overflow-y: auto;*/
     text-align: center;
   }
 

--
Gitblit v1.9.3