@@ -411,6 +411,15 @@ export function findKeywords(query) { | |||
}) | |||
} | |||
// 置业顾问 | |||
export function findUserListByHouseId(query) { | |||
return request({ | |||
url: 'autoSR/cushouseuserrelationmid/findUserListByHouseId', | |||
method:'get', | |||
params:query | |||
}) | |||
} | |||
// 常错词列表 | |||
export function correctFindbypage(query) { | |||
return request({ | |||
@@ -435,3 +444,39 @@ export function correctUpdate(query) { | |||
params:query | |||
}) | |||
} | |||
// | |||
// 客户管理客户裂变 | |||
export function customerManagement(query) { | |||
return request({ | |||
url: '/autoSR/customer/customerManagement', | |||
method:'get', | |||
params:query | |||
}) | |||
} | |||
// 销售阶段列表 | |||
export function lifeTrackDefineList(query) { | |||
return request({ | |||
url: '/autoSR/lifeTrackDefine/list', | |||
method:'get', | |||
params:query | |||
}) | |||
} | |||
// 修改 | |||
export function lifeTrackDefineUpdate(data) { | |||
return request({ | |||
url: '/autoSR/lifeTrackDefine/update', | |||
method:'post', | |||
data | |||
}) | |||
} | |||
// 添加 | |||
export function lifeTrackDefineAdd(data) { | |||
return request({ | |||
url: '/autoSR/lifeTrackDefine/add', | |||
method:'post', | |||
data | |||
}) | |||
} | |||
@@ -1,93 +1,83 @@ | |||
<template> | |||
<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 class="app-titel"> | |||
<div | |||
class="label" | |||
style="color: #32363d; font-weight: 400; font-size: 16px" | |||
> | |||
楼盘选择: | |||
</div> | |||
<div> | |||
<el-select v-model="value" placeholder="请选择"> | |||
<el-select | |||
v-model="houseId" | |||
@change="houseChange" | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in options" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
v-for="item in houseList" | |||
:key="item.id" | |||
:label="item.propertyName" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="infoadd()" style="background: #2671e2; color: #ffffff" >新增</el-button> | |||
<el-button | |||
@click="infoadd()" | |||
style="background: #2671e2; color: #ffffff" | |||
>新增</el-button | |||
> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table :data="tableData" stripe style="width: 100%"> | |||
<el-table-column prop="houseName" label="楼盘名称" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="stageName" label="阶段名称" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="sort" label="顺序" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="remarks" label="备注" align="center"> | |||
</el-table-column> | |||
<el-table | |||
:data="tableData" | |||
stripe | |||
style="width: 100%"> | |||
<el-table-column | |||
prop="name" | |||
label="楼盘名称" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
prop="operatorName" | |||
label="阶段名称" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
prop="operationStaffName" | |||
label="循序" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
prop="address" | |||
label="备注" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="scope"> | |||
<div style="color: #2671E2;" @click="infoeditor(scope.row)">编辑</div> | |||
<div style="color: #2671E2;" @click="toinifodelete(scope)">删除</div> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<el-table-column label="操作" align="center" width="150"> | |||
<template slot-scope="{ row }"> | |||
<el-button type="text" @click="edit(row)">编辑</el-button> | |||
<el-button type="text" @click="toinifodelete(row)">删除</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
</div> | |||
<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="name"> | |||
<el-input v-model="addagentobj.name"></el-input> | |||
</el-form-item> | |||
<el-form-item label="顺序:" prop="contactPerson"> | |||
<el-input v-model="addagentobj.contactPerson"></el-input> | |||
</el-form-item> | |||
<el-form-item label="备注:"> | |||
<el-input v-model="addagentobj.contactNumber"></el-input> | |||
</el-form-item> | |||
<el-dialog title="新增阶段" :visible.sync="dialogVisible" @close="clear"> | |||
<el-form | |||
:model="ruleForm" | |||
label-position="labelPosition" | |||
:rules="rules" | |||
ref="ruleForm" | |||
label-width="140px" | |||
style="width: 60%; margin: 0 auto" | |||
> | |||
<el-form-item label="阶段名称:" prop="stageName"> | |||
<el-input v-model="ruleForm.stageName"></el-input> | |||
</el-form-item> | |||
<el-form-item label="顺序:" prop="sort"> | |||
<el-input v-model="ruleForm.sort" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));"></el-input> | |||
</el-form-item> | |||
<el-form-item label="备注:"> | |||
<el-input v-model="ruleForm.remarks"></el-input> | |||
</el-form-item> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="add()">保存</el-button> | |||
<el-button @click="dialogVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="addSure()">保存</el-button> | |||
</div> | |||
</el-dialog> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
@@ -95,100 +85,143 @@ | |||
export default { | |||
data() { | |||
return { | |||
addagentobj:{ | |||
name:'',// 公司名称 | |||
contactPerson:'',// 联系人 | |||
contactNumber:'',// 联系人手机号 | |||
houseId: "", | |||
houseList: [], | |||
ruleForm: { | |||
stageName: "", // 公司名称 | |||
sort: "", // 联系人 | |||
remarks: "", // 联系人手机号 | |||
}, | |||
rules:{ | |||
name: [ | |||
{ required: true, message: '请输入阶段名称:', trigger: 'blur' }, | |||
], | |||
contactPerson: [ | |||
{ required: true, message: '请输入顺序', trigger: 'blur' }, | |||
], | |||
rules: { | |||
stageName: [ | |||
{ required: true, message: "请输入阶段名称:", trigger: "blur" }, | |||
], | |||
sort: [{ required: true, message: "请输入顺序", trigger: "blur" }], | |||
}, | |||
tableData:[], | |||
dialogVisible:false, | |||
options:[], | |||
value:'' | |||
tableData: [], | |||
dialogVisible: false, | |||
editFlag: false, | |||
options: [], | |||
value: "", | |||
}; | |||
}, | |||
mounted() { | |||
// 获取楼盘列表 | |||
this.zkhousePage(); | |||
}, | |||
methods: { | |||
houseChange() { | |||
this.findbypage(); | |||
}, | |||
clear() { | |||
this.ruleForm = { | |||
stageName: "", // 公司名称 | |||
sort: "", // 联系人 | |||
remarks: "", // 联系人手机号 | |||
}; | |||
}, | |||
zkhousePage() { | |||
this.$api.api | |||
.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}) | |||
.then((res) => { | |||
// console.log(res) | |||
this.houseList = res.data; | |||
this.houseId = res.data[0].id; | |||
// 获取列表 | |||
this.findbypage(); | |||
}); | |||
}, | |||
findbypage() { | |||
let obj = { | |||
// current: this.currentPage, | |||
// size: this.size, | |||
houseId: this.houseId, | |||
}; | |||
this.$api.api.lifeTrackDefineList(obj).then((res) => { | |||
// console.log(res) | |||
this.tableData = res.data; | |||
// this.total = res.data.total; | |||
}); | |||
}, | |||
//删除 | |||
toinifodelete(item){ | |||
this.$confirm('此操作将永久删除, 是否继续?', '提示', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(() => { | |||
this.$api.http.delOrg({id:item.row.id}).then((res) => { | |||
if(res.code==0){ | |||
this.$message({ | |||
type: 'success', | |||
message: '删除成功!' | |||
}); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}) | |||
}).catch(() => { | |||
toinifodelete(row) { | |||
this.$confirm("此操作将永久删除, 是否继续?", "提示", { | |||
confirmButtonText: "确定", | |||
cancelButtonText: "取消", | |||
type: "warning", | |||
}) | |||
.then(() => { | |||
axios({ | |||
url: `/autoSR/lifeTrackDefine/del`, | |||
method: "post", | |||
data: { | |||
id: row.id, | |||
}, | |||
}).then((res) => { | |||
if (res.code == 0) { | |||
this.$message({ | |||
type: "success", | |||
message: "删除成功!", | |||
}); | |||
this.findbypage(); | |||
} else { | |||
this.$message.error(res.message); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
this.$message({ | |||
type: 'info', | |||
message: '已取消删除' | |||
type: "info", | |||
message: "已取消删除", | |||
}); | |||
}); | |||
}, | |||
//新增 | |||
infoadd(){ | |||
this.dialogVisible=true; | |||
//新增 | |||
infoadd() { | |||
this.editFlag = false; | |||
this.dialogVisible = true; | |||
}, | |||
//确认新增 | |||
add(){ | |||
this.$refs.addagentobj.validate((valid) => { | |||
if (valid) { | |||
this.addagentobj.pid=0; | |||
this.$api.http.AddaddOrg(this.addagentobj).then((res) => { | |||
if(res.code==0){ | |||
this.dialogVisible=false; | |||
this.$refs.addagentobj.resetFields(); | |||
this.Screeningofempty() | |||
}else{ | |||
this.$message.error(res.message); | |||
} | |||
}); | |||
edit(row) { | |||
console.log(row); | |||
// console.log(this.time) | |||
this.ruleForm = Object.assign({}, row); | |||
// 获取地区选择数据,在这里对回显的时候进行操作,首先先获取一级省的数据 | |||
this.editFlag = true; | |||
this.dialogVisible = true; | |||
}, | |||
addSure() { | |||
// console.log(this.addressOptions) | |||
this.$refs.ruleForm.validate((valid) => { | |||
if (valid) { | |||
console.log(this.ruleForm); | |||
// 编辑 | |||
if (this.editFlag) { | |||
console.log("编辑"); | |||
this.$api.api.lifeTrackDefineUpdate(this.ruleForm).then((res) => { | |||
console.log(res); | |||
if (res.code == 0) { | |||
this.dialogVisible = false; | |||
this.$message.success("编辑成功"); | |||
this.findbypage(); | |||
} | |||
}); | |||
} else { | |||
return false; | |||
// 添加 | |||
console.log("添加"); | |||
this.$api.api.lifeTrackDefineAdd({houseId:this.houseId,...this.ruleForm,}).then((res) => { | |||
console.log(res); | |||
if (res.code == 0) { | |||
this.dialogVisible = false; | |||
this.$message.success("新增成功"); | |||
this.findbypage(); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 获取列表 | |||
getcompanyList() { | |||
this.tableData=[]; | |||
let parmest={ | |||
current: this.pageNum, | |||
size: this.pageSize, | |||
operatorName:this.operatorName, | |||
operationStaffName:this.operationStaffName, | |||
name:this.name, | |||
} | |||
this.$api.http.getcompanyList(parmest).then((res) => { | |||
console.log(res.data); | |||
this.tableData=res.data.records; | |||
this.total=res.data.total | |||
}); | |||
} | |||
}); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -200,11 +233,11 @@ export default { | |||
min-width: 1200px; | |||
padding-bottom: 100px; | |||
} | |||
.cen-tab{ | |||
.cen-tab { | |||
width: 100%; | |||
padding: 15px; | |||
min-height: 400px; | |||
background: #FFFFFF; | |||
background: #ffffff; | |||
margin-top: 15px; | |||
} | |||
.tophove { | |||
@@ -1,14 +1,41 @@ | |||
<template> | |||
<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 class="app-titel"> | |||
<div | |||
class="label" | |||
style="color: #32363d; font-weight: 400; font-size: 16px" | |||
> | |||
楼盘选择: | |||
</div> | |||
<div> | |||
<el-select v-model="value" placeholder="请选择"> | |||
<el-select | |||
v-model="searchForm.projectId" | |||
@change="houseChange" | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in options" | |||
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: 15px"> | |||
<div class="label" style="margin-left: 20px; margin-right: 20px"> | |||
<!-- 时间: --> | |||
<el-select | |||
v-model="searchForm.timeType" | |||
@change="houseChange" | |||
placeholder="请选择" | |||
style="width: 125px" | |||
> | |||
<el-option | |||
v-for="item in timeTypeList" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
@@ -16,53 +43,95 @@ | |||
</el-option> | |||
</el-select> | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label">最近接待:</div> | |||
<div class="toptimeqhuan"> | |||
<div :class="{ tophove: TimetoAhoose == 0 }" @click="tabtimetap(0)"> | |||
全部 | |||
<div | |||
:class="{ tophove: searchForm.dateType == 0 }" | |||
@click="tabtimetap(0)" | |||
> | |||
今日 | |||
</div> | |||
<div :class="{ tophove: TimetoAhoose == 1 }" @click="tabtimetap(1)"> | |||
15天内 | |||
<div | |||
:class="{ tophove: searchForm.dateType == 2 }" | |||
@click="tabtimetap(2)" | |||
> | |||
近7天 | |||
</div> | |||
<div :class="{ tophove: TimetoAhoose == 2 }" @click="tabtimetap(2)"> | |||
30天内 | |||
<div | |||
:class="{ tophove: searchForm.dateType == 6 }" | |||
@click="tabtimetap(6)" | |||
> | |||
近30天 | |||
</div> | |||
</div> | |||
<div> | |||
<el-date-picker | |||
v-model="value1" | |||
<el-date-picker | |||
v-model="time" | |||
type="daterange" | |||
range-separator="至" | |||
class="div-inp" | |||
range-separator="-" | |||
start-placeholder="开始日期" | |||
end-placeholder="结束日期"> | |||
:default-time="['00:00:00', '23:59:59']" | |||
value-format="yyyy-MM-dd" | |||
end-placeholder="结束日期" | |||
@change="timeChange" | |||
> | |||
</el-date-picker> | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label">客户名称:</div> | |||
<div> | |||
<el-input v-model="value"></el-input> | |||
<div class="div-lab"> | |||
<div class="label">客户名称:</div> | |||
<el-input class="div-inp" v-model="searchForm.name"></el-input> | |||
</div> | |||
<div class="label">客户画像:</div> | |||
<div > | |||
<el-select v-model="value" placeholder="请选择"> | |||
<div class="div-lab"> | |||
<div class="label">置业顾问:</div> | |||
<el-select | |||
v-model="searchForm.accountId" | |||
clearable | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
v-for="item in accountList" | |||
:key="item.accountId" | |||
:label="item.name" | |||
:value="item.accountId" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="label">客户等级:</div> | |||
<div> | |||
<el-select v-model="value" placeholder="请选择"> | |||
<div class="div-lab"> | |||
<div class="label">画像标签:</div> | |||
<el-select | |||
class="div-inp" | |||
multiple | |||
clearable | |||
collapse-tags | |||
v-model="searchForm.keywordsId" | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in keywordsList" | |||
:key="item.keywordsId" | |||
:label="item.name" | |||
:value="item.keywordsId" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="div-lab"> | |||
<div class="label">客户等级:</div> | |||
<el-select | |||
v-model="searchForm.level" | |||
clearable | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options2" | |||
v-for="item in levelList" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
@@ -70,14 +139,17 @@ | |||
</el-option> | |||
</el-select> | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label">置业顾问:</div> | |||
<div> | |||
<el-select v-model="value" placeholder="请选择"> | |||
<div class="div-lab"> | |||
<!-- 默认全部 --> | |||
<div class="label">客户阶段:</div> | |||
<el-select | |||
v-model="searchForm.markAdvisor" | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options" | |||
v-for="item in options5" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
@@ -85,9 +157,15 @@ | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="label">接待时长:</div> | |||
<div > | |||
<el-select v-model="value" placeholder="请选择"> | |||
<div class="div-lab"> | |||
<div class="label">接待时长:</div> | |||
<el-select | |||
clearable | |||
v-model="searchForm.recDurationInterval" | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options3" | |||
:key="item.value" | |||
@@ -97,9 +175,15 @@ | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="label">到访次数:</div> | |||
<div> | |||
<el-select v-model="value" placeholder="请选择"> | |||
<div class="div-lab"> | |||
<div class="label">到访次数:</div> | |||
<el-select | |||
v-model="searchForm.visitRecord" | |||
clearable | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options4" | |||
:key="item.value" | |||
@@ -111,113 +195,112 @@ | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"></div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label" style="color: #ffffff">筛选相关:</div> | |||
<div> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
>批量转交</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
<el-button style="background: #2671e2; color: #ffffff" @click="screen" | |||
>筛选</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button>清空筛选条件</el-button> | |||
<el-button @click="clearScreen">清空筛选条件</el-button> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table | |||
:data="tableData" | |||
stripe | |||
height="400" | |||
@selection-change="handleSelectionChange" | |||
style="width: 100%"> | |||
<el-table-column | |||
type="selection" | |||
width="55"> | |||
</el-table-column> | |||
<el-table-column | |||
prop="date" | |||
label="客户" | |||
align="center" | |||
> | |||
</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> | |||
<el-table-column | |||
prop="date" | |||
label="客户等级" | |||
align="center" | |||
> | |||
</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> | |||
<el-table-column | |||
prop="date" | |||
label="接待时长" | |||
align="center" | |||
> | |||
</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> | |||
<el-table-column | |||
prop="address" | |||
label="最近到访时间" | |||
align="center"> | |||
</el-table-column> | |||
<!-- scope --> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope=""> | |||
<div style="color: #2671E2;">详情</div> | |||
<div style="color: #2671E2;">转交</div> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<div style="display: flex;justify-content:flex-end;margin-top: 10px;"> | |||
<el-pagination | |||
@size-change="handleSizeChange" | |||
@current-change="handleCurrentChange" | |||
:current-page="currentPage4" | |||
:page-sizes="[100, 200, 300, 400]" | |||
:page-size="100" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="400"> | |||
</el-pagination> | |||
</div> | |||
<el-table :data="tableData" stripe style="width: 100%"> | |||
<el-table-column type="index" label="序号" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="name" label="客户" align="center"> | |||
</el-table-column> | |||
<el-table-column | |||
prop="phone" | |||
label="联系电话" | |||
width="150" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column prop="agentName" label="销售顾问" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="level" label="客户等级" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ | |||
row.level == 1 | |||
? "A" | |||
: row.level == 2 | |||
? "B" | |||
: row.level == 3 | |||
? "C" | |||
: row.level == 4 | |||
? "D" | |||
: "" | |||
}} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="recording" label="客户阶段" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ | |||
row.recording == 0 | |||
? "没有录音" | |||
: row.recording == 1 | |||
? "部分录音" | |||
: "完整录音" | |||
}} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="visitRecord" label="到访次数" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ row.visitRecord || "0" }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="mm" label="接待时长" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="fraction" label="销奖执行率" align="center"> | |||
<template slot-scope="{ row }"> {{ row.fraction || "0" }}% </template> | |||
</el-table-column> | |||
<el-table-column | |||
prop="createTime" | |||
label="添加时间" | |||
width="200" | |||
align="center" | |||
> | |||
</el-table-column> | |||
<el-table-column | |||
prop="endAssignedTime" | |||
label="最近到访时间" | |||
width="200" | |||
align="center" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.endAssignedTime || "暂无" }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" align="center" width="250" fixed="right"> | |||
<template slot-scope="{ row }"> | |||
<el-button type="text">客户详情</el-button> | |||
<el-button type="text">接待详情</el-button> | |||
<!-- <el-button type="text">更多</el-button> --> | |||
<el-button type="text">转交</el-button> | |||
<el-button type="text">删除</el-button> | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<div style="display: flex; justify-content: flex-end; margin-top: 10px"> | |||
<el-pagination | |||
@size-change="handleSizeChange" | |||
@current-change="handleCurrentChange" | |||
:current-page="currentPage" | |||
:page-sizes="[10, 20, 30, 40]" | |||
:page-size="size" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="total" | |||
> | |||
</el-pagination> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
@@ -227,21 +310,12 @@ export default { | |||
data() { | |||
return { | |||
TimetoAhoose: 2, | |||
options: [ | |||
{ | |||
value: "1", | |||
label: "全部", | |||
}, | |||
{ | |||
value: "2", | |||
label: "服务器内", | |||
}, | |||
{ | |||
value: "3", | |||
label: "已失效", | |||
}, | |||
], | |||
options2: [ | |||
time: [], | |||
houseList: [], | |||
options: [], | |||
keywordsList: [], | |||
accountList: [], | |||
levelList: [ | |||
{ | |||
value: "1", | |||
label: "A", | |||
@@ -259,7 +333,7 @@ export default { | |||
label: "D", | |||
}, | |||
], | |||
options3: [ | |||
options3: [ | |||
{ | |||
value: "1", | |||
label: "0-15分钟", | |||
@@ -299,78 +373,208 @@ export default { | |||
label: "三次以上", | |||
}, | |||
], | |||
currentPage4:4, | |||
value: "", | |||
input: "", | |||
tableData: [ | |||
timeTypeList: [ | |||
{ | |||
date: "2016-05-03", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
value: "0", | |||
label: "添加时间", | |||
}, | |||
{ | |||
date: "2016-05-02", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
}, | |||
{ | |||
date: "2016-05-04", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
}, | |||
{ | |||
date: "2016-05-01", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
value: "1", | |||
label: "最近接待时间", | |||
}, | |||
], | |||
options5: [ | |||
{ | |||
date: "2016-05-08", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
value: null, | |||
label: "全部", | |||
}, | |||
{ | |||
date: "2016-05-06", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
value: "1", | |||
label: "已标注", | |||
}, | |||
{ | |||
date: "2016-05-07", | |||
name: "王小虎", | |||
address: " 1518 弄", | |||
value: "2", | |||
label: "未标注", | |||
}, | |||
], | |||
multipleSelection:[] | |||
currentPage: 1, | |||
size: 10, | |||
total: 10, | |||
value: "", | |||
input: "", | |||
tableData: [], | |||
tophove: "", | |||
type: "0", | |||
searchForm: { | |||
name: "", | |||
keywordsId: [], | |||
markAdvisor: null, | |||
level: "", | |||
recDurationInterval: "", | |||
visitRecord: "", | |||
staDate: "", | |||
endDate: "", | |||
dateType: "0", | |||
projectId: "", | |||
timeType: "0", | |||
}, | |||
}; | |||
}, | |||
mounted() {}, | |||
mounted() { | |||
this.tabtimetap(0); | |||
// 获取楼盘列表 | |||
this.zkhousePage(); | |||
}, | |||
methods: { | |||
//删除 | |||
toinifodelete(){ | |||
this.$confirm('此操作将永久删除, 是否继续?', '提示', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning' | |||
}).then(() => { | |||
this.$message({ | |||
type: 'success', | |||
message: '删除成功!' | |||
}); | |||
}).catch(() => { | |||
this.$message({ | |||
type: 'info', | |||
message: '已取消删除' | |||
}); | |||
// 接待记录列表 | |||
findbypage() { | |||
let obj = { | |||
current: this.currentPage, | |||
size: this.size, | |||
...this.searchForm, | |||
}; | |||
obj.keywordIds = obj.keywordsId.join(","); | |||
(obj.dateType = this.searchForm.staDate | |||
? null | |||
: this.searchForm.dateType), | |||
this.$api.api.customerManagement(obj).then((res) => { | |||
// console.log(res) | |||
this.tableData = res.data.records; | |||
this.total = res.data.total; | |||
}); | |||
}, | |||
handleSelectionChange(val) { | |||
this.multipleSelection = val; | |||
}, | |||
handleSizeChange(val) { | |||
console.log(`每页 ${val} 条`); | |||
}, | |||
handleCurrentChange(val) { | |||
console.log(`当前页: ${val}`); | |||
clearScreen() { | |||
this.currentPage = 1; | |||
this.searchForm = { | |||
name: "", | |||
keywordsId: [], | |||
markAdvisor: null, | |||
level: "", | |||
recDurationInterval: "", | |||
visitRecord: "", | |||
staDate: "", | |||
endDate: "", | |||
dateType: "0", | |||
projectId: "", | |||
timeType: "0", | |||
projectId: this.houseList[0].id, | |||
}; | |||
this.findbypage(); | |||
}, | |||
houseChange() { | |||
this.findbypage(); | |||
this.findKeywords(); | |||
// 获取置业顾问列表 | |||
this.findUserListByHouseId(); | |||
}, | |||
timeChange(e) { | |||
this.searchForm.staDate = e[0]; | |||
this.searchForm.endDate = e[1]; | |||
this.houseChange(); | |||
}, | |||
screen() { | |||
this.currentPage = 1; | |||
console.log(this.searchForm); | |||
this.findbypage(); | |||
}, | |||
findKeywords() { | |||
this.$api.api | |||
.findKeywords({ | |||
dateType: this.searchForm.staDate ? null : this.searchForm.dateType, | |||
statDateStart: this.searchForm.staDate, | |||
statDateEnd: this.searchForm.endDate, | |||
projectId: this.searchForm.projectId, | |||
type: this.type, | |||
}) | |||
.then((res) => { | |||
console.log(res); | |||
this.keywordsList = res.data; | |||
}); | |||
}, | |||
zkhousePage() { | |||
this.$api.api | |||
.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}) | |||
.then((res) => { | |||
// console.log(res) | |||
this.houseList = res.data; | |||
this.searchForm.projectId = res.data[0].id; | |||
// 获取接待记录列表 | |||
this.findbypage(); | |||
// 获取客户意向 | |||
this.findKeywords(); | |||
// 获取置业顾问列表 | |||
this.findUserListByHouseId(); | |||
}); | |||
}, | |||
// 置业顾问列表 | |||
async findUserListByHouseId() { | |||
let result = await this.$api.api.findUserListByHouseId({ | |||
orgType: localStorage.getItem("orgType"), | |||
projectId: this.searchForm.projectId, | |||
}); | |||
console.log(result); | |||
this.accountList = result.data; | |||
}, | |||
handleSizeChange(val) { | |||
console.log(`每页 ${val} 条`); | |||
this.size = val; | |||
this.findbypage(); | |||
}, | |||
handleCurrentChange(val) { | |||
console.log(`当前页: ${val}`); | |||
this.currentPage = val; | |||
this.findbypage(); | |||
}, | |||
tabtimetap(idx) { | |||
this.searchForm.staDate = ""; | |||
this.searchForm.endDate = ""; | |||
// this.$set(this, "time", null); | |||
this.searchForm.dateType = idx; | |||
let num = 24 * 3600 * 1000; | |||
// 获取当前时间戳转换为日期格式 | |||
if (idx == 0) { | |||
num = 24 * 3600 * 1000 * 0; | |||
} | |||
if (idx == 2) { | |||
num = 24 * 3600 * 1000 * 6; | |||
} | |||
if (idx == 6) { | |||
num = 24 * 3600 * 1000 * 29; | |||
} | |||
this.time = [ | |||
this.timestampToTime(new Date().getTime() - num), | |||
this.timestampToTime(new Date().getTime()), | |||
]; | |||
}, | |||
timestampToTime(timestamp) { | |||
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 | |||
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 | |||
var yyyy = date.getFullYear() + "-"; | |||
var MM = | |||
(date.getMonth() + 1 < 10 | |||
? "0" + (date.getMonth() + 1) | |||
: date.getMonth() + 1) + "-"; | |||
// var dd = date.getDate() + ' '; | |||
var dd = | |||
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "; | |||
// var HH = date.getHours() + ':'; | |||
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':'; | |||
// | |||
// // var mm = date.getMinutes() + ':'; | |||
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':'; | |||
// | |||
// // var ss = date.getSeconds(); | |||
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds()); | |||
// return yyyy+MM+dd+HH+mm+ss; | |||
return yyyy + MM + dd; | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -382,10 +586,10 @@ export default { | |||
min-width: 1200px; | |||
padding-bottom: 100px; | |||
} | |||
.cen-tab{ | |||
.cen-tab { | |||
width: 100%; | |||
padding: 15px; | |||
background: #FFFFFF; | |||
background: #ffffff; | |||
margin-top: 15px; | |||
} | |||
.tophove { | |||
@@ -403,12 +607,14 @@ export default { | |||
width: 100%; | |||
display: flex; | |||
align-items: center; | |||
flex-wrap: wrap; | |||
.label { | |||
font-size: 14px; | |||
font-weight: 400; | |||
color: #32363d; | |||
line-height: 14px; | |||
line-height: 32px; | |||
margin-left: 15px; | |||
min-width: 100px; | |||
} | |||
.toptimeqhuan { | |||
height: 30px; | |||
@@ -428,4 +634,11 @@ export default { | |||
} | |||
} | |||
} | |||
.div-lab { | |||
display: flex; | |||
margin: 5px; | |||
} | |||
.div-inp { | |||
width: 250px; | |||
} | |||
</style> |
@@ -1,5 +1,5 @@ | |||
<template> | |||
<div> | |||
<div class="box-center"> | |||
<div class="titlebox"> | |||
<div | |||
style=" | |||
@@ -1245,6 +1245,12 @@ export default { | |||
</script> | |||
<style lang='less' scoped> | |||
.box-center { | |||
width: 100%; | |||
padding: 15px; | |||
min-width: 1200px; | |||
padding-bottom: 100px; | |||
} | |||
.toptimeqhuan { | |||
width: 230px; | |||
height: 40px; | |||
@@ -1,5 +1,5 @@ | |||
<template> | |||
<div> | |||
<div class="box-center"> | |||
<div class="toptab"> | |||
<div | |||
@click="tapclickyab(0)" | |||
@@ -482,6 +482,12 @@ export default { | |||
</script> | |||
<style scoped > | |||
.box-center { | |||
width: 100%; | |||
padding: 15px; | |||
min-width: 1200px; | |||
padding-bottom: 100px; | |||
} | |||
.toptab { | |||
width: 100%; | |||
display: flex; | |||
@@ -11,7 +11,7 @@ | |||
</div> | |||
<div> | |||
<el-select | |||
v-model="searchForm.houseId" | |||
v-model="searchForm.projectId" | |||
@change="houseChange" | |||
placeholder="请选择" | |||
> | |||
@@ -26,7 +26,7 @@ | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label">时间:</div> | |||
<div class="label" style="margin-left: 20px">时间:</div> | |||
<div class="toptimeqhuan"> | |||
<div | |||
:class="{ tophove: searchForm.dateType == 0 }" | |||
@@ -74,6 +74,7 @@ | |||
<el-select | |||
class="div-inp" | |||
multiple | |||
clearable | |||
collapse-tags | |||
v-model="searchForm.keywordsId" | |||
placeholder="请选择" | |||
@@ -92,6 +93,7 @@ | |||
<div class="label">录音类型:</div> | |||
<el-select | |||
v-model="searchForm.recording" | |||
clearable | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
@@ -107,20 +109,30 @@ | |||
<div class="div-lab"> | |||
<div class="label">置业顾问:</div> | |||
<el-select v-model="value" placeholder="请选择" class="div-inp"> | |||
<el-select | |||
v-model="searchForm.accountId" | |||
clearable | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
v-for="item in accountList" | |||
:key="item.accountId" | |||
:label="item.name" | |||
:value="item.accountId" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="div-lab"> | |||
<div class="label">标注顾问:</div> | |||
<el-select v-model="value" placeholder="请选择" class="div-inp"> | |||
<!-- 默认全部 --> | |||
<div class="label">标记客户:</div> | |||
<el-select | |||
v-model="searchForm.markAdvisor" | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options5" | |||
:key="item.value" | |||
@@ -133,7 +145,12 @@ | |||
<div class="div-lab"> | |||
<div class="label">接待时长:</div> | |||
<el-select v-model="value" placeholder="请选择" class="div-inp"> | |||
<el-select | |||
clearable | |||
v-model="searchForm.recDurationInterval" | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options3" | |||
:key="item.value" | |||
@@ -146,7 +163,12 @@ | |||
<div class="div-lab"> | |||
<div class="label">到访次数:</div> | |||
<el-select v-model="value" placeholder="请选择" class="div-inp"> | |||
<el-select | |||
v-model="searchForm.visitRecord" | |||
clearable | |||
placeholder="请选择" | |||
class="div-inp" | |||
> | |||
<el-option | |||
v-for="item in options4" | |||
:key="item.value" | |||
@@ -163,21 +185,25 @@ | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div class="label" style="color: #ffffff">筛选相关:</div> | |||
<div style="margin-left: 20px"> | |||
<el-button style="background: #2671e2; color: #ffffff" | |||
@click="screen" | |||
<el-button style="background: #2671e2; color: #ffffff" @click="screen" | |||
>筛选</el-button | |||
> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button>清空筛选条件</el-button> | |||
<el-button @click="clearScreen">清空筛选条件</el-button> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table :data="tableData" stripe style="width: 100%"> | |||
<el-table-column prop="staTime" label="接待开始时间" align="center" width="200"> | |||
<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> | |||
@@ -186,20 +212,30 @@ | |||
<el-table-column prop="mm" label="录音时长" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="name" label="录音类型" align="center"> | |||
<el-table-column prop="recording" label="录音类型" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ | |||
row.recording == 0 | |||
? "没有录音" | |||
: row.recording == 1 | |||
? "部分录音" | |||
: "完整录音" | |||
}} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="ownerName" label="标注顾问" align="center"> | |||
<el-table-column prop="markAdvisor" label="标记客户" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ row.markAdvisor == 0 ? "已标记" : "未标记" }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="keywords" label="客户意向" align="center"> | |||
<el-table-column prop="total" label="语义词触达次数" align="center"> | |||
</el-table-column> | |||
<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"> | |||
<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" width="200" fixed="right"> | |||
<template slot-scope="{ row }"> | |||
@@ -215,7 +251,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" | |||
> | |||
@@ -234,6 +270,7 @@ export default { | |||
houseList: [], | |||
options: [], | |||
keywordsList: [], | |||
accountList: [], | |||
recordingList: [ | |||
{ | |||
value: "0", | |||
@@ -289,6 +326,10 @@ export default { | |||
}, | |||
], | |||
options5: [ | |||
{ | |||
value: null, | |||
label: "全部", | |||
}, | |||
{ | |||
value: "1", | |||
label: "已标注", | |||
@@ -297,13 +338,9 @@ export default { | |||
value: "2", | |||
label: "未标注", | |||
}, | |||
{ | |||
value: "3", | |||
label: "全部", | |||
}, | |||
], | |||
currentPage: 1, | |||
size: "", | |||
size: 10, | |||
total: 10, | |||
value: "", | |||
input: "", | |||
@@ -312,19 +349,21 @@ export default { | |||
type: "0", | |||
searchForm: { | |||
name: "", | |||
keywordsId: "", | |||
recording:'', | |||
startWorking: "", | |||
endWorking: "", | |||
keywordsId: [], | |||
recording: "", | |||
markAdvisor: null, | |||
recDurationInterval: "", | |||
visitRecord: "", | |||
staDate: "", | |||
endDate: "", | |||
houseType: "", | |||
dateType: 0, | |||
houseId: "", | |||
agentName: "", | |||
operationalPeople: "", | |||
dateType: "0", | |||
projectId: "", | |||
}, | |||
}; | |||
}, | |||
mounted() { | |||
this.tabtimetap(0) | |||
// 获取楼盘列表 | |||
this.zkhousePage(); | |||
}, | |||
@@ -334,35 +373,59 @@ export default { | |||
let obj = { | |||
current: this.currentPage, | |||
size: this.size, | |||
type: 1, | |||
...this.searchForm, | |||
}; | |||
this.$api.api.findbypage(obj).then((res) => { | |||
// console.log(res) | |||
this.tableData = res.data.records; | |||
this.total = res.data.total; | |||
}); | |||
obj.keywordIds = obj.keywordsId.join(","); | |||
(obj.dateType = this.searchForm.staDate | |||
? null | |||
: this.searchForm.dateType), | |||
this.$api.api.findbypage(obj).then((res) => { | |||
// console.log(res) | |||
this.tableData = res.data.records; | |||
this.total = res.data.total; | |||
}); | |||
}, | |||
clearScreen() { | |||
this.currentPage = 1; | |||
this.searchForm = { | |||
name: "", | |||
keywordsId: [], | |||
recording: "", | |||
markAdvisor: null, | |||
recDurationInterval: "", | |||
visitRecord: "", | |||
staDate: "", | |||
endDate: "", | |||
houseType: "", | |||
dateType: "0", | |||
projectId: this.houseList[0].id, | |||
}; | |||
this.findbypage(); | |||
}, | |||
houseChange() { | |||
this.findbypage(); | |||
this.findKeywords(); | |||
// 获取置业顾问列表 | |||
this.findUserListByHouseId(); | |||
}, | |||
timeChange(e) { | |||
this.searchForm.startWorking = e[0]; | |||
this.searchForm.endWorking = e[1]; | |||
this.searchForm.staDate = e[0]; | |||
this.searchForm.endDate = e[1]; | |||
this.houseChange(); | |||
}, | |||
screen(){ | |||
this.size=1 | |||
screen() { | |||
this.currentPage = 1; | |||
console.log(this.searchForm); | |||
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, | |||
dateType: this.searchForm.staDate ? null : this.searchForm.dateType, | |||
statDateStart: this.searchForm.staDate, | |||
statDateEnd: this.searchForm.endDate, | |||
projectId: this.searchForm.projectId, | |||
type: this.type, | |||
}) | |||
.then((res) => { | |||
@@ -378,13 +441,24 @@ export default { | |||
.then((res) => { | |||
// console.log(res) | |||
this.houseList = res.data; | |||
this.searchForm.houseId = res.data[0].id; | |||
this.searchForm.projectId = res.data[0].id; | |||
// 获取接待记录列表 | |||
this.findbypage(); | |||
// 获取客户意向 | |||
this.findKeywords(); | |||
// 获取置业顾问列表 | |||
this.findUserListByHouseId(); | |||
}); | |||
}, | |||
// 置业顾问列表 | |||
async findUserListByHouseId() { | |||
let result = await this.$api.api.findUserListByHouseId({ | |||
orgType: localStorage.getItem("orgType"), | |||
projectId: this.searchForm.projectId, | |||
}); | |||
console.log(result); | |||
this.accountList = result.data; | |||
}, | |||
handleSizeChange(val) { | |||
console.log(`每页 ${val} 条`); | |||
this.size = val; | |||
@@ -392,11 +466,58 @@ export default { | |||
}, | |||
handleCurrentChange(val) { | |||
console.log(`当前页: ${val}`); | |||
his.currentPage = val; | |||
this.currentPage = val; | |||
this.findbypage(); | |||
}, | |||
tabtimetap(idx) { | |||
this.searchForm.staDate = ""; | |||
this.searchForm.endDate = ""; | |||
// this.$set(this, "time", null); | |||
this.searchForm.dateType = idx; | |||
let num = 24 * 3600 * 1000; | |||
// 获取当前时间戳转换为日期格式 | |||
if (idx == 0) { | |||
num = 24 * 3600 * 1000 * 0; | |||
} | |||
if (idx == 1) { | |||
num = 24 * 3600 * 1000 * 1; | |||
} | |||
if (idx == 2) { | |||
num = 24 * 3600 * 1000 * 7; | |||
} | |||
this.time = [ | |||
this.timestampToTime(new Date().getTime() - num), | |||
this.timestampToTime(new Date().getTime()), | |||
]; | |||
}, | |||
timestampToTime(timestamp) { | |||
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 | |||
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 | |||
var yyyy = date.getFullYear() + "-"; | |||
var MM = | |||
(date.getMonth() + 1 < 10 | |||
? "0" + (date.getMonth() + 1) | |||
: date.getMonth() + 1) + "-"; | |||
// var dd = date.getDate() + ' '; | |||
var dd = | |||
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "; | |||
// var HH = date.getHours() + ':'; | |||
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':'; | |||
// | |||
// // var mm = date.getMinutes() + ':'; | |||
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':'; | |||
// | |||
// // var ss = date.getSeconds(); | |||
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds()); | |||
// return yyyy+MM+dd+HH+mm+ss; | |||
return yyyy + MM + dd; | |||
}, | |||
}, | |||
}; | |||
@@ -426,8 +426,8 @@ | |||
</div> | |||
<div class="right" > | |||
<div v-for="(item,index) in firstList" :key="item.id"> | |||
<div style="display:flex;"> | |||
<div>{{item.name}}</div> | |||
<div style="display:flex; margin:5px;"> | |||
<div style=" line-height: 32px; margin-right: 10px;">{{item.name}}</div> | |||
<el-select v-model="item.cityIds" clearable multiple placeholder="默认为全部" style="width:400px;"> | |||
<el-option | |||
v-for="item1 in item.cityAreaList" | |||
@@ -782,6 +782,7 @@ | |||
}, | |||
// 删除区域 | |||
delArea(idx,flag){ | |||
console.log(flag,idx); | |||
// 第一个删除 | |||
if(flag==0){ | |||
// 先获取删除数组的内容,将其内容放到第三个数组里面 | |||
@@ -796,10 +797,12 @@ | |||
// 删除数组的指定项 | |||
this.firstList.splice(idx,1) | |||
}else{ | |||
let obj=this.thirdList[idx] | |||
let obj=this.fourthList[idx] | |||
this.secondList.push(obj) | |||
// console.log(this.fourthList); | |||
// 删除数组的指定项 | |||
this.thirdList.splice(idx,1) | |||
this.fourthList.splice(idx,1) | |||
// console.log(this.fourthList); | |||
} | |||
}, | |||
// 点击添加时的操作 | |||