Commit 667403bc authored by “yiyousong”'s avatar “yiyousong”

pref:修改菜单页面

parent a838779e
...@@ -9,6 +9,26 @@ ...@@ -9,6 +9,26 @@
<title> <title>
<%= htmlWebpackPlugin.options.title %> <%= htmlWebpackPlugin.options.title %>
</title> </title>
<style>
*,
:after,
:before {
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
-o-box-sizing: border-box !important;
-ms-box-sizing: border-box !important;
box-sizing: border-box !important;
}
html,
body {
font-size: 16px;
font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", "微软雅黑",
sans-serif !important;
width: 100%;
height: 100%;
}
</style>
</head> </head>
<body style="font-size: 16px;"> <body style="font-size: 16px;">
......
<template> <template>
<div id="app"> <div class="app">
<a-spin v-bind="loadingProps"> <a-spin v-bind="loadingProps">
<a-config-provider :locale="zh_CN"> <a-config-provider :locale="zh_CN">
<router-view /> <router-view />
...@@ -49,34 +49,17 @@ export default { ...@@ -49,34 +49,17 @@ export default {
}, },
}; };
</script> </script>
<style lang="less"> <style lang="less" scoped>
*, .app {
:after,
:before {
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
-o-box-sizing: border-box !important;
-ms-box-sizing: border-box !important;
box-sizing: border-box !important;
}
html,
body,
#app {
font-size: 16px;
font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", "微软雅黑",
sans-serif !important;
width: 100%;
height: 100%;
}
#app {
width: 100% !important; width: 100% !important;
min-width: 1440px !important; min-width: 1440px !important;
height: 100%;
} }
.ant-spin-nested-loading, .ant-spin-nested-loading,
.ant-spin-container { /deep/.ant-spin-container {
width: 100%; width: 100%;
min-height: 100% !important; min-height: 100% !important;
display: flex; display: flex;
// flex-direction: column;
} }
</style> </style>
...@@ -42,9 +42,9 @@ service.interceptors.response.use( ...@@ -42,9 +42,9 @@ service.interceptors.response.use(
message: msg, message: msg,
maxCount: 1, maxCount: 1,
}); });
Storage.remove(2, "userInfo"); Storage.clear(2);
Storage.remove(2, "siteId"); // Storage.remove(2, "siteId");
Storage.remove(2, "Authorization"); // Storage.remove(2, "Authorization");
router.push("/"); router.push("/");
} }
} }
...@@ -56,9 +56,6 @@ service.interceptors.response.use( ...@@ -56,9 +56,6 @@ service.interceptors.response.use(
case 400: case 400:
error.message = "错误请求"; error.message = "错误请求";
break; break;
case 401:
error.message = "未授权,请重新登录";
break;
case 403: case 403:
error.message = "拒绝访问"; error.message = "拒绝访问";
break; break;
...@@ -92,14 +89,15 @@ service.interceptors.response.use( ...@@ -92,14 +89,15 @@ service.interceptors.response.use(
default: default:
error.message = `连接错误${error.response.status}`; error.message = `连接错误${error.response.status}`;
} }
message.error(error.message);
} else { } else {
if (JSON.stringify(error).includes("timeout")) { if (JSON.stringify(error).includes("timeout")) {
Vue.prototype.$message.error("服务器响应超时,请刷新当前页"); Vue.prototype.$message.error("服务器响应超时,请刷新当前页");
} }
error.message = "连接服务器失败"; error.message = "连接服务器失败";
} }
Vue.prototype.$setLoading(false); Vue.prototype.$setLoading(false);
// message.error(error.message);
return Promise.resolve(error.response); return Promise.resolve(error.response);
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
alt alt
/> />
</div> </div>
<h5 style="margin-top: 10px">{{ item.modelName }}</h5> <div class="name" style="margin-top: 10px">{{ item.modelName }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -129,8 +129,9 @@ export default { ...@@ -129,8 +129,9 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.mod_max { .mod_max {
width: 96px;
height: 115px; height: 115px;
margin-right: 39px; margin-left: 39px;
margin-top: 5px; margin-top: 5px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
...@@ -144,11 +145,15 @@ export default { ...@@ -144,11 +145,15 @@ export default {
background-color: rgba(84, 120, 140, 1); background-color: rgba(84, 120, 140, 1);
} }
h5 { .name {
width: 100%;
font-weight: 700; font-weight: 700;
font-size: 16px; font-size: 16px;
color: #ffffff; color: #ffffff;
padding-top: 5px; padding-top: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
} }
......
...@@ -82,8 +82,6 @@ export default { ...@@ -82,8 +82,6 @@ export default {
this.stepsList = data.data; this.stepsList = data.data;
// console.log(this.stepsList); // console.log(this.stepsList);
this.searchVal = undefined; this.searchVal = undefined;
} else {
this.$message.error(res.msg);
} }
}); });
}, },
......
...@@ -160,8 +160,6 @@ export default { ...@@ -160,8 +160,6 @@ export default {
this.stepsList = data.data; this.stepsList = data.data;
console.log(this.stepsList); console.log(this.stepsList);
this.searchVal = undefined; this.searchVal = undefined;
} else {
this.$message.error(res.msg);
} }
}); });
}, },
......
...@@ -240,35 +240,6 @@ export default { ...@@ -240,35 +240,6 @@ export default {
align-items: center; align-items: center;
.range_picker_style { .range_picker_style {
margin-right: 20px; margin-right: 20px;
// color: #32a6fb !important;
.ant-calendar-picker-input {
// background: transparent !important;
// border-color: #32a6fb !important;
// color: #32a6fb !important;
}
.ant-calendar-range-picker-separator {
// color: #32a6fb !important;
}
::-webkit-input-placeholder {
/* WebKit browsers,webkit内核浏览器 */
// color: #32a6fb;
// font-size: 16px;
}
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
// color: #32a6fb;
// font-size: 16px;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
// color: #32a6fb;
// font-size: 16px;
}
:-ms-input-placeholder {
/* Internet Explorer 10+ */
// color: #32a6fb;
// font-size: 16px;
}
} }
/deep/.ant-input-affix-wrapper { /deep/.ant-input-affix-wrapper {
width: 15rem !important; width: 15rem !important;
...@@ -330,9 +301,6 @@ export default { ...@@ -330,9 +301,6 @@ export default {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
/deep/.ant-table-pagination {
float: left !important;
}
} }
} }
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<a-tabs v-model="tabsActive" @change="tabsChange" :forceRender="false"> <a-tabs v-model="tabsActive" @change="tabsChange" :forceRender="false">
<a-tab-pane <a-tab-pane
:key="item.path" :key="item.path"
v-for="(item, index) of tabsList['children']" v-for="item of tabsList['children']"
:tab="item['meta']['title']" :tab="item['meta']['title']"
> >
</a-tab-pane> </a-tab-pane>
...@@ -50,6 +50,9 @@ export default { ...@@ -50,6 +50,9 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
/deep/.ant-spin-container {
display: block;
}
.Container { .Container {
height: 100% !important; height: 100% !important;
// background: #fac; // background: #fac;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:centered="true" :centered="true"
:destroyOnClose="true" :destroyOnClose="true"
:getContainer="() => $refs.EditModal_box" :getContainer="() => $refs.EditModal_box"
:visible="EditModalVisible" :visible="visible"
:confirmLoading="EditModalLoading" :confirmLoading="EditModalLoading"
@cancel="handleClose" @cancel="handleClose"
width="33%" width="33%"
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
:model="compileInfoForm" :model="compileInfoForm"
:rules="Rules" :rules="Rules"
> >
<a-form-model-item label="类型" prop="menuType"> <!-- <a-form-model-item label="类型" prop="menuType">
<a-radio-group v-model="compileInfoForm.menuType"> <a-radio-group v-model="compileInfoForm.menuType">
<a-radio v-for="v in MenuDict" :key="v.id" :value="v.id" <a-radio v-for="(val, key) in MenuDict" :key="val" :value="key"
>{{ v.name }} >{{ val }}
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</a-form-model-item> </a-form-model-item> -->
<a-form-model-item label="名称" prop="name"> <a-form-model-item label="名称" prop="name">
<a-input <a-input
...@@ -39,16 +39,14 @@ ...@@ -39,16 +39,14 @@
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
label="菜单路径" label="父级菜单"
prop="parentId" prop="parentId"
v-if="formTitle == '编辑'" v-if="formTitle == '编辑'"
> >
<MyMenuTree <a-input
expandTrigger="hover" placeholder="请输入名称"
v-model="compileInfoForm.parentId" allowClear
:options="MenuDict.MenuTree" v-model="compileInfoForm.name"
placeholder="请选择菜单路径"
@onChange="onChange"
/> />
</a-form-model-item> </a-form-model-item>
<!-- <a-form-model-item> <!-- <a-form-model-item>
...@@ -110,15 +108,18 @@ ...@@ -110,15 +108,18 @@
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="图标" prop="imgPath"> <a-form-model-item label="图标" prop="imgPath">
<MyUpload <a-upload
:uploadInfo="uploadInfo" name="file"
v-model="compileInfoForm.imgPath" :action="api + 'zwfw/file/commonupload'"
@uploadChange="uploadChange" :multiple="false"
:file-list="fileList"
@change="handleChangeFile"
accept="image/jpeg,image/png"
> >
<a-button style="background: #04ca8f; color: #fff" <a-button type="primary">
>选择文件</a-button <a-icon type="upload" /> 选择文件
> </a-button>
</MyUpload> </a-upload>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="序号" prop="orderId"> <a-form-model-item label="序号" prop="orderId">
...@@ -146,15 +147,29 @@ ...@@ -146,15 +147,29 @@
</template> </template>
<script> <script>
import { deepClone } from "@/utils/js/common.js";
import { menuSave } from "@/api/menuMgmt.js"; import { menuSave } from "@/api/menuMgmt.js";
export default { export default {
name: "PortalAdminVueAddEdit", name: "PortalAdminVueAddEdit",
data() { data() {
return { return {
EditModalVisible: false, //模态 api: process.env.VUE_APP_API_BASE_URL + "/",
EditModalLoading: false, //确定回调 loading EditModalLoading: false, //确定回调 loading
compileInfoForm: {}, //页面表单信息 compileInfoForm: {
name: "",
url: "",
parentId: "",
linkType: "",
imgPath: "",
buttonImgPath: "",
imgCommPath: "",
visible: "",
menuType: "",
status: "",
authType: "",
orderId: "",
createUserName: "",
remark: "",
}, //页面表单信息
Rules: { Rules: {
firstLevel: [ firstLevel: [
//一级菜单 //一级菜单
...@@ -207,7 +222,7 @@ export default { ...@@ -207,7 +222,7 @@ export default {
imgPath: [ imgPath: [
//图标 //图标
{ {
required: false, //是否必选 required: true, //是否必选
message: "请选择图标", message: "请选择图标",
trigger: "change", trigger: "change",
}, },
...@@ -247,11 +262,18 @@ export default { ...@@ -247,11 +262,18 @@ export default {
limit: 1, //限制文件上传数量 limit: 1, //限制文件上传数量
whiteFileList: ["jpg", "jpeg", "png", "gif", "bmp"], whiteFileList: ["jpg", "jpeg", "png", "gif", "bmp"],
}, },
fileList: [],
toStr: ["menuType"], toStr: ["menuType"],
}; };
}, },
props: { props: {
MenuDict: { MenuDict: {
type: Object,
default: () => {
return {};
},
},
MenuList: {
type: Array, type: Array,
default: () => { default: () => {
return []; return [];
...@@ -263,102 +285,89 @@ export default { ...@@ -263,102 +285,89 @@ export default {
return "编辑"; return "编辑";
}, },
}, },
sourceInfoForm: { EditModalVisible: {
type: Object, type: Boolean,
default: () => { required: true,
return {}; default: false,
},
}, },
}, },
watch: { computed: {
sourceInfoForm: { visible: {
handler(newValue, oldValue) { get() {
// console.log(newValue); return this.EditModalVisible;
// console.log(oldValue); },
this.compileInfoForm = deepClone(newValue); set(val) {
this.toStr.map((item) => { this.$emit("update:EditModalVisible", val);
this.compileInfoForm[item] = this.compileInfoForm[item]
? this.compileInfoForm[item].toString()
: "0";
});
// for (let key in this.Rules) {
// this.Rules[key][0].required = this.formTitle == "添加";
// }
}, },
deep: true,
}, },
}, },
mounted() {}, mounted() {},
methods: { methods: {
// 上传
handleChangeFile(info) {
let fileList = [...info.fileList];
fileList = fileList.slice(-1);
fileList = fileList.map((file) => {
if (file.response) {
file.url = file.response.url;
}
return file;
});
this.fileList = fileList;
if (this.fileList.length) {
this.compileInfoForm.imgPath = this.fileList[0].url;
} else {
this.compileInfoForm.imgPath = "";
}
},
onChange(val) { onChange(val) {
console.log(val); console.log(val);
}, },
uploadChange(fileInfo) {
this.uploadInfo.fileList = deepClone(fileInfo.fileList);
},
Modal_Ok() { Modal_Ok() {
this.$refs.compileInfoForm.validate((valid) => { this.$refs.compileInfoForm.validate((valid) => {
if (valid) { if (valid) {
let submitObj = { menuSave(this.compileInfoForm).then((res) => {
name: this.compileInfoForm["name"],
url: this.compileInfoForm["url"],
parentId: this.compileInfoForm["parentId"],
linkType: this.compileInfoForm["linkType"],
imgPath: this.compileInfoForm["imgPath"],
buttonImgPath: this.compileInfoForm["buttonImgPath"],
imgCommPath: this.compileInfoForm["imgCommPath"],
visible: this.compileInfoForm["visible"],
menuType: this.compileInfoForm["menuType"],
status: this.compileInfoForm["status"],
authType: this.compileInfoForm["authType"],
orderId: this.compileInfoForm["orderId"],
createUserName: this.compileInfoForm["createUserName"],
remark: this.compileInfoForm["remark"],
};
submitObj = JSON.parse(JSON.stringify(submitObj)); //过滤空值
if (this.formTitle == "编辑") {
submitObj["id"] = this.compileInfoForm["id"];
}
// console.log(submitObj);
// 提交成功 重新拉取父组件table data
menuSave(submitObj).then((res) => {
// console.log(res);
if (res.code == 1) { if (res.code == 1) {
this.$emit("getMenuList"); this.$emit("getMenuList");
// this.$message.success(res.msg); this.$message.success(res.msg);
this.EditModalVisible = false; this.handleClose();
} }
}); });
} else {
this.$message.error(`请完善表单信息!`);
return false;
} }
}); });
}, },
resetForm() { resetForm() {
// 重置还原表单信息内容 // 重置还原表单信息内容
this.$set(this, "compileInfoForm", this.sourceInfoForm);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.compileInfoForm.resetFields(); this.$refs.compileInfoForm.resetFields();
}); });
}, },
firstLevelChange(val) { // 新增
this.compileInfoForm["firstLevel"] = onAdd(type, parent) {
this.MenuDict.firstLevelOptions.filter((v) => v.id == val)[0]["name"]; Object.assign(this.compileInfoForm, this.$options.data().compileInfoForm);
this.compileInfoForm["firstLevel"]; this.compileInfoForm.id && this.$delete(this.compileInfoForm, "id");
}, this.compileInfoForm.menuType = type;
secondLevelChange(val) { this.compileInfoForm.parentId = parent;
this.compileInfoForm["secondLevel"] = console.log(this.compileInfoForm);
this.MenuDict.secondLevelOptions.filter((v) => v.id == val)[0]["name"];
this.compileInfoForm["secondLevel"];
}, },
thirdLevelChange(val) { // 编辑
this.compileInfoForm["thirdLevel"] = onEdit(row) {
this.MenuDict.thirdLevelOptions.filter((v) => v.id == val)[0]["name"]; this.compileInfoForm = { ...row };
this.fileList = [
{
uid: -1,
name: this.compileInfoForm.imgPath,
url: this.compileInfoForm.imgPath,
status: "done",
},
];
}, },
// 关闭弹窗 // 关闭弹窗
handleClose() { handleClose() {
this.EditModalVisible = false; this.fileList = [];
this.$refs.compileInfoForm.resetFields();
this.visible = false;
}, },
}, },
}; };
......
<template> <template>
<div class="menuMgmt"> <div class="menuMgmt">
<div class="header_box"> <div class="header_box">
<button class="add_btn" @click="showEditModal(1)"> <a-button type="primary" @click="showEditModal(1)">新增</a-button>
<span>新增</span>
</button>
<span> <span>
<a-input v-model="searchForm.name" placeholder="请输入菜单名称搜索"> <a-input v-model="searchForm.name" placeholder="请输入菜单名称搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
...@@ -29,6 +27,7 @@ ...@@ -29,6 +27,7 @@
:loading="tableLoading" :loading="tableLoading"
:columns="tableHeaders" :columns="tableHeaders"
:dataSource="menusTreeData" :dataSource="menusTreeData"
:expandIconColumnIndex="1"
> >
<!-- 序号 --> <!-- 序号 -->
<template slot="index" slot-scope="text, record, index"> <template slot="index" slot-scope="text, record, index">
...@@ -48,7 +47,7 @@ ...@@ -48,7 +47,7 @@
<!-- 操作 --> <!-- 操作 -->
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button <a-button
style="color: #8ae7d2" style="color: #03d76f"
type="link" type="link"
@click="showEditModal(2, record)" @click="showEditModal(2, record)"
>添加</a-button >添加</a-button
...@@ -66,9 +65,10 @@ ...@@ -66,9 +65,10 @@
</a-table> </a-table>
<addEdit <addEdit
ref="addEdit" ref="addEdit"
:sourceInfoForm="sourceInfoForm" :EditModalVisible.sync="EditModalVisible"
:formTitle="formTitle" :formTitle="formTitle"
:MenuDict="MenuDict" :MenuDict="MenuDict"
:MenuList="menusTreeData"
@getMenuList="getMenuList" @getMenuList="getMenuList"
/> />
</div> </div>
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
</template> </template>
<script> <script>
import { deepClone } from "@/utils/js/common.js";
import { menuDelete, menuList } from "@/api/menuMgmt.js"; import { menuDelete, menuList } from "@/api/menuMgmt.js";
import addEdit from "./components/addEdit.vue"; import addEdit from "./components/addEdit.vue";
// import { version } from "vue"; // import { version } from "vue";
...@@ -87,9 +86,8 @@ export default { ...@@ -87,9 +86,8 @@ export default {
name: "PortalAdminVueMenuMgmt", name: "PortalAdminVueMenuMgmt",
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("zwfw") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("zwfw", "") EditModalVisible: false,
: process.env.VUE_APP_API_BASE_URL + "/",
searchForm: { searchForm: {
name: undefined, name: undefined,
parentId: "", parentId: "",
...@@ -97,10 +95,6 @@ export default { ...@@ -97,10 +95,6 @@ export default {
tableLoading: false, tableLoading: false,
selectOptions: [], selectOptions: [],
tableHeaders: [ tableHeaders: [
{
width: "60px",
align: "center",
},
{ {
width: "60px", width: "60px",
title: "序号", title: "序号",
...@@ -112,27 +106,11 @@ export default { ...@@ -112,27 +106,11 @@ export default {
{ {
width: "150px", width: "150px",
title: "名称", title: "名称",
align: "center", align: "left",
dataIndex: "name", dataIndex: "name",
ellipsis: true, ellipsis: true,
}, },
// {
// title: "一级菜单",
// align: "center",
// dataIndex: "firstLevel",
// },
// {
// title: "二级菜单",
// align: "center",
// dataIndex: "secondLevel",
// },
// {
// title: "三级菜单",
// align: "center",
// dataIndex: "thirdLevel",
// },
{ {
title: "地址", title: "地址",
align: "center", align: "center",
...@@ -176,7 +154,7 @@ export default { ...@@ -176,7 +154,7 @@ export default {
defaultPageSize: 2000, defaultPageSize: 2000,
showTotal: (total, range) => `共${total}条`, showTotal: (total, range) => `共${total}条`,
}, },
MenuDict: [], MenuDict: {},
firstStair: [], // 一级菜单 firstStair: [], // 一级菜单
menusTreeData: [], // 菜单树形结构数据 menusTreeData: [], // 菜单树形结构数据
}; };
...@@ -189,20 +167,20 @@ export default { ...@@ -189,20 +167,20 @@ export default {
}, },
methods: { methods: {
// 对象转对象数组 // 对象转对象数组
transverter(obj) { // transverter(obj) {
return Object.keys(obj).map((v) => { // return Object.keys(obj).map((v) => {
return { // return {
id: v, // id: v,
name: obj[v], // name: obj[v],
}; // };
}); // });
}, // },
// 过滤菜单类型 // 过滤菜单类型
filterMenuType(val) { filterMenuType(val) {
let str = ""; let str = "";
this.MenuDict.forEach((v) => { Object.keys(this.MenuDict).forEach((key) => {
if (val == v.id) { if (val == key) {
str = v.name; str = this.MenuDict[key];
} }
}); });
return str; return str;
...@@ -232,10 +210,11 @@ export default { ...@@ -232,10 +210,11 @@ export default {
let { data, total, dict } = res.data; let { data, total, dict } = res.data;
let { menuType } = dict; let { menuType } = dict;
this.tablePagination.total = total; this.tablePagination.total = total;
this.MenuDict = this.transverter(menuType); this.MenuDict = menuType;
this.firstStair = data.filter((v) => v.parentId === -1); this.firstStair = data.filter((v) => v.parentId === -1);
let childrens = data.filter((v) => v.parentId !== -1); let childrens = data.filter((v) => v.parentId !== -1);
this.menusTreeData = this.fliterEvent(this.firstStair, childrens); this.menusTreeData = this.fliterEvent(this.firstStair, childrens);
console.log(this.MenuDict);
}, },
// 搜索 // 搜索
async searchData() { async searchData() {
...@@ -258,54 +237,17 @@ export default { ...@@ -258,54 +237,17 @@ export default {
this.getMenuList(); this.getMenuList();
}, },
showEditModal(type, row) { showEditModal(type, row) {
// type 1 新增根节点-1 , 2 在此节点创建,3,编辑
if (type === 1) { if (type === 1) {
let obj = {
parentId: -1, //默认创建根节点
name: undefined,
url: undefined,
linkType: undefined,
imgPath: undefined,
buttonImgPath: undefined,
imgCommPath: undefined,
visible: undefined,
menuType: undefined,
status: undefined,
authType: undefined,
orderId: undefined,
createUserName: undefined,
remark: "",
visible: 1,
status: 1,
};
this.sourceInfoForm = deepClone(obj);
this.formTitle = "新增"; this.formTitle = "新增";
this.$refs.addEdit.onAdd(0, -1);
} else if (type === 2) { } else if (type === 2) {
let obj = { this.formTitle = "新增子级菜单";
parentId: row.id, //父节点id this.$refs.addEdit.onAdd(1, row.id);
name: undefined, } else if (3) {
url: undefined,
linkType: undefined,
imgPath: undefined,
buttonImgPath: undefined,
imgCommPath: undefined,
visible: undefined,
menuType: undefined,
status: undefined,
authType: undefined,
orderId: undefined,
createUserName: undefined,
remark: "",
visible: 1,
status: 1,
};
this.sourceInfoForm = deepClone(obj);
this.formTitle = "添加";
} else if (type === 3) {
this.sourceInfoForm = deepClone(row);
this.formTitle = "编辑"; this.formTitle = "编辑";
this.$refs.addEdit.onEdit(row);
} }
this.$refs.addEdit.EditModalVisible = true; this.EditModalVisible = true;
}, },
//删除 //删除
deleteRole(row, index) { deleteRole(row, index) {
...@@ -324,7 +266,7 @@ export default { ...@@ -324,7 +266,7 @@ export default {
//重新获取table数据 //重新获取table数据
_this.$nextTick(() => { _this.$nextTick(() => {
_this.getMenuList(); _this.getMenuList();
// _this.$message.success(res.data.message); _this.$message.success(res.msg);
}); });
} }
}); });
...@@ -336,6 +278,9 @@ export default { ...@@ -336,6 +278,9 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
.menuMgmt { .menuMgmt {
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
...@@ -454,9 +399,6 @@ export default { ...@@ -454,9 +399,6 @@ export default {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
/deep/.ant-table-pagination {
float: left !important;
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -209,6 +209,9 @@ export default { ...@@ -209,6 +209,9 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
.authorityMis { .authorityMis {
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
...@@ -306,9 +309,6 @@ export default { ...@@ -306,9 +309,6 @@ export default {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
/deep/.ant-table-pagination {
float: left !important;
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -133,8 +133,6 @@ export default { ...@@ -133,8 +133,6 @@ export default {
this.$emit("getRoleList"); this.$emit("getRoleList");
// this.$message.success(res.msg); // this.$message.success(res.msg);
this.roleEditModalVisible = false; this.roleEditModalVisible = false;
} else {
this.$message.error(res.msg);
} }
}); });
} else { } else {
......
...@@ -243,8 +243,6 @@ export default { ...@@ -243,8 +243,6 @@ export default {
// this.permsForm.menuIdList = this.getCheckedlist(data.menuIdList); // this.permsForm.menuIdList = this.getCheckedlist(data.menuIdList);
this.permsForm.menuIdList = data.menuIdList; this.permsForm.menuIdList = data.menuIdList;
// console.log(this.permsForm.menuIdList); // console.log(this.permsForm.menuIdList);
} else {
this.$message.error(res.msg);
} }
}); });
}, },
......
...@@ -274,6 +274,9 @@ export default { ...@@ -274,6 +274,9 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
.user { .user {
.user_btn { .user_btn {
display: flex; display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment