Commit 59f99a86 by xuyl

更改接口,修复标签展示问题,以及欢迎语没有回显问题

1 parent 05a7edfe
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http, http_tag } from '@/main' import { http } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop' let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getListApi = params => { const getListApi = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage' params.method = 'entmicro.api.staff.listFollowerStaffByPage'
...@@ -31,7 +31,7 @@ const getFollower = params => { ...@@ -31,7 +31,7 @@ const getFollower = params => {
const querylabeltree = params => { const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree' params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
params.sessionId = session params.sessionId = session
return http_tag({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -40,7 +40,7 @@ const querylabeltree = params => { ...@@ -40,7 +40,7 @@ const querylabeltree = params => {
} }
const queryCrowdtree = params => { const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree' params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http_tag({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
......
...@@ -303,8 +303,8 @@ export default { ...@@ -303,8 +303,8 @@ export default {
}) })
this.tagJson = tagJsonList this.tagJson = tagJsonList
this.autoWelcome = res.autoWelcome == '0' ? true : false this.autoWelcome = res.autoWelcome == '0' ? true : false
if (res.welcomeInfo && res.welcomeInfo.length != 0) { if (res.welcomeList && res.welcomeList.length != 0) {
const previewList = res.welcomeInfo.map(item => { const previewList = res.welcomeList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent) if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item return item
}) })
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
<div slot="visitCont" slot-scope="scope"> <div slot="visitCont" slot-scope="scope">
<div class="visitCont" @click="visitCisitCont(scope.scope.cardName)">{{ scope.scope.visitCont }}</div> <div class="visitCont" @click="visitCisitCont(scope.scope.cardName)">{{ scope.scope.visitCont || '--' }}</div>
</div> </div>
<div slot="qrCode" slot-scope="scope"> <div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="400" trigger="hover"> <el-popover placement="bottom" width="400" trigger="hover">
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
</div> </div>
</div> </div>
</el-popover> </el-popover>
<template v-if="scope.scope.tagJson && scope.scope.tagJson.length <= 3 && scope.scope.tagJson.length > 0"> <template v-if="JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length <= 3 && JSON.parse(scope.scope.tagJson).length > 0">
<div v-for="(item, index) in scope.scope.tagJson" :key="index"> <div v-for="(item, index) in JSON.parse(scope.scope.tagJson)" :key="index">
<GLTitle :content="item.name" class="accountType-row accountType-row-tag"></GLTitle> <GLTitle :content="item.name" class="accountType-row accountType-row-tag"></GLTitle>
</div> </div>
</template> </template>
<div v-if="!scope.scope.tagJson || (scope.scope.tagJson && scope.scope.tagJson.length == 0)">--</div> <div v-if="!JSON.parse(scope.scope.tagJson) || (JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length == 0)">--</div>
</div> </div>
<div slot="cardName" slot-scope="scope"> <div slot="cardName" slot-scope="scope">
<div class="codeName">{{ scope.scope.cardName }}</div> <div class="codeName">{{ scope.scope.cardName }}</div>
...@@ -238,24 +238,10 @@ export default { ...@@ -238,24 +238,10 @@ export default {
} }
this.loading = true this.loading = true
// this.$apis.channel.listChannelCodeByPage
this.$apis.businessCard.getBussinessCardListApi(params).then(res => { this.$apis.businessCard.getBussinessCardListApi(params).then(res => {
this.loading = false this.loading = false
if (res) { if (res) {
this.tableData = res.data this.tableData = res.data
this.tableData.forEach(item => {
this.$set(item, 'tagJsonList', [])
const tagJson = eval(item.tagJson)
if (tagJson && tagJson.length > 0) {
tagJson.forEach(itm => {
let name = itm.name.split(',')
name.forEach((tag, index) => {
item.tagJsonList.push({ name: tag })
console.log(item.tagJsonList)
})
})
}
})
this.tableTotal = res.count this.tableTotal = res.count
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!