Browse Source

init

newStyle
lancer 2 years ago
parent
commit
ba172cbde8
10 changed files with 269 additions and 59 deletions
  1. +2
    -2
      src/api/admin/menu.js
  2. +16
    -0
      src/api/modules/api.js
  3. +1
    -0
      src/page/index/index.vue
  4. +3
    -2
      src/page/index/top/top-setting.vue
  5. +6
    -4
      src/views/Customer/AgentManagement.vue
  6. +36
    -16
      src/views/Customer/Companymanagement.vue
  7. +4
    -4
      src/views/Template/PinspeakwordsList.vue
  8. +1
    -1
      src/views/admin/role/index.vue
  9. +165
    -13
      src/views/admin/user/index.vue
  10. +35
    -17
      src/views/building/index.vue

+ 2
- 2
src/api/admin/menu.js View File

@@ -4,7 +4,7 @@ import request from '@/router/axios'
export function getMenu(id) {
return request({
url: '/admin/menu',
params: {parentId: id,orgType:localStorage.getItem('orgType')},
params: {parentId: id,orgType:localStorage.getItem('orgType'),agentId:localStorage.getItem('agentId'),orgType:localStorage.getItem('orgType')},
method: 'get'
})
}
@@ -12,7 +12,7 @@ export function getMenu(id) {
export function getTopMenu() {
return request({
url: '/admin/menu',
params: {type: 'top',orgType:localStorage.getItem('orgType')},
params: {type: 'top',orgType:localStorage.getItem('orgType'),agentId:localStorage.getItem('agentId'),orgType:localStorage.getItem('orgType')},
method: 'get'
})
}


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

@@ -804,3 +804,19 @@ export function saveAgent(data) {
})
}

// 验证登陆人信息
export function userVerify(data) {
return request({
url: 'admin/user/verify',
method:'post',
data
})
}
// 注册用户修改
export function editRoleAndDept(data) {
return request({
url: '/admin/user/editRoleAndDept',
method:'put',
data
})
}

+ 1
- 0
src/page/index/index.vue View File

@@ -95,6 +95,7 @@ export default {
},
openMenu(item = {}) {
this.$store.dispatch("GetMenu", {type: true, id: item.id}).then(data => {
// console.log(data,'这里是data');
if (data.length !== 0) {
this.$router.$avueRouter.formatRoutes(data, true);
}


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

@@ -9,8 +9,9 @@
class="setting__content">
<div class="setting__header">版权信息</div>
<div class="setting__body setting__about">
<p>Version:PigX 4.0</p>
<p>Copyright: Pig4Cloud ©2018-2025</p>
<!-- <p>Version:PigX 4.0</p> -->
<p>name: 智控管家</p>
<p>Copyright: 京ICP备2021005217号-1</p>
</div>
<div class="setting__header">设置
<small>(滑动鼠标下面还有更多设置)</small>


+ 6
- 4
src/views/Customer/AgentManagement.vue View File

@@ -132,7 +132,7 @@
<el-button type="text" size="small" @click="infoeditor(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click="inforeplace(scope.row)">更换账号</el-button>
<el-button type="text" size="small" @click="toinifodelete(scope)">删除</el-button>
<el-button type="text" size="small" @click="editOpera(scope.row)">管理运营人员</el-button>
<el-button type="text" size="small" @click="editOpera(scope.row)">管理系统运营</el-button>
<el-button type="text" size="small" @click="toDisable(scope.row)">{{scope.row.lockFlag==0?'禁用':'启用'}}</el-button>
</template>
</el-table-column>
@@ -501,7 +501,7 @@ export default {
// 获取运营人员列表
this.operaForm.orgId=row.id
this.getAllOperationsStaff()
this.operaVisible=true
this.zkoperationrecordFindByOrg(row.id)
},
zkoperationrecordFindByOrg(orgId){
@@ -522,6 +522,7 @@ export default {
})
this.operaForm.operationalPeople=arr
}
this.operaVisible=true
})
},
confirmtime3(){
@@ -587,7 +588,7 @@ export default {
});
},

//获取运营人员
//获取系统运营人员
getAllOperationsStaff(){
this.optionsoperationalPeople=[];
this.$api.http.getAllOperationsStaff().then((res) => {
@@ -750,7 +751,8 @@ export default {
contractEndDate:this.contractEndDate,
serviceStatus:this.serviceStatus,
agentName:this.agentName,
operationalName:this.operationalName
operationalName:this.operationalName,
}).then((res) => {
console.log(res.data);
this.tableData=res.data.records;


+ 36
- 16
src/views/Customer/Companymanagement.vue View File

@@ -94,7 +94,8 @@
<el-button type="text" size="small" @click="infoeditor(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click="inforeplace(scope.row)">更换账号</el-button>
<el-button type="text" size="small" @click="toinifodelete(scope)">删除</el-button>
<el-button type="text" size="small" @click="editOpera(scope.row)">管理运营人员</el-button>
<el-button type="text" size="small" @click="editOpera(scope.row,0)">管理系统运营</el-button>
<el-button type="text" size="small" @click="editOpera(scope.row,1)">管理代理商运营</el-button>
<el-button type="text" size="small" @click="bindAgent(scope.row)">绑定代理商</el-button>
</template>
</el-table-column>
@@ -246,7 +247,7 @@
</div>
</el-dialog>

<el-dialog title="编辑运营人员" :visible.sync="operaVisible" >
<el-dialog :title="sysFlag==0?'绑定系统运营':'绑定代理商运营'" :visible.sync="operaVisible" >
<el-form :model="operaForm" label-position="labelPosition" :rules="operaRules" ref="operaForm" label-width="140px">
<el-form-item label="运营人员:" prop="operationalPeople">
<el-select v-model="operaForm.operationalPeople" style="width:80%" multiple placeholder="请选择">
@@ -356,6 +357,7 @@ export default {
pageNum:1,
pageSize:7,
orgType:'',
sysFlag:'0',
replaceagentobj:{
id:'',
managerPhone:'',
@@ -380,6 +382,7 @@ export default {
address:'',// 详细地址
// operationStaff:'',// 运营人员id
},
idx:'0',
operaForm:{
operationalPeople:''
},
@@ -457,7 +460,7 @@ export default {
if(valid){
// console.log(valid,this.operaForm);
this.$api.api.zkoperationrecordSaveCompany({
orgType:2,
orgType:this.idx==0?'1':'2',
accountIds:this.operaForm.operationalPeople.join(','),
orgId: this.operaForm.orgId
})
@@ -469,17 +472,23 @@ export default {
}
})
},
editOpera(row){
console.log(row);
editOpera(row,idx){
console.log(row,idx);
// 获取运营人员列表
this.operaForm.orgId=row.orgCode
this.getAllOperationsStaff()
this.operaVisible=true
this.zkoperationrecordFindByOrg(row.orgCode)
this.sysFlag=idx
// 获取所有代理商运营
this.getAllOperationsStaff(idx)
this.idx=idx
this.zkoperationrecordFindByOrg(row.orgCode,idx)
// this.operaVisible=true

},
zkoperationrecordFindByOrg(orgId){
zkoperationrecordFindByOrg(orgId,idx){
// console.log(idx,orgId);
// return
this.$api.api.zkoperationrecordFindByOrg({
orgType:'2',
orgType:idx==0?'1':'2',
orgId
})
.then(res=>{
@@ -495,6 +504,7 @@ export default {
})
this.operaForm.operationalPeople=arr
}

})
},
//编辑
@@ -625,13 +635,22 @@ export default {
this.dialogVisible=true;
},
//获取运营人员
getAllOperationsStaff(){
getAllOperationsStaff(idx){
this.optionsoperationStaff=[];
this.$api.http.getAllOperationsStaffByAgent({
agentId:localStorage.getItem('agentId')
}).then((res) => {
this.optionsoperationStaff= res.data
});
if(idx==1){
this.$api.http.getAllOperationsStaffByAgent({
agentId:localStorage.getItem('agentId')
}).then((res) => {
this.optionsoperationStaff= res.data
this.operaVisible=true
});
}else{
this.$api.http.getAllOperationsStaff().then((res) => {
this.optionsoperationStaff= res.data
this.operaVisible=true
});
}

},
//选择代理商获取运营人员列表并清空运营人员选择
clickagentId(){
@@ -732,6 +751,7 @@ export default {
operatorName:this.operatorName,
operationStaffName:this.operationStaffName,
name:this.name,
agentId:localStorage.getItem('agentId')
}
this.$api.http.getcompanyList(parmest).then((res) => {
console.log(res.data);


+ 4
- 4
src/views/Template/PinspeakwordsList.vue View File

@@ -84,10 +84,10 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.status==1" @click="clickstateis(scope.row)">启用</el-button>
<el-button v-if="scope.row.status==0" @click="clickstateno(scope.row)">停用</el-button>
<el-button @click="clickbianji(scope.row)">编辑</el-button>
<el-button @click="templatedel(scope.row)">删除</el-button>
<el-button type="text" size="small" v-if="scope.row.status==1" @click="clickstateis(scope.row)">启用</el-button>
<el-button type="text" size="small" v-if="scope.row.status==0" @click="clickstateno(scope.row)">停用</el-button>
<el-button type="text" size="small" @click="clickbianji(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click="templatedel(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>


+ 1
- 1
src/views/admin/role/index.vue View File

@@ -8,7 +8,7 @@
<!-- <el-radio-button label="1">公司角色</el-radio-button> -->
<el-radio-button label="2">代理商角色</el-radio-button>
<el-radio-button label="3">系统角色</el-radio-button>
<el-radio-button label="4">运营角色</el-radio-button>
<!-- <el-radio-button label="4">运营角色</el-radio-button> -->
</el-radio-group>
</div>
<!-- <div style="margin-bottom:20px;">


+ 165
- 13
src/views/admin/user/index.vue View File

@@ -365,6 +365,12 @@
<el-radio label="0">男</el-radio>
<el-radio label="1">女</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="手机号显隐" prop="showPhoneStatus" v-if="addFlag">
<el-radio-group v-model="form.showPhoneStatus">
<el-radio :label="0">是</el-radio>
<el-radio :label="1">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="登录密码"
@@ -499,6 +505,71 @@
</div>
</el-dialog>

<!-- 组织用户编辑 -->
<el-dialog
title="编辑用户"
:visible.sync="dialogFormVisibleTwo"
>
<el-form
:model="formTwo"
label-width="120px"
ref="formTwo"
:rules="rulesTwo"
>
<el-form-item label="登录手机" prop="username">
<el-input
v-model="formTwo.username"
disabled
style="width: 370px"
></el-input>
</el-form-item>
<el-form-item label="手机号显隐" prop="showPhoneStatus" >
<el-radio-group v-model="formTwo.showPhoneStatus">
<el-radio :label="0">是</el-radio>
<el-radio :label="1">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="角色:" prop="newRoleId">
<el-select
v-model="formTwo.newRoleId"
filterable
value-key="key"
style="width: 370px"
placeholder="请选择角色"
>
<el-option
v-for="item in userList"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="部门:" prop="deptId" v-if="orgFlag">
<el-select
v-model="formTwo.deptId"
filterable
value-key="key"
style="width: 370px"
placeholder="请选择部门"
>
<el-option
v-for="item in deptList"
:key="item.deptId"
:label="item.name"
:value="item.deptId"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisibleTwo = false">取 消</el-button>
<el-button type="primary" @click="editSureTwo">确 定</el-button>
</div>
</el-dialog>

<el-dialog
title="手机号验证"
:visible.sync="phoneVisible"
@@ -949,7 +1020,7 @@ export default {
form: {
name: "", //用户名
username: "", //手机号
sex: "0", //性别
sex: '0', //性别
password: "", //密码
orgType: "", //组织类型
roleId: "", //角色id
@@ -957,7 +1028,16 @@ export default {
orgCode: "", //公司标识
userRoleType: "", //身份
deptId:'',//部门
houseId:""
houseId:"",
showPhoneStatus:0//手机号显隐
},
formTwo: {
username: "", //手机号
userRoleType: "", //身份
deptId:'',//部门
roleId:'',//角色
newRoleId:"",
showPhoneStatus:0//手机号显隐
},
phoneFlag: false,
rolesOptions: [],
@@ -1013,6 +1093,7 @@ export default {
phoneVisible: false, //验证手机号
userRoleFlag: true,
passwordVisible: false,
dialogFormVisibleTwo:false,
orgList: [],
phoneRules: {
phone: [
@@ -1026,6 +1107,9 @@ export default {
{ min: 6, max: 11, message: "长度在 6 到 11 位", trigger: "blur" },
],
},
rulesTwo: {
newRoleId: [{ required: true, message: "请选择角色", trigger: "blur" }],
},
rules: {
username: [
{ required: true, message: "请填写登录手机", trigger: "blur" },
@@ -1271,6 +1355,7 @@ export default {
},
// 下一步
nextshow() {
let that=this
this.$refs.phoneForm.validate((valid) => {
if (valid) {
// 验证电话号码
@@ -1279,19 +1364,33 @@ export default {
// 判断数据是否已经有了
if (res.data) {
// 由用户
this.$api.api.userVerify({
orgType:localStorage.getItem('orgType'),
accountId:res.data.sysUser.accountId,
username:res.data.sysUser.username,
})
.then(res1=>{
// console.log(res1);
this.phoneFlag = true;
console.log(res.data.sysUser);
// console.log(res.data.sysUser);
this.form.name = res.data.sysUser.name;
this.form.username = res.data.sysUser.username;
this.form.sex = res.data.sysUser.sex;
this.phoneVisible=false
this.dialogFormVisible = true;
})
.catch(err=>{
console.log(err)
})

} else {
// 没有用户
console.log("没有用户");
this.form.username = this.phoneForm.phone;
this.phoneFlag = false;
this.phoneVisible=false
this.dialogFormVisible = true;
}
this.phoneVisible = false;
this.dialogFormVisible = true;
});
// return
}
@@ -1752,7 +1851,7 @@ export default {
this.form = {
name: "", //用户名
username: "", //手机号
sex: "0", //性别
sex: '0', //性别
password: "", //密码
orgType: "", //组织类型
houseId:"",
@@ -1760,7 +1859,8 @@ export default {
agentId: "", //代理商id
orgCode: "", //公司标识
userRoleType: "", //身份
deptId:''
deptId:'',
showPhoneStatus:0
};
this.roelFlag = false;
this.houseIdList = [];
@@ -1987,18 +2087,70 @@ export default {
this.$forceUpdate();
},
editTwo(row){
console.log('这里是代理商');
this.editVisible=true

this.formTwo.username=row.username
this.formTwo.showPhoneStatus=row.showPhoneStatus
this.formTwo.roleId=row.roleId
this.formTwo.accountId=row.accountId
this.formTwo.orgType=row.orgType
this.formTwo.houseId=row.houseId
this.formTwo.newRoleId=row.roleId
this.formTwo.deptId=row.deptId
console.log(this.formTwo);
// 获取角色列表
this.typeChange1(row)
// 获取部门列表
this.dialogFormVisibleTwo=true
},
editSureTwo(){
this.$refs.formTwo.validate(valid=>{
if(valid){
console.log(this.formTwo);
this.$api.api.editRoleAndDept(this.formTwo)
.then(res=>{
this.$message.success('修改成功')
this.dialogFormVisibleTwo=false
})
}
})
},
getDeptList(){
getDeptList(houseId){
this.$api.api
.deptFindList({
houseId: localStorage.getItem('houseId')
houseId
})
.then(res=>{
this.deptList=res.data
})
},
typeChange1(row) {
console.log(row);
this.userList = [];
this.identityList = [];
if (row.orgType == 0) {
// 平台 只显示角色
this.orgFlag = false;
this.$api.api
.findRoleByOrgCode({
orgCode: null,
agentId: null,
})
.then((res) => {
this.userList = res.data;
});
} else if (row.orgType == 1) {
// 代理商 选择代理商和角色
this.orgFlag = false;
this.orgCodeChange(row.agentId, 1);
} else if (row.orgType == 2) {
// 公司 选择公司和角色
this.orgFlag = true;
this.orgCodeChange(row.orgCode, 0);
} else {
// 楼盘 选择公司 角色 角色身份
this.orgFlag = true;
this.orgCodeChange(row.orgCode, 0);
this.getDeptList(row.houseId)
}
},
typeChange(e) {
console.log(e);
@@ -2043,7 +2195,7 @@ export default {
// this.agentFlag = false;
this.form.houseId=localStorage.getItem("houseId")
this.orgCodeChange(localStorage.getItem("orgCode"), 0);
this.getDeptList()
this.getDeptList(localStorage.getItem('houseId'))
}
// 字典表接口
this.userDict(


+ 35
- 17
src/views/building/index.vue View File

@@ -226,9 +226,8 @@
>更换账号</el-button
>
<el-button type="text" v-if="orgType == 2">添加员工</el-button>
<el-button type="text" size="small" @click="editOpera(row)"
>管理运营人员</el-button
>
<el-button type="text" size="small" @click="editOpera(row,0)">管理系统运营人员</el-button>
<el-button type="text" size="small" @click="editOpera(row,1)">管理代理商运营</el-button>
<!-- <el-button type="text">添加员工</el-button> -->
<el-button type="text" size="small" @click="bindAgent(row)">绑定代理商</el-button>
<el-button type="text" @click="del(row)">删除</el-button>
@@ -442,7 +441,7 @@
</div>
</el-dialog> -->

<el-dialog title="编辑运营人员" :visible.sync="operaVisible">
<el-dialog :title="sysFlag==0?'绑定系统运营':'绑定代理商运营'" :visible.sync="operaVisible">
<el-form
:model="operaForm"
label-position="labelPosition"
@@ -599,6 +598,8 @@ export default {
total: 10,
value: "",
input: "",
sysFlag:'0',
idx:'0',
tableData: [],
optionsoperationalPeople: [],
orgType: "",
@@ -708,7 +709,7 @@ export default {
// console.log(valid,this.operaForm);
this.$api.api
.zkoperationrecordSaveHouse({
orgType: 3,
orgType: this.idx==0?'1':'2',
accountIds: this.operaForm.operationalPeople.join(","),
orgId: this.operaForm.orgId,
orgCode: this.operaForm.orgCode,
@@ -721,19 +722,20 @@ export default {
}
});
},
editOpera(row) {
console.log(row);
editOpera(row,idx) {
// console.log(row,idx);
// 获取运营人员列表
this.operaForm.orgId = row.id;
this.operaForm.orgCode = row.orgCode;
this.AllOperationsStaff(row.agentId);
this.operaVisible = true;
this.zkoperationrecordFindByOrg(row.id);
this.sysFlag=idx
this.idx=idx
this.AllOperationsStaff(idx);
this.zkoperationrecordFindByOrg(row.id,idx);
},
zkoperationrecordFindByOrg(orgId) {
zkoperationrecordFindByOrg(orgId,idx) {
this.$api.api
.zkoperationrecordFindByOrg({
orgType: "3",
orgType: idx==0?'1':'2',
orgId,
})
.then((res) => {
@@ -752,12 +754,26 @@ export default {
});
},
//获取运营人员
AllOperationsStaff(agentId) {
console.log(agentId);
AllOperationsStaff(idx) {
console.log(idx);
this.optionsoperationalPeople = [];
this.$api.api.getAllOperationsStaffByAgent({agentId}).then((res) => {
this.optionsoperationalPeople = res.data;
});
if(idx==1){
this.$api.http.getAllOperationsStaffByAgent({
agentId:localStorage.getItem('agentId')
}).then((res) => {
this.optionsoperationalPeople= res.data
this.operaVisible = true;
});
}else{
this.$api.http.getAllOperationsStaff().then((res) => {
this.optionsoperationalPeople= res.data
this.operaVisible = true;
});
}

// this.$api.api.getAllOperationsStaffByAgent({agentId}).then((res) => {
// this.optionsoperationalPeople = res.data;
// });
},
addSurequxiao() {
this.dialogVisible = false;
@@ -913,6 +929,8 @@ export default {
current: this.currentPage,
size: this.size,
orgType: localStorage.getItem("orgType"),
agentId: localStorage.getItem("agentId"),
orgCode: localStorage.getItem("orgCode"),
...this.searchForm,
};
if (this.orgType == 0) {


Loading…
Cancel
Save