| | |
| | | </a-form-model-item> |
| | | |
| | | <!--车间分配--> |
| | | <!-- <a-form-model-item--> |
| | | <!-- label="车间分配"--> |
| | | <!-- :labelCol="labelCol"--> |
| | | <!-- :wrapperCol="wrapperCol"--> |
| | | <!-- v-show="!productionDisabled"--> |
| | | <!-- >--> |
| | | <!-- <j-select-production--> |
| | | <!-- v-model="model.selectedProduction"--> |
| | | <!-- :multi="true"--> |
| | | <!-- @back="backProductionInfo"--> |
| | | <!-- :backProduction="true"--> |
| | | <!-- :treeProductOpera="true"--> |
| | | <!-- ></j-select-production>--> |
| | | <!-- </a-form-model-item>--> |
| | | |
| | | <!--中心分配--> |
| | | <a-form-model-item |
| | | label="车间分配" |
| | | label="中心分配" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | v-show="!factoryDisabled" |
| | | > |
| | | <j-select-production |
| | | v-model="model.selectedProduction" |
| | | <j-select-factory |
| | | v-model="model.selectedFactorys" |
| | | :multi="true" |
| | | @back="backProductionInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-production> |
| | | @back="backFactoryInfo" |
| | | :backFactory="true" |
| | | :treeFactoryOpera="true" |
| | | ></j-select-factory> |
| | | </a-form-model-item> |
| | | |
| | | |
| | | <a-form-model-item |
| | | label="选择设备" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-show="!productionDisabled" |
| | | > |
| | | <a-tooltip title="选择设备后,用户就只有这些设备的权限!不选择设备,则会根据车间分配控制设备的权限!" |
| | | placement="topRight"> |
| | | <a-input-search |
| | | :readOnly="true" |
| | | v-model="model.equipmentIds" |
| | | @search="deviceSearch" |
| | | enter-button |
| | | placeholder="请选择设备" |
| | | :disabled="!model.selectedProduction" |
| | | /> |
| | | </a-tooltip> |
| | | </a-form-model-item> |
| | | <!-- <a-form-model-item--> |
| | | <!-- label="选择设备"--> |
| | | <!-- :labelCol="labelCol"--> |
| | | <!-- :wrapperCol="wrapperCol"--> |
| | | <!-- v-show="!productionDisabled"--> |
| | | <!-- >--> |
| | | <!-- <a-tooltip title="选择设备后,用户就只有这些设备的权限!不选择设备,则会根据车间分配控制设备的权限!"--> |
| | | <!-- placement="topRight">--> |
| | | <!-- <a-input-search--> |
| | | <!-- :readOnly="true"--> |
| | | <!-- v-model="model.equipmentIds"--> |
| | | <!-- @search="deviceSearch"--> |
| | | <!-- enter-button--> |
| | | <!-- placeholder="请选择设备"--> |
| | | <!-- :disabled="!model.selectedProduction"--> |
| | | <!-- />--> |
| | | <!-- </a-tooltip>--> |
| | | <!-- </a-form-model-item>--> |
| | | |
| | | |
| | | <!--<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, |
| | |
| | | departIdShow: false, |
| | | title: '操作', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | |
| | | fileUpload: window._CONFIG['domianURL'] + 'sys/common/upload', |
| | | userWithDepart: '/sys/user/userDepartList', // 引入为指定用户查看部门信息需要的url |
| | | //引入为指定用户查看车间信息需要的url |
| | | userProductionList: '/sys/user/userProductionList', |
| | | userFactoryList: '/sys/user/userFactorysList', |
| | | userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//同步用户到工作流 |
| | | queryTenantList: '/sys/tenant/queryList' |
| | |
| | | tenantsOptions: [], |
| | | rolesOptions: [], |
| | | nextDepartOptions: [], |
| | | nextProductionOptions: [], |
| | | nextFactoryOptions: [], |
| | | isDepartType: '', |
| | | model: { |
| | | selectedProduction: '' |
| | | selectedFactorys: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (value) this.initDictData('password_length') |
| | | } |
| | | }, |
| | | 'model.selectedProduction': { |
| | | 'model.selectedFactorys': { |
| | | handler(newVal, oldVal) { |
| | | if (newVal && this.$refs.selectDeviceModal) { |
| | | // 如果车间选择前后不一致则重置选择设备 |
| | |
| | | userIdentity: 1, |
| | | selectedroles: '', |
| | | selecteddeparts: '', |
| | | selectedProduction: '' |
| | | selectedFactorys: '' |
| | | }) |
| | | }, |
| | | edit(record) { |
| | |
| | | if (record.hasOwnProperty('id')) { |
| | | that.getUserRoles(record.id) |
| | | that.getUserDeparts(record.id) |
| | | that.getUserFactorys(record.id) |
| | | } |
| | | }, |
| | | isDisabledAuth(code) { |
| | |
| | | that.nextDepartOptions = departOptions |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getUserFactorys(userid) { |
| | | let that = this |
| | | // 获取车间分配 |
| | | getAction(that.url.userProductionList, { userId: userid }).then((res) => { |
| | | getAction(that.url.userFactoryList, { 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, 'selectedFactorys', selectFactoryKeys.join(',')) |
| | | that.nextFactoryOptions = factoryOptions |
| | | } |
| | | }) |
| | | //车间的url |
| | | }, |
| | | backDepartInfo(info) { |
| | | this.model.departIds = this.model.selecteddeparts |
| | |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item, index, arr) => { |
| | | backFactoryInfo(info) { |
| | | this.model.productionIds = this.model.selectedFactorys |
| | | 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() |
| | | }, |