Browse Source

init

newStyle
wangxiaohua 3 years ago
parent
commit
b3c5e3377f
5 changed files with 408 additions and 54 deletions
  1. +28
    -0
      src/api/modules/http.js
  2. +6
    -1
      src/router/views/index.js
  3. +14
    -29
      src/views/Customer/index.vue
  4. +22
    -24
      src/views/Template/Pinspeakwords.vue
  5. +338
    -0
      src/views/Template/PinspeakwordsList.vue

+ 28
- 0
src/api/modules/http.js View File

@@ -221,3 +221,31 @@ export function findKeywords(query) {
})
}

//获取销讲词话术列表
export function templatefindByPage(query) {
return request({
url: 'autoSR/template/findByPage',
method:'get',
params:query
})
}


//停,启销讲词模板
export function templatestartOrStop(query) {
return request({
url: 'autoSR/template/startOrStop',
method:'get',
params:query
})
}

//删除讲词模板
export function templatedel(query) {
return request({
url: '/autoSR/template/del',
method:'get',
params:query
})
}


+ 6
- 1
src/router/views/index.js View File

@@ -16,7 +16,12 @@ export default [{
import(/* webpackChunkName: "page" */ '@/views/Statistics/Insightintothedetails'),
name: '洞察详情',
},

{
path: '/Template/Pinspeakwords',
component: () =>
import(/* webpackChunkName: "page" */ '@/views/Template/Pinspeakwords'),
name: '销讲模板',
},


]


+ 14
- 29
src/views/Customer/index.vue View File

@@ -115,7 +115,7 @@
<el-option
v-for="item in keywordsList"
:key="item.keywordsId"
:label="item.name"
:label="item.isInterval==0?item.name+'-'+item.endName+item.unit:item.name"
:value="item.keywordsId"
>
</el-option>
@@ -140,23 +140,7 @@
</el-select>
</div>

<div class="div-lab">
<!-- 默认全部 -->
<div class="label">客户阶段:</div>
<el-select
v-model="searchForm.markAdvisor"
placeholder="请选择"
class="div-inp"
>
<el-option
v-for="item in options5"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>


<div class="div-lab">
<div class="label">接待时长:</div>
@@ -263,24 +247,24 @@
<template slot-scope="{ row }"> {{ row.fraction || "0" }}% </template>
</el-table-column>
<el-table-column
prop="createTime"
prop="updateTime"
label="添加时间"
width="200"
align="center"
>
</el-table-column>
<el-table-column
prop="endAssignedTime"
prop="createTime"
label="最近到访时间"
width="200"
align="center"
>
<template slot-scope="{ row }">
{{ row.endAssignedTime || "暂无" }}
{{ row.createTime || "暂无" }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="250" fixed="right">
<template slot-scope="{ row }">
<template>
<el-button type="text">客户详情</el-button>
<el-button type="text">接待详情</el-button>
<!-- <el-button type="text">更多</el-button> -->
@@ -340,15 +324,15 @@ export default {
},
{
value: "2",
label: "16-30分钟",
label: "15-30分钟",
},
{
value: "3",
label: "31-60分钟",
label: "30-60分钟",
},
{
value: "4",
label: "61-90分钟",
label: "60-90分钟",
},
{
value: "5",
@@ -421,8 +405,7 @@ export default {
};
},
mounted() {
this.tabtimetap(0);
// 获取楼盘列表
// 获取楼盘列表
this.zkhousePage();
},
methods: {
@@ -474,7 +457,6 @@ export default {
},
screen() {
this.currentPage = 1;
console.log(this.searchForm);
this.findbypage();
},
findKeywords() {
@@ -503,9 +485,10 @@ export default {
// 获取接待记录列表
this.findbypage();
// 获取客户意向
this.findKeywords();
// this.findKeywords();
// 获取置业顾问列表
this.findUserListByHouseId();
this.tabtimetap(0);
});
},
// 置业顾问列表
@@ -547,6 +530,8 @@ export default {
this.timestampToTime(new Date().getTime() - num),
this.timestampToTime(new Date().getTime()),
];

this.findKeywords()
},
timestampToTime(timestamp) {
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000


+ 22
- 24
src/views/Template/Pinspeakwords.vue View File

@@ -20,7 +20,7 @@
</div>
<input ref="input" style="display:none" value='${tempId}' />

<el-tree ref="tree"
<!-- <el-tree ref="tree"
:data="treeList"
:default-checked-keys="defaultCheck" show-checkbox node-key="id"
default-expand-all :check-on-click-node="true" :expand-on-click-node="false"
@@ -41,7 +41,7 @@
<el-button v-if="data.sign!==1" type="text" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</el-button>
</span>
</span>
</el-tree>
</el-tree> -->
<div class="update-btn">
<el-button type="primary" size="mini" @click="getCheckedNode">获取选中节点</el-button>
</div>
@@ -78,7 +78,7 @@
</div>

<!-- 评分 -->
<div class="content-right">
<!-- <div class="content-right">
<el-row>
<el-col :span="20">
(提示:拖拽大类可以排序)
@@ -126,7 +126,7 @@
</div>
</div>
</div>
</draggable>
</draggable> -->

<!-- <div style="display: flex;align-items: center;margin-top:30px;" v-if="">
<el-button type="primary" size="mini" @click="cancel">取消</el-button>
@@ -197,9 +197,11 @@ export default {
this.sortMap = new Map();
},
mounted() {
var isnull=this.$route.query.flag;
console.log(isnull);
// this.setInitCheck()
// //获取楼盘
// this.getHouse()
//获取楼盘
this.getHouse()

},
computed: {
@@ -220,24 +222,20 @@ export default {
},
// 获取楼盘下拉的数据
getHouse() {
axios({
url: `${jypath}/template/getHouse`,
method: "get",
params: {},
}).then((res) => {
if (res.data.res === 1) {
this.houseList = res.data.obj.map((item) => {
return {
value: item.id,
label: item.propertyName,
};
});
if (this.houseId == "") {
this.houseId = this.houseList[0].value;
}
this.getTreeData();
}
});
this.$api.api.findHouseByUser().then((res) => {
if (res.data.res == 1) {
this.houseList = res.data.obj.map((item) => {
return {
value: item.id,
label: item.propertyName,
};
});
if (this.houseId == "") {
this.houseId = this.houseList[0].value;
}
// this.getTreeData();
}
})
},
// 获取楼盘下拉的数据
getHouse2() {


+ 338
- 0
src/views/Template/PinspeakwordsList.vue View File

@@ -0,0 +1,338 @@
<template>

<div class="box-center">
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-top: 5px">
<div class="label">楼盘:</div>
<div>
<el-select
v-model="projectId"
@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 class="label">状态:</div>
<div>
<el-select
v-model="statetest"
placeholder="请选择"
>
<el-option
v-for="item in stateList"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 20px">
<el-button style="background: #2671e2; color: #ffffff" @click="Screening()">筛选</el-button>
</div>
<div style="margin-left: 20px">
<el-button @click="editorinfo()" style="background: #2671e2; color: #ffffff"
>添加模板</el-button
>
</div>
</div>
</div>

<!-- 表格 -->
<div class="cen-tab">
<el-table
:data="tableData"
stripe
height="500"
style="width: 100%">
<el-table-column
prop="houseName"
label="楼盘名称"
align="center"
>
</el-table-column>
<el-table-column
prop="name"
label="状态"
align="center"
>
<template slot-scope="scope">
<p v-if="scope.row.status==1">停用</p>
<p v-if="scope.row.status==0">启用</p>
</template>
</el-table-column>
<el-table-column
prop="count"
label="大类个数"
align="center">
</el-table-column>

<el-table-column
prop="createTime"
label="创建时间"
align="center"
>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.status==1" @click="clickstateis(scope.row)">启用</el-button>
<el-button v-if="scope.row.status==0" @click="clickstateno(scope.row)">停用</el-button>
<el-button @click="clickbianji(scope.row)">编辑</el-button>
<el-button @click="templatedel(scope.row)">删除</el-button>
</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="[8, 16, 24, 32]"
:page-size="4"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</div>
</div>
</template>

<script>
export default {
data() {
return {
tableData: [],
currentPage4:1,
total:0,//总条数
pageNum:1,
pageSize:8,
houseList:[],
projectId:"",
stateList:[
{label:'请选择',value:''},
{label:'停用',value:'1'},
{label:'启用',value:'0'},
],
statetest:'',
};
},
mounted() {
this.zkhousePage()
},
methods: {
//停用
clickstateno(item){
this.$confirm('此操作将停用此模板, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.http.templatestartOrStop({
id:item.id,
status:1
}).then((res) => {
console.log(res);
if(res.code==0){
this.$message({
type: 'success',
message: '停用成功!'
});
this.getcompanyList()
}else{
this.$message({
type: 'info',
message: res.msg
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
//启用
clickstateis(item){
this.$confirm('此操作将启用此模板, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.http.templatestartOrStop({
id:item.id,
status:0
}).then((res) => {
console.log(res);
if(res.code==0){
this.$message({
type: 'success',
message: '启用成功!'
});
this.getcompanyList()
}else{
this.$message({
type: 'info',
message: res.msg
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
//筛选
Screening(){
this.pageNum=1;
this.getcompanyList()
},
//获取楼盘
 zkhousePage() {
this.$api.api.findHouseByUser().then((res) => {
this.houseList = res.data;
this.projectId = res.data[0].id;
this.getcompanyList()
});
    },
//切换楼盘
houseChange(){
this.pageNum=1;
this.getcompanyList()
},
// 获取列表
getcompanyList() {
this.tableData=[];
let parmest={
current: this.pageNum,
size: this.pageSize,
houseId:this.projectId,
status:this.statetest
}
this.$api.http.templatefindByPage(parmest).then((res) => {
this.tableData=res.data.records;
this.total=res.data.total
});
},
//templatedel删除模板
templatedel(item){
this.$confirm('此操作将删除此模板, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.http.templatedel({
id:item.id,
}).then((res) => {
console.log(res);
if(res.code==0){
this.$message({
type: 'success',
message: '删除成功!'
});
this.getcompanyList()
}else{
this.$message({
type: 'info',
message: res.msg
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
handleSizeChange(val) {
this.pageSize=val;
this.getcompanyList()
},
handleCurrentChange(val) {
this.pageNum=val;
this.getcompanyList()
},


//編輯
clickbianji(row){
let Userrecord={
id:row.id,
houseId:this.projectId,
}
this.$router.push({ path: "/Template/Pinspeakwords", query: { flag: Userrecord } });
},
//添加
editor(){

},

},
};
</script>

<style scoped="scoped" lang="scss" >
.box-center {
width: 100%;
padding: 15px;
min-width: 1200px;
padding-bottom: 40px;
}
.cen-tab{
width: 100%;
padding: 15px;
background: #FFFFFF;
margin-top: 15px;
}
.tophove {
color: #ffffff;
background: #2671e2;
}
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
.app-titel {
width: 100%;
display: flex;
align-items: center;
.label {
font-size: 14px;
font-weight: 400;
color: #32363d;
line-height: 14px;
margin-left: 15px;
}
.toptimeqhuan {
height: 30px;
background: #ffffff;
display: flex;
align-items: center;
}
.toptimeqhuan div {
padding-left: 20px;
padding-right: 20px;
text-align: center;
line-height: 30px;
font-size: 14px;
margin-right: 15px;
border-radius: 4px;
border: 1px solid #e0e0e0;
}
}
}
</style>

Loading…
Cancel
Save