Parcourir la source

计划配置页面修改

huang_an il y a 2 ans
Parent
commit
620d862dcd

+ 2 - 2
src/components/CommomSelect/equipment-select.vue

@@ -16,7 +16,7 @@
 </template>
 
 <script>
-  import { getTreeByType } from '@/api/classifyManage';
+  import { getTreeByGroup } from '@/api/classifyManage';
   export default {
     props: {
       // 选中的数据(v-model)
@@ -37,7 +37,7 @@
     },
     methods: {
       async getData() {
-        const res = await getTreeByType(0);
+        const res = await getTreeByGroup({ type: 4 });
         this.treeData = res.data;
         this.$emit('setRootId', res.data[0].id, res.data);
         // this.treeData = this.$util.toTreeData({

+ 15 - 6
src/views/rulesManagement/inspectionPoint/components/MaterialAdd.vue → src/views/rulesManagement/components/MaterialAdd.vue

@@ -64,7 +64,7 @@
 <script>
   import ProductSearch from './product-search.vue';
   import { getAssetList } from '@/api/ruleManagement/plan';
-  import { getTreeByPid } from '@/api/classifyManage';
+  import { getTreeByPid, getTreeByGroup } from '@/api/classifyManage';
   export default {
     data() {
       return {
@@ -88,7 +88,7 @@
             width: 45,
             align: 'center',
             selectable: (row, index) => {
-              return !this.processData.some((it) => row.id == it.categoryId);
+              return !this.processData.some((id) => id == row.id);
             },
             reserveSelection: true,
             fixed: 'left'
@@ -144,8 +144,13 @@
         this.categoryId = res.list[0]?.categoryId;
         return res;
       },
-      open(equipmentList, ruleIdListIndex) {
-        this.processData = equipmentList || [];
+      open(ruleIdList, ruleIdListIndex) {
+        let list = ruleIdList
+          .map((item) => {
+            return item.equipmentList;
+          })
+          .flat();
+        this.processData = list.map((item) => item.id);
         this.ruleIdListIndex = ruleIdListIndex;
         this.visible = true;
         this.getTreeData();
@@ -155,7 +160,7 @@
         try {
           this.treeLoading = true;
 
-          const res = await getTreeByPid(4);
+          const res = await getTreeByGroup({ type: 4 });
           this.treeLoading = false;
           if (res?.code === '0') {
             this.treeList = res.data;
@@ -260,7 +265,11 @@
       }
     }
   }
-
+  ::v-deep {
+    .el-checkbox__input.is-disabled .el-checkbox__inner {
+      background-color: #c1c1c1 !important;
+    }
+  }
   .ml60 {
     margin-left: 60px;
   }

+ 0 - 0
src/views/rulesManagement/inspectionPoint/components/product-search.vue → src/views/rulesManagement/components/product-search.vue


+ 147 - 52
src/views/rulesManagement/inspectionPoint/components/MaterialModal.vue → src/views/rulesManagement/components/programRulesDialog.vue

@@ -5,7 +5,7 @@
     v-if="visible"
     :append-to-body="true"
     custom-class="ele-dialog-form"
-    :title="title"
+    :title="dialogTitle"
     @update:visible="updateVisible"
   >
     <header-title title="基本信息"></header-title>
@@ -69,18 +69,27 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="8">
-          <el-form-item label="审核人" prop="approvalUserId">
+        <el-col :span="8" v-if="addForm.autoOrder">
+          <el-form-item label="部门" prop="groupId">
+            <deptSelect
+              v-model="addForm.groupId"
+              @changeGroup="searchDeptNodeClick"
+              :disabled="isBindPlan"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8" v-if="addForm.autoOrder">
+          <el-form-item label="负责人" prop="executeIdList">
             <el-select
-              v-model="addForm.approvalUserId"
+              v-model="addForm.executeIdList"
               size="small"
-              clearable
               style="width: 100%"
               :disabled="isBindPlan"
+              multiple
               filterable
             >
               <el-option
-                v-for="item in uerList"
+                v-for="item in executorList"
                 :key="item.id"
                 :value="item.id"
                 :label="item.name"
@@ -88,27 +97,18 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder">
-          <el-form-item :label="formLabel + '部门'" prop="groupId">
-            <deptSelect
-              v-model="addForm.groupId"
-              @changeGroup="searchDeptNodeClick"
-              :disabled="isBindPlan"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder">
-          <el-form-item :label="formLabel + '人员'" prop="executeIdList">
+        <el-col :span="8">
+          <el-form-item label="审核人" prop="approvalUserId">
             <el-select
-              v-model="addForm.executeIdList"
+              v-model="addForm.approvalUserId"
               size="small"
+              clearable
               style="width: 100%"
               :disabled="isBindPlan"
-              multiple
               filterable
             >
               <el-option
-                v-for="item in executorList"
+                v-for="item in uerList"
                 :key="item.id"
                 :value="item.id"
                 :label="item.name"
@@ -171,7 +171,7 @@
         <el-tab-pane
           v-for="(item, ruleIdListIndex) in ruleIdList"
           :key="item.ruleId"
-          :label="item.ruleName"
+          :label="item.name"
           :name="item.ruleId"
         >
           <div class="el-tab_box">
@@ -183,7 +183,7 @@
                     icon="el-icon-plus"
                     class="ele-btn-icon"
                     type="primary"
-                    @click="handleAdd(item.equipmentList, ruleIdListIndex)"
+                    @click="handleAdd(ruleIdList, ruleIdListIndex)"
                     >新增</el-button
                   >
                 </div>
@@ -194,7 +194,7 @@
                 <el-table-column label="设备名称" align="center" prop="name">
                   <template slot-scope="{ row, $index }">
                     <template>
-                      {{ row.category.name }}
+                      {{ row.name }}
                     </template>
                   </template>
                 </el-table-column>
@@ -208,10 +208,19 @@
                 <el-table-column label="固资编码" align="center" prop="fixCode">
                   <template slot-scope="{ row, $index }">
                     <template>
-                      {{ row.category.fixCode }}
+                      {{ row.fixCode }}
                     </template>
                   </template>
                 </el-table-column>
+                <el-table-column label="操作" width="100">
+                  <template slot-scope="scope">
+                    <el-button
+                      type="text"
+                      @click="deleteEquipment(scope.$index)"
+                      >删除</el-button
+                    >
+                  </template>
+                </el-table-column>
               </el-table>
             </div>
             <div class="ruleMatters_box">
@@ -354,7 +363,7 @@
           :key="item.id"
           :value="item.id"
           :label="item.name"
-          @click.native="ruleObj.ruleName = item.name"
+          @click.native="ruleChange(item)"
         ></el-option>
       </el-select>
       <template v-slot:footer>
@@ -404,10 +413,6 @@
           return '新增巡检点计划配置';
         }
       },
-      title: {
-        type: String,
-        default: ''
-      },
       visible: {
         type: Boolean,
         default: false
@@ -432,7 +437,8 @@
         isBindPlan: false,
         ruleObj: {
           ruleId: '',
-          ruleName: '',
+          name: '',
+          code: '',
           equipmentList: []
         },
         ruleIdList: [],
@@ -450,7 +456,7 @@
           executorPhone: '',
           status: 1, // 状态
           remark: '', // 备注
-          urgent: ''
+          urgent: '1'
         },
         ruleNameList: [], // 规则列表
         uerList: [], // 审核人列表
@@ -613,15 +619,37 @@
         } else {
           //  获取计划配置单号
           this.getOrderCode(tips);
+          this.addForm = {
+            code: '', // 计划配置单号
+            name: '', // 计划配置名称
+            autoOrder: 1, // 自动派单
+            ruleId: '', // 规则id
+            ruleName: '', // 规则名称
+            duration: null, // 计划完成时长
+            categoryId: '', // 设备类别id
+            approvalUserId: '', // 审核人id
+            groupId: '', // 巡点检部门code
+            executeIdList: [], // 巡点检人员id
+            executorPhone: '',
+            status: 1, // 状态
+            remark: '', // 备注
+            urgent: '1'
+          };
+          this.ruleIdList = [];
           this.isBindPlan = false;
           this.planRuleEquiList = [];
           //   this.matterRulesList = [];
         }
       },
+      ruleChange(item) {
+        this.ruleObj.name = item.name;
+        this.ruleObj.code = item.code;
+      },
       save() {
         console.log(this.addForm);
         console.log(this.ruleIdList);
         this.$refs.addFormRef.validate(async (valid) => {
+          console.log(valid);
           if (valid) {
             try {
               //   this.addForm.deviceInfo = selectList.map((item) => {
@@ -636,26 +664,44 @@
                 ? 1
                 : this.dialogTitle.includes('保养')
                 ? 2
-                : 3;
+                : 4;
+              console.log(this.ruleIdList);
               this.addForm.isBindPlan = this.isBindPlan;
-              let sendMsg = [];
-              this.ruleIdList.forEach((ruleItem) => {
-                let obj = { ...this.addForm };
-                obj.ruleId = ruleItem.ruleId;
-                obj.ruleName = ruleItem.ruleName;
-                obj.deviceInfo = ruleItem.equipmentList.map((item) => {
-                  return {
-                    substanceId: item.position[0].substanceId
-                  };
-                });
-                obj.categoryId = ruleItem.categoryId;
-                obj.ruleItems = ruleItem.ruleItems;
-                sendMsg.push(obj);
+              let planConfigAddOrUpdatePOList = this.ruleIdList.map((item) => {
+                return {
+                  id: item.id,
+                  ruleId: item.ruleId,
+                  ruleName: item.name,
+                  ruleCode: item.code,
+                  categoryId: item.categoryId,
+                  deviceInfo: item.equipmentList.map((item) => {
+                    return {
+                      substanceId: this.dialogTitle.includes('新增')
+                        ? item.position[0].substanceId
+                        : item.id,
+                      // 前端回显字段
+                      id: item.id,
+                      codeNumber: item.codeNumber,
+                      name: item.name,
+                      fixCode: item.fixCode
+                    };
+                  }),
+                  ruleMatters: item.ruleItems
+                };
               });
+              this.addForm.ruleName = this.ruleIdList
+                .map((item) => item.name)
+                .join(',');
+              this.addForm.ruleCode = this.ruleIdList
+                .map((item) => item.code)
+                .join(',');
+              this.addForm.planConfigAddOrUpdatePOList =
+                planConfigAddOrUpdatePOList;
+              this.addForm.ruleId = '0'; // 无效后台验证
+              let sendMsg = deepClone(this.addForm);
               const type = this.dialogTitle.includes('新增') ? '新增' : '编辑';
               let res = await saveOrUpdate(sendMsg);
               if (res) {
-                this.visible = false;
                 this.$message.success(type + '成功!');
                 this.$emit('done');
               }
@@ -680,6 +726,9 @@
           this.$refs.operationGuideDialog.open(row, index);
         }
       },
+      deleteEquipment(index) {
+        this.ruleIdList[this.ruleIndex].equipmentList.splice(index, 1);
+      },
       deleteItem(index) {
         this.ruleIdList[this.ruleIndex].ruleItems.splice(index, 1);
       },
@@ -707,10 +756,29 @@
           console.log('res----------', res);
           this.addForm = res;
           this.isBindPlan = res.isBindPlan;
-          //   this.categoryEquipment(res.categoryLevelId);
+          this.categoryEquipment(res.categoryLevelId);
+          this.ruleIdList = res.planConfigVOList.map((item) => {
+            return {
+              id: item.id,
+              ruleId: item.ruleId,
+              name: item.ruleName,
+              code: item.code,
+              categoryId: item.categoryId,
+              equipmentList: item.deviceInfo.map((item) => {
+                return {
+                  name: item.name,
+                  id: item.id,
+                  fixCode: item.fixCode,
+                  codeNumber: item.codeNumber
+                };
+              }),
+              ruleItems: item.ruleMatters
+            };
+          });
+          this.tabsValue = this.ruleIdList[0].ruleId;
           const params = { groupId: res.groupId };
           this.getUserList(params);
-          this._getMatterRulesDetails(res.ruleId);
+          // this._getMatterRulesDetails(res.ruleId);
           this.$set(this.addForm, 'code', res.code);
           this.$set(this.addForm, 'urgent', JSON.stringify(res.urgent));
           this.$set(this.addForm, 'executeIdList', res.executeId.split(','));
@@ -744,7 +812,11 @@
       },
       // 选择设备
       chooseEquipment(data, index, categoryId) {
-        this.$set(this.ruleIdList[index], 'equipmentList', data);
+        this.$set(
+          this.ruleIdList[index],
+          'equipmentList',
+          this.ruleIdList[index].equipmentList.concat(data)
+        );
         this.$set(this.ruleIdList[index], 'categoryId', categoryId);
         console.log(this.ruleIdList);
       },
@@ -758,11 +830,16 @@
           const code = await getCode('maintainconfig_code');
           this.$set(this.addForm, 'code', code);
         }
+        if (tips.includes('量具送检')) {
+          const code = await getCode('quantity_code');
+          this.$set(this.addForm, 'code', code);
+        }
       },
       //选择部门(搜索)
-      searchDeptNodeClick(info) {
+      searchDeptNodeClick(info, data) {
         if (info) {
           // 根据部门获取人员
+          this.addForm.groupName = data.name;
           const params = { groupId: info };
           this.getUserList(params);
         } else {
@@ -824,6 +901,20 @@
             this.ruleNameList = res.list || [];
           }
         }
+        if (
+          this.dialogTitle === '新增量具送检计划配置' ||
+          this.dialogTitle === '编辑量具送检计划配置'
+        ) {
+          const res = await getRule({
+            status: 1,
+            type: 5,
+            pageNum: 1,
+            size: -1
+          });
+          if (res.list) {
+            this.ruleNameList = res.list || [];
+          }
+        }
       },
       downloadFile(file) {
         getFile({ objectName: file.storePath }, file.name);
@@ -849,8 +940,8 @@
         this.versionList = res.list;
       },
 
-      handleAdd(equipmentList, ruleIdListIndex) {
-        this.$refs.productRefs.open(equipmentList, ruleIdListIndex);
+      handleAdd(ruleIdList, ruleIdListIndex) {
+        this.$refs.productRefs.open(ruleIdList, ruleIdListIndex);
       },
 
       /* 更新visible */
@@ -992,6 +1083,10 @@
 </script>
 
 <style lang="scss" scoped>
+  ::v-deep .el-row {
+    display: flex;
+    flex-wrap: wrap;
+  }
   ::v-deep .el-tab_box {
     display: flex;
     margin-top: 10px;

+ 196 - 72
src/views/rulesManagement/inspectionPoint/detail.vue

@@ -3,7 +3,11 @@
     <div class="main_content">
       <!-- 基本信息 -->
       <div class="base_info">
-        <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
+        <HeaderTitle title="基本信息" size="16px"
+          ><el-button type="primary" @click="$router.go(-1)"
+            >返回</el-button
+          ></HeaderTitle
+        >
         <el-row class="base_info_content">
           <el-col :span="6">
             <span>计划单号:</span>
@@ -14,40 +18,28 @@
             <span>{{ detailsForm.name }}</span>
           </el-col>
           <el-col :span="6">
-            <span>巡点检部门:</span>
-            <span>{{ detailsForm.groupName }}</span>
+            <span>部门:</span>
+            <span>{{ detailsForm.planConfigVOList[0].groupName }}</span>
           </el-col>
           <el-col :span="6">
-            <span>:</span>
-            <span>{{ detailsForm.executorName }}</span>
+            <span>负责人:</span>
+            <span>{{ detailsForm.planConfigVOList[0].approvalUserName }}</span>
           </el-col>
           <el-col :span="6">
             <span>计划完成时长:</span>
             <span>{{ detailsForm.duration }}分钟</span>
           </el-col>
-          <el-col :span="6">
-            <span>设备分类:</span>
-            <span>{{ detailsForm.categoryName }}</span>
-          </el-col>
-          <el-col :span="6">
-            <span>规则名称:</span>
-            <span>{{ detailsForm.ruleName }}</span>
-          </el-col>
-          <!--          <el-col :span="6">
-            <span>创建部门:</span>
-            <span>{{ detailsForm.createOrgName }}</span>
-          </el-col> -->
-          <el-col :span="6">
-            <span>创建人:</span>
-            <span>{{ detailsForm.createUserName }}</span>
-          </el-col>
           <el-col :span="6">
             <span>创建时间:</span>
             <span>{{ detailsForm.createTime }}</span>
           </el-col>
           <el-col :span="6">
             <span>审核人:</span>
-            <span>{{ detailsForm.approvalUserName }}</span>
+            <span>{{
+              detailsForm.planConfigVOList[0].execute
+                .map((item) => item.userName)
+                .join(',')
+            }}</span>
           </el-col>
           <el-col :span="24">
             <span>备注:</span>
@@ -55,51 +47,103 @@
           </el-col>
         </el-row>
       </div>
-      <!-- 巡点检设备 -->
-      <div class="patrol_equipment_info">
-        <HeaderTitle title="巡点检设备" size="16px"></HeaderTitle>
-        <div class="patrol_equipment_info_content">
-          <div
-            class="equipment_item"
-            v-for="item in detailsForm.deviceInfo"
-            :key="item.id"
-          >
-            <div class="equipment_info">
-              <div class="item_info">
-                <span class="item_label">设备编码</span>
-                <span class="item_value">{{ item.substance.code }}</span>
-              </div>
-              <div class="item_info">
-                <span class="item_label">设备名称</span>
-                <span class="item_value">{{ item.substance.name }}</span>
-              </div>
-              <div class="item_info">
-                <span class="item_label">设备型号</span>
-                <span class="item_value">{{ item.substance.model }}</span>
-              </div>
-              <div class="item_info">
-                <span class="item_label">设备位置</span>
-                <span class="item_value">{{
-                  item.substance.positionNames
-                }}</span>
-              </div>
+      <el-tabs v-model="tabsValue" type="card">
+        <el-tab-pane
+          v-for="(item, ruleIdListIndex) in ruleIdList"
+          :key="item.ruleId"
+          :label="item.name"
+          :name="item.ruleId"
+        >
+          <div class="el-tab_box">
+            <div class="equipmentList_box">
+              <header-title title="设备列表"> </header-title>
+              <el-table :data="item.equipmentList" border>
+                <el-table-column label="序号" type="index" width="50">
+                </el-table-column>
+                <el-table-column label="设备名称" align="center" prop="name">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.name }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="编号" align="center" prop="codeNumber">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.codeNumber }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="固资编码" align="center" prop="fixCode">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.fixCode }}
+                    </template>
+                  </template>
+                </el-table-column>
+              </el-table>
             </div>
-            <p>操作事项</p>
-            <div class="matter_info">
-              <el-table :data="matterRulesList" border>
-                <el-table-column label="序号" align="center" width="80">
+            <div class="ruleMatters_box">
+              <header-title title="规则事项"> </header-title>
+              <el-table :data="item.ruleItems" border>
+                <el-table-column label="序号" width="50">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + 1 }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column label="事项" prop="name" />
-                <el-table-column label="内容" prop="content" />
-                <el-table-column label="标准" prop="norm" />
+                <el-table-column label="事项" prop="name" width="100">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.name }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="内容" prop="content" width="300">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.content }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作指导" prop="operationGuide">
+                  <template slot-scope="scope">
+                    <div class="operationGuide_box">
+                      <div class="left_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .toolList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.name }}</div
+                          >
+                        </template>
+                      </div>
+                      <div class="line"></div>
+                      <div class="right_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .procedureList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.content }}</div
+                          >
+                        </template>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="标准" prop="norm" width="100">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.norm }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
               </el-table>
             </div>
           </div>
-        </div>
-      </div>
+        </el-tab-pane>
+      </el-tabs>
     </div>
   </div>
 </template>
@@ -111,12 +155,16 @@
     name: 'patrolConfigDetail',
     data() {
       return {
+        ruleIdList: [],
+        tabsValue: '',
         detailsLoading: false,
-        detailsForm: {},
-        matterRulesList: []
+        detailsForm: {
+          planConfigVOList: [{}]
+        }
       };
     },
     mounted() {
+      console.log('-----------------');
       this.getDetailsData(this.$route.query.id);
     },
     computed: {},
@@ -129,28 +177,104 @@
             this.detailsLoading = false;
             console.log('====res', res);
             this.detailsForm = res;
-            let arr = [];
-            res.execute.map((item) => {
-              arr.push(item.userName);
+            this.ruleIdList = res.planConfigVOList.map((item) => {
+              return {
+                ruleId: item.ruleId,
+                name: item.ruleName,
+                code: item.code,
+                categoryId: item.categoryId,
+                equipmentList: item.deviceInfo.map((item) => {
+                  return {
+                    name: item.name,
+                    id: item.id,
+                    fixCode: item.fixCode,
+                    codeNumber: item.codeNumber
+                  };
+                }),
+                ruleItems: item.ruleMatters
+              };
             });
-            this.$set(this.detailsForm, 'executorName', arr.join(','));
-            this._getMatterRulesDetails(res.ruleId);
+            this.tabsValue = this.ruleIdList[0].ruleId;
+            // let arr = [];
+            // res.execute.map((item) => {
+            //   arr.push(item.userName);
+            // });
+            // this.$set(this.detailsForm, 'executorName', arr.join(','));
           })
           .catch(() => {
             this.detailsLoading = false;
           });
-      },
-
-      // 封装 - 获取规则下面的详情数据及事项
-      async _getMatterRulesDetails(val) {
-        const res = await getDetail(val);
-        this.matterRulesList = res.ruleItems;
       }
     }
   };
 </script>
 
 <style lang="scss" scoped>
+  .mt-20 {
+    margin-top: 20px;
+  }
+  ::v-deep .el-tab_box {
+    display: flex;
+    flex-direction: column;
+    margin-top: 10px;
+    width: 100%;
+    .equipmentList_box {
+      flex: 1;
+      height: 100%;
+      margin-right: 10px;
+      display: flex;
+      flex-direction: column;
+      .divider {
+        flex: 0 0 50px;
+        .title {
+          height: 35px;
+        }
+      }
+      .el-table {
+        overflow: auto;
+      }
+    }
+    .ruleMatters_box {
+      flex: 3;
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      .divider {
+        flex: 0 0 50px;
+        .title {
+          height: 35px;
+        }
+      }
+      .el-table {
+        overflow: auto;
+        .operationGuide_box {
+          width: 100%;
+          display: flex;
+          position: relative;
+          .left_content {
+            flex: 0 0 300px;
+            padding: 10px;
+            margin-right: 10px;
+            overflow-y: auto;
+          }
+          .line {
+            position: absolute;
+            top: -10px;
+            left: 300px;
+            bottom: -10px;
+            height: 110%;
+            width: 1px;
+            background-color: #ededed;
+          }
+          .right_content {
+            flex: 1;
+            padding: 10px;
+            overflow-y: auto;
+          }
+        }
+      }
+    }
+  }
   .patrol_config_detail {
     padding: 5px 0;
     .detail_title {

+ 15 - 10
src/views/rulesManagement/inspectionPoint/index.vue

@@ -59,12 +59,11 @@
       @done="reload"
     /> -->
     <!-- 新建或编辑弹窗 -->
-    <MaterialModal
-      ref="addPatrolConfigDialogRef"
-      :visible.sync="addPatrolConfigDialog"
+    <programRulesDialog
+      ref="programRulesDialog"
+      :visible.sync="addProgramRulesDialog"
       :dialogTitle="dialogTitle"
       :isBindPlan="isBindPlan"
-      title="巡检点配置"
       @done="reload"
     />
   </div>
@@ -72,7 +71,7 @@
 
 <script>
   // import AddPatrolConfigDialog from '@/components/addPatrolConfigDialog';
-  import MaterialModal from './components/MaterialModal';
+  import ProgramRulesDialog from '../components/programRulesDialog';
   import PatrolSearch from './components/patrol-search.vue';
   import { planConfigPage, removeRule } from '@/api/ruleManagement/plan';
   import dictMixins from '@/mixins/dictMixins';
@@ -81,11 +80,11 @@
     components: {
       PatrolSearch,
       // AddPatrolConfigDialog,
-      MaterialModal
+      ProgramRulesDialog
     },
     data() {
       return {
-        addPatrolConfigDialog: false,
+        addProgramRulesDialog: false,
         // 表格列配置
         columns: [
           {
@@ -209,18 +208,22 @@
 
       /* 刷新表格 */
       reload(where) {
+        console.log('刷新表格');
+        this.addProgramRulesDialog = false;
         this.$refs.table.reload({ page: 1, where, ruleType: 1 });
       },
 
       openEdit(row) {
         this.isBindPlan = false;
-        this.addPatrolConfigDialog = true;
+        this.addProgramRulesDialog = true;
         if (row) {
           this.dialogTitle = '编辑巡点检计划配置';
         } else {
           this.dialogTitle = '新增巡点检计划配置';
         }
-        this.$refs.addPatrolConfigDialogRef.init(row, '巡点检');
+        this.$nextTick(() => {
+          this.$refs.programRulesDialog.init(row, '巡点检');
+        });
       },
 
       remove(row) {
@@ -232,7 +235,9 @@
 
       goDetail({ id }) {
         this.$router.push({
-          path: '/rulesManagement/inspectionPoint/detail',
+          path:
+            '/rulesManagement/inspectionPoint/detail?date=' +
+            new Date().valueOf(),
           query: {
             id
           }

+ 284 - 0
src/views/rulesManagement/maintenance/detail copy.vue

@@ -0,0 +1,284 @@
+<template>
+  <div class="maintain_config_detail" v-loading="detailsLoading">
+    <div class="main_content">
+      <!-- 基本信息 -->
+      <div class="base_info">
+        <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
+        <el-row class="base_info_content">
+          <el-col :span="6">
+            <span>计划单号:</span>
+            <span>{{ detailsForm.code }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>保养名称:</span>
+            <span>{{ detailsForm.name }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>保养部门:</span>
+            <span>{{ detailsForm.groupName }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>保养人员:</span>
+            <span>{{ detailsForm.executorName }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>计划完成时长:</span>
+            <span>{{ detailsForm.duration }}分钟</span>
+          </el-col>
+          <el-col :span="6">
+            <span>设备分类:</span>
+            <span>{{ detailsForm.categoryName }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>规则名称:</span>
+            <span>{{ detailsForm.ruleName }}</span>
+          </el-col>
+          <!--          <el-col :span="6">
+            <span>创建部门:</span>
+            <span>{{ detailsForm.createOrgName }}</span>
+          </el-col> -->
+          <el-col :span="6">
+            <span>创建人:</span>
+            <span>{{ detailsForm.createUserName }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>创建时间:</span>
+            <span>{{ detailsForm.createTime }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>审核人:</span>
+            <span>{{ detailsForm.approvalUserName }}</span>
+          </el-col>
+          <el-col :span="24">
+            <span>备注:</span>
+            <span>{{ detailsForm.remark }}</span>
+          </el-col>
+        </el-row>
+      </div>
+      <!-- 保养设备 -->
+      <div class="maintain_equipment_info">
+        <HeaderTitle title="保养设备" size="16px"></HeaderTitle>
+        <div class="maintain_equipment_info_content">
+          <div
+            class="equipment_item"
+            v-for="item in detailsForm.deviceInfo"
+            :key="item.id"
+          >
+            <div class="equipment_info">
+              <div class="item_info">
+                <span class="item_label">设备编码</span>
+                <span class="item_value">{{ item.substance.code }}</span>
+              </div>
+              <div class="item_info">
+                <span class="item_label">设备名称</span>
+                <span class="item_value">{{ item.substance.name }}</span>
+              </div>
+              <div class="item_info">
+                <span class="item_label">设备型号</span>
+                <span class="item_value">{{ item.substance.model }}</span>
+              </div>
+              <div class="item_info">
+                <span class="item_label">设备位置</span>
+                <span class="item_value">{{
+                  item.substance.positionNames
+                }}</span>
+              </div>
+            </div>
+            <p>操作事项</p>
+            <div class="matter_info">
+              <el-table :data="matterRulesList" border>
+                <el-table-column label="序号" align="center" width="80">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="事项" prop="name" />
+                <el-table-column label="内容" prop="content" />
+                <el-table-column label="标准" prop="norm" />
+              </el-table>
+            </div>
+            <p>备品备件</p>
+            <div class="matter_info">
+              <el-table :data="item.sparePart" border>
+                <el-table-column label="序号" align="center" width="80">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="备件类别名称"
+                  align="center"
+                  prop="categoryName"
+                >
+                </el-table-column>
+                <el-table-column label="规格型号" align="center" prop="model">
+                </el-table-column>
+                <el-table-column label="所需数量" align="center" prop="needNum">
+                </el-table-column>
+                <el-table-column label="单位" align="center" prop="unit">
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import { getInfoById } from '@/api/ruleManagement/plan';
+  import { getDetail } from '@/api/ruleManagement/matter';
+
+  export default {
+    name: 'maintainConfigDetail',
+    data() {
+      return {
+        detailsLoading: false,
+        detailsForm: {},
+        matterRulesList: []
+      };
+    },
+    computed: {},
+    mounted() {
+      this.getDetailsData(this.$route.query.id);
+    },
+    methods: {
+      // 获取详情数据
+      async getDetailsData(id) {
+        this.detailsLoading = true;
+        getInfoById(id)
+          .then((res) => {
+            this.detailsLoading = false;
+            this.detailsForm = res;
+            let arr = [];
+            res.execute.map((item) => {
+              arr.push(item.userName);
+            });
+            this.$set(this.detailsForm, 'executorName', arr.join(','));
+            this._getMatterRulesDetails(res.ruleId);
+          })
+          .catch(() => {
+            this.detailsLoading = false;
+          });
+      },
+
+      // 封装 - 获取规则下面的详情数据及事项
+      async _getMatterRulesDetails(val) {
+        const res = await getDetail(val);
+        this.matterRulesList = res.ruleItems;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .maintain_config_detail {
+    padding: 5px 0;
+    .detail_title {
+      display: flex;
+      height: 40px;
+      align-items: center;
+      justify-content: space-between;
+      > span {
+        background-color: #fff;
+        line-height: 40px;
+        width: 90px;
+        text-align: center;
+        border-top: 4px solid #1890ff;
+      }
+    }
+    .main_content {
+      background-color: #fff;
+      padding: 20px 40px;
+      .base_info {
+        .base_info_title {
+          border-bottom: 1px solid #1890ff;
+          padding-bottom: 3px;
+          margin-bottom: 20px;
+          > span {
+            display: inline-block;
+            line-height: 16px;
+            border-left: 6px solid #1890ff;
+            padding-left: 6px;
+          }
+        }
+        .base_info_content {
+          padding: 0 100px;
+          font-size: 14px;
+          ::v-deep .el-col {
+            margin-bottom: 20px;
+            > span:first-child {
+              font-weight: 700;
+            }
+          }
+        }
+      }
+      .maintain_equipment_info {
+        .maintain_equipment_info_title {
+          border-bottom: 1px solid #1890ff;
+          padding-bottom: 3px;
+          margin-bottom: 20px;
+          > span {
+            display: inline-block;
+            line-height: 16px;
+            border-left: 6px solid #1890ff;
+            padding-left: 6px;
+          }
+        }
+        .maintain_equipment_info_content {
+          padding: 0 30px;
+          .equipment_item {
+            border: 1px solid #ccc;
+            font-size: 14px;
+            padding: 15px;
+            margin-bottom: 30px;
+            .equipment_info {
+              display: flex;
+              flex-wrap: wrap;
+              border: 1px solid #ddd;
+              .item_info {
+                width: 33.33%;
+                height: 24px;
+                line-height: 24px;
+                display: flex;
+                .item_label {
+                  width: 90px;
+                  text-align: center;
+                  background-color: #f2f2f2;
+                  font-weight: 700;
+                }
+                .item_value {
+                  border-bottom: 1px solid #f2f2f2;
+                  flex: 1;
+                  padding-left: 5px;
+                }
+                &:last-child {
+                  width: 100%;
+                  .item_value {
+                    border: 0;
+                  }
+                }
+              }
+            }
+            > p {
+              margin-top: 20px;
+              color: #797979;
+            }
+            .matter_info {
+              ::v-deep .el-table {
+                th.el-table__cell {
+                  background-color: #f2f2f2;
+                  padding: 0;
+                }
+                td.el-table__cell {
+                  padding: 0;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 304 - 199
src/views/rulesManagement/maintenance/detail.vue

@@ -1,9 +1,13 @@
 <template>
-  <div class="maintain_config_detail" v-loading="detailsLoading">
+  <div class="patrol_config_detail" v-loading="detailsLoading">
     <div class="main_content">
       <!-- 基本信息 -->
       <div class="base_info">
-        <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
+        <HeaderTitle title="基本信息" size="16px"
+          ><el-button type="primary" @click="$router.go(-1)"
+            >返回</el-button
+          ></HeaderTitle
+        >
         <el-row class="base_info_content">
           <el-col :span="6">
             <span>计划单号:</span>
@@ -14,40 +18,28 @@
             <span>{{ detailsForm.name }}</span>
           </el-col>
           <el-col :span="6">
-            <span>保养部门:</span>
-            <span>{{ detailsForm.groupName }}</span>
+            <span>部门:</span>
+            <span>{{ detailsForm.planConfigVOList[0].groupName }}</span>
           </el-col>
           <el-col :span="6">
-            <span>保养人员:</span>
-            <span>{{ detailsForm.executorName }}</span>
+            <span>负责人:</span>
+            <span>{{ detailsForm.planConfigVOList[0].approvalUserName }}</span>
           </el-col>
           <el-col :span="6">
             <span>计划完成时长:</span>
             <span>{{ detailsForm.duration }}分钟</span>
           </el-col>
           <el-col :span="6">
-            <span>设备分类:</span>
-            <span>{{ detailsForm.categoryName }}</span>
+            <span>创建时间:</span>
+            <span>{{ detailsForm.createTime }}</span>
           </el-col>
-          <el-col :span="6">
-            <span>规则名称:</span>
-            <span>{{ detailsForm.ruleName }}</span>
-          </el-col>
-<!--          <el-col :span="6">
-            <span>创建部门:</span>
-            <span>{{ detailsForm.createOrgName }}</span>
-          </el-col> -->
-          <el-col :span="6">
-            <span>创建人:</span>
-            <span>{{ detailsForm.createUserName }}</span>
-          </el-col>
-		  <el-col :span="6">
-		    <span>创建时间:</span>
-		    <span>{{ detailsForm.createTime }}</span>
-		  </el-col>
           <el-col :span="6">
             <span>审核人:</span>
-            <span>{{ detailsForm.approvalUserName }}</span>
+            <span>{{
+              detailsForm.planConfigVOList[0].execute
+                .map((item) => item.userName)
+                .join(',')
+            }}</span>
           </el-col>
           <el-col :span="24">
             <span>备注:</span>
@@ -55,220 +47,334 @@
           </el-col>
         </el-row>
       </div>
-      <!-- 保养设备 -->
-      <div class="maintain_equipment_info">
-		<HeaderTitle title="保养设备" size="16px"></HeaderTitle>
-        <div class="maintain_equipment_info_content">
-          <div
-            class="equipment_item"
-            v-for="item in detailsForm.deviceInfo"
-            :key="item.id"
-          >
-            <div class="equipment_info">
-              <div class="item_info">
-                <span class="item_label">设备编码</span>
-                <span class="item_value">{{  item.substance.code }}</span>
-              </div>
-              <div class="item_info">
-                <span class="item_label">设备名称</span>
-                <span class="item_value">{{ item.substance.name }}</span>
-              </div>
-              <div class="item_info">
-                <span class="item_label">设备型号</span>
-                <span class="item_value">{{ item.substance.model }}</span>
-              </div>
-              <div class="item_info">
-                <span class="item_label">设备位置</span>
-                <span class="item_value">{{ item.substance.positionNames }}</span>
-              </div>
-            </div>
-            <p>操作事项</p>
-            <div class="matter_info">
-              <el-table :data="matterRulesList" border>
-                <el-table-column label="序号" align="center" width="80">
-                  <template slot-scope="scope">
-                    <span>{{ scope.$index + 1 }}</span>
+      <el-tabs v-model="tabsValue" type="card">
+        <el-tab-pane
+          v-for="(item, ruleIdListIndex) in ruleIdList"
+          :key="item.ruleId"
+          :label="item.name"
+          :name="item.ruleId"
+        >
+          <div class="el-tab_box">
+            <div class="equipmentList_box">
+              <header-title title="设备列表"> </header-title>
+              <el-table :data="item.equipmentList" border>
+                <el-table-column label="序号" type="index" width="50">
+                </el-table-column>
+                <el-table-column label="设备名称" align="center" prop="name">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.name }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="编号" align="center" prop="codeNumber">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.codeNumber }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="固资编码" align="center" prop="fixCode">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.fixCode }}
+                    </template>
                   </template>
                 </el-table-column>
-                <el-table-column label="事项" prop="name" />
-                <el-table-column label="内容" prop="content" />
-                <el-table-column label="标准" prop="norm" />
               </el-table>
             </div>
-            <p>备品备件</p>
-            <div class="matter_info">
-              <el-table :data="item.sparePart" border>
-                <el-table-column label="序号" align="center" width="80">
+            <div class="ruleMatters_box">
+              <header-title title="规则事项"> </header-title>
+              <el-table :data="item.ruleItems" border>
+                <el-table-column label="序号" width="50">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + 1 }}</span>
                   </template>
                 </el-table-column>
-                <el-table-column label="备件类别名称" align="center" prop="categoryName">
+                <el-table-column label="事项" prop="name" width="100">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.name }}</span>
+                    </div>
+                  </template>
                 </el-table-column>
-                <el-table-column label="规格型号" align="center" prop="model">
+                <el-table-column label="内容" prop="content" width="300">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.content }}</span>
+                    </div>
+                  </template>
                 </el-table-column>
-                <el-table-column label="所需数量" align="center" prop="needNum">
+                <el-table-column label="操作指导" prop="operationGuide">
+                  <template slot-scope="scope">
+                    <div class="operationGuide_box">
+                      <div class="left_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .toolList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.name }}</div
+                          >
+                        </template>
+                      </div>
+                      <div class="line"></div>
+                      <div class="right_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .procedureList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.content }}</div
+                          >
+                        </template>
+                      </div>
+                    </div>
+                  </template>
                 </el-table-column>
-                <el-table-column label="单位" align="center" prop="unit">
+                <el-table-column label="标准" prop="norm" width="100">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.norm }}</span>
+                    </div>
+                  </template>
                 </el-table-column>
               </el-table>
             </div>
           </div>
-        </div>
-      </div>
+        </el-tab-pane>
+      </el-tabs>
     </div>
   </div>
 </template>
 
 <script>
   import { getInfoById } from '@/api/ruleManagement/plan';
-  import {  getDetail } from '@/api/ruleManagement/matter';
-
-export default {
-  name: 'maintainConfigDetail',
-  data () {
-    return {
-      detailsLoading: false,
-      detailsForm: {},
-      matterRulesList:[]
-    }
-  },
-  computed: {
-    
-  },
-  mounted () {
-    this.getDetailsData(this.$route.query.id)
-  },
-  methods: {
-    // 获取详情数据
-    async getDetailsData (id) {
-      this.detailsLoading = true
-      getInfoById(id)
-        .then(res => {
-          this.detailsLoading = false
-          this.detailsForm = res
-    		let arr = []
-    		res.execute.map(item=>{
-    			 arr.push(item.userName)
-    		})
-    		 this.$set(this.detailsForm,'executorName',arr.join(','))
-    		 this._getMatterRulesDetails(res.ruleId)
-        })
-        .catch(() => {
-          this.detailsLoading = false
-        })
+  import { getDetail } from '@/api/ruleManagement/matter';
+  export default {
+    name: 'maintenanceDetail',
+    data() {
+      return {
+        ruleIdList: [],
+        tabsValue: '',
+        detailsLoading: false,
+        detailsForm: {
+          planConfigVOList: [{}]
+        }
+      };
     },
-    
-    // 封装 - 获取规则下面的详情数据及事项
-    async _getMatterRulesDetails (val) {		
-      const res = await getDetail(val)
-       this.matterRulesList = res.ruleItems
+    mounted() {
+      this.getDetailsData(this.$route.query.id);
     },
-  }
-}
+    computed: {},
+    methods: {
+      // 获取详情数据
+      async getDetailsData(id) {
+        this.detailsLoading = true;
+        getInfoById(id)
+          .then((res) => {
+            this.detailsLoading = false;
+            console.log('====res', res);
+            this.detailsForm = res;
+            this.ruleIdList = res.planConfigVOList.map((item) => {
+              return {
+                ruleId: item.ruleId,
+                name: item.ruleName,
+                code: item.code,
+                categoryId: item.categoryId,
+                equipmentList: item.deviceInfo.map((item) => {
+                  return {
+                    name: item.name,
+                    id: item.id,
+                    fixCode: item.fixCode,
+                    codeNumber: item.codeNumber
+                  };
+                }),
+                ruleItems: item.ruleMatters
+              };
+            });
+            this.tabsValue = this.ruleIdList[0].ruleId;
+            // let arr = [];
+            // res.execute.map((item) => {
+            //   arr.push(item.userName);
+            // });
+            // this.$set(this.detailsForm, 'executorName', arr.join(','));
+          })
+          .catch(() => {
+            this.detailsLoading = false;
+          });
+      }
+    }
+  };
 </script>
 
 <style lang="scss" scoped>
-.maintain_config_detail {
-  padding: 5px 0;
-  .detail_title {
+  .mt-20 {
+    margin-top: 20px;
+  }
+  ::v-deep .el-tab_box {
     display: flex;
-    height: 40px;
-    align-items: center;
-    justify-content: space-between;
-    > span {
-      background-color: #fff;
-      line-height: 40px;
-      width: 90px;
-      text-align: center;
-      border-top: 4px solid #1890ff;
+    flex-direction: column;
+    margin-top: 10px;
+    width: 100%;
+    .equipmentList_box {
+      flex: 1;
+      height: 100%;
+      margin-right: 10px;
+      display: flex;
+      flex-direction: column;
+      .divider {
+        flex: 0 0 50px;
+        .title {
+          height: 35px;
+        }
+      }
+      .el-table {
+        overflow: auto;
+      }
     }
-  }
-  .main_content {
-    background-color: #fff;
-    padding: 20px 40px;
-    .base_info {
-      .base_info_title {
-        border-bottom: 1px solid #1890ff;
-        padding-bottom: 3px;
-        margin-bottom: 20px;
-        > span {
-          display: inline-block;
-          line-height: 16px;
-          border-left: 6px solid #1890ff;
-          padding-left: 6px;
+    .ruleMatters_box {
+      flex: 3;
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      .divider {
+        flex: 0 0 50px;
+        .title {
+          height: 35px;
         }
       }
-      .base_info_content {
-        padding: 0 100px;
-        font-size: 14px;
-        ::v-deep .el-col {
-          margin-bottom: 20px;
-          > span:first-child {
-            font-weight: 700;
+      .el-table {
+        overflow: auto;
+        .operationGuide_box {
+          width: 100%;
+          display: flex;
+          position: relative;
+          .left_content {
+            flex: 0 0 300px;
+            padding: 10px;
+            margin-right: 10px;
+            overflow-y: auto;
+          }
+          .line {
+            position: absolute;
+            top: -10px;
+            left: 300px;
+            bottom: -10px;
+            height: 110%;
+            width: 1px;
+            background-color: #ededed;
+          }
+          .right_content {
+            flex: 1;
+            padding: 10px;
+            overflow-y: auto;
           }
         }
       }
     }
-    .maintain_equipment_info {
-      .maintain_equipment_info_title {
-        border-bottom: 1px solid #1890ff;
-        padding-bottom: 3px;
-        margin-bottom: 20px;
-        > span {
-          display: inline-block;
-          line-height: 16px;
-          border-left: 6px solid #1890ff;
-          padding-left: 6px;
-        }
+  }
+  .patrol_config_detail {
+    padding: 5px 0;
+    .detail_title {
+      display: flex;
+      height: 40px;
+      align-items: center;
+      justify-content: space-between;
+      > span {
+        background-color: #fff;
+        line-height: 40px;
+        width: 90px;
+        text-align: center;
+        border-top: 4px solid #157a2c;
       }
-      .maintain_equipment_info_content {
-        padding: 0 30px;
-        .equipment_item {
-          border: 1px solid #ccc;
+    }
+    .main_content {
+      background-color: #fff;
+      padding: 20px 40px;
+      .base_info {
+        .base_info_title {
+          border-bottom: 1px solid #1890ff;
+          padding-bottom: 3px;
+          margin-bottom: 20px;
+          > span {
+            display: inline-block;
+            line-height: 16px;
+            border-left: 6px solid #1890ff;
+            padding-left: 6px;
+          }
+        }
+        .base_info_content {
+          padding: 0 60px;
           font-size: 14px;
-          padding: 15px;
-          margin-bottom: 30px;
-          .equipment_info {
-            display: flex;
-            flex-wrap: wrap;
-            border: 1px solid #ddd;
-            .item_info {
-              width: 33.33%;
-              height: 24px;
-              line-height: 24px;
+          ::v-deep .el-col {
+            margin-bottom: 20px;
+            > span:first-child {
+              font-weight: 700;
+            }
+          }
+        }
+      }
+      .patrol_equipment_info {
+        .patrol_equipment_info_title {
+          border-bottom: 1px solid #1890ff;
+          padding-bottom: 3px;
+          margin-bottom: 20px;
+          > span {
+            display: inline-block;
+            line-height: 16px;
+            border-left: 6px solid #1890ff;
+            padding-left: 6px;
+          }
+        }
+        .patrol_equipment_info_content {
+          padding: 0 30px;
+          .equipment_item {
+            border: 1px solid #ccc;
+            font-size: 14px;
+            padding: 15px;
+            margin-bottom: 30px;
+            .equipment_info {
               display: flex;
-              .item_label {
-                width: 90px;
-                text-align: center;
-                background-color: #f2f2f2;
-                font-weight: 700;
-              }
-              .item_value {
-                border-bottom: 1px solid #f2f2f2;
-                flex: 1;
-                padding-left: 5px;
-              }
-              &:last-child {
-                width: 100%;
+              flex-wrap: wrap;
+              border: 1px solid #ddd;
+              .item_info {
+                width: 33.33%;
+                height: 24px;
+                line-height: 24px;
+                display: flex;
+                .item_label {
+                  width: 90px;
+                  text-align: center;
+                  background-color: #f2f2f2;
+                  font-weight: 700;
+                }
                 .item_value {
-                  border: 0;
+                  border-bottom: 1px solid #f2f2f2;
+                  flex: 1;
+                  padding-left: 5px;
+                }
+                &:last-child {
+                  width: 100%;
+                  .item_value {
+                    border: 0;
+                  }
                 }
               }
             }
-          }
-          > p {
-            margin-top: 20px;
-            color: #797979;
-          }
-          .matter_info {
-            ::v-deep .el-table {
-              th.el-table__cell {
-                background-color: #f2f2f2;
-                padding: 0;
-              }
-              td.el-table__cell {
-                padding: 0;
+            > p {
+              margin-top: 20px;
+              color: #797979;
+            }
+            .matter_info {
+              ::v-deep .el-table {
+                th.el-table__cell {
+                  background-color: #f2f2f2;
+                  padding: 0;
+                }
+                td.el-table__cell {
+                  padding: 0;
+                }
               }
             }
           }
@@ -276,5 +382,4 @@ export default {
       }
     }
   }
-}
 </style>

+ 20 - 6
src/views/rulesManagement/maintenance/index.vue

@@ -52,17 +52,25 @@
     </el-card>
 
     <!-- 新建或编辑弹窗 -->
-    <AddPatrolConfigDialog
+    <!-- <AddPatrolConfigDialog
       ref="addPatrolConfigDialogRef"
       :dialogTitle="dialogTitle"
       :isBindPlan="isBindPlan"
       @done="reload"
+    /> -->
+    <programRulesDialog
+      ref="programRulesDialog"
+      :visible.sync="addProgramRulesDialog"
+      :dialogTitle="dialogTitle"
+      :isBindPlan="isBindPlan"
+      @done="reload"
     />
   </div>
 </template>
 
 <script>
-  import AddPatrolConfigDialog from '@/components/addPatrolConfigDialog';
+  // import AddPatrolConfigDialog from '@/components/addPatrolConfigDialog';
+  import ProgramRulesDialog from '../components/programRulesDialog';
   import MaintainSearch from './components/maintain-search.vue';
   import { planConfigPage, removeRule } from '@/api/ruleManagement/plan';
   import dictMixins from '@/mixins/dictMixins';
@@ -70,10 +78,12 @@
     mixins: [dictMixins],
     components: {
       MaintainSearch,
-      AddPatrolConfigDialog
+      // AddPatrolConfigDialog,
+      ProgramRulesDialog
     },
     data() {
       return {
+        addProgramRulesDialog: false,
         // 表格列配置
         columns: [
           {
@@ -197,26 +207,30 @@
 
       /* 刷新表格 */
       reload(where) {
+        this.addProgramRulesDialog = false;
         this.$refs.table.reload({ page: 1, where, ruleType: 2 });
       },
 
       openEdit(row) {
         this.isBindPlan = false;
         // this.$refs.addPatrolConfigDialogRef.$refs.addFormRef && this.$refs.addPatrolConfigDialogRef.$refs.addFormRef.clearValidate()
-        this.$refs.addPatrolConfigDialogRef.addPatrolConfigDialog = true;
+        this.addProgramRulesDialog = true;
         if (row) {
           this.dialogTitle = '编辑保养计划配置';
         } else {
           this.dialogTitle = '新增保养计划配置';
         }
-        this.$refs.addPatrolConfigDialogRef.init(row, '保养');
+        this.$nextTick(() => {
+          this.$refs.programRulesDialog.init(row, '保养');
+        });
       },
 
       goDetail({ id }) {
         this.$router.push({
           path: '/rulesManagement/maintenance/detail',
           query: {
-            id
+            id,
+            date: new Date().valueOf()
           }
         });
       },

+ 2 - 2
src/views/rulesManagement/matterRules/components/ProductModal.vue

@@ -53,7 +53,7 @@
 
 <script>
   import ProductSearch from './product-search.vue';
-  import { getTreeByPid } from '@/api/classifyManage';
+  import { getTreeByGroup } from '@/api/classifyManage';
   import { getList } from '@/api/classifyManage/itemInformation.js';
   export default {
     components: {
@@ -166,7 +166,7 @@
         try {
           this.treeLoading = true;
 
-          const res = await getTreeByPid(0);
+          const res = await getTreeByGroup({ type: 4 });
           this.treeLoading = false;
           if (res?.code === '0') {
             this.treeList = res.data;

+ 5 - 1
src/views/rulesManagement/matterRules/components/operationGuideDialog.vue

@@ -56,7 +56,7 @@
       </el-table-column>
     </el-table>
 
-    <headerTitle title="操作指导">
+    <headerTitle class="mt-20" title="操作指导">
       <el-button type="primary" size="small" @click="addPostscript"
         >新增</el-button
       >
@@ -219,6 +219,10 @@
     }
   }
 
+  .mt-20 {
+    margin-top: 20px;
+  }
+
   :deep(
       .el-dialog:not(.ele-dialog-form)
         .el-dialog__body

+ 146 - 0
src/views/rulesManagement/measuringSubmit/components/patrol-search.vue

@@ -0,0 +1,146 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="100px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="计划配置单号:">
+          <el-input clearable v-model="where.code" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="规则名称:">
+          <el-input clearable v-model="where.ruleName" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="计划配置名称:">
+          <el-input clearable v-model="where.name" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="状态:">
+          <DictSelection dictName="规则状态" clearable v-model="where.status">
+          </DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="部门:">
+          <deptSelect v-model="where.groupId" />
+        </el-form-item>
+        <el-form-item label="创建时间:">
+          <el-date-picker
+            v-model="time"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="设备分类:">
+          <equipmentSelect v-model="where.categoryLevelId" />
+        </el-form-item>
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  import { login } from '@/api/login';
+  // import {  listOrganizations } from '@/api/system/organization';
+  import equipmentSelect from '@/components/CommomSelect/equipment-select.vue';
+  import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  export default {
+    components: { equipmentSelect, deptSelect },
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        code: '',
+        groupId: '',
+        status: '',
+        ruleName: '',
+        startTime: '',
+        endTime: '',
+        categoryLevelId: ''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere },
+        // deptData:[],   //部门树
+        time: []
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created() {
+      // this.getDeptList()
+    },
+    methods: {
+      /* 搜索 */
+      search() {
+        if (this.time != null && this.time.length) {
+          this.where.startTime = this.time[0];
+          this.where.endTime = this.time[1];
+        }
+        if (this.time == null) {
+          this.where.startTime = '';
+          this.where.endTime = '';
+        }
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.time = [];
+        this.where = { ...this.defaultWhere };
+        this.search();
+      }
+
+      // 获取部门列表数据
+      // async getDeptList () {
+      //   try {
+      //     let list = await listOrganizations()
+      //     this.deptData = this.$util.toTreeData({
+      // 		  data: list,
+      // 		  idField: 'id',
+      // 		  parentIdField: 'parentId'
+      //     });
+      //   } catch (error) {}
+      // },
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .ele-form-actions {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+  }
+</style>

+ 386 - 0
src/views/rulesManagement/measuringSubmit/detail.vue

@@ -0,0 +1,386 @@
+<template>
+  <div class="patrol_config_detail" v-loading="detailsLoading">
+    <div class="main_content">
+      <!-- 基本信息 -->
+      <div class="base_info">
+        <HeaderTitle title="基本信息" size="16px"
+          ><el-button type="primary" @click="$router.go(-1)"
+            >返回</el-button
+          ></HeaderTitle
+        >
+        <el-row class="base_info_content">
+          <el-col :span="6">
+            <span>计划单号:</span>
+            <span>{{ detailsForm.code }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>量具送检名称:</span>
+            <span>{{ detailsForm.name }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>量具送检部门:</span>
+            <span>{{ detailsForm.planConfigVOList[0].groupName }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>负责人:</span>
+            <span>{{ detailsForm.planConfigVOList[0].approvalUserName }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>计划完成时长:</span>
+            <span>{{ detailsForm.duration }}分钟</span>
+          </el-col>
+          <el-col :span="6">
+            <span>创建时间:</span>
+            <span>{{ detailsForm.createTime }}</span>
+          </el-col>
+          <el-col :span="6">
+            <span>审核人:</span>
+            <span>{{
+              detailsForm.planConfigVOList[0].execute
+                .map((item) => item.userName)
+                .join(',')
+            }}</span>
+          </el-col>
+          <el-col :span="24">
+            <span>备注:</span>
+            <span>{{ detailsForm.remark }}</span>
+          </el-col>
+        </el-row>
+      </div>
+      <el-tabs v-model="tabsValue" type="card">
+        <el-tab-pane
+          v-for="(item, ruleIdListIndex) in ruleIdList"
+          :key="item.ruleId"
+          :label="item.name"
+          :name="item.ruleId"
+        >
+          <div class="el-tab_box">
+            <div class="equipmentList_box">
+              <header-title title="设备列表"> </header-title>
+              <el-table :data="item.equipmentList" border>
+                <el-table-column label="序号" type="index" width="50">
+                </el-table-column>
+                <el-table-column label="设备名称" align="center" prop="name">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.name }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="编号" align="center" prop="codeNumber">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.codeNumber }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="固资编码" align="center" prop="fixCode">
+                  <template slot-scope="{ row, $index }">
+                    <template>
+                      {{ row.fixCode }}
+                    </template>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div class="ruleMatters_box">
+              <header-title title="规则事项"> </header-title>
+              <el-table :data="item.ruleItems" border>
+                <el-table-column label="序号" width="50">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="事项" prop="name" width="100">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.name }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="内容" prop="content" width="300">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.content }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作指导" prop="operationGuide">
+                  <template slot-scope="scope">
+                    <div class="operationGuide_box">
+                      <div class="left_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .toolList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.name }}</div
+                          >
+                        </template>
+                      </div>
+                      <div class="line"></div>
+                      <div class="right_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .procedureList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.content }}</div
+                          >
+                        </template>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="标准" prop="norm" width="100">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{ scope.row.norm }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+
+<script>
+  import { getInfoById } from '@/api/ruleManagement/plan';
+  import { getDetail } from '@/api/ruleManagement/matter';
+  export default {
+    name: 'measuringSubmitDetail',
+    data() {
+      return {
+        ruleIdList: [],
+        tabsValue: '',
+        detailsLoading: false,
+        detailsForm: {
+          planConfigVOList: [{}]
+        }
+      };
+    },
+    mounted() {
+      this.getDetailsData(this.$route.query.id);
+    },
+    computed: {},
+    methods: {
+      // 获取详情数据
+      async getDetailsData(id) {
+        console.log('id-----------', id);
+        this.detailsLoading = true;
+        getInfoById(id)
+          .then((res) => {
+            this.detailsLoading = false;
+            console.log('====res', res);
+            this.detailsForm = res;
+            this.ruleIdList = res.planConfigVOList.map((item) => {
+              return {
+                ruleId: item.ruleId,
+                name: item.ruleName,
+                code: item.code,
+                categoryId: item.categoryId,
+                equipmentList: item.deviceInfo.map((item) => {
+                  return {
+                    name: item.name,
+                    id: item.id,
+                    fixCode: item.fixCode,
+                    codeNumber: item.codeNumber
+                  };
+                }),
+                ruleItems: item.ruleMatters
+              };
+            });
+            this.tabsValue = this.ruleIdList[0].ruleId;
+            // let arr = [];
+            // res.execute.map((item) => {
+            //   arr.push(item.userName);
+            // });
+            // this.$set(this.detailsForm, 'executorName', arr.join(','));
+          })
+          .catch(() => {
+            this.detailsLoading = false;
+          });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .mt-20 {
+    margin-top: 20px;
+  }
+  ::v-deep .el-tab_box {
+    display: flex;
+    flex-direction: column;
+    margin-top: 10px;
+    width: 100%;
+    .equipmentList_box {
+      flex: 1;
+      height: 100%;
+      margin-right: 10px;
+      display: flex;
+      flex-direction: column;
+      .divider {
+        flex: 0 0 50px;
+        .title {
+          height: 35px;
+        }
+      }
+      .el-table {
+        overflow: auto;
+      }
+    }
+    .ruleMatters_box {
+      flex: 3;
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      .divider {
+        flex: 0 0 50px;
+        .title {
+          height: 35px;
+        }
+      }
+      .el-table {
+        overflow: auto;
+        .operationGuide_box {
+          width: 100%;
+          display: flex;
+          position: relative;
+          .left_content {
+            flex: 0 0 300px;
+            padding: 10px;
+            margin-right: 10px;
+            overflow-y: auto;
+          }
+          .line {
+            position: absolute;
+            top: -10px;
+            left: 300px;
+            bottom: -10px;
+            height: 110%;
+            width: 1px;
+            background-color: #ededed;
+          }
+          .right_content {
+            flex: 1;
+            padding: 10px;
+            overflow-y: auto;
+          }
+        }
+      }
+    }
+  }
+  .patrol_config_detail {
+    padding: 5px 0;
+    .detail_title {
+      display: flex;
+      height: 40px;
+      align-items: center;
+      justify-content: space-between;
+      > span {
+        background-color: #fff;
+        line-height: 40px;
+        width: 90px;
+        text-align: center;
+        border-top: 4px solid #157a2c;
+      }
+    }
+    .main_content {
+      background-color: #fff;
+      padding: 20px 40px;
+      .base_info {
+        .base_info_title {
+          border-bottom: 1px solid #1890ff;
+          padding-bottom: 3px;
+          margin-bottom: 20px;
+          > span {
+            display: inline-block;
+            line-height: 16px;
+            border-left: 6px solid #1890ff;
+            padding-left: 6px;
+          }
+        }
+        .base_info_content {
+          padding: 0 60px;
+          font-size: 14px;
+          ::v-deep .el-col {
+            margin-bottom: 20px;
+            > span:first-child {
+              font-weight: 700;
+            }
+          }
+        }
+      }
+      .patrol_equipment_info {
+        .patrol_equipment_info_title {
+          border-bottom: 1px solid #1890ff;
+          padding-bottom: 3px;
+          margin-bottom: 20px;
+          > span {
+            display: inline-block;
+            line-height: 16px;
+            border-left: 6px solid #1890ff;
+            padding-left: 6px;
+          }
+        }
+        .patrol_equipment_info_content {
+          padding: 0 30px;
+          .equipment_item {
+            border: 1px solid #ccc;
+            font-size: 14px;
+            padding: 15px;
+            margin-bottom: 30px;
+            .equipment_info {
+              display: flex;
+              flex-wrap: wrap;
+              border: 1px solid #ddd;
+              .item_info {
+                width: 33.33%;
+                height: 24px;
+                line-height: 24px;
+                display: flex;
+                .item_label {
+                  width: 90px;
+                  text-align: center;
+                  background-color: #f2f2f2;
+                  font-weight: 700;
+                }
+                .item_value {
+                  border-bottom: 1px solid #f2f2f2;
+                  flex: 1;
+                  padding-left: 5px;
+                }
+                &:last-child {
+                  width: 100%;
+                  .item_value {
+                    border: 0;
+                  }
+                }
+              }
+            }
+            > p {
+              margin-top: 20px;
+              color: #797979;
+            }
+            .matter_info {
+              ::v-deep .el-table {
+                th.el-table__cell {
+                  background-color: #f2f2f2;
+                  padding: 0;
+                }
+                td.el-table__cell {
+                  padding: 0;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 250 - 0
src/views/rulesManagement/measuringSubmit/index.vue

@@ -0,0 +1,250 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <patrol-search @search="reload"> </patrol-search>
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="openEdit()"
+          >
+            新建
+          </el-button>
+        </template>
+        <template v-slot:code="{ row }">
+          <el-link type="primary" :underline="false" @click="goDetail(row)">
+            {{ row.code }}
+          </el-link>
+        </template>
+        <!-- 操作列 -->
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="openEdit(row)"
+          >
+            修改
+          </el-link>
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除此巡检点配置吗?"
+            @confirm="remove(row)"
+          >
+            <template v-slot:reference>
+              <el-link type="danger" :underline="false" icon="el-icon-delete">
+                删除
+              </el-link>
+            </template>
+          </el-popconfirm>
+        </template>
+      </ele-pro-table>
+    </el-card>
+
+    <!-- 新建或编辑弹窗 -->
+    <!-- <AddPatrolConfigDialog
+      ref="addPatrolConfigDialogRef"
+      :dialogTitle="dialogTitle"
+      :isBindPlan="isBindPlan"
+      @done="reload"
+    /> -->
+    <!-- 新建或编辑弹窗 -->
+    <programRulesDialog
+      ref="programRulesDialog"
+      :visible.sync="addProgramRulesDialog"
+      :dialogTitle="dialogTitle"
+      :isBindPlan="isBindPlan"
+      @done="reload"
+    />
+  </div>
+</template>
+
+<script>
+  // import AddPatrolConfigDialog from '@/components/addPatrolConfigDialog';
+  import ProgramRulesDialog from '../components/programRulesDialog';
+  import PatrolSearch from './components/patrol-search.vue';
+  import { planConfigPage, removeRule } from '@/api/ruleManagement/plan';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    mixins: [dictMixins],
+    components: {
+      PatrolSearch,
+      // AddPatrolConfigDialog,
+      ProgramRulesDialog
+    },
+    data() {
+      return {
+        addProgramRulesDialog: false,
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '计划配置单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '计划配置名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'groupName',
+            label: '量具送检部门',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'categoryName',
+            label: '设备分类',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'ruleName',
+            label: '规则名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'autoOrder',
+            label: '自动派单',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              let autoOrder =
+                _row.autoOrder == 1 ? '是' : _row.autoOrder == 0 ? '否' : '-';
+              return autoOrder;
+            }
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('规则状态', _row.status);
+            }
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 150,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+        // 加载状态
+        loading: false,
+        pageType: 'add',
+        dialogTitle: '',
+        isBindPlan: false
+      };
+    },
+    computed: {},
+    created() {
+      this.requestDict('规则状态');
+    },
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return planConfigPage({
+          pageNum: page,
+          size: limit,
+          ...where,
+          groupId: where.groupId == null ? '' : where.groupId,
+          categoryLevelId:
+            where.categoryLevelId == null ? '' : where.categoryLevelId,
+          ruleType: 4
+        });
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        console.log('刷新表格');
+        this.addProgramRulesDialog = false;
+        this.$refs.table.reload({ page: 1, where, ruleType: 1 });
+      },
+
+      openEdit(row) {
+        this.isBindPlan = false;
+        this.addProgramRulesDialog = true;
+        if (row) {
+          this.dialogTitle = '编辑量具送检计划配置';
+        } else {
+          this.dialogTitle = '新增量具送检计划配置';
+        }
+        this.$nextTick(() => {
+          this.$refs.programRulesDialog.init(row, '量具送检');
+        });
+      },
+
+      remove(row) {
+        removeRule([row.id]).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
+
+      goDetail({ id }) {
+        this.$router.push({
+          path:
+            '/rulesManagement/measuringSubmit/detail?date=' +
+            new Date().valueOf(),
+          query: {
+            id
+          }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 3 - 1
src/views/rulesManagement/planRules/index.vue

@@ -83,7 +83,7 @@
           </ele-pro-table>
         </div>
         <div v-if="activeComp == 'measuringSubmit'">
-          <InspectionPoint />
+          <MeasuringSubmit />
         </div>
       </div>
     </el-card>
@@ -100,6 +100,7 @@
 
 <script>
   import InspectionPoint from '../inspectionPoint';
+  import MeasuringSubmit from '../measuringSubmit';
   import Maintenance from '../maintenance';
   import InventorySearch from './components/inventory-search.vue';
   import AddInventoryDialog from './components/addInventoryDialog.vue';
@@ -109,6 +110,7 @@
       InventorySearch,
       AddInventoryDialog,
       InspectionPoint,
+      MeasuringSubmit,
       Maintenance
     },
     data() {