From 3884e330379c96e7576ada6b7a988a84e8757886 Mon Sep 17 00:00:00 2001 From: futian.liu <liufutianyoo@163.com> Date: 星期一, 18 十二月 2023 16:12:50 +0800 Subject: [PATCH] 修改查询库存的仓库参数 --- admin-web/src/views/systemManger/server/user/edit.vue | 50 ++++++++++++++++++++++++++++++++++---------------- 1 files changed, 34 insertions(+), 16 deletions(-) diff --git a/admin-web/src/views/systemManger/server/user/edit.vue b/admin-web/src/views/systemManger/server/user/edit.vue index 840efc6..9e4d187 100644 --- a/admin-web/src/views/systemManger/server/user/edit.vue +++ b/admin-web/src/views/systemManger/server/user/edit.vue @@ -11,6 +11,11 @@ <el-form-item label="褰撳墠鏈烘瀯"> <el-input v-model="setting.tenantName" disabled style="width: 250px"/> </el-form-item> + <el-form-item label="閮ㄩ棬" prop="sysDeptId"> + <el-select v-model="formData.sysDeptId"> + <el-option v-for="(item,index) in deptmentOptions" :key="index" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> <el-form-item label="浜哄憳濮撳悕" prop="userName"> <el-input v-model="formData.userName" clearable maxlength="20" show-word-limit style="width: 250px"/> </el-form-item> @@ -61,13 +66,14 @@ </template> <script> - import winSm from '@/components/win/win-sm' - import myButton from '@/components/myButton/myButton' - import * as DateFormatter from '@/utils/DateFormatter' - import * as role from "@/api/system/role"; - import * as user from "@/api/user"; +import winSm from '@/components/win/win-sm' +import myButton from '@/components/myButton/myButton' +import * as DateFormatter from '@/utils/DateFormatter' +import * as role from "@/api/system/role"; +import * as user from "@/api/user"; +import {departmentListAll} from "@/api/system/deptment"; - export default { +export default { components: {winSm, myButton}, props: { // setting 涓』鑷冲皯鍖呭惈鎺у埗dialog鏄剧ず鎴栭殣钘忕殑灞炴��,鍏朵綑灞炴�у彲鎷撳睍 @@ -81,6 +87,7 @@ }, data() { return { + deptmentOptions:[], checkAll: false, checkedList: [], roleList: [ @@ -103,6 +110,7 @@ label: 'name', }, formData: { + sysDeptId:'', userName: '', userCode: '', userPhone: '', @@ -112,6 +120,9 @@ seq: null, }, rules: { + sysDeptId: [ + {required: true, message: '璇烽�夋嫨閮ㄩ棬', trigger: 'change'} + ], userName: [ {required: true, message: '璇疯緭鍏ヤ汉鍛樺鍚�', trigger: 'blur'} ], @@ -133,21 +144,23 @@ created() { this.getInfo() this.getAllRole() + this.getDeptmentOptions() }, methods: { // 鑾峰彇鎵�鏈夎鑹� getAllRole() { - const user = this.$store.getters.userInfo + // const user = this.$store.getters.userInfo + // this.data_scope = 1 + // if (user.lv == 1) { + // this.data_scope = 1 + // } + // if (user.lv == 2) { + // this.data_scope = 2 + // } + // if (user.lv == 3) { + // this.data_scope = 3 + // } this.data_scope = 1 - if (user.lv == 1) { - this.data_scope = 1 - } - if (user.lv == 2) { - this.data_scope = 2 - } - if (user.lv == 3) { - this.data_scope = 3 - } role.listRoleByDataScope({dataScope: this.data_scope}).then(response => { if (response) { this.roleOptions = response; @@ -158,6 +171,11 @@ } ); }, + getDeptmentOptions(){ + departmentListAll({tenantId:this.setting.tenantId}).then(res=>{ + this.deptmentOptions = res + }) + }, handleCheckAllChange(val) { if (val) { this.checkedList = this.roleOptions.map(x => { -- Gitblit v1.9.1