@@ -6,7 +7,7 @@
type="primary"
icon="el-icon-plus"
v-href="'/user/addmanager'"
- >添加子管理员
+ >添加子管理员
@@ -14,22 +15,21 @@
-
-
+
{{scope.row.roleid==100?"是":"否"}}
-
-
+
+
- 分配用户
- 编辑
- 删除
+ 分配用户
+ 编辑
+ 删除
@@ -53,19 +53,19 @@
active-text="全部用户">
-
+
-
-
-
-
+
+
+
export default {
- data() {
+ data () {
return {
- userLoading:false,
- showUserDialog:false,
+ userLoading: false,
+ showUserDialog: false,
allowAdd: true,
loading: false,
- userdata: {}, //当前登录人信息
+ userdata: {}, // 当前登录人信息
manegeList: [],
manageData: {
PageIndex: 1,
PageSize: 50,
TenantId: 0,
- KeyWord: "",
+ KeyWord: '',
RoleId: 0,
CurrentRoleId: 0,
IsRoot: 0
},
manegeTotal: 0,
- checkEstate: false, //当前是否查看项目
+ checkEstate: false, // 当前是否查看项目
delroleData: {
- //删除角色
- ID: "",
+ // 删除角色
+ ID: '',
OwnerID: 1001,
OperaterID: 1,
- ProjectCode: ""
+ ProjectCode: ''
},
delmanagerData: {
- //删除管理员
- ID: "",
+ // 删除管理员
+ ID: '',
OwnerID: 1001,
OperaterID: 1,
- ProjectCode: ""
+ ProjectCode: ''
},
stateData: {
- //更新关联项目
+ // 更新关联项目
Managerid: 1,
Projectcodes: []
},
@@ -128,228 +128,238 @@ export default {
},
searchUserModel: {
PageIndex: 1,
- keyWord: "",
- PageSize:500,
- all:0
+ keyWord: '',
+ PageSize: 500,
+ all: 0
},
- userRet:{
- TotalCount:0,
- Data:[]
+ userRet: {
+ TotalCount: 0,
+ Data: []
},
- currentManager:null,
- multipleSelection:null,
- };
+ currentManager: null,
+ multipleSelection: null
+ }
},
watch: {
- bindwx: function() {
+ bindwx: function () {
if (!this.bindwx) {
- clearInterval(this.timer);
+ clearInterval(this.timer)
}
}
},
- created() {
- this.$store.commit("setCurrentNav","会员管理>>管理员")
+ created () {
+ this.$store.commit('setCurrentNav', '会员管理>>管理员')
this.userdata = JSON.parse(
- window.localStorage.getItem("etorcurrentuser")
- ).Manager;
- this.getmanagerlist();
- this.getUser();
+ window.localStorage.getItem('etorcurrentuser')
+ ).Manager
+ this.getmanagerlist()
+ this.getUser()
},
methods: {
- handleSelectionChange(val){
- this.multipleSelection = val;
+ handleSelectionChange (val) {
+ this.multipleSelection = val
console.log(val)
},
- setUser(manage){
- this.showUserDialog=true;
- this.currentManager=manage;
+ setUser (manage) {
+ this.showUserDialog = true
+ this.currentManager = manage
},
- getUser() {
- this.$api.get("baseinfo/v1/user/Search",this.searchUserModel).then(res => {
- this.userRet=res;
+ getUser () {
+ this.$api.get('baseinfo/v1/user/Search', this.searchUserModel).then(res => {
+ this.userRet = res
})
},
- doSetUser() {
- var data={
- ManagerId:this.currentManager.Id,
- ManagerName:this.currentManager.RealName,
- UserIds:this.multipleSelection.map(m=>m.Id)
- };
- this.$api.post("baseinfo/v1/user/SetManager",data).then(res => {
- this.getUser();
- this.showUserDialog=false;
+ doSetUser () {
+ var data = {
+ ManagerId: this.currentManager.Id,
+ ManagerName: this.currentManager.RealName,
+ UserIds: this.multipleSelection.map(m => m.Id)
+ }
+ this.$api.post('baseinfo/v1/user/SetManager', data).then(res => {
+ this.getUser()
+ this.showUserDialog = false
})
},
- geturl(data) {
- var that = this;
- var id = data.Id;
- var uuid = that.getguid();
+ geturl (data) {
+ var that = this
+ var id = data.Id
+ var uuid = that.getguid()
var url =
this.$api.baseURL +
- "Manager/ManageBindWx?data.Id=" +
+ 'Manager/ManageBindWx?data.Id=' +
id +
- "&data.uuid=" +
- uuid;
- this.bindwx = true;
- this.makeqrcode(url);
- that.timer = setInterval(function() {
- that.time(uuid, that.timer);
- }, 1000);
+ '&data.uuid=' +
+ uuid
+ this.bindwx = true
+ this.makeqrcode(url)
+ that.timer = setInterval(function () {
+ that.time(uuid, that.timer)
+ }, 1000)
},
// 获取uuid
- getguid() {
- return "xxxx-xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g, function(c) {
+ getguid () {
+ return 'xxxx-xxxx-4xxx-yxxx-xxxx'.replace(/[xy]/g, function (c) {
+ // eslint-disable-next-line one-var
var r = (Math.random() * 16) | 0,
- v = c == "x" ? r : (r & 0x3) | 0x8;
- return v.toString(16);
- });
+ // eslint-disable-next-line eqeqeq
+ v = c == 'x' ? r : (r & 0x3) | 0x8
+ return v.toString(16)
+ })
},
- time(data, time) {
+ time (data, time) {
this.$api
.getscanbindwxstate(data)
.then(res => {
- console.log(res);
+ console.log(res)
+ // eslint-disable-next-line eqeqeq
if (res.Data.State == 0) {
- clearInterval(time);
- this.getmanagerlist(this.manageData.PageIndex);
- this.bindwx = false;
+ clearInterval(time)
+ this.getmanagerlist(this.manageData.PageIndex)
+ this.bindwx = false
}
})
.catch(res => {
- clearInterval(time);
- });
+ clearInterval(time)
+ })
},
- makeqrcode(url) {
- document.getElementById("qrcode").innerHTML = "";
- new QRCode(document.getElementById("qrcode"), {
+ makeqrcode (url) {
+ document.getElementById('qrcode').innerHTML = ''
+ // eslint-disable-next-line no-new
+ new QRCode(document.getElementById('qrcode'), {
text: url,
width: 127,
height: 127,
- colorDark: "#000000",
- colorLight: "#ffffff",
+ colorDark: '#000000',
+ colorLight: '#ffffff',
+ // eslint-disable-next-line no-undef
correctLevel: QRCode.CorrectLevel.H
- });
+ })
},
- getmanagerlist(val) {
- //获取管理员列表
- var that = this;
- this.loading = true;
- typeof val === "number" && (this.manageData.PageIndex = val);
- var roleid = this.userdata.Roleid;
- this.manageData.CurrentRoleId = roleid;
- this.manageData.IsRoot = 1;
+ getmanagerlist (val) {
+ // 获取管理员列表
+ // eslint-disable-next-line no-unused-vars
+ var that = this
+ this.loading = true
+ typeof val === 'number' && (this.manageData.PageIndex = val)
+ var roleid = this.userdata.Roleid
+ this.manageData.CurrentRoleId = roleid
+ this.manageData.IsRoot = 1
this.$api
- .get("manage/v1/Manager/Get", this.manageData)
+ .get('manage/v1/Manager/Get', this.manageData)
.then(res => {
+ // eslint-disable-next-line eqeqeq
if (res.Code == 10000) {
- this.manegeTotal = res.TotalCount;
- this.manegeList = res.Data;
- console.log(this.manegeList);
+ this.manegeTotal = res.TotalCount
+ this.manegeList = res.Data
+ console.log(this.manegeList)
} else {
this.$message({
- type: "error",
+ type: 'error',
message: res.Message
- });
+ })
}
- this.loading = false;
+ this.loading = false
})
.catch(res => {
- //console.log(res);
- });
+ // console.log(res);
+ })
},
- putManagerdatadomain(e) {
- //更改某管理员关联项目列表
- this.stateData.Projectcodes = e.SelectedCodes;
- //console.log(e);
+ putManagerdatadomain (e) {
+ // 更改某管理员关联项目列表
+ this.stateData.Projectcodes = e.SelectedCodes
+ // console.log(e);
this.$api
.putManagerdatadomain(this.stateData)
.then(res => {
+ // eslint-disable-next-line eqeqeq
if (res.Code == 10000) {
this.$message({
- type: "success",
- message: "修改关联项目成功!"
- });
- this.getmanagerlist();
+ type: 'success',
+ message: '修改关联项目成功!'
+ })
+ this.getmanagerlist()
} else {
this.$message({
- type: "error",
+ type: 'error',
message: res.Message
- });
+ })
}
})
.catch(res => {
- //console.log(res);
- });
+ // console.log(res);
+ })
},
- getManagerdatadomain(id) {
- //获取管理员管理的楼宇编码
+ getManagerdatadomain (id) {
+ // 获取管理员管理的楼宇编码
if (this.checkEstate) {
- this.checkEstate = !this.checkEstate;
+ this.checkEstate = !this.checkEstate
}
this.$api
.getManagerdatadomain({ ID: id })
.then(res => {
+ // eslint-disable-next-line eqeqeq
if (res.Code == 10000) {
- this.stateData.Managerid = res.Data.Managerid;
- this.estateSelected.SelectedCodes = res.Data.Projectcodes;
- this.checkEstate = true;
+ this.stateData.Managerid = res.Data.Managerid
+ this.estateSelected.SelectedCodes = res.Data.Projectcodes
+ this.checkEstate = true
} else {
this.$message({
- type: "error",
+ type: 'error',
message: res.Message
- });
+ })
}
})
.catch(res => {
- //console.log(res);
- });
+ // console.log(res);
+ })
},
- delmanager() {
- //删除管理员
- this.$confirm("确认删除该管理员吗?", "删除", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ delmanager () {
+ // 删除管理员
+ this.$confirm('确认删除该管理员吗?', '删除', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
})
.then(() => {
this.$api
.delmanager(this.delmanagerData)
.then(res => {
+ // eslint-disable-next-line eqeqeq
if (res.Code == 10000) {
this.$message({
- type: "success",
- message: "删除成功"
- });
- this.getmanagerlist(1);
+ type: 'success',
+ message: '删除成功'
+ })
+ this.getmanagerlist(1)
} else {
this.$message({
- type: "error",
+ type: 'error',
message: res.Message
- });
+ })
}
})
.catch(res => {
- //console.log(res);
- });
+ // console.log(res);
+ })
})
.catch(() => {
this.$message({
- type: "info",
- message: "已取消删除"
- });
- });
+ type: 'info',
+ message: '已取消删除'
+ })
+ })
},
- routerGo(item) {
+ routerGo (item) {
this.$router.push({
- name: "addmanager",
+ name: 'addmanager',
query: {
ID: item.Id
}
- });
+ })
}
}
-};
+}
-
diff --git a/src/components/user/statistics.vue b/src/components/user/statistics.vue
index 40dc35d..7cbdd22 100644
--- a/src/components/user/statistics.vue
+++ b/src/components/user/statistics.vue
@@ -27,7 +27,7 @@
end-placeholder="B结束日期"
>
-
+
{{scope.row.UserInfo.Profile}}
@@ -68,21 +68,21 @@
-
+
微信:{{scope.row.UserInfo.Wx}}
- QQ:{{scope.row.UserInfo.QQ}}
+ QQ:{{scope.row.UserInfo.QQ}}
淘宝:{{scope.row.UserInfo.TaoBao}}
旺旺:{{scope.row.UserInfo.WangWang}}
-
+
-
+
@@ -100,13 +100,13 @@