| | |
| | | required: true, message: '请输入旧密码!', |
| | | }], |
| | | }, |
| | | password:{ |
| | | rules: [{ |
| | | required: true, message: '请输入新密码!',trigger:'blur' |
| | | }, { |
| | | validator: this.validateToNextPassword, |
| | | }, |
| | | { |
| | | pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | message: '密码由8位数字、大小写字母和特殊符号组成!', |
| | | }], |
| | | }, |
| | | // password:{ |
| | | // rules: [{ |
| | | // required: true, message: '请输入新密码!',trigger:'blur' |
| | | // }, { |
| | | // validator: this.validateToNextPassword, |
| | | // }, |
| | | // { |
| | | // pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | // message: '密码由8位数字、大小写字母和特殊符号组成!', |
| | | // }], |
| | | // }, |
| | | confirmpassword:{ |
| | | rules: [{ |
| | | required: true, message: '请确认新密码!', |
| | |
| | | { |
| | | title: '维修工', |
| | | align: 'center', |
| | | dataIndex: 'repairer_dictText' |
| | | dataIndex: 'repairman_dictText' |
| | | }, |
| | | { |
| | | title: '保养状态', |
| | |
| | | { |
| | | title: '管理员确认', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | dataIndex: 'manageUser_dictText' |
| | | }, |
| | | { |
| | | title: '管理员确认时间', |
| | |
| | | */ |
| | | handlerCollect(id) { |
| | | let that = this |
| | | this.loading = true |
| | | getAction(that.url.collect, { id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- 查询区域 --> |
| | | <div class="table-page-search-wrapper" v-if="isDisplayOperation"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="统一编码"> |
| | | <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="工单号"> |
| | | <a-input placeholder="请输入工单号" v-model="queryParam.orderNum"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="5" :lg="6" :md="8" :sm="24"> |
| | | <a-form-item label="统一编码"> |
| | | <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="保养状态"> |
| | | <j-dict-select-tag placeholder="请选择保养状态" dict-code="second_maintenance_status" |
| | | <j-dict-select-tag placeholder="请选择保养状态" dict-code="third_maintenance_status" |
| | | v-model="queryParam.maintenanceStatus"/> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增 |
| | | </a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="handlerBatchAbolish"> |
| | | <a-icon type="delete"/> |
| | | 作废 |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="handlerBatchCollect"> |
| | | <a-icon type="form"/> |
| | | 领取 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ |
| | | selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
| | | </div> |
| | | |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> |
| | | |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | |
| | | </template> |
| | | |
| | | <a-divider v-if="record.maintenanceStatus === 'COMPLETE'" type="vertical"/> |
| | | |
| | | <a v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">打印</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | </a-table> |
| | | <!-- table区域-end --> |
| | | |
| | | <!-- 表单区域 --> |
| | |
| | | dataIndex: 'maintenanceDate' |
| | | }, |
| | | { |
| | | title: '锁定工单日期', |
| | | align: 'center', |
| | | dataIndex: 'freezeOrderDate' |
| | | }, |
| | | { |
| | | title: '工单过期日期', |
| | | align: 'center', |
| | | dataIndex: 'orderExpirationDate' |
| | | }, |
| | | { |
| | | title: '实际开始时间', |
| | | align: 'center', |
| | | dataIndex: 'actualStartTime' |
| | |
| | | dataIndex: 'actualEndTime' |
| | | }, |
| | | { |
| | | title: '保养人', |
| | | title: '维修人', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: '精度检验人', |
| | | align: 'center', |
| | | dataIndex: 'precisionChecker_dictText' |
| | | }, |
| | | { |
| | | title: '精度检验时间', |
| | | align: 'center', |
| | | dataIndex: 'precisionCheckTime' |
| | | dataIndex: 'repairman_dictText' |
| | | }, |
| | | { |
| | | title: '保养状态', |
| | |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: '机动办确认', |
| | | title: '设备功能是否齐备', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | dataIndex: 'fullyFunctional_dictText' |
| | | }, |
| | | { |
| | | title: '机动办确认时间', |
| | | title: '设备能否正常运转', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime' |
| | | dataIndex: 'runningNormally_dictText' |
| | | }, |
| | | { |
| | | title: '机动办意见', |
| | | title: '检查人', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment' |
| | | dataIndex: 'inspector_dictText' |
| | | }, |
| | | { |
| | | title: '确认领导', |
| | | title: '检查时间', |
| | | align: 'center', |
| | | dataIndex: 'confirmLeader_dictText' |
| | | dataIndex: 'inspectTime' |
| | | }, |
| | | { |
| | | title: '领导确认时间', |
| | | title: '操作人签字', |
| | | align: 'center', |
| | | dataIndex: 'leaderConfirmTime' |
| | | dataIndex: 'operatorSignature_dictText' |
| | | }, |
| | | { |
| | | title: '领导意见', |
| | | title: '协助操作人', |
| | | align: 'center', |
| | | dataIndex: 'leaderConfirmComment' |
| | | } |
| | | dataIndex: 'assistantOperator' |
| | | }, |
| | | { |
| | | title: '操作人签字时间', |
| | | align: 'center', |
| | | dataIndex: 'operatorSignatureTime' |
| | | }, |
| | | { |
| | | title: '维修人签字', |
| | | align: 'center', |
| | | dataIndex: 'repairmanSignature_dictText' |
| | | }, |
| | | { |
| | | title: '协助维修人', |
| | | align: 'center', |
| | | dataIndex: 'assistantRepairman' |
| | | }, |
| | | { |
| | | title: '维修人签字时间', |
| | | align: 'center', |
| | | dataIndex: 'repairmanSignatureTime' |
| | | }, |
| | | { |
| | | title: '维修室主任签字', |
| | | align: 'center', |
| | | dataIndex: 'repairManagerSignature_dictText' |
| | | }, |
| | | { |
| | | title: '维修室主任签字时间', |
| | | align: 'center', |
| | | dataIndex: 'repairManagerSignatureTime' |
| | | }, |
| | | { |
| | | title: '设备检查人签字', |
| | | align: 'center', |
| | | dataIndex: 'inspectorSignature_dictText' |
| | | }, |
| | | { |
| | | title: '设备检查人签字时间', |
| | | align: 'center', |
| | | dataIndex: 'inspectorSignatureTime' |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/thirdMaintenanceOrder/list', |
| | |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | onMaintenanceDateChange: function(dateString) { |
| | | this.queryParam.maintenanceDateBegin = dateString[0] |
| | | this.queryParam.maintenanceDateEnd = dateString[1] |
| | | }, |
| | | |
| | | /** |
| | | * 点击作废时触发 |
| | | * @param id |
| | | */ |
| | | handlerAbolish(id) { |
| | | var that = this |
| | | this.loading = true |
| | | deleteAction(that.url.abolish, { id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handlerBatchAbolish() { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认作废', |
| | | content: '是否作废选中数据,只有待保养状态的数据才可作废成功?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | deleteAction(that.url.abolishBatch, { ids }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //单个领取 |
| | | /** |
| | | * 点击领取时触发 |
| | | * @param id |
| | | */ |
| | | handlerCollect(id) { |
| | | let that = this |
| | | this.loading = true |
| | | getAction(that.url.collect, { id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //批量领取 |
| | | handlerBatchCollect() { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认领取', |
| | | content: '是否领取选中数据,只有待保养状态的数据才可领取成功?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | deleteAction(that.url.collectBatch, { ids }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 点击详情时触发 |
| | | * @param record |
| | | */ |
| | | handleDetail(record) { |
| | | this.selectThirdMaintenanceData = Object.assign({}, record) |
| | | this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) |
| | |
| | | this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true |
| | | }, |
| | | |
| | | onMaintenanceDateChange(dateString) { |
| | | this.queryParam.maintenanceDateBegin = dateString[0] |
| | | this.queryParam.maintenanceDateEnd = dateString[1] |
| | | }, |
| | | |
| | | handlePrint(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1094880052100399104?id=` + record.id |
| | | // + `&orderId=` + record.id; //网站链接 |
| | | window.open(href, '_blank') |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen |
| | | :mask-closable="false" @ok="handleOk" @cancel="handleCancel" centered cancelText="关闭"> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | :mask-closable="false" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="关闭"> |
| | | |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="orderNum" label="工单号"> |
| | | <a-input placeholder="工单号系统自动生成" v-model="model.orderNum" disabled/> |
| | | <a-input placeholder="工单号系统自动生成" v-model="model.orderNum" disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentId" label="统一编码"> |
| | | <maintenance-equipment-select placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId" |
| | | maintenanceCategory="THIRD_MAINTENANCE" |
| | | <a-form-model-item prop="equipmentId" label="设备编码"> |
| | | <maintenance-equipment-select placeholder="请输入设备编号或名称搜索" v-model="model.equipmentId" |
| | | :maintenanceCategory="maintenanceCategory" |
| | | @autocompleteForm="autocompleteForm" |
| | | :disabled="!editable"/> |
| | | :disabled="editable"></maintenance-equipment-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="standardName" label="规范名称"> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.standardName" disabled/> |
| | | <a-form-model-item prop="standardName" label="标准名称"> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.standardName" disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="maintenanceDate" label="保养日期"> |
| | | <a-date-picker placeholder="请选择计划保养日期" v-model="model.maintenanceDate" value-format="YYYY-MM-DD" |
| | | style="width: 100%"/> |
| | | <a-date-picker placeholder="请选择计划保养日期" v-model="model.maintenanceDate" format="YYYY-MM-DD" |
| | | style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <!-- <a-col :span="8">--> |
| | | <!-- <a-form-model-item prop="operator" label="保养人">--> |
| | | <!-- <j-search-select-tag v-model="model.operator" placeholder="请选择保养人" :disabled="!model.equipmentId"--> |
| | | <!-- :dictOptions="maintenanceOperatorOptions" />--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="maintenancePeriod" label="保养周期"> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.maintenancePeriod" disabled/> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.maintenancePeriod" disabled /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <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" /> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | |
| | | <a-tabs> |
| | | <a-tab-pane key="1" tab="保养项明细"> |
| | | <j-vxe-table ref="editableDetailTable" rowNumber bordered keep-source :height="300" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <a-row :gutter="24"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="保养项" :forceRender="true"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="detail.toolbarConfig" |
| | | keep-source |
| | | :height="300" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | style="margin-top: 8px;" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | |
| | | export default { |
| | | name: 'EamThirdMaintenanceOrderModal', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: '操作', |
| | | visible: false, |
| | | editable: true, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | maintenanceOperatorOptions: [], |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: '请选择设备!', trigger: 'change' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: '请选择计划保养日期!', trigger: 'change' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/thirdMaintenanceOrder/add', |
| | | edit: '/eam/thirdMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list' |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: '序号', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: 60, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '保养部位', |
| | | key: 'itemPart', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '保养内容', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '验收标准', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix 前缀;suffix 后缀 |
| | | slot: ['prefix', 'suffix'], |
| | | // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | export default { |
| | | name: 'EamThirdMaintenanceOrderModal', |
| | | components: { MaintenanceEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: '操作', |
| | | visible: false, |
| | | editable: false, |
| | | maintenanceCategory: 'THIRD_MAINTENANCE', |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | activeTabKey: '1', |
| | | maintenanceOperatorOptions: [], |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: '请选择设备!' } |
| | | ], |
| | | maintenanceDate: [ |
| | | { required: true, message: '请选择计划保养日期!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/thirdMaintenanceOrder/add', |
| | | edit: '/eam/thirdMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'ID', |
| | | key: 'id', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: 'orderId', |
| | | key: 'orderId', |
| | | type: JVXETypes.hidden |
| | | }, |
| | | { |
| | | title: '序号', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, unique: true, message: '序号不能重复' } |
| | | ] |
| | | }, |
| | | { |
| | | title: '部位', |
| | | key: 'itemPart', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '保养项', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '保养项不能为空!' } |
| | | ] |
| | | }, |
| | | { |
| | | title: '保养要求', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align: 'center', |
| | | validateRules: [ |
| | | { required: true, message: '保养要求不能为空!' } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix 前缀;suffix 后缀 |
| | | slot: ['prefix', 'suffix'], |
| | | // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
| | | btn: ['add', 'remove', 'clearSelection'] |
| | | } |
| | | } |
| | | }, |
| | | // precisionDetail: { |
| | | // loading: false, |
| | | // dataSource: [], |
| | | // columns: [ |
| | | // { |
| | | // title: 'ID', |
| | | // key: 'id', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'orderId', |
| | | // key: 'orderId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'equipmentId', |
| | | // key: 'equipmentId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'parameterId', |
| | | // key: 'parameterId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: '检测项目', |
| | | // key: 'parameterId_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '25%', |
| | | // align: 'center' |
| | | // }, |
| | | // { |
| | | // title: '参数编码', |
| | | // key: 'parameterCode_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '20%', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: '允差值', |
| | | // key: 'parameterValue', |
| | | // type: JVXETypes.normal, |
| | | // width: '30%', |
| | | // align: 'center', |
| | | // } |
| | | // ], |
| | | // toolbarConfig: { |
| | | // // prefix 前缀;suffix 后缀 |
| | | // slot: ['prefix', 'suffix'], |
| | | // // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
| | | // btn: ['add', 'remove', 'clearSelection'] |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.initParams(); |
| | | //初始化默认值 |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //初始化默认值 |
| | | this.model = {} |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | }, |
| | | edit(record) { |
| | | this.initParams(); |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | // this.loadPrecisionDetail(record.id) |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('数据校验失败!') |
| | | return |
| | | } |
| | | // 触发表单验证 |
| | | 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] |
| | | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.editable = false |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('数据校验失败!') |
| | | return |
| | | } |
| | | // 触发表单验证 |
| | | 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' |
| | | } |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | return false |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | if (!this.model.equipmentId) delete this.model.operator |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | |
| | | //加载详情数据 |
| | | loadStandardDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | this.spinning = true |
| | | getAction(this.url.standardDetail, { standardId: standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | itemPart: item.itemPart, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | //规范选择变化 |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | 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) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.equipmentId) delete this.model.operator |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | this.loadPrecisionParameterList(selectObj.equipmentId) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | //加载详情数据 |
| | | loadStandardDetail(standardId) { |
| | | this.detail.dataSource = [] |
| | | if (standardId) { |
| | | this.spinning = true |
| | | getAction(this.url.standardDetail, { standardId: standardId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = res.result.map(item => ({ |
| | | itemCode: item.itemCode, |
| | | itemName: item.itemName, |
| | | itemPart: item.itemPart, |
| | | itemDemand: item.itemDemand |
| | | })) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | //标准选择变化 |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId: orderId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } else { |
| | | return |
| | | } |
| | | const that = this |
| | | getAction(this.url.userSelect, params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | that.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator |
| | | } else { |
| | | if (that.model.operator) delete that.model.operator |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | if (that.model.operator) delete that.model.operator |
| | | }) |
| | | }, |
| | | // loadPrecisionParameterList(equipmentId) { |
| | | // this.precisionDetail.dataSource = [] |
| | | // if (equipmentId) { |
| | | // this.spinning = true |
| | | // getAction(this.url.precisionDetail, { equipmentId: equipmentId }) |
| | | // .then(res => { |
| | | // if (res.success) { |
| | | // this.precisionDetail.dataSource = res.result.map(item => ({ |
| | | // equipmentId: item.equipmentId, |
| | | // parameterId: item.parameterId, |
| | | // parameterId_dictText: item.parameterId_dictText, |
| | | // parameterCode_dictText: item.parameterCode_dictText, |
| | | // parameterValue: item.parameterValue, |
| | | // })) |
| | | // } |
| | | // }) |
| | | // .finally(() => { |
| | | // this.spinning = false |
| | | // }) |
| | | // } |
| | | // }, |
| | | // loadPrecisionDetail(orderId) { |
| | | // if (orderId) { |
| | | // getAction(this.url.precisionCheckDetail, { orderId: orderId }).then(res => { |
| | | // if (res.success) { |
| | | // this.precisionDetail.dataSource = [...res.result] |
| | | // } |
| | | // }) |
| | | // } |
| | | // }, |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | // this.precisionDetail.dataSource = [] |
| | | this.activeTabKey = '1' |
| | | }, |
| | | } |
| | | </script> |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
| | |
| | | |
| | | <a-table ref='table' :columns='columns' :dataSource='dataSource' :loading='loading' :pagination='ipagination' |
| | | :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' |
| | | :scroll='{x:getTableColumnsTotalWidth,y:465}' bordered rowKey='id' size='middle' |
| | | :scroll="{x:'max-content',y:465}" bordered rowKey='id' size='middle' |
| | | @change='handleTableChange'> |
| | | <span slot='action' slot-scope='text, record'> |
| | | <a @click='handelDetail(record,text)'>执行/审批</a> |
| | |
| | | |
| | | <technical-status-evaluation-approval-modal ref="technicalStatusApprovalModal" :selectShenpiData="selectedRowData" |
| | | @modalFormOk="modalFormOk"/> |
| | | |
| | | <second-maintenance-approval-modal ref="secondMaintenanceApprovalModal" :selectShenpiData="selectedRowData" |
| | | @modalFormOk="modalFormOk"/> |
| | | |
| | | <third-maintenance-approval-modal ref="thirdMaintenanceApprovalModal" :selectShenpiData="selectedRowData" |
| | | @modalFormOk="modalFormOk"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@api/manage' |
| | | import MaintenanceStandardApprovalModal from './MaintenanceStandard/MaintenanceStandardApprovalModal' |
| | | import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' |
| | | import TechnicalStatusEvaluationApprovalModal |
| | | from './TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal' |
| | | import SecondMaintenanceApprovalModal from './secondMaintenance/SecondMaintenanceApprovalModal' |
| | | import ThirdMaintenanceApprovalModal from './thirdMaintenance/ThirdMaintenanceApprovalModal' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { TechnicalStatusEvaluationApprovalModal, InspectionOrderHandle, MaintenanceStandardApprovalModal }, |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | ThirdMaintenanceApprovalModal, |
| | | SecondMaintenanceApprovalModal, |
| | | TechnicalStatusEvaluationApprovalModal, |
| | | InspectionOrderHandle, |
| | | MaintenanceStandardApprovalModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '工作流-我的待办', |
| | |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | }, |
| | | getTableColumnsTotalWidth() { |
| | | return this.columns.reduce((total, item) => total + item.width, 0) |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | */ |
| | | handleTechnicalStatusEvaluation(record) { |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.technicalStatusApprovalModal.visible = true |
| | | this.$refs.technicalStatusApprovalModal.title = record.name |
| | | this.$refs.technicalStatusApprovalModal.handleDetail(record) |
| | | }, |
| | | |
| | | /** |
| | | * 点击二保流程执行审批时触发 |
| | | * @param record |
| | | */ |
| | | handleSecondMaintenance(record) { |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.secondMaintenanceApprovalModal.visible = true |
| | | this.$refs.secondMaintenanceApprovalModal.title = record.name |
| | | this.$refs.secondMaintenanceApprovalModal.handleDetail(record) |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 点击三保工单流程执行审批时触发 |
| | | * @param record |
| | | */ |
| | | handleThirdMaintenance(record) { |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.thirdMaintenanceApprovalModal.visible = true |
| | | this.$refs.thirdMaintenanceApprovalModal.handleDetail(record) |
| | | this.$refs.thirdMaintenanceApprovalModal.title = record.name |
| | | }, |
| | | |
| | | /** |
| | | * 点击设备维修分类流程执行审批时触发 |
| | | * @param record |
| | | */ |
| | |
| | | this.$refs.repairOrderApprovalModal.title = record.name |
| | | this.$refs.repairOrderApprovalModal.getAllApproveData(record) |
| | | this.$refs.repairOrderApprovalModal.getBasicInformation(record) |
| | | }, |
| | | handleSecondMaintenance(item) { |
| | | if (item && item.dataId) { |
| | | this.selectSecondMaintenanceData = Object.assign({}, item) |
| | | this.$refs.secondMaintenanceApprovalModal.handleDetail(item) |
| | | this.$refs.secondMaintenanceApprovalModal.title = item.name |
| | | this.$refs.secondMaintenanceApprovalModal.disableSubmit = false |
| | | } |
| | | }, |
| | | handleThirdMaintenance(item) { |
| | | if (item && item.dataId) { |
| | | this.selectThirdMaintenanceData = Object.assign({}, item) |
| | | this.$refs.thirdMaintenanceApprovalModal.handleDetail(item) |
| | | this.$refs.thirdMaintenanceApprovalModal.title = item.name |
| | | this.$refs.thirdMaintenanceApprovalModal.disableSubmit = false |
| | | } |
| | | }, |
| | | |
| | | batchHandle() { |
| | |
| | | <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="8" class="scroll-col"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="基础信息"> |
| | |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <!-- 中间明细项列--> |
| | | <a-col |
| | | :span="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION'?10:16" |
| | | class="scroll-col"> |
| | | |
| | | <a-tabs :active-key="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane :key="1" tab="安全装置检查" forceRender |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='safety_equipment_check'||selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='safety_equipment_check_confirm'||!Boolean(selectShenpiData.taskDefKey)"> |
| | | v-if="disableSubmit|| |
| | | selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='safety_equipment_check'||selectShenpiData.taskDefKey=='safety_equipment_check_confirm')|| |
| | | model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.safetyEquipmentCheckList.length>0"> |
| | | <j-vxe-table ref="editableDetailTable1" rowNumber bordered alwaysEdit keep-source :height="300" |
| | | :dataSource="detail.safetyEquipmentCheckList" |
| | | :columns="detail.safetyEquipmentCheckColumns"> |
| | | <template v-slot:safetyEquipmentCheckResult="props"> |
| | | <j-dict-select-tag v-model="props.row.safetyEquipmentCheckResult" |
| | | placeholder="请选择检查结果" |
| | | :disabled="disableSubmit||(model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')||(model.evaluationStatus=='UNDER_EVALUATION'&&selectShenpiData.taskDefKey=='safety_equipment_check_confirm')" |
| | | :disabled="disableSubmit|| |
| | | model.evaluationStatus!='UNDER_EVALUATION'|| |
| | | selectShenpiData.taskDefKey=='safety_equipment_check_confirm'" |
| | | @change="$refs['editableDetailTable'+activeTabKey].validateTable()" |
| | | dictCode="yes_no_none" style="width: 100%"/> |
| | | </template> |
| | |
| | | <a-form-model-item prop="safetyCheckConfirmResult" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.safetyCheckConfirmResult' |
| | | dictCode='approved_rejected' |
| | | placeholder="请选择确认类型"/> |
| | | :disabled="disableSubmit||selectShenpiData.taskDefKey!='safety_equipment_check_confirm'" |
| | | dictCode='approved_rejected'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.safetyCheckConfirmComment"/> |
| | | <a-textarea placeholder="请输入意见" v-model="model.safetyCheckConfirmComment" |
| | | :disabled="disableSubmit||selectShenpiData.taskDefKey!='safety_equipment_check_confirm'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="设备精度检查" forceRender |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='equipment_precision_check'||selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='equipment_precision_check_confirm'||!Boolean(selectShenpiData.taskDefKey)"> |
| | | v-if="disableSubmit|| |
| | | selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='equipment_precision_check'||selectShenpiData.taskDefKey=='equipment_precision_check_confirm')|| |
| | | model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.precisionCheckList.length>0"> |
| | | <j-vxe-table ref="editableDetailTable2" rowNumber bordered |
| | | alwaysEdit keep-source :height="300" |
| | | :dataSource="detail.precisionCheckList" :columns="detail.precisionCheckColumns"> |
| | | <template v-slot:precisionCheckResult="props"> |
| | | <a-input-number v-model="props.row.precisionCheckResult" |
| | | :disabled="disableSubmit||(model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')||(model.evaluationStatus=='UNDER_EVALUATION'&&selectShenpiData.taskDefKey=='equipment_precision_check_confirm')" |
| | | :disabled="disableSubmit|| |
| | | model.evaluationStatus!='UNDER_EVALUATION'|| |
| | | selectShenpiData.taskDefKey=='equipment_precision_check_confirm'" |
| | | @blur="$refs['editableDetailTable'+activeTabKey].validateTable()" |
| | | placeholder="请输入检查结果" style="width: 100%"/> |
| | | </template> |
| | |
| | | <a-form-model-item prop="precisionCheckConfirmResult" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.precisionCheckConfirmResult' |
| | | dictCode='approved_rejected' |
| | | placeholder="请选择确认类型"/> |
| | | :disabled="disableSubmit||selectShenpiData.taskDefKey!='equipment_precision_check_confirm'" |
| | | dictCode='approved_rejected'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="precisionCheckConfirmComment" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.precisionCheckConfirmComment"/> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.precisionCheckConfirmComment" |
| | | :disabled="disableSubmit||selectShenpiData.taskDefKey!='equipment_precision_check_confirm'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="3" tab="其他检查" forceRender |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='other_check'||selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='other_check_confirm'||!Boolean(selectShenpiData.taskDefKey)"> |
| | | v-if="disableSubmit|| |
| | | selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='other_check'||selectShenpiData.taskDefKey=='other_check_confirm')|| |
| | | model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.otherCheckList.length>0"> |
| | | <j-vxe-table ref="editableDetailTable3" rowNumber bordered |
| | | alwaysEdit keep-source :height="300" |
| | | :dataSource="detail.otherCheckList" :columns="detail.otherCheckColumns"> |
| | | <template v-slot:otherCheckResult="props"> |
| | | <a-textarea v-model="props.row.otherCheckResult" :rows="1" |
| | | :disabled="disableSubmit||(model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')||(model.evaluationStatus=='UNDER_EVALUATION'&&selectShenpiData.taskDefKey=='other_check_confirm')" |
| | | :disabled="disableSubmit||model.evaluationStatus!='UNDER_EVALUATION'||selectShenpiData.taskDefKey=='other_check_confirm'" |
| | | @blur="$refs['editableDetailTable'+activeTabKey].validateTable()" |
| | | placeholder="请输入检查结果" |
| | | :autoSize="false"/> |
| | |
| | | :wrapperCol="wrapperColLong" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.otherCheckConfirmResult' |
| | | dictCode='approved_rejected' |
| | | placeholder="请选择确认类型"/> |
| | | :disabled="disableSubmit||selectShenpiData.taskDefKey!='other_check_confirm'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="otherCheckConfirmComment" :labelCol="labelColLong" |
| | | :wrapperCol="wrapperColLong" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.otherCheckConfirmComment"/> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.otherCheckConfirmComment" |
| | | :disabled="disableSubmit||selectShenpiData.taskDefKey!='other_check_confirm'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='4' tab='流程图'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | <img :src="imageSrc" alt="Fetched Image" style="width: 100%"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-col :span="6" |
| | | <!--右侧审批列--> |
| | | <a-col :span="6" class="scroll-col" |
| | | v-if="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION'"> |
| | | <a-tabs> |
| | | <a-tabs v-if="displayRepairerFlag"> |
| | | <a-tab-pane tab="维修工确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="安全装置是否齐全" :labelCol="rightColLabelCol" |
| | | <a-form-model-item prop="safetyEquipmentCheckResult" label="安全装置是否齐全" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.safetyEquipmentCheckResult' dictCode='yn' |
| | | :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='REPAIRER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="设备功能是否齐全" :labelCol="rightColLabelCol" |
| | | <a-form-model-item prop="precisionCheckResult" label="设备功能是否齐全" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.precisionCheckResult' dictCode='yn' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='REPAIRER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="精度是否达到要求" :labelCol="rightColLabelCol" |
| | | <a-form-model-item prop="functionalCheckResult" label="精度是否达到要求" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.functionalCheckResult' dictCode='yes_no_none' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='REPAIRER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="检查是否合格" :labelCol="rightColLabelCol" |
| | | <a-form-model-item prop="otherCheckResult" label="其他检查是否合格" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.otherCheckResult' dictCode='yes_no_none' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='REPAIRER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs> |
| | | <a-tabs v-if="displayRepairLeaderFlag"> |
| | | <a-tab-pane tab="维修室主任确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.repairManagerSignatureResult' |
| | | dictCode='approved_rejected' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='REPAIR_MANAGER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="repairManagerComment" label="确认意见" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.repairManagerComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='REPAIR_MANAGER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs> |
| | | <a-tabs v-if="displayTechnicianFlag"> |
| | | <a-tab-pane tab="工艺员确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="sampleCheckResult" label="试件检查结果" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.sampleCheckResult' dictCode='yn' |
| | | :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='PROCESS_TECHNICIAN_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="processTechnicianComment" label="确认意见" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.processTechnicianComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='PROCESS_TECHNICIAN_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs> |
| | | <a-tabs v-if="displayTechnicalLeaderFlag"> |
| | | <a-tab-pane tab="使用单位技术主管确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | |
| | | :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.departTechnicalLeaderSignatureResult' |
| | | dictCode='approved_rejected' |
| | | :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='DEPART_TECHNICAL_LEADER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="departTechnicalLeaderComment" label="确认意见" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.departTechnicalLeaderComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='DEPART_TECHNICAL_LEADER_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs> |
| | | <a-tabs v-if="displayInspectorFlag"> |
| | | <a-tab-pane tab="设备检验员确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="evaluationResult" label="鉴定结果" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <j-dict-select-tag type='radio' v-model='model.evaluationResult' |
| | | dictCode='equipment_technology_status' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | dictCode='equipment_technology_status' @change="handleEvaluationResultChange" |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='INSPECTOR_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="evaluationReason" label="限/禁用原因" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <a-form-model-item prop="evaluationReason" |
| | | v-if="model.evaluationResult&&model.evaluationResult!='QUALIFIED'" label="限/禁用原因" |
| | | :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> |
| | | <j-select-multiple v-model='model.evaluationReason' |
| | | dictCode='technical_status_evaluation_result_reason' |
| | | placeholder="请选择限/禁用原因"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='INSPECTOR_SIGNING')" |
| | | dictCode='technical_status_evaluation_result_reason' placeholder="请选择限/禁用原因"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="inspectorComment" label="确认意见" :labelCol="rightColLabelCol" |
| | | :wrapperCol="rightColWrapperCol"> |
| | | <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.inspectorComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | :disabled="disableSubmit||(model.evaluationStatus&&model.evaluationStatus!='INSPECTOR_SIGNING')"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | imageSrc: null, |
| | | activeTabKey: 1, |
| | | validatorRules: { |
| | | safetyCheckConfirmResult: [ |
| | | { required: true, message: '请选择确认类型' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请输入确认意见!' } |
| | | ], |
| | | leaderConfirmComment: [ |
| | | { required: true, message: '请输入初验收意见!' } |
| | | ] |
| | | safetyCheckConfirmResult: [{ required: true, message: '请选择确认类型' }], |
| | | precisionCheckConfirmResult: [{ required: true, message: '请选择确认类型' }], |
| | | otherCheckConfirmResult: [{ required: true, message: '请选择确认类型' }], |
| | | safetyEquipmentCheckResult: [{ required: true, message: '请选择安全装置是否齐全' }], |
| | | precisionCheckResult: [{ required: true, message: '请选择设备功能是否齐全' }], |
| | | functionalCheckResult: [{ required: true, message: '请选择精度是否达到要求' }], |
| | | otherCheckResult: [{ required: true, message: '请选择其他检查是否合格' }], |
| | | repairManagerSignatureResult: [{ required: true, message: '请选择确认类型' }], |
| | | sampleCheckResult: [{ required: true, message: '请选择试件检查结果' }], |
| | | departTechnicalLeaderSignatureResult: [{ required: true, message: '请选择确认类型' }], |
| | | evaluationResult: [{ required: true, message: '请选择鉴定结果' }], |
| | | evaluationReason: [{ required: true, message: '请选择限/禁用原因' }] |
| | | }, |
| | | url: { |
| | | queryById: '/eam/eamTechnicalStatusEvaluationOrder/queryById', |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | confirmDisable: function() { |
| | | return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | displayRepairerFlag() { |
| | | return this.model.evaluationStatus && ['REPAIRER_SIGNING', 'REPAIR_MANAGER_SIGNING', 'PROCESS_TECHNICIAN_SIGNING', 'DEPART_TECHNICAL_LEADER_SIGNING', 'INSPECTOR_SIGNING', 'COMPLETED'].includes(this.model.evaluationStatus) |
| | | }, |
| | | inspectorConfirmDisable: function() { |
| | | return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | displayRepairLeaderFlag() { |
| | | return this.model.evaluationStatus && ['REPAIR_MANAGER_SIGNING', 'PROCESS_TECHNICIAN_SIGNING', 'DEPART_TECHNICAL_LEADER_SIGNING', 'INSPECTOR_SIGNING', 'COMPLETED'].includes(this.model.evaluationStatus) |
| | | }, |
| | | completionDisable: function() { |
| | | return ['COMPLETE'].includes(this.model.maintenanceStatus) |
| | | displayTechnicianFlag() { |
| | | return this.model.evaluationStatus && ['PROCESS_TECHNICIAN_SIGNING', 'DEPART_TECHNICAL_LEADER_SIGNING', 'INSPECTOR_SIGNING', 'COMPLETED'].includes(this.model.evaluationStatus) |
| | | }, |
| | | displayTechnicalLeaderFlag() { |
| | | return this.model.evaluationStatus && ['DEPART_TECHNICAL_LEADER_SIGNING', 'INSPECTOR_SIGNING', 'COMPLETED'].includes(this.model.evaluationStatus) |
| | | }, |
| | | displayInspectorFlag() { |
| | | return this.model.evaluationStatus && ['INSPECTOR_SIGNING', 'COMPLETED'].includes(this.model.evaluationStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | * @param record 主页面列表行记录 |
| | | */ |
| | | async handleDetail(record) { |
| | | this.initParams() |
| | | this.model = {} |
| | | this.visible = true |
| | | this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] |
| | | this.handleTabToFirstTable() |
| | | this.getBasicInformationByApi(record) |
| | | this.getFlowChartImageByApi(record) |
| | | let res = await getAction(this.url.queryById, { id: record.dataId }) |
| | | this.model = Object.assign({}, res.result) |
| | | this.model.dataId = record.dataId |
| | | this.model.taskId = record.id |
| | | this.model.userId = record.assignee |
| | | this.model.instanceId = record.procInstId |
| | | this.loadDetail(record.dataId) |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param record 主页面列表行记录 |
| | | */ |
| | | recordDetail(record) { |
| | | this.initParams() |
| | | this.visible = true |
| | | this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] |
| | | this.model = Object.assign({}, record) |
| | | this.handleTabToFirstTable() |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | /** |
| | | * 获取基础信息 |
| | | * @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 |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loadDetail(record.dataId) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | |
| | | //规范选择变化 |
| | | loadDetail(orderId) { |
| | | this.spinning = true |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.safetyEquipmentCheckList = res.result.filter(item => item.checkCategory == 'SAFETY_EQUIPMENT_CHECK') |
| | | this.detail.precisionCheckList = res.result.filter(item => item.checkCategory == 'PRECISION_CHECK') |
| | | this.detail.otherCheckList = res.result.filter(item => item.checkCategory == 'OTHER_CHECK') |
| | | this.handleTabToFirstTable() |
| | | } |
| | | }) |
| | | .finally(() => { |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 初始化数据 |
| | | initParams() { |
| | | this.model = {} |
| | | this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] |
| | | this.visible = true |
| | | this.spinning = true |
| | | // 切换tab至第一个表格 |
| | | handleTabToFirstTable() { |
| | | this.$nextTick(() => { |
| | | for (let index = 1; index <= 3; index++) { |
| | | if (this.$refs['editableDetailTable' + index]) { |
| | | console.log('index----------', index) |
| | | this.activeTabKey = index |
| | | return |
| | | break |
| | | } |
| | | } |
| | | }) |
| | |
| | | this.activeTabKey = tabKey |
| | | }, |
| | | |
| | | handleEvaluationResultChange(value) { |
| | | if (value == 'QUALIFIED') this.model.evaluationReason = '' |
| | | }, |
| | | |
| | | /** |
| | | * 自定义表格单元格校验 |
| | | * @param cellValue 单元格值 |
| | |
| | | @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-col :span="8"> |
| | | <a-row :gutter="24" id="outer-row"> |
| | | <a-col :span="8" class="scroll-col"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="基础信息"> |
| | | <a-row> |
| | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="操作工"> |
| | | <a-input v-model="model.operator_dicText" readOnly/> |
| | | <a-input v-model="model.operator_dictText" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="维修工"> |
| | | <a-input v-model="model.repairer_dicText" readOnly/> |
| | | <a-input v-model="model.repairman_dictText" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="maintenancePeriod" label="保养周期"> |
| | | <a-form-model-item label="保养周期"> |
| | | <a-input v-model="model.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-col |
| | | :span="model.maintenanceStatus!='WAIT_MAINTENANCE'&&model.maintenanceStatus!='UNDER_MAINTENANCE'?10:16"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="操作工"> |
| | | <a-col class="scroll-col" |
| | | :span="model.maintenanceStatus&&model.maintenanceStatus!='WAIT_MAINTENANCE'&&model.maintenanceStatus!='UNDER_MAINTENANCE'?10:16"> |
| | | <a-tabs :active-key="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane :key="1" tab="操作工" |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='operator_task'|| |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')"> |
| | | <j-vxe-table ref="editableDetailTable1" :rowNumber="false" rowSelection bordered |
| | | alwaysEdit keep-source :height="300" |
| | | :dataSource="detail.operatorMaintenanceList" :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange"> |
| | | @selectRowChange="handleTableSelectRowChange($event,'Operator')"> |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" |
| | | placeholder="请选择保养结果" :disabled="disableSubmit || confirmDisable" |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="maintenance_result" |
| | | placeholder="请选择保养结果" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')" |
| | | @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="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | <a-textarea :rows="1" :autoSize="false" v-model="props.row.exceptionDescription" |
| | | :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!='1'?'请输入异常描述':''" |
| | | :disabled="disableSubmit|| |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | !props.row.maintenanceResult || |
| | | props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" dictCode="yn" style="width: 100%" |
| | | :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!='1'?'请选择异常是否报修':''" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | !props.row.maintenanceResult || |
| | | props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key="2" tab="维修工"> |
| | | <a-tab-pane :key="2" tab="维修工" |
| | | v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='maintenance_task'|| |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')"> |
| | | <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered |
| | | alwaysEdit kee-source :height="300" |
| | | :dataSource="detail.repairerMaintenanceList" :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange"> |
| | | @selectRowChange="handleTableSelectRowChange($event,'Repairer')"> |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" |
| | | placeholder="请选择保养结果" :disabled="disableSubmit || confirmDisable" |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="maintenance_result" |
| | | placeholder="请选择保养结果" |
| | | :disabled="disableSubmit||(model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')" |
| | | @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="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | <a-textarea :rows="1" :autoSize="false" v-model="props.row.exceptionDescription" |
| | | :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!='1'?'请输入异常描述':''" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | !props.row.maintenanceResult || |
| | | props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | :placeholder="props.row.maintenanceResult&&props.row.maintenanceResult!='1'?'请选择异常是否报修':''" |
| | | dictCode="yn" style="width: 100%" |
| | | :disabled="disableSubmit|| |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | !props.row.maintenanceResult || |
| | | props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <a-button :disabled="disableSubmit ||confirmDisable||selectedRowKeys.length > 0" slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">批量保养正常 |
| | | <a-button |
| | | v-if="activeTabKey!=='3'" |
| | | :disabled="disableSubmit || |
| | | (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || |
| | | (activeTabKey=='1'&&selectedOperatorMaintenanceRowKeys.length == 0)|| |
| | | (activeTabKey=='2'&&selectedRepairerMaintenanceRowKeys.length == 0)" |
| | | slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">批量保养正常 |
| | | </a-button> |
| | | </a-tabs> |
| | | </a-col> |
| | | |
| | | <a-col :span="6" |
| | | v-if="model.maintenanceStatus!='WAIT_MAINTENANCE'&&model.maintenanceStatus!='UNDER_MAINTENANCE'"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="管理员确认" v-if="confirmDisable"> |
| | | <!--右侧审批列--> |
| | | <a-col :span="6" class="scroll-col" |
| | | v-if="model.maintenanceStatus&&model.maintenanceStatus!='WAIT_MAINTENANCE'&&model.maintenanceStatus!='UNDER_MAINTENANCE'"> |
| | | <a-tabs v-if="displayAdminConfirmFlag"> |
| | | <a-tab-pane tab="管理员确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approve_reject' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | <a-form-model-item prop="manageUserResult" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.manageUserResult' dictCode='approve_reject' |
| | | placeholder="请选择确认类型" |
| | | :disabled="disableSubmit || model.maintenanceStatus!='WAIT_ADMIN_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmComment" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.confirmComment" |
| | | :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | <a-form-model-item label="问题描述"> |
| | | <a-textarea placeholder="请描述问题" v-model='model.problemDescription' |
| | | :disabled="disableSubmit || model.maintenanceStatus!='WAIT_ADMIN_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="处理措施描述"> |
| | | <a-textarea placeholder="请描述处理措施" v-model="model.dealDescription" |
| | | :disabled="disableSubmit || model.maintenanceStatus!='WAIT_ADMIN_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs> |
| | | <a-tab-pane tab="检查人确认" v-if="inspectorConfirmDisable"> |
| | | <a-tabs v-if="displayInspectorConfirmFlag"> |
| | | <a-tab-pane tab="检查人确认"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="confirmDealType" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approve_reject' |
| | | placeholder="请选择确认类型" :disabled="disableSubmit || inspectorConfirmDisable"/> |
| | | <a-form-model-item prop="inspectorResult" label="确认类型"> |
| | | <j-dict-select-tag type='radio' v-model='model.inspectorResult' dictCode='approve_reject' |
| | | placeholder="请选择确认类型" |
| | | :disabled="disableSubmit || model.maintenanceStatus!='WAIT_INSPECTOR_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="leaderConfirmComment" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.leaderConfirmComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | <a-form-model-item label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.inspectConfirmComment" |
| | | :disabled="disableSubmit || model.maintenanceStatus!='WAIT_INSPECTOR_CONFIRM'"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | imageSrc: null, |
| | | activeTabKey: '1', |
| | | activeTabKey: 1, |
| | | validatorRules: { |
| | | confirmDealType: [ |
| | | { required: true, message: '请选择通过或驳回!' } |
| | | ], |
| | | confirmComment: [ |
| | | { required: true, message: '请输入确认意见!' } |
| | | ], |
| | | leaderConfirmComment: [ |
| | | { required: true, message: '请输入初验收意见!' } |
| | | ] |
| | | manageUserResult: [{ required: true, message: '请选择确认类型' }], |
| | | inspectorResult: [{ required: true, message: '请选择确认类型' }] |
| | | }, |
| | | url: { |
| | | queryById: '/eam/secondMaintenanceOrder/queryById', |
| | | queryById: '/eam/secondMaintenanceOrder/list', |
| | | detail: '/eam/secondMaintenanceOrderDetail/queryList', |
| | | approval: '/eam/secondMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | diagramView: '/assign/flow/diagramView' |
| | | }, |
| | | disableSubmit: false, |
| | | taskData: [], |
| | | selectedRowKeys: [], |
| | | selectedOperatorMaintenanceRowKeys: [], |
| | | selectedRepairerMaintenanceRowKeys: [], |
| | | detail: { |
| | | operatorMaintenanceList: [], |
| | | repairerMaintenanceList: [], |
| | |
| | | align: 'center', |
| | | slotName: 'maintenanceResult', |
| | | validateRules: [ |
| | | { required: true, message: '保养结果不能为空!' } |
| | | { required: true, message: '请选择${title}' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | confirmDisable: function() { |
| | | displayAdminConfirmFlag() { |
| | | return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | inspectorConfirmDisable: function() { |
| | | displayInspectorConfirmFlag() { |
| | | return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | completionDisable: function() { |
| | | return ['COMPLETE'].includes(this.model.maintenanceStatus) |
| | | } |
| | | }, |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.initParams() |
| | | /** |
| | | * 主页面点击执行审批时触发 |
| | | * @param record 主页面列表行记录 |
| | | */ |
| | | async handleDetail(record) { |
| | | this.model = {} |
| | | 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.model.dataId = item.dataId |
| | | this.model.taskId = item.id |
| | | this.model.userId = item.assignee |
| | | this.model.instanceId = item.procInstId |
| | | this.model.values = item.variables |
| | | await this.loadDetail(item.dataId) |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | | this.handleTabToFirstTable() |
| | | this.getBasicInformationByApi(record) |
| | | this.getFlowChartImageByApi(record) |
| | | this.loadDetail(record.dataId) |
| | | }, |
| | | |
| | | /** |
| | | * 主页面点击详情时触发 |
| | | * @param record 主页面列表行记录 |
| | | */ |
| | | recordDetail(record) { |
| | | console.log('record', record) |
| | | this.initParams() |
| | | this.activeTabKey = 1 |
| | | this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] |
| | | this.model = Object.assign({}, record) |
| | | this.loadDetail(record.id) |
| | | }, |
| | | |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.activeTabKey = '1' |
| | | /** |
| | | * 获取基础信息 |
| | | * @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.records[0]) |
| | | 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 |
| | | |
| | | 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 |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('数据校验失败!') |
| | | return |
| | | |
| | | let errMap |
| | | if (that.$refs['editableDetailTable' + that.activeTabKey]) { |
| | | // 校验当前tab表格 |
| | | errMap = await that.$refs['editableDetailTable' + that.activeTabKey].validateTable() |
| | | } else { |
| | | // 当前tab不是表格时则校验有表格的 |
| | | for (let index = 1; index <= 2; index++) { |
| | | if (that.$refs['editableDetailTable' + index]) { |
| | | errMap = await that.$refs['editableDetailTable' + index].validateTable() |
| | | if (errMap) { |
| | | that.activeTabKey = index |
| | | console.log('that.activeTabKey-----------', that.activeTabKey) |
| | | that.$refs['editableDetailTable' + that.activeTabKey].clearValidate() |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: '保养不能为空' |
| | | }) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (errMap) return |
| | | |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | let tableData = that.$refs.editableDetailTable.getTableData() |
| | | that.model.tableDetailList = [...tableData] |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('searchReset') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // 仅在保养中状态传递表格列表 |
| | | if (this.model.maintenanceStatus == 'UNDER_MAINTENANCE') { |
| | | for (let index = 1; index <= 2; index++) { |
| | | if (that.$refs['editableDetailTable' + index]) { |
| | | this.model.tableDetailList = that.$refs['editableDetailTable' + index].getTableData() |
| | | break |
| | | } |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } |
| | | console.log('model', this.model.tableDetailList) |
| | | |
| | | httpAction(this.url.approval, this.model, 'put') |
| | | .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, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | if (!this.model.id) this.loadStandardDetail(selectObj.id) |
| | | this.spinning = false |
| | | }, |
| | | |
| | | /** |
| | | * 检查明细标签切换时触发 |
| | | * @param tabKey 切换后的tabKey |
| | | */ |
| | | handleTabChange(tabKey) { |
| | | if (this.$refs['editableDetailTable' + this.activeTabKey]) this.$refs['editableDetailTable' + this.activeTabKey].clearValidate() |
| | | this.activeTabKey = tabKey |
| | | }, |
| | | |
| | | // 切换tab至第一个表格 |
| | | handleTabToFirstTable() { |
| | | this.$nextTick(() => { |
| | | console.log('taskDefKey', this.selectShenpiData.taskDefKey) |
| | | if ((this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey == 'operator_task') || !this.selectShenpiData.taskDefKey) this.activeTabKey = 1 |
| | | else if (this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey == 'maintenance_task') this.activeTabKey = 2 |
| | | }) |
| | | }, |
| | | |
| | | //规范选择变化 |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory == 'OPERATOR_MAINTENANCE') |
| | | this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory == 'REPAIRER_MAINTENANCE') |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.spinning = false |
| | | }) |
| | | } |
| | | this.spinning = true |
| | | getAction(this.url.detail, { orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory == 'OPERATOR_MAINTENANCE') |
| | | this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory == 'REPAIRER_MAINTENANCE') |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleInspectionResultSelectChange(value, record) { |
| | |
| | | |
| | | // 批量选择所有点检结果 |
| | | handleSelectAllInspectionResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail.dataSource.find(item => item.id === key) |
| | | let selectedRowKeys, prefix |
| | | if (this.activeTabKey == 1) { |
| | | selectedRowKeys = this.selectedOperatorMaintenanceRowKeys |
| | | prefix = 'operator' |
| | | } |
| | | else if (this.activeTabKey == 2) { |
| | | selectedRowKeys = this.selectedRepairerMaintenanceRowKeys |
| | | prefix = 'repairer' |
| | | } |
| | | else selectedRowKeys = [] |
| | | if (selectedRowKeys.length == 0) return |
| | | |
| | | selectedRowKeys.forEach(key => { |
| | | const dataItem = this.detail[prefix + 'MaintenanceList'].find(item => item.id === key) |
| | | if (dataItem && dataItem.maintenanceResult !== '1') { |
| | | console.log('dataItem', dataItem) |
| | | delete dataItem.exceptionDescription |
| | | delete dataItem.reportFlag |
| | | dataItem.maintenanceResult = '1' |
| | | } |
| | | }) |
| | | this.$refs.editableDetailTable.clearCheckboxRow() |
| | | this.selectedRowKeys = [] |
| | | this.$refs['editableDetailTable' + this.activeTabKey].clearCheckboxRow() |
| | | this['selected' + prefix.charAt(0).toUpperCase() + prefix.slice(1) + 'MaintenanceRowKeys'] = [] |
| | | }, |
| | | |
| | | /** |
| | | * 表格多选框发生改变时触发 |
| | | * @param {selectedRowIds} 表格中已选择的ID列表 |
| | | * @param key 二保区分key |
| | | */ |
| | | handleTableSelectRowChange({ selectedRowIds }) { |
| | | this.selectedRowKeys = selectedRowIds |
| | | handleTableSelectRowChange({ selectedRowIds }, key) { |
| | | this[`selected${key}MaintenanceRowKeys`] = selectedRowIds |
| | | }, |
| | | |
| | | /** |
| | | * 自定义校验 |
| | | * @param cellValue 输入值 |
| | | * @param row 表格行记录 |
| | | * @param callback 结果回调函数 |
| | | */ |
| | | customValidator({ cellValue, row }, callback) { |
| | | if (row.maintenanceResult === '2') { |
| | | if (!cellValue) { |
| | | callback(false, '${title}不能为空!') // false = 未通过,可以跟自定义提示 |
| | | callback(false, '${title}不能为空') // false = 未通过,可以跟自定义提示 |
| | | } else { |
| | | callback(true) // true = 通过验证 |
| | | } |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-select-dropdown-menu { |
| | | text-align: left; |
| | | } |
| | | |
| | | /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> |
| | |
| | | <template> |
| | | <j-modal :title="title" :visible="visible" :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" fullscreen @ok="handleOk" @cancel="handleCancel" |
| | | centered cancelText="关闭"> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | 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-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 保养基础信息 |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="8"> |
| | | <a-tabs> |
| | | <a-tab-pane tab="基础信息"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="工单号"> |
| | | <a-input v-model="model.orderNum" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="统一编码"> |
| | | <maintenance-equipment-select v-model="model.equipmentId" maintenanceCategory="SECOND_MAINTENANCE" |
| | | @autocompleteForm="autocompleteForm" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="规范名称"> |
| | | <a-input v-model="model.standardName" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="保养日期"> |
| | | <a-input v-model="model.maintenanceDate" 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.operator" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="保养周期"> |
| | | <a-input v-model="model.maintenancePeriod" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="备注"> |
| | | <a-textarea v-model="model.remark" readOnly/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="工单号"> |
| | | <a-input placeholder="工单号系统自动生成" v-model="model.orderNum" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="10"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="保养项明细" v-if="!isPrecisionCheck"> |
| | | <j-vxe-table ref="editableDetailTable" :rowNumber="false" :rowSelection="true" :bordered="true" |
| | | :alwaysEdit="true" :toolbar="false" keep-source :height="300" :loading="detail.loading" |
| | | :dataSource="detail.dataSource" :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange"> |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" |
| | | placeholder="请选择保养结果" |
| | | :disabled="disableSubmit || confirmDisable" |
| | | @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="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='流程图'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-button :disabled="disableSubmit ||confirmDisable||selectedRowKeys.length > 0" slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">批量保养正常 |
| | | </a-button> |
| | | </a-tabs> |
| | | <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></maintenance-equipment-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="6"> |
| | | <a-tabs v-if="confirmDisable"> |
| | | <a-tab-pane tab="确认"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="confirmComment" |
| | | label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.confirmComment" |
| | | :disabled="disableSubmit || leaderConfirmDisable"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <a-tabs v-if="leaderConfirmDisable"> |
| | | <a-tab-pane tab="领导确认"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="leaderConfirmComment" |
| | | label="领导意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.leaderConfirmComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | </a-form-model-item> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="标准名称"> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.standardName" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <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" |
| | | 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="请选择保养人" disabled |
| | | :dictOptions="maintenanceOperatorOptions"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="保养周期"> |
| | | <a-input placeholder="选择设备后自动带出" v-model="model.maintenancePeriod" disabled/> |
| | | </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" disabled/> |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="保养图片"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="true" |
| | | file-type="image" |
| | | :disabled="confirmDisable" |
| | | :number="3" |
| | | v-model="model.imageFilesResult"/> |
| | | </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"> |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane key="1" tab="保养项明细" v-if="!isPrecisionCheck"> |
| | | <j-vxe-table |
| | | ref="editableDetailTable" |
| | | :rowNumber="false" |
| | | :rowSelection="true" |
| | | :bordered="true" |
| | | :alwaysEdit="true" |
| | | :toolbar="false" |
| | | keep-source |
| | | :height="300" |
| | | :loading="detail.loading" |
| | | :dataSource="detail.dataSource" |
| | | :columns="detail.columns" |
| | | @selectRowChange="handleTableSelectRowChange" |
| | | > |
| | | <template v-slot:maintenanceResult="props"> |
| | | <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" |
| | | placeholder="请选择保养结果" |
| | | :disabled="disableSubmit || confirmDisable" |
| | | @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="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> |
| | | </template> |
| | | |
| | | <template v-slot:reportFlag="props"> |
| | | <j-dict-select-tag v-model="props.row.reportFlag" |
| | | :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" |
| | | dictCode="yn" |
| | | style="width: 100%"/> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | <!-- <a-tab-pane key='4' tab='精度检验' v-if="!isMaintenance">--> |
| | | <!-- <j-vxe-table--> |
| | | <!-- ref="editablePrecisionDetailTable"--> |
| | | <!-- :rowNumber="true"--> |
| | | <!-- :rowSelection="true"--> |
| | | <!-- :bordered="true"--> |
| | | <!-- :alwaysEdit="true"--> |
| | | <!-- :toolbar="false"--> |
| | | <!-- :toolbarConfig="precisionDetail.toolbarConfig"--> |
| | | <!-- keep-source--> |
| | | <!-- :height="300"--> |
| | | <!-- :dataSource="precisionDetail.dataSource"--> |
| | | <!-- :columns="precisionDetail.columns"--> |
| | | <!-- style="margin-top: 8px;" >--> |
| | | <!-- <template v-slot:actualValue="props">--> |
| | | <!-- <a-input-number v-model="props.row.actualValue" :disabled="disableSubmit || confirmDisable" style="width: 100%" />--> |
| | | <!-- </template>--> |
| | | <!-- </j-vxe-table>--> |
| | | <!-- </a-tab-pane>--> |
| | | <template v-if="selectShenpiData.procInstId"> |
| | | <a-tab-pane key='2' tab='流程节点'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in taskData" :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-tab-pane key='3' tab='流程图'> |
| | | <img :src="imageSrc" alt="Fetched Image"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" |
| | | type="primary" @click="handleSelectAllInspectionResult">保养正常 |
| | | </a-button> |
| | | </a-tabs> |
| | | </a-row> |
| | | <div v-if="confirmDisable"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 机动办确认信息 |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="confirmComment" label="确认意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.confirmComment" |
| | | :disabled="disableSubmit || leaderConfirmDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <div v-if="leaderConfirmDisable"> |
| | | <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 领导确认信息 |
| | | </a-divider> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="leaderConfirmComment" |
| | | label="领导意见"> |
| | | <a-textarea placeholder="请输入意见" v-model="model.leaderConfirmComment" |
| | | :disabled="disableSubmit || completionDisable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | |
| | | return { |
| | | title: '操作', |
| | | visible: false, |
| | | //状态控制 |
| | | //保养中 不可编辑 |
| | | // confirmDisable: false, |
| | | // initialAcceptanceDisable: false, |
| | | // finalAcceptanceDisable: false, |
| | | editable: false, |
| | | model: {}, |
| | | maintenanceCategory: 'SECOND_MAINTENANCE', |
| | | maintenanceOperatorOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 3 } |
| | | sm: { span: 2 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 20 } |
| | | sm: { span: 21 } |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | |
| | | ], |
| | | leaderConfirmComment: [ |
| | | { required: true, message: '请输入初验收意见!' } |
| | | ] |
| | | ], |
| | | }, |
| | | url: { |
| | | queryById: '/eam/thirdMaintenanceOrder/queryById', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | approval: '/eam/thirdMaintenanceOrder/approval', |
| | | userSelect: '/eam/user_select/list', |
| | | queryHisTaskList: '/assign/flow/queryHisTaskList', |
| | | diagramView: '/assign/flow/diagramView' |
| | | diagramView: '/assign/flow/diagramView', |
| | | // precisionCheckDetail: '/eam/precisionCheckDetail/queryList', |
| | | }, |
| | | disableSubmit: false, |
| | | taskData: [], |
| | | isDisplayBmp: false, |
| | | showBmpButtonLoading: false, |
| | | selectedRowKeys: [], |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | |
| | | title: '序号', |
| | | key: 'itemCode', |
| | | type: JVXETypes.normal, |
| | | width: 60, |
| | | width: '5%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '保养部位', |
| | | key: 'itemPart', |
| | | type: JVXETypes.normal, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '保养内容', |
| | | title: '保养项', |
| | | key: 'itemName', |
| | | type: JVXETypes.normal, |
| | | width: '10%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '验收标准', |
| | | title: '保养要求', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.normal, |
| | | width: '20%', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '保养结果', |
| | | key: 'maintenanceResult', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'maintenanceResult', |
| | | validateRules: [ |
| | |
| | | title: '异常描述', |
| | | key: 'exceptionDescription', |
| | | type: JVXETypes.slot, |
| | | width: '20%', |
| | | align: 'center', |
| | | slotName: 'exceptionDescription', |
| | | validateRules: [ |
| | |
| | | title: '是否报修', |
| | | key: 'reportFlag', |
| | | type: JVXETypes.slot, |
| | | width: '10%', |
| | | align: 'center', |
| | | slotName: 'reportFlag', |
| | | validateRules: [ |
| | | { handler: this.customValidator } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | toolbarConfig: { |
| | | // prefix 前缀;suffix 后缀 |
| | | slot: ['prefix', 'suffix'], |
| | | // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
| | | btn: ['clearSelection'] |
| | | } |
| | | }, |
| | | // precisionDetail: { |
| | | // loading: false, |
| | | // dataSource: [], |
| | | // columns: [ |
| | | // { |
| | | // title: 'ID', |
| | | // key: 'id', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'orderId', |
| | | // key: 'orderId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'equipmentId', |
| | | // key: 'equipmentId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: 'parameterId', |
| | | // key: 'parameterId', |
| | | // type: JVXETypes.hidden |
| | | // }, |
| | | // { |
| | | // title: '检测项目', |
| | | // key: 'parameterId_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '25%', |
| | | // align: 'center' |
| | | // }, |
| | | // { |
| | | // title: '参数编码', |
| | | // key: 'parameterCode_dictText', |
| | | // type: JVXETypes.normal, |
| | | // width: '20%', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: '允差值', |
| | | // key: 'parameterValue', |
| | | // type: JVXETypes.normal, |
| | | // width: '15%', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: '实测值', |
| | | // key: 'actualValue', |
| | | // type: JVXETypes.slot, |
| | | // width: '15%', |
| | | // align: 'center', |
| | | // slotName: 'actualValue', |
| | | // validateRules: [ |
| | | // { required: true, message: '请输入实测值!' } |
| | | // ] |
| | | // } |
| | | // ], |
| | | // toolbarConfig: { |
| | | // // prefix 前缀;suffix 后缀 |
| | | // slot: ['prefix', 'suffix'], |
| | | // // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
| | | // btn: ['add', 'remove', 'clearSelection'] |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | confirmDisable: function() { |
| | |
| | | return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus) |
| | | }, |
| | | isMaintenance: function() { |
| | | return this.selectShenpiData && this.selectShenpiData.taskDefKey === 'maintenance_execution' |
| | | return this.selectShenpiData && this.selectShenpiData.taskDefKey === 'maintenance_execution'; |
| | | }, |
| | | isPrecisionCheck: function() { |
| | | return this.selectShenpiData && this.selectShenpiData.taskDefKey === 'precision_check' |
| | | } |
| | | return this.selectShenpiData && this.selectShenpiData.taskDefKey === 'precision_check'; |
| | | }, |
| | | }, |
| | | methods: { |
| | | async handleDetail(item) { |
| | | this.initParams() |
| | | //重新计算defaultKey |
| | | if(item && item.taskDefKey === 'precision_check') { |
| | | this.activeTabKey = '4'; |
| | | } |
| | | this.model = {} |
| | | if (item.procInstId) { |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey } = item |
| | | const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item |
| | | |
| | | let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId }) |
| | | this.taskData = [...taskDataList.result] |
| | | |
| | | downFile(this.url.diagramView, { |
| | | processDefinitionId, |
| | |
| | | } |
| | | let res = await getAction(this.url.queryById, { id: item.dataId }) |
| | | this.model = Object.assign({}, res.result) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | this.model.dataId = item.dataId |
| | | this.model.taskId = item.id |
| | | this.model.userId = item.assignee |
| | | this.model.instanceId = item.procInstId |
| | | this.model.values = item.variables |
| | | await this.loadDetail(item.dataId) |
| | | // await this.loadPrecisionDetail(item.dataId); |
| | | }, |
| | | |
| | | recordDetail(record) { |
| | | console.log('record', record) |
| | | this.initParams() |
| | | this.model = Object.assign({}, record) |
| | | if (this.model.imageFiles) { |
| | | let obj = JSON.parse(this.model.imageFiles) |
| | | this.model.imageFilesResult = [...obj] |
| | | } |
| | | this.loadDetail(record.id) |
| | | this.loadPrecisionDetail(record.id); |
| | | }, |
| | | initParams() { |
| | | this.detail.dataSource = [] |
| | | this.visible = true |
| | | this.activeTabKey = '1' |
| | | this.activeTabKey = '1'; |
| | | if(this.selectShenpiData && this.selectShenpiData.taskDefKey === 'precision_check') { |
| | | this.activeTabKey = '4'; |
| | | } |
| | | this.spinning = true |
| | | }, |
| | | |
| | | async handleOk() { |
| | | const that = this |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('数据校验失败!') |
| | | return |
| | | if(that.$refs.editableDetailTable) { |
| | | let errMap = await that.$refs.editableDetailTable.validateTable() |
| | | if (errMap) { |
| | | this.$message.warning('数据校验失败!') |
| | | return |
| | | } |
| | | } |
| | | |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = that.spinning = true |
| | | that.model.tableDetailList = that.$refs.editableDetailTable.getTableData() |
| | | let tableData = []; |
| | | let precisionTableData = []; |
| | | if(that.$refs.editableDetailTable) { |
| | | tableData = that.$refs.editableDetailTable.getTableData() |
| | | } |
| | | if(that.$refs.editablePrecisionDetailTable) { |
| | | precisionTableData = that.$refs.editablePrecisionDetailTable.getTableData() |
| | | } |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.precisionDetailList = [...precisionTableData] |
| | | let httpurl = this.url.approval |
| | | let method = 'put' |
| | | |
| | | httpAction(this.url.approval, this.model, 'put').then((res) => { |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('searchReset') |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | autocompleteForm(selectObj) { |
| | | this.$set(this.model, 'standardName', selectObj.standardName) |
| | | this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) |
| | | this.$set(this.model, 'standardId', selectObj.id) |
| | | this.$set(this.model, 'equipmentId', selectObj.equipmentId) |
| | | // console.log('model', this.model) |
| | | if (!this.model.id) { |
| | | this.loadStandardDetail(selectObj.id) |
| | | } |
| | | this.loadMaintenanceOperatorList(this.model.equipmentId) |
| | | }, |
| | | //规范选择变化 |
| | | //标准选择变化 |
| | | loadDetail(orderId) { |
| | | if (orderId) { |
| | | getAction(this.url.detail, { orderId }) |
| | | getAction(this.url.detail, { orderId: orderId }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | |
| | | }) |
| | | } |
| | | }, |
| | | // loadPrecisionDetail(orderId) { |
| | | // if (orderId) { |
| | | // getAction(this.url.precisionCheckDetail, { orderId: orderId }).then(res => { |
| | | // if (res.success) { |
| | | // this.precisionDetail.dataSource = [...res.result] |
| | | // } |
| | | // }) |
| | | // } |
| | | // }, |
| | | loadMaintenanceOperatorList(equipmentId) { |
| | | this.maintenanceOperatorOptions = [] |
| | | let params = { positionCode: 'PCR0001' } |
| | | if (equipmentId) { |
| | | params.equipmentId = equipmentId |
| | | } |
| | | getAction(this.url.userSelect, params).then(res => { |
| | | if (res.success) { |
| | | this.maintenanceOperatorOptions = res.result.map(item => ({ |
| | | key: item.id, |
| | | value: item.username, |
| | | text: item.realname |
| | | })) |
| | | } |
| | | }) |
| | | }, |
| | | handleInspectionResultSelectChange(value, record) { |
| | | if (record.exceptionDescription) delete record.exceptionDescription |
| | | if (record.reportFlag) delete record.reportFlag |
| | | }, |
| | | |
| | | // 批量选择所有点检结果 |
| | | handleSelectAllInspectionResult() { |
| | | this.selectedRowKeys.forEach(key => { |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
| | |
| | | validatorRules:{ |
| | | username:[{required: true, message: '请输入用户账号!'}, |
| | | {validator: this.validateUsername,}], |
| | | password: [{required: true,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message: '密码由8位数字、大小写字母和特殊符号组成!'}, |
| | | {validator: this.validateToNextPassword,trigger: 'change'}], |
| | | // password: [{required: true,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message: '密码由8位数字、大小写字母和特殊符号组成!'}, |
| | | // {validator: this.validateToNextPassword,trigger: 'change'}], |
| | | confirmpassword: [{required: true, message: '请重新输入登录密码!',}, |
| | | { validator: this.compareToFirstPassword,}], |
| | | realname:[{ required: true, message: '请输入用户名称!' }], |
| | |
| | | confirmLoading: false, |
| | | confirmDirty: false, |
| | | validatorRules:{ |
| | | password:{ |
| | | rules: [{ |
| | | required: true, |
| | | pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | message: '密码由8位数字、大小写字母和特殊符号组成!' |
| | | }, { |
| | | validator: this.validateToNextPassword, |
| | | }], |
| | | }, |
| | | // password:{ |
| | | // rules: [{ |
| | | // required: true, |
| | | // pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | // message: '密码由8位数字、大小写字母和特殊符号组成!' |
| | | // }, { |
| | | // validator: this.validateToNextPassword, |
| | | // }], |
| | | // }, |
| | | confirmpassword:{ |
| | | rules: [{ |
| | | required: true, message: '请重新输入登录密码!', |
| | |
| | | <a-form-item label="岗位名称"> |
| | | <j-input placeholder="请输入岗位名称" v-model="queryParam.name"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col |
| | | <a-col :md="6" :sm="8"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | |
| | | align: 'center', |
| | | dataIndex: 'name' |
| | | }, |
| | | { |
| | | title: '备注', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | // { |
| | | // title: '职级', |
| | | // align: 'center', |
| | |
| | | confirmLoading: false, |
| | | confirmDirty: false, |
| | | validatorRules:{ |
| | | password:{ |
| | | rules: [{ |
| | | required: true, |
| | | pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | message: '密码由8位数字、大小写字母和特殊符号组成!' |
| | | }, { |
| | | validator: this.validateToNextPassword, |
| | | }], |
| | | }, |
| | | // password:{ |
| | | // rules: [{ |
| | | // required: true, |
| | | // pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | // message: '密码由8位数字、大小写字母和特殊符号组成!' |
| | | // }, { |
| | | // validator: this.validateToNextPassword, |
| | | // }], |
| | | // }, |
| | | confirmpassword:{ |
| | | rules: [{ |
| | | required: true, message: '请重新输入登录密码!', |
| | |
| | | label="岗位名称"> |
| | | <a-input placeholder="请输入岗位名称" v-model="model.name" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="remark" |
| | | label="备注"> |
| | | <a-input placeholder="请输入备注" v-model="model.remark" /> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </a-modal> |
| | |
| | | validatorRules: { |
| | | username: [{ required: true, message: '请输入用户账号!' }, |
| | | { validator: this.validateUsername }], |
| | | password: [{ |
| | | required: true, |
| | | pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | message: '密码由8位数字、大小写字母和特殊符号组成!' |
| | | }, |
| | | { validator: this.validateToNextPassword, trigger: 'change' }], |
| | | // password: [{ |
| | | // required: true, |
| | | // pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, |
| | | // message: '密码由8位数字、大小写字母和特殊符号组成!' |
| | | // }, |
| | | // { validator: this.validateToNextPassword, trigger: 'change' }], |
| | | confirmpassword: [{ required: true, message: '请重新输入登录密码!' }, |
| | | { validator: this.compareToFirstPassword }], |
| | | realname: [{ required: true, message: '请输入用户名称!' }], |
| | |
| | | loading: false, |
| | | accountName: this.userList.username, |
| | | validatorRules: { |
| | | password: [{ |
| | | required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!!' |
| | | }], |
| | | // password: [{ |
| | | // required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!!' |
| | | // }], |
| | | confirmPassword: [ |
| | | { required: true, message: '密码不能为空!'}, |
| | | { validator: this.handlePasswordCheck} |