Commit fc3a5d5b by 李伟康

话术管理迁移、新增字段

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