@@ -1,5 +1,15 @@ | |||||
import request from '@/router/axios' | import request from '@/router/axios' | ||||
// 字典表接口 | |||||
export function userDict(query) { | |||||
return request({ | |||||
url: '/admin/user/dict', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
export function fetchList(query) { | export function fetchList(query) { | ||||
return request({ | return request({ | ||||
url: '/admin/user/page', | url: '/admin/user/page', | ||||
@@ -77,7 +87,7 @@ export function getUserMsg(query) { | |||||
// 组织用户禁用先用 | // 组织用户禁用先用 | ||||
export function updateLockFlag(obj) { | export function updateLockFlag(obj) { | ||||
return request({ | return request({ | ||||
url: '/autoSR/cushouseuserrelationmid/updateLockFlag', | |||||
url: '/admin/user/updateLockFlag', | |||||
method: 'post', | method: 'post', | ||||
data: obj | data: obj | ||||
}) | }) | ||||
@@ -506,13 +516,13 @@ export function equipmentManagement(query) { | |||||
}) | }) | ||||
} | } | ||||
export function findByUserName(query) { | |||||
export function findByUserName(data) { | |||||
return request({ | return request({ | ||||
url: 'admin/user/findByUserName', | url: 'admin/user/findByUserName', | ||||
method:'post', | 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 | 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 | |||||
}) | |||||
} |
@@ -274,7 +274,7 @@ export default { | |||||
findByUserName() { | findByUserName() { | ||||
this.$api.api | this.$api.api | ||||
.findByUserName({ | .findByUserName({ | ||||
managerPhone: this.info.username, | |||||
username: this.info.username, | |||||
}) | }) | ||||
.then((res) => { | .then((res) => { | ||||
// console.log(res); | // console.log(res); | ||||
@@ -156,7 +156,7 @@ export default { | |||||
findByUserName() { | findByUserName() { | ||||
this.$api.api | this.$api.api | ||||
.findByUserName({ | .findByUserName({ | ||||
managerPhone: this.info.username, | |||||
username: this.info.username, | |||||
}) | }) | ||||
.then((res) => { | .then((res) => { | ||||
// console.log(res); | // console.log(res); | ||||
@@ -113,7 +113,7 @@ export default { | |||||
}); | }); | ||||
}, | }, | ||||
verifySuccess(params) { | verifySuccess(params) { | ||||
let that=this | |||||
let that = this; | |||||
this.loginForm.code = params.captchaVerification; | this.loginForm.code = params.captchaVerification; | ||||
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => { | this.$store.dispatch("LoginByUsername", this.loginForm).then(() => { | ||||
// this.$router.push({ path: this.tagWel.value }); | // this.$router.push({ path: this.tagWel.value }); | ||||
@@ -121,25 +121,30 @@ export default { | |||||
// console.log(res) | // console.log(res) | ||||
// 循环数组,给定各种标志 | // 循环数组,给定各种标志 | ||||
if (res.data.length == 0) { | 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" }); | that.$router.push({ path: "/check" }); | ||||
} | } | ||||
}); | }); | ||||
@@ -127,11 +127,12 @@ | |||||
<div v-if="scope.row.residueTime ==0">过期</div> | <div v-if="scope.row.residueTime ==0">过期</div> | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column label="操作" align="center"> | |||||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||||
<template slot-scope="scope"> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -200,7 +201,7 @@ | |||||
<el-form-item label="详细地址:" prop="address"> | <el-form-item label="详细地址:" prop="address"> | ||||
<el-input v-model="addagentobj.address"></el-input> | <el-input v-model="addagentobj.address"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="运营人员:" prop="operationalPeople"> | |||||
<!-- <el-form-item label="运营人员:" prop="operationalPeople"> | |||||
<el-select v-model="addagentobj.operationalPeople" placeholder="请选择"> | <el-select v-model="addagentobj.operationalPeople" placeholder="请选择"> | ||||
<el-option | <el-option | ||||
v-for="item in optionsoperationalPeople" | v-for="item in optionsoperationalPeople" | ||||
@@ -211,7 +212,7 @@ | |||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | |||||
</el-form-item> --> | |||||
<el-form-item label="管理员账号:" prop="managerPhone"> | <el-form-item label="管理员账号:" prop="managerPhone"> | ||||
<el-input v-model="addagentobj.managerPhone"></el-input> | <el-input v-model="addagentobj.managerPhone"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -273,7 +274,7 @@ | |||||
<el-form-item label="详细地址:" prop="address"> | <el-form-item label="详细地址:" prop="address"> | ||||
<el-input v-model="editoragentobj.address"></el-input> | <el-input v-model="editoragentobj.address"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="运营人员:" prop="operationalPeople"> | |||||
<!-- <el-form-item label="运营人员:" prop="operationalPeople"> | |||||
<el-select v-model="editoragentobj.operationalPeople" placeholder="请选择"> | <el-select v-model="editoragentobj.operationalPeople" placeholder="请选择"> | ||||
<el-option | <el-option | ||||
v-for="item in optionsoperationalPeople" | v-for="item in optionsoperationalPeople" | ||||
@@ -283,7 +284,7 @@ | |||||
> | > | ||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | |||||
</el-form-item> --> | |||||
</el-form> | </el-form> | ||||
<div slot="footer" class="dialog-footer"> | <div slot="footer" class="dialog-footer"> | ||||
<el-button @click="dialogVisible2 = false">取 消</el-button> | <el-button @click="dialogVisible2 = false">取 消</el-button> | ||||
@@ -308,6 +309,25 @@ | |||||
</div> | </div> | ||||
</el-dialog> | </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> | </div> | ||||
</template> | </template> | ||||
@@ -328,6 +348,7 @@ export default { | |||||
dialogVisible:false, | dialogVisible:false, | ||||
dialogVisible2:false, | dialogVisible2:false, | ||||
dialogVisible3:false, | dialogVisible3:false, | ||||
operaVisible:false, | |||||
timelist:'', | timelist:'', | ||||
tableData: [], | tableData: [], | ||||
currentPage4:1, | currentPage4:1, | ||||
@@ -347,7 +368,7 @@ export default { | |||||
provinceId:'',// 省id | provinceId:'',// 省id | ||||
cityId:'',// 市id | cityId:'',// 市id | ||||
address:'',// 详细地址 | address:'',// 详细地址 | ||||
operationalPeople:'',// 运营人员id | |||||
// operationalPeople:'',// 运营人员id | |||||
managerPhone:'',// 管理员账号 | managerPhone:'',// 管理员账号 | ||||
managerPassword:'',// 管理员账号密码 | managerPassword:'',// 管理员账号密码 | ||||
linkmanPhone:'',// 联系人手机号 | linkmanPhone:'',// 联系人手机号 | ||||
@@ -362,7 +383,7 @@ export default { | |||||
provinceId:'',// 省id | provinceId:'',// 省id | ||||
cityId:'',// 市id | cityId:'',// 市id | ||||
address:'',// 详细地址 | address:'',// 详细地址 | ||||
operationalPeople:'',// 运营人员id | |||||
// operationalPeople:'',// 运营人员id | |||||
linkmanPhone:'',// 联系人手机号 | linkmanPhone:'',// 联系人手机号 | ||||
rulestimelist:[] | rulestimelist:[] | ||||
}, | }, | ||||
@@ -385,9 +406,9 @@ export default { | |||||
address: [ | address: [ | ||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | { required: true, message: '请输入详细地址', trigger: 'blur' }, | ||||
], | ], | ||||
operationalPeople: [ | |||||
{ required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
], | |||||
// operationalPeople: [ | |||||
// { required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
// ], | |||||
managerPhone: [ | managerPhone: [ | ||||
{ required: true, message: '请输入管理员账号', trigger: 'blur' }, | { required: true, message: '请输入管理员账号', trigger: 'blur' }, | ||||
], | ], | ||||
@@ -418,14 +439,22 @@ export default { | |||||
address: [ | address: [ | ||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | { required: true, message: '请输入详细地址', trigger: 'blur' }, | ||||
], | ], | ||||
operationalPeople: [ | |||||
{ required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
], | |||||
// operationalPeople: [ | |||||
// { required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
// ], | |||||
linkmanPhone: [ | linkmanPhone: [ | ||||
{ required: true, message: '请输入联系人手机号', trigger: 'blur' }, | { required: true, message: '请输入联系人手机号', trigger: 'blur' }, | ||||
{ min: 11, max: 11, message: '请输入手机号', trigger: 'blur' } | { min: 11, max: 11, message: '请输入手机号', trigger: 'blur' } | ||||
], | ], | ||||
}, | }, | ||||
operaForm:{ | |||||
operationalPeople:'' | |||||
}, | |||||
operaRules:{ | |||||
operationalPeople: [ | |||||
{ required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
], | |||||
}, | |||||
optionsparentId:[],//省份列表 | optionsparentId:[],//省份列表 | ||||
optionscityId:[],//市列表 | optionscityId:[],//市列表 | ||||
optionsoperationalPeople:[],//运营人员列表 | optionsoperationalPeople:[],//运营人员列表 | ||||
@@ -449,6 +478,51 @@ export default { | |||||
this.getAgentList() | this.getAgentList() | ||||
}, | }, | ||||
methods: { | 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(){ | confirmtime3(){ | ||||
this.editoragentobj.contractStartDate=this.editoragentobj.rulestimelist[0]; | this.editoragentobj.contractStartDate=this.editoragentobj.rulestimelist[0]; | ||||
this.editoragentobj.contractEndDate=this.editoragentobj.rulestimelist[1]; | this.editoragentobj.contractEndDate=this.editoragentobj.rulestimelist[1]; | ||||
@@ -465,7 +539,7 @@ export default { | |||||
this.editoragentobj. provinceId=row.provinceId;// 省id | this.editoragentobj. provinceId=row.provinceId;// 省id | ||||
this.editoragentobj.cityId=row.cityId;// 市id | this.editoragentobj.cityId=row.cityId;// 市id | ||||
this.editoragentobj.address=row.address;// 详细地址 | this.editoragentobj.address=row.address;// 详细地址 | ||||
this.editoragentobj. operationalPeople=row.operationalPeople;// 运营人员id | |||||
// this.editoragentobj. operationalPeople=row.operationalPeople;// 运营人员id | |||||
this.editoragentobj.linkmanPhone=row.linkmanPhone;// 联系人手机号 | this.editoragentobj.linkmanPhone=row.linkmanPhone;// 联系人手机号 | ||||
this.editoragentobj.rulestimelist=[row.contractStartDate,row.contractEndDate]; | this.editoragentobj.rulestimelist=[row.contractStartDate,row.contractEndDate]; | ||||
this.editoragentobj.id=row.id; | this.editoragentobj.id=row.id; | ||||
@@ -89,11 +89,12 @@ | |||||
align="center" | align="center" | ||||
> | > | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column label="操作" align="center"> | |||||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||||
<template slot-scope="scope"> | <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> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -114,7 +115,8 @@ | |||||
<el-dialog title="新增公司" :visible.sync="dialogVisible" > | <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 :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-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-option v-for="item in optionsagentId" :key="item.value" :label="item.agentName" :value="item.id" ></el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -147,7 +149,7 @@ | |||||
<el-form-item label="详细地址:" prop="address"> | <el-form-item label="详细地址:" prop="address"> | ||||
<el-input v-model="addagentobj.address"></el-input> | <el-input v-model="addagentobj.address"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="运营人员:" prop="operationStaff"> | |||||
<!-- <el-form-item label="运营人员:" prop="operationStaff"> | |||||
<el-select v-model="addagentobj.operationStaff" placeholder="请选择"> | <el-select v-model="addagentobj.operationStaff" placeholder="请选择"> | ||||
<el-option | <el-option | ||||
v-for="item in optionsoperationStaff" | v-for="item in optionsoperationStaff" | ||||
@@ -158,7 +160,7 @@ | |||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | |||||
</el-form-item> --> | |||||
<el-form-item label="管理员账号:" prop="managerPhone"> | <el-form-item label="管理员账号:" prop="managerPhone"> | ||||
<el-input v-model="addagentobj.managerPhone"></el-input> | <el-input v-model="addagentobj.managerPhone"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -176,7 +178,8 @@ | |||||
<el-dialog title="编辑" :visible.sync="dialogVisible2" > | <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 :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-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-option v-for="item in optionsagentId" :key="item.value" :label="item.agentName" :value="item.id" ></el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -208,7 +211,7 @@ | |||||
<el-form-item label="详细地址:" prop="address"> | <el-form-item label="详细地址:" prop="address"> | ||||
<el-input v-model="editoragentobj.address"></el-input> | <el-input v-model="editoragentobj.address"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="运营人员:" prop="operationStaff"> | |||||
<!-- <el-form-item label="运营人员:" prop="operationStaff"> | |||||
<el-select v-model="editoragentobj.operationStaff" placeholder="请选择"> | <el-select v-model="editoragentobj.operationStaff" placeholder="请选择"> | ||||
<el-option | <el-option | ||||
v-for="item in optionsoperationStaff" | v-for="item in optionsoperationStaff" | ||||
@@ -218,7 +221,7 @@ | |||||
> | > | ||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | |||||
</el-form-item> --> | |||||
</el-form> | </el-form> | ||||
<div slot="footer" class="dialog-footer"> | <div slot="footer" class="dialog-footer"> | ||||
<el-button @click="dialogVisible2 = false">取 消</el-button> | <el-button @click="dialogVisible2 = false">取 消</el-button> | ||||
@@ -242,6 +245,25 @@ | |||||
</div> | </div> | ||||
</el-dialog> | </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> | </div> | ||||
</template> | </template> | ||||
@@ -262,9 +284,9 @@ export default { | |||||
managerPassword:'',// 管理员账号密码 | managerPassword:'',// 管理员账号密码 | ||||
}, | }, | ||||
rules:{ | rules:{ | ||||
agentId: [ | |||||
{ required: true, message: '请选择代理商', trigger: 'blur' }, | |||||
], | |||||
// agentId: [ | |||||
// { required: true, message: '请选择代理商', trigger: 'blur' }, | |||||
// ], | |||||
name: [ | name: [ | ||||
{ required: true, message: '请输入公司名称', trigger: 'blur' }, | { required: true, message: '请输入公司名称', trigger: 'blur' }, | ||||
], | ], | ||||
@@ -284,9 +306,9 @@ export default { | |||||
address: [ | address: [ | ||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | { required: true, message: '请输入详细地址', trigger: 'blur' }, | ||||
], | ], | ||||
operationStaff: [ | |||||
{ required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
], | |||||
// operationStaff: [ | |||||
// { required: true, message: '请选择运营人员', trigger: 'blur' }, | |||||
// ], | |||||
managerPhone: [ | managerPhone: [ | ||||
{ required: true, message: '请输入管理员账号', trigger: 'blur' }, | { required: true, message: '请输入管理员账号', trigger: 'blur' }, | ||||
], | ], | ||||
@@ -303,6 +325,7 @@ export default { | |||||
dialogVisible:false, | dialogVisible:false, | ||||
dialogVisible2:false, | dialogVisible2:false, | ||||
dialogVisible3:false, | dialogVisible3:false, | ||||
operaVisible:false, | |||||
currentPage4:1, | currentPage4:1, | ||||
operatorName:'',//代理商名称 | operatorName:'',//代理商名称 | ||||
operationStaffName:'',//运营人员名称 | operationStaffName:'',//运营人员名称 | ||||
@@ -333,12 +356,20 @@ export default { | |||||
provinceId:'',// 省id | provinceId:'',// 省id | ||||
cityId:'',// 市id | cityId:'',// 市id | ||||
address:'',// 详细地址 | 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: [ | name: [ | ||||
{ required: true, message: '请输入公司名称', trigger: 'blur' }, | { required: true, message: '请输入公司名称', trigger: 'blur' }, | ||||
], | ], | ||||
@@ -358,9 +389,9 @@ export default { | |||||
address: [ | address: [ | ||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | { 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() | this.getcompanyList() | ||||
}, | }, | ||||
methods: { | 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){ | infoeditor(row){ | ||||
this.editoragentobj.id=row.id; | this.editoragentobj.id=row.id; | ||||
@@ -380,7 +456,7 @@ export default { | |||||
this.editoragentobj.provinceId=res.data.provinceId; | this.editoragentobj.provinceId=res.data.provinceId; | ||||
this.editoragentobj.cityId=res.data.cityId; | this.editoragentobj.cityId=res.data.cityId; | ||||
this.editoragentobj.address=res.data.address; | this.editoragentobj.address=res.data.address; | ||||
this.editoragentobj.operationStaff=res.data.operationStaff; | |||||
// this.editoragentobj.operationStaff=res.data.operationStaff; | |||||
}); | }); | ||||
this.findMyAgent() | this.findMyAgent() | ||||
this.getparentIdList() | this.getparentIdList() | ||||
@@ -496,6 +572,13 @@ export default { | |||||
this.getparentIdList() | this.getparentIdList() | ||||
this.dialogVisible=true; | this.dialogVisible=true; | ||||
}, | }, | ||||
//获取运营人员 | |||||
getAllOperationsStaff(){ | |||||
this.optionsoperationStaff=[]; | |||||
this.$api.http.getAllOperationsStaffByAgent().then((res) => { | |||||
this.optionsoperationStaff= res.data | |||||
}); | |||||
}, | |||||
//选择代理商获取运营人员列表并清空运营人员选择 | //选择代理商获取运营人员列表并清空运营人员选择 | ||||
clickagentId(){ | clickagentId(){ | ||||
this.optionsoperationStaff=[]; | this.optionsoperationStaff=[]; | ||||
@@ -296,7 +296,7 @@ | |||||
<el-table-column prop="address" label="操作" fixed="right" width="150"> | <el-table-column prop="address" label="操作" fixed="right" width="150"> | ||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<el-button | <el-button | ||||
v-if="scope.row.orgType == 3" | |||||
v-if="scope.row.orgType == 3||scope.row.userRoleType==8" | |||||
@click="gochosehouse(scope.row)" | @click="gochosehouse(scope.row)" | ||||
type="text" | type="text" | ||||
size="small" | size="small" | ||||
@@ -380,6 +380,31 @@ | |||||
<el-option label="楼盘" :value="3"></el-option> | <el-option label="楼盘" :value="3"></el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | </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 | <el-form-item | ||||
label="选择公司:" | label="选择公司:" | ||||
v-if="orgFlag && addFlag" | v-if="orgFlag && addFlag" | ||||
@@ -439,24 +464,6 @@ | |||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | </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> | </el-form> | ||||
<div slot="footer" class="dialog-footer"> | <div slot="footer" class="dialog-footer"> | ||||
<el-button @click="dialogFormVisible = false">取 消</el-button> | <el-button @click="dialogFormVisible = false">取 消</el-button> | ||||
@@ -840,6 +847,7 @@ export default { | |||||
}, | }, | ||||
}, | }, | ||||
managerStr: [], | managerStr: [], | ||||
identityList: [], | |||||
choseFlag: true, | choseFlag: true, | ||||
// 获取的区域列表 | // 获取的区域列表 | ||||
arealist: [], | arealist: [], | ||||
@@ -1417,14 +1425,13 @@ export default { | |||||
// console.log(this.searchMsg1); | // console.log(this.searchMsg1); | ||||
// return | // return | ||||
if (this.choseFlag) { | 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 | this.$api.api | ||||
@@ -1766,7 +1773,8 @@ export default { | |||||
} | } | ||||
).then(() => { | ).then(() => { | ||||
let obj = {}; | let obj = {}; | ||||
obj.id = row.id; | |||||
obj.accountId = row.accountId; | |||||
obj.orgType = row.orgType; | |||||
obj.lockFlag = row.lockFlag == 0 ? 1 : 0; | obj.lockFlag = row.lockFlag == 0 ? 1 : 0; | ||||
this.$api.api.updateLockFlag(obj).then((res) => { | this.$api.api.updateLockFlag(obj).then((res) => { | ||||
console.log(res); | console.log(res); | ||||
@@ -1944,11 +1952,14 @@ export default { | |||||
}, | }, | ||||
typeChange(e) { | typeChange(e) { | ||||
console.log(e); | console.log(e); | ||||
this.userList = []; | |||||
this.form.userRoleType='' | |||||
this.identityList = []; | |||||
if (e == 0) { | if (e == 0) { | ||||
// 平台 只显示角色 | // 平台 只显示角色 | ||||
this.orgFlag = false; | this.orgFlag = false; | ||||
this.roleFlag = true; | this.roleFlag = true; | ||||
this.identityFlag = false; | |||||
this.identityFlag = true; | |||||
this.agentFlag = false; | this.agentFlag = false; | ||||
this.$api.api | this.$api.api | ||||
.findRoleByOrgCode({ | .findRoleByOrgCode({ | ||||
@@ -1962,13 +1973,13 @@ export default { | |||||
// 代理商 选择代理商和角色 | // 代理商 选择代理商和角色 | ||||
this.orgFlag = false; | this.orgFlag = false; | ||||
this.roleFlag = true; | this.roleFlag = true; | ||||
this.identityFlag = false; | |||||
this.identityFlag = true; | |||||
this.agentFlag = true; | this.agentFlag = true; | ||||
} else if (e == 2) { | } else if (e == 2) { | ||||
// 公司 选择公司和角色 | // 公司 选择公司和角色 | ||||
this.orgFlag = true; | this.orgFlag = true; | ||||
this.roleFlag = true; | this.roleFlag = true; | ||||
this.identityFlag = false; | |||||
this.identityFlag = true; | |||||
this.agentFlag = false; | this.agentFlag = false; | ||||
} else { | } else { | ||||
// 楼盘 选择公司 角色 角色身份 | // 楼盘 选择公司 角色 角色身份 | ||||
@@ -1977,6 +1988,20 @@ export default { | |||||
this.identityFlag = true; | this.identityFlag = true; | ||||
this.agentFlag = false; | 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) { | getList(page, params) { | ||||
this.listLoading = true; | this.listLoading = true; | ||||
@@ -2077,6 +2102,8 @@ export default { | |||||
type: "warning", | type: "warning", | ||||
} | } | ||||
).then(() => { | ).then(() => { | ||||
console.log(row); | |||||
console.log(row.userId,'123'); | |||||
if (this.choseFlag) { | if (this.choseFlag) { | ||||
delObj(row.userId).then(() => { | delObj(row.userId).then(() => { | ||||
this.roleList(); | this.roleList(); | ||||
@@ -42,7 +42,7 @@ | |||||
</el-date-picker> | </el-date-picker> | ||||
</div> --> | </div> --> | ||||
<div class="div-lab"> | |||||
<div class="div-lab"> | |||||
<div class="label">合同结束日期:</div> | <div class="label">合同结束日期:</div> | ||||
<el-date-picker | <el-date-picker | ||||
v-model="starTime" | v-model="starTime" | ||||
@@ -56,7 +56,8 @@ | |||||
end-placeholder="结束日期" | end-placeholder="结束日期" | ||||
> | > | ||||
</el-date-picker> | </el-date-picker> | ||||
</div> --> | |||||
</div> | |||||
<div v-if="orgType == 0" class="div-lab"> | <div v-if="orgType == 0" class="div-lab"> | ||||
<div class="label">楼盘类型:</div> | <div class="label">楼盘类型:</div> | ||||
<el-select | <el-select | ||||
@@ -225,6 +226,9 @@ | |||||
>更换账号</el-button | >更换账号</el-button | ||||
> | > | ||||
<el-button type="text" v-if="orgType == 2">添加员工</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">添加员工</el-button> --> | ||||
<el-button type="text" @click="del(row)">删除</el-button> | <el-button type="text" @click="del(row)">删除</el-button> | ||||
</template> | </template> | ||||
@@ -321,7 +325,7 @@ | |||||
<el-form-item label="详细地址" prop="address"> | <el-form-item label="详细地址" prop="address"> | ||||
<el-input v-model="ruleForm.address"></el-input> | <el-input v-model="ruleForm.address"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item | |||||
<!-- <el-form-item | |||||
label="运营人员" | label="运营人员" | ||||
prop="operationalPeople" | prop="operationalPeople" | ||||
v-if="orgType == 0" | v-if="orgType == 0" | ||||
@@ -338,7 +342,7 @@ | |||||
> | > | ||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</el-form-item> | |||||
</el-form-item> --> | |||||
<el-form-item label="管理员账号" prop="managerPhone" v-if="!editFlag"> | <el-form-item label="管理员账号" prop="managerPhone" v-if="!editFlag"> | ||||
<el-input v-model="ruleForm.managerPhone"></el-input> | <el-input v-model="ruleForm.managerPhone"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -355,7 +359,7 @@ | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
<div slot="footer" class="dialog-footer"> | <div slot="footer" class="dialog-footer"> | ||||
<el-button @click="addSurequxiao()">取 消</el-button> | |||||
<el-button @click="addSurequxiao()">取 消</el-button> | |||||
<el-button type="primary" @click="addSure">{{ | <el-button type="primary" @click="addSure">{{ | ||||
editFlag ? "编辑" : "保存" | editFlag ? "编辑" : "保存" | ||||
}}</el-button> | }}</el-button> | ||||
@@ -436,6 +440,37 @@ | |||||
<el-button type="primary">保存</el-button> | <el-button type="primary">保存</el-button> | ||||
</div> | </div> | ||||
</el-dialog> --> | </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> | </div> | ||||
</template> | </template> | ||||
@@ -460,7 +495,7 @@ export default { | |||||
props: { | props: { | ||||
lazy: true, | lazy: true, | ||||
async lazyLoad(node, resolve) { | async lazyLoad(node, resolve) { | ||||
console.log(node,123); | |||||
console.log(node, 123); | |||||
const { level } = node; | const { level } = node; | ||||
if (level == 0) { | if (level == 0) { | ||||
console.log(23); | console.log(23); | ||||
@@ -488,6 +523,7 @@ export default { | |||||
}, | }, | ||||
editFlag: false, | editFlag: false, | ||||
changeFlag: false, | changeFlag: false, | ||||
operaVisible: false, | |||||
starTime: [], | starTime: [], | ||||
searchForm: { | searchForm: { | ||||
corporateName: "", | corporateName: "", | ||||
@@ -530,6 +566,7 @@ export default { | |||||
value: "", | value: "", | ||||
input: "", | input: "", | ||||
tableData: [], | tableData: [], | ||||
optionsoperationalPeople: [], | |||||
orgType: "", | orgType: "", | ||||
orgList: [], | orgList: [], | ||||
operationList: [], | operationList: [], | ||||
@@ -572,6 +609,14 @@ export default { | |||||
managerPhone: [{ validator: validatePass, trigger: "blur" }], | managerPhone: [{ validator: validatePass, trigger: "blur" }], | ||||
linkmanPhone: [{ validator: validatePass, trigger: "blur" }], | linkmanPhone: [{ validator: validatePass, trigger: "blur" }], | ||||
}, | }, | ||||
operaForm: { | |||||
operationalPeople: "", | |||||
}, | |||||
operaRules: { | |||||
operationalPeople: [ | |||||
{ required: true, message: "请选择运营人员", trigger: "blur" }, | |||||
], | |||||
}, | |||||
}; | }; | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
@@ -579,13 +624,69 @@ export default { | |||||
// 获取公司列表数据 | // 获取公司列表数据 | ||||
this.getOrgList(); | this.getOrgList(); | ||||
// 获取运营人员 | // 获取运营人员 | ||||
this.getAllOperationsStaff(); | |||||
// this.getAllOperationsStaff(); | |||||
// 获取列表数据 | // 获取列表数据 | ||||
this.zkhousePage(); | this.zkhousePage(); | ||||
}, | }, | ||||
methods: { | 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() { | addSure() { | ||||
@@ -655,8 +756,10 @@ export default { | |||||
]; | ]; | ||||
// console.log(this.time) | // console.log(this.time) | ||||
this.ruleForm = Object.assign({}, row); | this.ruleForm = Object.assign({}, row); | ||||
this.ruleForm.area = [this.ruleForm.provinceId, this.ruleForm.cityId]; | |||||
this.dialogVisible = true; | |||||
// 获取地区选择数据,在这里对回显的时候进行操作,首先先获取一级省的数据 | // 获取地区选择数据,在这里对回显的时候进行操作,首先先获取一级省的数据 | ||||
this.getProvinceList(); | |||||
// this.getProvinceList(); | |||||
// 级联选择器回显问题 | // 级联选择器回显问题 | ||||
this.editFlag = true; | this.editFlag = true; | ||||
@@ -784,15 +887,17 @@ export default { | |||||
arr.push(obj); | arr.push(obj); | ||||
}); | }); | ||||
this.$set(this.addressOptions[idx], "children", arr); | 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.addressOptions = Object.assign([], this.addressOptions); | ||||
this.area = null; | this.area = null; | ||||
setTimeout(() => { | 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(); | this.$forceUpdate(); | ||||
}, 50); | }, 50); | ||||
} | } | ||||