lancer 3 lat temu
rodzic
commit
726a860113
9 zmienionych plików z 454 dodań i 117 usunięć
  1. +48
    -5
      src/api/modules/api.js
  2. +1
    -1
      src/page/check/chose.vue
  3. +1
    -1
      src/page/check/index.vue
  4. +25
    -20
      src/page/login/userlogin.vue
  5. +91
    -17
      src/views/Customer/AgentManagement.vue
  6. +107
    -24
      src/views/Customer/Companymanagement.vue
  7. +58
    -31
      src/views/admin/user/index.vue
  8. +121
    -16
      src/views/building/index.vue
  9. +2
    -2
      vue.config.js

+ 48
- 5
src/api/modules/api.js Wyświetl plik

@@ -1,5 +1,15 @@
import request from '@/router/axios'


// 字典表接口
export function userDict(query) {
return request({
url: '/admin/user/dict',
method: 'get',
params: query
})
}

export function fetchList(query) {
return request({
url: '/admin/user/page',
@@ -77,7 +87,7 @@ export function getUserMsg(query) {
// 组织用户禁用先用
export function updateLockFlag(obj) {
return request({
url: '/autoSR/cushouseuserrelationmid/updateLockFlag',
url: '/admin/user/updateLockFlag',
method: 'post',
data: obj
})
@@ -506,13 +516,13 @@ export function equipmentManagement(query) {
})
}

export function findByUserName(query) {
export function findByUserName(data) {
return request({
url: 'admin/user/findByUserName',
method:'post',
params:{
orgType:localStorage.getItem('orgType'),
...query
data:{
orgType:localStorage.getItem('orgType')/1,
...data
}
})
}
@@ -687,3 +697,36 @@ export function houseStatistics(query) {
params:query
})
}
// 运营人员列表获取
export function zkoperationrecordFindByOrg(query) {
return request({
url: '/autoSR/zkoperationrecord/findByOrg',
method:'get',
params:query
})
}

// 运营人员添加
export function zkoperationrecord(data) {
return request({
url: '/autoSR/zkoperationrecord',
method:'post',
data
})
}
// 公司运营人员添加
export function zkoperationrecordSaveCompany(data) {
return request({
url: '/autoSR/zkoperationrecord/saveCompany',
method:'post',
data
})
}
// 楼盘运营人员添加
export function zkoperationrecordSaveHouse(data) {
return request({
url: '/autoSR/zkoperationrecord/saveHouse',
method:'post',
data
})
}

+ 1
- 1
src/page/check/chose.vue Wyświetl plik

@@ -274,7 +274,7 @@ export default {
findByUserName() {
this.$api.api
.findByUserName({
managerPhone: this.info.username,
username: this.info.username,
})
.then((res) => {
// console.log(res);


+ 1
- 1
src/page/check/index.vue Wyświetl plik

@@ -156,7 +156,7 @@ export default {
findByUserName() {
this.$api.api
.findByUserName({
managerPhone: this.info.username,
username: this.info.username,
})
.then((res) => {
// console.log(res);


+ 25
- 20
src/page/login/userlogin.vue Wyświetl plik

@@ -113,7 +113,7 @@ export default {
});
},
verifySuccess(params) {
let that=this
let that = this;
this.loginForm.code = params.captchaVerification;
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
// this.$router.push({ path: this.tagWel.value });
@@ -121,25 +121,30 @@ export default {
// console.log(res)
// 循环数组,给定各种标志
if (res.data.length == 0) {
let idx = res.data[0].orgType;
localStorage.setItem("orgType", idx);
if (idx == 0) {
// 质控管家后台
that.$router.push({ path: "/wel" });
}
if (idx == 1) {
// 代理商
that.$router.push({ path: "/chose", query: { flag: 1 } });
}
if (idx == 2) {
// 公司后台
that.$router.push({ path: "/chose", query: { flag: 2 } });
}
if (idx == 3) {
// 楼盘后台
that.$router.push({ path: "/chose", query: { flag: 3 } });
}
} else {
// this.$message.warning("您已经被禁用");
this.$message.warning("别看了你进不了");
}
// else if (res.data.length == 1) {
// let idx = res.data[0].orgType;
// localStorage.setItem("orgType", idx);
// if (idx == 0) {
// // 质控管家后台
// that.$router.push({ path: "/wel" });
// }
// if (idx == 1) {
// // 代理商
// that.$router.push({ path: "/chose", query: { flag: 1 } });
// }
// if (idx == 2) {
// // 公司后台
// that.$router.push({ path: "/chose", query: { flag: 2 } });
// }
// if (idx == 3) {
// // 楼盘后台
// that.$router.push({ path: "/chose", query: { flag: 3 } });
// }
// }
else {
that.$router.push({ path: "/check" });
}
});


+ 91
- 17
src/views/Customer/AgentManagement.vue Wyświetl plik

@@ -127,11 +127,12 @@
<div v-if="scope.row.residueTime ==0">过期</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope">
<div style="color: #2671E2;" @click="infoeditor(scope.row)">编辑</div>
<div style="color: #2671E2;" @click="inforeplace(scope.row)">更换账号</div>
<div style="color: #2671E2;" @click="toinifodelete(scope)">删除</div>
<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>
</template>
</el-table-column>
</el-table>
@@ -200,7 +201,7 @@
<el-form-item label="详细地址:" prop="address">
<el-input v-model="addagentobj.address"></el-input>
</el-form-item>
<el-form-item label="运营人员:" prop="operationalPeople">
<!-- <el-form-item label="运营人员:" prop="operationalPeople">
<el-select v-model="addagentobj.operationalPeople" placeholder="请选择">
<el-option
v-for="item in optionsoperationalPeople"
@@ -211,7 +212,7 @@
</el-option>
</el-select>

</el-form-item>
</el-form-item> -->
<el-form-item label="管理员账号:" prop="managerPhone">
<el-input v-model="addagentobj.managerPhone"></el-input>
</el-form-item>
@@ -273,7 +274,7 @@
<el-form-item label="详细地址:" prop="address">
<el-input v-model="editoragentobj.address"></el-input>
</el-form-item>
<el-form-item label="运营人员:" prop="operationalPeople">
<!-- <el-form-item label="运营人员:" prop="operationalPeople">
<el-select v-model="editoragentobj.operationalPeople" placeholder="请选择">
<el-option
v-for="item in optionsoperationalPeople"
@@ -283,7 +284,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible2 = false">取 消</el-button>
@@ -308,6 +309,25 @@
</div>
</el-dialog>

<el-dialog title="编辑运营人员" :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" collapse-tags multiple placeholder="请选择">
<el-option
v-for="item in optionsoperationalPeople"
:key="item.value"
:label="item.name"
:value="item.accountId"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="operaVisible = false">取 消</el-button>
<el-button type="primary" @click="saveOpera()">保存</el-button>
</div>
</el-dialog>
</div>
</template>

@@ -328,6 +348,7 @@ export default {
dialogVisible:false,
dialogVisible2:false,
dialogVisible3:false,
operaVisible:false,
timelist:'',
tableData: [],
currentPage4:1,
@@ -347,7 +368,7 @@ export default {
provinceId:'',// 省id
cityId:'',// 市id
address:'',// 详细地址
operationalPeople:'',// 运营人员id
// operationalPeople:'',// 运营人员id
managerPhone:'',// 管理员账号
managerPassword:'',// 管理员账号密码
linkmanPhone:'',// 联系人手机号
@@ -362,7 +383,7 @@ export default {
provinceId:'',// 省id
cityId:'',// 市id
address:'',// 详细地址
operationalPeople:'',// 运营人员id
// operationalPeople:'',// 运营人员id
linkmanPhone:'',// 联系人手机号
rulestimelist:[]
},
@@ -385,9 +406,9 @@ export default {
address: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
],
operationalPeople: [
{ required: true, message: '请选择运营人员', trigger: 'blur' },
],
// operationalPeople: [
// { required: true, message: '请选择运营人员', trigger: 'blur' },
// ],
managerPhone: [
{ required: true, message: '请输入管理员账号', trigger: 'blur' },
],
@@ -418,14 +439,22 @@ export default {
address: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
],
operationalPeople: [
{ required: true, message: '请选择运营人员', trigger: 'blur' },
],
// operationalPeople: [
// { required: true, message: '请选择运营人员', trigger: 'blur' },
// ],
linkmanPhone: [
{ required: true, message: '请输入联系人手机号', trigger: 'blur' },
{ min: 11, max: 11, message: '请输入手机号', trigger: 'blur' }
],
},
operaForm:{
operationalPeople:''
},
operaRules:{
operationalPeople: [
{ required: true, message: '请选择运营人员', trigger: 'blur' },
],
},
optionsparentId:[],//省份列表
optionscityId:[],//市列表
optionsoperationalPeople:[],//运营人员列表
@@ -449,6 +478,51 @@ export default {
this.getAgentList()
},
methods: {
saveOpera(){
this.$refs.operaForm.validate(valid=>{
if(valid){
// console.log(valid,this.operaForm);
this.$api.api.zkoperationrecord({
orgType:1,
accountIds:this.operaForm.operationalPeople.join(','),
orgId: this.operaForm.orgId
})
.then(res=>{
console.log(res);
this.$message.success('操作成功')
this.operaVisible=false
})
}
})
},
editOpera(row){
console.log(row);
// 获取运营人员列表
this.operaForm.orgId=row.id
this.getAllOperationsStaff()
this.operaVisible=true
this.zkoperationrecordFindByOrg(row.id)
},
zkoperationrecordFindByOrg(orgId){
this.$api.api.zkoperationrecordFindByOrg({
orgType:'1',
orgId
})
.then(res=>{
// console.log(res);
if(res.data.length==0){
// 没有运营人员
this.operaForm.operationalPeople=[]
}else{
let arr=[]
// 有运营
res.data.map(item=>{
arr.push(item.accountId)
})
this.operaForm.operationalPeople=arr
}
})
},
confirmtime3(){
this.editoragentobj.contractStartDate=this.editoragentobj.rulestimelist[0];
this.editoragentobj.contractEndDate=this.editoragentobj.rulestimelist[1];
@@ -465,7 +539,7 @@ export default {
this.editoragentobj. provinceId=row.provinceId;// 省id
this.editoragentobj.cityId=row.cityId;// 市id
this.editoragentobj.address=row.address;// 详细地址
this.editoragentobj. operationalPeople=row.operationalPeople;// 运营人员id
// this.editoragentobj. operationalPeople=row.operationalPeople;// 运营人员id
this.editoragentobj.linkmanPhone=row.linkmanPhone;// 联系人手机号
this.editoragentobj.rulestimelist=[row.contractStartDate,row.contractEndDate];
this.editoragentobj.id=row.id;


+ 107
- 24
src/views/Customer/Companymanagement.vue Wyświetl plik

@@ -89,11 +89,12 @@
align="center"
>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope">
<div style="color: #2671E2;" @click="infoeditor(scope.row)">编辑</div>
<div style="color: #2671E2;" @click="inforeplace(scope.row)">更换账号</div>
<div style="color: #2671E2;" @click="toinifodelete(scope)">删除</div>
<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>
</template>
</el-table-column>
</el-table>
@@ -114,7 +115,8 @@
<el-dialog title="新增公司" :visible.sync="dialogVisible" >
<el-form :model="addagentobj" label-position="labelPosition" :rules="rules" ref="addagentobj" label-width="140px" style="width:60%; margin: 0 auto;">
<el-form-item label="代理商名称:" prop="agentId">
<el-select v-model="addagentobj.agentId" placeholder="请选择" @change='clickagentId()'>
<!-- <el-select v-model="addagentobj.agentId" placeholder="请选择" @change='clickagentId()'> -->
<el-select v-model="addagentobj.agentId" placeholder="请选择">
<el-option v-for="item in optionsagentId" :key="item.value" :label="item.agentName" :value="item.id" ></el-option>
</el-select>
</el-form-item>
@@ -147,7 +149,7 @@
<el-form-item label="详细地址:" prop="address">
<el-input v-model="addagentobj.address"></el-input>
</el-form-item>
<el-form-item label="运营人员:" prop="operationStaff">
<!-- <el-form-item label="运营人员:" prop="operationStaff">
<el-select v-model="addagentobj.operationStaff" placeholder="请选择">
<el-option
v-for="item in optionsoperationStaff"
@@ -158,7 +160,7 @@
</el-option>
</el-select>

</el-form-item>
</el-form-item> -->
<el-form-item label="管理员账号:" prop="managerPhone">
<el-input v-model="addagentobj.managerPhone"></el-input>
</el-form-item>
@@ -176,7 +178,8 @@
<el-dialog title="编辑" :visible.sync="dialogVisible2" >
<el-form :model="editoragentobj" label-position="labelPosition" :rules="editorrules" ref="editoragentobj" label-width="140px" style="width:60%; margin: 0 auto;">
<el-form-item label="代理商名称:" prop="operator">
<el-select v-model="editoragentobj.operator" placeholder="请选择" @change='clickagentId22()'>
<!-- <el-select v-model="editoragentobj.operator" placeholder="请选择" @change='clickagentId22()'> -->
<el-select v-model="editoragentobj.operator" placeholder="请选择">
<el-option v-for="item in optionsagentId" :key="item.value" :label="item.agentName" :value="item.id" ></el-option>
</el-select>
</el-form-item>
@@ -208,7 +211,7 @@
<el-form-item label="详细地址:" prop="address">
<el-input v-model="editoragentobj.address"></el-input>
</el-form-item>
<el-form-item label="运营人员:" prop="operationStaff">
<!-- <el-form-item label="运营人员:" prop="operationStaff">
<el-select v-model="editoragentobj.operationStaff" placeholder="请选择">
<el-option
v-for="item in optionsoperationStaff"
@@ -218,7 +221,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible2 = false">取 消</el-button>
@@ -242,6 +245,25 @@
</div>
</el-dialog>

<el-dialog title="编辑运营人员" :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" collapse-tags multiple placeholder="请选择">
<el-option
v-for="item in optionsoperationStaff"
:key="item.value"
:label="item.name"
:value="item.accountId"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="operaVisible = false">取 消</el-button>
<el-button type="primary" @click="saveOpera()">保存</el-button>
</div>
</el-dialog>
</div>
</template>

@@ -262,9 +284,9 @@ export default {
managerPassword:'',// 管理员账号密码
},
rules:{
agentId: [
{ required: true, message: '请选择代理商', trigger: 'blur' },
],
// agentId: [
// { required: true, message: '请选择代理商', trigger: 'blur' },
// ],
name: [
{ required: true, message: '请输入公司名称', trigger: 'blur' },
],
@@ -284,9 +306,9 @@ export default {
address: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
],
operationStaff: [
{ required: true, message: '请选择运营人员', trigger: 'blur' },
],
// operationStaff: [
// { required: true, message: '请选择运营人员', trigger: 'blur' },
// ],
managerPhone: [
{ required: true, message: '请输入管理员账号', trigger: 'blur' },
],
@@ -303,6 +325,7 @@ export default {
dialogVisible:false,
dialogVisible2:false,
dialogVisible3:false,
operaVisible:false,
currentPage4:1,
operatorName:'',//代理商名称
operationStaffName:'',//运营人员名称
@@ -333,12 +356,20 @@ export default {
provinceId:'',// 省id
cityId:'',// 市id
address:'',// 详细地址
operationStaff:'',// 运营人员id
// operationStaff:'',// 运营人员id
},
editorrules:{
operator: [
{ required: true, message: '请选择代理商', trigger: 'blur' },
operaForm:{
operationalPeople:''
},
operaRules:{
operationalPeople: [
{ required: true, message: '请选择运营人员', trigger: 'blur' },
],
},
editorrules:{
// operator: [
// { required: true, message: '请选择代理商', trigger: 'blur' },
// ],
name: [
{ required: true, message: '请输入公司名称', trigger: 'blur' },
],
@@ -358,9 +389,9 @@ export default {
address: [
{ required: true, message: '请输入详细地址', trigger: 'blur' },
],
operationStaff: [
{ required: true, message: '请选择运营人员', trigger: 'blur' },
],
// operationStaff: [
// { required: true, message: '请选择运营人员', trigger: 'blur' },
// ],
}
};
},
@@ -369,6 +400,51 @@ export default {
this.getcompanyList()
},
methods: {
saveOpera(){
this.$refs.operaForm.validate(valid=>{
if(valid){
// console.log(valid,this.operaForm);
this.$api.api.zkoperationrecordSaveCompany({
orgType:2,
accountIds:this.operaForm.operationalPeople.join(','),
orgId: this.operaForm.orgId
})
.then(res=>{
console.log(res);
this.$message.success('操作成功')
this.operaVisible=false
})
}
})
},
editOpera(row){
console.log(row);
// 获取运营人员列表
this.operaForm.orgId=row.orgCode
this.getAllOperationsStaff()
this.operaVisible=true
this.zkoperationrecordFindByOrg(row.orgCode)
},
zkoperationrecordFindByOrg(orgId){
this.$api.api.zkoperationrecordFindByOrg({
orgType:'2',
orgId
})
.then(res=>{
// console.log(res);
if(res.data.length==0){
// 没有运营人员
this.operaForm.operationalPeople=[]
}else{
let arr=[]
// 有运营
res.data.map(item=>{
arr.push(item.accountId)
})
this.operaForm.operationalPeople=arr
}
})
},
//编辑
infoeditor(row){
this.editoragentobj.id=row.id;
@@ -380,7 +456,7 @@ export default {
this.editoragentobj.provinceId=res.data.provinceId;
this.editoragentobj.cityId=res.data.cityId;
this.editoragentobj.address=res.data.address;
this.editoragentobj.operationStaff=res.data.operationStaff;
// this.editoragentobj.operationStaff=res.data.operationStaff;
});
this.findMyAgent()
this.getparentIdList()
@@ -496,6 +572,13 @@ export default {
this.getparentIdList()
this.dialogVisible=true;
},
//获取运营人员
getAllOperationsStaff(){
this.optionsoperationStaff=[];
this.$api.http.getAllOperationsStaffByAgent().then((res) => {
this.optionsoperationStaff= res.data
});
},
//选择代理商获取运营人员列表并清空运营人员选择
clickagentId(){
this.optionsoperationStaff=[];


+ 58
- 31
src/views/admin/user/index.vue Wyświetl plik

@@ -296,7 +296,7 @@
<el-table-column prop="address" label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
v-if="scope.row.orgType == 3"
v-if="scope.row.orgType == 3||scope.row.userRoleType==8"
@click="gochosehouse(scope.row)"
type="text"
size="small"
@@ -380,6 +380,31 @@
<el-option label="楼盘" :value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item
label="身份"
prop="userRoleType"
v-if="identityFlag && addFlag"
>
<el-select
v-model="form.userRoleType"
value-key="key"
style="width: 370px"
placeholder="请选择身份"
>
<!-- <el-option label="项目总" value="2"></el-option>
<el-option label="客服" value="3"></el-option>
<el-option label="策划" value="4"></el-option>
<el-option label="经理" value="5"></el-option>
<el-option label="置业顾问" value="6"></el-option> -->
<el-option
v-for="item in identityList"
:key="item.dictValue"
:label="item.dictName"
:value="item.dictValue"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="选择公司:"
v-if="orgFlag && addFlag"
@@ -439,24 +464,6 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="身份"
prop="userRoleType"
v-if="identityFlag && addFlag"
>
<el-select
v-model="form.userRoleType"
value-key="key"
style="width: 370px"
placeholder="请选择身份"
>
<el-option label="项目总" value="2"></el-option>
<el-option label="客服" value="3"></el-option>
<el-option label="策划" value="4"></el-option>
<el-option label="经理" value="5"></el-option>
<el-option label="置业顾问" value="6"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
@@ -840,6 +847,7 @@ export default {
},
},
managerStr: [],
identityList: [],
choseFlag: true,
// 获取的区域列表
arealist: [],
@@ -1417,14 +1425,13 @@ export default {
// console.log(this.searchMsg1);
// return
if (this.choseFlag) {
let orgId=''
if(localStorage.getItem("orgType")==0){
orgId=''
}
else if(localStorage.getItem("orgType")==1){
orgId=localStorage.getItem("agentId")
}else{
orgId=localStorage.getItem("orgCode")
let orgId = "";
if (localStorage.getItem("orgType") == 0) {
orgId = "";
} else if (localStorage.getItem("orgType") == 1) {
orgId = localStorage.getItem("agentId");
} else {
orgId = localStorage.getItem("orgCode");
}
// 注册用户列表
this.$api.api
@@ -1766,7 +1773,8 @@ export default {
}
).then(() => {
let obj = {};
obj.id = row.id;
obj.accountId = row.accountId;
obj.orgType = row.orgType;
obj.lockFlag = row.lockFlag == 0 ? 1 : 0;
this.$api.api.updateLockFlag(obj).then((res) => {
console.log(res);
@@ -1944,11 +1952,14 @@ export default {
},
typeChange(e) {
console.log(e);
this.userList = [];
this.form.userRoleType=''
this.identityList = [];
if (e == 0) {
// 平台 只显示角色
this.orgFlag = false;
this.roleFlag = true;
this.identityFlag = false;
this.identityFlag = true;
this.agentFlag = false;
this.$api.api
.findRoleByOrgCode({
@@ -1962,13 +1973,13 @@ export default {
// 代理商 选择代理商和角色
this.orgFlag = false;
this.roleFlag = true;
this.identityFlag = false;
this.identityFlag = true;
this.agentFlag = true;
} else if (e == 2) {
// 公司 选择公司和角色
this.orgFlag = true;
this.roleFlag = true;
this.identityFlag = false;
this.identityFlag = true;
this.agentFlag = false;
} else {
// 楼盘 选择公司 角色 角色身份
@@ -1977,6 +1988,20 @@ export default {
this.identityFlag = true;
this.agentFlag = false;
}
// 字典表接口
this.userDict(
{
dictKey: e,
dictType: 3,
},
"identityList"
);
},
userDict(obj, str) {
this.$api.api.userDict(obj).then((res) => {
console.log(res);
this[str] = res.data;
});
},
getList(page, params) {
this.listLoading = true;
@@ -2077,6 +2102,8 @@ export default {
type: "warning",
}
).then(() => {
console.log(row);
console.log(row.userId,'123');
if (this.choseFlag) {
delObj(row.userId).then(() => {
this.roleList();


+ 121
- 16
src/views/building/index.vue Wyświetl plik

@@ -42,7 +42,7 @@
</el-date-picker>
</div> -->

<div class="div-lab">
<div class="div-lab">
<div class="label">合同结束日期:</div>
<el-date-picker
v-model="starTime"
@@ -56,7 +56,8 @@
end-placeholder="结束日期"
>
</el-date-picker>
</div> -->
</div>

<div v-if="orgType == 0" class="div-lab">
<div class="label">楼盘类型:</div>
<el-select
@@ -225,6 +226,9 @@
>更换账号</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">添加员工</el-button> -->
<el-button type="text" @click="del(row)">删除</el-button>
</template>
@@ -321,7 +325,7 @@
<el-form-item label="详细地址" prop="address">
<el-input v-model="ruleForm.address"></el-input>
</el-form-item>
<el-form-item
<!-- <el-form-item
label="运营人员"
prop="operationalPeople"
v-if="orgType == 0"
@@ -338,7 +342,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="管理员账号" prop="managerPhone" v-if="!editFlag">
<el-input v-model="ruleForm.managerPhone"></el-input>
</el-form-item>
@@ -355,7 +359,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addSurequxiao()">取 消</el-button>
<el-button @click="addSurequxiao()">取 消</el-button>
<el-button type="primary" @click="addSure">{{
editFlag ? "编辑" : "保存"
}}</el-button>
@@ -436,6 +440,37 @@
<el-button type="primary">保存</el-button>
</div>
</el-dialog> -->

<el-dialog title="编辑运营人员" :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"
collapse-tags
multiple
placeholder="请选择"
>
<el-option
v-for="item in optionsoperationalPeople"
:key="item.value"
:label="item.name"
:value="item.accountId"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="operaVisible = false">取 消</el-button>
<el-button type="primary" @click="saveOpera()">保存</el-button>
</div>
</el-dialog>
</div>
</template>

@@ -460,7 +495,7 @@ export default {
props: {
lazy: true,
async lazyLoad(node, resolve) {
console.log(node,123);
console.log(node, 123);
const { level } = node;
if (level == 0) {
console.log(23);
@@ -488,6 +523,7 @@ export default {
},
editFlag: false,
changeFlag: false,
operaVisible: false,
starTime: [],
searchForm: {
corporateName: "",
@@ -530,6 +566,7 @@ export default {
value: "",
input: "",
tableData: [],
optionsoperationalPeople: [],
orgType: "",
orgList: [],
operationList: [],
@@ -572,6 +609,14 @@ export default {
managerPhone: [{ validator: validatePass, trigger: "blur" }],
linkmanPhone: [{ validator: validatePass, trigger: "blur" }],
},
operaForm: {
operationalPeople: "",
},
operaRules: {
operationalPeople: [
{ required: true, message: "请选择运营人员", trigger: "blur" },
],
},
};
},
mounted() {
@@ -579,13 +624,69 @@ export default {
// 获取公司列表数据
this.getOrgList();
// 获取运营人员
this.getAllOperationsStaff();
// this.getAllOperationsStaff();
// 获取列表数据
this.zkhousePage();
},
methods: {
addSurequxiao(){
this.dialogVisible=false
saveOpera() {
this.$refs.operaForm.validate((valid) => {
if (valid) {
// console.log(valid,this.operaForm);
this.$api.api
.zkoperationrecordSaveHouse({
orgType: 2,
accountIds: this.operaForm.operationalPeople.join(","),
orgId: this.operaForm.orgId,
orgCode: this.operaForm.orgCode,
})
.then((res) => {
console.log(res);
this.$message.success("操作成功");
this.operaVisible = false;
});
}
});
},
editOpera(row) {
console.log(row);
// 获取运营人员列表
this.operaForm.orgId = row.id;
this.operaForm.orgCode = row.orgCode;
this.AllOperationsStaff();
this.operaVisible = true;
this.zkoperationrecordFindByOrg(row.id);
},
zkoperationrecordFindByOrg(orgId) {
this.$api.api
.zkoperationrecordFindByOrg({
orgType: "2",
orgId,
})
.then((res) => {
// console.log(res);
if (res.data.length == 0) {
// 没有运营人员
this.operaForm.operationalPeople = [];
} else {
let arr = [];
// 有运营
res.data.map((item) => {
arr.push(item.accountId);
});
this.operaForm.operationalPeople = arr;
}
});
},
//获取运营人员
AllOperationsStaff() {
this.optionsoperationalPeople = [];
this.$api.http.getAllOperationsStaff().then((res) => {
this.optionsoperationalPeople = res.data;
});
},
addSurequxiao() {
this.dialogVisible = false;
},
// 添加楼盘
addSure() {
@@ -655,8 +756,10 @@ export default {
];
// console.log(this.time)
this.ruleForm = Object.assign({}, row);
this.ruleForm.area = [this.ruleForm.provinceId, this.ruleForm.cityId];
this.dialogVisible = true;
// 获取地区选择数据,在这里对回显的时候进行操作,首先先获取一级省的数据
this.getProvinceList();
// this.getProvinceList();
// 级联选择器回显问题

this.editFlag = true;
@@ -784,15 +887,17 @@ export default {
arr.push(obj);
});
this.$set(this.addressOptions[idx], "children", arr);

console.log(this.addressOptions[idx], "123");
// console.log(this.addressOptions[idx], "123");
this.addressOptions = Object.assign([], this.addressOptions);
this.area = null;
setTimeout(() => {
this.ruleForm.area = [this.ruleForm.provinceId, this.ruleForm.cityId];
console.log(1);
console.log(this.addressOptions);
console.log(this.area);
this.ruleForm.area = [
this.ruleForm.provinceId,
this.ruleForm.cityId,
];
// console.log(1);
// console.log(this.addressOptions);
// console.log(this.area);
this.$forceUpdate();
}, 50);
}


+ 2
- 2
vue.config.js Wyświetl plik

@@ -4,8 +4,8 @@
*/
// const url = 'http://pigx-gateway'
// const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.160:9999' //长龙
const url = 'http://192.168.31.133:9999' //嘉豪
const url = 'http://192.168.31.168:9999' //长龙
// const url = 'http://192.168.31.133:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑

const CompressionWebpackPlugin = require('compression-webpack-plugin')


Ładowanie…
Anuluj
Zapisz