From 7160d176c51807c4cdda631edacf366731556969 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期一, 14 四月 2025 17:33:29 +0800
Subject: [PATCH] 1、工作流我的待办页面 设备维修 分类详情弹窗样式调整完成100% 2、工作流我的待办页面 设备点检 分类详情弹窗样式与功能逻辑调整 3、工作流我的待办页面 设备点检 分类详情弹窗保养明细列表增加异常选项是否禁用由点检结果选中项决定 4、工作流我的待办页面 设备点检 分类详情弹窗保养明细列表增加批量选择点检结果功能

---
 src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue |  751 +++++++++++++++++++++++++++------------------------------
 1 files changed, 357 insertions(+), 394 deletions(-)

diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
index 0fe58e5..c954873 100644
--- a/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
+++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue
@@ -1,15 +1,11 @@
-<!--
- Description: 宸ヤ綔娴�-璁惧鐐规澶勭悊椤甸潰 List
- Author: 浣滆�� liuyh
- Date:   2025-02-27
--->
 <template>
   <a-modal
-    :title="title"
-    :width="width"
+    :width="1000"
     :visible="visible"
-    :footer="null"
+    @ok="submitForm"
     @cancel="handCancel"
+    :mask-closable="false"
+    centered
   >
     <a-card :bordered="false">
       <div>
@@ -24,110 +20,101 @@
         </a-tag>
         <br>
         <br>
-        <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button>
-        <div v-if="imageSrc">
-          <img :src="imageSrc" alt="Fetched Image" />
+        <a-button @click="fetchAndShowBmp" class="btn-custom" :loading="showBmpButtonLoading">娴佺▼鍥�</a-button>
+        <div v-if="imageSrc&&isDisplayBmp">
+          <img :src="imageSrc" alt="Fetched Image"/>
         </div>
-        <hr class="shallow-hr">
+        <!--<hr class="shallow-hr">-->
       </div>
-      <div>
-        <b>鐐规宸ュ崟璇︽儏</b>
-        <br>
-        <a-form :form='form'>
-          <a-spin :spinning="spinning">
-            <a-tabs default-active-key='1' @change='callback'>
-              <a-tab-pane key='1' tab='鍩烘湰淇℃伅'>
-                <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'>
-                  <a-row>
-                    <a-col :span='span'>
-                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="宸ュ崟鍙�">
-                        <a-input placeholder="宸ュ崟鍙疯嚜鍔ㄧ敓鎴�" :disabled="true" v-model="tableRowRecord.orderNum" />
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col :span='span'>
-                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿">
-                        <MaintenanceEquipmentSelect placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="tableRowRecord.equipmentId"
-                                                    :maintenanceCategory="maintenanceCategory" :disabled="true"
-                                                    @autocompleteForm="autocompleteForm"></MaintenanceEquipmentSelect>
-                      </a-form-model-item>
-                    </a-col>
 
-                  </a-row>
-                  <a-row>
-                    <a-col :span='span'>
-                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О">
-                        <a-input placeholder="璇疯緭鍏ユ爣鍑嗗悕绉�" disabled v-model="this.standardName" />
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col :span='span'>
-                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardCode" label="鏍囧噯缂栫爜">
-                        <a-input placeholder="璇疯緭鍏ユ爣鍑嗙紪鐮�" disabled v-model="this.standardCode" />
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                  <a-row>
-                    <a-col :span='span'>
-                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡">
-                        <a-input-number v-model="this.maintenancePeriod" :min="1" :precision="0" disabled style="width: 100%" />
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col :span='span'>
-                      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="鐐规浜�">
-                        <j-dict-select-tag v-model="tableRowRecord.operator" placeholder="璇烽�夋嫨鐢ㄦ埛" disabled dictCode="sys_user,realname,username,username!='admin' order by create_time"/>
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                  <a-row>
-                    <a-col :span='span'>
-                      <a-form-model-item label="鐐规鏃ユ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionDate">
-                        <j-date placeholder="璇烽�夋嫨鐐规鏃ユ湡" v-model="tableRowRecord.inspectionDate" disabled  style="width: 100%" />
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col :span='span'>
-                      <a-form-model-item label="鐐规杩囨湡鏃堕棿" :labelCol="{span:6}" :wrapperCol="{span:15}" prop="expirationTime">
-                        <j-date placeholder="璇烽�夋嫨鐐规杩囨湡鏃堕棿" v-model="tableRowRecord.expirationTime" disabled style="width: 100%" />
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                  <a-row >
-                    <a-col :span="24">
-                      <a-form-model-item label="澶囨敞" :labelCol="{span:1}" :wrapperCol="{span:22}" prop="remark">
-                        <a-textarea v-model="tableRowRecord.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" disabled />
-                      </a-form-model-item>
-                    </a-col>
-                  </a-row>
-                </a-form-model>
-              </a-tab-pane>
-              <a-tab-pane key='2' tab='娴佺▼鑺傜偣'>
-                <a-card>
-                  <a-timeline style="padding:0 1% 0 12%" >
-                    <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1">
-                      <div class="bottom">
-                        <p>澶勭悊浜猴細{{item.assignee_dictText}}</p>
-                        <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p>
-                        <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p>
-                        <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p>
-                        <div class="left_qiu"><span>{{item.taskName}}</span></div>
-                      </div>
-                    </a-timeline-item>
-                  </a-timeline>
-                </a-card>
-              </a-tab-pane>
-            </a-tabs>
-          </a-spin>
-        </a-form>
-      </div>
-      <div>
-        <hr class="shallow-hr">
-        <br>
-        <b>淇濆吇椤规槑缁�</b>
-        <br>
-        <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail">
-          <a-row :gutter="24">
+      <a-spin :spinning="spinning">
+        <a-tabs default-active-key='1'>
+          <a-tab-pane key='1' tab='鍩烘湰淇℃伅'>
+            <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol"
+                          :wrapperCol="wrapperCol">
+              <a-row>
+                <a-col :span='span'>
+                  <a-form-model-item label="宸ュ崟鍙�">
+                    <a-input readOnly v-model="tableRowRecord.orderNum"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span='span'>
+                  <a-form-model-item label="璁惧缂栧彿">
+                    <MaintenanceEquipmentSelect v-model="tableRowRecord.equipmentId"
+                                                :maintenanceCategory="'POINT_INSPECTION'" disabled
+                                                @autocompleteForm="autoCompleteForm"/>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+
+              <a-row>
+                <a-col :span='span'>
+                  <a-form-model-item label="鏍囧噯鍚嶇О">
+                    <a-input readOnly v-model="tableRowRecord.standardName"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span='span'>
+                  <a-form-model-item label="鏍囧噯缂栫爜">
+                    <a-input readOnly v-model="tableRowRecord.standardCode"/>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+              <a-row>
+                <a-col :span='span'>
+                  <a-form-model-item label="淇濆吇鍛ㄦ湡">
+                    <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span='span'>
+                  <a-form-model-item label="鐐规浜�">
+                    <a-input v-model="tableRowRecord.operator" readOnly/>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+              <a-row>
+                <a-col :span='span'>
+                  <a-form-model-item label="鐐规鏃ユ湡" prop="inspectionDate">
+                    <a-input v-model="tableRowRecord.inspectionDate" readOnly/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span='span'>
+                  <a-form-model-item label="鐐规杩囨湡鏃堕棿">
+                    <a-input v-model="tableRowRecord.expirationTime" readOnly/>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+              <a-row>
+                <a-col :span="24">
+                  <a-form-model-item label="澶囨敞" :labelCol="{span:3}" :wrapperCol="{span:20}">
+                    <a-textarea v-model="tableRowRecord.remark" rows="3" readOnly/>
+                  </a-form-model-item>
+                </a-col>
+              </a-row>
+            </a-form-model>
+          </a-tab-pane>
+          <a-tab-pane key='2' tab='娴佺▼鑺傜偣'>
+            <a-card :bordered="false">
+              <a-timeline>
+                <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index">
+                  <div>
+                    <h3 style="font-weight: bold;">{{item.taskName}}</h3>
+                    <div>澶勭悊浜猴細{{item.assignee_dictText}}</div>
+                    <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div>
+                    <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div>
+                    <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div>
+                  </div>
+                </a-timeline-item>
+              </a-timeline>
+            </a-card>
+          </a-tab-pane>
+        </a-tabs>
+
+        <a-tabs default-active-key='1'>
+          <a-tab-pane key="1" tab="淇濆吇椤规槑缁�">
             <j-vxe-table
               ref="editableDetailTable"
               :rowNumber="false"
-              :rowSelection="false"
+              :rowSelection="true"
               :bordered="true"
               :alwaysEdit="true"
               :toolbar="false"
@@ -136,311 +123,287 @@
               :loading="detail.loading"
               :dataSource="detail.dataSource"
               :columns="detail.columns"
-              style="margin-top: 8px;" />
-          </a-row>
-          <div class="table-operator" style="text-align: right;">
-            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
-          </div>
-        </a-form-model>
-      </div>
+              @selectRowChange="handleTableSelectRowChange"
+            >
+              <template v-slot:inspectionResult="props">
+                <j-dict-select-tag v-model="props.row.inspectionResult" dictCode="eam_inspection_result"
+                                   placeholder="璇烽�夋嫨鐐规缁撴灉"
+                                   @change="handleInspectionResultSelectChange($event,props.row)"
+                                   style="width: 100%"/>
+              </template>
+
+              <template v-slot:exceptionDescription="props">
+                <a-textarea style="height: 32px" v-model="props.row.exceptionDescription"
+                            :disabled="!props.row.inspectionResult||props.row.inspectionResult==='1'"/>
+              </template>
+
+              <template v-slot:reportFlag="props">
+                <j-dict-select-tag v-model="props.row.reportFlag"
+                                   :disabled="!props.row.inspectionResult||props.row.inspectionResult==='1'"
+                                   dictCode="yn"
+                                   style="width: 100%"/>
+              </template>
+            </j-vxe-table>
+          </a-tab-pane>
+
+          <a-button v-if="selectedRowKeys.length>0" slot="tabBarExtraContent" type="primary"
+                    @click="handleSelectAllInspectionResult">鎵归噺鐐规姝e父
+          </a-button>
+
+          <!--<a-dropdown slot="tabBarExtraContent" v-if="selectedRowKeys.length>0">-->
+          <!--<a-menu slot="overlay">-->
+          <!--<a-menu-item key="1" @click="handleSelectAllInspectionResult('姝e父')">姝e父</a-menu-item>-->
+          <!--<a-menu-item key="2" @click="handleSelectAllInspectionResult('寮傚父')">寮傚父</a-menu-item>-->
+          <!--</a-menu>-->
+
+          <!--<a-button> 鎵归噺閫夋嫨鐐规缁撴灉-->
+          <!--<a-icon type="down"/>-->
+          <!--</a-button>-->
+          <!--</a-dropdown>-->
+        </a-tabs>
+      </a-spin>
     </a-card>
-
-
   </a-modal>
 </template>
 
 <script>
+  import '@assets/less/TableExpand.less'
+  import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
+  import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
+  import { JVXETypes } from '@comp/jeecg/JVxeTable'
 
-import '@assets/less/TableExpand.less'
-import { mixinDevice } from '@/utils/mixin'
-import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage'
-import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
-import { JVXETypes } from '@comp/jeecg/JVxeTable'
-export default {
-  name: 'FlowShenPi',
-  components: { MaintenanceEquipmentSelect },
-  mixins: [mixinDevice],
-  props: {
-    selectShenpiData: {
-      type: Object,
-      required: true
-    }
-  },
-
-  data() {
-    return {
-      form: this.$form.createForm(this),
-      span: 12,
-      span1: 8,
-      coldisabled: true,
-      spinning: false,
-      tableRowRecord: {},
-      assignFileStream:{},
-      tableDataSource: [],
-      usageDataSource: [],
-      hitaskDataSource:[],
-      bomForm: {},
-      approveContent:"",
-      imageSrc: null,
-      drawerVisible: true,
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 5 }
-      },
-      wrapperCol: {
-        xs: { span: 30 },
-        sm: { span: 16 }
-      },
-      validatorRules: {
-        status: {
-          rules: [
-            { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'},
+  export default {
+    name: 'InspectionOrderHandle',
+    components: { MaintenanceEquipmentSelect },
+    props: {
+      selectShenpiData: {
+        type: Object,
+        required: true
+      }
+    },
+    data() {
+      return {
+        span: 12,
+        spinning: false,
+        tableRowRecord: {},
+        hitaskDataSource: [],
+        imageSrc: null,
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 6 }
+        },
+        wrapperCol: {
+          xs: { span: 30 },
+          sm: { span: 16 }
+        },
+        visible: false,
+        // 琛ㄥご
+        url: {
+          queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
+          diagramView: '/assign/flow/diagramView',
+          queryHisTaskList: '/assign/flow/queryHisTaskList',
+          approve: '/eam/eamInspectionOrder/approval'
+        },
+        detail: {
+          loading: false,
+          dataSource: [],
+          columns: [
+            {
+              title: '搴忓彿',
+              key: 'itemCode',
+              type: JVXETypes.normal,
+              width: '10%',
+              align: 'center',
+              fixed: 'left'
+            },
+            {
+              title: '淇濆吇椤�',
+              key: 'itemName',
+              type: JVXETypes.normal,
+              width: '20%',
+              align: 'center',
+              fixed: 'left'
+            },
+            {
+              title: '淇濆吇瑕佹眰',
+              key: 'itemDemand',
+              type: JVXETypes.normal,
+              width: '30%',
+              align: 'center',
+              fixed: 'left'
+            },
+            {
+              title: '鐐规缁撴灉',
+              key: 'inspectionResult',
+              type: JVXETypes.slot,
+              slotName: 'inspectionResult',
+              width: '20%',
+              align: 'center'
+            },
+            {
+              title: '寮傚父鎻忚堪',
+              key: 'exceptionDescription',
+              type: JVXETypes.slot,
+              slotName: 'exceptionDescription',
+              width: '30%',
+              align: 'center'
+            },
+            {
+              title: '寮傚父鏄惁鎶ヤ慨',
+              key: 'reportFlag',
+              type: JVXETypes.slot,
+              slotName: 'reportFlag',
+              width: '20%',
+              align: 'center'
+            }
           ]
         },
-      },
-      approveData: {},
-      flowData: {},
-      title: '璇︽儏椤甸潰',
-      width: 1000,
-      visible: false,
-      // 琛ㄥご
-      url: {
-        queryBomDataById: '/eam/eamInspectionOrder/selectVoById',
-        diagramView: '/assign/flow/diagramView',
-        queryHisTaskList:'/assign/flow/queryHisTaskList',
-        approve:"/eam/eamInspectionOrder/approval",
-        saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile"
-      },
-      dictOptions: {},
-      superFieldList: [],
-      workflowSource: [],
-      maintenanceCategory: 'POINT_INSPECTION',
-      standardName:"",
-      maintenancePeriod:"",
-      standardCode:"",
-      detail: {
-        loading: false,
-        dataSource: [],
-        columns: [
-          {
-            title: '搴忓彿',
-            key: 'itemCode',
-            type: JVXETypes.normal,
-            width: '10%',
-            align:"center",
-          },
-          {
-            title: '淇濆吇椤�',
-            key: 'itemName',
-            type: JVXETypes.normal,
-            width: '20%',
-            align:"center",
-          },
-          {
-            title: '淇濆吇瑕佹眰',
-            key: 'itemDemand',
-            type: JVXETypes.normal,
-            width: '30%',
-            align:"center",
-          },
-          {
-            title: "鐐规缁撴灉"
-            ,key: 'inspectionResult'
-            ,type: JVXETypes.selectSearch
-            ,dictCode:'eam_inspection_result'
-            ,width: '20%'
-            ,align:"center"
-          },
-          {
-            title: '寮傚父鎻忚堪',
-            key: 'exceptionDescription',
-            type: JVXETypes.textarea,
-            width: '30%',
-            align:"center",
-          },
-          {
-            title: '寮傚父鏄惁鎶ヤ慨',
-            key: 'reportFlag',
-            type: JVXETypes.selectSearch,
-            dictCode:'yn',
-            width: '20%',
-            align:"center",
-          }
-        ]
-      }
-    }
-  },
-  created() {
-  },
-  computed: {},
-  methods: {
-    callback() {
-    },
-    handCancel() {
-      this.visible = false
-    },
-    clearTableSource() {
-      this.tableDataSource = []
-      this.usageDataSource = []
-    },
-    fetchAndShowBmp() {
-      console.log('flowData----->', this.flowData)
-      try {
-        let parm = {
-          processDefinitionId: this.flowData.processDefinitionId,
-          processInstanceId:this.flowData.processInstanceId,
-          TaskDefinitionKey:this.flowData.processDefinitionKey
-        }
-        downFile(this.url.diagramView,parm,'get').then((res=>{
-          console.log('Pica------>',res)
-          const urlObject = window.URL.createObjectURL(new Blob([res]))
-          this.imageSrc = urlObject
-        }))
-      } catch (error) {
-        console.error('Error fetching image blob:', error)
-        alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
+        isDisplayBmp: false,
+        showBmpButtonLoading: false,
+        selectedRowKeys: []
       }
     },
-    handleQueXiaoTask(){
-      this.visible = false
-      this.routeReload()
-    },
-    autocompleteForm(selectObj) {
-      this.standardName = selectObj.standardName
-      this.maintenancePeriod=selectObj.maintenancePeriod
-      this.standardCode=selectObj.standardCode
-    },
-    submitForm () {
-      const that = this;
-      // 瑙﹀彂琛ㄥ崟楠岃瘉
-      this.form.validateFields((err, values) => {
-        if (!err) {
-          that.confirmLoading = true;
-          let url=this.url.approve
-          let method = 'post';
-          let flowTaskVo = {}
-          let tableData = that.$refs.editableDetailTable.getTableData()
-          flowTaskVo.comment =that.assignFileStream.approveContent;
-          flowTaskVo.dataId = this.selectShenpiData.dataId
-          flowTaskVo.taskId = this.selectShenpiData.id
-          flowTaskVo.userId = this.selectShenpiData.assignee
-          flowTaskVo.instanceId = this.selectShenpiData.procInstId
-          flowTaskVo.values = this.selectShenpiData.variables
-          flowTaskVo.tableDetailList=tableData
-          console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo)
-          httpAction(url,flowTaskVo,method).then((res)=>{
-            if(res.success){
-              that.$message.success(res.message);
-              that.visible = false
-              //鍒锋柊琛ㄦ牸
-              that.$emit('searchReset')
-            }else{
-              that.$message.warning(res.message);
-            }
-          }).finally(() => {
-            that.confirmLoading = false;
+    methods: {
+      /**
+       * 鑾峰彇娴佺▼鑺傜偣
+       * @param record 寰呭姙璁板綍淇℃伅
+       */
+      getAllApproveData(record) {
+        const param = { 'procInstId': record.procInstId }
+        getAction(this.url.queryHisTaskList, param)
+          .then(res => {
+            this.hitaskDataSource = res.result
           })
+      },
+
+      /**
+       * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭�
+       * @param record 寰呭姙璁板綍淇℃伅
+       */
+      getBasicInformation(record) {
+        this.tableRowRecord = {}
+        this.detail.dataSource = []
+        this.spinning = true
+        const param = { id: record.dataId }
+        const that = this
+        getAction(this.url.queryBomDataById, param)
+          .then((res => {
+            if (res.success) {
+              that.tableRowRecord = res.result[0]
+              that.detail.dataSource = res.result[0].tableDetailList
+              console.log('that.tableRowRecord----->', that.tableRowRecord)
+            }
+          }))
+      },
+
+      // 鑾峰彇骞跺睍寮�娴佺▼鍥�
+      fetchAndShowBmp() {
+        this.isDisplayBmp = !this.isDisplayBmp
+        if (!this.imageSrc) {
+          const { processDefinitionId, processInstanceId, processDefinitionKey } = this.selectShenpiData
+          let param = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey }
+          this.showBmpButtonLoading = true
+          const that = this
+          downFile(this.url.diagramView, param, 'get')
+            .then((res => {
+              const urlObject = window.URL.createObjectURL(new Blob([res]))
+              this.imageSrc = urlObject
+            }))
+            .catch(err => {
+              that.$notification.error({
+                message: '娑堟伅',
+                description: res.message
+              })
+            })
+            .finally(() => {
+              this.showBmpButtonLoading = false
+            })
         }
-      })
-    },
-    getAllApproveData(item) {
-      console.log('selectShenpiData----->', this.selectShenpiData)
-      this.flowData = item
-      let param = {
-        'id': item.dataId
-      }
-      let parmhis={
-        'procInstId': item.procInstId
-      }
-      getAction(this.url.queryHisTaskList,parmhis).then(res=>{
-        this.hitaskDataSource=res.result
-        getAction(this.url.queryBomDataById, param).then((res => {
-          if (res.success) {
-            this.tableRowRecord = res.result[0]
-            this.detail.dataSource=res.result[0].tableDetailList
-            console.log('this.tableRowRecord----->', this.tableRowRecord[0])
+      },
+
+      submitForm() {
+        const flowTaskVo = {}
+        flowTaskVo.dataId = this.selectShenpiData.dataId
+        flowTaskVo.taskId = this.selectShenpiData.id
+        flowTaskVo.userId = this.selectShenpiData.assignee
+        flowTaskVo.instanceId = this.selectShenpiData.procInstId
+        flowTaskVo.values = this.selectShenpiData.variables
+        flowTaskVo.tableDetailList = this.$refs.editableDetailTable.getTableData()
+        const that = this
+        this.confirmLoading = true
+        console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo)
+        // httpAction(this.url.approve, flowTaskVo, 'post')
+        //   .then((res) => {
+        //     if (res.success) {
+        //       that.$message.success(res.message)
+        //       //鍒锋柊琛ㄦ牸
+        //       that.$emit('searchReset')
+        //       that.handleCancel()
+        //     } else {
+        //       that.$message.warning(res.message)
+        //     }
+        //   })
+        //   .finally(() => {
+        //     that.confirmLoading = false
+        //   })
+      },
+
+      autoCompleteForm({ standardName, maintenancePeriod, standardCode }) {
+        this.$set(this.tableRowRecord, 'standardName', standardName)
+        this.$set(this.tableRowRecord, 'maintenancePeriod', maintenancePeriod)
+        this.$set(this.tableRowRecord, 'standardCode', standardCode)
+        this.spinning = false
+      },
+
+      // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉
+      handleSelectAllInspectionResult() {
+        this.selectedRowKeys.forEach(key => {
+          const dataItem = this.detail.dataSource.find(item => item.id === key)
+          if (dataItem && dataItem.inspectionResult !== '1') {
+            console.log('dataItem', dataItem)
+            delete dataItem.exceptionDescription
+            delete dataItem.reportFlag
+            dataItem.inspectionResult = '1'
           }
-        }))
-      }).finally(
-        this.visible = true,
-        console.log('this.approveData---->', this.approveData)
-      )
+        })
+        this.$refs.editableDetailTable.clearCheckboxRow()
+        this.selectedRowKeys = []
+      },
+
+      /**
+       * 琛ㄦ牸澶氶�夋鍙戠敓鏀瑰彉鏃惰Е鍙�
+       * @param {selectedRowIds} 琛ㄦ牸涓凡閫夋嫨鐨処D鍒楄〃
+       */
+      handleTableSelectRowChange({ selectedRowIds }) {
+        this.selectedRowKeys = selectedRowIds
+      },
+
+      /**
+       * 鐐规缁撴灉閫夋嫨鍣ㄥ彂鐢熸敼鍙樻椂瑙﹀彂
+       * @param value 鏀瑰彉鍚庣殑鍊�
+       * @param record 淇濆吇鏄庣粏琛岃褰�
+       */
+      handleInspectionResultSelectChange(value, record) {
+        if (record.exceptionDescription) delete record.exceptionDescription
+        if (record.reportFlag) delete record.reportFlag
+      },
+
+      handCancel() {
+        this.selectedRowKeys = []
+        this.visible = false
+      }
     }
   }
-}
 </script>
 <style scoped>
-.shallow-hr {
-  border: 0;
-  height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
-  background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
-  margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
-}
-.btn-custom {
-  background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
-  color: white; /* 鐧借壊鏂囧瓧 */
-  border: none; /* 鏃犺竟妗� */
-  padding: 5px 15px; /* 鍐呰竟璺� */
-  text-align: center; /* 鏂囧瓧灞呬腑 */
-  text-decoration: none; /* 鏃犱笅鍒掔嚎 */
-  display: inline-block; /* 琛屽唴鍧楀厓绱� */
-  font-size: 12px; /* 瀛椾綋澶у皬 */
-  margin: 4px 2px; /* 澶栬竟璺� */
-  cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */
-  border-radius: 4px; /* 鍦嗚杈规 */
-}
+  .btn-custom {
+    background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
+    color: #fff; /* 鐧借壊鏂囧瓧 */
+  }
 
-.bold-large-label {
-  font-weight: bold;
-  font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
-}
-.left_qiu{
-  position: absolute;
-  left: -74px;
-  top: 0;
-  width:54px;
-  border-radius: 50%;
-  height:54px;
-  font-size: 13px;
-  margin: auto;
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: center;
-  background: #0099ff;
-  transform: translate(0, 0);
-}
-/deep/ .ant-timeline-item-tail{
-  left: -29px !important;
-}
-.left_qiu span{
-  width: 3em;
-  display: block;
-  color: #fff;
-  text-align: center;
-}
-.img{
-  width: 75%;
-}
+  /deep/ .ant-select-dropdown-menu {
+    text-align: left;
+  }
 
-.wrap{
-  clear: both;
-  width: 100%;
-  display: flex;
-  height: 50px;
-  border: 1px solid #ccc;
-  /* background-color: aqua; */
-}
-.box{
-  width:21%;
-  height:50px;
-  border-right: 1px solid #ccc;
-  line-height: 50px;
-  /* background: red; */
-  text-align:center;
-  margin: auto;
-}
-
-@import '~@assets/less/common.less';
+  @import '~@assets/less/common.less';
 </style>
\ No newline at end of file

--
Gitblit v1.9.3