| | |
| | | <a-select :disabled="disableSubmit" placeholder="请选择设备类型" allow-clear |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车间分配" v-show="!productionDisabled" |
| | | ref="selectedProduction" prop="selectedProduction"> |
| | | <!--<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" |
| | | @back="backProductionInfo" :backProduction="true" :allowClear="false" |
| | | :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | |
| | |
| | | <a-select :disabled="disableSubmit" placeholder="请选择设备类型" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | | <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> |
| | | {{item.equipmentTypeName}} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import moment from 'moment' |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getAction } from '@/api/manage' |
| | | 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 DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import { mapActions } from 'vuex' |
| | |
| | | export default { |
| | | name: 'UserModal', |
| | | components: { |
| | | JSelectProduction, |
| | | JSelectEquipmentDepart, |
| | | JSelectEquipmentProduction, |
| | | DeviceListModel |
| | |
| | | productionDisabled: false, //是否是我的车间调用该页面 |
| | | roleDisabled: false, //是否是角色维护调用该页面 |
| | | modalWidth: 900, |
| | | confirmDirty: false, |
| | | userId: '', //保存用户id |
| | | disableSubmit: true, |
| | | dateFormat: 'YYYY-MM-DD', |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | equipmentId: [{ required: true, message: '请选择设备编号!' }], |
| | | equipmentId: [{ required: true, message: '请选择设备编号!', trigger: 'change' }], |
| | | selectedProduction: [{ required: true, message: '请选择车间' }], |
| | | teamCode: [{ required: true, message: '请选择配送小组' }] |
| | | }, |
| | |
| | | xs: { span: 24 }, |
| | | sm: { span: 19 } |
| | | }, |
| | | uploadLoading: false, |
| | | confirmLoading: false, |
| | | headers: {}, |
| | | systemType: false, |
| | | systemValue: '3', |
| | | url: { |
| | | fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', |
| | | userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // 引入为指定用户查看部门信息需要的url |
| | | //引入为指定用户查看车间信息需要的url |
| | | userProductionList: '/mdc/mdcEquipment/equipmentProductionList', |
| | | userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//同步用户到工作流 |
| | | queryTenantList: '/sys/tenant/queryList', |
| | | check: '/sys/duplicate/check', |
| | | queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' |
| | | }, |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | selectList: [], |
| | | equipmentTypeList: [], |
| | | isDepartType: '' |
| | | } |
| | | }, |
| | | created() { |
| | | const token = Vue.ls.get(ACCESS_TOKEN) |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName() |
| | | }, |
| | | computed: { |
| | | uploadAction: function() { |
| | | return this.url.fileUpload |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | getAppPlatformName() { |
| | |
| | | queryGroup() { |
| | | getAction(this.url.queryEquipmentType).then(res => { |
| | | if (res.success) { |
| | | this.selectList = res.result |
| | | this.equipmentTypeList = res.result |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | |
| | | }) |
| | | }, |
| | | getDeviceRows(val) { |
| | | console.log(val) |
| | | if (val.equipmentid) { |
| | | this.model.equipmentId = val.equipmentid |
| | | this.model.equipmentName = val.equipmentname |
| | |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserDeparts(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | | return disabledAuthFilter(code) |
| | | }, |
| | | // 根据屏幕变化,设置抽屉尺寸 |
| | | resetScreenSize() { |
| | |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | moment, |
| | | handleSubmit() { |
| | | const that = this |
| | | // 触发表单验证 |
| | |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleConfirmBlur(e) { |
| | | const value = e.target.value |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | }, |
| | | identityChange(e) { |
| | | if (e.target.value === 1) { |
| | | this.departIdShow = false |
| | | } else { |
| | | this.departIdShow = true |
| | | } |
| | | }, |
| | | /** |
| | | * 编辑或查看详情数据时清除抽屉表单验证 |