| | |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('æ
éæ¥ä¿®')">导åº</a-button>--> |
| | | <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> |
| | | <!--@change="handleImportExcel">--> |
| | | <!--<a-button type="primary" icon="import">导å
¥</a-button>--> |
| | | <!--@change="handleImportExcel">--> |
| | | <!--<a-button type="primary" icon="import">导å
¥</a-button>--> |
| | | <!--</a-upload>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a @click="handleAssign(record)">ææ´¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | |
| | | <a-popconfirm title="ç¡®å®ä½åºå?" @confirm="() => handleDelete(record.id)"> |
| | | <a>ä½åº</a> |
| | | </a-popconfirm> |
| | |
| | | @ok="modalFormOk"/> |
| | | <!-- å¾çé¢è§å¼¹çª --> |
| | | <images-preview-modal ref="imagesPreviewModalRef" :imageListUrl="currentImageListUrl"/> |
| | | <!--ææ´¾æ¥ä¿®å¼¹çª--> |
| | | <assign-repair-report-modal ref="assignRepairReportModalRef" @ok="modalFormOk"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | import ImagesPreviewModal from '@views/eam/repair/modules/ImagesPreviewModal.vue' |
| | | import { getAction } from '@/api/manage' |
| | | import AssignRepairReportModal from './modules/EamReportRepairList/AssignRepairReportModal' |
| | | |
| | | |
| | | export default { |
| | | name: 'EamReportRepairList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | AssignRepairReportModal, |
| | | ImagesPreviewModal, |
| | | LxSearchEquipmentSelect, |
| | | EamReportRepairModal |
| | |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 150 |
| | | width: 200 |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.getFaultReasonListByApi() |
| | |
| | | this.$refs.imagesPreviewModalRef.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * ææ´¾æ¥ä¿®å |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleAssign(record) { |
| | | this.$refs.assignRepairReportModalRef.visible = true |
| | | this.$refs.assignRepairReportModalRef.model = Object.assign({}, { id: record.id }) |
| | | }, |
| | | |
| | | getCheckboxProps(record) { |
| | | return { |
| | | props: { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal :visible="visible" title="ææ´¾æ¥ä¿®" :width="500" @ok="handleSubmit" @cancel="handleCancel" |
| | | :confirmLoading="confirmLoading"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validateRules" :labelCol="{span:4}" :wrapperCol="{span:18}"> |
| | | <a-form-model-item label="维修工" prop="repairer"> |
| | | <j-search-select-tag v-model="model.repairer" placeholder="è¯·éæ©ç»´ä¿®å·¥" |
| | | dict="sys_user,realname, username, del_flag=0 and post='PCR0002' and status=1"/> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { postAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'AssignRepairReportModal', |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | confirmLoading: false, |
| | | model: {}, |
| | | validateRules: { |
| | | repairer: [ |
| | | { required: true, message: 'è¯·éæ©ç»´ä¿®å·¥' } |
| | | ] |
| | | }, |
| | | url: { |
| | | assign: '/eam/eamRepairOrder/assign' |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSubmit() { |
| | | const that = this |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | postAction(that.url.assign, that.model) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.handleCancel() |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.visible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-content: center; |
| | | } |
| | | </style> |
| | |
| | | dictCode="flow_type"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="æµç¨åç§°"> |
| | | <a-input placeholder="请è¾å
¥æµç¨åç§°" v-model="queryParam.flowName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!--<a-col :xl="4" :lg="6" :md="8" :sm="24">--> |
| | | <!--<a-form-item label="æµç¨åç§°">--> |
| | | <!--<a-input placeholder="请è¾å
¥æµç¨åç§°" v-model="queryParam.flowName"></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <a-col :xl="4" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="å½åèç¹"> |
| | | <a-input placeholder="请è¾å
¥å½åèç¹ç²¾ç¡®æ¥è¯¢" v-model="queryParam.name"></a-input> |
| | |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="8" :lg="8" :md="12" :sm="24"> |
| | | <a-form-item label="任塿¶é´èå´"> |
| | | <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" class="query-group-cust" |
| | | <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©å¼å§æ¶é´" |
| | | class="query-group-cust" |
| | | v-model="queryParam.startTime"></j-date> |
| | | <span class="query-group-split-cust"></span> |
| | | <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" class="query-group-cust" |
| | | <j-date :show-time="false" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©ç»ææ¶é´" |
| | | class="query-group-cust" |
| | | v-model="queryParam.endTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <!--å个æµç¨å¤ç--> |
| | | <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" |
| | | @searchReset="searchReset"></InspectionOrderHandle> |
| | | <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData" |
| | | @searchReset="searchReset"></week-maintenance-approval-modal> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" @searchReset="searchReset" |
| | | :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal> |
| | | |
| | | <!--æ¹éå¤ç--> |
| | | <inspection-order-batch-handle ref="inspectionOrderBatchHandleRef" @searchReset="searchReset" |
| | | :taskList="selectionRows"/> |
| | | |
| | | <week-maintenance-batch-approval-modal ref="weenMaintenanceBatchApprovalModalRef" @searchReset="searchReset" |
| | | :taskList="selectionRows"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' |
| | | |
| | | import { getAction } from '@api/manage' |
| | | import InspectionOrderBatchHandle from './InspectionOrder/InspectionOrderBatchHandle' |
| | | import WeekMaintenanceBatchApprovalModal from './weekMaintenance/WeekMaintenanceBatchApprovalModal' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | WeekMaintenanceBatchApprovalModal, |
| | | InspectionOrderBatchHandle, |
| | | JDictSelectTag, |
| | | WeekMaintenanceApprovalModal, |
| | | RepairOrderApprovalModal, |
| | |
| | | { |
| | | title: 'æµç¨åç±»', |
| | | align: 'center', |
| | | dataIndex: 'category_dictText', |
| | | dataIndex: 'category_dictText' |
| | | }, |
| | | { |
| | | title: 'æµç¨åç§°', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | if (!params) { |
| | | return false |
| | | } |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | if (this.selectedRowKeys.length > 0) this.selectedRowKeys = this.selectionRows = [] |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | handelDetail(item, index) { |
| | | console.log('ç¹å»äºè¯¦æ
') |
| | | console.log('item----->', item) |
| | |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | | } |
| | | }, |
| | | |
| | | batchHandle() { |
| | | const categorySet = new Set(this.selectionRows.map(item => item.category)) |
| | | const nameSet = new Set(this.selectionRows.map(item => item.name)) |
| | | if (categorySet.size !== 1 || nameSet.size !== 1) { |
| | | this.$notification.info({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©å䏿µç¨åç±»ä¸çåä¸å½åèç¹' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (categorySet.has('eam_repair')) { |
| | | this.$notification.info({ |
| | | message: 'æ¶æ¯', |
| | | description: '设å¤ç»´ä¿®æµç¨æ æ³æ¹éå¤ç' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (categorySet.has('sbdjApproval')) { |
| | | this.$refs.inspectionOrderBatchHandleRef.visible = true |
| | | this.$refs.inspectionOrderBatchHandleRef.title = this.selectionRows[0].name |
| | | this.$refs.inspectionOrderBatchHandleRef.getAllApproveData(this.selectionRows[0]) |
| | | this.$refs.inspectionOrderBatchHandleRef.getBasicInformation(this.selectionRows[0]) |
| | | } else if (categorySet.has('WEEK_MAINTENANCE')) { |
| | | this.$refs.weenMaintenanceBatchApprovalModalRef.handleDetail(this.selectionRows[0]) |
| | | this.$refs.weenMaintenanceBatchApprovalModalRef.title = this.selectionRows[0].name |
| | | } |
| | | }, |
| | | |
| | | splitAprocessType(title) { |
| | | let parts = title.split('ï¼') // 注æåå·æ¯å
¨è§å符ï¼ä½¿ç¨å¯¹åºçåè¿è¡åå² |
| | | let result = parts[0] |
| | |
| | | this.$refs.modalFormInspectionOrder.getBasicInformation(record) |
| | | }, |
| | | |
| | | batchHandle() { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½' |
| | | }) |
| | | return |
| | | } else { |
| | | let ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | getAction(this.url.isSameNode + '?taskIds=' + ids).then((res) => { |
| | | if (res.success) { |
| | | let taskDefKey = res.result |
| | | this.selectBachData.taskIds = ids |
| | | this.selectBachData.taskDefKey = taskDefKey |
| | | this.$refs.modalFormDispatchFileBatch.title = 'æ¹éå¤ç' |
| | | this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData) |
| | | this.$refs.modalFormDispatchFileBatch.disableSubmit = false |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleWeekMaintenance(item) { |
| | | if (item && item.dataId) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | </a-card> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='3' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="Fetched Image"/>--> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': !isDisplaySubmitButton} }" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | centered |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row :gutter="24"> |
| | | <a-tabs> |
| | | <a-tab-pane key='1' tab='æµç¨å¾'> |
| | | <img :src="imageSrc" alt="æµç¨å¾è·åä¸..."/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-row> |
| | | |
| | | <div v-if="model.maintenanceStatus==='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='model.confirmDealType' dictCode='approved_rejected' |
| | | placeholder="è¯·éæ©å¤çç±»å"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="confirmComment" label="确认æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.confirmComment"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | |
| | | <div v-if="model.maintenanceStatus==='WAIT_INITIAL_ACCEPTANCE'"> |
| | | <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="initialAcceptanceComment" |
| | | label="åéªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.initialAcceptanceComment"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="initialAcceptanceFilesResult" |
| | | label="åéªæ¶éä»¶"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" v-model="model.initialAcceptanceFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | |
| | | <div v-if="model.maintenanceStatus==='WAIT_FINAL_ACCEPTANCE'"> |
| | | <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="finalAcceptanceComment" |
| | | label="ç»éªæ¶æè§"> |
| | | <a-textarea placeholder="请è¾å
¥æè§" v-model="model.finalAcceptanceComment"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="finalAcceptanceFilesResult" |
| | | label="ç»éªæ¶éä»¶"> |
| | | <lx-upload :returnUrl="false" :isMultiple="true" v-model="model.finalAcceptanceFilesResult"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { downFile, getAction, httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'WeekMaintenanceBatchApprovalModal', |
| | | props: { |
| | | taskList: { |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | imageSrc: null, |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: 'è¯·éæ©éè¿æé©³å!' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请è¾å
¥ç¡®è®¤æè§!' } |
| | | ], |
| | | initialAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥åéªæ¶æè§!' } |
| | | ], |
| | | finalAcceptanceComment: [ |
| | | { required: true, message: '请è¾å
¥ç»éªæ¶æè§!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | queryById: '/eam/weekMaintenanceOrder/queryById', |
| | | batchApprove: '/eam/weekMaintenanceOrder/batchApproval', |
| | | diagramView: '/assign/flow/diagramView' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | isDisplaySubmitButton: function() { |
| | | return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE'].includes(this.model.maintenanceStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.visible = true |
| | | this.spinning = true |
| | | this.imageSrc = null |
| | | if (item.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey } = item |
| | | |
| | | downFile(this.url.diagramView, { |
| | | processDefinitionId, |
| | | processInstanceId, |
| | | TaskDefinitionKey: processDefinitionKey |
| | | }, 'get') |
| | | .then((res => { |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | .catch(err => { |
| | | this.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | }) |
| | | } |
| | | let res = await getAction(this.url.queryById, { id: item.dataId }) |
| | | this.model = Object.assign({}, res.result) |
| | | this.spinning = false |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | const { confirmComment, confirmDealType, initialAcceptanceComment, initialAcceptanceFilesResult, finalAcceptanceComment, finalAcceptanceFilesResult } = that.model |
| | | const params = {} |
| | | params.taskList = that.taskList |
| | | params.confirmComment = confirmComment |
| | | params.confirmDealType = confirmDealType |
| | | params.initialAcceptanceComment = initialAcceptanceComment |
| | | params.initialAcceptanceFilesResult = initialAcceptanceFilesResult |
| | | params.finalAcceptanceComment = finalAcceptanceComment |
| | | params.finalAcceptanceFilesResult = finalAcceptanceFilesResult |
| | | console.log('params', params) |
| | | httpAction(this.url.batchApprove, params, 'post').then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('searchReset') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |