| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="对象部门" |
| | | label="使用部门" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <!-- <j-dict-select-tag |
| | | allow-clear |
| | | <!-- <a-input-search |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择对象部门'" |
| | | :triggerChange="true" |
| | | dictCode="mom_eam_equipment,use_id,id,status!='0' and del_flag!='1' and use_id!='null'" |
| | | v-decorator="['useId', validatorRules.useId]" |
| | | /> --> |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | placeholder="请选择对象部门" |
| | | placeholder="请选择使用部门" |
| | | enter-button |
| | | @search="onDepartList()" |
| | | :read-only="true" |
| | | v-decorator="['useDepartName', validatorRules.useDepartName]" |
| | | /> |
| | | <a-tree-select |
| | | style="width: 100%" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | :tree-data="treeData" |
| | | placeholder="请选择使用部门" |
| | | tree-default-expand-all |
| | | v-decorator="['useId', validatorRules.useId ]" |
| | | />--> |
| | | |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择使用部门'" |
| | | :triggerChange="true" |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-decorator="['useId', {}]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请输入设备编码/名称/型号'" |
| | | :placeholder="disableSubmit?'':'请输入统一编码/名称/型号'" |
| | | v-decorator="['equipmentId', validatorRules.equipmentId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <!-- <a-col :span="12"> |
| | | <a-form-item |
| | | label="对象部门Id" |
| | | label="使用部门Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请输入对象部门id'" |
| | | :placeholder="disableSubmit?'':'请输入使用部门id'" |
| | | v-decorator="['useId', validatorRules.useId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <!-- <a-col :span="12"> |
| | | <a-form-item |
| | | label="派工方式" |
| | | :labelCol="labelCol" |
| | |
| | | v-decorator="['assignMode', validatorRules.assignMode]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="版本" |
| | |
| | | rowKey='id' |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="false" |
| | | > |
| | | <template |
| | | v-for="col in columns" |
| | |
| | | style="width: 100%" |
| | | :disabled="false" |
| | | /> |
| | | <j-image-upload |
| | | <!-- <j-image-upload |
| | | :value="text" |
| | | v-if="col.dataIndex == 'photo'" |
| | | :isMultiple="false" |
| | |
| | | placeholder="请上传图片" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | > |
| | | </j-image-upload> |
| | | </j-image-upload> --> |
| | | <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'location'" |
| | |
| | | align: 'center', |
| | | dataIndex: 'detectionStandard' |
| | | }, |
| | | { |
| | | title: '合格范围', |
| | | align: 'center', |
| | | dataIndex: 'acceptabilityLimit' |
| | | }, |
| | | { |
| | | title: '方法', |
| | | align: 'center', |
| | | dataIndex: 'inspectionMethodName' |
| | | }, |
| | | { |
| | | title: '工具', |
| | | align: 'center', |
| | | dataIndex: 'inspectionTool' |
| | | }, |
| | | // { |
| | | // title: '合格范围', |
| | | // align: 'center', |
| | | // dataIndex: 'acceptabilityLimit' |
| | | // }, |
| | | // { |
| | | // title: '方法', |
| | | // align: 'center', |
| | | // dataIndex: 'inspectionMethodName' |
| | | // }, |
| | | // { |
| | | // title: '工具', |
| | | // align: 'center', |
| | | // dataIndex: 'inspectionTool' |
| | | // }, |
| | | { |
| | | title: '周期', |
| | | align: 'center', |
| | |
| | | scopedSlots: { customRender: 'inspectionCycleId' }, |
| | | width: 170, |
| | | }, |
| | | { |
| | | title: '示意图', |
| | | align: 'center', |
| | | dataIndex: 'photo', |
| | | scopedSlots: { customRender: 'photo' }, |
| | | width: 170, |
| | | }, |
| | | // { |
| | | // title: '示意图', |
| | | // align: 'center', |
| | | // dataIndex: 'photo', |
| | | // scopedSlots: { customRender: 'photo' }, |
| | | // width: 170, |
| | | // }, |
| | | { |
| | | title: '部位', |
| | | align: 'center', |
| | |
| | | isRevise: false, |
| | | model: {}, |
| | | inspectionCycles: {}, |
| | | treeData: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | |
| | | getInspectionCycle: "/eam/inspectionStandardDetail/getInspectionCycle", |
| | | revise: '/eam/inspectionStandard/revise', |
| | | getReviseVersion: "/eam/inspectionStandard/getReviseVersion", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getNum: '/eam/sysIdentity/getNumNew' |
| | | }, |
| | | |
| | | dataSource: [], |
| | |
| | | |
| | | add() { |
| | | this.edit({ dailyInspectionStandardDetaillist: [] }) |
| | | this.getSeq() |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | | that.getInspectionCycle() |
| | | // that.initOptions(); |
| | | that.dataSource = []; |
| | | that.form.resetFields(); |
| | | that.model = Object.assign({}, record); |
| | |
| | | } |
| | | }, |
| | | |
| | | getSeq() { |
| | | getAction(this.url.getNum, { type: 'DailylnspectionStandard', length: 4 }).then(res => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ "num": res.result }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | onEquipmentList() { |
| | | let data = this.form.getFieldsValue(['useId']); |
| | | this.$refs.EquipmentList.list(data.useId); |
| | |
| | | |
| | | onDepartList() { |
| | | this.$refs.DepartList.list(); |
| | | this.$refs.DepartList.title = "选择对象部门"; |
| | | this.$refs.DepartList.title = "选择使用部门"; |
| | | }, |
| | | sendDepartRecord(data) { |
| | | this.dataSource = []; |
| | |
| | | let obj; |
| | | if (!this.model.id) { |
| | | formData.versionStatus = '1' |
| | | formData.approvalStatus = '1' |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | | if (this.isRevise) { |
| | | formData.versionStatus = '1' |
| | | formData.approvalStatus = '1' |
| | | obj = postAction(this.url.revise, formData); |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }); |