diff --git a/base-manager-ui/admin/src/pages/basicset/surface/components/RightPreview.vue b/base-manager-ui/admin/src/pages/basicset/surface/components/RightPreview.vue index 97bc2f9d31827599ea47f63753d58ca2049ea527..f98a960a4c2a3f1769f5114091cb3a6e949553cb 100644 --- a/base-manager-ui/admin/src/pages/basicset/surface/components/RightPreview.vue +++ b/base-manager-ui/admin/src/pages/basicset/surface/components/RightPreview.vue @@ -194,10 +194,11 @@ export default { .preview-btn { border-top: 1px solid #ccc; height: 100px; + padding: 0px 10px; display: flex; flex-direction: column; justify-content: center; flex-shrink: 0; } } -</style> \ No newline at end of file +</style> diff --git a/base-manager-ui/admin/src/pages/basicset/surface/modal/AddSurface.vue b/base-manager-ui/admin/src/pages/basicset/surface/modal/AddSurface.vue index 77428f85e595e1d0d18d40ff1d7451ca12283cbc..98dcfa474d904083c94f4cd8f2bc369bda0ae08f 100644 --- a/base-manager-ui/admin/src/pages/basicset/surface/modal/AddSurface.vue +++ b/base-manager-ui/admin/src/pages/basicset/surface/modal/AddSurface.vue @@ -429,8 +429,8 @@ export default { if (code === 1) { this.formData.previewImagePath = res.data.url; let result = await skinSave({ - ...this.curProduct, ...this.formData, + ...this.curProduct, }); let { code, msg } = result.data; if (code === 1) { diff --git a/portal-manager-ui/admin/src/api/resource.js b/portal-manager-ui/admin/src/api/resource.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd390e8758d4d7b73326f9103ba6fd9af538dce --- /dev/null +++ b/portal-manager-ui/admin/src/api/resource.js @@ -0,0 +1,27 @@ +import http from "../request/http"; +let baseURL = process.env.VUE_APP_API_BASE_URL; + +// 鑾峰彇璧勬簮鍒楄〃 +export function getResourceList(params) { + return http.post(`${baseURL}/zwfw/resource/list`, params); +} + +// 淇濆瓨璧勬簮 +export function saveResource(params) { + return http.post(`${baseURL}/zwfw/resource/save`, params); +} + +// 鍒犻櫎璧勬簮 +export function delResource(params) { + return http.get(`${baseURL}/zwfw/resource/delete`, params); +} + +// 鏌ヨ瑙掕壊鏉冮檺鍒楄〃 +export function getRoleResourceList(params) { + return http.post(`${baseURL}/zwfw/role/auth/list`, params); +} + +// 淇濆瓨瑙掕壊璧勬簮 +export function distributionSource(params) { + return http.post(`${baseURL}/zwfw/role/auth/distributionSource`, params); +} diff --git a/portal-manager-ui/admin/src/router/routes.js b/portal-manager-ui/admin/src/router/routes.js index aaf0f76006a51c29ba1b4a8a5d047e4eb5d8acb3..18c4732f313289c4fc6010c737c76b9d8a59f124 100644 --- a/portal-manager-ui/admin/src/router/routes.js +++ b/portal-manager-ui/admin/src/router/routes.js @@ -19,7 +19,7 @@ const routes = [ children: [ { path: "dataAdmin", - redirect: "/",//鍗囩骇鍓嶉棬鎴疯烦杞噸瀹氬悜 + redirect: "/", //鍗囩骇鍓嶉棬鎴疯烦杞噸瀹氬悜 }, { path: "pickUp", @@ -31,7 +31,6 @@ const routes = [ ), meta: { title: "鍙栦欢璁板綍鎶ヨ〃" }, children: [ - { path: "pickUpRecord", name: "pickUpRecord", @@ -730,6 +729,15 @@ const routes = [ ), meta: { title: "瑙掕壊鏉冮檺绠$悊" }, }, + { + path: "resourceManage", + name: "resourceManage", + component: () => + import( + /* webpackChunkName: "resourceManage" */ "@/views/thePlatformIsSet/components/permissionsModel/ResourceManage.vue" + ), + meta: { title: "璧勬簮淇℃伅绠$悊" }, + }, ], }, { diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/ResourceManage.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/ResourceManage.vue new file mode 100644 index 0000000000000000000000000000000000000000..1965383ef26ec70f8fcb75192cee97cfc1d4533f --- /dev/null +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/ResourceManage.vue @@ -0,0 +1,253 @@ +<template> + <div class="w-full"> + <!-- 澶撮儴鎿嶄綔 --> + <div class="header_box flex justify-between items-center"> + <a-space> + <a-button type="primary" class="addclass" @click="addSresource" + >鏂板璧勬簮</a-button + > + <a-button type="danger" @click="delAll">鎵归噺鍒犻櫎</a-button> + </a-space> + <a-space> + <a-input + v-model="searchForm.name" + style="width: 250px" + placeholder="璇疯緭鍏ヨ祫婧愬悕绉版悳绱�" + > + <a-icon slot="prefix" type="search" /> + </a-input> + <a-select + v-model="searchForm.authType" + placeholder="璇烽€夋嫨鏉冮檺绫诲瀷" + style="width: 150px" + > + <a-select-option value="">鍏ㄩ儴</a-select-option> + <a-select-option + v-for="(v, key) in dict.authType" + :key="key" + :value="Number(key)" + >{{ v }}</a-select-option + > + </a-select> + <a-button type="primary" class="addclass" @click="handleSerch" + >鎼滅储</a-button + > + <a-button @click="resetList">閲嶇疆</a-button> + </a-space> + </div> + <!-- 琛ㄦ牸 --> + <a-table + :columns="columns" + :data-source="tableSourceData" + size="small" + bordered + :scroll="{ y: 590 }" + :row-key="(record) => record.id" + :pagination="tablePagination" + @change="pagTableChange" + :loading="loading" + :row-selection="{ + selectedRowKeys: selectedRowKeys, + onChange: onSelectChange, + }" + > + <!-- 璧勬簮 --> + <template slot="url" slot-scope="text"> + <a-tag color="blue" class="mb-[4px]" v-for="(v, i) in text" :key="i"> + {{ v }} + </a-tag> + </template> + + <!-- 璁よ瘉绫诲瀷 --> + <template slot="authType" slot-scope="text"> + <a-tag> {{ dict.authType[text] }} </a-tag> + </template> + + <span slot="action" slot-scope="text, record"> + <a-space> + <a-button type="link" @click="handleEdit(record)">缂栬緫</a-button> + <a-button class="delete" type="link" @click="handleDel(record.id)" + >鍒犻櫎</a-button + > + </a-space> + </span> + </a-table> + <!-- 鏂板銆佺紪杈� --> + <AddResurce + ref="AddResurce" + :title="title" + :visible.sync="visible" + :dict="dict" + @add="getResourceList" + ></AddResurce> + </div> +</template> + +<script> +import { getResourceList, delResource } from "@/api/resource"; +import AddResurce from "./components/AddResurce.vue"; +export default { + components: { + AddResurce, + }, + data() { + const columns = [ + { + title: "搴忓彿", + width: 80, + align: "center", + customRender: (text, record, index) => { + return ( + (this.tablePagination.current - 1) * this.tablePagination.pageSize + + index + + 1 + ); + }, + }, + { + title: "鍚嶇О", + width: 400, + dataIndex: "name", + }, + { + title: "璧勬簮", + dataIndex: "url", + scopedSlots: { customRender: "url" }, + }, + { + title: "璁よ瘉绫诲瀷", + width: 200, + dataIndex: "authType", + scopedSlots: { customRender: "authType" }, + }, + + { + title: "鎿嶄綔", + width: 150, + align: "center", + scopedSlots: { customRender: "action" }, + }, + ]; + return { + loading: false, + visible: false, + title: "鏂板璧勬簮", + columns, + searchForm: { + name: "", + authType: "", + }, + dict: {}, // 瀛楀吀 + selectedRowKeys: [], + tableSourceData: [], + tablePagination: { + current: 1, + pageSize: 10, + total: 0, + showQuickJumper: true, //鏄惁鍙互蹇€熻烦杞嚦鏌愰〉 + showSizeChanger: true, //鏄惁鍙互鏀瑰彉 pageSize + showTotal: (total, range) => `鍏�${total}鏉, + pageSizeOptions: ["10", "20", "30"], + }, + }; + }, + created() { + this.getResourceList(); + }, + methods: { + // 鑾峰彇鍒楄〃鏁版嵁 + async getResourceList() { + this.loading = true; + let res = await getResourceList({ + page: this.tablePagination.current, + size: this.tablePagination.pageSize, + ...this.searchForm, + name: `%${this.searchForm.name}%`, + }); + this.loading = false; + if (res.code !== 1) return; + let { data, dict, total } = res.data; + if (!data.length && this.tablePagination.current > 1) { + this.tablePagination.current -= 1; + this.getResourceList(); + } + data.forEach((v) => { + v.url = v.url.split(","); + }); + this.tableSourceData = data; + this.dict = dict; + this.tablePagination.total = total; + }, + // 鏂板 + addSresource() { + this.title = "鏂板璧勬簮"; + this.$refs.AddResurce.onAdd(); + this.visible = true; + }, + // 鎼滅储 + handleSerch() { + this.tablePagination.current = 1; + this.getResourceList(); + }, + // 閲嶇疆鎼滅储 + resetList() { + Object.assign(this.searchForm, this.$options.data().searchForm); + this.tablePagination.current = 1; + this.getResourceList(); + }, + // 鍒嗛〉 + pagTableChange({ current, pageSize }) { + this.tablePagination.current = current; + this.tablePagination.pageSize = pageSize; + this.getResourceList(); + }, + // 缂栬緫 + handleEdit(row) { + this.title = "缂栬緫璧勬簮"; + this.$refs.AddResurce.onEdit(row); + this.visible = true; + }, + // 鍕鹃€� + onSelectChange(keys) { + this.selectedRowKeys = keys; + }, + // 鎵归噺鍒犻櫎 + delAll() { + if (!this.selectedRowKeys.length) { + this.$message.warning("璇峰厛鍕鹃€夋暟鎹�"); + return; + } + let ids = this.selectedRowKeys.join(","); + this.handleDel(ids); + }, + // 鍒犻櫎 + handleDel(id) { + let _this = this; + this.$confirm({ + okType: "danger", + title: "绯荤粺鎻愮ず", + content: "姝ゆ搷浣滃皢鍒犻櫎璇ヨ祫婧愪俊鎭紝鏄惁缁х画?", + okText: "鏄�", + cancelText: "鍚�", + centered: true, + async onOk() { + let res = await delResource({ + id, + }); + let { code, msg } = res; + if (code == 1) { + _this.$message.success(msg); + _this.getResourceList(); + } + }, + }); + }, + }, +}; +</script> + +<style lang="less" scoped> +.header_box { + padding-bottom: 1rem; +} +</style> diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/authorityMis.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/authorityMis.vue index e5efc91ae7bc0669eb77ff81c8197bf6347d891a..33ae42c79460dfaab56e63e467bbb6cf9c31a698 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/authorityMis.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/authorityMis.vue @@ -30,6 +30,7 @@ :dataSource="tableSourceData" > <template slot="operation" slot-scope="text, record, index"> + <a-button type="link" @click="apportion(record)">鍒嗛厤璧勬簮</a-button> <a-button type="link" @click="pushRouter(record)">鍔熻兘鎺堟潈</a-button> <a-button type="link" @click="showRoleEditModal(true, record)" >缂栬緫</a-button @@ -53,20 +54,30 @@ :roleDict="roleDict" @getRoleList="getRoleList" /> + <!-- 鍒嗛厤鏉冮檺 --> + <ApportionAuth + ref="ApportionAuth" + :visible.sync="authVisible" + ></ApportionAuth> </div> </div> </template> <script> -import { deepClone } from "@/utils/js/common.js"; import { roleList, roleDelete } from "@/api/authorityMis.js"; import AddEditRole from "./components/addEditRole.vue"; +import ApportionAuth from "./components/ApportionAuth.vue"; import { mapState } from "vuex"; export default { name: "PortalAdminVueAuthorityMis", + components: { + AddEditRole, + ApportionAuth, + }, data() { return { searchRoleName: undefined, + authVisible: false, tableLoading: false, tablePagination: { current: 1, @@ -106,7 +117,7 @@ export default { { title: "鎿嶄綔", align: "center", - width: "200px", + width: "250px", dataIndex: "operation", scopedSlots: { customRender: "operation", @@ -118,9 +129,7 @@ export default { roleDict: {}, }; }, - components: { - AddEditRole, - }, + computed: { ...mapState("user", ["userData"]), }, @@ -196,6 +205,11 @@ export default { }, }); }, + // 鍒嗛厤璧勬簮 + apportion(row) { + this.$refs.ApportionAuth.onAdd(row.id); + this.authVisible = true; + }, }, }; </script> diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/AddResurce.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/AddResurce.vue new file mode 100644 index 0000000000000000000000000000000000000000..cffe2ebc499174f82ebbfebd80898d85427b19d0 --- /dev/null +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/AddResurce.vue @@ -0,0 +1,219 @@ +<template> + <div class="add-resurce"> + <a-modal + :title="title" + :centered="true" + :visible="Visible" + @cancel="handleCancel" + width="30%" + :maskClosable="false" + > + <a-form-model + :label-col="{ + span: 5, + }" + :wrapper-col="{ + span: 19, + }" + ref="form" + :model="form" + :rules="rules" + > + <a-form-model-item label="璧勬簮鍚嶇О" prop="name"> + <a-input + placeholder="璇疯緭鍏ヨ祫婧愬悕绉�" + allowClear + v-model="form.name" + /> + </a-form-model-item> + <a-form-model-item label="鏉冮檺绫诲瀷" prop="authType"> + <a-select v-model="form.authType" placeholder="璇烽€夋嫨鏉冮檺绫诲瀷"> + <a-select-option + v-for="(v, key) in dict.authType" + :key="key" + :value="Number(key)" + >{{ v }}</a-select-option + > + </a-select> + </a-form-model-item> + <a-form-model-item label="閾炬帴鍦板潃" prop="url"> + <a-form-model-item + class="url-params" + v-for="(v, i) in form.urls" + :key="i" + :prop="`urls.${i}.value`" + :rules="[ + { required: true, validator: validatorUrl, trigger: 'blur' }, + ]" + > + <a-input + class="mr-[10px]" + v-model="v.value" + placeholder="璇疯緭鍏ラ摼鎺ュ湴鍧€" + /> + <a-space> + <a-button type="primary" @click="changeParams(i, 'add')" + ><a-icon type="plus" + /></a-button> + <a-button + type="danger" + v-if="i > 0" + @click="changeParams(i, 'remove')" + ><a-icon type="minus" + /></a-button> + </a-space> + </a-form-model-item> + </a-form-model-item> + </a-form-model> + <template slot="footer"> + <a-button @click="resetForm">閲嶇疆</a-button> + <a-button type="primary" class="addclass" @click="subForm" + >纭畾</a-button + > + </template> + </a-modal> + </div> +</template> + +<script> +import { saveResource } from "@/api/resource"; +export default { + props: { + title: { + required: true, + type: String, + default: "鏂板璧勬簮", + }, + visible: { + required: true, + type: Boolean, + default: false, + }, + dict: { + required: true, + type: Object, + default: () => {}, + }, + }, + data() { + return { + form: { + name: "", + authType: undefined, + url: "", + urls: [ + { + value: "", + }, + ], + }, + rules: { + name: [{ required: true, message: "璇疯緭鍏ヨ祫婧愬悕绉�", trigger: "blur" }], + authType: [ + { required: true, message: "璇疯緭閫夋嫨鏉冮檺绫诲瀷", trigger: "change" }, + ], + }, + }; + }, + computed: { + Visible: { + get() { + return this.visible; + }, + set(val) { + this.$emit("update:visible", val); + }, + }, + }, + methods: { + onAdd() { + Object.assign(this.form, this.$options.data().form); + this.form.id && this.$delete(this.form, "id"); + }, + onEdit(row) { + setTimeout(() => { + this.form = { ...row }; + this.form.urls = this.form.url.map((v) => { + return { + value: v, + }; + }); + }, 10); + }, + subForm() { + this.$refs.form.validate(async (valid) => { + if (valid) { + let res = await saveResource({ + ...this.form, + url: this.form.urls.map((v) => v.value).join(","), + }); + let { code, msg } = res; + if (code == 1) { + this.$message.success(msg); + this.$emit("add"); + this.handleCancel(); + } + } + }); + }, + + // 鍒ゆ柇鏄惁瀛樺湪閾炬帴 + isRepeat(val) { + return this.form.urls.filter((v) => v.value == val).length > 1; + }, + + // 鏍¢獙閾炬帴鍦板潃 + validatorUrl(rule, value, callback) { + if (!value) { + callback(new Error("璇疯緭鍏ラ摼鎺�")); + } else if (this.isRepeat(value)) { + callback(new Error("閲嶅鐨勯摼鎺ュ湴鍧€")); + } else { + callback(); + } + }, + + changeParams(index, type) { + if (type == "add") { + let obj = { + value: "", + }; + if (this.form.urls.some((v) => !v.value)) { + this.$message.warning("璇峰厛瀹屾垚鍓嶉潰鍦板潃鐨勫~鍐�"); + return; + } + this.form.urls.splice(index + 1, 0, obj); + } else { + this.form.urls.splice(index, 1); + } + }, + + resetForm() { + // 閲嶇疆杩樺師琛ㄥ崟淇℃伅鍐呭 + this.$refs.form.resetFields(); + this.form.urls = [ + { + value: "", + }, + ]; + }, + handleCancel() { + this.resetForm(); + this.Visible = false; + }, + }, +}; +</script> + +<style lang="less" scoped> +/deep/.ant-modal-body { + max-height: 600px; + overflow-y: auto; +} +/deep/.url-params { + .ant-form-item-children { + display: flex; + align-items: center; + } +} +</style> diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/ApportionAuth.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/ApportionAuth.vue new file mode 100644 index 0000000000000000000000000000000000000000..001e08e807b2ae763be73d6fade18645928094ba --- /dev/null +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/ApportionAuth.vue @@ -0,0 +1,192 @@ +<template> + <div class="apportion-auth"> + <a-modal + title="鍒嗛厤璧勬簮" + :centered="true" + :visible="Visible" + @cancel="handleCancel" + width="40%" + :maskClosable="false" + > + <div class="mb-8" v-for="(v, key) in resourceList" :key="key"> + <div class="mb-2" :style="{ borderBottom: '1px solid #E9E9E9' }"> + <span class="text-lg mr-2 font-bold">{{ key }}</span> + <a-checkbox + :indeterminate="v.indeterminate" + :checked="v.checkAll" + @change="onCheckAllChange($event, v)" + > + 鍏ㄩ€� + </a-checkbox> + </div> + <a-checkbox-group + class="w-full" + :value="form.resourceIdList" + @change="onChange($event, v)" + > + <a-row> + <a-col :span="12" v-for="item in v.list" :key="item.id"> + <a-checkbox :value="item.id"> + {{ item.name }} + </a-checkbox> + </a-col> + </a-row> + </a-checkbox-group> + </div> + + <template slot="footer"> + <a-button @click="resetForm">閲嶇疆</a-button> + <a-button type="primary" class="addclass" @click="subForm" + >纭畾</a-button + > + </template> + </a-modal> + </div> +</template> + +<script> +import { + getRoleResourceList, + getResourceList, + distributionSource, +} from "@/api/resource"; +export default { + props: { + visible: { + required: true, + type: Boolean, + default: false, + }, + }, + data() { + return { + form: { + resourceIdList: [], + roleId: "", + }, + rules: {}, + resourceList: {}, // 璧勬簮鍒楄〃 + userResourceList: [], // 鐢ㄦ埛璧勬簮鍒楄〃 + }; + }, + computed: { + Visible: { + get() { + return this.visible; + }, + set(val) { + this.$emit("update:visible", val); + }, + }, + }, + methods: { + // 鑾峰彇璧勬簮鍒楄〃 + async getResourceList() { + let res = await getResourceList({ + page: 1, + size: -1, + }); + if (res.code == 1) { + let { data } = res.data; + this.resourceList = this.groupByAuth(data); + } + }, + // 鑾峰彇瑙掕壊璧勬簮鏉冮檺鍒楄〃 + async getRoleResourceList(roleId) { + let res = await getRoleResourceList({ + size: -1, + page: 1, + roleId, + }); + if (res.code == 1) { + let { data } = res.data; + let arr = data.filter((v) => v.resourceId); + this.form.resourceIdList = arr.map((v) => v.resourceId); + } + }, + + // 鏉冮檺鍒嗙粍 + groupByAuth(list) { + let group = {}; + list.forEach((item) => { + let name = item.name.split("-")[0]; + if (!group[name]) { + group[name] = { + indeterminate: false, + checkAll: false, + list: [], + }; + } + group[name].list.push(item); + }); + return group; + }, + // 鎺у埗鍏ㄩ€� + onCheckAllChange(e, row) { + let rowIds = row.list.map((v) => v.id); + let checked = e.target.checked; + row.indeterminate = false; + row.checkAll = checked; + if (checked) { + this.form.resourceIdList = [ + ...new Set([...this.form.resourceIdList, ...rowIds]), + ]; + } else { + this.form.resourceIdList = this.form.resourceIdList.filter((v) => { + return !rowIds.includes(v); + }); + } + }, + + // 鎺у埗鍗曢€� + onChange(checkedList, row) { + let rowIds = row.list.map((v) => v.id); + this.form.resourceIdList = this.form.resourceIdList.filter((v) => { + return !rowIds.includes(v); + }); + this.form.resourceIdList = [ + ...new Set([...this.form.resourceIdList, ...checkedList]), + ]; + row.indeterminate = + !!checkedList.length && checkedList.length < rowIds.length; + row.checkAll = checkedList.length === rowIds.length; + }, + + onAdd(roleId) { + Object.assign(this.form, this.$options.data().form); + this.form.roleId = roleId; + this.getResourceList(); + this.getRoleResourceList(roleId); + }, + + async subForm() { + let res = await distributionSource(this.form); + if (res.code == 1) { + this.$message.success("娣诲姞鎴愬姛"); + this.handleCancel(); + } + }, + + resetForm() { + this.form.resourceIdList = []; + Object.keys(this.resourceList).forEach((key) => { + this.resourceList[key].checkAll = false; + this.resourceList[key].indeterminate = false; + }); + // 閲嶇疆杩樺師琛ㄥ崟淇℃伅鍐呭 + // this.$refs.form.resetFields(); + }, + handleCancel() { + this.resetForm(); + this.Visible = false; + }, + }, +}; +</script> + +<style lang="less" scoped> +/deep/.ant-modal-body { + max-height: 700px; + overflow-y: auto; +} +</style> diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue index 82c6373041a4f06d932dd3752ba97b55b776d7e4..2dfe6dddcc6589630abe47a6877fb02f2f65e82d 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue @@ -133,8 +133,10 @@ export default { // 鑾峰彇鍖哄煙鏁版嵁 async getListByParentId(parentId = 0) { let res = await getListByParentId({ parentId }); - let { data } = res.data; - this.treeData = data; + if (res.code == 1) { + let { data } = res.data; + this.treeData = data; + } }, // 寮傛鑾峰彇鍖哄煙 diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue index 00644f7f6a6392ba161524799168d9d09e920d20..583c1e9bc99e4da4888057770ed644f66720cdc5 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue @@ -169,8 +169,10 @@ export default { // 鑾峰彇鍖哄煙鏁版嵁 async getListByParentId(parentId = 0) { let res = await getListByParentId({ parentId }); - let { data } = res.data; - this.treeData = data; + if (res.code == 1) { + let { data } = res.data; + this.treeData = data; + } }, // 寮傛鑾峰彇鍖哄煙 diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/permissionsModel.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/permissionsModel.vue index 3b3df19a07868efd09d53ed9511ed099fd6bd037..a399e5b64fa0ad35ef80f798cc850f75d1317832 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/permissionsModel.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/permissionsModel.vue @@ -62,6 +62,7 @@ export default { <style lang="less" scoped> @headerH: 4.5rem; .Container { + width: 100%; height: 100% !important; // background: #fac; background: #f5f5f5; @@ -146,4 +147,4 @@ export default { // } } } -</style> \ No newline at end of file +</style>