| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" v-show="!productionDisabled" |
| | | ref="selectedProduction" prop="selectedProduction"> |
| | | <a-form-model-item label="车间分配" v-show="!factoryDisabled" |
| | | ref="selectedFactory" prop="selectedFactory"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'请选择车间!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" |
| | | @back="backProductionInfo" :backProduction="true" |
| | | :treeProductOpera="true"></j-select-equipment-production> |
| | | <j-select-equipment-factory :disabled="disableSubmit" v-model="model.selectedFactory" :multi="false" |
| | | @back="backFactoryInfo" :backFactory="true" |
| | | :treeProductOpera="true"></j-select-equipment-factory> |
| | | </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="请选择系统类型" :triggerChange="true" dictCode="system_type" |
| | | :disabled="disableSubmit" |
| | | v-model="model.systemType" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item label="系统类型">--> |
| | | <!-- <j-dict-select-tag placeholder="请选择系统类型" :triggerChange="true" dictCode="system_type"--> |
| | | <!-- :disabled="true"--> |
| | | <!-- v-model="model.systemType" allow-clear/>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="排序"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请输入排序" |
| | |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span='12' v-if="systemType"> |
| | | <a-form-model-item label="系统类型"> |
| | | <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-col :span='12'> |
| | | <a-form-model-item label="安装位置"> |
| | | <a-input v-model="model.equipmentAddress" allow-clear placeholder="请输入安装位置" :disabled="disableSubmit"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <!-- <a-row :gutter="24">--> |
| | | <!-- <a-col :span='12' v-if="systemType">--> |
| | | <!-- <a-form-model-item label="系统类型">--> |
| | | <!-- <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-col :span='12'>--> |
| | | <!-- <a-form-model-item label="安装位置">--> |
| | | <!-- <a-input v-model="model.equipmentAddress" allow-clear placeholder="请输入安装位置" :disabled="disableSubmit"/>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- </a-row>--> |
| | | |
| | | |
| | | <a-row :gutter="24"> |
| | |
| | | import { addEquipment, editEquipment } from '@/api/api' |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction' |
| | | import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction' |
| | | import JSelectEquipmentFactory from '../../../../../components/jeecgbiz/JSelectEquipmentFactory' |
| | | import JSelectFactory from '../../../../../components/jeecgbiz/JSelectFactory' |
| | | import DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import { mapActions } from 'vuex' |
| | |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | JSelectProduction, |
| | | JSelectFactory, |
| | | JSelectEquipmentDepart, |
| | | JSelectEquipmentProduction, |
| | | JSelectEquipmentFactory, |
| | | DeviceListModel |
| | | }, |
| | | data() { |
| | | return { |
| | | departDisabled: false, //是否是我的部门调用该页面 |
| | | productionDisabled: false, //是否是我的车间调用该页面 |
| | | factoryDisabled: false, //是否是我的车间调用该页面 |
| | | roleDisabled: false, //是否是角色维护调用该页面 |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | |
| | | ], |
| | | // trigger: 'blur' // 触发方式 |
| | | |
| | | selectedProduction: |
| | | selectedFactory: |
| | | [ |
| | | { |
| | | required: true, message: '请选择车间!' |
| | |
| | | fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', |
| | | userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // 引入为指定用户查看部门信息需要的url |
| | | //引入为指定用户查看车间信息需要的url |
| | | userProductionList: '/mdc/mdcEquipment/equipmentProductionList', |
| | | equipmentFactoryList: '/mdc/mdcEquipment/equipmentFactoryList', |
| | | userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//同步用户到工作流 |
| | | queryTenantList: '/sys/tenant/queryList', |
| | |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName() |
| | | // this.getAppPlatformName() |
| | | // this.initRoleList() |
| | | // this.initTenantList() |
| | | }, |
| | |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | getAppPlatformName() { |
| | | getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res => { |
| | | if (res.success) { |
| | | this.systemType = res.result.settingValue === '0' |
| | | } |
| | | }) |
| | | }, |
| | | // getAppPlatformName() { |
| | | // getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res => { |
| | | // if (res.success) { |
| | | // this.systemType = res.result.settingValue === '0' |
| | | // } |
| | | // }) |
| | | // }, |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | |
| | | // this.model = Object.assign({}, record) |
| | | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedFactory', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | 'driveType', 'sortNo', 'remark', 'systemVersion', 'devicePower', 'controlSystem', 'saveTableName', 'systemValue', 'equipmentAddress')) |
| | | }) |
| | | if (record.hasOwnProperty('id')) { |
| | |
| | | } |
| | | }) |
| | | |
| | | getAction(that.url.userProductionList, { equipmentId: userid }).then((res) => { |
| | | getAction(that.url.equipmentFactoryList, { equipmentId: userid }).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res.result) |
| | | let ProductionOptions = [] |
| | | let factoryOptions = [] |
| | | let selectProductKeys = [] |
| | | // console.log(res.result) |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key) |
| | | //新增负责部门选择下拉框 |
| | | ProductionOptions.push({ |
| | | factoryOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedProduction = selectProductKeys.join(',') |
| | | that.model.selectedFactory = selectProductKeys.join(',') |
| | | |
| | | that.nextProductionOptions = ProductionOptions |
| | | that.nextProductionOptions = factoryOptions |
| | | // console.log('that.nextProductionOptions=',that.nextProductionOptions) |
| | | } |
| | | }) |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | backFactoryInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.model.productionIds = this.model.selectedFactory |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |