| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="对象部门" |
| | | label="使用部门" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <!-- <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' }" |
| | |
| | | placeholder="请选择部门" |
| | | tree-default-expand-all |
| | | v-decorator="['departId', 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="['departId', {}]" |
| | | /> |
| | | </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-form-item |
| | | label="对象部门Id" |
| | | label="使用部门Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请输入对象部门id'" |
| | | :placeholder="disableSubmit?'':'请输入使用部门id'" |
| | | v-decorator="['departId', validatorRules.useId ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | <!-- <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="对象部门" |
| | | label="使用部门" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请对象部门'" |
| | | :placeholder="disableSubmit?'':'请使用部门'" |
| | | :triggerChange="true" |
| | | dictCode="sys_depart,depart_name,id,version = '7' and del_flag!='1'" |
| | | v-decorator="['departId', validatorRules.departId]" |
| | |
| | | rowKey='id' |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="false" |
| | | > |
| | | <template |
| | | v-for="col in columns" |
| | |
| | | v-if="col.dataIndex == 'location'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入位置" |
| | | placeholder="请输入保养位置" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="true" |
| | | /> |
| | | <j-image-upload |
| | | :value="text" |
| | |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | > |
| | | </j-image-upload> |
| | | <j-dict-select-tag |
| | | v-if="col.dataIndex == 'maintenanceRole'" |
| | | :value="text" |
| | | allow-clear |
| | | :triggerChange="true" |
| | | dictCode="maintenance_role" |
| | | placeholder="请选择保养角色" |
| | | style="width: 100%" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | align: 'center', |
| | | dataIndex: 'standard' |
| | | }, |
| | | { |
| | | title: '方法', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceMethodName' |
| | | }, |
| | | { |
| | | title: '工具', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceTool' |
| | | }, |
| | | { |
| | | title: '维保专业', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceSpecialtyName' |
| | | }, |
| | | // { |
| | | // title: '方法', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceMethodName' |
| | | // }, |
| | | // { |
| | | // title: '工具', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceTool' |
| | | // }, |
| | | // { |
| | | // title: '维保专业', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceSpecialtyName' |
| | | // }, |
| | | { |
| | | title: '安全要求', |
| | | align: 'center', |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '部位', |
| | | title: '保养部位', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | scopedSlots: { customRender: 'location' }, |
| | |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCycleId', |
| | | scopedSlots: { customRender: 'maintenanceCycleId' }, |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '保养角色', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceRole', |
| | | scopedSlots: { customRender: 'maintenanceRole' }, |
| | | width: 150, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | useDepartName: { |
| | | rules: [ |
| | | { required: true, message: '请选择对象部门!' }, |
| | | { required: true, message: '请选择使用部门!' }, |
| | | ] |
| | | }, |
| | | equipmentName: { |
| | |
| | | add: "/eam/maintenanceStandard/add", |
| | | edit: "/eam/maintenanceStandard/edit", |
| | | addDetail: "/eam/maintenanceStandardDetail/add", |
| | | getMaintenanceCycle: "/eam/maintenanceStandardDetail/getMaintenanceCycle", |
| | | getMaintenanceCycle: "/eam/maintenanceStandardDetail/getPeriodicMaintenanceCycle", |
| | | realDelete: "/eam/maintenanceStandardDetail/realDelete", |
| | | revise: '/eam/maintenanceStandard/revise', |
| | | getReviseVersion: "/eam/maintenanceStandard/getReviseVersion", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getNum: '/eam/sysIdentity/getNumNew' |
| | | }, |
| | | |
| | | dataSource: [], |
| | |
| | | standard: data[i].standard, |
| | | maintenanceMethodName: data[i].maintenanceMethod_dictText, |
| | | maintenanceTool: data[i].maintenanceTool, |
| | | location: data[i].location, |
| | | maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText, |
| | | maintenanceRequire: data[i].maintenanceRequire, |
| | | workingHourQuota: data[i].workingHourQuota, |
| | |
| | | |
| | | add() { |
| | | this.edit({ maintenanceStandardDetaillist: [] }) |
| | | this.getSeq() |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | | this.initOptions(); |
| | | this.getMaintenanceCycle() |
| | | // this.getMaintenanceCycle() |
| | | this.dataSource = []; |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | if (record.maintenanceStandardDetaillist != undefined) { |
| | | const temp = [...record.maintenanceStandardDetaillist]; |
| | | // for (let i = 0; i < temp.length; i++) { |
| | | // let r = temp[i].upload; |
| | | // r.src = this.getSrc(temp[i].upload); |
| | | // } |
| | | that.dataSource = temp; |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark')); |
| | | }); |
| | | if (record.id) { |
| | | this.maintenanceCycles = [] |
| | | this.getMaintenanceCycle(this.model.equipmentId) |
| | | this.codeDisable = true; |
| | | that.$nextTick(() => { |
| | | if (that.isRevise) { |
| | |
| | | }) |
| | | }, |
| | | |
| | | getSeq() { |
| | | getAction(this.url.getNum, { type: 'DailyMaintenanceStandard', length: 4 }).then(res => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ "num": res.result }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | onEquipmentList() { |
| | | let data = this.form.getFieldsValue(['departId']); |
| | | if (data.departId == null || data.departId == "") { |
| | | this.$message.warning("请先选择对象部门!"); |
| | | this.$message.warning("请先选择使用部门!"); |
| | | return |
| | | } |
| | | this.$refs.EquipmentList.list(data.departId); |
| | |
| | | sendEquipmentRecord(data) { |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | this.getMaintenanceCycle(record.id) |
| | | this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model, teamId: record.teamId, teamName: record.teamId_dictText }); |
| | | |
| | | }, |
| | | |
| | | onDepartList() { |
| | | this.$refs.DepartList.list(); |
| | | this.$refs.DepartList.title = "选择对象部门"; |
| | | this.$refs.DepartList.title = "选择使用部门"; |
| | | }, |
| | | sendDepartRecord(data) { |
| | | this.dataSource = []; |
| | |
| | | }) |
| | | }, |
| | | |
| | | getMaintenanceCycle() { |
| | | getAction(this.url.getMaintenanceCycle).then((res) => { |
| | | getMaintenanceCycle(equipmentId) { |
| | | debugger |
| | | getAction(this.url.getMaintenanceCycle, { equipmentId: equipmentId }).then((res) => { |
| | | if (res.success) { |
| | | this.maintenanceCycles = res.result |
| | | } |
| | |
| | | if (column.dataIndex == 'location') { |
| | | target[column.dataIndex] = value.target.value; |
| | | } |
| | | if (column.dataIndex == 'maintenanceRole') { |
| | | target[column.dataIndex] = value; |
| | | } |
| | | //显示带过来的数据 |
| | | that.dataSource = temp; |
| | | } |