Commit bf1133fb authored by xd's avatar xd

后台管理系统加加载中,侧边栏修改未测

parent 3f3b03b5
......@@ -8,50 +8,6 @@ import Vant from 'vant';
import { Toast } from 'vant';
import 'vant/lib/index.css';
import vConsole from 'vconsole'
// import VeeValidate, { Validator } from 'vee-validate'
// import cn from 'vee-validate/dist/locale/zh_CN';
// Validator.addLocale(cn)
// Vue.use(VeeValidate, {
// locale: 'zh_CN'
// })
// const dictionary = {
// zh_CN: {
// messages: {
// required: (val) => {
// let msg = ''
// switch (val) {
// case 'logo':
// msg = 'logo'
// break
// case 'name':
// msg = '专柜名称'
// break
// case 'location':
// msg = '专柜地址'
// break
// case 'number':
// msg = '电话号码'
// break
// case 'summaryTitle':
// msg = '摘要信息'
// break
// case 'summary':
// msg = '正文内容'
// break
// case 'banner':
// msg = '轮播图'
// break
// default:;
// }
// msg = msg + '不能为空'
// return msg
// }
// }
// }
// }
// Validator.updateDictionary(dictionary)
Vue.prototype.$vConsole= new vConsole()
Vue.config.productionTip = false
......
......@@ -231,6 +231,7 @@
placeholder="请输入用券金额"
class="right"
style="font-size:14px;"
readonly
@touchstart.native.stop="usageAmountShow = true"
/>
<van-number-keyboard
......
......@@ -416,8 +416,8 @@ export default {
};
getStoreDetail(params).then(res => {
if (res.data.stallInfo != null) {
this.test.manInfo.barName = res.data.stallInfo.name;
sessionStorage.setItem("barName", res.data.stallInfo.name);
this.test.manInfo.barName = res.data.stallInfo.name
sessionStorage.setItem("barName", res.data.stallInfo.name)
}
});
},
......@@ -459,9 +459,6 @@ export default {
handleCoupon() {
this.$router.push("coupon");
},
buttonMainMarketingClick() {
// this.$router.push("home")
},
menuBarClick(inData) {
this.$router.push(inData);
},
......
......@@ -214,7 +214,8 @@ export default {
delete data.clerkId
addGroup(data).then(res => {
if(res.data.isSuccessful == 0) {
this.$message.fail(res.data.msg)
console.log(1);
this.$message.error(res.data.msg)
}else{
this.$emit("handleAddFinish")
}
......@@ -228,18 +229,7 @@ export default {
console.log(res,'人员')
this.peopleList = res.data
})
},
/* handleNodeClick(item, node, self) {
// console.log(item,node,self)
this.params.d_parentId = item.id;
this.paramsForShow.father_name = item.label;
},
checkChange(item, node, self) {},
showTreeData() {
this.showTree = !this.showTree;
},
*/
}
}
};
</script>
......
......@@ -49,9 +49,13 @@ export default {
},
handleDeleteFinish() {
deleteGroup({id: this.nowNode.id}).then(res => {
console.log(res)
})
if(res.result == 'success') {
this.$emit('handleDeleteFinish')
}else {
this.$message.error('修改失败')
}
})
}
}
};
......
......@@ -237,9 +237,13 @@ export default {
let data = Object.assign(this.addForm,{ clerkIds })
delete data.clerkId
editDept(data).then(res => {
console.log(res)
})
if(res.result == 'success') {
this.$emit("handleEditFinish")
}else {
this.$success.err('修改失败')
}
})
},
// 获取所有人员
getGroupMember(id) {
......
......@@ -16,6 +16,8 @@
node-key="id"
@node-click="handleNodeClick"
@check-change="checkChange"
v-loading="orgLoading"
element-loading-text="正在加载数据"
>
</el-tree>
......@@ -47,7 +49,8 @@ export default {
},
data() {
return {
treeData: []
treeData: [],
orgLoading: false
};
},
created() {
......@@ -87,9 +90,11 @@ export default {
},
getList() {
this.orgLoading = true
getOrgTree().then(res => {
console.log(res.data.organizations)
this.treeData = [res.data.organizations];
this.orgLoading = false
});
}
}
......
<template>
<div class="mail">
<div class="left">
<div>
<div v-loading="orgLoading" element-loading-text="正在加载中">
<div class="title">组织架构</div>
<div class="bottom">
<div class="ty" @click="getMailList(1)">
......@@ -64,6 +64,8 @@
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
v-loading="tableLoading"
element-loading-text="正在加载中"
height="calc(100% - 140px)"
@selection-change="handleMemberChange"
>
......@@ -184,7 +186,9 @@ export default {
title: "全部",
totalNumber: "",
nowNode: {},
flag: 0
flag: 0,
orgLoading: false,
tableLoading: false
};
},
components: {
......@@ -199,11 +203,13 @@ export default {
},
methods: {
getOrgTree() {
this.orgLoading = true
getOrgTree().then(res => {
let data = res.data;
this.allNumber = data.numOfClerks;
this.wNumber = data.numOfClerksArrangeNot
this.data1 = [data.organizations];
this.orgLoading = false
});
},
handleTreeClick(data) {
......@@ -261,6 +267,7 @@ export default {
this.handleTypeChange(val,ctPage)
},
getMailList(page,ctPage) {
this.tableLoading = true
this.groupName = ''
this.formData.keywords = ''
this.groupName = "全部"
......@@ -274,6 +281,7 @@ export default {
getAllMemberList(params).then(res => {
this.tableData = res.data.pageInfo.list;
this.page.total = this.totalNumber = this.allNumber = Number(res.data.pageInfo.total);
this.tableLoading = false
});
},
handleShopowner() {},
......@@ -376,21 +384,27 @@ export default {
},
addFinish() {
this.addDialogShow = false
// this.orgLoading = true
this.getOrgTree();
this.getMailList(1,1);
this.$message.success('添加成功')
},
editFinish() {
this.editDialogShow = false
// this.orgLoading = true
this.getOrgTree()
this.getMailList(1,1)
this.$message.success('编辑成功')
},
deleteChild() {
this.deleteDialogShow = true
},
deleteFinish() {
this.deleteDialogShow = false
// this.orgLoading = true
this.getOrgTree();
this.getMailList(1,1);
this.getMailList(1,1)
this.$message.success('删除成功')
}
}
};
......
......@@ -137,6 +137,8 @@ export default {
this.login({
loginName: this.formLogin.username,
loginPwd: md5(this.formLogin.password)
// loginPwd: this.formLogin.password
}).then(() => {
// 重定向对象不存在则返回顶层路径
// this.$router.replace(this.$route.query.redirect || '/home/main')
......
......@@ -17,6 +17,7 @@
"jssdk": "^0.0.1",
"qrcode": "^1.4.4",
"vant": "^2.3.3",
"vconsole": "^3.3.4",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
......
......@@ -6,7 +6,9 @@ import store from './store'
import './lib/rem';
import Vant from 'vant';
import 'vant/lib/index.css';
import vConsole from 'vconsole'
Vue.prototype.$vConsole= new vConsole()
Vue.config.productionTip = false
Vue.use(Vant);
......
......@@ -67,8 +67,13 @@
};
},
mounted() {
if (sessionStorage.getItem("userId")) {
this.zcache.userId = sessionStorage.getItem("userId")
}else{
this.zReadyUserId();
this.zTestGetNowUrlInfo();
}
},
created() {
},
......@@ -134,9 +139,10 @@
headers: headerData,
})
.then(res => {
this.zcache.userInfoResNew = "RESOK:" + res.data.data.userId;
sessionStorage.setItem("userId", String(res.data.data.userId));
this.zcache.userInfoResNew = "RESOK:" + res.data.data.userId
sessionStorage.setItem("userId", String(res.data.data.userId))
this.zcache.userId = String(res.data.data.userId);
sessionStorage.setItem("userId", String(res.data.data.userId))
})
.catch(err => {
this.zcache.userInfoResNew = "RESERR.";
......
......@@ -88,7 +88,11 @@ export default {
};
},
created() {
if(this.$route.params.userId) {
this.zcache.userId = this.$route.params.userId;
}else {
this.zcache.userId = sessionStorage.getItem("userId")
}
this.zReadyGetUserFromId();
this.getAgentAuth();
// this.zReadySetVoucherList()
......
......@@ -30,16 +30,22 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
}
],
storeCode: '',
oyStallCode: ''
oyStallCode: '',
userId: ''
}
},
created() {
if(this.$route.params.userId) {
this.userId = this.$route.params.userId;
}else {
this.userId = sessionStorage.getItem("userId")
}
this.zReadyGetUserFromId()
this.getAgentAuth()
},
methods:{
zReadyGetUserFromId() {
let userName = this.$route.params.userId
let userName = this.userId
getUserInfoByUserId({ userName }).then(res => {
// alert('获取成功')
this.storeCode = res.data[0].oyStallMemberId
......
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