格式处理
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="heior_box">
|
<div class="heior_box">
|
||||||
@@ -6,7 +7,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
v-href="'/user/addmanager'"
|
v-href="'/user/addmanager'"
|
||||||
>添加子管理员</el-button>
|
>添加子管理员</el-button>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<el-input v-model="manageData.KeyWord" placeholder="用户名/姓名/联系方式" clearable size="small">
|
<el-input v-model="manageData.KeyWord" placeholder="用户名/姓名/联系方式" clearable size="small">
|
||||||
<el-button slot="append" icon="el-icon-search" @click="getmanagerlist(1)"></el-button>
|
<el-button slot="append" icon="el-icon-search" @click="getmanagerlist(1)"></el-button>
|
||||||
@@ -14,22 +15,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<el-table :data="manegeList" size="medium" :height="$getHeight(100)" row-key="Id" border>
|
<el-table :data="manegeList" size="medium" :height="$getHeight(100)" row-key="Id" border>
|
||||||
<el-table-column prop="LoginCode" label="账号"></el-table-column>
|
<el-table-column prop="LoginCode" label="账号"></el-table-column>
|
||||||
<el-table-column prop="RealName" label="姓名"></el-table-column>
|
<el-table-column prop="RealName" label="姓名"></el-table-column>
|
||||||
<el-table-column prop="Phone" label="联系方式"></el-table-column>
|
<el-table-column prop="Phone" label="联系方式"></el-table-column>
|
||||||
<el-table-column prop="CreateTime" label="添加时间"></el-table-column>
|
<el-table-column prop="CreateTime" label="添加时间"></el-table-column>
|
||||||
<el-table-column prop="CreateTime" label="是否客户经理">
|
<el-table-column prop="CreateTime" label="是否客户经理">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.roleid==100?"是":"否"}}
|
{{scope.row.roleid==100?"是":"否"}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="140px">
|
<el-table-column label="操作" width="140px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="handel cursor edit" @click="setUser(scope.row)">分配用户</span>
|
<span class="handel cursor edit" @click="setUser(scope.row)">分配用户</span>
|
||||||
<span class="handel cursor edit" @click="routerGo(scope.row)">编辑</span>
|
<span class="handel cursor edit" @click="routerGo(scope.row)">编辑</span>
|
||||||
<span class="handel cursor del" @click="delmanagerData.ID=scope.row.Id;delmanager()">删除</span>
|
<span class="handel cursor del" @click="delmanagerData.ID=scope.row.Id;delmanager()">删除</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -53,19 +53,19 @@
|
|||||||
active-text="全部用户">
|
active-text="全部用户">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
<el-input placeholder="输入关键字进行过滤" size="small" v-model="searchUserModel.keyWord">
|
<el-input placeholder="输入关键字进行过滤" size="small" v-model="searchUserModel.keyWord">
|
||||||
<el-button slot="append" icon="el-icon-search" @click="getUser"></el-button>
|
<el-button slot="append" icon="el-icon-search" @click="getUser"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="userRet.Data" row-key="Id" border size="medium" height="650px"
|
<el-table :data="userRet.Data" row-key="Id" border size="medium" height="650px"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55">
|
width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="LoginCode" label="账号" ></el-table-column>
|
<el-table-column prop="LoginCode" label="账号" ></el-table-column>
|
||||||
<el-table-column prop="CreateTime" label="注册时间"> </el-table-column>
|
<el-table-column prop="CreateTime" label="注册时间"> </el-table-column>
|
||||||
<el-table-column prop="Name" label="名称"></el-table-column>
|
<el-table-column prop="Name" label="名称"></el-table-column>
|
||||||
<el-table-column prop="ManagerName" label="客户经理"></el-table-column>
|
<el-table-column prop="ManagerName" label="客户经理"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -83,41 +83,41 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
userLoading:false,
|
userLoading: false,
|
||||||
showUserDialog:false,
|
showUserDialog: false,
|
||||||
allowAdd: true,
|
allowAdd: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
userdata: {}, //当前登录人信息
|
userdata: {}, // 当前登录人信息
|
||||||
manegeList: [],
|
manegeList: [],
|
||||||
manageData: {
|
manageData: {
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 50,
|
PageSize: 50,
|
||||||
TenantId: 0,
|
TenantId: 0,
|
||||||
KeyWord: "",
|
KeyWord: '',
|
||||||
RoleId: 0,
|
RoleId: 0,
|
||||||
CurrentRoleId: 0,
|
CurrentRoleId: 0,
|
||||||
IsRoot: 0
|
IsRoot: 0
|
||||||
},
|
},
|
||||||
manegeTotal: 0,
|
manegeTotal: 0,
|
||||||
checkEstate: false, //当前是否查看项目
|
checkEstate: false, // 当前是否查看项目
|
||||||
delroleData: {
|
delroleData: {
|
||||||
//删除角色
|
// 删除角色
|
||||||
ID: "",
|
ID: '',
|
||||||
OwnerID: 1001,
|
OwnerID: 1001,
|
||||||
OperaterID: 1,
|
OperaterID: 1,
|
||||||
ProjectCode: ""
|
ProjectCode: ''
|
||||||
},
|
},
|
||||||
delmanagerData: {
|
delmanagerData: {
|
||||||
//删除管理员
|
// 删除管理员
|
||||||
ID: "",
|
ID: '',
|
||||||
OwnerID: 1001,
|
OwnerID: 1001,
|
||||||
OperaterID: 1,
|
OperaterID: 1,
|
||||||
ProjectCode: ""
|
ProjectCode: ''
|
||||||
},
|
},
|
||||||
stateData: {
|
stateData: {
|
||||||
//更新关联项目
|
// 更新关联项目
|
||||||
Managerid: 1,
|
Managerid: 1,
|
||||||
Projectcodes: []
|
Projectcodes: []
|
||||||
},
|
},
|
||||||
@@ -128,228 +128,238 @@ export default {
|
|||||||
},
|
},
|
||||||
searchUserModel: {
|
searchUserModel: {
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
keyWord: "",
|
keyWord: '',
|
||||||
PageSize:500,
|
PageSize: 500,
|
||||||
all:0
|
all: 0
|
||||||
},
|
},
|
||||||
userRet:{
|
userRet: {
|
||||||
TotalCount:0,
|
TotalCount: 0,
|
||||||
Data:[]
|
Data: []
|
||||||
},
|
},
|
||||||
currentManager:null,
|
currentManager: null,
|
||||||
multipleSelection:null,
|
multipleSelection: null
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
bindwx: function() {
|
bindwx: function () {
|
||||||
if (!this.bindwx) {
|
if (!this.bindwx) {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$store.commit("setCurrentNav","会员管理>>管理员")
|
this.$store.commit('setCurrentNav', '会员管理>>管理员')
|
||||||
this.userdata = JSON.parse(
|
this.userdata = JSON.parse(
|
||||||
window.localStorage.getItem("etorcurrentuser")
|
window.localStorage.getItem('etorcurrentuser')
|
||||||
).Manager;
|
).Manager
|
||||||
this.getmanagerlist();
|
this.getmanagerlist()
|
||||||
this.getUser();
|
this.getUser()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelectionChange(val){
|
handleSelectionChange (val) {
|
||||||
this.multipleSelection = val;
|
this.multipleSelection = val
|
||||||
console.log(val)
|
console.log(val)
|
||||||
},
|
},
|
||||||
setUser(manage){
|
setUser (manage) {
|
||||||
this.showUserDialog=true;
|
this.showUserDialog = true
|
||||||
this.currentManager=manage;
|
this.currentManager = manage
|
||||||
},
|
},
|
||||||
getUser() {
|
getUser () {
|
||||||
this.$api.get("baseinfo/v1/user/Search",this.searchUserModel).then(res => {
|
this.$api.get('baseinfo/v1/user/Search', this.searchUserModel).then(res => {
|
||||||
this.userRet=res;
|
this.userRet = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
doSetUser() {
|
doSetUser () {
|
||||||
var data={
|
var data = {
|
||||||
ManagerId:this.currentManager.Id,
|
ManagerId: this.currentManager.Id,
|
||||||
ManagerName:this.currentManager.RealName,
|
ManagerName: this.currentManager.RealName,
|
||||||
UserIds:this.multipleSelection.map(m=>m.Id)
|
UserIds: this.multipleSelection.map(m => m.Id)
|
||||||
};
|
}
|
||||||
this.$api.post("baseinfo/v1/user/SetManager",data).then(res => {
|
this.$api.post('baseinfo/v1/user/SetManager', data).then(res => {
|
||||||
this.getUser();
|
this.getUser()
|
||||||
this.showUserDialog=false;
|
this.showUserDialog = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
geturl(data) {
|
geturl (data) {
|
||||||
var that = this;
|
var that = this
|
||||||
var id = data.Id;
|
var id = data.Id
|
||||||
var uuid = that.getguid();
|
var uuid = that.getguid()
|
||||||
var url =
|
var url =
|
||||||
this.$api.baseURL +
|
this.$api.baseURL +
|
||||||
"Manager/ManageBindWx?data.Id=" +
|
'Manager/ManageBindWx?data.Id=' +
|
||||||
id +
|
id +
|
||||||
"&data.uuid=" +
|
'&data.uuid=' +
|
||||||
uuid;
|
uuid
|
||||||
this.bindwx = true;
|
this.bindwx = true
|
||||||
this.makeqrcode(url);
|
this.makeqrcode(url)
|
||||||
that.timer = setInterval(function() {
|
that.timer = setInterval(function () {
|
||||||
that.time(uuid, that.timer);
|
that.time(uuid, that.timer)
|
||||||
}, 1000);
|
}, 1000)
|
||||||
},
|
},
|
||||||
// 获取uuid
|
// 获取uuid
|
||||||
getguid() {
|
getguid () {
|
||||||
return "xxxx-xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g, function(c) {
|
return 'xxxx-xxxx-4xxx-yxxx-xxxx'.replace(/[xy]/g, function (c) {
|
||||||
|
// eslint-disable-next-line one-var
|
||||||
var r = (Math.random() * 16) | 0,
|
var r = (Math.random() * 16) | 0,
|
||||||
v = c == "x" ? r : (r & 0x3) | 0x8;
|
// eslint-disable-next-line eqeqeq
|
||||||
return v.toString(16);
|
v = c == 'x' ? r : (r & 0x3) | 0x8
|
||||||
});
|
return v.toString(16)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
time(data, time) {
|
time (data, time) {
|
||||||
this.$api
|
this.$api
|
||||||
.getscanbindwxstate(data)
|
.getscanbindwxstate(data)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res);
|
console.log(res)
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
if (res.Data.State == 0) {
|
if (res.Data.State == 0) {
|
||||||
clearInterval(time);
|
clearInterval(time)
|
||||||
this.getmanagerlist(this.manageData.PageIndex);
|
this.getmanagerlist(this.manageData.PageIndex)
|
||||||
this.bindwx = false;
|
this.bindwx = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
clearInterval(time);
|
clearInterval(time)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
makeqrcode(url) {
|
makeqrcode (url) {
|
||||||
document.getElementById("qrcode").innerHTML = "";
|
document.getElementById('qrcode').innerHTML = ''
|
||||||
new QRCode(document.getElementById("qrcode"), {
|
// eslint-disable-next-line no-new
|
||||||
|
new QRCode(document.getElementById('qrcode'), {
|
||||||
text: url,
|
text: url,
|
||||||
width: 127,
|
width: 127,
|
||||||
height: 127,
|
height: 127,
|
||||||
colorDark: "#000000",
|
colorDark: '#000000',
|
||||||
colorLight: "#ffffff",
|
colorLight: '#ffffff',
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
correctLevel: QRCode.CorrectLevel.H
|
correctLevel: QRCode.CorrectLevel.H
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getmanagerlist(val) {
|
getmanagerlist (val) {
|
||||||
//获取管理员列表
|
// 获取管理员列表
|
||||||
var that = this;
|
// eslint-disable-next-line no-unused-vars
|
||||||
this.loading = true;
|
var that = this
|
||||||
typeof val === "number" && (this.manageData.PageIndex = val);
|
this.loading = true
|
||||||
var roleid = this.userdata.Roleid;
|
typeof val === 'number' && (this.manageData.PageIndex = val)
|
||||||
this.manageData.CurrentRoleId = roleid;
|
var roleid = this.userdata.Roleid
|
||||||
this.manageData.IsRoot = 1;
|
this.manageData.CurrentRoleId = roleid
|
||||||
|
this.manageData.IsRoot = 1
|
||||||
this.$api
|
this.$api
|
||||||
.get("manage/v1/Manager/Get", this.manageData)
|
.get('manage/v1/Manager/Get', this.manageData)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
if (res.Code == 10000) {
|
if (res.Code == 10000) {
|
||||||
this.manegeTotal = res.TotalCount;
|
this.manegeTotal = res.TotalCount
|
||||||
this.manegeList = res.Data;
|
this.manegeList = res.Data
|
||||||
console.log(this.manegeList);
|
console.log(this.manegeList)
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "error",
|
type: 'error',
|
||||||
message: res.Message
|
message: res.Message
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
//console.log(res);
|
// console.log(res);
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
putManagerdatadomain(e) {
|
putManagerdatadomain (e) {
|
||||||
//更改某管理员关联项目列表
|
// 更改某管理员关联项目列表
|
||||||
this.stateData.Projectcodes = e.SelectedCodes;
|
this.stateData.Projectcodes = e.SelectedCodes
|
||||||
//console.log(e);
|
// console.log(e);
|
||||||
this.$api
|
this.$api
|
||||||
.putManagerdatadomain(this.stateData)
|
.putManagerdatadomain(this.stateData)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
if (res.Code == 10000) {
|
if (res.Code == 10000) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "修改关联项目成功!"
|
message: '修改关联项目成功!'
|
||||||
});
|
})
|
||||||
this.getmanagerlist();
|
this.getmanagerlist()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "error",
|
type: 'error',
|
||||||
message: res.Message
|
message: res.Message
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
//console.log(res);
|
// console.log(res);
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getManagerdatadomain(id) {
|
getManagerdatadomain (id) {
|
||||||
//获取管理员管理的楼宇编码
|
// 获取管理员管理的楼宇编码
|
||||||
if (this.checkEstate) {
|
if (this.checkEstate) {
|
||||||
this.checkEstate = !this.checkEstate;
|
this.checkEstate = !this.checkEstate
|
||||||
}
|
}
|
||||||
this.$api
|
this.$api
|
||||||
.getManagerdatadomain({ ID: id })
|
.getManagerdatadomain({ ID: id })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
if (res.Code == 10000) {
|
if (res.Code == 10000) {
|
||||||
this.stateData.Managerid = res.Data.Managerid;
|
this.stateData.Managerid = res.Data.Managerid
|
||||||
this.estateSelected.SelectedCodes = res.Data.Projectcodes;
|
this.estateSelected.SelectedCodes = res.Data.Projectcodes
|
||||||
this.checkEstate = true;
|
this.checkEstate = true
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "error",
|
type: 'error',
|
||||||
message: res.Message
|
message: res.Message
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
//console.log(res);
|
// console.log(res);
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
delmanager() {
|
delmanager () {
|
||||||
//删除管理员
|
// 删除管理员
|
||||||
this.$confirm("确认删除该管理员吗?", "删除", {
|
this.$confirm('确认删除该管理员吗?', '删除', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning"
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$api
|
this.$api
|
||||||
.delmanager(this.delmanagerData)
|
.delmanager(this.delmanagerData)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
if (res.Code == 10000) {
|
if (res.Code == 10000) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "success",
|
type: 'success',
|
||||||
message: "删除成功"
|
message: '删除成功'
|
||||||
});
|
})
|
||||||
this.getmanagerlist(1);
|
this.getmanagerlist(1)
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "error",
|
type: 'error',
|
||||||
message: res.Message
|
message: res.Message
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
//console.log(res);
|
// console.log(res);
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "info",
|
type: 'info',
|
||||||
message: "已取消删除"
|
message: '已取消删除'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
routerGo(item) {
|
routerGo (item) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "addmanager",
|
name: 'addmanager',
|
||||||
query: {
|
query: {
|
||||||
ID: item.Id
|
ID: item.Id
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@@ -410,4 +420,3 @@ export default {
|
|||||||
color: #8f8f8f;
|
color: #8f8f8f;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
end-placeholder="B结束日期"
|
end-placeholder="B结束日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchModel.profile"
|
v-model="searchModel.profile"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="状态"
|
placeholder="状态"
|
||||||
@@ -40,10 +40,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="retData.Data" size="medium" :height="$getHeight(300)"
|
<el-table :data="retData.Data" size="medium" :height="$getHeight(300)"
|
||||||
@sort-change="sort"
|
@sort-change="sort"
|
||||||
row-key="Id" border>
|
row-key="Id" border>
|
||||||
<el-table-column prop="Profile" label="状态" width="240">
|
<el-table-column prop="Profile" label="状态" width="240">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-dropdown size="small" split-button type="primary">
|
<el-dropdown size="small" split-button type="primary">
|
||||||
{{scope.row.UserInfo.Profile}}
|
{{scope.row.UserInfo.Profile}}
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
@@ -68,21 +68,21 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="UserName" label="联系信息">
|
<el-table-column prop="UserName" label="联系信息">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<p v-if="scope.row.UserInfo.Wx">微信:{{scope.row.UserInfo.Wx}}</p>
|
<p v-if="scope.row.UserInfo.Wx">微信:{{scope.row.UserInfo.Wx}}</p>
|
||||||
<p v-if="scope.row.UserInfo.QQ">QQ:{{scope.row.UserInfo.QQ}}</p>
|
<p v-if="scope.row.UserInfo.QQ">QQ:{{scope.row.UserInfo.QQ}}</p>
|
||||||
<p v-if="scope.row.UserInfo.TaoBao">淘宝:{{scope.row.UserInfo.TaoBao}}</p>
|
<p v-if="scope.row.UserInfo.TaoBao">淘宝:{{scope.row.UserInfo.TaoBao}}</p>
|
||||||
<p v-if="scope.row.UserInfo.WangWang">旺旺:{{scope.row.UserInfo.WangWang}}</p>
|
<p v-if="scope.row.UserInfo.WangWang">旺旺:{{scope.row.UserInfo.WangWang}}</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="CreateTime" label="注册时间"></el-table-column>
|
<el-table-column prop="CreateTime" label="注册时间"></el-table-column>
|
||||||
<el-table-column prop="PrevMonthAmount" label="消费金额A" sortable="custom"></el-table-column>
|
<el-table-column prop="PrevMonthAmount" label="消费金额A" sortable="custom"></el-table-column>
|
||||||
<el-table-column prop="MonthAmount" label="消费金额B" sortable="custom"></el-table-column>
|
<el-table-column prop="MonthAmount" label="消费金额B" sortable="custom"></el-table-column>
|
||||||
<el-table-column prop="AddAmount" label="对比增长金额" sortable="custom">
|
<el-table-column prop="AddAmount" label="对比增长金额" sortable="custom">
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
{{scope.row.MonthAmount-scope.row.PrevMonthAmount}}
|
{{scope.row.MonthAmount-scope.row.PrevMonthAmount}}
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="TotalAccountCount" label="账户总数" sortable="custom"></el-table-column>
|
<el-table-column prop="TotalAccountCount" label="账户总数" sortable="custom"></el-table-column>
|
||||||
<el-table-column prop="UsingAccountCount" label="使用中个数" sortable="custom"></el-table-column>
|
<el-table-column prop="UsingAccountCount" label="使用中个数" sortable="custom"></el-table-column>
|
||||||
<el-table-column prop="ExpirdAccountCount" label="过期个数" sortable="custom"></el-table-column>
|
<el-table-column prop="ExpirdAccountCount" label="过期个数" sortable="custom"></el-table-column>
|
||||||
@@ -100,13 +100,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import * as dateUtil from '@/extend/js/dateFormatUtil';
|
import * as dateUtil from '@/extend/js/dateFormatUtil'
|
||||||
export default {
|
export default {
|
||||||
name: "userIndex",
|
name: 'userIndex',
|
||||||
components: {
|
components: {
|
||||||
phoneHide: () => import("@/components/common/phonehide")
|
phoneHide: () => import('@/components/common/phonehide')
|
||||||
},
|
},
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
retData: { TotalCount: 0, Data: [] },
|
retData: { TotalCount: 0, Data: [] },
|
||||||
@@ -114,75 +114,90 @@ export default {
|
|||||||
dateRange2: [],
|
dateRange2: [],
|
||||||
searchModel: {
|
searchModel: {
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
keyWord: "",
|
keyWord: '',
|
||||||
sortLable:"",
|
sortLable: '',
|
||||||
sortOrder:0,
|
sortOrder: 0,
|
||||||
profile:"",
|
profile: ''
|
||||||
},
|
},
|
||||||
types:[{ value: '已完成', label: '已完成'},
|
types: [
|
||||||
{ value: '高意向客户', label: '高意向客户'},
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
{ value: '待跟进-消费减少', label: '待跟进-消费减少'},
|
{ value: '已完成', label: '已完成'},
|
||||||
{ value: '待跟进-未购买', label: '待跟进-未购买'},
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
{ value: '跟进超时-消费减少', label: '跟进超时-消费减少'},
|
{ value: '高意向客户', label: '高意向客户'},
|
||||||
{ value: '跟进超时-未购买', label: '跟进超时-未购买'},
|
// eslint-disable-next-line indent
|
||||||
{ value: '流失-需求减少', label: '流失-需求减少'},
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
{ value: '流失-暂时不用', label: '流失-暂时不用'},
|
{ value: '待跟进-消费减少', label: '待跟进-消费减少'},
|
||||||
{ value: '流失-价格问题', label: '流失-价格问题'},
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
{ value: '流失-产品问题', label: '流失-产品问题'},
|
{ value: '待跟进-未购买', label: '待跟进-未购买'},
|
||||||
{ value: '跟进超时', label: '跟进超时'},
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '跟进超时-消费减少', label: '跟进超时-消费减少'},
|
||||||
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '跟进超时-未购买', label: '跟进超时-未购买'},
|
||||||
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '流失-需求减少', label: '流失-需求减少'},
|
||||||
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '流失-暂时不用', label: '流失-暂时不用'},
|
||||||
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '流失-价格问题', label: '流失-价格问题'},
|
||||||
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '流失-产品问题', label: '流失-产品问题'},
|
||||||
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
{ value: '跟进超时', label: '跟进超时'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created () {
|
||||||
this.$store.commit("setCurrentNav", "用户管理>>消费统计");
|
this.$store.commit('setCurrentNav', '用户管理>>消费统计')
|
||||||
this.dateRange1[0]=dateUtil.getLastMonthStartDate();
|
this.dateRange1[0] = dateUtil.getLastMonthStartDate()
|
||||||
this.dateRange1[1]=dateUtil.getLastMonthCurrentDate();
|
this.dateRange1[1] = dateUtil.getLastMonthCurrentDate()
|
||||||
|
|
||||||
this.dateRange2[0]=dateUtil.getMonthStartDate();
|
this.dateRange2[0] = dateUtil.getMonthStartDate()
|
||||||
this.dateRange2[1]=dateUtil.getMonthCurrentDate();
|
this.dateRange2[1] = dateUtil.getMonthCurrentDate()
|
||||||
this.get();
|
this.get()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sort({column, prop, order }){
|
// eslint-disable-next-line standard/object-curly-even-spacing
|
||||||
|
sort ({column, prop, order }) {
|
||||||
console.log(column)
|
console.log(column)
|
||||||
console.log(prop)
|
console.log(prop)
|
||||||
console.log(order)
|
console.log(order)
|
||||||
this.searchModel.sortLable=prop;
|
this.searchModel.sortLable = prop
|
||||||
this.searchModel.sortOrder=order=="ascending"?0:1;
|
// eslint-disable-next-line eqeqeq
|
||||||
this.search()
|
this.searchModel.sortOrder = order == 'ascending' ? 0 : 1
|
||||||
|
this.search()
|
||||||
},
|
},
|
||||||
changeProfile(row,command){
|
changeProfile (row, command) {
|
||||||
row.UserInfo.Profile=command;
|
row.UserInfo.Profile = command
|
||||||
this.$api
|
this.$api
|
||||||
.post("baseinfo/v1/user/UpdateProfile",{UserId:row.UserInfo.Id,Profile:command})
|
.post('baseinfo/v1/user/UpdateProfile', {UserId: row.UserInfo.Id, Profile: command})
|
||||||
.then(res => {});
|
.then(res => {})
|
||||||
},
|
},
|
||||||
search() {
|
search () {
|
||||||
this.searchModel.PageIndex = 1;
|
this.searchModel.PageIndex = 1
|
||||||
this.get();
|
this.get()
|
||||||
},
|
},
|
||||||
get() {
|
get () {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
if (this.dateRange1 && this.dateRange1.length == 2) {
|
if (this.dateRange1 && this.dateRange1.length === 2) {
|
||||||
this.searchModel.bTime1 = this.dateRange1[0];
|
this.searchModel.bTime1 = this.dateRange1[0]
|
||||||
this.searchModel.eTime1 = this.dateRange1[1];
|
this.searchModel.eTime1 = this.dateRange1[1]
|
||||||
}
|
}
|
||||||
if (this.dateRange2 && this.dateRange2.length == 2) {
|
if (this.dateRange2 && this.dateRange2.length === 2) {
|
||||||
this.searchModel.bTime2 = this.dateRange2[0];
|
this.searchModel.bTime2 = this.dateRange2[0]
|
||||||
this.searchModel.eTime2 = this.dateRange2[1];
|
this.searchModel.eTime2 = this.dateRange2[1]
|
||||||
}
|
}
|
||||||
this.$api
|
this.$api
|
||||||
.get("course/v1/order/UserConsumeStatistics", this.searchModel)
|
.get('course/v1/order/UserConsumeStatistics', this.searchModel)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.retData = res;
|
this.retData = res
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
dataExport() {
|
dataExport () {
|
||||||
this.$api.getDownloadFile("/course/v1/order/ExportUserConsumeStatistics", this.searchModel);
|
this.$api.getDownloadFile('/course/v1/order/ExportUserConsumeStatistics', this.searchModel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user