Auteur | SHA1 | Message | Date |
---|---|---|---|
corala | 77a49b93e8 | 接待记录 | il y a 1 an |
douzhuo | d9d05e7646 | Merge branch 'master' into dmb | il y a 1 an |
douzhuo | ae182bc9db | 提交 | il y a 1 an |
douzhuo | 7d677e3c8d | 提交 | il y a 1 an |
douzhuo | 3b323de6e3 | Merge branch 'master' into dmb | il y a 1 an |
douzhuo | 08ab57cb1f | 提交修改 | il y a 1 an |
@@ -911,4 +911,25 @@ export function updateRead(params) { | |||
method: 'get', | |||
params | |||
}) | |||
} | |||
} | |||
// 获取销讲业务模板 | |||
export function marketingBusiness(params) { | |||
return request({ | |||
url: 'autoSR/api/customer/marketingBusiness', | |||
method: 'get', | |||
params | |||
}) | |||
} | |||
// 检测销讲模板名称是否重复 | |||
export function findByRepetitionName(params) { | |||
return request({ | |||
url: 'autoSR/template/findByRepetitionName', | |||
method: 'get', | |||
params | |||
}) | |||
} | |||
@@ -22,13 +22,13 @@ | |||
</div> | |||
<div class="div-labox"> | |||
<div class="labeltext" style="margin-left: 15px;"> | |||
<div class="labeltext" style="margin-left: 15px"> | |||
<!-- 时间: --> | |||
<el-select | |||
v-model="searchForm.timeType" | |||
@change="houseChange" | |||
placeholder="请选择" | |||
style="width: 125px;" | |||
style="width: 125px" | |||
> | |||
<el-option | |||
v-for="item in timeTypeList" | |||
@@ -243,6 +243,26 @@ | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="div-labox"> | |||
<div class="labeltext">销讲业务:</div> | |||
<el-select | |||
v-model="searchForm.marketingBusiness" | |||
multiple | |||
clearable | |||
filterable | |||
collapse-tags | |||
placeholder="请选择" | |||
class="div-inpbox" | |||
> | |||
<el-option | |||
v-for="item in templateList" | |||
:key="item.id" | |||
:label="item.templateName" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
</div> | |||
<div class="app-topbox"> | |||
<div class="div-labox"> | |||
@@ -250,23 +270,33 @@ | |||
<el-button type="primary" @click="screen">筛选</el-button> | |||
<el-button @click="clearScreen" type="text">清空筛选条件</el-button> | |||
<el-button style="margin-left:10px;" @click="isSystoleForm" type="text">{{isOpen?'收起':'展开'}}<i style="margin-left:5px;" :class="isOpen?'el-icon-arrow-up':'el-icon-arrow-down'"></i></el-button> | |||
<el-button | |||
style="margin-left: 10px" | |||
@click="isSystoleForm" | |||
type="text" | |||
>{{ isOpen ? "收起" : "展开" | |||
}}<i | |||
style="margin-left: 5px" | |||
:class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" | |||
></i | |||
></el-button> | |||
</div> | |||
<div style="margin-left: auto; margin-right: 10px"> | |||
<el-button :disabled="isBand" type="primary" @click="transfer" | |||
>批量转交</el-button | |||
> | |||
<el-button v-if="cus_index_downLoad" @click="downLoad" icon="el-icon-download">导出</el-button> | |||
<el-button | |||
v-if="cus_index_downLoad" | |||
@click="downLoad" | |||
icon="el-icon-download" | |||
>导出</el-button | |||
> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<avue-crud | |||
ref="crud" | |||
:page.sync="page" | |||
@@ -279,27 +309,34 @@ | |||
@selection-change="handleSelectionChange" | |||
> | |||
<template slot-scope="{ row }" slot="menu"> | |||
<el-button @click="toCustomer" type="text" v-if="cus_index_detail">客户详情</el-button> | |||
<el-button | |||
type="text" | |||
@click="Receivedetailsabout(row)" | |||
v-if="cus_index_visit" | |||
>接待详情</el-button | |||
> | |||
<el-button type="text" @click="tranfser(row)" v-if="cus_index_take" | |||
>转交</el-button | |||
> | |||
<el-button @click="toCustomer" type="text" v-if="cus_index_detail" | |||
>客户详情</el-button | |||
> | |||
<el-button | |||
type="text" | |||
@click="Receivedetailsabout(row)" | |||
v-if="cus_index_visit" | |||
>接待详情</el-button | |||
> | |||
<el-button type="text" @click="tranfser(row)" v-if="cus_index_take" | |||
>转交</el-button | |||
> | |||
</template> | |||
</avue-crud> | |||
</div> | |||
<!-- 提示转义客户 --> | |||
<el-dialog title="客户流转" :visible.sync="dialogVisible" width="30%" :center="true"> | |||
<el-dialog | |||
title="客户流转" | |||
:visible.sync="dialogVisible" | |||
width="30%" | |||
:center="true" | |||
> | |||
<div> | |||
<span>员工:</span> | |||
<el-select | |||
v-model="agentId" | |||
style="width:86%" | |||
style="width: 86%" | |||
clearable | |||
filterable | |||
placeholder="请选择" | |||
@@ -314,7 +351,16 @@ | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<span slot="footer" class="dialog-footer" style="border-top:1px solid #eee;padding-top: 20px;display: flex;justify-content: end;"> | |||
<span | |||
slot="footer" | |||
class="dialog-footer" | |||
style=" | |||
border-top: 1px solid #eee; | |||
padding-top: 20px; | |||
display: flex; | |||
justify-content: end; | |||
" | |||
> | |||
<el-button | |||
@click=" | |||
dialogVisible = false; | |||
@@ -334,7 +380,6 @@ import { exportMethodPost } from "@/util/util"; | |||
export default { | |||
data() { | |||
return { | |||
tableIdName: "CustomerIndex", // 当前页面需要的变量 | |||
tableOption: this.$tableOption.CustomerIndex, // 当前table配置项 | |||
tableLoading: false, // 是否显示加载中 | |||
@@ -345,8 +390,7 @@ export default { | |||
pageSize: 10, // 每页显示多少条 | |||
}, | |||
isOpen:false, | |||
isOpen: false, | |||
TimetoAhoose: 2, | |||
time: [], | |||
houseList: [], | |||
@@ -490,6 +534,7 @@ export default { | |||
clientStage: "", | |||
orderBy: "", | |||
sensitiveWords: [], | |||
marketingBusiness: [], | |||
}, | |||
clientStagelist: [], | |||
sensitiveList: [], //违禁词 | |||
@@ -499,6 +544,8 @@ export default { | |||
isBand: true, // 批量转交按钮状态 | |||
selectMoreIds: "", // 多选客户id | |||
agentId: "", // 移交员工的id | |||
templateList: [], // 销讲业务列表 | |||
}; | |||
}, | |||
computed: { | |||
@@ -528,7 +575,18 @@ export default { | |||
this.zkhousePage(); | |||
}, | |||
methods: { | |||
// 获取销讲业务 | |||
getMarketingBusiness() { | |||
this.$api.http | |||
.marketingBusiness({ houseId: this.searchForm.projectId }) | |||
.then((res) => { | |||
console.log(res); | |||
if (res.code == 10000) { | |||
this.templateList = res.data; | |||
} | |||
}); | |||
}, | |||
// 获取当前页面的显隐 | |||
setTableOption() { | |||
this.$db.getDataByKey(this.tableIdName).then((res) => { | |||
@@ -537,11 +595,11 @@ export default { | |||
} | |||
}); | |||
}, | |||
isSystoleForm(){ | |||
this.isOpen = !this.isOpen | |||
isSystoleForm() { | |||
this.isOpen = !this.isOpen; | |||
}, | |||
toCustomer() { | |||
this.$router.push('/Customer/CustomerDetail') | |||
this.$router.push("/Customer/CustomerDetail"); | |||
}, | |||
// 批量转交按钮点击事件 | |||
transfer() { | |||
@@ -561,12 +619,12 @@ export default { | |||
tranfser(row) { | |||
console.log(row); | |||
this.dialogVisible = true; | |||
this.selectMoreIds = row.id; | |||
this.selectMoreIds = row.id; | |||
}, | |||
// 转移客户至其他顾问 | |||
theCirculation(query) { | |||
console.log(query) | |||
console.log(query); | |||
this.$api.http.theCirculation(query).then((res) => { | |||
if (res.code == 0) { | |||
this.$message({ | |||
@@ -632,8 +690,9 @@ export default { | |||
size: this.page.pageSize, | |||
...this.searchForm, | |||
}; | |||
obj.marketingBusiness = obj.marketingBusiness.join(',') | |||
obj.keywordIds = obj.keywordsId.join(","); | |||
console.log(obj, '入参') | |||
console.log(obj, "入参"); | |||
obj.sensitiveWords = JSON.stringify(obj.sensitiveWords); | |||
(obj.dateType = this.searchForm.staDate | |||
? null | |||
@@ -642,7 +701,7 @@ export default { | |||
// console.log(res) | |||
this.tableData = res.data.records; | |||
this.page.total = res.data.total; | |||
// 表格中设置ref属性,在数据渲染之后或者updated()之后 | |||
this.$nextTick(() => { | |||
this.$refs.crud.doLayout(); | |||
@@ -662,6 +721,7 @@ export default { | |||
endDate: "", | |||
dateType: null, | |||
searchForm: "", | |||
marketingBusiness: [], | |||
timeType: "0", | |||
orderBy: "", | |||
sensitiveWords: [], | |||
@@ -675,6 +735,9 @@ export default { | |||
houseChange() { | |||
this.searchForm.sensitiveWords = []; | |||
this.searchForm.keywordsId = []; | |||
this.searchForm.marketingBusiness = []; | |||
// 获取销讲业务 | |||
this.getMarketingBusiness(); | |||
this.findbypage(); | |||
this.findKeywords(); | |||
// 获取置业顾问列表 | |||
@@ -738,6 +801,9 @@ export default { | |||
this.searchForm.projectId = res.data[0].id; | |||
} | |||
this.houseChange(); | |||
// 获取销讲业务 | |||
this.getMarketingBusiness(); | |||
}); | |||
}, | |||
// 置业顾问列表 | |||
@@ -854,27 +920,27 @@ export default { | |||
color: #ffffff; | |||
background: #2671e2; | |||
} | |||
/deep/ .el-table__header-wrapper{ | |||
thead{ | |||
tr{ | |||
th{ | |||
background: #F5F7FA; | |||
/deep/ .el-table__header-wrapper { | |||
thead { | |||
tr { | |||
th { | |||
background: #f5f7fa; | |||
color: #333333; | |||
} | |||
} | |||
} | |||
} | |||
/deep/ .el-dialog--center{ | |||
/deep/ .el-dialog--center { | |||
border-radius: 8px; | |||
.el-dialog__title{ | |||
.el-dialog__title { | |||
font-weight: bold; | |||
} | |||
} | |||
/deep/ .el-button--primary{ | |||
background: #2671E2 !important; | |||
border: 1px solid #2671E2 !important; | |||
/deep/ .el-button--primary { | |||
background: #2671e2 !important; | |||
border: 1px solid #2671e2 !important; | |||
} | |||
/deep/ .el-button--text{ | |||
color: #2671E2; | |||
/deep/ .el-button--text { | |||
color: #2671e2; | |||
} | |||
</style> |
@@ -284,6 +284,11 @@ export default { | |||
prop: "mm", | |||
width: '100px', | |||
}, | |||
{ | |||
label: "销讲业务", | |||
prop: "marketingBusinessName", | |||
width: '100px', | |||
}, | |||
{ | |||
sortable: true, | |||
label: "销讲执行率", | |||
@@ -238,22 +238,32 @@ | |||
</div> | |||
<div class="div-lab"> | |||
<div class="label">销讲执行:</div> | |||
<el-select v-model="searchForm.fraction" class="div-inp" clearable filterable placeholder="请选择"> | |||
<el-option label="全部" value=""></el-option> | |||
<el-option label="30%及以下" :value="1"></el-option> | |||
<el-option label="31%~50%" :value="2"></el-option> | |||
<el-option label="51%~70%" :value="3"></el-option> | |||
<el-option label="71%及以上" :value="4"></el-option> | |||
<el-select | |||
v-model="searchForm.fraction" | |||
class="div-inp" | |||
clearable | |||
filterable | |||
placeholder="请选择" | |||
> | |||
<el-option label="30%及以下" :value="1"></el-option> | |||
<el-option label="31%~50%" :value="2"></el-option> | |||
<el-option label="51%~70%" :value="3"></el-option> | |||
<el-option label="71%及以上" :value="4"></el-option> | |||
</el-select> | |||
</div> | |||
<div class="div-lab"> | |||
<div class="label">需求挖掘:</div> | |||
<el-select v-model="searchForm.wordFraction" class="div-inp" clearable filterable placeholder="请选择"> | |||
<el-option label="全部" value=""></el-option> | |||
<el-option label="30%及以下" :value="1"></el-option> | |||
<el-option label="31%~50%" :value="2"></el-option> | |||
<el-option label="51%~70%" :value="3"></el-option> | |||
<el-option label="71%及以上" :value="4"></el-option> | |||
<el-select | |||
v-model="searchForm.wordFraction" | |||
class="div-inp" | |||
clearable | |||
filterable | |||
placeholder="请选择" | |||
> | |||
<el-option label="30%及以下" :value="1"></el-option> | |||
<el-option label="31%~50%" :value="2"></el-option> | |||
<el-option label="51%~70%" :value="3"></el-option> | |||
<el-option label="71%及以上" :value="4"></el-option> | |||
</el-select> | |||
</div> | |||
<div class="div-lab"> | |||
@@ -290,42 +300,51 @@ | |||
></el-option> | |||
</el-select> | |||
</div> | |||
<!-- <div class="div-lab"> | |||
<div class="div-lab"> | |||
<div class="label">销讲业务:</div> | |||
<el-select v-model="searchForm.marketingBusiness" class="div-inp" clearable placeholder="请选择"> | |||
<el-option | |||
v-for="item in xiaojianglist" | |||
:key="item.id" | |||
:label="item.templateName" | |||
:value="item.id"> | |||
</el-option> | |||
<el-select | |||
class="div-inp" | |||
v-model="searchForm.marketingBusiness" | |||
multiple | |||
clearable | |||
filterable | |||
collapse-tags | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in templateList" | |||
:key="item.id" | |||
:label="item.templateName" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> --> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div style="margin-left: 110px"> | |||
<el-button type="primary" @click="screen">筛选</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="clearScreen" type="text">清空筛选条件</el-button> | |||
</div> | |||
<el-button style="margin-left: 10px" @click="isSystoleForm" type="text" | |||
>{{ isOpen ? "收起" : "展开" | |||
}}<i | |||
style="margin-left: 5px" | |||
:class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" | |||
></i | |||
></el-button> | |||
</div> | |||
<div | |||
style="margin-left: auto; margin-right: 10px" | |||
v-if="rec_index_downLoad" | |||
> | |||
<el-button @click="downLoad" icon="el-icon-download"> 导出</el-button> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div style="margin-left: 110px"> | |||
<el-button type="primary" @click="screen">筛选</el-button> | |||
</div> | |||
<div style="margin-left: 20px"> | |||
<el-button @click="clearScreen" type="text">清空筛选条件</el-button> | |||
</div> | |||
<el-button style="margin-left: 10px" @click="isSystoleForm" type="text" | |||
>{{ isOpen ? "收起" : "展开" | |||
}}<i | |||
style="margin-left: 5px" | |||
:class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" | |||
></i | |||
></el-button> | |||
<div | |||
style="margin-left: auto; margin-right: 10px" | |||
v-if="rec_index_downLoad" | |||
> | |||
<el-button @click="downLoad" icon="el-icon-download"> 导出</el-button> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
@@ -356,26 +375,43 @@ | |||
</avue-crud> | |||
</div> | |||
<el-dialog | |||
title="重新转写" | |||
center | |||
:visible.sync="dialogVisible" | |||
width="50%"> | |||
<div style="text-align: center;font-size: 16px" v-if="show">请等待录音合并之后再重新转写!</div> | |||
<el-form :model="form" v-else> | |||
<el-form-item label="转写方式" :label-width="80"> | |||
<el-select v-model="form.project" placeholder="请选择" @change="changeFun"> | |||
<el-option v-for="(item,index) in projectList" :label="item.name" :key="index" :value="item.code"></el-option> | |||
</el-select> | |||
<el-select v-model="form.language" placeholder="请选择"> | |||
<el-option v-for="(item,index) in languageList" :label="item.name" :key="index" :value="item.code"></el-option> | |||
</el-select> | |||
</el-form-item> | |||
<div style="color: red;margin-left: 60px">提示:重新转写需要10分钟左右才能完成!</div> | |||
</el-form> | |||
<span slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="checkFun">确 定</el-button> | |||
</span> | |||
title="重新转写" | |||
center | |||
:visible.sync="dialogVisible" | |||
width="50%" | |||
> | |||
<!-- <div style="text-align: center;font-size: 16px" v-if="mergeflag">请等待录音合并之后再重新转写!</div> --> | |||
<el-form :model="form"> | |||
<el-form-item label="转写方式" :label-width="80"> | |||
<el-select | |||
v-model="form.project" | |||
placeholder="请选择" | |||
@change="changeFun" | |||
> | |||
<el-option | |||
v-for="(item, index) in projectList" | |||
:label="item.name" | |||
:key="index" | |||
:value="item.code" | |||
></el-option> | |||
</el-select> | |||
<el-select v-model="form.language" placeholder="请选择"> | |||
<el-option | |||
v-for="(item, index) in languageList" | |||
:label="item.name" | |||
:key="index" | |||
:value="item.code" | |||
></el-option> | |||
</el-select> | |||
</el-form-item> | |||
<div style="color: red; margin-left: 60px"> | |||
提示:重新转写需要10分钟左右才能完成! | |||
</div> | |||
</el-form> | |||
<span slot="footer" class="dialog-footer"> | |||
<el-button @click="dialogVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="checkFun">确 定</el-button> | |||
</span> | |||
</el-dialog> | |||
</div> | |||
</template> | |||
@@ -386,17 +422,17 @@ import { exportMethodPost } from "@/util/util"; | |||
export default { | |||
data() { | |||
return { | |||
questionList: [],//挖掘话术 | |||
questionList: [], //挖掘话术 | |||
marketingInvalidList: [], // 无效接待原因列表 | |||
xiaojianglist: [], //销讲业务 | |||
desc: '请等待录音合并之后再重新转写!', | |||
desc: "请等待录音合并之后再重新转写!", | |||
dialogVisible: false, | |||
projectList: [], | |||
languageList: [], | |||
form: { | |||
language: '', | |||
project:'' | |||
},//重新转写 | |||
language: "", | |||
project: "", | |||
}, //重新转写 | |||
tableIdName: "ReceivingRecordsIndex", // 当前页面需要的变量 | |||
tableOption: this.$tableOption.ReceivingRecordsIndex, // 当前table配置项 | |||
tableLoading: false, // 是否显示加载中 | |||
@@ -528,17 +564,18 @@ export default { | |||
taboo: "", | |||
zfal: "", // 正反案例 0:正面案例 1:反面案例 | |||
validInvalid: "", // 是否为有效接待 0:有效 1:无效 | |||
marketingBusiness: '', | |||
invalidReason: '', | |||
question: '', | |||
wordFraction: '', | |||
fraction: '', | |||
marketingBusiness: [], | |||
invalidReason: "", | |||
question: "", | |||
wordFraction: "", | |||
fraction: "", | |||
}, | |||
rec_index_show: false, // 按钮权限 | |||
rec_rewrite_show: false, // 按钮权限 | |||
rec_rewrite_show: false, // 重新转写-按钮权限 | |||
rec_index_text: false, // 按钮权限 | |||
rec_index_voice: false, // 按钮权限 | |||
rec_index_downLoad: false, // 按钮权限 | |||
templateList: [], // 销讲业务列表 | |||
}; | |||
}, | |||
computed: { | |||
@@ -658,90 +695,97 @@ export default { | |||
mounted() { | |||
// 获取项目列表 | |||
this.zkhousePage(); | |||
this.findQuestionList() | |||
}, | |||
methods: { | |||
// 获取话术 | |||
findQuestionList() { | |||
axios({ | |||
url: `/autoSR/zk/keywords/findQuestionList`, | |||
method: 'get', | |||
params: { | |||
houseId: this.searchForm.projectId | |||
} | |||
}).then(data => { | |||
if (data.code == 0) { | |||
this.questionList = data.data; | |||
this.questionList.length = 20 | |||
} | |||
}) | |||
}, | |||
findQuestionList() { | |||
axios({ | |||
url: `/autoSR/zk/keywords/findQuestionList`, | |||
method: "get", | |||
params: { | |||
houseId: this.searchForm.projectId, | |||
}, | |||
}).then((data) => { | |||
if (data.code == 0) { | |||
this.questionList = data.data; | |||
} | |||
}); | |||
}, | |||
// 无效接待原因列表 | |||
getMarketingInvalidList () { | |||
this.$api.api.invalidList({houseId: this.houseId}).then((res) => { | |||
console.log(res); | |||
if(res.data&&res.data.obj){ | |||
this.marketingInvalidList = res.data.obj | |||
}else{ | |||
this.marketingInvalidList = [] | |||
getMarketingInvalidList() { | |||
this.$api.api.invalidList({ houseId: this.houseId }).then((res) => { | |||
if (res.data && res.data.obj) { | |||
this.marketingInvalidList = res.data.obj; | |||
} else { | |||
this.marketingInvalidList = []; | |||
} | |||
}); | |||
}, | |||
// 转写方式切换 | |||
changeFun(value){ | |||
changeFun(value) { | |||
// console.log(value) | |||
this.form.language = '' | |||
this.projectList.forEach(item=>{ | |||
if(item.code==value){ | |||
this.languageList = item.list | |||
this.form.language = this.languageList[0].code | |||
} | |||
}) | |||
this.form.language = ""; | |||
this.projectList.forEach((item) => { | |||
if (item.code == value) { | |||
this.languageList = item.list; | |||
this.form.language = this.languageList[0].code; | |||
} | |||
}); | |||
}, | |||
// 转写方式数据获取 | |||
findTransferMethod(){ | |||
this.$api.api.findTransferMethod().then((res) => { | |||
console.log(res); | |||
if(res.data&&res.data.obj){ | |||
this.projectList = res.data.data||[] | |||
this.languageList = res.data.data&&res.data.data[0].list||[] | |||
findTransferMethod() { | |||
this.$api.api.findTransferMethod().then((res) => { | |||
if (res.data && res.data.obj) { | |||
this.projectList = res.data.data || []; | |||
this.languageList = (res.data.data && res.data.data[0].list) || []; | |||
} | |||
}); | |||
}, | |||
// 确定重新转写 | |||
checkFun(){ | |||
if(this.form.project===''||this.form.language===''){ | |||
this.$message.error('请先选择转写方式') | |||
return; | |||
checkFun() { | |||
if (this.form.project === "" || this.form.language === "") { | |||
this.$message.error("请先选择转写方式"); | |||
return; | |||
} | |||
this.$api.api.toTransferData({ | |||
id:this.currentRow.id, | |||
transferMethod:this.form.project, | |||
transferLanguage: this.form.language | |||
}).then((res) => { | |||
console.log(res); | |||
this.dialogVisible = false | |||
this.getorgCode() | |||
this.$message.success('操作成功') | |||
}); | |||
this.$api.api | |||
.toTransferData({ | |||
id: this.currentRow.id, | |||
transferMethod: this.form.project, | |||
transferLanguage: this.form.language, | |||
}) | |||
.then((res) => { | |||
this.dialogVisible = false; | |||
this.getorgCode(); | |||
this.$message.success("操作成功"); | |||
}); | |||
}, | |||
reWriteagain(row){ | |||
this.dialogVisible = true | |||
this.currentRow = row; | |||
// mergeFlag; //是否合并 0是 1 否 | |||
// this.title = row.mergeFlag==1?'提醒':'重新转写'; | |||
this.form.project = row.transferMethod||''; | |||
if(row.transferLanguage){ | |||
this.projectList.forEach(item=>{ | |||
if(item.code==row.transferLanguage){ | |||
this.languageList = item.list | |||
this.form.language = row.transferLanguage||'' | |||
} | |||
}) | |||
}else{ | |||
this.form.language='' | |||
} | |||
reWriteagain(row) { | |||
this.dialogVisible = true; | |||
this.currentRow = row; | |||
// mergeFlag; //是否合并 0是 1 否 | |||
this.form.project = row.transferMethod || ""; | |||
if (row.transferLanguage) { | |||
this.projectList.forEach((item) => { | |||
if (item.code == row.transferLanguage) { | |||
this.languageList = item.list; | |||
this.form.language = row.transferLanguage || ""; | |||
} | |||
}); | |||
} else { | |||
this.form.language = ""; | |||
} | |||
}, | |||
// 获取销讲业务 | |||
getMarketingBusiness() { | |||
this.$api.http | |||
.marketingBusiness({ houseId: this.searchForm.projectId }) | |||
.then((res) => { | |||
console.log(res); | |||
if (res.code == 10000) { | |||
this.templateList = res.data; | |||
} | |||
}); | |||
}, | |||
// 获取当前页面的显隐 | |||
setTableOption() { | |||
@@ -804,10 +848,11 @@ export default { | |||
obj.projectId = this.$route.query.houseId; | |||
} | |||
obj.keywordIds = obj.keywordsId.join(","); | |||
obj.marketingBusiness = obj.marketingBusiness.join(","); | |||
obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType; | |||
this.$api.api.findbypage(obj).then((res) => { | |||
// console.log(res); | |||
if(res.code==0){ | |||
if (res.code == 0) { | |||
this.tableData = res.data.records; | |||
this.page.total = res.data.total; | |||
// 表格中设置ref属性,在数据渲染之后或者updated()之后 | |||
@@ -831,8 +876,11 @@ export default { | |||
houseType: "", | |||
dateType: null, | |||
taboo: "", | |||
question: "", | |||
fraction: "", | |||
wordFraction: "", | |||
marketingBusiness: [], | |||
zfal: "", | |||
// projectId: this.houseList[0].id, | |||
projectId: | |||
this.orgType == 3 | |||
? localStorage.getItem("houseId") | |||
@@ -846,6 +894,8 @@ export default { | |||
houseChange() { | |||
this.findbypage(); | |||
this.findKeywords(); | |||
this.findQuestionList(); | |||
// this.getMarketingBusiness();// 销讲业务 | |||
// 获取置业顾问列表 | |||
this.findUserListByHouseId(); | |||
}, | |||
@@ -898,6 +948,9 @@ export default { | |||
this.searchForm.projectId = res.data[0].id; | |||
} | |||
this.houseChange(); | |||
// 获取销讲业务 | |||
// this.getMarketingBusiness(); | |||
}); | |||
}, | |||
// 置业顾问列表 | |||
@@ -958,7 +1011,6 @@ export default { | |||
} | |||
}, | |||
showColumn(nowV) { | |||
let params = { | |||
tableIdName: this.tableIdName, | |||
@@ -970,7 +1022,7 @@ export default { | |||
}; | |||
</script> | |||
<style scoped="scoped" lang="scss" > | |||
<style scoped="scoped" lang="scss"> | |||
.box-center { | |||
width: 100%; | |||
padding: 5px 15px 40px; | |||
@@ -106,10 +106,16 @@ export default { | |||
} | |||
}, | |||
{ | |||
label: "销讲业务", | |||
prop: "marketingBusinessName", | |||
}, | |||
{ | |||
sortable: true, | |||
label: "画像标签触达次数", | |||
prop: "total", | |||
width: '150px', | |||
}, | |||
{ | |||
@@ -4,126 +4,304 @@ | |||
<div class="content-left"> | |||
<div v-if="orgType != 3"> | |||
<span style="color: red">*</span> 项目选择: | |||
<el-select v-model="houseId" size="mini" @change="selectChange" clearable :disabled="disabledcet" | |||
placeholder="请选择"> | |||
<el-option v-for="item in houseList" :key="item.value" :label="item.label" :value="item.value"> | |||
<el-select | |||
v-model="houseId" | |||
size="mini" | |||
@change="selectChange" | |||
clearable | |||
:disabled="disabledcet" | |||
placeholder="请选择" | |||
> | |||
<el-option | |||
v-for="item in houseList" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
> | |||
</el-option> | |||
</el-select> | |||
</div> | |||
<div class="select" style="display: flex;margin-top: 40px;"> | |||
<div style="font-size:18px;font-weight: bold;">添加模板</div> | |||
<div class="select" style="display: flex; margin-top: 40px"> | |||
<div style="font-size: 18px; font-weight: bold">添加模板</div> | |||
<el-row> | |||
<el-col :offset="18" :span="6"> | |||
<el-button size="mini" type="primary" @click="addBigNode">添加大类</el-button> | |||
<el-button size="mini" type="primary" @click="addBigNode" | |||
>添加大类</el-button | |||
> | |||
</el-col> | |||
</el-row> | |||
</div> | |||
<input ref="input" style="display:none" value='${tempId}' /> | |||
<input ref="input" style="display: none" value="${tempId}" /> | |||
<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" draggable :allow-drop="allowDrop" | |||
:allow-drag="allowDrag" @node-drop="Peerdrag"> | |||
<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" | |||
draggable | |||
:allow-drop="allowDrop" | |||
:allow-drag="allowDrag" | |||
@node-drop="Peerdrag" | |||
> | |||
<span class="custom-tree-node" slot-scope="{ node, data }"> | |||
<span> <b v-if="data.sign == 0 && data.houseId == null" style="color: red">*</b> {{ node.label }}</span> | |||
<span> | |||
<el-button style="color:red;" v-if="node.level == 1" type="text" size="mini" | |||
@click.stop="() => append(node, data)">添加子类</el-button> | |||
<b | |||
v-if="data.sign == 0 && data.houseId == null" | |||
style="color: red" | |||
>*</b | |||
> | |||
{{ node.label }}</span | |||
> | |||
<span> | |||
<el-button | |||
style="color: red" | |||
v-if="node.level == 1" | |||
type="text" | |||
size="mini" | |||
@click.stop="() => append(node, data)" | |||
>添加子类</el-button | |||
> | |||
<span v-if="data.houseId != null"> | |||
<el-button v-if="node.level == 2" type="text" size="mini" @click.stop="() => append1(node, data)"> 添加子类 | |||
<el-button | |||
v-if="node.level == 2" | |||
type="text" | |||
size="mini" | |||
@click.stop="() => append1(node, data)" | |||
> | |||
添加子类 | |||
</el-button> | |||
<el-button | |||
type="text" | |||
size="mini" | |||
@click.stop="() => remove(node, data)" | |||
> | |||
删除 | |||
</el-button> | |||
<el-button | |||
type="text" | |||
size="mini" | |||
@click.stop="() => ddeditor(node, data)" | |||
> | |||
编辑 | |||
</el-button> | |||
<el-button type="text" size="mini" @click.stop="() => remove(node, data)"> 删除 </el-button> | |||
<el-button type="text" size="mini" @click.stop="() => ddeditor(node, data)"> 编辑 </el-button> | |||
</span> | |||
<el-button v-if="data.sign != 1" type="text"> </el-button> | |||
<el-button v-if="data.sign != 1" type="text" | |||
> </el-button | |||
> | |||
</span> | |||
</span> | |||
</el-tree> | |||
<div class="update-btn"> | |||
<el-button type="primary" size="mini" @click="getCheckedNode">获取选中节点</el-button> | |||
<el-button type="primary" size="mini" @click="getCheckedNode" | |||
>获取选中节点</el-button | |||
> | |||
</div> | |||
<!-- 新增弹框 --> | |||
<el-dialog title="新增" :visible.sync="dialogFormVisible" :center="true" width="400px"> | |||
<el-dialog | |||
title="新增" | |||
:visible.sync="dialogFormVisible" | |||
:center="true" | |||
width="400px" | |||
> | |||
<el-form :model="addForm"> | |||
<el-row :gutter="24"> | |||
<el-col :span="24"> | |||
<el-form-item label="一级大类名称:" v-if="level == 0" :label-width="formLabelWidth"> | |||
<el-input v-model="addForm.name" placeholder="一级大类名称" maxlength="8" autocomplete="off"></el-input> | |||
<el-form-item | |||
label="一级大类名称:" | |||
v-if="level == 0" | |||
:label-width="formLabelWidth" | |||
> | |||
<el-input | |||
v-model="addForm.name" | |||
placeholder="一级大类名称" | |||
maxlength="8" | |||
autocomplete="off" | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="二级小类名称:" v-if="level == 1" :label-width="formLabelWidth"> | |||
<el-input v-model="addForm.name" placeholder="二级小类名称" maxlength="8" autocomplete="off"></el-input> | |||
<el-form-item | |||
label="二级小类名称:" | |||
v-if="level == 1" | |||
:label-width="formLabelWidth" | |||
> | |||
<el-input | |||
v-model="addForm.name" | |||
placeholder="二级小类名称" | |||
maxlength="8" | |||
autocomplete="off" | |||
></el-input> | |||
</el-form-item> | |||
<el-form-item label="三级小类名称:" v-if="level == 2" :label-width="formLabelWidth"> | |||
<el-input v-model="addForm.name" placeholder="三级小类名称" maxlength="8" autocomplete="off"></el-input> | |||
<el-form-item | |||
label="三级小类名称:" | |||
v-if="level == 2" | |||
:label-width="formLabelWidth" | |||
> | |||
<el-input | |||
v-model="addForm.name" | |||
placeholder="三级小类名称" | |||
maxlength="8" | |||
autocomplete="off" | |||
></el-input> | |||
</el-form-item> | |||
</el-col> | |||
</el-row> | |||
</el-form> | |||
<div slot="footer" class="dialog-footer" | |||
style="border-top:1px solid #eee;padding-top: 20px;display: flex;justify-content: end;"> | |||
<div | |||
slot="footer" | |||
class="dialog-footer" | |||
style=" | |||
border-top: 1px solid #eee; | |||
padding-top: 20px; | |||
display: flex; | |||
justify-content: end; | |||
" | |||
> | |||
<el-button @click="dialogFormVisible = false">取 消</el-button> | |||
<el-button type="primary" :loading="loadingFlag" @click="addSubmit">确 定</el-button> | |||
<el-button type="primary" :loading="loadingFlag" @click="addSubmit" | |||
>确 定</el-button | |||
> | |||
</div> | |||
</el-dialog> | |||
<!-- 删除确认弹框 --> | |||
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :center="true"> | |||
<el-dialog | |||
title="提示" | |||
:visible.sync="dialogVisible" | |||
width="30%" | |||
:center="true" | |||
> | |||
<span>确定删除该条内容吗</span> | |||
<span slot="footer" class="dialog-footer" | |||
style="border-top:1px solid #eee;padding-top: 20px;display: flex;justify-content: end;"> | |||
<span | |||
slot="footer" | |||
class="dialog-footer" | |||
style=" | |||
border-top: 1px solid #eee; | |||
padding-top: 20px; | |||
display: flex; | |||
justify-content: end; | |||
" | |||
> | |||
<el-button @click="dialogVisible = false">取 消</el-button> | |||
<el-button type="primary" @click="checkDelete">确 定</el-button> | |||
</span> | |||
</el-dialog> | |||
</div> | |||
<!-- 评分 --> | |||
<div class="content-right"> | |||
<el-row> | |||
<el-col :span="20"> | |||
(提示:拖拽大类可以排序) | |||
<el-col :span="10"> | |||
<div style="display: flex; align-items: center"> | |||
<span style="width: 120px">话术名称</span> | |||
<el-input | |||
placeholder="请输入话术名称" | |||
v-model="inparams.templateName" | |||
maxlength="16" | |||
show-word-limit | |||
clearable | |||
@blur="findByRepetitionName" | |||
> | |||
</el-input> | |||
</div> | |||
<div style="display: flex; align-items: center; height: 40px"> | |||
<span style="width: 120px">默认话术</span> | |||
<el-radio-group v-model="inparams.defaultTemplate"> | |||
<el-radio :label="0">是</el-radio> | |||
<el-radio :label="1">否</el-radio> | |||
</el-radio-group> | |||
</div> | |||
</el-col> | |||
<el-col :span="20"> (提示:拖拽大类可以排序) </el-col> | |||
</el-row> | |||
<draggable class="list-group" tag="ul" v-model="newlist" v-bind="dragOptions" @start="drag = true" | |||
@end="drag = false" @change="onDragCallback"> | |||
<div style="border: 2px dashed #CCCCCC;margin-top: 30px;padding:6px;border-radius: 6px;font-size: 14px;" | |||
v-for="(item, index) in newlist" :key="item.id"> | |||
<div style="display: flex;align-items: center;height: 40px;"> | |||
<div>{{ item.name || '' }}:</div> | |||
<draggable | |||
class="list-group" | |||
tag="ul" | |||
v-model="newlist" | |||
v-bind="dragOptions" | |||
@start="drag = true" | |||
@end="drag = false" | |||
@change="onDragCallback" | |||
> | |||
<div | |||
style=" | |||
border: 2px dashed #cccccc; | |||
margin-top: 30px; | |||
padding: 6px; | |||
border-radius: 6px; | |||
font-size: 14px; | |||
" | |||
v-for="(item, index) in newlist" | |||
:key="item.id" | |||
> | |||
<div style="display: flex; align-items: center; height: 40px"> | |||
<div>{{ item.name || "" }}:</div> | |||
<div> | |||
<el-input @input="inputYiji($event, index)" style="width: 100px;" v-model.number="item.fraction" | |||
type="number" size="mini"></el-input> | |||
<el-input | |||
@input="inputYiji($event, index)" | |||
style="width: 100px" | |||
v-model.number="item.fraction" | |||
type="number" | |||
size="mini" | |||
></el-input> | |||
</div> | |||
<div style="margin-left: 10px;"> | |||
<el-button type="danger" size="mini" @click="Deletecategories(item, index)">删除</el-button> | |||
<div style="margin-left: 10px"> | |||
<el-button | |||
type="danger" | |||
size="mini" | |||
@click="Deletecategories(item, index)" | |||
>删除</el-button | |||
> | |||
</div> | |||
</div> | |||
<div class="erji" style="margin-left: 30px;" v-for="(asd, idx) in item.children" :key="idx"> | |||
<div style="display: flex;align-items: center;height: 40px;"> | |||
<div>{{ asd.name || '' }}:</div> | |||
<div | |||
class="erji" | |||
style="margin-left: 30px" | |||
v-for="(asd, idx) in item.children" | |||
:key="idx" | |||
> | |||
<div style="display: flex; align-items: center; height: 40px"> | |||
<div>{{ asd.name || "" }}:</div> | |||
<div> | |||
<el-input @input="inputBlur($event, index, idx)" style="width: 100px;" v-model.number="asd.fraction" | |||
type="number" size="mini"></el-input> | |||
<el-input | |||
@input="inputBlur($event, index, idx)" | |||
style="width: 100px" | |||
v-model.number="asd.fraction" | |||
type="number" | |||
size="mini" | |||
></el-input> | |||
</div> | |||
<div style="margin-left: 10px;"> | |||
<el-button type="primary" size="mini" @click="Removethesecondary(index, idx, asd)">删除</el-button> | |||
<div style="margin-left: 10px"> | |||
<el-button | |||
type="primary" | |||
size="mini" | |||
@click="Removethesecondary(index, idx, asd)" | |||
>删除</el-button | |||
> | |||
</div> | |||
</div> | |||
<div class="sanji" style="width:90%;"> | |||
<div style="display: flex;align-items: center;height: 40px;" v-for="(sanji, indx) in asd.children" | |||
:key="indx"> | |||
<div style="width:85% ;margin-left: 30px;">{{ sanji.name || '' }}</div> | |||
<div style="margin-left: 10px;"> | |||
<el-button type="info" size="mini" @click="Deletethelevel(index, idx, indx, sanji)">删除</el-button> | |||
<div class="sanji" style="width: 90%"> | |||
<div | |||
style="display: flex; align-items: center; height: 40px" | |||
v-for="(sanji, indx) in asd.children" | |||
:key="indx" | |||
> | |||
<div style="width: 85%; margin-left: 30px"> | |||
{{ sanji.name || "" }} | |||
</div> | |||
<div style="margin-left: 10px"> | |||
<el-button | |||
type="info" | |||
size="mini" | |||
@click="Deletethelevel(index, idx, indx, sanji)" | |||
>删除</el-button | |||
> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -131,36 +309,59 @@ | |||
</div> | |||
</draggable> | |||
<div style="display: flex;align-items: center;margin-top:30px;"> | |||
<div style="display: flex; align-items: center; margin-top: 30px"> | |||
<el-button type="primary" size="mini" @click="cancel">取消</el-button> | |||
<el-button style="margin-left: 30px;" type="primary" size="mini" @click="submitForm">保存</el-button> | |||
<el-button | |||
style="margin-left: 30px" | |||
type="primary" | |||
size="mini" | |||
@click="submitForm" | |||
>保存</el-button | |||
> | |||
</div> | |||
</div> | |||
<!--?编辑弹框?--> | |||
<el-dialog title="编辑" :visible.sync="isshowage" :center="true" width="30%"> | |||
<div style="display: flex;align-items: center;height: 40px;width: 100%;"> | |||
<el-dialog | |||
title="编辑" | |||
:visible.sync="isshowage" | |||
:center="true" | |||
width="30%" | |||
> | |||
<div | |||
style="display: flex; align-items: center; height: 40px; width: 100%" | |||
> | |||
<div>类名:</div> | |||
<div style="width:88%"> | |||
<el-input type="text" maxlength="8" v-model="frosasd.name" autocomplete="off"></el-input> | |||
<div style="width: 88%"> | |||
<el-input | |||
type="text" | |||
maxlength="8" | |||
v-model="frosasd.name" | |||
autocomplete="off" | |||
></el-input> | |||
</div> | |||
</div> | |||
<div slot="footer" class="dialog-footer" | |||
style="border-top:1px solid #eee;padding-top: 20px;display: flex;justify-content: end;"> | |||
<div | |||
slot="footer" | |||
class="dialog-footer" | |||
style=" | |||
border-top: 1px solid #eee; | |||
padding-top: 20px; | |||
display: flex; | |||
justify-content: end; | |||
" | |||
> | |||
<el-button @click="submicll()">取 消</el-button> | |||
<el-button type="primary" @click="submiadd()">提交</el-button> | |||
</div> | |||
</el-dialog> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import draggable from 'vuedraggable' | |||
import draggable from "vuedraggable"; | |||
export default { | |||
data() { | |||
return { | |||
@@ -170,7 +371,7 @@ export default { | |||
treeList: [], //树形数据 | |||
newlist: [], | |||
nodelist: [], | |||
orgType: localStorage.getItem('orgType'), | |||
orgType: localStorage.getItem("orgType"), | |||
dialogFormVisible: false, // 弹框 | |||
dialogVisible: false, | |||
isshowage: false, | |||
@@ -195,8 +396,13 @@ export default { | |||
addid: null, // 新增的节点id(接口生成) | |||
deleteId: null, // 要删除的表单节点的ID | |||
disabledcet: false, | |||
Templateid: '', | |||
Templateid: "", | |||
loadingFlag: false, | |||
inparams: { | |||
templateName: "", // 话术名称 | |||
defaultTemplate: 1, // 默认模板 0:是,1:否 | |||
}, | |||
}; | |||
}, | |||
components: { | |||
@@ -211,7 +417,7 @@ export default { | |||
mounted() { | |||
var isnull = this.$route.query.flag; | |||
this.Templateid = isnull.id; | |||
this.setInitCheck() | |||
this.setInitCheck(); | |||
}, | |||
computed: { | |||
dragOptions() { | |||
@@ -224,6 +430,22 @@ export default { | |||
}, | |||
}, | |||
methods: { | |||
// 检测模板名称 | |||
findByRepetitionName() { | |||
this.$api.http | |||
.findByRepetitionName({ | |||
name: this.inparams.templateName, | |||
houseId: this.houseId, | |||
}) | |||
.then((res) => { | |||
if (res.code != 0) { | |||
this.$message({ | |||
message: res.msg, | |||
type: "warning", | |||
}); | |||
} | |||
}); | |||
}, | |||
// 项目选择 | |||
selectChange(e) { | |||
this.houseId = e; | |||
@@ -231,31 +453,33 @@ export default { | |||
}, | |||
// 获取项目下拉的数据 | |||
getHouse() { | |||
this.$api.api.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}).then((res) => { | |||
this.houseList = res.data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.propertyName, | |||
}; | |||
}); | |||
if (this.houseId == "") { | |||
if (localStorage.getItem('orgType') == 3) { | |||
this.houseId = localStorage.getItem('houseId') | |||
} else { | |||
this.houseId = this.houseList[0].value; | |||
this.$api.api | |||
.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}) | |||
.then((res) => { | |||
this.houseList = res.data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.propertyName, | |||
}; | |||
}); | |||
if (this.houseId == "") { | |||
if (localStorage.getItem("orgType") == 3) { | |||
this.houseId = localStorage.getItem("houseId"); | |||
} else { | |||
this.houseId = this.houseList[0].value; | |||
} | |||
// this.houseId = this.houseList[0].value; | |||
} | |||
// this.houseId = this.houseList[0].value; | |||
} | |||
this.templategetMarketingTree() | |||
}) | |||
this.templategetMarketingTree(); | |||
}); | |||
}, | |||
//获取模板 | |||
templategetMarketingTree() { | |||
let parmest = { | |||
houseId: this.houseId, | |||
} | |||
}; | |||
this.$api.api.templategetMarketingTree(parmest).then((res) => { | |||
console.log(res); | |||
let data = res.data; | |||
@@ -263,7 +487,7 @@ export default { | |||
data = JSON.parse(data); | |||
this.treeList = data; | |||
this.getAllTreeListId(this.treeList); | |||
}) | |||
}); | |||
}, | |||
// 递归获取所有的ID | |||
getAllTreeListId(arr) { | |||
@@ -279,8 +503,10 @@ export default { | |||
}, | |||
// ------获取选中的节点 | |||
getCheckedNode() { | |||
let res = this.$refs.tree.getCheckedKeys().concat(this.$refs.tree.getHalfCheckedKeys()); | |||
console.log(res) | |||
let res = this.$refs.tree | |||
.getCheckedKeys() | |||
.concat(this.$refs.tree.getHalfCheckedKeys()); | |||
console.log(res); | |||
let arr = []; | |||
let arr1 = JSON.parse(JSON.stringify(this.treeList)); | |||
@@ -297,18 +523,22 @@ export default { | |||
}, | |||
// 树图,设置初始选中值及分数回显--编辑跳转过来的 | |||
setInitCheck() { | |||
if (this.Templateid == '') { | |||
if (this.Templateid == "") { | |||
//获取项目 | |||
this.getHouse(); | |||
} else { | |||
this.disabledcet = true; | |||
let parmest = { | |||
tempId: this.Templateid, | |||
} | |||
}; | |||
this.$api.http.templatedelfindByTempId(parmest).then((res) => { | |||
console.log(res.data, "res.data"); | |||
this.houseId = res.data.houseId; | |||
this.checklist = res.data.list; | |||
this.nodelist = res.data.list; | |||
this.inparams.templateName = res.data.templateName; | |||
this.inparams.defaultTemplate = res.data.defaultTemplate; | |||
console.log(this.inparams); | |||
this.getHouse2(); | |||
this.checklist.forEach((item) => { | |||
this.rateMap.set(item.id, item.fraction); // map维护分数 | |||
@@ -317,30 +547,28 @@ export default { | |||
this.defaultCheck.push(item.id); | |||
} | |||
}); | |||
console.log(this.newlist, "99999999999999999999999999") | |||
console.log(this.newlist, "99999999999999999999999999"); | |||
this.listCheckedchaifen(); | |||
}) | |||
}); | |||
} | |||
}, | |||
// 获取项目下拉的数据 | |||
getHouse2() { | |||
this.$api.api.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}).then((res) => { | |||
this.houseList = res.data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.propertyName, | |||
}; | |||
this.$api.api | |||
.findHouseByUser({ | |||
orgType: localStorage.getItem("orgType"), | |||
}) | |||
.then((res) => { | |||
this.houseList = res.data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.propertyName, | |||
}; | |||
}); | |||
this.templategetMarketingTree(); | |||
}); | |||
this.templategetMarketingTree() | |||
}) | |||
}, | |||
inputYiji(e, index) { | |||
if (e < 0) { | |||
this.$message({ | |||
@@ -697,6 +925,7 @@ export default { | |||
let params = { | |||
houseId: this.houseId, | |||
children: [], | |||
...this.inparams, | |||
}; | |||
list.forEach((item) => { | |||
@@ -739,7 +968,15 @@ export default { | |||
}, | |||
// 评分保存 新增模板 | |||
saveRate(params) { | |||
if (this.Templateid != '') { | |||
if(!params.templateName) { | |||
this.$message({ | |||
message: "请填写模板名称", | |||
type: "error", | |||
}); | |||
return | |||
} | |||
if (this.Templateid != "") { | |||
params.tempId = this.Templateid; | |||
} | |||
this.$api.http.templategeaddTemplate(params).then((res) => { | |||
@@ -748,10 +985,9 @@ export default { | |||
type: "success", | |||
}); | |||
window.history.back(); | |||
}) | |||
}); | |||
}, | |||
//拖拽排序 | |||
Peerdrag(before) { | |||
let arr = []; | |||
@@ -797,9 +1033,7 @@ export default { | |||
}, | |||
//排序提交 | |||
dragSort(list) { | |||
this.$api.http.templategeupdateSort({ children: list }).then((res) => { | |||
}) | |||
this.$api.http.templategeupdateSort({ children: list }).then((res) => {}); | |||
}, | |||
//控制那个可拖拽节点 | |||
allowDrag(draggingNode, dropNode, type) { | |||
@@ -847,10 +1081,10 @@ export default { | |||
// 点击添加节点确认按钮 | |||
addSubmit() { | |||
if (this.addForm.name != "") { | |||
this.loadingFlag = true | |||
this.loadingFlag = true; | |||
setTimeout(() => { | |||
this.loadingFlag = false | |||
console.log('防重') | |||
this.loadingFlag = false; | |||
console.log("防重"); | |||
}, 1); | |||
this.dialogFormVisible = false; | |||
this.addNode(); | |||
@@ -864,65 +1098,67 @@ export default { | |||
}, | |||
// 新增的节点保存 | |||
addNode() { | |||
this.$api.http.templategeadd({ | |||
pid: this.pid, | |||
name: this.addForm.name, | |||
houseId: this.houseId, | |||
sign: 1 | |||
}).then((res) => { | |||
if (this.level == 0) { | |||
// 大类 | |||
let newNode = { | |||
id: res.data, | |||
sign: 1, | |||
pid: 0, | |||
sort: this.treeList.length + 1, | |||
label: this.addForm.name, | |||
fraction: "", | |||
children: [], | |||
houseId: this.houseId, | |||
}; | |||
this.treeList.push(newNode); | |||
this.allTreeListId.push(res.data.obj); | |||
} else if (this.level == 1) { | |||
// 二级 | |||
let newChild = { | |||
id: res.data, | |||
pid: this.pid, | |||
sign: 1, | |||
fraction: "", | |||
sort: null, | |||
label: this.addForm.name, | |||
children: [], | |||
houseId: this.houseId, | |||
}; | |||
this.$api.http | |||
.templategeadd({ | |||
pid: this.pid, | |||
name: this.addForm.name, | |||
houseId: this.houseId, | |||
sign: 1, | |||
}) | |||
.then((res) => { | |||
if (this.level == 0) { | |||
// 大类 | |||
let newNode = { | |||
id: res.data, | |||
sign: 1, | |||
pid: 0, | |||
sort: this.treeList.length + 1, | |||
label: this.addForm.name, | |||
fraction: "", | |||
children: [], | |||
houseId: this.houseId, | |||
}; | |||
this.treeList.push(newNode); | |||
this.allTreeListId.push(res.data.obj); | |||
} else if (this.level == 1) { | |||
// 二级 | |||
let newChild = { | |||
id: res.data, | |||
pid: this.pid, | |||
sign: 1, | |||
fraction: "", | |||
sort: null, | |||
label: this.addForm.name, | |||
children: [], | |||
houseId: this.houseId, | |||
}; | |||
this.treeList.forEach((item, index) => { | |||
if (item.id == this.pid) { | |||
item.children.push(newChild); | |||
} | |||
}); | |||
this.allTreeListId.push(res.data.obj); | |||
} else { | |||
let newChilds = { | |||
id: res.data, | |||
sign: 1, | |||
fraction: "", | |||
pid: this.pid, | |||
sort: null, | |||
label: this.addForm.name, | |||
houseId: this.houseId, | |||
}; | |||
this.treeList.forEach((item, index) => { | |||
item.children.forEach((ite, inde) => { | |||
if (ite.id == this.pid) { | |||
ite.children.push(newChilds); | |||
this.treeList.forEach((item, index) => { | |||
if (item.id == this.pid) { | |||
item.children.push(newChild); | |||
} | |||
}); | |||
}); | |||
this.allTreeListId.push(res.data.obj); | |||
} | |||
}) | |||
this.allTreeListId.push(res.data.obj); | |||
} else { | |||
let newChilds = { | |||
id: res.data, | |||
sign: 1, | |||
fraction: "", | |||
pid: this.pid, | |||
sort: null, | |||
label: this.addForm.name, | |||
houseId: this.houseId, | |||
}; | |||
this.treeList.forEach((item, index) => { | |||
item.children.forEach((ite, inde) => { | |||
if (ite.id == this.pid) { | |||
ite.children.push(newChilds); | |||
} | |||
}); | |||
}); | |||
this.allTreeListId.push(res.data.obj); | |||
} | |||
}); | |||
}, | |||
//编辑提交 | |||
submiadd() { | |||
@@ -930,7 +1166,7 @@ export default { | |||
let parmest = { | |||
name: that.frosasd.name, | |||
id: that.frosasd.id, | |||
} | |||
}; | |||
this.$api.http.templategeupdate(parmest).then((res) => { | |||
that.treeList.forEach((item, index) => { | |||
if (item.id == that.frosasd.id) { | |||
@@ -970,7 +1206,7 @@ export default { | |||
}); | |||
} | |||
}); | |||
}) | |||
}); | |||
}, | |||
//编辑 | |||
ddeditor(node, data) { | |||
@@ -982,7 +1218,7 @@ export default { | |||
checkDelete() { | |||
let parmest = { | |||
id: this.deleteId, | |||
} | |||
}; | |||
this.$api.http.templategedel(parmest).then((res) => { | |||
this.treeList.forEach((item, index) => { | |||
if (item.id == this.deleteId) { | |||
@@ -994,10 +1230,7 @@ export default { | |||
} else { | |||
ite.children.forEach((it, ine) => { | |||
if (it.id == this.deleteId) { | |||
this.treeList[index].children[inde].children.splice( | |||
ine, | |||
1 | |||
); | |||
this.treeList[index].children[inde].children.splice(ine, 1); | |||
} | |||
}); | |||
} | |||
@@ -1006,7 +1239,7 @@ export default { | |||
}); | |||
this.dialogVisible = false; | |||
}) | |||
}); | |||
}, | |||
remove(node, data) { | |||
if (node.level == 3) { | |||
@@ -1017,7 +1250,8 @@ export default { | |||
if (data.children.length == 0) { | |||
this.deleteType = "node"; | |||
this.deleteId = data.id; | |||
this.dialogVisible = true; findByTempId | |||
this.dialogVisible = true; | |||
findByTempId; | |||
} else { | |||
this.$message({ | |||
message: "请先清空子级", | |||
@@ -1100,11 +1334,11 @@ export default { | |||
font-weight: bold; | |||
} | |||
} | |||
/deep/ .el-button--primary{ | |||
background: #2671E2 !important; | |||
border: 1px solid #2671E2 !important; | |||
/deep/ .el-button--primary { | |||
background: #2671e2 !important; | |||
border: 1px solid #2671e2 !important; | |||
} | |||
/deep/ .el-button--text{ | |||
color: #2671E2; | |||
/deep/ .el-button--text { | |||
color: #2671e2; | |||
} | |||
</style> |
@@ -30,11 +30,22 @@ export default { | |||
if(data.status == 1) return '停用' | |||
} | |||
}, | |||
{ | |||
label: "模板名称", | |||
prop: "templateName", | |||
}, | |||
{ | |||
label: "默认话术", | |||
prop: "defaultTemplate", | |||
formatter: (data) => { | |||
if(data.defaultTemplate == 0) return '是' | |||
if(data.defaultTemplate == 1) return '否' | |||
} | |||
}, | |||
{ | |||
label: "大类个数", | |||
prop: "count", | |||
}, | |||
{ | |||
label: "创建时间", | |||
prop: "createTime", | |||
@@ -3,13 +3,12 @@ | |||
* https://cli.vuejs.org/zh/config/ | |||
*/ | |||
// const url = 'http://192.168.31.160:9999' //长龙 | |||
// const url = 'http://192.168.31.149:9999' // 胜浩 | |||
const url = 'http://192.168.31.85:9999' // 胜浩 | |||
// const url = 'http://127.0.0.1:9999' // 本地 | |||
const url = 'http://39.97.244.65:9999' // 测试服务器 | |||
// const url = 'http://39.97.244.65:9999' // 测试服务器 | |||
// const url = 'http://62.234.122.43:9999' //正式服务器1 | |||
// const url = 'http://82.156.35.22:9999' // 正式服务器2 | |||
// const url = 'https://www.aihxz.com' // 正式域名 | |||
const CompressionWebpackPlugin = require('compression-webpack-plugin') | |||
const productionGzipExtensions = ['js', 'css'] | |||