| | |
| | | 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="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 /> |
| | |
| | | :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> |
| | |
| | | standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', |
| | | detail: '/eam/thirdMaintenanceOrderDetail/queryList', |
| | | userSelect: '/eam/user_select/list', |
| | | precisionDetail: '/eam/equipmentPrecisionParameters/queryList', |
| | | precisionCheckDetail: '/eam/precisionCheckDetail/queryList', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | |
| | | 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'] |
| | | } |
| | | } |
| | | // 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() { |
| | |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | | this.loadDetail(record.id) |
| | | this.loadPrecisionDetail(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 (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] |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 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.precisionDetail.dataSource = [] |
| | | this.activeTabKey = '1' |
| | | }, |
| | | } |