From 3e5a1806bce60170c8749cae3cd5c900b550f4f2 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期日, 27 四月 2025 16:10:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/flowable/workflow/InspectionOrder/InspectionOrderBatchHandle.vue |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/src/views/flowable/workflow/InspectionOrder/InspectionOrderBatchHandle.vue b/src/views/flowable/workflow/InspectionOrder/InspectionOrderBatchHandle.vue
new file mode 100644
index 0000000..e6698e0
--- /dev/null
+++ b/src/views/flowable/workflow/InspectionOrder/InspectionOrderBatchHandle.vue
@@ -0,0 +1,161 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="1200"
+    :visible="visible"
+    :okButtonProps="{ class:{'jee-hidden': tableRowRecord.inspectionStatus!=='WAIT_CONFIRM'} }"
+    @ok="submitForm"
+    @cancel="handleCancel"
+    :mask-closable="false"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    centered
+  >
+    <a-spin :spinning="spinning">
+      <a-tabs>
+        <a-tab-pane key='1' tab='娴佺▼鍥�'>
+          <img :src="imageSrc" alt="娴佺▼鍥捐幏鍙栦腑..."/>
+        </a-tab-pane>
+      </a-tabs>
+
+
+      <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol"
+                    :rules="validatorRules" v-if="tableRowRecord.inspectionStatus==='WAIT_CONFIRM'">
+        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鐝粍闀跨‘璁や俊鎭�
+        </a-divider>
+
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-model-item prop="confirmDealType" label="澶勭悊绫诲瀷">
+              <j-dict-select-tag type='radio' v-model='tableRowRecord.confirmDealType' dictCode='approved_rejected'/>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="12">
+            <a-form-model-item prop="confirmComment" label="澶勭悊鎰忚">
+              <a-textarea placeholder="璇疯緭鍏ュ鐞嗘剰瑙�" v-model="tableRowRecord.confirmComment"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+  import { getAction, downFile, httpAction } from '@api/manage'
+
+  export default {
+    name: 'InspectionOrderBatchHandle',
+    props: {
+      taskList: {
+        type: Array
+      }
+    },
+    data() {
+      return {
+        confirmLoading: false,
+        spinning: false,
+        tableRowRecord: {},
+        hitaskDataSource: [],
+        validatorRules: {
+          confirmDealType: [
+            { required: true, message: '璇烽�夋嫨澶勭悊绫诲瀷' }
+          ],
+          confirmComment: [
+            { required: true, message: '璇疯緭鍏ュ鐞嗘剰瑙�' }
+          ]
+        },
+        imageSrc: null,
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 6 }
+        },
+        wrapperCol: {
+          xs: { span: 30 },
+          sm: { span: 16 }
+        },
+        visible: false,
+        // 琛ㄥご
+        url: {
+          diagramView: '/assign/flow/diagramView',
+          batchApprove: '/eam/eamInspectionOrder/batchApproval',
+          queryById: '/eam/eamInspectionOrder/queryById'
+        },
+        title: ''
+      }
+    },
+    methods: {
+      /**
+       * 鑾峰彇娴佺▼鍥�
+       * @param record 寰呭姙璁板綍淇℃伅
+       */
+      getAllApproveData(record) {
+        if (record.procInstId) {
+          const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = record
+          const param = { procInstId }
+          const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey }
+          const that = this
+
+          downFile(this.url.diagramView, imageParam, 'get')
+            .then((res => {
+              const urlObject = window.URL.createObjectURL(new Blob([res]))
+              that.imageSrc = urlObject
+            }))
+            .catch(err => {
+              that.$notification.error({
+                message: '娑堟伅',
+                description: res.message
+              })
+            })
+        }
+      },
+
+      /**
+       * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭�
+       * @param record 寰呭姙璁板綍淇℃伅
+       */
+      async getBasicInformation(record) {
+        this.spinning = true
+        const param = { id: record.dataId }
+        let res = await getAction(this.url.queryById, param)
+        this.tableRowRecord = Object.assign({}, res.result)
+        this.spinning = false
+      },
+
+      async submitForm() {
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            this.confirmLoading = this.spinning = true
+            const flowTaskVo = {}
+            flowTaskVo.confirmDealType = this.tableRowRecord.confirmDealType
+            flowTaskVo.confirmComment = this.tableRowRecord.confirmComment
+            flowTaskVo.taskList = this.taskList
+            const that = this
+            console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo)
+            httpAction(this.url.batchApprove, 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 = that.spinning = false
+              })
+          } else {
+            return false
+          }
+        })
+      },
+
+      handleCancel() {
+        this.visible = false
+      }
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3