| | |
| | | label="车间分配" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | v-show="!factoryDisabled" |
| | | > |
| | | <j-select-production |
| | | v-model="model.selectedProduction" |
| | | <j-select-factory |
| | | v-model="model.selectedFactory" |
| | | :multi="true" |
| | | @back="backProductionInfo" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-production> |
| | | ></j-select-factory> |
| | | </a-form-model-item> |
| | | |
| | | <!--<a-form-model-item--> |
| | | <!--label="选择设备"--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--v-show="!productionDisabled"--> |
| | | <!--v-show="!factoryDisabled"--> |
| | | <!-->--> |
| | | <!--<a-input-search--> |
| | | <!--:readOnly="true"--> |
| | |
| | | <!--@search="deviceSearch"--> |
| | | <!--enter-button--> |
| | | <!--placeholder="请选择设备"--> |
| | | <!--:disabled="!model.selectedProduction"--> |
| | | <!--:disabled="!model.selectedFactory"--> |
| | | <!--/>--> |
| | | <!--</a-form-model-item>--> |
| | | |
| | |
| | | import { addUser, editUser, queryUserRole, queryall } from '@/api/api' |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction' |
| | | import JSelectFactory from '../../../components/jeecgbiz/JSelectFactory' |
| | | import { mapActions } from 'vuex' |
| | | import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
| | | // import SelectDeviceModal from './SelectDeviceModal' |
| | |
| | | name: 'UserModal', |
| | | components: { |
| | | // SelectDeviceModal, |
| | | JSelectProduction |
| | | JSelectFactory |
| | | }, |
| | | data() { |
| | | return { |
| | | departDisabled: false, //是否是我的部门调用该页面 |
| | | productionDisabled: false, //是否是我的车间调用该页面 |
| | | factoryDisabled: false, //是否是我的车间调用该页面 |
| | | roleDisabled: false, //是否是角色维护调用该页面 |
| | | modalWidth: 800, |
| | | drawerWidth: 700, |
| | |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | nextFactoryOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '' |
| | | selectedFactory: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (value) this.initDictData('password_length') |
| | | } |
| | | }, |
| | | 'model.selectedProduction': { |
| | | 'model.selectedFactory': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | // 如果车间选择前后不一致则重置选择设备 |
| | |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '' |
| | | selectedFactory: '' |
| | | }) |
| | | }, |
| | | edit(record) { |
| | |
| | | // 获取车间分配 |
| | | getAction(that.url.userProductionList, { userId: userid }).then((res) => { |
| | | if (res.success) { |
| | | let ProductionOptions = [] |
| | | let selectProductKeys = [] |
| | | let FactoryOptions = [] |
| | | let selectFactoryKeys = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key) |
| | | selectFactoryKeys.push(res.result[i].key) |
| | | //新增负责部门选择下拉框 |
| | | ProductionOptions.push({ |
| | | FactoryOptions.push({ |
| | | value: res.result[i].key, |
| | | label: res.result[i].title |
| | | }) |
| | | } |
| | | |
| | | this.$set(this.model, 'selectedProduction', selectProductKeys.join(',')) |
| | | that.nextProductionOptions = ProductionOptions |
| | | this.$set(this.model, 'selectedFactory', selectFactoryKeys.join(',')) |
| | | that.nextFactoryOptions = FactoryOptions |
| | | } |
| | | }) |
| | | //车间的url |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | backFactoryInfo(info) { |
| | | this.model.factoryIds = this.model.selectedFactory |
| | | this.nextFactoryOptions = info.map((item, index, arr) => { |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | |
| | | refresh() { |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextFactoryOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | close() { |
| | |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.nextFactoryOptions = [] |
| | | this.departIdShow = false |
| | | this.$refs.form.resetFields() |
| | | }, |