Commit 7df16b48 by 前端

Merge branch 'v2.11.0' of http://192.168.3.233:8090/saas/scrm-micro-custom into xuyl_dev_v3.5.0

2 parents 28125d45 2812dc2a
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"echarts": "^5.2.0", "echarts": "^5.2.0",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.4.7", "glsx-components": "^1.5.2",
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"jquery": "^3.6.0", "jquery": "^3.6.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
......
<template> <template>
<div> <div class="gl-form-page gl-form-min">
<el-form :model="ruleForm" :rules="rules" :label-position="labelPosition" :label-width="labelWidth" :size="size"> <el-form :model="ruleForm" :rules="rules" :label-position="labelPosition" :size="size">
<el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden"> <el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="item.type === 'input'"> <template v-if="item.type === 'input'">
...@@ -75,10 +75,10 @@ export default { ...@@ -75,10 +75,10 @@ export default {
type: String, type: String,
default: 'small' default: 'small'
}, },
labelWidth: { // labelWidth: {
type: String, // type: String,
default: '100px' // default: '100px'
} // }
}, },
mounted() {}, mounted() {},
methods: { methods: {
......
...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) {
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
return new Http({ request: { timeout: 3000 } }).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2') return new Http({ request: { timeout: 3000 } }).get('https://oss-config.dev.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
//开发环境mock //开发环境mock
// return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2') // return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2')
} }
......
import { getCustomersList, exportLabelList } from '@/api/modules/tagsManage' import {
import { getStaffList } from '@/api/modules/clientManage' getCustomersList,
exportLabelList
} from '@/api/modules/tagsManage'
import {
getStaffList
} from '@/api/modules/clientManage'
export default { export default {
data() { data() {
return { return {
...@@ -24,15 +29,20 @@ export default { ...@@ -24,15 +29,20 @@ export default {
this.tagHeight = 0 this.tagHeight = 0
} }
this.allListParams = [] this.allListParams = []
this.sopListParams = []
const tagNode = this.$common.utils.deepClone(this.tagCheckItem) const tagNode = this.$common.utils.deepClone(this.tagCheckItem)
tagNode.forEach(group_item => { tagNode.forEach(group_item => {
group_item.children.forEach(label_item => { group_item.children.forEach(label_item => {
if (label_item) { if (label_item) {
this.allListParams.push({ this.allListParams.push({
groupId: group_item.id, groupId: group_item.id,
groupName: group_item.name, // groupName: group_item.name,
groupType: group_item.labelType, groupType: group_item.labelType,
labelId: label_item.id, labelId: label_item.id,
// labelName: label_item.name
})
this.sopListParams.push({
labelGroupName: group_item.name,
labelName: label_item.name labelName: label_item.name
}) })
} }
...@@ -71,12 +81,14 @@ export default { ...@@ -71,12 +81,14 @@ export default {
value: item.staffName value: item.staffName
} }
}) })
staff.unshift({ label: '全部', value: '' }) staff.unshift({
label: '全部',
value: ''
})
this.$nextTick(() => { this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff this.tagsPartFormList[id].optionList = staff
}) })
}) })
}, },
tagLength(children) { tagLength(children) {
...@@ -137,7 +149,10 @@ export default { ...@@ -137,7 +149,10 @@ export default {
//导出 //导出
handleExport() { handleExport() {
const params = { const params = {
...JSON.parse(JSON.stringify({ tagLists: this.allListParams })), ...JSON.parse(JSON.stringify({
tagLists: this.allListParams
})),
...this.searchForm,
combineType: 2 combineType: 2
} }
exportLabelList(params).then(res => { exportLabelList(params).then(res => {
...@@ -147,14 +162,16 @@ export default { ...@@ -147,14 +162,16 @@ export default {
//客户列表 //客户列表
getCustomersListData() { getCustomersListData() {
if (this.searchForm.createTime) { if (this.searchForm.createTime) {
this.searchForm.beginTime = new Date(this.searchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/') this.searchForm.beginCarBuyDate = new Date(this.searchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.searchForm.endTime = new Date(this.searchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/') this.searchForm.endCarBuyDate = new Date(this.searchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} }
delete this.searchForm.createTime delete this.searchForm.createTime
const tagLists = this.$common.utils.deepClone(this.allListParams) const tagLists = this.$common.utils.deepClone(this.allListParams)
this.userLoading = true this.userLoading = true
const params = { const params = {
...JSON.parse(JSON.stringify({ tagLists })), ...JSON.parse(JSON.stringify({
tagLists
})),
...JSON.parse(JSON.stringify(this.searchForm)), ...JSON.parse(JSON.stringify(this.searchForm)),
combineType: 2, combineType: 2,
pageSize: this.$refs.viewCustomers.page.pageSize, pageSize: this.$refs.viewCustomers.page.pageSize,
...@@ -184,7 +201,6 @@ export default { ...@@ -184,7 +201,6 @@ export default {
}, },
//创建人群 //创建人群
groupConfirmDialog() { groupConfirmDialog() {
if (this.tagCheckItem.length == 0) { if (this.tagCheckItem.length == 0) {
this.$message.error('必须选择一个标签') this.$message.error('必须选择一个标签')
return return
...@@ -196,7 +212,10 @@ export default { ...@@ -196,7 +212,10 @@ export default {
const tagCombine = this.allListParams.reduce((prev, cur) => { const tagCombine = this.allListParams.reduce((prev, cur) => {
const index = prev.findIndex(group => cur.groupId == group.groupId) const index = prev.findIndex(group => cur.groupId == group.groupId)
if (index == -1) { if (index == -1) {
return prev.concat({ groupId: cur.groupId, labelIdList: [cur.labelId] }) return prev.concat({
groupId: cur.groupId,
labelIdList: [cur.labelId]
})
} else { } else {
prev[index].labelIdList.push(cur.labelId) prev[index].labelIdList.push(cur.labelId)
return prev return prev
......
<template> <template>
<div> <div>
<GLDialog :title="dialogTitle" :visible.sync="groupVisible"> <GLDialog :title="dialogTitle" :visible.sync="groupVisible" mode="big">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="grouping-ruleForm"> <div class="gl-form-page gl-form-min" >
<el-form-item label="分群名称" prop="crowdGroupName" size="small"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="grouping-ruleForm">
<el-input v-model="ruleForm.crowdGroupName" placeholder="请输入分群名称" maxlength="30" show-word-limit></el-input> <el-form-item label="分群名称:" prop="crowdGroupName" size="small">
<el-input class="crowdGroupName" v-model="ruleForm.crowdGroupName" placeholder="请输入分群名称" maxlength="30" show-word-limit></el-input>
</el-form-item> </el-form-item>
<el-form-item label="分群描述" size="small"> <el-form-item label="分群描述:" size="small">
<el-input v-model="ruleForm.crowdGroupDesc" placeholder="请输入分群描述" maxlength="100" show-word-limit></el-input> <el-input class="crowdGroupDesc" v-model="ruleForm.crowdGroupDesc" type="textarea" placeholder="请输入分群描述" maxlength="100" show-word-limit></el-input>
</el-form-item> </el-form-item>
<el-form-item label="概览是否展示" size="small"> <el-form-item label="概览是否展示:" size="small">
<el-radio-group v-model="ruleForm.isDisplay"> <el-radio-group v-model="ruleForm.isDisplay">
<el-radio :label="1">是</el-radio> <el-radio :label="1">是</el-radio>
<el-radio :label="2">否</el-radio> <el-radio :label="2">否</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="选择展示位" size="small" v-show="ruleForm.isDisplay == 1"> <el-form-item label="选择展示位:" size="small" v-show="ruleForm.isDisplay == 1">
<el-select v-model="ruleForm.displayLoc" placeholder="请选择"> <el-select v-model="ruleForm.displayLoc" placeholder="请选择">
<el-option v-for="item in 12" :key="item" :label="`${item}号展示位`" :value="item"></el-option> <el-option v-for="item in 12" :key="item" :label="`${item}号展示位`" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择人群" size="small"> <el-form-item label="选择人群:" size="small">
<div class="group-tree-container"> <div class="group-tree-container">
<div class="group-tree-panel" :style="{ height: heightBox + 'px' }"> <div class="group-tree-panel" :style="{ height: heightBox + 'px' }">
<template v-for="(item, index) in crowdUnitList"> <template v-for="(item, index) in crowdUnitList">
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="groupVisible = false">取 消</el-button> <el-button plain size="small" class="btn-three" @click="groupVisible = false">取 消</el-button>
<el-button type="primary" size="small" @click="handleSelect">提 交</el-button> <el-button type="primary" size="small" @click="handleSelect">提 交</el-button>
...@@ -205,7 +207,7 @@ export default { ...@@ -205,7 +207,7 @@ export default {
crowdGroup = 'addCrowdGroup' crowdGroup = 'addCrowdGroup'
} }
this.$apis.crowdManage[crowdGroup](params).then(res => { this.$apis.crowdManage[crowdGroup](params).then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
this.groupVisible = false this.groupVisible = false
this.$message.success('操作成功') this.$message.success('操作成功')
...@@ -262,7 +264,7 @@ export default { ...@@ -262,7 +264,7 @@ export default {
arr2.push(item.crowdId) arr2.push(item.crowdId)
} }
}) })
this.setTreeChecked(arr1, arr2) this.setTreeChecked(arr1, arr2)
}, },
setTreeChecked(arr1, arr2) { setTreeChecked(arr1, arr2) {
...@@ -364,6 +366,12 @@ export default { ...@@ -364,6 +366,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.crowdGroupDesc {
padding-right: 56px;
}
.crowdGroupName{
padding-right: 50px;
}
.group-tree-container { .group-tree-container {
display: flex; display: flex;
.group-tree-operation { .group-tree-operation {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="back color-58 font-14" @click="goBack">返回人群管理</div> <div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div> </div>
<div class="main-container"> <div class="main-container">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="tagsPartFormList" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="formSearch" :formObj="searchForm" :formData="tagsPartFormList" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="main-container-head flex-between"> <div class="main-container-head flex-between">
<div class="main-container-head-title color-3 font-20"> <div class="main-container-head-title color-3 font-20">
全部客户 全部客户
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
</div> </div>
<div> <div>
<el-button size="small" @click="handleExport" class="export">导出</el-button> <el-button size="small" @click="handleExport" class="export">导出</el-button>
<el-button plain size="small" @click="createMarketSOP()"> <el-button plain size="small" @click="createMarketSOP()">营销SOP</el-button>
营销SOP
</el-button>
</div> </div>
</div> </div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
...@@ -72,15 +70,16 @@ export default { ...@@ -72,15 +70,16 @@ export default {
corwdId: '', //传到营销SOP的crowId corwdId: '', //传到营销SOP的crowId
getListApi: this.$route.params.crowdType == '1' || this.$route.params.crowdType == '2' ? getcrowdManageList : getCustomerList, getListApi: this.$route.params.crowdType == '1' || this.$route.params.crowdType == '2' ? getcrowdManageList : getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: { searchForm: {
customerPhone: '', // customerPhone: '',
nickName: '', // nickName: '',
customerName: '', // customerName: '',
followStaff: '', // followStaff: '',
audi: '', // audi: '',
carNumber: '', // carNumber: '',
isJoin: '' // isJoin: ''
}, },
tableSearchForm: {},
tagsPartFormList: [ tagsPartFormList: [
{ {
type: 'select', type: 'select',
...@@ -126,6 +125,29 @@ export default { ...@@ -126,6 +125,29 @@ export default {
label: '否' label: '否'
} }
] ]
},
{
type: 'datePicker',
name: 'daterange',
label: '购车时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'input',
inputType: 'text',
name: 'carVin',
label: '车架号'
},
{
type: 'input',
inputType: 'text',
name: 'carNumber',
label: '车牌号'
} }
], ],
crowdForm: {}, crowdForm: {},
...@@ -243,6 +265,24 @@ export default { ...@@ -243,6 +265,24 @@ export default {
this.getStaffList() this.getStaffList()
}, },
methods: { methods: {
beforeSearchFn() {
return new Promise(async (resolve, reject) => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.crowdType == 1 || this.crowdType == 2) params.customCrowd = true
if (params.daterange) {
params.beginCarBuyDate = params.daterange[0]
params.endCarBuyDate = params.daterange[1]
} else {
if (params.beginCarBuyDate) delete params.beginCarBuyDate && delete params.endCarBuyDate
}
delete params.daterange
return params
},
// 跳转到营销SOP // 跳转到营销SOP
async createMarketSOP() { async createMarketSOP() {
let marketQuery let marketQuery
...@@ -275,7 +315,7 @@ export default { ...@@ -275,7 +315,7 @@ export default {
} }
} }
params.info.crowdList.push(marketQuery) params.info.crowdList.push(marketQuery)
this.$common.utils.storage.set('sopInfo', params) this.$common.utils.storage.set('sopInfo', params)
this.$history.push({ this.$history.push({
path: 'marketing/sop/editSop' path: 'marketing/sop/editSop'
...@@ -300,20 +340,19 @@ export default { ...@@ -300,20 +340,19 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff this.tagsPartFormList[id].optionList = staff
}) })
}) })
}, },
handleSearch() { handleSearch() {
this.$refs.groupRef.refreshTable() this.$refs.groupRef.refreshTable()
}, },
handleReset() { handleReset() {
this.tableSearchForm = { this.searchForm = {
crowdId: this.id crowdId: this.id
} }
this.$refs.groupRef.refreshTable() this.$refs.groupRef.refreshTable()
}, },
init(id) { init(id) {
this.tableSearchForm = { this.searchForm = {
crowdId: id crowdId: id
} }
// 通过人群Id查询人群详情 // 通过人群Id查询人群详情
...@@ -338,12 +377,9 @@ export default { ...@@ -338,12 +377,9 @@ export default {
}, },
//导出 //导出
handleExport() { handleExport() {
var params = { var params = this.getParams()
crowdId: this.id, params.pageSize = 10
pageSize: 10, params.pageNum = 1
pageNum: 1
}
if (this.crowdType == 1 || this.crowdType == 2) params.customCrowd = true
customerClusterListExport(params).then(res => { customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
}) })
......
...@@ -33,11 +33,16 @@ ...@@ -33,11 +33,16 @@
<el-tooltip effect="dark" placement="top"> <el-tooltip effect="dark" placement="top">
<div class="qiweiItem" slot="content"> <div class="qiweiItem" slot="content">
<span class="qiweiItemNick">{{ item.nickName }}</span> <span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span> <span class="qiweiItemCrop"
:class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName
}}</span>
</div> </div>
<div class="qiweiItem" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']"> <div class="qiweiItem"
:class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">
<span class="qiweiItemNick">{{ item.nickName }}</span> <span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span> <span class="qiweiItemCrop"
:class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName
}}</span>
</div> </div>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -45,7 +50,9 @@ ...@@ -45,7 +50,9 @@
</div> </div>
<p> <p>
<span>联系电话:</span> <span>联系电话:</span>
<span class="ellipsis-1" v-if="leftPanelInfo.customerPhone || leftPanelInfo.status == -1">{{ leftPanelInfo.customerPhone }}</span> <span class="ellipsis-1"
v-if="leftPanelInfo.customerPhone || leftPanelInfo.status == -1">{{ leftPanelInfo.customerPhone
}}</span>
<span <span
class="phone-fill" class="phone-fill"
v-else v-else
...@@ -63,24 +70,28 @@ ...@@ -63,24 +70,28 @@
</p> </p>
<p> <p>
<span>性别:</span> <span>性别:</span>
<span class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? '未知' : leftPanelInfo.customerSex == 1 ? '男' : leftPanelInfo.customerSex == 2 ? '女' : '' }}</span> <span
class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? "未知" : leftPanelInfo.customerSex == 1 ? "男" : leftPanelInfo.customerSex == 2 ? "女" : ""
}}</span>
</p> </p>
<p> <p>
<span>企业简称:</span> <span>企业简称:</span>
<span class="ellipsis-1">{{ leftPanelInfo.corpName || '待完善' }}</span> <span class="ellipsis-1">{{ leftPanelInfo.corpName || "待完善" }}</span>
</p> </p>
<p> <p>
<span>职务:</span> <span>职务:</span>
<span class="ellipsis-1">{{ leftPanelInfo.position || '待完善' }}</span> <span class="ellipsis-1">{{ leftPanelInfo.position || "待完善" }}</span>
</p> </p>
<p v-if="leftPanelInfo.type == 2"> <p v-if="leftPanelInfo.type == 2">
<span>类型:</span> <span>类型:</span>
<span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span> <span
class="ellipsis-1">{{ leftPanelInfo.type == 1 ? "微信用户" : leftPanelInfo.type == 2 ? "企微用户" : ""
}}</span>
</p> </p>
<p> <p>
<span>是否加入企微:</span> <span>是否加入企微:</span>
<!-- 1-是,2-否 --> <!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span> <span>{{ leftPanelInfo.isJoin == 1 ? "是" : leftPanelInfo.isJoin == 0 ? "否" : "" }}</span>
</p> </p>
<template v-if="isCgacar"> <template v-if="isCgacar">
<p> <p>
...@@ -97,7 +108,7 @@ ...@@ -97,7 +108,7 @@
<p> <p>
<span>当前状态:</span> <span>当前状态:</span>
<span>{{ leftPanelInfo.status == -1 ? '删除好友' : leftPanelInfo.status == 0 ? '正常' : '' }}</span> <span>{{ leftPanelInfo.status == -1 ? "删除好友" : leftPanelInfo.status == 0 ? "正常" : "" }}</span>
</p> </p>
<p> <p>
...@@ -135,13 +146,15 @@ ...@@ -135,13 +146,15 @@
<span class="font-14 color-58">收起</span> <span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-up color-58"></i> <i class="el-icon-arrow-up color-58"></i>
</div> </div>
<div class="expande-button" @click="expandeClick(true, 'expande')" v-if="vehicleTableData.length > 1 && !expande"> <div class="expande-button" @click="expandeClick(true, 'expande')"
v-if="vehicleTableData.length > 1 && !expande">
<span class="font-14 color-58">更多车辆</span> <span class="font-14 color-58">更多车辆</span>
<i class="el-icon-arrow-down color-58"></i> <i class="el-icon-arrow-down color-58"></i>
</div> </div>
</div> </div>
<layout-row class="layout-detail" :layoutData="vehicleTableData" :layoutParams="vehicleTableParams" :isHidden="expande"></layout-row> <layout-row class="layout-detail" :layoutData="vehicleTableData" :layoutParams="vehicleTableParams"
:isHidden="expande"></layout-row>
<template v-if="deviceTableData.length > 0"> <template v-if="deviceTableData.length > 0">
<div class="public-text"> <div class="public-text">
<div class="public-text-info font-16 flex"> <div class="public-text-info font-16 flex">
...@@ -152,31 +165,36 @@ ...@@ -152,31 +165,36 @@
<span class="font-14 color-58">收起</span> <span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-up color-58"></i> <i class="el-icon-arrow-up color-58"></i>
</div> </div>
<div class="expande-button" @click="expandeClick(true, 'deviceExpande')" v-if="deviceTableData.length > 1 && !deviceExpande"> <div class="expande-button" @click="expandeClick(true, 'deviceExpande')"
v-if="deviceTableData.length > 1 && !deviceExpande">
<span class="font-14 color-58">更多设备</span> <span class="font-14 color-58">更多设备</span>
<i class="el-icon-arrow-down color-58"></i> <i class="el-icon-arrow-down color-58"></i>
</div> </div>
</div> </div>
<layout-row class="layout-detail" :layoutData="deviceTableData" :layoutParams="deviceTableParams" :isHidden="deviceExpande"></layout-row> <layout-row class="layout-detail" :layoutData="deviceTableData" :layoutParams="deviceTableParams"
:isHidden="deviceExpande"></layout-row>
</template> </template>
<template v-if="guaranteeTableData.length > 0"> <template v-if="guaranteeTableData.length > 0">
<div class="public-text"> <div class="public-text">
<div class="public-text-info font-16 flex"> <div class="public-text-info font-16 flex">
保单信息 <!-- 保单信息-->
{{isCgacar?'数字化权益':'售前权益'}}
<span class="font-14 color-58">{{ guaranteeTableData.length || 0 }}个</span> <span class="font-14 color-58">{{ guaranteeTableData.length || 0 }}个</span>
</div> </div>
<div class="expande-button" v-if="guaranteeExpande" @click="expandeClick(false, 'guaranteeExpande')"> <div class="expande-button" v-if="guaranteeExpande" @click="expandeClick(false, 'guaranteeExpande')">
<span class="font-14 color-58">收起</span> <span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-up color-58"></i> <i class="el-icon-arrow-up color-58"></i>
</div> </div>
<div class="expande-button" @click="expandeClick(true, 'guaranteeExpande')" v-if="guaranteeTableData.length > 1 && !guaranteeExpande"> <div class="expande-button" @click="expandeClick(true, 'guaranteeExpande')"
<span class="font-14 color-58">更多保单</span> v-if="guaranteeTableData.length > 1 && !guaranteeExpande">
<span class="font-14 color-58">更多权益</span>
<i class="el-icon-arrow-down color-58"></i> <i class="el-icon-arrow-down color-58"></i>
</div> </div>
</div> </div>
<layout-row class="layout-detail" :layoutData="guaranteeTableData" :layoutParams="guaranteeTableParams" :isHidden="guaranteeExpande"></layout-row> <layout-row class="layout-detail" :layoutData="guaranteeTableData" :layoutParams="guaranteeTableParams"
:isHidden="guaranteeExpande"></layout-row>
</template> </template>
<div class="public-text"> <div class="public-text">
<div class="public-text-info font-16 flex"> <div class="public-text-info font-16 flex">
...@@ -185,16 +203,18 @@ ...@@ -185,16 +203,18 @@
</div> </div>
</div> </div>
<!--2. 员工跟进表 --> <!--2. 员工跟进表 -->
<GLTable :hasNum="false" class="table" :tableData="employTableList" :hasPage="false" :tableParams="employTableParams" :headerStyle="{ height: '54px' }"></GLTable> <GLTable :hasNum="false" class="table" :tableData="employTableList" :hasPage="false"
:tableParams="employTableParams" :headerStyle="{ height: '54px' }"></GLTable>
<div class="public-text"> <div class="public-text">
<div class="public-text-info font-16 flex"> <div class="public-text-info font-16 flex">
所属群聊 所属群聊
<span class="font-14 color-58">{{ clientGroupTableList.length || 0 }}个</span> <span class="font-14 color-58">{{ clientGroupTableList.length || 0 }}个</span>
</div> </div>
</div> </div>
<GLTable class="table" :hasNum="false" :tableData="clientGroupTableList" :hasPage="false" :tableParams="clientGroupTableParams" :headerStyle="{ height: '54px' }"> <GLTable class="table" :hasNum="false" :tableData="clientGroupTableList" :hasPage="false"
:tableParams="clientGroupTableParams" :headerStyle="{ height: '54px' }">
<span slot="groupName" slot-scope="scope" class="groupName"> <span slot="groupName" slot-scope="scope" class="groupName">
<span>{{ scope.scope.groupName || '群聊(默认)' }}</span> <span>{{ scope.scope.groupName || "群聊(默认)" }}</span>
</span> </span>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button> <el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button>
...@@ -209,22 +229,30 @@ ...@@ -209,22 +229,30 @@
<tip-panel class="mg2" panelMinHeight="45px" :panelContent="panelContent"></tip-panel> <tip-panel class="mg2" panelMinHeight="45px" :panelContent="panelContent"></tip-panel>
<!-- v-if="userType == 2" --> <!-- v-if="userType == 2" -->
<el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2">设置标签</el-button> <el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2">
<GLTable class="table" ref="clientTagsListRef" :hasNum="false" :noDataImg="url" noDataText="客户暂无已添加的标签" :tableData="clientTagsList" :hasPage="false" :tableParams="tagsParams" :headerStyle="{ height: '54px' }"> 设置标签
</el-button>
<GLTable class="table" ref="clientTagsListRef" :hasNum="false" :noDataImg="url"
noDataText="客户暂无已添加的标签" :tableData="clientTagsList" :hasPage="false"
:tableParams="tagsParams" :headerStyle="{ height: '54px' }">
<span slot="labelGroupInfo" slot-scope="scope"> <span slot="labelGroupInfo" slot-scope="scope">
<span>{{ scope.scope.labelGroupInfo.labelGroupName }}</span> <span>{{ scope.scope.labelGroupInfo.labelGroupName }}</span>
</span> </span>
<span slot="labelInfoList" slot-scope="scope"> <span slot="labelInfoList" slot-scope="scope">
<div id="allTagsWrap" class="allTagsWrap"> <div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelInfoList)" :key="index" class="ellipsis-1 tag-box-wrap"> <span v-for="(item, index) in showTagArray(scope.scope.labelInfoList)" :key="index"
class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.labelName" placement="top"> <el-tooltip class="item" :content="item.labelName" placement="top">
<span>{{ item.labelName }}</span> <span>{{ item.labelName }}</span>
</el-tooltip> </el-tooltip>
</span> </span>
<el-popover v-if="scope.scope.labelInfoList.length > 9" class="ellipsis-1 tag-box-wrap" placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover v-if="scope.scope.labelInfoList.length > 9" class="ellipsis-1 tag-box-wrap" placement="top"
width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.labelInfoList.length }})</span> <span slot="reference">...({{ scope.scope.labelInfoList.length }})</span>
<div class="entmicro-hover" style="height: 214px; overflow-y: auto"> <div class="entmicro-hover" style="height: 214px; overflow-y: auto">
<el-tag type="info" class="ellipsis-1" style="margin-right: 10px; margin-bottom: 10px; max-width: 200px" v-for="(i, sindex) in scope.scope.labelInfoList" :key="sindex" :disable-transitions="false"> <el-tag type="info" class="ellipsis-1"
style="margin-right: 10px; margin-bottom: 10px; max-width: 200px"
v-for="(i, sindex) in scope.scope.labelInfoList" :key="sindex" :disable-transitions="false">
<el-tooltip class="item" :content="i.labelName" placement="top"> <el-tooltip class="item" :content="i.labelName" placement="top">
<span>{{ i.labelName }}</span> <span>{{ i.labelName }}</span>
</el-tooltip> </el-tooltip>
...@@ -252,11 +280,12 @@ ...@@ -252,11 +280,12 @@
<el-button type="primary" size="small" @click="phoneConfirmDialog">确 定</el-button> <el-button type="primary" size="small" @click="phoneConfirmDialog">确 定</el-button>
</span> </span>
</GLDialog> </GLDialog>
<GLDialog :title="tagsDialogTitle" :isDestroyClose="true" :btnLoading="sloading" :isShowThirdBtn="true" :isShowCloseBtn="true" @btnEvent="goNewTag" :visible.sync="tagsVisible" > <GLDialog class="tags" :title="tagsDialogTitle" :isDestroyClose="true" :btnLoading="sloading" :isShowThirdBtn="true"
:isShowCloseBtn="true" @btnEvent="goNewTag" :visible.sync="tagsVisible">
<div> <div>
<p class="hint-text color-6"> <p class="hint-text color-6">
<span class="color-3">说明:</span> <span class="color-3">说明:</span>
仅支持{{ '企业' | tagType }}标签 仅支持{{ "企业" | tagType }}标签
<span v-if="merchantModel == 1">和自店标签</span> <span v-if="merchantModel == 1">和自店标签</span>
进行人工维护和设置 进行人工维护和设置
</p> </p>
...@@ -269,7 +298,9 @@ ...@@ -269,7 +298,9 @@
<div class="label-name white-hide color-71 mt10">{{ labels.labelGroup.name }}:</div> <div class="label-name white-hide color-71 mt10">{{ labels.labelGroup.name }}:</div>
<div class="label-value flex"> <div class="label-value flex">
<template v-for="(label, i) in labels.labelList"> <template v-for="(label, i) in labels.labelList">
<div :class="['label', 'color-3', 'white-hide', 'mt10', label.checked ? 'isChecked' : '']" :style="{ width: label.name.length > 10 ? '145px' : auto }" :key="label.id" @click="choose(index, ids, i)"> <div :class="['label', 'color-3', 'white-hide', 'mt10', label.checked ? 'isChecked' : '']"
:style="{ width: label.name.length > 10 ? '145px' : auto }" :key="label.id"
@click="choose(index, ids, i)">
<template v-if="label.name.length < 10">{{ label.name }}</template> <template v-if="label.name.length < 10">{{ label.name }}</template>
<el-tooltip class="item" :content="label.name" placement="top" v-else> <el-tooltip class="item" :content="label.name" placement="top" v-else>
<span>{{ label.name }}</span> <span>{{ label.name }}</span>
...@@ -285,7 +316,7 @@ ...@@ -285,7 +316,7 @@
</template> </template>
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="handleClose">取 消</el-button> <el-button plain size="small" class="btn-three" @click="handleClose">取 消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确 定</el-button> <el-button type="primary" size="small" @click="handleConfirm">确 定</el-button>
</span> </span>
...@@ -294,26 +325,34 @@ ...@@ -294,26 +325,34 @@
</template> </template>
<script> <script>
import { getAllTagTree, getSingleClientTag, addSingleClientTag, getTableDetail, perfectCustomerPhone } from '@/api/modules/clientManage' import {
import tipPanel from '@/components/tipPanel/index.vue' getAllTagTree,
import url from '@/assets/clientDetail/noDataBox.png' getSingleClientTag,
addSingleClientTag,
getTableDetail,
perfectCustomerPhone
} from "@/api/modules/clientManage";
import tipPanel from "@/components/tipPanel/index.vue";
import url from "@/assets/clientDetail/noDataBox.png";
export default { export default {
name: 'clientDetail', name: "clientDetail",
components: { components: {
tipPanel tipPanel
}, },
data() { data() {
return { return {
contactPhone: '', contactPhone: "",
isShowBaseInfo: true, isShowBaseInfo: true,
isShowTooltip: false, isShowTooltip: false,
remark: '', remark: "",
sloading: false, sloading: false,
loading: false, loading: false,
expande: false, //车辆 expande: false, //车辆
deviceExpande: false, //设备 deviceExpande: false, //设备
guaranteeExpande: false, //保单 guaranteeExpande: false, //保单
panelContent: this.$globalState.session.merchantModel == 1 ? '说明:标签信息包含跟进员工标记的集团标签和自店标签,以及通过大数据算法生成的系统标签' : '说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签', panelContent: this.$globalState.session.merchantModel == 1 ? "说明:标签信息包含跟进员工标记的集团标签和自店标签,以及通过大数据算法生成的系统标签" : "说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签",
url: url, url: url,
leftPanelInfo: {}, leftPanelInfo: {},
labelIdList: [], //存放用户被标记标签的id labelIdList: [], //存放用户被标记标签的id
...@@ -321,180 +360,180 @@ export default { ...@@ -321,180 +360,180 @@ export default {
vehicleTableData: [], vehicleTableData: [],
vehicleTableParams: [ vehicleTableParams: [
{ {
label: '车架号:', label: "车架号:",
prop: 'standNo', prop: "standNo",
addHtml: 'standNo' addHtml: "standNo"
}, },
{ {
label: '车牌号:', label: "车牌号:",
prop: 'vehicleNo' prop: "vehicleNo"
}, },
{ {
label: '发动机号:', label: "发动机号:",
prop: 'engineNumber' prop: "engineNumber"
}, },
{ {
label: '车辆品牌:', label: "车辆品牌:",
prop: 'vehicleBrand' prop: "vehicleBrand"
}, },
{ {
label: '车系:', label: "车系:",
prop: 'vehicleTrain' prop: "vehicleTrain"
}, },
{ {
label: '车型:', label: "车型:",
prop: 'vehicleType' prop: "vehicleType"
}, },
{ {
label: '车身颜色:', label: "车身颜色:",
prop: 'vehicleColor' prop: "vehicleColor"
}, },
{ {
label: '购车价格:', label: "购车价格:",
prop: 'vehiclePrice' prop: "vehiclePrice"
}, },
{ {
label: '购车时间:', label: "购车时间:",
prop: 'buyTime' prop: "buyTime"
}, },
{ {
label: '最近保养时间:', label: "最近保养时间:",
prop: 'maintRecTime' prop: "maintRecTime"
}, },
{ {
label: '保险开始时间:', label: "车险起保时间:",
prop: 'insBgnTime' prop: "insBgnTime"
}, },
{ {
label: '保险到期时间:', label: "车险终保时间:",
prop: 'insEndTime' prop: "insEndTime"
} }
], ],
deviceTableData: [], deviceTableData: [],
deviceTableParams: [ deviceTableParams: [
{ {
label: '设备号(SN/IMEI):', label: "设备号(SN/IMEI):",
prop: 'sn', prop: "sn",
addHtml: 'standNo' addHtml: "standNo"
},
{
label: '设备流量卡(ICCID):',
prop: 'iccId'
},
{
label: '设备类型:',
prop: 'deviceType'
},
{
label: '设备型号:',
prop: 'deviceModel'
},
{
label: '验证码:',
prop: 'verificationCode'
}, },
{ {
label: '批次号:', label: "设备流量卡(ICCID):",
prop: 'batchNo' prop: "iccId"
}, },
{ {
label: '绑定车辆(车架号):', label: "设备类型:",
prop: 'standNo' prop: "deviceType"
}, },
// {
// label: '设备型号:',
// prop: 'deviceModel'
// },
// {
// label: '验证码:',
// prop: 'verificationCode'
// },
// {
// label: '批次号:',
// prop: 'batchNo'
// },
{ {
label: '设备激活时间:', label: "绑定车辆(车架号):",
prop: 'deviceActiveTime' prop: "standNo"
} }
// {
// label: '设备激活时间:',
// prop: 'deviceActiveTime'
// }
], ],
guaranteeTableData: [], //保单 guaranteeTableData: [], //保单
guaranteeTableParams: [ guaranteeTableParams: [
{ {
label: '保单号:', label: "单号:",
prop: 'attInsureOrder', prop: "attInsureOrder",
addHtml: 'standNo' addHtml: "standNo"
}, },
{ {
label: '产品名称:', label: "权益名称:",
prop: 'attProductName' prop: "attProductName"
}, },
{ {
label: '服务期限:', label: "服务期限:",
prop: 'attServicePeriod' prop: "attServicePeriod"
}, },
{ {
label: '服务公司:', label: "服务公司:",
prop: 'attServiceCompany' prop: "attServiceCompany"
}, },
{ {
label: '保险生效时间:', label: "生效时间:",
prop: 'attInsureStartTime' prop: "attInsureStartTime"
}, },
{ {
label: '保险到期时间:', label: "到期时间:",
prop: 'attInsureEndTime' prop: "attInsureEndTime"
}, },
{ {
label: '保险提单时间:', label: "提报时间:",
prop: 'attInsureSubmitTime' prop: "attInsureSubmitTime"
}, },
{ {
label: '绑定车辆:', label: "绑定车辆:",
prop: 'standNo' prop: "standNo"
} }
], ],
//员工跟进 //员工跟进
employTableParams: { employTableParams: {
listName: 'staffFollows', listName: "staffFollows",
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '跟进员工', label: "跟进员工",
prop: 'staffName', prop: "staffName",
align: 'left', align: "left",
minWidth: 120 minWidth: 120
}, },
{ {
label: '所属部门', label: "所属部门",
prop: 'departmentName', prop: "departmentName",
align: 'left', align: "left",
line: 1, line: 1,
width: 120 width: 120
}, },
{ {
label: '添加时间', label: "添加时间",
prop: 'addTime', prop: "addTime",
minWidth: 180, minWidth: 180,
align: 'left' align: "left"
}, },
{ {
label: '来源', label: "来源",
prop: 'addWayName', prop: "addWayName",
width: 90 width: 90
}, },
{ {
label: '添加类型', label: "添加类型",
prop: 'addType', prop: "addType",
addHtml: 'addType', addHtml: "addType",
width: 170, width: 170,
align: 'left' align: "left"
}, },
{ {
label: '备注手机号', label: "备注手机号",
prop: 'remarkMobiles', prop: "remarkMobiles",
minWidth: 140, minWidth: 140,
align: 'left' align: "left"
}, },
{ {
label: '备注', label: "备注",
prop: 'remark', prop: "remark",
align: 'left', align: "left",
line: 1, line: 1,
width: 230 width: 230
}, },
{ {
label: '描述', label: "描述",
prop: 'description', prop: "description",
align: 'left', align: "left",
line: 1, line: 1,
width: 150 width: 150
} }
...@@ -503,46 +542,46 @@ export default { ...@@ -503,46 +542,46 @@ export default {
employTableList: [], employTableList: [],
clientGroupTableList: [], clientGroupTableList: [],
clientGroupTableParams: { clientGroupTableParams: {
listName: 'customerBases', listName: "customerBases",
tableColumns: [ tableColumns: [
{ {
label: '群聊名称', label: "群聊名称",
prop: 'groupName', prop: "groupName",
addHtml: 'groupName', addHtml: "groupName",
align: 'left', align: "left",
width: 260 width: 260
}, },
{ {
label: '群主', label: "群主",
prop: 'groupHostName', prop: "groupHostName",
align: 'left', align: "left",
line: 1, line: 1,
width: 200 width: 200
}, },
{ {
label: '客户数', label: "客户数",
prop: 'membersNumber', prop: "membersNumber",
align: 'left', align: "left",
width: 180 width: 180
}, },
{ {
label: '本群昵称', label: "本群昵称",
prop: 'groupNickName', prop: "groupNickName",
align: 'left', align: "left",
line: 1, line: 1,
width: 200 width: 200
}, },
{ {
label: '入群时间', label: "入群时间",
prop: 'joinTime', prop: "joinTime",
align: 'left', align: "left",
width: 200 width: 200
}, },
{ {
label: '操作', label: "操作",
prop: 'optionBtns', prop: "optionBtns",
addHtml: 'optionBtns', addHtml: "optionBtns",
fixed: 'right' fixed: "right"
} }
] ]
// tableOption:{ // tableOption:{
...@@ -554,33 +593,33 @@ export default { ...@@ -554,33 +593,33 @@ export default {
clientTagsList: [], clientTagsList: [],
nickNameList: [], nickNameList: [],
tagsParams: { tagsParams: {
listName: 'labelInfos', listName: "labelInfos",
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '标签组', label: "标签组",
prop: 'labelGroupInfo', prop: "labelGroupInfo",
addHtml: 'labelGroupInfo', addHtml: "labelGroupInfo",
width: '230' width: "230"
}, },
{ {
label: '标签组类型', label: "标签组类型",
prop: 'labelGroupInfo', prop: "labelGroupInfo",
formatter: cellValue => { formatter: cellValue => {
return cellValue.labelGroupInfo.labelGroupType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : cellValue.labelGroupInfo.labelGroupType return cellValue.labelGroupInfo.labelGroupType == "企业标签" && this.$globalState.session.merchantModel == 1 ? "集团标签" : cellValue.labelGroupInfo.labelGroupType;
}, },
width: '160' width: "160"
}, },
{ {
label: '已打标签', label: "已打标签",
prop: 'labelInfoList', prop: "labelInfoList",
addHtml: 'labelInfoList', addHtml: "labelInfoList",
align: 'left' align: "left"
} }
] ]
}, },
//弹窗数据 //弹窗数据
tagsDialogTitle: '设置标签', tagsDialogTitle: "设置标签",
tagsVisible: false, tagsVisible: false,
phoneVisible: false, phoneVisible: false,
companyTagsList: [], companyTagsList: [],
...@@ -596,22 +635,22 @@ export default { ...@@ -596,22 +635,22 @@ export default {
userid: 0, //小龙需要用户id userid: 0, //小龙需要用户id
staffId: 0, staffId: 0,
isCgacar: false isCgacar: false
} };
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId this.merchantId = this.$globalState.session.merchantId;
this.merchantModel = this.$globalState.session.merchantModel this.merchantModel = this.$globalState.session.merchantModel;
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel;
this.userType = this.$globalState.session.userType this.userType = this.$globalState.session.userType;
} }
if (location.host.includes('cgacar')) { if (location.host.includes("cgacar")) {
this.isCgacar = true this.isCgacar = true;
} }
this.id = this.$route.query.id ? this.$route.query.id : '' this.id = this.$route.query.id ? this.$route.query.id : "";
this.getPageDetail() this.getPageDetail();
//舍弃调用小龙的获取单用户标签的接口 //舍弃调用小龙的获取单用户标签的接口
// this.getSingleClientTag(this.$route.query.id, this.merchantId) // this.getSingleClientTag(this.$route.query.id, this.merchantId)
}, },
...@@ -622,40 +661,40 @@ export default { ...@@ -622,40 +661,40 @@ export default {
// } else { // } else {
// return val.length // return val.length
// } // }
if (val && JSON.stringify(val[0]) === '{}') { if (val && JSON.stringify(val[0]) === "{}") {
return 0 return 0;
} else { } else {
return val.length return val.length;
} }
} }
}, },
methods: { methods: {
// 切换基本信息的显示 // 切换基本信息的显示
switchBaseInfo() { switchBaseInfo() {
this.isShowBaseInfo = !this.isShowBaseInfo this.isShowBaseInfo = !this.isShowBaseInfo;
}, },
expandeClick(value, data) { expandeClick(value, data) {
this[data] = value this[data] = value;
}, },
closePanel() { closePanel() {
this.isFirstShow = false this.isFirstShow = false;
}, },
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index;
this.$nextTick(() => { this.$nextTick(() => {
if (this.currentIndex == 2 && this.clientTagsList.length <= 0) { if (this.currentIndex == 2 && this.clientTagsList.length <= 0) {
this.$refs.clientTagsListRef.setTableHeightFun() this.$refs.clientTagsListRef.setTableHeightFun();
// this.$refs.clientTagsListRef.tableHeightValues = // this.$refs.clientTagsListRef.tableHeightValues =
} }
}) });
}, },
showTagArray(list) { showTagArray(list) {
if (list.length == 0) { if (list.length == 0) {
return [] return [];
} }
return list.slice(0, 9) return list.slice(0, 9);
}, },
/* * /* *
用途:js中字符串超长作固定长度加省略号(...)处理 用途:js中字符串超长作固定长度加省略号(...)处理
...@@ -665,92 +704,92 @@ export default { ...@@ -665,92 +704,92 @@ export default {
*/ */
myStandNo(standNo) { myStandNo(standNo) {
if (!standNo) { if (!standNo) {
return '' return "";
} }
return standNo.substring(standNo.length - 6) return standNo.substring(standNo.length - 6);
}, },
beautySub(value) { beautySub(value) {
if (value && value.length >= 6) { if (value && value.length >= 6) {
return value.substring(0, 5) + '...' return value.substring(0, 5) + "...";
} else { } else {
return value return value;
} }
}, },
addTypeToLable(num) { addTypeToLable(num) {
return num === 0 ? '成员主动添加' : num === 1 ? '客户主动添加' : num === 2 ? '成员共享/管理员分配' : '' return num === 0 ? "成员主动添加" : num === 1 ? "客户主动添加" : num === 2 ? "成员共享/管理员分配" : "";
}, },
goDetail(id, name) { goDetail(id, name) {
var newname = name || '群聊(默认)' var newname = name || "群聊(默认)";
this.$router.push({ this.$router.push({
path: '/clientGroupManage/clientGroupDetail', path: "/clientGroupManage/clientGroupDetail",
query: { query: {
id: id, id: id,
groupName: newname groupName: newname
} }
}) });
}, },
//oneId,merchantId,仅为测试用 //oneId,merchantId,仅为测试用
getSingleClientTag(oneId = 14120314541863, merchantId = 10001001) { getSingleClientTag(oneId = 14120314541863, merchantId = 10001001) {
let param = { let param = {
'req.oneId': oneId, "req.oneId": oneId,
'req.merchantIdsStr': merchantId, "req.merchantIdsStr": merchantId,
'req.edition': this.merchantModel "req.edition": this.merchantModel
} };
getSingleClientTag(param) getSingleClientTag(param)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
if (!res.userLabelUnitList) { if (!res.userLabelUnitList) {
return return;
} }
let filterArr = [] let filterArr = [];
res.userLabelUnitList.forEach(item => { res.userLabelUnitList.forEach(item => {
filterArr.push(...item.labelInfoList) filterArr.push(...item.labelInfoList);
}) });
this.tagsList = filterArr this.tagsList = filterArr;
this.labelIdList = filterArr.map(item => item.labelId) this.labelIdList = filterArr.map(item => item.labelId);
// //
} else { } else {
this.$message.error(res.message) this.$message.error(res.message);
} }
}) })
.catch(err => { .catch(err => {
console.error(err, '捕获错误') console.error(err, "捕获错误");
}) });
}, },
async getPageDetail(id = this.$route.query.id) { async getPageDetail(id = this.$route.query.id) {
this.loading = true this.loading = true;
const res = await getTableDetail({ oneId: id }) const res = await getTableDetail({ oneId: id });
this.loading = false this.loading = false;
if (!res) { if (!res) {
return false return false;
} }
this.userid = res.userid this.userid = res.userid;
this.staffId = res.staffId this.staffId = res.staffId;
this.leftPanelInfo = res.info this.leftPanelInfo = res.info;
this.vehicleTableData = res.vehicleInfoList || [{}] this.vehicleTableData = res.vehicleInfoList || [{}];
this.deviceTableData = res.deviceInfoList || [] this.deviceTableData = res.deviceInfoList || [];
this.guaranteeTableData = res.insureInfoList || [] //保单 this.guaranteeTableData = res.insureInfoList || []; //保单
this.employTableList = res.staffFollows || [] this.employTableList = res.staffFollows || [];
this.clientGroupTableList = res.customerBases || [] this.clientGroupTableList = res.customerBases || [];
this.tagsList = res.labels || [] this.tagsList = res.labels || [];
this.labelIdList = this.handleLabelId(res.labelInfos) this.labelIdList = this.handleLabelId(res.labelInfos);
this.clientTagsList = res.labelInfos || [] this.clientTagsList = res.labelInfos || [];
this.nickNameList = res.nickNameList || [] this.nickNameList = res.nickNameList || [];
}, },
handleLabelId(data) { handleLabelId(data) {
let array = [] let array = [];
data && data &&
data.forEach(label => { data.forEach(label => {
label.labelInfoList.forEach(info => { label.labelInfoList.forEach(info => {
array.push(info.labelId) array.push(info.labelId);
}) });
}) });
return array return array;
}, },
goNewTag() { goNewTag() {
this.$router.push({ path: '/tagsManage/index' }) this.$router.push({ path: "/tagsManage/index" });
}, },
// goBack() { // goBack() {
// this.$router.go(-1) // this.$router.go(-1)
...@@ -758,191 +797,199 @@ export default { ...@@ -758,191 +797,199 @@ export default {
//点击添加按钮 //点击添加按钮
btnClick(pType, scope) { btnClick(pType, scope) {
switch (pType) { switch (pType) {
case 'create': case "create":
this.tagsDialogTitle = '设置标签' this.tagsDialogTitle = "设置标签";
this.getAllTags() this.getAllTags();
// this.handleClose(); // this.handleClose();
break break;
case 'edit': case "edit":
this.tagsDialogTitle = '编辑标签' this.tagsDialogTitle = "编辑标签";
//调编辑的接口 //调编辑的接口
} }
}, },
getAllTags() { getAllTags() {
getAllTagTree({ 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel, 'labelTreeReq.pageNum': 1, 'labelTreeReq.pageSize': 3000 }) getAllTagTree({
"labelTreeReq.shopId": this.merchantId,
"labelTreeReq.edition": this.merchantModel,
"labelTreeReq.pageNum": 1,
"labelTreeReq.pageSize": 3000
})
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
let allTagsList = [ let allTagsList = [
{ {
labelType: '', labelType: "",
children: [] children: []
}, },
{ {
labelType: '', labelType: "",
children: [] children: []
} }
] ];
res.data.labelTreeRets.forEach(labels => { res.data.labelTreeRets.forEach(labels => {
labels.labelList.forEach(ele => { labels.labelList.forEach(ele => {
ele.checked = false ele.checked = false;
ele.original = false ele.original = false;
this.labelIdList.forEach(id => { this.labelIdList.forEach(id => {
if (id == ele.id) { if (id == ele.id) {
ele.checked = true ele.checked = true;
ele.old = 1 ele.old = 1;
} }
}) });
}) });
if (labels.labelType == '企业标签') { if (labels.labelType == "企业标签") {
allTagsList[0].labelType = this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签' allTagsList[0].labelType = this.$globalState.session.merchantModel == 1 ? "集团标签" : "企业标签";
allTagsList[0].children.push(labels) allTagsList[0].children.push(labels);
} else if (labels.labelType == '自店标签') { } else if (labels.labelType == "自店标签") {
allTagsList[1].labelType = '自店标签' allTagsList[1].labelType = "自店标签";
allTagsList[1].children.push(labels) allTagsList[1].children.push(labels);
} }
}) });
this.allTagsList = allTagsList this.allTagsList = allTagsList;
// //
} else { } else {
this.$message.error(res.message) this.$message.error(res.message);
} }
}) })
.catch(err => { .catch(err => {
console.error(err, '捕获错误') console.error(err, "捕获错误");
}) });
this.handleClose() this.handleClose();
}, },
phoneConfirmDialog() { phoneConfirmDialog() {
if (!this.contactPhone) { if (!this.contactPhone) {
this.$message.error('请输入联系号码') this.$message.error("请输入联系号码");
return return;
} }
if (!/^1[3456789]\d{9}$/.test(this.contactPhone)) { if (!/^1[3456789]\d{9}$/.test(this.contactPhone)) {
this.$message.error('联系电话不符合要求,请重新输入!') this.$message.error("联系电话不符合要求,请重新输入!");
return return;
} }
const userIdList = this.nickNameList.map(item => item.userId) const userIdList = this.nickNameList.map(item => item.userId);
let param = { let param = {
pageSize: 1, pageSize: 1,
pageNum: 1, pageNum: 1,
customerPhone: this.contactPhone, customerPhone: this.contactPhone,
userIdList userIdList
} };
this.loading = true this.loading = true;
perfectCustomerPhone(param).then(res => { perfectCustomerPhone(param).then(res => {
this.loading = false this.loading = false;
if (res) { if (res) {
this.getPageDetail(res) this.getPageDetail(res);
this.$message.success('设置成功') this.$message.success("设置成功");
} }
}) });
this.phoneVisible = false this.phoneVisible = false;
}, },
handleConfirm() { handleConfirm() {
this.sloading = true this.sloading = true;
let labelIdAddList = [] // 新增的标签 let labelIdAddList = []; // 新增的标签
let labelIdDelList = [] //取消的标签 let labelIdDelList = []; //取消的标签
this.allTagsList.forEach(labels => { this.allTagsList.forEach(labels => {
labels.children.forEach(ele => { labels.children.forEach(ele => {
ele.labelList.forEach(tag => { ele.labelList.forEach(tag => {
if (tag.old == '1' && !tag.checked) { if (tag.old == "1" && !tag.checked) {
labelIdDelList.push(tag.id) labelIdDelList.push(tag.id);
} }
if (!tag.old && tag.checked) { if (!tag.old && tag.checked) {
labelIdAddList.push(tag.id) labelIdAddList.push(tag.id);
} }
}) });
}) });
}) });
const userIdList = this.nickNameList.map(item => item.userId) const userIdList = this.nickNameList.map(item => item.userId);
let param = { let param = {
'req.OneId': this.id, "req.OneId": this.id,
'req.merchantId': this.merchantId, "req.merchantId": this.merchantId,
'req.uuId': this.userid, "req.uuId": this.userid,
'req.staffId': this.staffId, "req.staffId": this.staffId,
'req.labelIdAddList': labelIdAddList, "req.labelIdAddList": labelIdAddList,
'req.labelIdDelList': labelIdDelList, "req.labelIdDelList": labelIdDelList,
'req.userIdList': userIdList "req.userIdList": userIdList
} };
addSingleClientTag(param) addSingleClientTag(param)
.then(res => { .then(res => {
if (res.data.code == 0) { if (res.data.code == 0) {
this.sloading = false this.sloading = false;
this.$message.success('设置成功') this.$message.success("设置成功");
this.handleClose() this.handleClose();
// this.getSingleClientTag(this.id, this.merchantId) // this.getSingleClientTag(this.id, this.merchantId)
this.getPageDetail() //刷新当前页面 this.getPageDetail(); //刷新当前页面
} else { } else {
this.sloading = false this.sloading = false;
this.$message.error(res.data.message) this.$message.error(res.data.message);
} }
}) })
.catch(err => { .catch(err => {
this.sloading = false this.sloading = false;
console.error(err, '错误捕获') console.error(err, "错误捕获");
}) })
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false;
}) });
}, },
handleClose() { handleClose() {
// if (this.tagsVisible) { // if (this.tagsVisible) {
// this.companyTagsList = [] // this.companyTagsList = []
// this.ownShopTagsList = [] // this.ownShopTagsList = []
// } // }
// //
this.tagsVisible = !this.tagsVisible this.tagsVisible = !this.tagsVisible;
this.allTagsList = [] this.allTagsList = [];
}, },
checkNewTag(checked, j, arr, original = false) { checkNewTag(checked, j, arr, original = false) {
//打开弹窗就是选中的,不许去选中,不是一开始就选中的,可以去选中 //打开弹窗就是选中的,不许去选中,不是一开始就选中的,可以去选中
if (checked && original) { if (checked && original) {
return false return false;
} }
arr.forEach((item, index) => { arr.forEach((item, index) => {
if (index == j) { if (index == j) {
item.checked = !item.checked item.checked = !item.checked;
} }
}) });
let _arr = [] //筛选出只有checked:true的数组(包含了标签组对象和labelList数组) let _arr = []; //筛选出只有checked:true的数组(包含了标签组对象和labelList数组)
_arr = this.allTagsList _arr = this.allTagsList
.map(item => { .map(item => {
return { return {
...item, ...item,
labelList: item.labelList.filter(e => { labelList: item.labelList.filter(e => {
if (e.checked && !e.original) { if (e.checked && !e.original) {
return e return e;
} }
}) })
} };
}) })
.filter(ele => { .filter(ele => {
if (ele.labelList.length) { if (ele.labelList.length) {
return ele return ele;
} }
}) });
this.submitTagsList = _arr this.submitTagsList = _arr;
}, },
choose(index1, index2, index3) { choose(index1, index2, index3) {
this.allTagsList[index1].children[index2].labelList[index3].checked = !this.allTagsList[index1].children[index2].labelList[index3].checked this.allTagsList[index1].children[index2].labelList[index3].checked = !this.allTagsList[index1].children[index2].labelList[index3].checked;
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
@import '@/styles/resetelement.scss'; @import '@/styles/resetelement.scss';
.pure-green-text { .pure-green-text {
color: #61cc43; color: #61cc43;
} }
.pure-yello-text { .pure-yello-text {
color: #fb8f28; color: #fb8f28;
} }
.phone-fill { .phone-fill {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
...@@ -951,26 +998,32 @@ export default { ...@@ -951,26 +998,32 @@ export default {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.dialog-form { .dialog-form {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 30px; padding: 30px;
label { label {
width: 100px; width: 100px;
} }
} }
.newStyle { .newStyle {
display: flex; display: flex;
font-size: 14px; font-size: 14px;
margin: 20px 0; margin: 20px 0;
.nameListItem { .nameListItem {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.qiweiItem { .qiweiItem {
max-width: 140px; max-width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
.qiweiItemNick { .qiweiItemNick {
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
...@@ -979,6 +1032,7 @@ export default { ...@@ -979,6 +1032,7 @@ export default {
line-height: 20px; line-height: 20px;
font-weight: 400; font-weight: 400;
} }
.qiweiItemCrop { .qiweiItemCrop {
margin-left: 2px; margin-left: 2px;
height: 20px; height: 20px;
...@@ -1007,20 +1061,23 @@ export default { ...@@ -1007,20 +1061,23 @@ export default {
// min-width: 98px; // min-width: 98px;
} }
} }
.overHidden { .overHidden {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.scrm-sub-client-container { .scrm-sub-client-container {
.container { .container {
display: flex; display: flex;
width: 100%; width: 100%;
margin-top: 20px; margin-top: 20px;
min-height: calc(100vh - 194px); min-height: calc(100vh - 194px);
overflow-y: auto; overflow-y: auto;
margin-bottom: 78px; margin-bottom: 78px;
.leftWrap { .leftWrap {
width: 275px; width: 275px;
min-height: calc(100vh - 170px); min-height: calc(100vh - 170px);
...@@ -1029,22 +1086,28 @@ export default { ...@@ -1029,22 +1086,28 @@ export default {
// padding: 0 20px; // padding: 0 20px;
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
.customerID { .customerID {
font-size: 14px; font-size: 14px;
} }
.leftWrapTop { .leftWrapTop {
.leftWrapBottom { .leftWrapBottom {
text-align: left; text-align: left;
} }
padding: 0 20px; padding: 0 20px;
.baseInfo { .baseInfo {
padding-top: 5px; padding-top: 5px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
span { span {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.iconStyle { .iconStyle {
width: 16px; width: 16px;
height: 16px; height: 16px;
...@@ -1052,9 +1115,11 @@ export default { ...@@ -1052,9 +1115,11 @@ export default {
} }
} }
} }
.avatorStyle { .avatorStyle {
padding-bottom: 5px; padding-bottom: 5px;
} }
.avator { .avator {
margin: 0 auto; margin: 0 auto;
margin-top: 40px; margin-top: 40px;
...@@ -1070,6 +1135,7 @@ export default { ...@@ -1070,6 +1135,7 @@ export default {
height: 100%; height: 100%;
} }
} }
p { p {
position: relative; position: relative;
margin-top: 20px; margin-top: 20px;
...@@ -1085,6 +1151,7 @@ export default { ...@@ -1085,6 +1151,7 @@ export default {
min-width: 98px; min-width: 98px;
text-align: right; text-align: right;
} }
span:nth-child(2) { span:nth-child(2) {
display: inline-block; display: inline-block;
height: 20px; height: 20px;
...@@ -1096,6 +1163,7 @@ export default { ...@@ -1096,6 +1163,7 @@ export default {
} }
} }
} }
.rightWrap { .rightWrap {
height: auto; height: auto;
margin-left: 10px; margin-left: 10px;
...@@ -1111,6 +1179,7 @@ export default { ...@@ -1111,6 +1179,7 @@ export default {
top: 0; top: 0;
display: flex; display: flex;
background-color: $bgColor; background-color: $bgColor;
.tabItemText { .tabItemText {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
...@@ -1125,10 +1194,12 @@ export default { ...@@ -1125,10 +1194,12 @@ export default {
&:first-child { &:first-child {
border-left: 0; border-left: 0;
} }
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #37383a; color: #37383a;
} }
.activeItemText { .activeItemText {
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
color: $btnBlue; color: $btnBlue;
...@@ -1137,26 +1208,32 @@ export default { ...@@ -1137,26 +1208,32 @@ export default {
border-bottom: 0 !important; border-bottom: 0 !important;
} }
} }
.addTagBtn { .addTagBtn {
margin-bottom: 10px; margin-bottom: 10px;
margin-left: 20px; margin-left: 20px;
} }
// 处理客户标签的样式 // 处理客户标签的样式
.clientTagsWrap { .clientTagsWrap {
/deep/ .el-table:before { /deep/ .el-table:before {
background-color: #fff !important; background-color: #fff !important;
} }
/deep/ .el-table__empty-block { /deep/ .el-table__empty-block {
height: auto; height: auto;
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
/deep/ .glsx-table .emptyBg .noDataImg { /deep/ .glsx-table .emptyBg .noDataImg {
margin-top: 0; margin-top: 0;
} }
.allTagsWrap { .allTagsWrap {
position: relative; position: relative;
.tag-box-wrap { .tag-box-wrap {
display: inline-block; display: inline-block;
...@@ -1180,6 +1257,7 @@ export default { ...@@ -1180,6 +1257,7 @@ export default {
} }
} }
} }
.showOverTooltip { .showOverTooltip {
display: -webkit-box; display: -webkit-box;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -1193,17 +1271,21 @@ export default { ...@@ -1193,17 +1271,21 @@ export default {
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
margin-bottom: 10px; margin-bottom: 10px;
&:not(:first-child) { &:not(:first-child) {
margin-top: 40px; margin-top: 40px;
} }
span { span {
vertical-align: middle; vertical-align: middle;
} }
span:first-child { span:first-child {
font-size: 18px; font-size: 18px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
span:nth-child(2) { span:nth-child(2) {
margin-left: 6px; margin-left: 6px;
font-size: 14px; font-size: 14px;
...@@ -1213,6 +1295,7 @@ export default { ...@@ -1213,6 +1295,7 @@ export default {
line-height: 20px; line-height: 20px;
} }
} }
.tagsWrap { .tagsWrap {
min-height: 74px; min-height: 74px;
border: 1px solid #e8e8ea; border: 1px solid #e8e8ea;
...@@ -1220,6 +1303,7 @@ export default { ...@@ -1220,6 +1303,7 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
.tag { .tag {
display: inline-block; display: inline-block;
margin-top: 22px; margin-top: 22px;
...@@ -1240,12 +1324,14 @@ export default { ...@@ -1240,12 +1324,14 @@ export default {
// text-overflow: ellipsis; // text-overflow: ellipsis;
max-width: 178px; max-width: 178px;
} }
.addTag { .addTag {
width: 68px; width: 68px;
height: 26px; height: 26px;
color: #fff; color: #fff;
background: $btnBlue; background: $btnBlue;
border-radius: 4px; border-radius: 4px;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
} }
...@@ -1253,6 +1339,7 @@ export default { ...@@ -1253,6 +1339,7 @@ export default {
} }
} }
} }
.footer-panel { .footer-panel {
position: fixed; position: fixed;
bottom: 0px; bottom: 0px;
...@@ -1262,6 +1349,7 @@ export default { ...@@ -1262,6 +1349,7 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 999; z-index: 999;
div { div {
display: inline-block; display: inline-block;
position: relative; position: relative;
...@@ -1271,39 +1359,47 @@ export default { ...@@ -1271,39 +1359,47 @@ export default {
margin-left: -110px; margin-left: -110px;
} }
} }
.tags { .tags {
/deep/.app-dialog { /deep/ .app-dialog {
.container { .container {
padding: 32px 74px; padding: 32px 74px;
} }
} }
.hint-text { .hint-text {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
// color: #666; // color: #666;
line-height: 18px; line-height: 18px;
} }
.mg10 { .mg10 {
margin-left: 38px; margin-left: 38px;
} }
.mt10 { .mt10 {
margin-top: 10px; margin-top: 10px;
} }
.labels-wrap { .labels-wrap {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
margin-top: 20px; margin-top: 20px;
.label-group-name { .label-group-name {
margin-bottom: 2px; margin-bottom: 2px;
font-weight: 600; font-weight: 600;
} }
.labels { .labels {
.label-name { .label-name {
box-sizing: border-box; box-sizing: border-box;
font-weight: 400; font-weight: 400;
} }
.label { .label {
height: 26px; height: 26px;
background: #fafbfe; background: #fafbfe;
...@@ -1317,8 +1413,10 @@ export default { ...@@ -1317,8 +1413,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
} }
.isChecked { .isChecked {
border: 1px solid #5850ff !important; border: 1px solid #5850ff !important;
.select-icon { .select-icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
...@@ -1330,8 +1428,10 @@ export default { ...@@ -1330,8 +1428,10 @@ export default {
} }
} }
} }
.general-wrap { .general-wrap {
margin: 0 0 20px 0; margin: 0 0 20px 0;
.public-text { .public-text {
width: 100%; width: 100%;
height: 58px; height: 58px;
...@@ -1341,38 +1441,47 @@ export default { ...@@ -1341,38 +1441,47 @@ export default {
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
margin-bottom: 20px; margin-bottom: 20px;
&-info { &-info {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
span { span {
margin-left: 8px; margin-left: 8px;
} }
} }
.expande-button { .expande-button {
position: absolute; position: absolute;
right: 20px; right: 20px;
top: 0; top: 0;
.el-icon-arrow-down { .el-icon-arrow-down {
font-size: 10px; font-size: 10px;
margin-left: 7px; margin-left: 7px;
} }
.el-icon-arrow-up { .el-icon-arrow-up {
font-size: 10px; font-size: 10px;
margin-left: 7px; margin-left: 7px;
} }
} }
} }
.layout-detail { .layout-detail {
margin: 0 20px; margin: 0 20px;
} }
.table { .table {
margin-bottom: 10px; margin-bottom: 10px;
padding: 0 20px; padding: 0 20px;
} }
} }
.table { .table {
padding: 0 20px; padding: 0 20px;
.groupName { .groupName {
white-space: nowrap; white-space: nowrap;
} }
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
<GLButton size="small" @click="handleExport" fn="导出">导出</GLButton> <GLButton size="small" @click="handleExport" fn="导出">导出</GLButton>
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams"> <GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName ? scope.scope.customerName : '--' }}</GLFull> <GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName ? scope.scope.customerName : '--' }}</GLFull>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <!-- <span slot="customerSex" slot-scope="scope" >-->
<span slot="customerSex" slot-scope="scope" >
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span> <span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
</span> </span>
<!-- 企微名称 --> <!-- 企微名称 -->
...@@ -236,12 +237,12 @@ export default { ...@@ -236,12 +237,12 @@ export default {
// mutiSelectUniqueKey: 'id', // mutiSelectUniqueKey: 'id',
tableColumns: [ tableColumns: [
{ // {
label: '客户ID', // label: '客户ID',
prop: 'oneId', // prop: 'oneId',
width: 290, // width: 290,
line: 1 // line: 1
}, // },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
...@@ -342,9 +343,6 @@ export default { ...@@ -342,9 +343,6 @@ export default {
flushTime: false flushTime: false
} }
}, },
// activated() {
// this.searchTable()
// },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
...@@ -443,21 +441,11 @@ export default { ...@@ -443,21 +441,11 @@ export default {
setTableHeightEvent() { setTableHeightEvent() {
this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.setTableHeightFun()
}, },
setTableFinishFun(content) { setTableFinishFun() {
//关闭默认时间30天再刷新,showDefaultTime也要设置false
// if (!this.flushTime) {
// this.flushTime = true
// this.searchTable()
// }
//接收到的数据为空
// if (!this.$refs.clientManage.data.length) {
// this.$refs.clientManage.setTableHeightFun()
// }
this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun()
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) { if (params.daterange) {
params.beginTime = this.searchForm.daterange[0] params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1] params.endTime = this.searchForm.daterange[1]
...@@ -475,26 +463,13 @@ export default { ...@@ -475,26 +463,13 @@ export default {
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
// return new Promise((resolve, reject) => { return new Promise(async (resolve) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise(async (resolve, reject) => {
if (Object.keys(this.$route.query).length && this.queryFlag == 0) { if (Object.keys(this.$route.query).length && this.queryFlag == 0) {
const res = JSON.parse(window.localStorage.getItem('sourceList')) const res = JSON.parse(window.localStorage.getItem('sourceList'))
let add_way = this.$route.query.addWay || '' let add_way = this.$route.query.addWay || ''
let isJoinVal = this.$route.query.isJoin || null let isJoinVal = this.$route.query.isJoin || null
let addWayObj = res.find(i => i.label === add_way) let addWayObj = res.find(i => i.label === add_way)
let addWayVal = addWayObj.value this.searchForm.addWay = addWayObj.value
this.searchForm.addWay = addWayVal
this.searchForm.isJoin = isJoinVal === null ? null : Number(isJoinVal) this.searchForm.isJoin = isJoinVal === null ? null : Number(isJoinVal)
setTimeout(() => { setTimeout(() => {
this.$refs.combiForm.expandFn() this.$refs.combiForm.expandFn()
...@@ -568,7 +543,7 @@ export default { ...@@ -568,7 +543,7 @@ export default {
}, },
//导出 //导出
handleExport() { handleExport() {
var params = this.getParams() let params = this.getParams()
clientManageExportApi(params).then(res => { clientManageExportApi(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
}) })
...@@ -675,8 +650,6 @@ export default { ...@@ -675,8 +650,6 @@ export default {
} }
} }
padding: 20px 20px 30px; padding: 20px 20px 30px;
// min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 10px; margin-left: 10px;
......
...@@ -3,29 +3,31 @@ ...@@ -3,29 +3,31 @@
<div class="container" id="container"> <div class="container" id="container">
<div> <div>
<div class="title">创建人群</div> <div class="title">创建人群</div>
<div class="info-box"> <div class="info-box" >
<el-form class="create-form" :model="crowdForm" :rules="crowdRules" ref="crowdForm" label-width="118px"> <div class="gl-form-page">
<div class="el-form-line"> <el-form class="create-form" :model="crowdForm" :rules="crowdRules" ref="crowdForm">
<el-form-item label="人群名称:" prop="crowdName"> <div class="el-form-line">
<el-input v-model.trim="crowdForm.crowdName" size="small" placeholder="请输入人群名称" maxlength="60"></el-input> <el-form-item label="人群名称:" prop="crowdName">
</el-form-item> <el-input v-model.trim="crowdForm.crowdName" size="small" placeholder="请输入人群名称" maxlength="60"></el-input>
<span class="limited">最多30个字符</span> </el-form-item>
</div> <span class="limited">最多30个字符</span>
<div class="el-form-line"> </div>
<el-form-item label="人群描述:"> <div class="el-form-line">
<el-input v-model.trim="crowdForm.crowdDesc" size="small" placeholder="请输入人群描述" maxlength="200"></el-input> <el-form-item label="人群描述:">
</el-form-item> <el-input v-model.trim="crowdForm.crowdDesc" size="small" placeholder="请输入人群描述" maxlength="200"></el-input>
<span class="limited">最多100个字符</span> </el-form-item>
</div> <span class="limited">最多100个字符</span>
<div class="el-form-line"> </div>
<el-form-item label="标签筛选:" class="label-word"> <div class="el-form-line">
<div class="flex"> <el-form-item label="标签筛选:" class="label-word">
<div class="font-14 color-58 mr2 hand" @click="open('dialogRuleVisible')">人群规则说明</div> <div class="flex">
<div class="font-14 color-58 hand" @click="open('dialogLogicVisible')">人群规则逻辑</div> <div class="font-14 color-58 mr2 hand" @click="open('dialogRuleVisible')">人群规则说明</div>
</div> <div class="font-14 color-58 hand" @click="open('dialogLogicVisible')">人群规则逻辑</div>
</el-form-item> </div>
</div> </el-form-item>
</el-form> </div>
</el-form>
</div>
<div class="label-wrap"> <div class="label-wrap">
<div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom }" id="boxFixed"> <div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom }" id="boxFixed">
<template v-if="this.selectedArray.length > 0"> <template v-if="this.selectedArray.length > 0">
...@@ -489,7 +491,7 @@ export default { ...@@ -489,7 +491,7 @@ export default {
} }
}, },
//选择标签 //选择标签
selectTag(data) { selectTag(data) {
this.tableData.forEach(item => { this.tableData.forEach(item => {
...@@ -502,7 +504,7 @@ export default { ...@@ -502,7 +504,7 @@ export default {
}) })
}, },
// 添加已选标签 // 添加已选标签
selectedLabelFn(groupData, data) { selectedLabelFn(groupData, data) {
this.addClick = true this.addClick = true
...@@ -733,7 +735,7 @@ export default { ...@@ -733,7 +735,7 @@ export default {
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 17px; line-height: 17px;
margin-left: 118px; margin-left: 154px;
margin-bottom: 20px; margin-bottom: 20px;
margin-top: -20px; margin-top: -20px;
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div class="container"> <div class="container">
<div> <div>
<div class="title">人群详情</div> <div class="title">人群详情</div>
<div class="info-box"> <div class="info-box gl-form-page">
<el-form class="create-form" :model="crowdForm" :rules="crowdRules" label-width="118px"> <el-form class="create-form" :model="crowdForm" :rules="crowdRules">
<div class="el-form-line"> <div class="el-form-line">
<el-form-item label="人群名称:" prop="crowdName" class="label-word"> <el-form-item label="人群名称:" prop="crowdName" class="label-word">
<div class="color-3">{{ crowdForm.crowdName }}</div> <div class="color-3">{{ crowdForm.crowdName }}</div>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
<div class="el-form-line"> <div class="el-form-line">
<el-form-item label="已选标签:" prop="groupNameRule" class="label-word"> <el-form-item label="已选标签:" prop="groupNameRule" class="label-word">
<div class="pageContent"> <div class="pageContent" style="display: flex;">
<GLTable :tableData="selectedArray" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable :tableData="selectedArray" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelUnitList" slot-scope="scope"> <span slot="labelUnitList" slot-scope="scope">
<div class="allTagsWrap flex"> <div class="allTagsWrap flex">
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
dialogLogicVisible: false, dialogLogicVisible: false,
tableData: [], tableData: [],
hasPage: false, hasPage: false,
hasNum: false, hasNum: true,
page: {}, page: {},
tableParams: { tableParams: {
tableColumns: [ tableColumns: [
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
{ {
label: '标签组类型', label: '标签组类型',
prop: 'groupType', prop: 'groupType',
width: 180, width: 220,
formatter: cellValue => { formatter: cellValue => {
return cellValue.groupType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : cellValue.groupType return cellValue.groupType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : cellValue.groupType
}, },
...@@ -147,7 +147,7 @@ export default { ...@@ -147,7 +147,7 @@ export default {
this.getCrowdDetails() this.getCrowdDetails()
}, },
mounted() { mounted() {
}, },
methods: { methods: {
goBack() { goBack() {
...@@ -164,11 +164,11 @@ export default { ...@@ -164,11 +164,11 @@ export default {
'req.crowdId': this.crowdId 'req.crowdId': this.crowdId
} }
this.$apis.crowdManage.getCrowdDetails(params).then(res => { this.$apis.crowdManage.getCrowdDetails(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.crowdForm.crowdName = res.data.crowdName this.crowdForm.crowdName = res.data.crowdName
this.crowdForm.crowdDesc = res.data.crowdDesc this.crowdForm.crowdDesc = res.data.crowdDesc
this.selectedArray = res.data.tagCombine ? JSON.parse(res.data.tagCombine) : [] this.selectedArray = res.data.tagCombine ? JSON.parse(res.data.tagCombine) : []
} }
}) })
...@@ -200,9 +200,12 @@ export default { ...@@ -200,9 +200,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
/deep/.glsx-table{
width: 100%;
}
.container { .container {
background: #ffffff; background: #ffffff;
height: calc(100vh - 164px); height: calc(100vh - 164px);
overflow-y: auto; overflow-y: auto;
// padding: 20px; // padding: 20px;
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
选择跟进专员 选择跟进专员
</el-button> </el-button>
<span class="drainage-coutom-count"> <span class="drainage-coutom-count">
只能选择 (只能选择
<span class="count">1</span> <span class="count">1</span>
个 人)
</span> </span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.beforeUserName"> <div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.beforeUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(1)"> <el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(1)">
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
选择跟进专员 选择跟进专员
</el-button> </el-button>
<span class="drainage-coutom-count"> <span class="drainage-coutom-count">
只能选择 (只能选择
<span class="count">1</span> <span class="count">1</span>
个 人)
</span> </span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.afterUserName"> <div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.afterUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(2)"> <el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(2)">
...@@ -148,7 +148,6 @@ export default { ...@@ -148,7 +148,6 @@ export default {
if (this.type == 2) { if (this.type == 2) {
;(this.choicedStaff.afterUserId = item.userId), (this.choicedStaff.afterUserName = item.userName), (this.choicedStaff.afterUserUuid = item.userUuid) ;(this.choicedStaff.afterUserId = item.userId), (this.choicedStaff.afterUserName = item.userName), (this.choicedStaff.afterUserUuid = item.userUuid)
} }
} }
} }
} }
...@@ -160,7 +159,6 @@ export default { ...@@ -160,7 +159,6 @@ export default {
} }
.scrm-sub-client-container { .scrm-sub-client-container {
.pageContent { .pageContent {
background-color: #fff; background-color: #fff;
.baseTitle { .baseTitle {
.title { .title {
...@@ -209,13 +207,14 @@ export default { ...@@ -209,13 +207,14 @@ export default {
max-height: 68px; max-height: 68px;
overflow: auto; overflow: auto;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 567px; width: 580px;
display: flex; display: flex;
align-items: center; //align-items: center;
margin-top: 6px; margin-top: 6px;
font-size: 14px; font-size: 14px;
height: 46px; height: 75px;
/deep/ .el-tag { /deep/ .el-tag {
margin-top: 8px;
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
padding: 0 8px; padding: 0 8px;
...@@ -228,6 +227,7 @@ export default { ...@@ -228,6 +227,7 @@ export default {
} }
} }
.drainage-coutom-count { .drainage-coutom-count {
margin-left: 8px;
color: #999; color: #999;
font-size: 14px; font-size: 14px;
.count { .count {
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" /> <yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" />
</div> </div>
<!-- 跟进记录 --> <!-- 跟进记录 -->
</div>
<div class="pageContent" :style="{ 'min-height': clientHeight + 50 + 'px' }">
<div class="baseTitle"> <div class="baseTitle">
<p class="title">跟进记录</p> <p class="title">跟进记录</p>
<hr /> <hr />
...@@ -34,6 +36,7 @@ ...@@ -34,6 +36,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -116,7 +119,7 @@ export default { ...@@ -116,7 +119,7 @@ export default {
this.addCol() this.addCol()
}, },
mounted() { mounted() {
this.clientHeight = document.documentElement.clientHeight - 140 this.clientHeight = document.documentElement.clientHeight - 610
}, },
computed: { computed: {
// 救援服务 // 救援服务
...@@ -209,9 +212,7 @@ export default { ...@@ -209,9 +212,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.scrm-sub-client-container { .scrm-sub-client-container {
.pageContent { .pageContent {
// padding: 6px 0px 30px; margin-bottom: 16px;
// min-width: 1300px;
background-color: #fff; background-color: #fff;
.leadAllocation { .leadAllocation {
width: 700px; width: 700px;
......
...@@ -74,9 +74,6 @@ ...@@ -74,9 +74,6 @@
<GLCombiForm ref="formSearch" :formObj="searchForm" :formData="tagsPartFormList" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="formSearch" :formObj="searchForm" :formData="tagsPartFormList" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="clientNumExp"> <div class="clientNumExp">
<div class="clientNum"> <div class="clientNum">
<!-- {{ labelGroupName }} -->
<!-- <div class="clientListNew">标签组客户列表</div>
<div class="clientNumText">{{ tableTotal }}个</div> -->
<div class="clientListNew">客户列表({{ tableTotal }}人)</div> <div class="clientListNew">客户列表({{ tableTotal }}人)</div>
</div> </div>
<div> <div>
...@@ -101,7 +98,7 @@ ...@@ -101,7 +98,7 @@
</div> </div>
</div> </div>
<!-- noDataText="你当前还没有添加的标签" --> <!-- noDataText="你当前还没有添加的标签" -->
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :layout="layout" :hasNum="true" :tableData="tableData" :tableTotal="tableTotal" :noDataImg="url" :pageConf="pageConf" @refreshTable="getCustomersListData" :tableParams="tableParams"> <GLTable @setTableFinishFun="setTableFinishFun" @refreshTable="getCustomersListData" ref="viewCustomers" :layout="layout" :hasNum="true" :tableData="tableData" :tableTotal="tableTotal" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<!-- 企微名称 --> <!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg"> <div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx"> <div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
...@@ -161,7 +158,7 @@ ...@@ -161,7 +158,7 @@
<span>说明:</span> <span>说明:</span>
此处添加的标签均为人工标签,即后续标签更新由员工更新打标签 此处添加的标签均为人工标签,即后续标签更新由员工更新打标签
</div> </div>
<rule-form :ruleForm="tagForm" :rules="tagRules" :ruleData="tagDialogData" :labelWidth="'120px'" labelPosition="right" ref="tagForm"> <rule-form :ruleForm="tagForm" :rules="tagRules" :ruleData="tagDialogData" ref="tagForm">
<div slot="tagsGroup-type"> <div slot="tagsGroup-type">
<el-select v-model="tagForm.initTagsGroup" placeholder="请选择" :disabled="tagDialogTitle != '添加标签组'" @change="handleSelect"> <el-select v-model="tagForm.initTagsGroup" placeholder="请选择" :disabled="tagDialogTitle != '添加标签组'" @change="handleSelect">
<el-option v-for="item in tagsGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in tagsGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
...@@ -194,18 +191,20 @@ ...@@ -194,18 +191,20 @@
<!-- 自店标签最多3000个,已创建3个 --> <!-- 自店标签最多3000个,已创建3个 -->
</div> </div>
<div slot="modeType"> <div slot="modeType">
<el-input v-model.trim="tagForm.mode" disabled style="width:190px"></el-input> <el-input v-model.trim="tagForm.mode" disabled></el-input>
</div> </div>
<div slot="tagsInput-type"> <div slot="tagsInput-type">
<div class="tagsWrap" v-if="tagDialogTitle == '编辑标签组'"> <div class="tagsWrap" v-if="tagDialogTitle == '编辑标签组'">
<div class="tagsWrapInput">
<span class="tag" :class="{ inputWrapShow: item.inputVisible }" v-for="item in editTagList" :key="item.id"> <span class="tag" :class="{ inputWrapShow: item.inputVisible }" v-for="item in editTagList" :key="item.id">
<!-- maxlength="30" show-word-limit --> <!-- maxlength="30" show-word-limit -->
<el-input class="input-new-tag" v-if="item.inputVisible" v-model.trim="item.name" ref="saveTagInput" size="small" @blur="item.name = handleInputConfirm(item.name, item.id)" @keyup.enter.native="item.name = handleInputConfirm(item.name, item.id)"></el-input> <el-input class="input-new-tag" v-if="item.inputVisible" v-model.trim="item.name" ref="saveTagInput" size="small" @blur="item.name = handleInputConfirm(item.name, item.id)" @keyup.enter.native="item.name = handleInputConfirm(item.name, item.id)"></el-input>
<el-tooltip class="item" :content="item.name" placement="top"> <el-tooltip class="item" :content="item.name" placement="top">
<span class="ellipsis-1" v-if="!item.inputVisible">{{ item.name }}</span> <span class="ellipsis-1" v-if="!item.inputVisible">{{ item.name }}</span>
</el-tooltip> </el-tooltip>
<img class="editIcon" src="@/assets/tagsManage/edit.png" @click="showInput(item.id)" alt="" v-show="!item.inputVisible" /> <img class="editIcon" src="@/assets/tagsManage/edit.png" @click="showInput(item.id)" alt="" v-show="!item.inputVisible" />
</span> </span>
</div>
</div> </div>
<div class="row-tag" v-for="(item, index) in tagForm.tagsList" :key="index"> <div class="row-tag" v-for="(item, index) in tagForm.tagsList" :key="index">
<!-- :onkeyup="(item.name = item.name.replace(/\s+/g, ''))" maxlength="30" show-word-limit @input="checkInputContent"--> <!-- :onkeyup="(item.name = item.name.replace(/\s+/g, ''))" maxlength="30" show-word-limit @input="checkInputContent"-->
...@@ -235,35 +234,22 @@ ...@@ -235,35 +234,22 @@
</span> </span>
</GLDialog> </GLDialog>
<GLDialog title="保存为人群" :visible.sync="groupVisible" :hasFooter="true"> <GLDialog title="保存为人群" :visible.sync="groupVisible" :hasFooter="true">
<div class="dialog-form"> <div class="gl-form-page gl-form-min">
<div class="dialog-form-item"> <el-form :model="crowdForm" :rules="crowdFormRules">
<label> <el-form-item label="人群名称:" prop="crowdName">
<span style="color: #ff0000">*</span> <el-input class="crowdName" v-model.trim="crowdForm.crowdName" size="small" placeholder="请输入人群名称:" maxlength="30" show-word-limit></el-input>
人群名称: </el-form-item>
</label> <el-form-item label="人群描述:">
<el-input v-model.trim="crowdForm.crowdName" size="small" placeholder="请输入人群名称:" maxlength="30"></el-input> <el-input class="crowdDesc" type="textarea" v-model.trim="crowdForm.crowdDesc" size="small" placeholder="请输入人群描述" maxlength="100" show-word-limit></el-input>
</div> </el-form-item>
<div class="form-tips"> </el-form>
最多30个字符
<span>{{ crowdForm.crowdName.length }}/30</span>
</div>
</div>
<div class="dialog-form">
<div class="dialog-form-item">
<label>人群描述:</label>
<el-input v-model.trim="crowdForm.crowdDesc" size="small" placeholder="请输入人群描述" maxlength="100"></el-input>
</div>
<div class="form-tips">
最多100个字符
<span>{{ crowdForm.crowdDesc.length }}/100</span>
</div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="groupVisible = false">取消</el-button> <el-button plain size="small" class="btn-three" @click="groupVisible = false">取消</el-button>
<el-button type="primary" size="small" @click="groupConfirmDialog">确定</el-button> <el-button type="primary" size="small" @click="groupConfirmDialog">确定</el-button>
</span> </span>
</GLDialog> </GLDialog>
<GLDialog title="提示" :visible.sync="successVisible" :hasFooter="false"> <GLDialog title="提示" mode="small" :visible.sync="successVisible" :hasFooter="false">
<div class="success-panel"> <div class="success-panel">
<i class="el-icon-circle-check"></i> <i class="el-icon-circle-check"></i>
</div> </div>
...@@ -323,13 +309,16 @@ export default { ...@@ -323,13 +309,16 @@ export default {
dialogRuleVisible: false, dialogRuleVisible: false,
expand: false, expand: false,
heightBox: 0, heightBox: 0,
isReload: true, // isReload: true,
isAllowCloseDialog: false, isAllowCloseDialog: false,
isHasSameTag: false, isHasSameTag: false,
tagNameRules: false, tagNameRules: false,
numberObj: {}, numberObj: {},
url: url, url: url,
isFirstShow: false, isFirstShow: false,
crowdFormRules: {
crowdName: [{ required: true, message: '请输入人群名称', trigger: 'blur' }]
},
searchForm: { searchForm: {
customerPhone: '', customerPhone: '',
nickName: '', nickName: '',
...@@ -384,6 +373,30 @@ export default { ...@@ -384,6 +373,30 @@ export default {
label: '否' label: '否'
} }
] ]
},
{
type: 'datePicker',
// prop: 'daterange',
name: 'createTime',
label: '购车时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'input',
inputType: 'text',
name: 'carVin',
label: '车架号'
},
{
type: 'input',
inputType: 'text',
name: 'carNumber',
label: '车牌号'
} }
], ],
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
...@@ -469,29 +482,27 @@ export default { ...@@ -469,29 +482,27 @@ export default {
}, },
tagDialogData: [ tagDialogData: [
{ {
label: '标签组名称', label: '标签组名称:',
prop: 'tagsName', prop: 'tagsName',
type: 'input', type: 'input',
placeholder: '最多30个字符,1个汉字为2个字符', placeholder: '最多30个字符,1个汉字为2个字符',
// maxlength: 30,
// showWordLimit: true,
disabled: false, disabled: false,
clickFunc: this.watchInput clickFunc: this.watchInput
}, },
{ {
label: '标签组类型', label: '标签组类型:',
prop: 'initTagsGroup', prop: 'initTagsGroup',
type: 'customize', type: 'customize',
slotName: 'tagsGroup-type' slotName: 'tagsGroup-type'
}, },
{ {
label: '更新方式', label: '更新方式:',
prop: 'initTagsGroup', prop: 'initTagsGroup',
type: 'customize', type: 'customize',
slotName: 'modeType' slotName: 'modeType'
}, },
{ {
label: '标签', label: '标签:',
prop: 'tagsList', prop: 'tagsList',
type: 'customize', type: 'customize',
slotName: 'tagsInput-type', slotName: 'tagsInput-type',
...@@ -499,13 +510,7 @@ export default { ...@@ -499,13 +510,7 @@ export default {
} }
], ],
tagRules: { tagRules: {
tagsName: [ tagsName: [{ required: true, message: '请输入名称', trigger: 'blur' }],
{ required: true, message: '请输入名称', trigger: 'blur' }
// {
// validator: checkName,
// trigger: 'change'
// }
],
initTagsGroup: [{ required: true, message: '请选择标签组类型', trigger: 'change' }] initTagsGroup: [{ required: true, message: '请选择标签组类型', trigger: 'change' }]
// tagsList: [{ required: true }] // tagsList: [{ required: true }]
}, },
...@@ -574,25 +579,23 @@ export default { ...@@ -574,25 +579,23 @@ export default {
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 122 this.heightBox = clientHeight - 122
//没数据的时候要算高度
// setTimeout(() => {
// if (!this.$refs.tagsManage.data.length) {
// this.$refs.tagsManage.setTableHeightFun()
// }
// }, 200)
}, },
methods: { methods: {
// toViewCustomer(info) { // toViewCustomer(info) {
// this.$router.push('/tagsManage/viewCustomers') // this.$router.push('/tagsManage/viewCustomers')
// }, // },
// 跳转到营销SOP // 跳转到营销SOP
createMarketSOP() { createMarketSOP() {
let getDatas = JSON.parse( let getDatas = JSON.parse(
JSON.stringify(this.allListParams) JSON.stringify(this.allListParams)
.replace(/groupId/g, 'labelGroupId') .replace(/groupId/g, 'labelGroupId')
.replace(/groupName/g, 'labelGroupName') // .replace(/groupName/g, 'labelGroupName')
.replace(/groupType/g, 'labelGroupType') .replace(/groupType/g, 'labelGroupType')
) )
let mergeDatas = getDatas.map((item, index) => {
return { ...item, ...this.sopListParams[index] }
})
var params = { var params = {
addOrEdit: 'add', addOrEdit: 'add',
fromPage: '/custom/tagsManage/index', fromPage: '/custom/tagsManage/index',
...@@ -600,7 +603,7 @@ export default { ...@@ -600,7 +603,7 @@ export default {
info: { info: {
// 标签 // 标签
customerOptType: 3, customerOptType: 3,
labelList: [...getDatas] labelList: [...mergeDatas]
} }
} }
this.$common.utils.storage.set('sopInfo', params) this.$common.utils.storage.set('sopInfo', params)
...@@ -790,68 +793,6 @@ export default { ...@@ -790,68 +793,6 @@ export default {
} }
}) })
}, 300), }, 300),
// handleConfirm() {
// this.$refs.tagForm.$children[0].validate(valid => {
// if (!valid) {
// if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
// this.tagNameRules = true
// this.$message.error('至少要添加一个标签')
// // return
// }
// return
// }
// if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
// this.tagNameRules = true
// this.$message.error('至少要添加一个标签')
// return
// }
// if (this.tagDialogTitle == '添加标签组') {
// //过滤掉没有输入值得标签输入框
// this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
// if (this.tagForm.tagsList.length <= 0) {
// this.$message.error('不能提交空标签')
// return
// }
// //如果存在添加标签的输入框的内容的标签相同则不提交
// let isSameTagFlag = false
// var tempArr = this.tagForm.tagsList.map(item => item.name)
// isSameTagFlag = this.isHasSome(tempArr)
// if (isSameTagFlag) {
// this.$message.error('不能提交相同的标签,请修改')
// return
// }
// this.newAddTagFun(1)
// //this.handleClose() //这里不管
// } else {
// //修改标签(允许同时增加标签)
// let isHasEmpty = this.editTagList.some(ele => ele.name == '')
// if (isHasEmpty) {
// this.$message.error('不能提交空的编辑标签')
// return
// }
// if (this.tagForm.tagsList.length > 0) {
// //过滤掉没有输入值得标签输入框
// this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
// //如果存在添加标签的输入框的内容和可编辑的标签相同则不提交
// let ishasSameTagFlag = false
// this.editTagList.forEach(item => {
// for (let i = 0; i < this.tagForm.tagsList.length; i++) {
// if (this.tagForm.tagsList[i].name == item.name) {
// ishasSameTagFlag = true
// }
// }
// })
// if (ishasSameTagFlag) {
// this.$message.error('不能提交已存在的标签,请修改')
// return
// }
// }
// this.updateTagFun()
// this.newAddTagFun()
// // this.handleClose()
// }
// })
// },
handleRuleClose() { handleRuleClose() {
this.dialogRuleVisible = false this.dialogRuleVisible = false
}, },
...@@ -989,6 +930,12 @@ export default { ...@@ -989,6 +930,12 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
@import '@/styles/resetelement.scss'; @import '@/styles/resetelement.scss';
.crowdName {
padding-right: 50px;
}
.crowdDesc {
padding-right: 58px;
}
.loading-containner { .loading-containner {
top: 0px; top: 0px;
left: 0px; left: 0px;
...@@ -1217,7 +1164,7 @@ export default { ...@@ -1217,7 +1164,7 @@ export default {
.client-tag { .client-tag {
width: 260px; width: 260px;
margin-right: 10px; margin-right: 10px;
margin-top: 10px; margin-top: 10px;
background-color: #fff; background-color: #fff;
} }
...@@ -1231,7 +1178,6 @@ export default { ...@@ -1231,7 +1178,6 @@ export default {
padding: 16px; padding: 16px;
margin-top: 10px; margin-top: 10px;
background-color: #fff; background-color: #fff;
} }
&-title { &-title {
font-size: 16px; font-size: 16px;
...@@ -1290,7 +1236,7 @@ export default { ...@@ -1290,7 +1236,7 @@ export default {
.pageContent { .pageContent {
overflow-y: auto; overflow-y: auto;
padding: 20px 20px 30px; padding: 20px 20px 30px;
margin-top: 10px; margin-top: 10px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
...@@ -1330,18 +1276,15 @@ export default { ...@@ -1330,18 +1276,15 @@ export default {
} }
.allTagsWrap { .allTagsWrap {
position: relative; position: relative;
// display: -webkit-box; display: -webkit-box;
// overflow: hidden; overflow: hidden;
// -webkit-line-clamp: 2; -webkit-line-clamp: 2;
// -webkit-box-orient: vertical; -webkit-box-orient: vertical;
// padding-bottom: -2px; padding-bottom: -2px;
// box-sizing: border-box; box-sizing: border-box;
// &:hover { &:hover {
// -webkit-line-clamp: 9999; -webkit-line-clamp: 9999;
// // .tag-box-wrap { }
// // margin-bottom: 10px;
// // }
// }
.tag-box-wrap { .tag-box-wrap {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
...@@ -1362,9 +1305,6 @@ export default { ...@@ -1362,9 +1305,6 @@ export default {
color: #666666; color: #666666;
max-width: 245px; max-width: 245px;
cursor: pointer; cursor: pointer;
// &:first-child{
// margin-bottom: 4px;
// }
} }
.expande-button-wrap { .expande-button-wrap {
position: absolute; position: absolute;
...@@ -1392,36 +1332,24 @@ export default { ...@@ -1392,36 +1332,24 @@ export default {
} }
} }
.role { .role {
::v-deep .el-input--small, /deep/.tagTipMsg {
.el-input__inner { font-size: 12px;
width: 423px; display: flex;
} color: #999999;
::v-deep .container { margin-left: 150px;
position: relative;
.tagTipMsg {
position: absolute;
display: inline-block;
width: 240px;
left: 200px;
top: 0;
font-size: 12px;
font-weight: 400;
color: #999999;
}
}
::v-deep .el-select > .el-input--small {
width: 190px;
}
::v-deep .el-form-item--small:nth-child(2) {
display: inline-block;
width: 310px;
position: relative;
} }
.tagsWrap { .tagsWrap {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
padding-top: 3px; padding-top: 3px;
.tagsWrapInput{
border: 1px solid rgb(229, 229, 229);
padding: 8px;
width: 423px;
max-height: 75px;
overflow-y: auto;
}
img { img {
display: none; display: none;
} }
...@@ -1431,8 +1359,8 @@ export default { ...@@ -1431,8 +1359,8 @@ export default {
padding: 0 10px; padding: 0 10px;
min-width: 68px; min-width: 68px;
max-width: 200px; max-width: 200px;
margin-right: 10px; margin-right: 6px;
margin-bottom: 10px; margin-bottom: 6px;
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
background: #fafbfe; background: #fafbfe;
...@@ -1480,6 +1408,7 @@ export default { ...@@ -1480,6 +1408,7 @@ export default {
display: flex; display: flex;
&:not(:first-child) { &:not(:first-child) {
margin-top: 5px; margin-top: 5px;
margin-left: 154px;
} }
align-items: center; align-items: center;
.el-icon-circle-close { .el-icon-circle-close {
...@@ -1497,6 +1426,7 @@ export default { ...@@ -1497,6 +1426,7 @@ export default {
align-items: center; align-items: center;
color: $btnBlue; color: $btnBlue;
cursor: pointer; cursor: pointer;
margin-left: 150px;
i { i {
font-size: 20px; font-size: 20px;
} }
......
...@@ -19,7 +19,7 @@ const cdn = { ...@@ -19,7 +19,7 @@ const cdn = {
] ]
} }
module.exports = { module.exports = {
outputDir: `../dist/${packageName}`, outputDir: `dist`,
publicPath, //node_env ? baseUrl : '/' publicPath, //node_env ? baseUrl : '/'
assetsDir: 'static', assetsDir: 'static',
configureWebpack: { configureWebpack: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!