修改仓库数据范围报错

This commit is contained in:
liuhanqing
2025-06-16 13:56:41 +08:00
parent fc7364cc99
commit 36c95928ba
14 changed files with 230 additions and 42 deletions

View File

@@ -265,6 +265,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('systemManagement_RoleManagement.warehouseDataScope')">
<el-select v-model="form.warehouseDataScope" @change="dataScopeSelectChange" multiple collapse-tags :placeholder="$t('systemManagement_RoleManagement.selectWarehouse')">
<el-option
v-for="item in warehouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
></el-option>
</el-select>
</el-form-item>
<!-- 数据权限 -->
<el-form-item :label="$t('systemManagement_RoleManagement.dataScope')" v-show="form.dataScope == 2">
<!-- 标签文本:展开/折叠 -->
@@ -300,6 +310,7 @@
<script>
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"
import {listWarehouse} from "@/api/bas/warehouse"
export default {
name: "Role",
@@ -364,6 +375,8 @@ export default {
menuOptions: [],
// 部门列表
deptOptions: [],
// 仓库选项
warehouseOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
@@ -397,8 +410,15 @@ export default {
},
created() {
this.getList()
this.getWarehouseList();
},
methods: {
/** 获取仓库列表 */
getWarehouseList() {
listWarehouse().then(response => {
this.warehouseOptions = response.rows;
});
},
/** 查询角色列表 */
getList() {
this.loading = true
@@ -505,7 +525,8 @@ export default {
deptIds: [],
menuCheckStrictly: true,
deptCheckStrictly: true,
remark: undefined
remark: undefined,
warehouseDataScope: []
}
this.resetForm("form")
},