wangxiaohua 3 years ago
parent
commit
52a143c23f
10 changed files with 661 additions and 174 deletions
  1. +1
    -1
      src/api/admin/user.js
  2. +8
    -0
      src/api/modules/api.js
  3. +2
    -2
      src/const/crud/admin/log.js
  4. +5
    -2
      src/page/check/chose.vue
  5. +30
    -7
      src/page/check/index.vue
  6. +6
    -3
      src/page/index/top/index.vue
  7. +247
    -63
      src/views/admin/log/index.vue
  8. +245
    -62
      src/views/admin/log/log.vue
  9. +94
    -28
      src/views/admin/user/index.vue
  10. +23
    -6
      src/views/building/index.vue

+ 1
- 1
src/api/admin/user.js View File

@@ -50,7 +50,7 @@ export function delObj1(query) {
return request({
url: '/admin/user/orgDel',
method: 'delete',
params:query
data:query
})
}



+ 8
- 0
src/api/modules/api.js View File

@@ -74,6 +74,14 @@ export function getUserMsg(query) {
params: query
})
}
// 组织用户禁用先用
export function updateLockFlag(obj) {
return request({
url: '/autoSR/cushouseuserrelationmid/updateLockFlag',
method: 'post',
data: obj
})
}
// 区域回显
export function userAreaFind(query) {
return request({


+ 2
- 2
src/const/crud/admin/log.js View File

@@ -24,7 +24,7 @@ export const tableOption = {
prop: 'type',
type: 'select',
dicUrl: '/admin/dict/type/log_type',
search: true
// search: true
}, {
label: '标题',
prop: 'title'
@@ -51,7 +51,7 @@ export const tableOption = {
rangeSeparator:"-",
format: 'yyyy-MM-dd HH:mm',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
search: true,
// search: true,
searchRange: true
}]
}


+ 5
- 2
src/page/check/chose.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="box-center">
<div class="head">
<div>控管家管理系统</div>
<div>控管家管理系统</div>
<div class="callback" @click="goback" style="cursor: pointer">返回</div>
</div>
<div class="hid">
@@ -309,7 +309,7 @@ export default {
let obj = {
current: this.currentPage,
size: this.size,
orgType: localStorage.getItem("orgType"),
};
if (this.info.selectHouseType == 1) {
this.$api.api.zkhousePage({
@@ -338,12 +338,15 @@ export default {
console.log(item);
if (this.flag == 1) {
localStorage.setItem("agentId", item.id);
localStorage.setItem("topName", item.agentName);
}
if (this.flag == 2) {
localStorage.setItem("orgCode", item.orgCode);
localStorage.setItem("topName", item.name);
}
if (this.flag == 3) {
localStorage.setItem("orgCode", item.orgCode);
localStorage.setItem("topName", item.propertyName);
}
this.$router.push({ path: "/wel" });
},


+ 30
- 7
src/page/check/index.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="box-center">
<div class="head">
<div>控管家管理系统</div>
<div>控管家管理系统</div>
<div class="callback" @click="goloign" style="cursor: pointer">
{{ backFlag ? "返回" : "退出" }}
</div>
@@ -11,7 +11,7 @@
<!-- 质控后台 -->
<div class="tab" @click="goindex(0)" v-if="tabFlag1">
<div><img src="/img/checktab1.png" alt="" /></div>
<div class="text">控管家后台</div>
<div class="text">控管家后台</div>
</div>
<div class="tab" @click="goindex(1)" v-if="tabFlag2">
<div><img src="/img/checktab2.png" alt="" /></div>
@@ -106,16 +106,22 @@ export default {
current: 1,
pageSize: 10,
agentName: this.agentName,

})
.then((res) => {
// console.log(res);
// this.list = res.data.records;
// this.total = res.data.total;
if (res.data.total > 1) {
if (res.data.total == 0) {
this.$message.warning("您当前并未绑定楼盘");
return;
} else if (res.data.total > 1) {
// 公司后台
this.$router.push({ path: "/chose", query: { flag: 1 } });
} else {
this.$router.push({ path: "/wel" });
localStorage.setItem("topName", res.data.records[0].agentName);
localStorage.setItem("agentId", res.data.records[0].id);
}
});
},
@@ -131,11 +137,16 @@ export default {
// console.log(res);
// this.list = res.data.records;
// this.total = res.data.total;
if (res.data.total > 1) {
if (res.data.total == 0) {
this.$message.warning("您当前并未绑定楼盘");
return;
} else if (res.data.total > 1) {
// 公司后台
this.$router.push({ path: "/chose", query: { flag: 2 } });
} else {
this.$router.push({ path: "/wel" });
localStorage.setItem("topName", res.data.records[0].name);
localStorage.setItem("orgCode", res.data.records[0].orgCode);
}
});
},
@@ -155,17 +166,23 @@ export default {
let obj = {
current: 1,
size: 10,
orgType: localStorage.getItem("orgType"),
};
if (this.info.selectHouseType == 1) {
this.$api.api.zkhousePage(obj).then((res) => {
// console.log(res)
// this.list = res.data.records;
// this.total = res.data.total;
if (res.data.total > 1) {
if (res.data.total == 0) {
this.$message.warning("您当前并未绑定楼盘");
return;
} else if (res.data.total > 1) {
// 公司后台
this.$router.push({ path: "/chose", query: { flag: 3 } });
} else {
this.$router.push({ path: "/wel" });
localStorage.setItem("topName", res.data.records[0].propertyName);
localStorage.setItem("orgCode", res.data.records[0].orgCode);
}
});
}
@@ -173,17 +190,22 @@ export default {
this.$api.api
.findHouseByArea({
id: null,
...obj
...obj,
})
.then((res) => {
// console.log(res)
// this.list = res.data.records;
// this.total = res.data.total;
if (res.data.total > 1) {
if (res.data.total == 0) {
this.$message.warning("您当前并未绑定楼盘");
return;
} else if (res.data.total > 1) {
// 公司后台
this.$router.push({ path: "/chose", query: { flag: 3 } });
} else {
this.$router.push({ path: "/wel" });
localStorage.setItem("topName", res.data.records[0].propertyName);
localStorage.setItem("orgCode", res.data.records[0].orgCode);
}
});
}
@@ -191,6 +213,7 @@ export default {
goindex(idx) {
localStorage.setItem("orgType", idx);
if (idx == 0) {
localStorage.setItem("topName", '');
// 质控管家后台
this.$router.push({ path: "/wel" });
}


+ 6
- 3
src/page/index/top/index.vue View File

@@ -21,7 +21,7 @@
"
@click="goChange"
>
<div class="daili">代理商</div>
<div class="daili">{{orgType==0?'系统后台':orgType==1?'代理商后台':orgType==2?'公司后台':'楼盘后台'}}</div>
<span style="font-size: 16px; margin-left: 20px">{{
companyName
}}</span>
@@ -149,7 +149,9 @@ export default {
return {
options: [],
value: "",
companyName: "齐横三",
companyName: localStorage.getItem('topName'),
orgType:localStorage.getItem('orgType'),

};
},
computed: {
@@ -250,7 +252,7 @@ export default {

<style lang="scss" scoped>
.daili {
width: 68px;
// width: 100px;
height: 30px;
background: #2671e2;
border-radius: 4px;
@@ -258,6 +260,7 @@ export default {
text-align: center;
color: #ffffff;
font-size: 14px;
padding: 0 10px;
}
.change {
font-size: 16px;


+ 247
- 63
src/views/admin/log/index.vue View File

@@ -1,6 +1,79 @@

<template>
<div class="log">
<div class="app-top">
<div class="app-titel" style="margin-top: 5px">
<div class="div-lab">
<div class="label">添加时间</div>
<el-date-picker
v-model="time"
type="daterange"
class="div-inp"
range-separator="-"
start-placeholder="开始日期"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
@change="timeChange"
>
</el-date-picker>
</div>

<div class="div-lab">
<el-input
v-model="value"
@change='valueChange'
clearable
placeholder="请输入"
style="width: 363px"
>
<el-select
v-model="searchForm.flag"
@change="selChange"
slot="prepend"
class="input-with-select"
style="width: 115px"
placeholder="请选择"
>
<el-option label="用户名称" value="1"></el-option>
<el-option label="登陆手机" value="2"></el-option>
<el-option label="登陆ip" value="3"></el-option>
</el-select>
</el-input>
</div>

<!-- <div class="div-lab">
<div class="label">设备状态</div>
<el-select
class="div-inp"
multiple
clearable
collapse-tags
v-model="searchForm.acceptanceStatus"
placeholder="请选择"
>
<el-option
v-for="item in equipmentStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div> -->
</div>
<div class="app-titel" style="margin-top: 15px">
<!-- <div class="label" style="color: #ffffff">筛选相关:</div> -->
<div style="margin-left: 20px">
<el-button style="background: #2671e2; color: #ffffff" @click="screen"
>筛选</el-button
>
</div>
<div style="margin-left: 20px">
<el-button @click="reset">清空筛选条件</el-button>
</div>
</div>
</div>
<basic-container>
<avue-crud
ref="crud"
@@ -14,79 +87,190 @@
@refresh-change="refreshChange"
@size-change="sizeChange"
@current-change="currentChange"
@row-del="handleDel"/>
@row-del="handleDel"
>
</avue-crud>
</basic-container>
</div>
</template>

<script>
import {delObj, fetchList} from '@/api/admin/log'
import {tableOption} from '@/const/crud/admin/log'
import {mapGetters} from 'vuex'
import { delObj, fetchList } from "@/api/admin/log";
import { tableOption } from "@/const/crud/admin/log";
import { mapGetters } from "vuex";

export default {
name: 'Log',
data() {
export default {
name: "Log",
data() {
return {
tableData: [],
time: [],
value: "",
searchForm: {
startDate: "",
endDate: "",
remoteAddr: "",
flag: "1",
name: "",
params: "",
},
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 20, // 每页显示多少条
},
tableLoading: false,
tableOption: tableOption,
};
},
computed: {
...mapGetters(["permissions"]),
permissionList() {
return {
tableData: [],
searchForm: {},
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 20 // 每页显示多少条
},
tableLoading: false,
tableOption: tableOption
}
delBtn: this.vaildData(this.permissions.sys_log_del, false),
};
},
},
methods: {
selChange(e) {
this.value = "";
},
computed: {
...mapGetters(['permissions']),
permissionList() {
return {
delBtn: this.vaildData(this.permissions.sys_log_del, false)
}
valueChange(e){
if(e){
if (this.searchForm.flag == 1) {
// 用户名称
this.searchForm.name = this.value;
// this.value = "";
this.searchForm.params = "";
this.searchForm.remoteAddr = "";
} else if (this.searchForm.flag == 2) {
// 登陆手机
this.searchForm.params = this.value;
// this.value = "";
this.searchForm.name = "";
this.searchForm.remoteAddr = "";
} else {
// 登陆Ip
this.searchForm.remoteAddr = this.value;
// this.value = "";
this.searchForm.params = "";
this.searchForm.name = "";
}
}
},
methods: {
getList(page, params) {
this.tableLoading = true
fetchList(Object.assign({
descs: 'create_time',
current: page.currentPage,
size: page.pageSize
}, params, this.searchForm)).then(response => {
this.tableData = response.data.records
this.page.total = response.data.total
this.tableLoading = false
})
},
handleDel: function (row) {
this.$confirm('是否确认删除ID为"' + row.id + '"的日志?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
return delObj(row.id)
}).then(() => {
this.getList(this.page)
this.$message.success('删除成功')
screen() {
this.getList(this.page);
},
reset() {
this.searchForm = {
startDate: "",
endDate: "",
flag: "1",
remoteAddr: "",
name: "",
params: "",
};
this.value = "";
this.getList(this.page);
},
timeChange(e) {
this.searchForm.startDate = e[0];
this.searchForm.endDate = e[1];
},
getList(page, params) {
this.tableLoading = true;
fetchList(
Object.assign(
{
descs: "create_time",
current: page.currentPage,
size: page.pageSize,
},
params,
this.searchForm
)
).then((response) => {
this.tableData = response.data.records;
this.page.total = response.data.total;
this.tableLoading = false;
});
},
handleDel: function (row) {
this.$confirm('是否确认删除ID为"' + row.id + '"的日志?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delObj(row.id);
})
},
searchChange(form, done) {
this.searchForm = form
this.page.currentPage = 1
this.getList(this.page, form)
done()
},
sizeChange(pageSize) {
this.page.pageSize = pageSize
},
currentChange(current) {
this.page.currentPage = current
},
refreshChange() {
this.getList(this.page)
}
.then(() => {
this.getList(this.page);
this.$message.success("删除成功");
});
},
searchChange(form, done) {
this.searchForm = form;
this.page.currentPage = 1;
this.getList(this.page, form);
done();
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
currentChange(current) {
this.page.currentPage = current;
},
refreshChange() {
this.getList(this.page);
},
},
};
</script>
<style lang="scss" scoped="scoped">
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
.app-titel {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.label {
font-size: 14px;
font-weight: 400;
color: #32363d;
line-height: 32px;
margin-left: 15px;
min-width: 100px;
}
.toptimeqhuan {
height: 30px;
background: #ffffff;
display: flex;
align-items: center;
}
.toptimeqhuan div {
padding-left: 20px;
padding-right: 20px;
text-align: center;
line-height: 30px;
font-size: 14px;
margin-right: 15px;
border-radius: 4px;
border: 1px solid #e0e0e0;
}
}
</script>
}
.div-lab {
display: flex;
margin: 5px;
}
.div-inp {
width: 250px;
}
</style>

+ 245
- 62
src/views/admin/log/log.vue View File

@@ -1,6 +1,79 @@

<template>
<div class="log">
<div class="app-top">
<div class="app-titel" style="margin-top: 5px">
<div class="div-lab">
<div class="label">添加时间</div>
<el-date-picker
v-model="time"
type="daterange"
class="div-inp"
range-separator="-"
start-placeholder="开始日期"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
@change="timeChange"
>
</el-date-picker>
</div>

<div class="div-lab">
<el-input
v-model="value"
@change="valueChange"
clearable
placeholder="请输入"
style="width: 363px"
>
<el-select
v-model="searchForm.flag"
@change="selChange"
slot="prepend"
class="input-with-select"
style="width: 115px"
placeholder="请选择"
>
<el-option label="用户名称" value="1"></el-option>
<el-option label="登陆手机" value="2"></el-option>
<el-option label="登陆ip" value="3"></el-option>
</el-select>
</el-input>
</div>

<!-- <div class="div-lab">
<div class="label">设备状态</div>
<el-select
class="div-inp"
multiple
clearable
collapse-tags
v-model="searchForm.acceptanceStatus"
placeholder="请选择"
>
<el-option
v-for="item in equipmentStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div> -->
</div>
<div class="app-titel" style="margin-top: 15px">
<!-- <div class="label" style="color: #ffffff">筛选相关:</div> -->
<div style="margin-left: 20px">
<el-button style="background: #2671e2; color: #ffffff" @click="screen"
>筛选</el-button
>
</div>
<div style="margin-left: 20px">
<el-button @click="reset">清空筛选条件</el-button>
</div>
</div>
</div>
<basic-container>
<avue-crud
ref="crud"
@@ -14,79 +87,189 @@
@refresh-change="refreshChange"
@size-change="sizeChange"
@current-change="currentChange"
@row-del="handleDel"/>
@row-del="handleDel"
/>
</basic-container>
</div>
</template>

<script>
import {delObj, fetchList1} from '@/api/admin/log'
import {tableOption} from '@/const/crud/admin/log'
import {mapGetters} from 'vuex'
import { delObj, fetchList1 } from "@/api/admin/log";
import { tableOption } from "@/const/crud/admin/log";
import { mapGetters } from "vuex";

export default {
name: 'Log',
data() {
export default {
name: "Log",
data() {
return {
tableData: [],
time: [],
value: "",
searchForm: {
startDate: "",
endDate: "",
remoteAddr: "",
flag: "1",
name: "",
params: "",
},
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 20, // 每页显示多少条
},
tableLoading: false,
tableOption: tableOption,
};
},
computed: {
...mapGetters(["permissions"]),
permissionList() {
return {
tableData: [],
searchForm: {},
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 20 // 每页显示多少条
},
tableLoading: false,
tableOption: tableOption
}
delBtn: this.vaildData(this.permissions.sys_log_del, false),
};
},
},
methods: {
selChange(e) {
this.value = "";
},
computed: {
...mapGetters(['permissions']),
permissionList() {
return {
delBtn: this.vaildData(this.permissions.sys_log_del, false)
valueChange(e) {
if (e) {
if (this.searchForm.flag == 1) {
// 用户名称
this.searchForm.name = this.value;
// this.value = "";
this.searchForm.params = "";
this.searchForm.remoteAddr = "";
} else if (this.searchForm.flag == 2) {
// 登陆手机
this.searchForm.params = this.value;
// this.value = "";
this.searchForm.name = "";
this.searchForm.remoteAddr = "";
} else {
// 登陆Ip
this.searchForm.remoteAddr = this.value;
// this.value = "";
this.searchForm.params = "";
this.searchForm.name = "";
}
}
},
methods: {
getList(page, params) {
this.tableLoading = true
fetchList1(Object.assign({
descs: 'create_time',
current: page.currentPage,
size: page.pageSize
}, params, this.searchForm)).then(response => {
this.tableData = response.data.records
this.page.total = response.data.total
this.tableLoading = false
})
},
handleDel: function (row) {
this.$confirm('是否确认删除ID为"' + row.id + '"的日志?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
return delObj(row.id)
}).then(() => {
this.getList(this.page)
this.$message.success('删除成功')
screen() {
this.getList(this.page);
},
reset() {
this.searchForm = {
startDate: "",
endDate: "",
flag: "1",
remoteAddr: "",
name: "",
params: "",
};
this.value = "";
this.getList(this.page);
},
timeChange(e) {
this.searchForm.startDate = e[0];
this.searchForm.endDate = e[1];
},
getList(page, params) {
this.tableLoading = true;
fetchList1(
Object.assign(
{
descs: "create_time",
current: page.currentPage,
size: page.pageSize,
},
params,
this.searchForm
)
).then((response) => {
this.tableData = response.data.records;
this.page.total = response.data.total;
this.tableLoading = false;
});
},
handleDel: function (row) {
this.$confirm('是否确认删除ID为"' + row.id + '"的日志?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delObj(row.id);
})
},
searchChange(form, done) {
this.searchForm = form
this.page.currentPage = 1
this.getList(this.page, form)
done()
},
sizeChange(pageSize) {
this.page.pageSize = pageSize
},
currentChange(current) {
this.page.currentPage = current
},
refreshChange() {
this.getList(this.page)
}
.then(() => {
this.getList(this.page);
this.$message.success("删除成功");
});
},
searchChange(form, done) {
this.searchForm = form;
this.page.currentPage = 1;
this.getList(this.page, form);
done();
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
currentChange(current) {
this.page.currentPage = current;
},
refreshChange() {
this.getList(this.page);
},
},
};
</script>
<style lang="scss" scoped="scoped">
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
.app-titel {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.label {
font-size: 14px;
font-weight: 400;
color: #32363d;
line-height: 32px;
margin-left: 15px;
min-width: 100px;
}
.toptimeqhuan {
height: 30px;
background: #ffffff;
display: flex;
align-items: center;
}
.toptimeqhuan div {
padding-left: 20px;
padding-right: 20px;
text-align: center;
line-height: 30px;
font-size: 14px;
margin-right: 15px;
border-radius: 4px;
border: 1px solid #e0e0e0;
}
}
</script>
}
.div-lab {
display: flex;
margin: 5px;
}
.div-inp {
width: 250px;
}
</style>

+ 94
- 28
src/views/admin/user/index.vue View File

@@ -1,7 +1,7 @@
<template>
<div class="user">
<div style="background: #ffff; padding: 10px">
<div class="tabcenbox">
<div class="tabcenbox" v-if="systemFlag">
<div
:class="choseFlag ? 'ch1' : 'ch2'"
style="border-right: 1px solid #ccc"
@@ -163,7 +163,9 @@

<div style="margin: 0 0 10px 10px">
<!-- <el-button type="primary" :disabled='checkRole.length==0' @click="delIds">批量删除</el-button> -->
<el-button type="primary" @click="addRole">添加</el-button>
<el-button v-if="systemFlag" type="primary" @click="addRole"
>添加</el-button
>
</div>
</div>

@@ -287,11 +289,11 @@
</el-table-column>
<el-table-column label="状态">
<template slot-scope="{ row }">
{{ row.lockFlag == 0 ? "正常" : "禁用" }}
{{ row.lockFlag == 0 ? "启用" : "禁用" }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="添加时间"> </el-table-column>
<el-table-column prop="address" label="操作">
<el-table-column prop="address" label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
v-if="scope.row.orgType == 3"
@@ -300,6 +302,12 @@
size="small"
>楼盘选择</el-button
>
<el-button @click="startorg(scope.row)" type="text" size="small">
{{ scope.row.lockFlag == 0 ? "禁用" : "启用" }}</el-button
>
<el-button @click="deletes(scope.row)" type="text" size="small"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@@ -386,7 +394,7 @@
>
<el-option
v-for="item in orgList"
:key="item.orgCode"
:key="item.id"
:label="item.name"
:value="item.orgCode"
>
@@ -771,7 +779,14 @@

<script>
import { getAreaList } from "@/api/modules/api";
import { addObj, delObj, del1Obj, fetchList, putObj } from "@/api/admin/user";
import {
addObj,
delObj,
delObj1,
del1Obj,
fetchList,
putObj,
} from "@/api/admin/user";
import { getStore, setStore } from "@/util/store";
import { deptRoleList } from "@/api/admin/role";
import { fetchTree } from "@/api/admin/dept";
@@ -946,6 +961,7 @@ export default {
houseVisible: false,
deptTreeList: [], //部门树
roelFlag: false,
systemFlag: true, //判断是否为系统用户
accountId: "",
passwordForm: {
password: "",
@@ -1023,6 +1039,15 @@ export default {
let info = getStore({ name: "userInfo" });
// this.sign=info.sign
this.orgCode = info.orgCode;

// 权限判断
// 当他是系统用户时,显示所有,除系统用户之外只显示组织用户
if (localStorage.getItem("orgType") != 0) {
this.systemFlag = false;
this.choseFlag = false;
} else {
this.systemFlag = true;
}
// console.log(info);
this.roleList(); //table 列表
// this.userDeptTree()// 获取部门树
@@ -1217,7 +1242,7 @@ export default {
this.phoneFlag = true;
console.log(res.data.sysUser);
this.form.name = res.data.sysUser.name;
this.form.username = res.data.sysUser.phone;
this.form.username = res.data.sysUser.username;
this.form.sex = res.data.sysUser.sex;
} else {
// 没有用户
@@ -1233,12 +1258,12 @@ export default {
});
},
search() {
console.log(this.searchMsg, "搜索内容");
console.log(this.searchMsg, "搜索内容1");
// return
this.roleList();
},
search1() {
console.log(this.searchMsg1, "搜索内容");
console.log(this.searchMsg1, "搜索内容2");
// return
this.roleList();
},
@@ -1389,7 +1414,8 @@ export default {
// },
// 获取用户列表
roleList() {
// console.log(this.searchMsg);
// console.log(this.searchMsg1);
// return
if (this.choseFlag) {
// 注册用户列表
this.$api.api
@@ -1412,8 +1438,10 @@ export default {
this.$api.api
.orgUserList({
...this.page,
...this.searchMsg,
...this.searchMsg1,
orgType: localStorage.getItem("orgType"),
orgCode: localStorage.getItem("orgCode"),
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
// console.log(res);
@@ -1455,7 +1483,7 @@ export default {
}
this.gethouseList();
// 获取区域列表
this.areamanagerList();
this.areamanagerList(row.orgCode);
// 获取所有省列表
// console.log(await this.getValueByCondition(0))
this.allCityList = await this.getValueByCondition(0);
@@ -1515,10 +1543,10 @@ export default {
});
},
// 获取区域
areamanagerList() {
areamanagerList(orgCode) {
this.$api.api
.areamanagerList({
orgCode: this.orgCode,
orgCode,
})
.then((res) => {
// console.log(res)
@@ -1611,18 +1639,18 @@ export default {
console.log(res);
this.form = res.data.user;
// 公司id
this.form.orgId = res.data.role.orgId;
res.data.houseList.map((item) => {
this.houseIdList.push(item.id);
});
// this.form.orgId = res.data.role.orgId;
// res.data.houseList.map((item) => {
// this.houseIdList.push(item.id);
// });
// console.log(this.houseIdList);
// 更改类型
this.codeOrg = res.data.org.orgCode;
this.form.houseIdList = this.houseIdList.join(",");
this.form.userRoleId = res.data.role.roleId;
// this.codeOrg = res.data.org.orgCode;
// this.form.houseIdList = this.houseIdList.join(",");
// this.form.userRoleId = res.data.role.roleId;
this.form.userRoleType = res.data.user.userRoleType / 1;
this.form.deptId = res.data.user.id;
this.form.deptName = res.data.org.name;
// this.form.deptName = res.data.org.name;
// this.roleChange(res.data.org.orgCode)
console.log(this.form);
this.roelFlag = true;
@@ -1642,6 +1670,7 @@ export default {
console.log(res);
this.roleList();
this.dialogFormVisible = false;
// this.phoneFlag = false;
});
} else {
console.log("error submit!!");
@@ -1655,6 +1684,7 @@ export default {
// console.log(res);
this.roleList();
this.dialogFormVisible = false;
// this.phoneFlag = false;
});
} else {
console.log("error submit!!");
@@ -1668,7 +1698,7 @@ export default {
// this.form.deptName=''
// this.form.deptId=''
// this.form.userRoleId=''
(this.form = {
this.form = {
name: "", //用户名
username: "", //手机号
sex: "0", //性别
@@ -1678,9 +1708,14 @@ export default {
agentId: "", //代理商id
orgCode: "", //公司标识
userRoleType: "", //身份
}),
(this.roelFlag = false);
};
this.roelFlag = false;
this.houseIdList = [];
this.orgFlag = false;
this.roleFlag = false;
this.identityFlag = false;
this.agentFlag = false;
this.phoneFlag = false;
},
// 重置用户密码
resetPwd(row) {
@@ -1708,9 +1743,40 @@ export default {
delRole(row) {
console.log(row);
},
startorg(row) {
this.$confirm(
"确定修改客户信息状态为" +
(row.lockFlag == 0 ? "禁用" : "启用") +
", 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
let obj = {};
obj.id = row.id;
obj.lockFlag = row.lockFlag == 0 ? 1 : 0;
this.$api.api.updateLockFlag(obj).then((res) => {
console.log(res);
if (res.code == 0) {
this.$notify.success("修改成功");
this.roleList();
}
});
// delObj(row.userId)
// .then(() => {
// this.list.splice(index, 1)
// this.$notify.success('删除成功')
// }).catch(() => {
// this.$notify.error('删除失败')
// })
});
},
// 修改客户信息状态
editStatus(row) {
console.log(row);
// console.log(row);
this.$confirm(
"确定修改客户信息状态为" +
(row.showPhoneStatus == 0 ? "隐藏" : "显示") +
@@ -2008,8 +2074,8 @@ export default {
});
} else {
delObj1({
id: row.userId,
orgType: localStorage.getItem("orgType"),
id: row.id,
orgType: row.orgType,
accountId: row.accountId,
}).then(() => {
this.roleList();


+ 23
- 6
src/views/building/index.vue View File

@@ -3,7 +3,7 @@
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-top: 10px">
<div v-if="orgType != 0" class="div-lab">
<!-- <div v-if="orgType != 0" class="div-lab">
<div class="label">服务到期:</div>
<div class="toptimeqhuan">
<div
@@ -40,7 +40,23 @@
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div> -->

<div class="div-lab">
<div class="label">合同结束日期:</div>
<el-date-picker
v-model="starTime"
class="div-inp"
@change="timeChange1"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div> -->
<div v-if="orgType == 0" class="div-lab">
<div class="label">楼盘类型:</div>
<el-select
@@ -719,11 +735,12 @@ export default {
let obj = {
current: this.currentPage,
size: this.size,
orgType: localStorage.getItem("orgType"),
...this.searchForm,
};
if (this.orgType == 0) {
obj.residueTime = "";
}
// if (this.orgType == 0) {
// obj.residueTime = "";
// }
this.$api.api.zkhousePage(obj).then((res) => {
// console.log(res)
this.tableData = res.data.records;
@@ -791,7 +808,7 @@ export default {
propertyName: "",
serviceStatus: "",
houseType: "",
residueTime: 7,
// residueTime: 7,
startWorking: "",
endWorking: "",
agentName: "",


Loading…
Cancel
Save