| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="orgId" label="使用部门"> |
| | | <a-input placeholder="请输入使用部门" v-model="model.orgId"/> |
| | | <a-form-model-item prop="orgId" label="使用车间"> |
| | | <a-tree-select v-model="model.orgId" |
| | | style="width: 100%" |
| | | :tree-data="treeData" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | placeholder="请选择使用车间" |
| | | allow-clear |
| | | tree-default-expand-all |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="equipmentManager" label="设备管理员"> |
| | | <a-input placeholder="请输入设备管理员" v-model="model.equipmentManager"/> |
| | | <j-search-select-tag placeholder="请选择设备管理员" v-model="model.equipmentManager" dict="sys_user,realname, username, del_flag=0"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item prop="mdcFlag" label="是否实施MDC"> |
| | | <lx-switch checked-children='是' un-checked-children='否' v-model="model.mdcFlag"/> |
| | | <lx-switch checked-children='是' un-checked-children='否' @change="handleMdcFlagChange" v-model="model.mdcFlag"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6" v-if="model.mdcFlag === '1'"> |
| | | <a-form-model-item prop="deviceType" label="MDC设备类型"> |
| | | <j-search-select-tag placeholder="请选择设备类型" v-model="model.deviceType" dict="mdc_equipment_type,equipment_type_name, id, equipment_type_states='Y'" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import { getAction, httpAction } from '@/api/manage' |
| | | import { validateDuplicateValueInDelFlag } from '@/utils/util' |
| | | import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentModal', |
| | | components: { JSelectProduction }, |
| | | data() { |
| | | return { |
| | | title: '操作', |
| | |
| | | ], |
| | | technologyStatus: [ |
| | | { required: true, message: '请选择技术状态' } |
| | | ], |
| | | orgId: [ |
| | | { required: true, message: '请选择使用车间' } |
| | | ], |
| | | equipmentManager: [ |
| | | { required: true, message: '请选择设备管理员' } |
| | | ], |
| | | deviceType: [ |
| | | { required: false, message: '请选择设备类型' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/equipment/add', |
| | | edit: '/eam/equipment/edit' |
| | | } |
| | | edit: '/eam/equipment/edit', |
| | | loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions' |
| | | }, |
| | | treeData: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.loadAllProductionTree(); |
| | | }, |
| | | methods: { |
| | | add() { |
| | |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | loadAllProductionTree() { |
| | | //加载车间选择树 |
| | | getAction(this.url.loadProductionOptions).then(res => { |
| | | if (res.success) { |
| | | this.treeData = [...res.result] |
| | | }else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | handleMdcFlagChange(checked){ |
| | | if (checked) { |
| | | this.validatorRules.deviceType[0].required = true |
| | | } else { |
| | | this.validatorRules.deviceType[0].required = false |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |