Commit 3009cc7e by zhangxw

Merge branch 'SAAS+V4.53.1-0610' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.53.1-0610
2 parents e382c0b6 51e95f46
...@@ -994,43 +994,43 @@ export const routerName = { ...@@ -994,43 +994,43 @@ export const routerName = {
}, },
component: _import("residentManage/teachingManage/addTeachingTask") component: _import("residentManage/teachingManage/addTeachingTask")
}, },
91220: { // 91220: {
path: "/verbalTrickManagement", // path: "/verbalTrickManagement",
name: "verbalTrickManagement", // name: "verbalTrickManagement",
meta: { // meta: {
title: "话术管理", // title: "话术管理",
authId: "91220", // authId: "91220",
parentId: "912", // parentId: "912",
cache: false // cache: false
}, // },
auth: [ // auth: [
{ // {
authId: "9122001", // authId: "9122001",
parentId: "91220", // parentId: "91220",
label: "明细", // label: "明细",
handle: "handleDetail", // handle: "handleDetail",
addRoutePath: [ // addRoutePath: [
{ // {
authId: "912200101", // authId: "912200101",
name: "详情", // name: "详情",
parentId: "91220" // parentId: "91220"
} // }
] // ]
} // }
], // ],
component: _import("residentManage/verbalTrickManagement/index") // component: _import("residentManage/verbalTrickManagement/index")
}, // },
912200101: { // 912200101: {
path: "/inVerbalConfigView", // path: "/inVerbalConfigView",
name: "inVerbalConfigView", // name: "inVerbalConfigView",
meta: { // meta: {
title: "明细", // title: "明细",
authId: "912200101", // authId: "912200101",
parentId: "91220", // parentId: "91220",
activePath: "/inVerbalConfigView" // activePath: "/inVerbalConfigView"
}, // },
component: _import("residentManage/verbalTrickManagement/detailView") // component: _import("residentManage/verbalTrickManagement/detailView")
}, // },
91221: { 91221: {
path: "/getOutverbalTrickManagement", path: "/getOutverbalTrickManagement",
name: "getOutverbalTrickManagement", name: "getOutverbalTrickManagement",
......
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
918: {
path: "/verbalTrickManage",
name: "verbalTrickManage",
meta: {
title: "话术库",
authId: "918",
parentId: "1",
cache: false
}
},
91801: {
path: "/verbalTrickManage/index",
name: "verbalTrickManagement",
meta: {
title: "话术管理",
authId: "91801",
parentId: "918",
cache: false
},
auth: [
{
authId: "9180101",
parentId: "91801",
label: "明细",
handle: "handleDetail",
addRoutePath: [
{
authId: "918010101",
name: "详情",
parentId: "91801"
}
]
}
],
component: _import("verbalTrickManage/index/index")
},
918010101: {
path: "/inVerbalConfigView",
name: "inVerbalConfigView",
meta: {
title: "明细",
authId: "918010101",
parentId: "91801",
activePath: "/inVerbalConfigView"
},
component: _import("verbalTrickManage/index/detailView")
},
}
<!-- 话术审批进度 --> <!-- 话术审批进度 -->
<template> <template>
<d2-container class="customer-tags m-t-40"> <d2-container class="customer-tags m-t-40">
<div class="header" slot="header"> <div
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'" class="header"
:form-data="showFormData"> slot="header"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch"> <el-button
size="small"
type="primary"
@click="handleSearch"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<div class="statistics-wrap"> <div class="statistics-wrap">
<template v-for="(item, index) in statisticsData"> <template v-for="(item, index) in statisticsData">
<div class="statistics-box" :key="index"> <div
class="statistics-box"
:key="index"
>
<div class="title">{{ item.label }}</div> <div class="title">{{ item.label }}</div>
<div class="content" v-if="!item.innerHtml"> <div
class="content"
v-if="!item.innerHtml"
>
{{ queryInfo[item.key] }} {{ queryInfo[item.key] }}
</div> </div>
<div class="inner-content" v-else v-html="item.innerHtml(queryInfo)"></div> <div
class="inner-content"
v-else
v-html="item.innerHtml(queryInfo)"
></div>
</div> </div>
</template> </template>
</div> </div>
<d2-table-header title="审批列表"> <d2-table-header title="审批列表">
<el-button size="mini" type="primary" plain @click="exportTable">导出</el-button> <el-button
size="mini"
type="primary"
plain
@click="exportTable"
>导出</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table
:before-search-fn="beforeSearchFn"> ref="table"
<template slot="polishContent" slot-scope="scope"> :get-list-api="getListApi"
<el-tooltip class="item" effect="dark" :content="scope.scope.polishContent" placement="top" :search-form="searchFormSearch"
popper-class="text-tooltip"> :table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template
slot="popoverHtml"
slot-scope="scope"
>
<template v-if="scope.scope[scope.prop]">
<el-tooltip
class="item"
effect="dark"
:content="$parent.formatterContent(scope.scope,scope.prop)"
placement="top"
popper-class="text-tooltip"
>
<span> <span>
{{ {{$parent.formatterContent(scope.scope,scope.prop, 20)}}
scope.scope.polishContent
? scope.scope.polishContent.length > 10
? scope.scope.polishContent.slice(0, 10) + "..."
: item.polishContent
: ""
}}
</span> </span>
</el-tooltip> </el-tooltip>
</template> </template>
<div slot="auth-button" slot-scope="scope"> <template v-else>-</template>
</template>
<div
slot="auth-button"
slot-scope="scope"
>
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button
type="text"
@click="handleDetail(scope.scope)"
>详情</el-button>
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
<other-detail :visible.sync="detailVisible" v-if="detailVisible" :id="id" source="approval" /> <other-detail
:visible.sync="detailVisible"
v-if="detailVisible"
:id="id"
source="approval"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -68,7 +119,7 @@ import otherDetail from "./components/otherDetail" ...@@ -68,7 +119,7 @@ import otherDetail from "./components/otherDetail"
export default { export default {
name: 'ApprovalList', name: 'ApprovalList',
components: { otherDetail }, components: { otherDetail },
data() { data () {
return { return {
getListApi: getConditionPage, getListApi: getConditionPage,
tableData: [], tableData: [],
...@@ -110,9 +161,16 @@ export default { ...@@ -110,9 +161,16 @@ export default {
prop: "staffName" prop: "staffName"
}, },
{ {
label: "录音链接",
prop: "recordingUrl",
minWidth: 200,
addHtml: "popoverHtml"
},
{
label: "话术内容", label: "话术内容",
prop: "polishContent", prop: "polishContent",
addHtml: "polishContent" minWidth: 200,
addHtml: "popoverHtml"
}, },
{ {
label: "萃取时间", label: "萃取时间",
...@@ -221,22 +279,22 @@ export default { ...@@ -221,22 +279,22 @@ export default {
}, },
} }
}, },
mounted() { mounted () {
this.initSelect() this.initSelect()
this.getTotal() this.getTotal()
}, },
methods: { methods: {
handleDetail(data) { handleDetail (data) {
this.id = data.id this.id = data.id
this.detailVisible = true this.detailVisible = true
}, },
beforeSearchFn(type = 1) { beforeSearchFn (type = 1) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormSearch = this.getParams() this.searchFormSearch = this.getParams()
resolve() resolve()
}) })
}, },
getParams() { getParams () {
const params = deepClone(this.searchForm) const params = deepClone(this.searchForm)
if (params.extractionTime?.length) { if (params.extractionTime?.length) {
params.startTime = Util.dateFormate( params.startTime = Util.dateFormate(
...@@ -263,16 +321,16 @@ export default { ...@@ -263,16 +321,16 @@ export default {
} }
return params return params
}, },
handleSearch() { handleSearch () {
this.page = this.$options.data.call(this).page this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true) this.$refs.table.refreshTable(true, true)
}, },
handleReset() { handleReset () {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
console.log("this.searchForm", this.searchForm) console.log("this.searchForm", this.searchForm)
this.handleSearch() this.handleSearch()
}, },
async exportTable() { async exportTable () {
try { try {
await this.beforeSearchFn() await this.beforeSearchFn()
const res = await conditionExport({ const res = await conditionExport({
...@@ -283,7 +341,7 @@ export default { ...@@ -283,7 +341,7 @@ export default {
if (error) this.$message.error(error) if (error) this.$message.error(error)
} }
}, },
initSelect() { initSelect () {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误 // 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getSceceLabelList()]) Promise.allSettled([this.getSceceLabelList()])
.then((results) => { .then((results) => {
...@@ -302,7 +360,7 @@ export default { ...@@ -302,7 +360,7 @@ export default {
}) })
}, },
getSceceLabelList() { getSceceLabelList () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getSingleLabelList({}) getSingleLabelList({})
.then((res) => { .then((res) => {
...@@ -315,7 +373,7 @@ export default { ...@@ -315,7 +373,7 @@ export default {
}) })
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -339,7 +397,7 @@ export default { ...@@ -339,7 +397,7 @@ export default {
} }
}) })
}, },
async getTotal() { async getTotal () {
const res = await getTotalCount({}) const res = await getTotalCount({})
this.queryInfo.recordCount = res this.queryInfo.recordCount = res
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
> >
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9122001']" /> <auth-button :data="scope.scope" :show-btn-ids="['9180101']" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
......
<template> <template>
<d2-container class="customer-tags m-t-40"> <d2-container class="customer-tags m-t-40">
<div class="header" slot="header"> <div
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'" class="header"
:form-data="showFormData"> slot="header"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch"> <el-button
size="small"
type="primary"
@click="handleSearch"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<div class="statistics-wrap"> <div class="statistics-wrap">
<template v-for="(item, index) in statisticsData"> <template v-for="(item, index) in statisticsData">
<div class="statistics-box" :key="index"> <div
class="statistics-box"
:key="index"
>
<div class="title">{{ item.label }}</div> <div class="title">{{ item.label }}</div>
<div class="content" v-if="!item.innerHtml"> <div
class="content"
v-if="!item.innerHtml"
>
{{ queryInfo[item.key] }} {{ queryInfo[item.key] }}
</div> </div>
<div class="inner-content" v-else v-html="item.innerHtml(queryInfo)"></div> <div
class="inner-content"
v-else
v-html="item.innerHtml(queryInfo)"
></div>
</div> </div>
</template> </template>
</div> </div>
<d2-table-header title="未推送列表"> <d2-table-header title="未推送列表">
<el-button size="mini" type="primary" plain @click="exportTable">导出</el-button> <el-button
size="mini"
type="primary"
plain
@click="exportTable"
>导出</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table
:before-search-fn="beforeSearchFn"> ref="table"
<template slot="polishContent" slot-scope="scope"> :get-list-api="getListApi"
<el-tooltip class="item" effect="dark" :content="scope.scope.polishContent" placement="top" :search-form="searchFormSearch"
popper-class="text-tooltip"> :table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template
slot="popoverHtml"
slot-scope="scope"
>
<template v-if="scope.scope[scope.prop]">
<el-tooltip
class="item"
effect="dark"
:content="$parent.formatterContent(scope.scope,scope.prop)"
placement="top"
popper-class="text-tooltip"
>
<span> <span>
{{ {{$parent.formatterContent(scope.scope,scope.prop, 20)}}
scope.scope.polishContent
? scope.scope.polishContent.length > 10
? scope.scope.polishContent.slice(0, 10) + "..."
: item.polishContent
: ""
}}
</span> </span>
</el-tooltip> </el-tooltip>
</template> </template>
<div slot="auth-button" slot-scope="scope"> <template v-else>-</template>
</template>
<div
slot="auth-button"
slot-scope="scope"
>
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button
type="text"
@click="handleDetail(scope.scope)"
>详情</el-button>
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 详细信息 --> <!-- 详细信息 -->
<other-detail :visible.sync="detailVisible" v-if="detailVisible" :id="id" source="nopushed" /> <other-detail
:visible.sync="detailVisible"
v-if="detailVisible"
:id="id"
source="nopushed"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -67,7 +118,7 @@ import otherDetail from "./components/otherDetail" ...@@ -67,7 +118,7 @@ import otherDetail from "./components/otherDetail"
export default { export default {
name: 'NoPushedList', name: 'NoPushedList',
components: { otherDetail }, components: { otherDetail },
data() { data () {
return { return {
getListApi: getConditionPage, getListApi: getConditionPage,
tableData: [], tableData: [],
...@@ -92,9 +143,15 @@ export default { ...@@ -92,9 +143,15 @@ export default {
prop: "labelName" prop: "labelName"
}, },
{ {
label: "录音链接",
prop: "recordingUrl",
minWidth: 200,
addHtml: "popoverHtml"
},
{
label: "话术内容", label: "话术内容",
prop: "polishContent", prop: "polishContent",
addHtml: "polishContent" addHtml: "popoverHtml"
}, },
{ {
label: "更新时间", label: "更新时间",
...@@ -148,16 +205,16 @@ export default { ...@@ -148,16 +205,16 @@ export default {
} }
} }
}, },
mounted() { mounted () {
this.initSelect() this.initSelect()
this.getTotal() this.getTotal()
}, },
methods: { methods: {
handleDetail(data) { handleDetail (data) {
this.id = data.id this.id = data.id
this.detailVisible = true this.detailVisible = true
}, },
beforeSearchFn(type = 1) { beforeSearchFn (type = 1) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.pushStatus = 0 this.searchFormSearch.pushStatus = 0
...@@ -176,16 +233,16 @@ export default { ...@@ -176,16 +233,16 @@ export default {
resolve() resolve()
}) })
}, },
handleSearch() { handleSearch () {
this.page = this.$options.data.call(this).page this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true) this.$refs.table.refreshTable(true, true)
}, },
handleReset() { handleReset () {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
console.log("this.searchForm", this.searchForm) console.log("this.searchForm", this.searchForm)
this.handleSearch() this.handleSearch()
}, },
async exportTable() { async exportTable () {
try { try {
await this.beforeSearchFn() await this.beforeSearchFn()
const res = await conditionExport({ const res = await conditionExport({
...@@ -196,7 +253,7 @@ export default { ...@@ -196,7 +253,7 @@ export default {
if (error) this.$message.error(error) if (error) this.$message.error(error)
} }
}, },
initSelect() { initSelect () {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误 // 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getSingleLabelList()]) Promise.allSettled([this.getSingleLabelList()])
.then((results) => { .then((results) => {
...@@ -215,7 +272,7 @@ export default { ...@@ -215,7 +272,7 @@ export default {
}) })
}, },
getSingleLabelList() { getSingleLabelList () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getSingleLabelList({}) getSingleLabelList({})
.then((res) => { .then((res) => {
...@@ -228,7 +285,7 @@ export default { ...@@ -228,7 +285,7 @@ export default {
}) })
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -252,10 +309,10 @@ export default { ...@@ -252,10 +309,10 @@ export default {
} }
}) })
}, },
async getTotal() { async getTotal () {
const res = await getTotalCount({ pushStatus: 0, checkStatusList: [2] }) const res = await getTotalCount({ pushStatus: 0, checkStatusList: [2] })
this.queryInfo.recordCount = res this.queryInfo.recordCount = res
} },
} }
} }
</script> </script>
......
...@@ -28,20 +28,25 @@ ...@@ -28,20 +28,25 @@
</d2-table-header> </d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<template slot="polishContent" slot-scope="scope"> <template
<el-tooltip class="item" effect="dark" :content="scope.scope.polishContent" placement="top" slot="popoverHtml"
popper-class="text-tooltip"> slot-scope="scope"
>
<template v-if="scope.scope[scope.prop]">
<el-tooltip
class="item"
effect="dark"
:content="$parent.formatterContent(scope.scope,scope.prop)"
placement="top"
popper-class="text-tooltip"
>
<span> <span>
{{ {{$parent.formatterContent(scope.scope,scope.prop, 20)}}
scope.scope.polishContent
? scope.scope.polishContent.length > 10
? scope.scope.polishContent.slice(0, 10) + "..."
: item.polishContent
: ""
}}
</span> </span>
</el-tooltip> </el-tooltip>
</template> </template>
<template v-else>-</template>
</template>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
...@@ -96,9 +101,15 @@ export default { ...@@ -96,9 +101,15 @@ export default {
prop: "labelName" prop: "labelName"
}, },
{ {
label: "录音链接",
prop: "recordingUrl",
minWidth: 200,
addHtml: "popoverHtml"
},
{
label: "话术内容", label: "话术内容",
prop: "polishContent", prop: "polishContent",
addHtml: "polishContent" addHtml: "popoverHtml"
}, },
{ {
label: "更新时间", label: "更新时间",
......
...@@ -7,10 +7,17 @@ ...@@ -7,10 +7,17 @@
> >
<div class="detail-content"> <div class="detail-content">
<div class="form_div"> <div class="form_div">
<el-form class="edit-sub-block" label-width="110px" :inline="true"> <el-form
class="edit-sub-block"
label-width="110px"
:inline="true"
>
<el-row :gutter="20"> <el-row :gutter="20">
<template v-for="(item, index) in configData"> <template v-for="(item, index) in configData">
<el-col :span="item.col ? item.col : 12" :key="index"> <el-col
:span="item.col ? item.col : 12"
:key="index"
>
<el-form-item :label="item.title"> <el-form-item :label="item.title">
<slot <slot
v-if="item.addHtml" v-if="item.addHtml"
...@@ -24,15 +31,17 @@ ...@@ -24,15 +31,17 @@
></div> ></div>
{{ detailInfo[item.key] ? detailInfo[item.key] : "-" }} {{ detailInfo[item.key] ? detailInfo[item.key] : "-" }}
</div> </div>
</el-form-item></el-col </el-form-item></el-col>
>
</template> </template>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div class="operate-wrap"> <div class="operate-wrap">
<div class="title">操作记录</div> <div class="title">操作记录</div>
<div class="operate-list" v-if="operateData.length > 0"> <div
class="operate-list"
v-if="operateData.length > 0"
>
<div <div
v-for="(item, index) in operateData" v-for="(item, index) in operateData"
:key="index" :key="index"
...@@ -45,17 +54,18 @@ ...@@ -45,17 +54,18 @@
}}</span> }}</span>
<span class="result">通过</span> <span class="result">通过</span>
</div> </div>
<div <div :class="[
:class="[
'content', 'content',
operateData.length == index + 1 ? 'last' : '' operateData.length == index + 1 ? 'last' : ''
]" ]">
>
{{ item.staffName }}<span>{{ item.createdTime }}</span> {{ item.staffName }}<span>{{ item.createdTime }}</span>
</div> </div>
</div> </div>
</div> </div>
<div v-else class="empty">暂无记录</div> <div
v-else
class="empty"
>暂无记录</div>
</div> </div>
</div> </div>
</baseDialog> </baseDialog>
...@@ -78,24 +88,24 @@ export default { ...@@ -78,24 +88,24 @@ export default {
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get () {
return this.visible return this.visible
}, },
set(val) { set (val) {
this.$emit("update:visible", val) this.$emit("update:visible", val)
} }
} }
}, },
watch: { watch: {
id(val) { id (val) {
if (val) this.getDetail() if (val) this.getDetail()
} }
}, },
mounted() { mounted () {
this.getDetail() this.getDetail()
this.getOperateList() this.getOperateList()
}, },
data() { data () {
return { return {
operateData: [], operateData: [],
configData: [ configData: [
...@@ -137,6 +147,11 @@ export default { ...@@ -137,6 +147,11 @@ export default {
width: "100%" width: "100%"
}, },
{ {
title: "原文内容:",
key: "sourceContent",
col: 24
},
{
title: "话术内容:", title: "话术内容:",
key: "polishContent", key: "polishContent",
col: 24 col: 24
...@@ -158,10 +173,10 @@ export default { ...@@ -158,10 +173,10 @@ export default {
} }
}, },
methods: { methods: {
handleDetailClose() { handleDetailClose () {
this.dialogShow = false this.dialogShow = false
}, },
getDetail() { getDetail () {
getRecordDetail({ id: this.id }).then((res) => { getRecordDetail({ id: this.id }).then((res) => {
if (res) { if (res) {
res.scene = res.scene == 1 ? "精品" : "延保" res.scene = res.scene == 1 ? "精品" : "延保"
...@@ -177,7 +192,7 @@ export default { ...@@ -177,7 +192,7 @@ export default {
} }
}) })
}, },
getOperateList() { getOperateList () {
getOperateList({ id: this.id }).then((res) => { getOperateList({ id: this.id }).then((res) => {
if (res) { if (res) {
this.operateData = res this.operateData = res
......
<template> <template>
<d2-container class="customer-tags"> <d2-container class="customer-tags">
<div class="header" slot="header"> <div
class="header"
slot="header"
>
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
...@@ -10,18 +13,31 @@ ...@@ -10,18 +13,31 @@
> >
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch"> <el-button
size="small"
type="primary"
@click="handleSearch"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<div class="statistics-wrap"> <div class="statistics-wrap">
<template v-for="(item, index) in statisticsData"> <template v-for="(item, index) in statisticsData">
<div class="statistics-box" :key="index"> <div
class="statistics-box"
:key="index"
>
<div class="title">{{ item.label }}</div> <div class="title">{{ item.label }}</div>
<div class="content" v-if="!item.innerHtml"> <div
class="content"
v-if="!item.innerHtml"
>
{{ queryInfo[item.key] }} {{ queryInfo[item.key] }}
</div> </div>
<div <div
...@@ -33,7 +49,10 @@ ...@@ -33,7 +49,10 @@
</template> </template>
</div> </div>
<div class="header-flex"> <div class="header-flex">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs
v-model="activeName"
@tab-click="handleClick"
>
<el-tab-pane <el-tab-pane
v-for="(item, index) in tabPaneList" v-for="(item, index) in tabPaneList"
:label="item.label" :label="item.label"
...@@ -43,7 +62,11 @@ ...@@ -43,7 +62,11 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div class="export-btn"> <div class="export-btn">
<el-button size="small" type="primary" @click="exportTable"> <el-button
size="small"
type="primary"
@click="exportTable"
>
导出 导出
</el-button> </el-button>
</div> </div>
...@@ -56,45 +79,47 @@ ...@@ -56,45 +79,47 @@
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
max-height="400px" max-height="400px"
> >
<template slot="polishContent" slot-scope="scope"> <template
slot="popoverHtml"
slot-scope="scope"
>
<template v-if="scope.scope[scope.prop]">
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
:content="scope.scope.polishContent" :content="formatterContent(scope.scope,scope.prop)"
placement="top" placement="top"
popper-class="text-tooltip" popper-class="text-tooltip"
> >
<span> <span>
{{ {{formatterContent(scope.scope,scope.prop, 20)}}
scope.scope.polishContent
? scope.scope.polishContent.length > 10
? scope.scope.polishContent.slice(0, 10) + "..."
: item.polishContent
: ""
}}
</span> </span>
</el-tooltip> </el-tooltip>
</template> </template>
<div slot="auth-button" slot-scope="scope"> <template v-else>-</template>
<el-button type="text" @click="handleDetail(scope.scope)" </template>
>详情</el-button <div
slot="auth-button"
slot-scope="scope"
> >
<el-button <el-button
type="text" type="text"
@click="handleDetail(scope.scope)"
>详情</el-button>
<el-button
type="text"
@click="handleStatistics(scope.scope)" @click="handleStatistics(scope.scope)"
v-if="scope.scope.pushStatus == 1" v-if="scope.scope.pushStatus == 1"
>统计</el-button >统计</el-button>
>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<el-button <el-button
type="primary" type="primary"
@click="$router.push('/verbalTrickManagement')" @click="$router.push('/verbalTrickManage/index')"
class="back-btn" class="back-btn"
> >
返回</el-button 返回</el-button>
>
<!-- 详细信息 --> <!-- 详细信息 -->
<detail-dialog <detail-dialog
:visible.sync="detailVisible" :visible.sync="detailVisible"
...@@ -118,7 +143,7 @@ import detailDialog from "./components/detailDialog" ...@@ -118,7 +143,7 @@ import detailDialog from "./components/detailDialog"
import StatisticsDialog from "./components/statisticsDialog.vue" import StatisticsDialog from "./components/statisticsDialog.vue"
export default { export default {
components: { detailDialog, StatisticsDialog }, components: { detailDialog, StatisticsDialog },
data() { data () {
return { return {
queryInfo: this.$route.query, queryInfo: this.$route.query,
id: "", id: "",
...@@ -172,9 +197,22 @@ export default { ...@@ -172,9 +197,22 @@ export default {
prop: "labelName" prop: "labelName"
}, },
{ {
label: "录音链接",
prop: "recordingUrl",
minWidth: 200,
addHtml: "popoverHtml"
},
{
label: "原文内容",
prop: "sourceContent",
minWidth: 200,
addHtml: "popoverHtml"
},
{
label: "话术内容", label: "话术内容",
prop: "polishContent", prop: "polishContent",
addHtml: "polishContent" minWidth: 200,
addHtml: "popoverHtml"
}, },
{ {
label: "更新时间", label: "更新时间",
...@@ -246,12 +284,12 @@ export default { ...@@ -246,12 +284,12 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
this.getSceceLabelList() this.getSceceLabelList()
}, },
methods: { methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
handleClick() { handleClick () {
if (this.activeName == 2) { if (this.activeName == 2) {
this.searchForm.pushStatus = "" this.searchForm.pushStatus = ""
} else { } else {
...@@ -260,16 +298,16 @@ export default { ...@@ -260,16 +298,16 @@ export default {
this.handleSearch() this.handleSearch()
}, },
handleDetail(data) { handleDetail (data) {
this.id = data.id this.id = data.id
this.detailVisible = true this.detailVisible = true
}, },
//统计 //统计
handleStatistics(data) { handleStatistics (data) {
this.id = data.id this.id = data.id
this.statisticsVisible = true this.statisticsVisible = true
}, },
beforeSearchFn(type = 1) { beforeSearchFn (type = 1) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.classCode = this.queryInfo.classCode this.searchFormSearch.classCode = this.queryInfo.classCode
...@@ -287,16 +325,16 @@ export default { ...@@ -287,16 +325,16 @@ export default {
resolve() resolve()
}) })
}, },
handleSearch() { handleSearch () {
this.page = this.$options.data.call(this).page this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true) this.$refs.table.refreshTable(true, true)
}, },
handleReset() { handleReset () {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.activeName = "2" this.activeName = "2"
this.handleSearch() this.handleSearch()
}, },
async exportTable() { async exportTable () {
try { try {
await this.beforeSearchFn() await this.beforeSearchFn()
const res = await recordExport({ const res = await recordExport({
...@@ -308,7 +346,7 @@ export default { ...@@ -308,7 +346,7 @@ export default {
} }
}, },
getSceceLabelList() { getSceceLabelList () {
getSceceLabelList({ classCode: this.queryInfo.classCode }) getSceceLabelList({ classCode: this.queryInfo.classCode })
.then((res) => { .then((res) => {
this.baseData.labelList = res this.baseData.labelList = res
...@@ -319,7 +357,7 @@ export default { ...@@ -319,7 +357,7 @@ export default {
// 捕获并传递错误 // 捕获并传递错误
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -342,7 +380,14 @@ export default { ...@@ -342,7 +380,14 @@ export default {
) )
} }
}) })
} },
formatterContent (cellValue, key, slice = 0) {
let str = cellValue[key]
if (str) {
if (slice && str.length > slice) str = `${Util.cutStr(str, slice)}`
} else str = ''
return str
},
} }
} }
</script> </script>
...@@ -396,5 +441,4 @@ export default { ...@@ -396,5 +441,4 @@ export default {
transform: translateX(-50%); transform: translateX(-50%);
top: 10px; top: 10px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<!-- 驻店目标配置 --> <!-- 驻店目标配置 -->
<template> <template>
<div class="in-store-list-wrap"> <div class="in-store-list-wrap">
<div class="header" slot="header"> <div
<el-tabs v-model="activeName" @tab-click="handleClick"> class="header"
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index"> slot="header"
>
<el-tabs
v-model="activeName"
@tab-click="handleClick"
>
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index"
>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<components :is="tabName" :scene-type="activeName"></components> <components
:is="tabName"
:scene-type="activeName"
></components>
</div> </div>
</div> </div>
</template> </template>
...@@ -15,6 +29,7 @@ import ExcellentList from "./ExcellentList.vue" ...@@ -15,6 +29,7 @@ import ExcellentList from "./ExcellentList.vue"
import ApprovalList from "./ApprovalList.vue" import ApprovalList from "./ApprovalList.vue"
import PushedList from "./PushedList.vue" import PushedList from "./PushedList.vue"
import NoPushedList from "./NoPushedList.vue" import NoPushedList from "./NoPushedList.vue"
import { Util } from "@/common/util"
export default { export default {
components: { components: {
ExcellentList, ExcellentList,
...@@ -22,7 +37,7 @@ export default { ...@@ -22,7 +37,7 @@ export default {
PushedList, PushedList,
NoPushedList NoPushedList
}, },
data() { data () {
return { return {
activeName: "0", activeName: "0",
tabPaneList: [ tabPaneList: [
...@@ -46,7 +61,7 @@ export default { ...@@ -46,7 +61,7 @@ export default {
tabName: "ExcellentList" tabName: "ExcellentList"
} }
}, },
mounted() { mounted () {
if (this.$route.params.tabPane) { if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel this.tabName = this.$route.params.tabLabel
...@@ -54,7 +69,7 @@ export default { ...@@ -54,7 +69,7 @@ export default {
}, },
watch: {}, watch: {},
methods: { methods: {
handleClick() { handleClick () {
const arr = { const arr = {
0: "ExcellentList", 0: "ExcellentList",
1: "ApprovalList", 1: "ApprovalList",
...@@ -62,7 +77,14 @@ export default { ...@@ -62,7 +77,14 @@ export default {
3: "NoPushedList" 3: "NoPushedList"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
} },
formatterContent (cellValue, key, slice = 0) {
let str = cellValue[key]
if (str) {
if (slice && str.length > slice) str = `${Util.cutStr(str, slice)}`
} else str = ''
return str
},
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!