Merge remote-tracking branch 'origin/master'
| | |
| | | <DispatchFileBachHandleStyle ref="modalFormDispatchFileBatch" @searchReset="searchReset" @ok="modalFormOk"></DispatchFileBachHandleStyle> |
| | | <InspectionOrderHandle ref="modalFormInspectionOrder" :selectShenpiData="selectInspectionOrderData" @searchReset="searchReset"></InspectionOrderHandle> |
| | | <InspectionOrderHandleBzz ref="modalFormInspectionOrderBzz" :selectShenpiData="selectInspectionOrderDataBzz" @searchReset="searchReset"></InspectionOrderHandleBzz> |
| | | <week-maintenance-approval-modal ref = "weekMaintenanceApprovalModal" :maintenanceId="dataId"></week-maintenance-approval-modal> |
| | | <week-maintenance-approval-modal ref = "weekMaintenanceApprovalModal" ></week-maintenance-approval-modal> |
| | | <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData" ></repair-order-approval-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' |
| | | import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' |
| | | import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' |
| | | import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal' |
| | | import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal' |
| | | import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' |
| | | import InspectionOrderHandleBzz from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandleBzz.vue' |
| | | import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal'; |
| | | |
| | | import { getAction } from '@api/manage' |
| | | export default { |
| | |
| | | JDictSelectTag, |
| | | DispatchFileHandle, |
| | | DispatchFileBachHandleStyle, |
| | | WeekMaintenanceApprovalModal, |
| | | RepairOrderApprovalModal, |
| | | InspectionOrderHandle, |
| | | InspectionOrderHandleBzz, |
| | | WeekMaintenanceApprovalModal |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | selectInspectionOrderData:{}, |
| | | selectInspectionOrderDataBzz:{}, |
| | | selectBachData:{}, |
| | | selectRepairOrderData: {}, |
| | | //ä¸å¡ä¿¡æ¯ID |
| | | dataId: undefined, |
| | | } |
| | |
| | | break |
| | | case 'WEEK_MAINTENANCE': |
| | | this.handleWeekMaintenance(item) |
| | | break |
| | | case 'eam_repair': |
| | | this.handleRepairOrder(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | |
| | | } |
| | | }, |
| | | handleWeekMaintenance(item) { |
| | | this.dataId = item.dataId; |
| | | this.$refs.weekMaintenanceApprovalModal.add() |
| | | this.$refs.weekMaintenanceApprovalModal.title = item.preNode; |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = false; |
| | | if(item && item.dataId) { |
| | | this.$refs.weekMaintenanceApprovalModal.handleDetail(item.dataId) |
| | | this.$refs.weekMaintenanceApprovalModal.title = item.name; |
| | | this.$refs.weekMaintenanceApprovalModal.disableSubmit = false; |
| | | } |
| | | }, |
| | | handleRepairOrder(item) { |
| | | this.selectRepairOrderData = item |
| | | this.$refs.repairOrderApprovalModal.clearTableSource() |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(item) |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :footer="null" |
| | | @cancel="handCancel" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <b>{{ selectShenpiData.title }}</b> |
| | | <br> |
| | | <br> |
| | | <a-tag color="blue"> |
| | | å¤ç人 {{ selectShenpiData.assignee }} |
| | | </a-tag> |
| | | <a-tag color="blue"> |
| | | å建æ¶é´ {{ selectShenpiData.createTime }} |
| | | </a-tag> |
| | | <br> |
| | | <br> |
| | | <button @click="fetchAndShowBmp" class="btn-custom">æå¼æµç¨å¾</button> |
| | | <div v-if="imageSrc"> |
| | | <img :src="imageSrc" alt="Fetched Image" /> |
| | | </div> |
| | | <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 label='产ååç§°' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='é¨ä»¶åç§°' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> |
| | | </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.startTime}}</p> |
| | | <p>ç»ææ¶é´ï¼{{item.endTime}}</p> |
| | | <p>å¤ç人ï¼{{item.assignee}}</p> |
| | | <p>åçç±»åï¼{{item.bllx_dictText}}</p> |
| | | <p v-if="item.name == 'æäº¤ç³è¯·'">ææ´¾åå ï¼{{item.cause}}</p> |
| | | <p v-else >å¤çæè§ï¼{{item.cause}}</p> |
| | | <div class="left_qiu"><span>{{item.name}}</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> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-item label="审æ¹ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='dnc_assign_stream_status' placeholder="è¯·éæ©å®¡æ¹ç¶æ" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-model-item label="å®¡æ¹æè§" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="请è¾å
¥å®¡æ¹æè§"/> |
| | | </a-form-model-item > |
| | | </a-col> |
| | | </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> |
| | | </a-card> |
| | | |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'RepairOrderApprovalModal', |
| | | 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: { |
| | | }, |
| | | approveData: {}, |
| | | flowData: {}, |
| | | title: '', |
| | | width: 1000, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryBomDataById: '/eam/eamRepairOrder/queryById', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList:'/assign/flow/queryHisTaskList', |
| | | approve:"/activit/assign/file/approve", |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | workflowSource: [] |
| | | } |
| | | }, |
| | | 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('æ æ³å è½½å¾çï¼è¯·ç¨ååè¯ã') |
| | | } |
| | | }, |
| | | handleQueXiaoTask(){ |
| | | this.visible = false |
| | | this.routeReload() |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ |
| | | this.$message.warning('è¯·éæ©å®¡æ¹ç¶æï¼') |
| | | return false; |
| | | } |
| | | if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { |
| | | this.$message.warning('请è¾å
¥å®¡æ¹æè§ï¼') |
| | | return false; |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let url=this.url.approve |
| | | let method = 'post'; |
| | | let flowTaskVo = {} |
| | | flowTaskVo.status=that.assignFileStream.status; |
| | | flowTaskVo.approveContent =that.assignFileStream.approveContent; |
| | | flowTaskVo.comment =that.assignFileStream.approveContent; |
| | | flowTaskVo.secretLevel = that.assignFileStream.secretLevel; |
| | | flowTaskVo.dataId = this.selectShenpiData.dataId |
| | | flowTaskVo.taskId = this.selectShenpiData.id |
| | | flowTaskVo.userId = this.selectShenpiData.assignee |
| | | flowTaskVo.instanceId = this.selectShenpiData.procInstId |
| | | flowTaskVo.targetKey = this.selectShenpiData.taskDefKey |
| | | flowTaskVo.values = this.selectShenpiData.variables |
| | | flowTaskVo.assignee = this.selectShenpiData.assignee |
| | | flowTaskVo.secretLevel = that.assignFileStream.secretLevel; |
| | | console.log("表åæäº¤æ°æ®",flowTaskVo) |
| | | httpAction(url,flowTaskVo,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | getAllApproveData(item) { |
| | | console.log('selectShenpiData----->', this.selectShenpiData) |
| | | this.flowData = item |
| | | let param = { |
| | | 'id': item.dataId |
| | | } |
| | | let parmhis={ |
| | | 'procInstId': item.dataId |
| | | } |
| | | 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 |
| | | console.log('this.tableRowRecord----->', this.tableRowRecord) |
| | | } |
| | | })) |
| | | }).finally( |
| | | this.visible = true, |
| | | console.log('this.approveData---->', this.approveData) |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | </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; /* åè§è¾¹æ¡ */ |
| | | } |
| | | |
| | | .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%; |
| | | } |
| | | |
| | | .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'; |
| | | </style> |
| | |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 设å¤åºç¡ä¿¡æ¯ |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å
»åºç¡ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="设å¤ç¼ç "> |
| | | <maintenance-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" :disabled="editable"></maintenance-equipment-select> |
| | | @autocompleteForm="autocompleteForm" disabled></maintenance-equipment-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="ä¿å
»æ¥æ"> |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" |
| | | <a-date-picker placeholder="è¯·éæ©è®¡åä¿å
»æ¥æ" v-model="model.maintenanceDate" format="YYYY-MM-DD" disabled |
| | | style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="ä¿å
»äºº"> |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" |
| | | <j-search-select-tag v-model="model.operator" placeholder="è¯·éæ©ä¿å
»äºº" disabled |
| | | :dictOptions="maintenanceOperatorOptions" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" /> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark" disabled /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ä¿å
»é¡¹ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | </a-row> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> çç»é¿ç¡®è®¤ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> åéªæ¶ä¿¡æ¯ |
| | | </a-divider> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> ç»éªæ¶ä¿¡æ¯ |
| | | </a-divider> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' |
| | | |
| | | export default { |
| | | name: 'EamWeekMaintenanceOrderModal', |
| | | name: 'WeekMaintenanceApprovalModal', |
| | | mixins: [JVxeTableModelMixin], |
| | | props: { |
| | | maintenanceId: { |
| | | type: String, |
| | | default: '', |
| | | required: true, |
| | | } |
| | | }, |
| | | components: { |
| | | MaintenanceEquipmentSelect |
| | | }, |
| | |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | //ç¶ææ§å¶ |
| | | //ä¿å
»ä¸ ä¸å¯ç¼è¾ |
| | | underMaintenanceDisable : false, |
| | | confirmDisable : false, |
| | | initialAcceptanceDisable : false, |
| | | finalAcceptanceDisable : false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'WEEK_MAINTENANCE', |
| | |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: '/eam/weekMaintenanceOrder/add', |
| | | edit: '/eam/weekMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | queryById: '/eam/weekMaintenanceOrder/queryById', |
| | | detail: '/eam/weekMaintenanceOrderDetail/queryList', |
| | | approval : '/eam/weekMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | }, |
| | | detail: { |
| | |
| | | { |
| | | title: 'åºå·', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: 'åºå·ä¸è½éå¤' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ä¿å
»é¡¹', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'åä¿å
»é¡¹', |
| | | key: 'subItemName', |
| | | type: JVXETypes.textarea, |
| | | type: JVXETypes.normal, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»è¦æ±', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | type: JVXETypes.normal, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: 'ä¿å
»è¦æ±ä¸è½ä¸ºç©ºï¼' } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | btn: ['clearSelection'] |
| | | } |
| | | } |
| | | } |
| | |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | async handleDetail(dataId) { |
| | | this.loading = true; |
| | | this.visible = true; |
| | | this.detail.dataSource = [] |
| | | this.loadMaintenanceOperatorList(); |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | let res = await getAction(this.url.queryById, {id: dataId}); |
| | | this.model = Object.assign({}, res.result); |
| | | await this.loadDetail(dataId); |
| | | this.loading = false; |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData() |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.removeDetailList = [...removeData] |
| | | |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | |
| | | this.close() |
| | | }, |
| | | autocompleteForm(selectObj) { |
| | | //æ ååç§°ï¼ä¿å
»å¨æä¸å·æ°è§£å³åæ³ |
| | | //åæ³ä¸ validatorRules equipmentId è¿æ¯æé®é¢ |
| | | // const newObj = { |
| | | // standardName: selectObj.standardName, |
| | | // maintenancePeriod: selectObj.maintenancePeriod, |
| | | // standardId : selectObj.id, |
| | | // equipmentId: selectObj.equipmentId, |
| | | // }; |
| | | // this.model = Object.assign({}, newObj, this.model) |
| | | //åæ³äº |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | debugger |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId); |
| | | }, |
| | | //å 载详æ
æ°æ® |
| | | loadStandardDetail(standardId) { |
| | | if (standardId) { |
| | | getAction(this.url.standardDetail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | subItemName: item.subItemName, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //æ åéæ©åå |
| | | loadDetail(orderId) { |