From 9be2e2f91332ed341406acf9739d8912dddbf6fe Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 22 七月 2025 20:43:43 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue | 353 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 353 insertions(+), 0 deletions(-) diff --git a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue new file mode 100644 index 0000000..ad928cb --- /dev/null +++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue @@ -0,0 +1,353 @@ +<template> + <j-modal :title="title" :width="1300" :fullscreen="fullScreen" :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" + @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row id="outer-row" :gutter="24"> + <!--宸︿晶鍩虹淇℃伅鍒�--> + <a-col :span="!disableSubmit?8:14" class="scroll-col"> + <a-tabs> + <a-tab-pane tab="鍩虹淇℃伅"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鐢宠鍗曞彿"> + <a-input v-model="model.applicationOrderNum" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="缁熶竴缂栫爜"> + <technical-status-equipment-select v-model="model.equipmentId" + @autocompleteForm="autocompleteForm" disabled/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + + + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鐢宠閮ㄩ棬"> + <a-input v-model="model.factoryOrgCode_dictText" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐢宠浜�"> + <a-input v-model="model.applicant_dictText" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鎶�鏈姸鎬侀壌瀹氭棩鏈�"> + <a-input v-model="model.evaluationDate" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="澶囨敞"> + <a-textarea v-model="model.remark" readOnly/> + </a-form-model-item> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + + <!-- 涓棿鏄庣粏椤瑰垪--> + <a-col v-if="selectShenpiData.procInstId" :span="10" class="scroll-col"> + <a-tabs> + <a-tab-pane key='1' tab='娴佺▼鍥�'> + <img :src="imageSrc" alt="Fetched Image" style="width: 100%" v-if="imageSrc"/> + </a-tab-pane> + </a-tabs> + </a-col> + + <!--鍙充晶瀹℃壒鍒�--> + <a-col :span="!disableSubmit?6:10" class="scroll-col"> + <a-tabs v-if="displayDepartHeaderFlag"> + <a-tab-pane tab="浣跨敤鍗曚綅瀹ょ骇棰嗗纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departHeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departHeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departHeaderComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs v-if="displayProductionHeaderFlag"> + <a-tab-pane tab="鐢熶骇璁惧绠$悊涓荤纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="productionHeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.productionHeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!='PRODUCTION_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.productionHeaderComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!='PRODUCTION_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs v-if="displayProductionSupportFlag"> + <a-tab-pane tab="鐢熶骇淇濋殰閮ㄩ瀵肩‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="productionSupportSignatureResult" label="纭绫诲瀷" + :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.productionSupportSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!='PRODUCTION_SUPPORT_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.productionSupportComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!='PRODUCTION_SUPPORT_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { downFile, getAction, postAction } from '@/api/manage' + import TechnicalStatusEquipmentSelect from '../../../eam/equipment/modules/TechnicalStatusEquipmentSelect' + + export default { + name: 'TechnicalStatusEvaluationApplicationApprovalModal', + components: { + TechnicalStatusEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 10 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 19 } + }, + rightColLabelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + rightColWrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + fullScreen: true, + validatorRules: { + departHeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + productionHeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + productionSupportSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }] + }, + url: { + queryById: '/eam/eamTechnicalStatusEvaluationApplication/queryById', + approval: '/eam/eamTechnicalStatusEvaluationApplication/approval', + diagramView: '/assign/flow/diagramView' + }, + disableSubmit: false, + selectedRowKeys: [] + } + }, + computed: { + displayDepartHeaderFlag() { + return this.model.applicationStatus && ['DEPART_HEADER_SIGNING', 'PRODUCTION_HEADER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED'].includes(this.model.applicationStatus) + }, + displayProductionHeaderFlag() { + return this.model.applicationStatus && ['PRODUCTION_HEADER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED'].includes(this.model.applicationStatus) + }, + displayProductionSupportFlag() { + return this.model.applicationStatus && ['PRODUCTION_SUPPORT_SIGNING', 'COMPLETED'].includes(this.model.applicationStatus) + } + }, + methods: { + /** + * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleApprove(record) { + this.fullScreen = true + this.model = {} + this.getBasicInformationByApi(record) + this.getFlowChartImageByApi(record) + }, + + /** + * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleDetail(record) { + this.fullScreen = false + this.model = Object.assign({}, record) + }, + + /** + * 鑾峰彇鍩虹淇℃伅 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getBasicInformationByApi(record) { + this.spinning = true + const that = this + getAction(this.url.queryById, { id: record.dataId }) + .then(res => { + if (res.success) { + that.model = Object.assign({}, res.result) + that.model.dataId = record.dataId + that.model.taskId = record.id + that.model.userId = record.assignee + that.model.instanceId = record.procInstId + } + else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + + /** + * 鑾峰彇娴佺▼鍥� + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getFlowChartImageByApi(record) { + const { processDefinitionId, processInstanceId, processDefinitionKey } = record + this.imageSrc = null + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + this.imageSrc = window.URL.createObjectURL(new Blob([res])) + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + }, + + async handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = that.spinning = true + + postAction(this.url.approval, this.model) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('modalFormOk') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false + } + }) + }, + + autocompleteForm(selectObj) { + this.$set(this.model, 'equipmentId', selectObj.equipmentId) + this.spinning = false + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } + } +</script> + +<style scoped lang="less"> + /deep/ .ant-spin-nested-loading { + height: 100%; + + .ant-spin-container { + height: 100%; + + .ant-form { + height: 100%; + + #outer-row { + height: 100%; + + .scroll-col { + height: 100%; + overflow: auto; + } + } + } + } + } +</style> \ No newline at end of file -- Gitblit v1.9.3