| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设备级别"> |
| | | <j-dict-select-tag placeholder="请选择设备级别" dictCode="device_level" v-model="model.deviceLevel" |
| | | :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设备种类"> |
| | | <j-dict-select-tag placeholder="请选择设备种类" dictCode="device_category" v-model="model.deviceCategory" |
| | | :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="排序"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请输入排序" |
| | | v-model="model.sortNo" style="width: 100%"/> |
| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label="配送小组" prop="teamCode"> |
| | | <j-dict-select-tag placeholder="请选择配送小组" dictCode="mdc_staff_team" v-model="model.teamCode" |
| | | :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label="设备图片"> |
| | | <j-image-upload v-model="model.equipmentImage" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" v-if="systemType"> |
| | | <a-col :span='24'> |
| | | <a-form-model-item label="系统类型" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-radio-group name="radioGroup" v-model="systemValue" :disabled="disableSubmit"> |
| | | <a-radio value="1">DNC</a-radio> |
| | | <a-radio value="2">MDC</a-radio> |
| | | <a-radio value="3">通用</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span='12'> |
| | | <a-form-model-item v-if="isDepartType == 0" label="系统版本号"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入系统版本号" |
| | | v-model="model.systemVersion"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | driveType: '', |
| | | systemType: '', |
| | | deviceLevel: '', |
| | | deviceCategory: '', |
| | | deviceTypeDnc: '', |
| | | deviceTypeMdc: '' |
| | | deviceCategory: '' |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | sm: { span: 19 } |
| | | }, |
| | | confirmLoading: false, |
| | | systemType: false, |
| | | systemValue: '3', |
| | | url: { |
| | | userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // 引入为指定用户查看部门信息需要的url |
| | | //引入为指定用户查看车间信息需要的url |
| | |
| | | created() { |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName() |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getAppPlatformName() { |
| | | getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res => { |
| | | if (res.success) { |
| | | this.systemType = res.result.settingValue === '0' |
| | | } |
| | | }) |
| | | }, |
| | |
| | | //根据屏幕宽度自适应抽屉宽度 |
| | | this.resetScreenSize() |
| | | |
| | | if (record.systemValue != null) { |
| | | this.systemValue = record.systemValue |
| | | } else { |
| | | this.systemValue = '3' |
| | | } |
| | | that.model = Object.assign({}, record) |
| | | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | 'driveType', 'sortNo', 'remark', 'systemVersion', 'devicePower', 'controlSystem', 'saveTableName', 'systemValue')) |
| | | 'driveType', 'sortNo', 'remark', 'systemVersion', 'devicePower', 'controlSystem', 'saveTableName')) |
| | | }) |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserDeparts(record.id) |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | if (this.systemValue == null) { |
| | | this.$message.warning('请选择系统类型!') |
| | | return false |
| | | } |
| | | let obj |
| | | if (!this.model.id) { |
| | | this.model.id = this.userId |
| | | this.model.systemValue = this.systemValue |
| | | obj = addEquipment(this.model) |
| | | } else { |
| | | this.model.systemValue = this.systemValue |
| | | obj = editEquipment(this.model, { |
| | | id: this.model.id |
| | | }) |