art: 设备管理-三保-列表、新增修改,增加精度参数明细项
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:secondMaintenance:edit')"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> |
| | | <a @click="handleEdit(record)" v-if="isShowAuth('eam:thirdMaintenance:edit')">编辑</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-divider type="vertical" v-if="isShowAuth('eam:thirdMaintenance:edit')" /> |
| | | |
| | | <a-popconfirm title="确定领取吗?" @confirm="() => handlerCollect(record.id)"> |
| | | <a-popconfirm title="确定领取吗?" @confirm="() => handlerCollect(record.id)" v-if="isShowAuth('eam:thirdMaintenance:collect')"> |
| | | <a>领取</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-divider type="vertical" v-if="isShowAuth('eam:thirdMaintenance:collect')" /> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-menu-item v-if="isShowAuth('eam:thirdMaintenance:abolish')"> |
| | | <a-popconfirm title="确定作废吗?" @confirm="() => handlerAbolish(record.id)"> |
| | | <a>作废</a> |
| | | </a-popconfirm> |
| | |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: '精度检验人', |
| | | align: 'center', |
| | | dataIndex: 'precisionChecker_dictText' |
| | | }, |
| | | { |
| | | title: '精度检验时间', |
| | | align: 'center', |
| | | dataIndex: 'precisionCheckTime' |
| | | }, |
| | | { |
| | | title: '保养状态', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceStatus_dictText' |
| | |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: '机动办确认', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '机动办确认时间', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '机动办意见', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '确认领导', |
| | | align: 'center', |
| | | dataIndex: 'confirmLeader_dictText', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '领导确认时间', |
| | | align: 'center', |
| | | dataIndex: 'leaderConfirmTime', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '领导意见', |
| | | align: 'center', |
| | | dataIndex: 'leaderConfirmComment', |
| | | width: 60 |
| | | }, |
| | | { |
| | | title: '备注', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | |
| | | </a-form-model-item> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-spin :spinning="detail.loading"> |
| | | <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-spin> |
| | | <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-tab-pane key="2" tab="精度参数" :forceRender="true"> |
| | | <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;" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | |
| | | }, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | activeTabKey: '1', |
| | | maintenanceOperatorOptions: [], |
| | | validatorRules: { |
| | | equipmentId: [ |
| | | { required: true, message: '请选择设备!' } |
| | |
| | | edit: '/eam/thirdMaintenanceOrder/edit', |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list' |
| | | userSelect: '/eam/user_select/list', |
| | | precisionDetail: '/eam/equipmentPrecisionParameters/queryList', |
| | | precisionCheckDetail: '/eam/precisionCheckDetail/queryList', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | |
| | | // 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'] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.initParams(); |
| | | //初始化默认值 |
| | | this.model = {} |
| | | this.visible = 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') |
| | |
| | | let removeData = that.$refs.editableDetailTable.getDeleteData() |
| | | that.model.tableDetailList = [...tableData] |
| | | that.model.removeDetailList = [...removeData] |
| | | |
| | | let precisionDetailList = that.$refs.editablePrecisionDetailTable.getTableData() |
| | | let removePrecisionDetailList = that.$refs.editablePrecisionDetailTable.getDeleteData() |
| | | that.model.precisionDetailList = [...precisionDetailList] |
| | | that.model.removePrecisionDetailList = [...removePrecisionDetailList] |
| | | |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | |
| | | 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) |
| | | }, |
| | |
| | | .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> |