| | |
| | | </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" |
| | |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | <!-- <span |
| | | slot="photo" |
| | | slot-scope="text,record" |
| | | > |
| | | <Tooltip |
| | | placement="top" |
| | | title="预览图片" |
| | | > |
| | | <img |
| | | v-if=" record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif')" |
| | | width="30" |
| | | height="14" |
| | | border="1" |
| | | draggable="false" |
| | | preview="1" |
| | | :preview-text="''" |
| | | :src="record.upload.src" |
| | | /> |
| | | </Tooltip> |
| | | <a |
| | | v-if="record.upload.path && record.upload.format.toLowerCase()=='pdf'" |
| | | href="javascript:;" |
| | | @click="view(record.upload)" |
| | | > |
| | | 预览 |
| | | </a> |
| | | |
| | | <a-divider |
| | | v-if="record.upload.path && (record.upload.format.toLowerCase()=='jpg'||record.upload.format.toLowerCase()=='bmp'||record.upload.format.toLowerCase()=='png'||record.upload.format.toLowerCase()=='jpeg'||record.upload.format.toLowerCase()=='gif'||record.upload.format.toLowerCase()=='pdf')" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleUpload(record)" |
| | | >上传</a> |
| | | </span> --> |
| | | </a-table> |
| | | <template slot="footer"> |
| | | <a-button |
| | |
| | | align: 'center', |
| | | dataIndex: 'standard' |
| | | }, |
| | | { |
| | | title: '方法', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceMethodName' |
| | | }, |
| | | { |
| | | title: '工具', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceTool' |
| | | }, |
| | | { |
| | | title: '维保专业', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceSpecialtyName' |
| | | }, |
| | | { |
| | | title: '安全要求', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceRequire', |
| | | scopedSlots: { customRender: 'maintenanceRequire' }, |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '工时定额', |
| | | align: 'center', |
| | | dataIndex: 'workingHourQuota' |
| | | }, |
| | | { |
| | | title: '示意图', |
| | | align: 'center', |
| | | dataIndex: 'photo', |
| | | scopedSlots: { customRender: 'photo' }, |
| | | width: 150, |
| | | }, |
| | | // { |
| | | // title: '方法', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceMethodName' |
| | | // }, |
| | | // { |
| | | // title: '工具', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceTool' |
| | | // }, |
| | | // { |
| | | // title: '维保专业', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceSpecialtyName' |
| | | // }, |
| | | // { |
| | | // title: '安全要求', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceRequire', |
| | | // scopedSlots: { customRender: 'maintenanceRequire' }, |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '工时定额', |
| | | // align: 'center', |
| | | // dataIndex: 'workingHourQuota' |
| | | // }, |
| | | // { |
| | | // title: '示意图', |
| | | // align: 'center', |
| | | // dataIndex: 'photo', |
| | | // scopedSlots: { customRender: 'photo' }, |
| | | // width: 150, |
| | | // }, |
| | | { |
| | | title: '保养部位', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | scopedSlots: { customRender: 'location' }, |
| | | width: 150, |
| | | // scopedSlots: { customRender: 'location' }, |
| | | // width: 150, |
| | | }, |
| | | { |
| | | title: '周期', |
| | |
| | | }, |
| | | useDepartName: { |
| | | rules: [ |
| | | { required: true, message: '请选择对象部门!' }, |
| | | { required: true, message: '请选择使用部门!' }, |
| | | ] |
| | | }, |
| | | equipmentName: { |
| | |
| | | list: "/eam/maintenanceStandardDetail/getMaintenanceStandardDetailListByIds", |
| | | add: "/eam/maintenanceStandard/add", |
| | | edit: "/eam/maintenanceStandard/edit", |
| | | addDetail: "/eam/maintenanceStandardDetail/add", |
| | | // addDetail: "/eam/maintenanceStandardDetail/add", |
| | | 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: [], |
| | |
| | | |
| | | add() { |
| | | this.edit({ maintenanceStandardDetaillist: [] }) |
| | | this.getSeq() |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | | this.initOptions(); |
| | | // this.initOptions(); |
| | | // this.getMaintenanceCycle() |
| | | this.dataSource = []; |
| | | this.form.resetFields(); |
| | |
| | | }) |
| | | }, |
| | | |
| | | 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); |
| | |
| | | |
| | | onDepartList() { |
| | | this.$refs.DepartList.list(); |
| | | this.$refs.DepartList.title = "选择对象部门"; |
| | | this.$refs.DepartList.title = "选择使用部门"; |
| | | }, |
| | | sendDepartRecord(data) { |
| | | this.dataSource = []; |
| | |
| | | }, |
| | | |
| | | handleOk() { |
| | | console.log("123") |
| | | const that = this; |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | |
| | | 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 }); |
| | |
| | | }, |
| | | |
| | | getMaintenanceCycle(equipmentId) { |
| | | debugger |
| | | getAction(this.url.getMaintenanceCycle, { equipmentId: equipmentId }).then((res) => { |
| | | if (res.success) { |
| | | this.maintenanceCycles = res.result |