@@ -259,6 +259,13 @@ export function houseListWhenAddUser(query) { | |||
params:query | |||
}) | |||
} | |||
export function findHouseByUser(query) { | |||
return request({ | |||
url: '/autoSR/zkhouse/findHouseByUser', | |||
method:'get', | |||
params:query | |||
}) | |||
} | |||
// 楼盘绑定 | |||
export function saveHouse(data) { | |||
return request({ | |||
@@ -395,6 +402,14 @@ export function findbypage(query) { | |||
params:query | |||
}) | |||
} | |||
// 接待记录客户意向 | |||
export function findKeywords(query) { | |||
return request({ | |||
url: 'autoSR/matchKeywords/findKeywords', | |||
method:'get', | |||
params:query | |||
}) | |||
} | |||
// 常错词列表 | |||
export function correctFindbypage(query) { | |||
@@ -404,3 +419,19 @@ export function correctFindbypage(query) { | |||
params:query | |||
}) | |||
} | |||
// 新增常错词 | |||
export function correctAdd(query) { | |||
return request({ | |||
url: '/autoSR/zk/correct/add', | |||
method:'post', | |||
params:query | |||
}) | |||
} | |||
// 新增常错词 | |||
export function correctUpdate(query) { | |||
return request({ | |||
url: '/autoSR/zk/correct/update', | |||
method:'post', | |||
params:query | |||
}) | |||
} |
@@ -10,7 +10,11 @@ | |||
楼盘选择: | |||
</div> | |||
<div> | |||
<el-select v-model="searchForm.houseId" placeholder="请选择"> | |||
<el-select | |||
v-model="searchForm.houseId" | |||
@change="houseChange" | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in houseList" | |||
:key="item.id" | |||
@@ -25,22 +29,22 @@ | |||
<div class="label">时间:</div> | |||
<div class="toptimeqhuan"> | |||
<div | |||
:class="{ tophove: searchForm.residueTime == 7 }" | |||
@click="tabtimetap(7)" | |||
:class="{ tophove: searchForm.dateType == 0 }" | |||
@click="tabtimetap(0)" | |||
> | |||
7天内 | |||
今日 | |||
</div> | |||
<div | |||
:class="{ tophove: searchForm.residueTime == 15 }" | |||
@click="tabtimetap(15)" | |||
:class="{ tophove: searchForm.dateType == 1 }" | |||
@click="tabtimetap(1)" | |||
> | |||
15天内 | |||
昨日 | |||
</div> | |||
<div | |||
:class="{ tophove: searchForm.residueTime == 30 }" | |||
@click="tabtimetap(30)" | |||
:class="{ tophove: searchForm.dateType == 2 }" | |||
@click="tabtimetap(2)" | |||
> | |||
30天内 | |||
近七天 | |||
</div> | |||
</div> | |||
<div> | |||
@@ -50,7 +54,10 @@ | |||
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> | |||
@@ -59,17 +66,23 @@ | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="div-lab"> | |||
<div class="label">客户名称:</div> | |||
<el-input class="div-inp" v-model="value"></el-input> | |||
<el-input class="div-inp" v-model="searchForm.name"></el-input> | |||
</div> | |||
<div class="div-lab"> | |||
<div class="label">客户意向:</div> | |||
<el-select class="div-inp" v-model="value" placeholder="请选择"> | |||
<el-select | |||
class="div-inp" | |||
multiple | |||
collapse-tags | |||
v-model="searchForm.keywordsId" | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in houseList" | |||
:key="item.id" | |||
:label="item.propertyName" | |||
:value="item.id" | |||
v-for="item in keywordsList" | |||
:key="item.keywordsId" | |||
:label="item.name" | |||
:value="item.keywordsId" | |||
> | |||
</el-option> | |||
</el-select> | |||
@@ -77,9 +90,13 @@ | |||
<div class="div-lab"> | |||
<div class="label">录音类型:</div> | |||
<el-select v-model="value" placeholder="请选择" class="div-inp"> | |||
<el-select | |||
v-model="searchForm.recording" | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options2" | |||
v-for="item in recordingList" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
@@ -147,6 +164,7 @@ | |||
<div class="label" style="color: #ffffff">筛选相关:</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
@click="screen" | |||
>筛选</el-button | |||
> | |||
</div> | |||
@@ -158,8 +176,8 @@ | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table :data="tableData" stripe height="400" style="width: 100%"> | |||
<el-table-column prop="staTime" label="接待开始时间" align="center"> | |||
<el-table :data="tableData" stripe style="width: 100%"> | |||
<el-table-column prop="staTime" label="接待开始时间" align="center" width="200"> | |||
</el-table-column> | |||
<el-table-column prop="agentName" label="顾问" align="center"> | |||
</el-table-column> | |||
@@ -170,18 +188,21 @@ | |||
</el-table-column> | |||
<el-table-column prop="name" label="录音类型" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="address" label="标注顾问" align="center"> | |||
<el-table-column prop="ownerName" label="标注顾问" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="date" label="客户意向" align="center"> | |||
<el-table-column prop="keywords" label="客户意向" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="name" label="执行率" align="center"> | |||
<el-table-column prop="fraction" label="执行率" align="center"> | |||
<template slot-scope="{row}"> | |||
{{row.fraction||'0'}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="address" label="禁忌执行率" align="center"> | |||
</el-table-column> | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="{row}"> | |||
<el-table-column label="操作" align="center" width="200" fixed="right"> | |||
<template slot-scope="{ row }"> | |||
<el-button type="text">查看</el-button> | |||
<el-button type="text">下载文本</el-button> | |||
<el-button type="text">下载录音</el-button> | |||
@@ -212,14 +233,19 @@ export default { | |||
time: [], | |||
houseList: [], | |||
options: [], | |||
options2: [ | |||
keywordsList: [], | |||
recordingList: [ | |||
{ | |||
value: "0", | |||
label: "没有录音", | |||
}, | |||
{ | |||
value: "1", | |||
label: "有效录音", | |||
label: "部分录音", | |||
}, | |||
{ | |||
value: "2", | |||
label: "无效录音", | |||
label: "完整录音", | |||
}, | |||
], | |||
options3: [ | |||
@@ -283,14 +309,16 @@ export default { | |||
input: "", | |||
tableData: [], | |||
tophove: "", | |||
type: "0", | |||
searchForm: { | |||
corporateName: "", | |||
propertyName: "", | |||
serviceStatus: "", | |||
houseType: "", | |||
residueTime: 7, | |||
name: "", | |||
keywordsId: "", | |||
recording:'', | |||
startWorking: "", | |||
endWorking: "", | |||
houseType: "", | |||
dateType: 0, | |||
houseId: "", | |||
agentName: "", | |||
operationalPeople: "", | |||
}, | |||
@@ -299,8 +327,6 @@ export default { | |||
mounted() { | |||
// 获取楼盘列表 | |||
this.zkhousePage(); | |||
// 获取接待记录列表 | |||
this.findbypage(); | |||
}, | |||
methods: { | |||
// 接待记录列表 | |||
@@ -310,23 +336,54 @@ export default { | |||
size: this.size, | |||
...this.searchForm, | |||
}; | |||
this.$api.api.findbypage(obj).then((res) => { | |||
// console.log(res) | |||
this.tableData = res.data.records; | |||
this.total = res.data.total; | |||
}); | |||
}, | |||
houseChange() { | |||
this.findbypage(); | |||
this.findKeywords(); | |||
}, | |||
timeChange(e) { | |||
this.searchForm.startWorking = e[0]; | |||
this.searchForm.endWorking = e[1]; | |||
}, | |||
screen(){ | |||
this.size=1 | |||
this.findbypage(); | |||
}, | |||
findKeywords() { | |||
this.$api.api | |||
.findKeywords({ | |||
dateType: this.searchForm.startWorking | |||
? null | |||
: this.searchForm.dateType, | |||
statDateStart: this.searchForm.startWorking, | |||
statDateEnd: this.searchForm.endWorking, | |||
houseId: this.searchForm.houseId, | |||
type: this.type, | |||
}) | |||
.then((res) => { | |||
console.log(res); | |||
this.keywordsList = res.data; | |||
}); | |||
}, | |||
zkhousePage() { | |||
let obj = { | |||
current: 1, | |||
size: 999, | |||
}; | |||
this.$api.api.zkhousePage(obj).then((res) => { | |||
// console.log(res) | |||
this.houseList = res.data.records; | |||
this.searchForm.houseId = res.data.records[0].id; | |||
}); | |||
this.$api.api | |||
.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}) | |||
.then((res) => { | |||
// console.log(res) | |||
this.houseList = res.data; | |||
this.searchForm.houseId = res.data[0].id; | |||
// 获取接待记录列表 | |||
this.findbypage(); | |||
// 获取客户意向 | |||
this.findKeywords(); | |||
}); | |||
}, | |||
handleSizeChange(val) { | |||
console.log(`每页 ${val} 条`); | |||
@@ -339,7 +396,7 @@ export default { | |||
this.findbypage(); | |||
}, | |||
tabtimetap(idx) { | |||
this.searchForm.residueTime = idx; | |||
this.searchForm.dateType = idx; | |||
}, | |||
}, | |||
}; | |||
@@ -2,22 +2,42 @@ | |||
<div class="box-center"> | |||
<!-- 头 --> | |||
<div class="app-top"> | |||
<div class="app-titel"> | |||
<div | |||
class="label" | |||
style="color: #32363d; font-weight: 400; font-size: 16px" | |||
> | |||
楼盘选择: | |||
</div> | |||
<div> | |||
<el-select v-model="searchForm.houseId" @change="houseChange" placeholder="请选择"> | |||
<el-option | |||
v-for="item in houseList" | |||
:key="item.id" | |||
:label="item.propertyName" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 5px"> | |||
<div class="label">正确词:</div> | |||
<div> | |||
<el-input v-model="value"></el-input> | |||
<el-input v-model="searchForm.correctWord"></el-input> | |||
</div> | |||
<div class="label">错误词:</div> | |||
<div> | |||
<el-input v-model="value"></el-input> | |||
<el-input v-model="searchForm.wrongWord"></el-input> | |||
</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>清空筛选条件</el-button> | |||
<el-button @click="clascreen">清空筛选条件</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button | |||
@@ -31,8 +51,8 @@ | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table :data="tableData" stripe height="400" style="width: 100%"> | |||
<el-table-column prop="date" label="公司" align="center"> | |||
<el-table :data="tableData" stripe style="width: 100%"> | |||
<el-table-column type="index" label="序号" width="50"> | |||
</el-table-column> | |||
<el-table-column prop="correctWord" label="正确词" align="center"> | |||
</el-table-column> | |||
@@ -46,8 +66,9 @@ | |||
</el-table-column> --> | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope=""> | |||
<template slot-scope="{ row }"> | |||
<el-button type="text" @click="edit(row)">修改</el-button> | |||
<el-button type="text" @click="del(row)">删除</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
@@ -57,7 +78,7 @@ | |||
@current-change="handleCurrentChange" | |||
:current-page="currentPage" | |||
:page-sizes="[10, 20, 30, 40]" | |||
:page-size="10" | |||
:page-size="size" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="total" | |||
> | |||
@@ -68,6 +89,7 @@ | |||
<el-dialog | |||
:title="editFlag ? '修改常错词' : '新增常错词'" | |||
:visible.sync="dialogVisible" | |||
@close="reset" | |||
> | |||
<el-form | |||
:model="ruleForm" | |||
@@ -83,8 +105,8 @@ | |||
<el-form-item label="错误词" prop="wrongWord"> | |||
<el-input v-model="ruleForm.wrongWord"></el-input> | |||
</el-form-item> | |||
<el-form-item label="描述:" prop="desc"> | |||
<el-input type="textarea" v-model="ruleForm.desc"></el-input> | |||
<el-form-item label="描述:" prop="memo"> | |||
<el-input type="textarea" v-model="ruleForm.memo"></el-input> | |||
</el-form-item> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
@@ -105,15 +127,20 @@ export default { | |||
tableData: [], | |||
multipleSelection: [], | |||
dialogVisible: false, | |||
houseList: [], | |||
ruleForm: { | |||
correctWord: "", | |||
wrongWord: "", | |||
desc: "", | |||
memo: "", | |||
}, | |||
searchForm: { | |||
correctWord: "", | |||
wrongWord: "", | |||
houseId: "", | |||
}, | |||
searchForm: {}, | |||
currentPage: 1, | |||
editFlag: false, | |||
size: "", | |||
size: 10, | |||
total: 10, | |||
rules: { | |||
correctWord: [ | |||
@@ -126,8 +153,8 @@ export default { | |||
}; | |||
}, | |||
mounted() { | |||
// 列表获取 | |||
this.correctFindbypage(); | |||
// 获取楼盘列表 | |||
this.zkhousePage(); | |||
}, | |||
methods: { | |||
edit(row) { | |||
@@ -135,39 +162,101 @@ export default { | |||
this.editFlag = true; | |||
this.dialogVisible = true; | |||
}, | |||
del(row) { | |||
console.log(row, "删除"); | |||
this.$confirm(`是否删除区域?`, "提示", { | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
distinguishCancelAndClose: true, | |||
type: "warning", | |||
}).then(() => { | |||
axios({ | |||
url: `/autoSR/zk/correct/del`, | |||
method: "post", | |||
data: { | |||
id: row.id, | |||
}, | |||
}).then((res) => { | |||
if (res.code == 0) { | |||
this.$message.success("删除成功"); | |||
this.correctFindbypage(); | |||
} else { | |||
this.$message.warning(res.resMsg); | |||
} | |||
}); | |||
}); | |||
}, | |||
reset() { | |||
this.$refs.ruleForm.resetFields(); | |||
this.ruleForm = { | |||
correctWord: "", | |||
wrongWord: "", | |||
memo: "", | |||
}; | |||
}, | |||
addSure() { | |||
// console.log(this.addressOptions) | |||
this.$refs.ruleForm.validate((valid) => { | |||
if (valid) { | |||
console.log(this.ruleForm); | |||
// 编辑 | |||
return | |||
// return; | |||
if (this.editFlag) { | |||
console.log("编辑"); | |||
this.$api.api.editZkhouse(this.ruleForm).then((res) => { | |||
this.$api.api.correctUpdate(this.ruleForm).then((res) => { | |||
console.log(res); | |||
if (res.code == 0) { | |||
this.dialogVisible = false; | |||
this.$message.success("编辑成功"); | |||
this.zkhousePage(); | |||
this.correctFindbypage(); | |||
} | |||
}); | |||
} else { | |||
// 添加 | |||
console.log("添加"); | |||
return | |||
this.$api.api.addZkhouse(this.ruleForm).then((res) => { | |||
console.log(res); | |||
if (res.code == 0) { | |||
this.dialogVisible = false; | |||
this.$message.success("新增常错词成功"); | |||
this.zkhousePage(); | |||
} | |||
}); | |||
// return; | |||
this.$api.api | |||
.correctAdd({ | |||
houseId: this.searchForm.houseId, | |||
...this.ruleForm, | |||
}) | |||
.then((res) => { | |||
console.log(res); | |||
if (res.code == 0) { | |||
this.dialogVisible = false; | |||
this.$message.success("新增常错词成功"); | |||
this.correctFindbypage(); | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
}, | |||
screen(){ | |||
this.currentPage=1 | |||
this.correctFindbypage(); | |||
}, | |||
clascreen() { | |||
this.searchForm.wrongWord = ""; | |||
this.searchForm.correctWord = ""; | |||
this.correctFindbypage(); | |||
}, | |||
houseChange() { | |||
this.correctFindbypage(); | |||
}, | |||
zkhousePage() { | |||
this.$api.api | |||
.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}) | |||
.then((res) => { | |||
// console.log(res) | |||
this.houseList = res.data; | |||
this.searchForm.houseId = res.data[0].id; | |||
// 列表获取 | |||
this.correctFindbypage(); | |||
}); | |||
}, | |||
// 获取常错词列表 | |||
correctFindbypage() { | |||
let obj = { | |||
@@ -193,9 +282,13 @@ export default { | |||
}, | |||
handleSizeChange(val) { | |||
console.log(`每页 ${val} 条`); | |||
this.size = val; | |||
this.correctFindbypage(); | |||
}, | |||
handleCurrentChange(val) { | |||
console.log(`当前页: ${val}`); | |||
this.currentPage = val; | |||
this.correctFindbypage(); | |||
}, | |||
}, | |||
}; | |||
@@ -136,13 +136,7 @@ | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table | |||
:data="tableData" | |||
stripe | |||
height="400" | |||
style="width: 100%" | |||
border | |||
> | |||
<el-table :data="tableData" stripe style="width: 100%" border> | |||
<el-table-column prop="propertyName" label="楼盘名称" align="center"> | |||
</el-table-column> | |||
<el-table-column | |||
@@ -208,8 +202,13 @@ | |||
<el-table-column label="操作" align="center" fixed="right" width="200"> | |||
<template slot-scope="{ row }"> | |||
<el-button type="text" @click="edit(row)">编辑</el-button> | |||
<el-button type="text" v-if="orgType != 2" @click="changeAccount(row)">更换账号</el-button> | |||
<el-button type="text" v-if="orgType==2">添加员工</el-button> | |||
<el-button | |||
type="text" | |||
v-if="orgType != 2" | |||
@click="changeAccount(row)" | |||
>更换账号</el-button | |||
> | |||
<el-button type="text" v-if="orgType == 2">添加员工</el-button> | |||
<!-- <el-button type="text">添加员工</el-button> --> | |||
<el-button type="text" @click="del(row)">删除</el-button> | |||
</template> | |||
@@ -306,8 +305,15 @@ | |||
<el-form-item label="详细地址" prop="address"> | |||
<el-input v-model="ruleForm.address"></el-input> | |||
</el-form-item> | |||
<el-form-item label="运营人员" prop="operationalPeople" v-if="orgType == 0"> | |||
<el-select v-model="ruleForm.operationalPeople" placeholder="请选择运营人员"> | |||
<el-form-item | |||
label="运营人员" | |||
prop="operationalPeople" | |||
v-if="orgType == 0" | |||
> | |||
<el-select | |||
v-model="ruleForm.operationalPeople" | |||
placeholder="请选择运营人员" | |||
> | |||
<el-option | |||
v-for="item in operationList" | |||
:key="item.accountId" | |||
@@ -339,20 +345,39 @@ | |||
}}</el-button> | |||
</div> | |||
</el-dialog> | |||
<el-dialog title="更换账号" :visible.sync="changeFlag" @close='$refs.accountForm.resetFields()' width="400px"> | |||
<el-form :model="accountForm" label-width="100px" ref="accountForm" :rules="accountRules"> | |||
<el-dialog | |||
title="更换账号" | |||
:visible.sync="changeFlag" | |||
@close="$refs.accountForm.resetFields()" | |||
width="400px" | |||
> | |||
<el-form | |||
:model="accountForm" | |||
label-width="100px" | |||
ref="accountForm" | |||
:rules="accountRules" | |||
> | |||
<el-form-item label="管理员账号:" prop="managerPhone"> | |||
<el-input style="width:200px" maxlength="11" v-model.number="accountForm.managerPhone" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));" ></el-input> | |||
<el-input | |||
style="width: 200px" | |||
maxlength="11" | |||
v-model.number="accountForm.managerPhone" | |||
onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));" | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="管理员密码:" prop="managerPassword"> | |||
<el-input style="width:200px" show-password v-model.number="accountForm.managerPassword" ></el-input> | |||
<el-input | |||
style="width: 200px" | |||
show-password | |||
v-model.number="accountForm.managerPassword" | |||
></el-input> | |||
</el-form-item> | |||
</el-form> | |||
<div style="display:flex; justify-content: space-around;" > | |||
<el-button @click="changeFlag = false">取 消</el-button> | |||
<el-button type="primary" @click="changeSure">确 定</el-button> | |||
</div> | |||
</el-dialog> | |||
</el-form> | |||
<div style="display: flex; justify-content: space-around"> | |||
<el-button @click="changeFlag = false">取 消</el-button> | |||
<el-button type="primary" @click="changeSure">确 定</el-button> | |||
</div> | |||
</el-dialog> | |||
<!-- <el-dialog title="新增用户" :visible.sync="dialogVisible1"> | |||
<el-form | |||
:model="ruleForm1" | |||
@@ -418,6 +443,7 @@ export default { | |||
props: { | |||
lazy: true, | |||
async lazyLoad(node, resolve) { | |||
console.log(node,123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
@@ -430,8 +456,7 @@ export default { | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
else if (level == 1) { | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
@@ -445,7 +470,7 @@ export default { | |||
}, | |||
}, | |||
editFlag: false, | |||
changeFlag:false, | |||
changeFlag: false, | |||
starTime: [], | |||
searchForm: { | |||
corporateName: "", | |||
@@ -495,14 +520,12 @@ export default { | |||
dialogVisible1: false, | |||
time: [], | |||
addressOptions: [], | |||
accountForm:{ | |||
managerPassword:"", | |||
managerPhone:'', | |||
accountForm: { | |||
managerPassword: "", | |||
managerPhone: "", | |||
}, | |||
accountRules:{ | |||
managerPhone: [ | |||
{ validator: validatePass, trigger: "change" }, | |||
], | |||
accountRules: { | |||
managerPhone: [{ validator: validatePass, trigger: "change" }], | |||
}, | |||
ruleForm: { | |||
orgCode: "", //公司标识 | |||
@@ -520,7 +543,7 @@ export default { | |||
provinceId: "", //省id | |||
cityId: "", //市id | |||
}, | |||
ruleForm1:{}, | |||
ruleForm1: {}, | |||
rules: { | |||
orgCode: [{ required: true, message: "请选择公司", trigger: "blur" }], | |||
propertyName: [ | |||
@@ -529,9 +552,7 @@ export default { | |||
startWorking: [ | |||
{ required: true, message: "请选择时间", trigger: "change" }, | |||
], | |||
managerPhone: [ | |||
{ validator: validatePass, trigger: "blur" }, | |||
], | |||
managerPhone: [{ validator: validatePass, trigger: "blur" }], | |||
linkmanPhone: [{ validator: validatePass, trigger: "blur" }], | |||
}, | |||
}; | |||
@@ -544,7 +565,6 @@ export default { | |||
this.getAllOperationsStaff(); | |||
// 获取列表数据 | |||
this.zkhousePage(); | |||
}, | |||
methods: { | |||
// 添加楼盘 | |||
@@ -556,7 +576,7 @@ export default { | |||
// 编辑 | |||
if (this.editFlag) { | |||
console.log("编辑"); | |||
this.$api.api.editZkhouse(this.ruleForm).then((res) => { | |||
this.$api.api.editZkhouse(this.ruleForm).then((res) => { | |||
console.log(res); | |||
if (res.code == 0) { | |||
this.dialogVisible = false; | |||
@@ -583,9 +603,9 @@ export default { | |||
this.restFrom(); | |||
}, | |||
restFrom() { | |||
this.$refs.ruleForm.resetFields() | |||
this.$refs.ruleForm.resetFields(); | |||
this.time = []; | |||
this.ruleForm={ | |||
this.ruleForm = { | |||
orgCode: "", //公司标识 | |||
houseType: 0, //楼盘类型 | |||
propertyName: "", //楼盘名称 | |||
@@ -600,7 +620,7 @@ export default { | |||
managerPassword: "", //密码 | |||
provinceId: "", //省id | |||
cityId: "", //市id | |||
} | |||
}; | |||
}, | |||
// 新增楼盘,弹框显示 | |||
addHouse() { | |||
@@ -614,34 +634,32 @@ export default { | |||
row.endWorking.substring(0, 10), | |||
]; | |||
// console.log(this.time) | |||
this.ruleForm = Object.assign({},row) | |||
// 获取地区选择数据,在这里对回显的时候进行操作,首先先获取一级省的数据 | |||
this.ruleForm = Object.assign({}, row); | |||
// 获取地区选择数据,在这里对回显的时候进行操作,首先先获取一级省的数据 | |||
this.getProvinceList(); | |||
// 级联选择器回显问题 | |||
this.editFlag = true; | |||
}, | |||
// 更换账号 | |||
changeAccount(row){ | |||
this.changeFlag=true | |||
this.accountForm.id=row.id | |||
changeAccount(row) { | |||
this.changeFlag = true; | |||
this.accountForm.id = row.id; | |||
}, | |||
changeSure(){ | |||
changeSure() { | |||
this.$refs.accountForm.validate((valid) => { | |||
if(valid){ | |||
this.$api.api.updateManagerPhone(this.accountForm) | |||
.then(res=>{ | |||
if (res.code == 0) { | |||
this.changeFlag = false; | |||
this.$message.success("编辑成功"); | |||
this.zkhousePage(); | |||
} | |||
}) | |||
if (valid) { | |||
this.$api.api.updateManagerPhone(this.accountForm).then((res) => { | |||
if (res.code == 0) { | |||
this.changeFlag = false; | |||
this.$message.success("编辑成功"); | |||
this.zkhousePage(); | |||
} | |||
}); | |||
} | |||
}) | |||
}); | |||
}, | |||
del(row) { | |||
del(row) { | |||
console.log(row, "删除"); | |||
this.$confirm(`是否删除区域?`, "提示", { | |||
confirmButtonText: "确定", | |||
@@ -708,33 +726,32 @@ export default { | |||
this.total = res.data.total; | |||
}); | |||
}, | |||
getProvinceList(parentId = 0) { | |||
async getProvinceList(parentId = 0) { | |||
let _this = this; | |||
this.addressOptions=[] | |||
getAreaList({ parentId }).then((res) => { | |||
console.log(res); | |||
// 当他没有值时给addressOptions赋值,这是第一个数组 | |||
if (res.code == 0) { | |||
// _this.$set(_this, 'addressOptions',_this.ruleForm.cityIds&&_this.ruleForm.provinceId ? this.loadOptions(res.data||[] ):res.data) | |||
let arr = []; | |||
res.data.map((item) => { | |||
let obj = {}; | |||
obj.value = item.id; | |||
obj.label = item.name; | |||
obj.leaf = false; | |||
obj.children=[] | |||
arr.push(obj); | |||
}); | |||
this.addressOptions = arr; | |||
this.loadOptions(); | |||
} | |||
}); | |||
this.addressOptions = []; | |||
let res = await getAreaList({ parentId }); | |||
console.log(res); | |||
// 当他没有值时给addressOptions赋值,这是第一个数组 | |||
if (res.code == 0) { | |||
// _this.$set(_this, 'addressOptions',_this.ruleForm.cityIds&&_this.ruleForm.provinceId ? this.loadOptions(res.data||[] ):res.data) | |||
let arr = []; | |||
res.data.map((item) => { | |||
let obj = {}; | |||
obj.value = item.id; | |||
obj.label = item.name; | |||
obj.leaf = false; | |||
obj.children = []; | |||
arr.push(obj); | |||
}); | |||
this.addressOptions = arr; | |||
this.loadOptions(); | |||
} | |||
}, | |||
loadOptions() { | |||
console.log(this.addressOptions); | |||
this.addressOptions.map((item,idx) => { | |||
// console.log(this.addressOptions); | |||
this.addressOptions.map((item, idx) => { | |||
if (item.value == this.ruleForm.provinceId) { | |||
console.log('有匹配项') | |||
console.log("有匹配项"); | |||
getAreaList({ parentId: this.ruleForm.provinceId }).then((res) => { | |||
if (res.code == 0) { | |||
let arr = []; | |||
@@ -745,14 +762,18 @@ export default { | |||
obj.leaf = true; | |||
arr.push(obj); | |||
}); | |||
this.$set(this.addressOptions[idx],'children',arr) | |||
this.area = [this.ruleForm.provinceId, this.ruleForm.cityId]; | |||
console.log(this.addressOptions[idx],'123'); | |||
console.log(this.area); | |||
this.addressOptions=Object.assign([],this.addressOptions) | |||
this.$forceUpdate() | |||
this.$set(this.addressOptions[idx], "children", arr); | |||
console.log(this.addressOptions[idx], "123"); | |||
this.addressOptions = Object.assign([], this.addressOptions); | |||
this.area = null; | |||
setTimeout(() => { | |||
this.area = [this.ruleForm.provinceId, this.ruleForm.cityId]; | |||
console.log(1); | |||
console.log(this.addressOptions); | |||
console.log(this.area); | |||
this.$forceUpdate(); | |||
}, 50); | |||
} | |||
}); | |||
} | |||
@@ -778,7 +799,7 @@ export default { | |||
this.searchForm.endWorking = e[1]; | |||
}, | |||
tabtimetap(idx) { | |||
this.searchForm.residueTime=idx | |||
this.searchForm.residueTime = idx; | |||
}, | |||
handleSizeChange(val) { | |||
console.log(`每页 ${val} 条`); | |||