Commit a7171aa8 by 李长胜

客户管理(运营)内容调整

1 parent ff68816c
......@@ -12,7 +12,7 @@
params.method='org.ore.api.customer.view.data'
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
......@@ -23,7 +23,7 @@
export function getDataOverviewBarMap(params){
params.method='org.ore.api.customer.view.chart'
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
......
......@@ -10,9 +10,9 @@
export function getTableList (params){
params.method='org.ore.api.customer.base.page'
// params.sessionId="mini-a9edd006-4600-47a3-834e-d9915dd082ad-rop"
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
......@@ -20,9 +20,8 @@
}
export function getTableDetail(params){
params.method='org.ore.api.customer.base.detail'
// params.sessionId="mini-a9edd006-4600-47a3-834e-d9915dd082ad-rop"
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
......@@ -32,9 +31,8 @@
// 客户群的客户列表获取分页数据接口
export function getDetailTableList(params){
params.method='org.ore.api.customer.base.cust.page'
// params.sessionId="mini-a9edd006-4600-47a3-834e-d9915dd082ad-rop"
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
......
......@@ -18,14 +18,53 @@
// sign: true
// })
// }
// /router/datahub.api.user.getuserlabel/1.0.0
// 获取客户详情单用户标签
// params.method='datahub.api.label.querylabeltree'
export function getSingleClientTag(params){
params.method='datahub.api.user.getuserlabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export function getAllTagTree (params){
params.method='datahub.api.label.querylabeltree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
// /router/datahub.api.user.addUserLabel/1.0.0
// 用户添加标签
export function addSingleClientTag (params){
params.method='datahub.api.user.addUserLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
export function getTableList (params){
params.method='org.ore.api.customer.page'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
// params.timestamp=new Date().getTime()
// +'?method=org.ore.api.customer.page'
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
......@@ -36,7 +75,7 @@
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
......@@ -48,7 +87,7 @@
export function getDictionaryFun(params){
params.method='org.ore.api.common.dictdata.list'
return http({
url: '/router',
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
......
/**
* 新增参数sign 判断接口是否需要sign签名(默认有,不必写)
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
//计算是第几次接触该页面
export function getLoginCount (params){
params.method='org.ore.api.common.findLoginCount'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
......@@ -12,7 +12,7 @@
params.method='datahub.api.label.querylabeltree'
// params.sessionId="mini-e617124f-7acc-493b-bf7d-bb21c5aa8ec5-rop"
return http({
url: '/router',
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
......@@ -24,7 +24,7 @@
params.method='datahub.api.label.getlabelcount'
return http({
url: '/router',
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
......@@ -35,7 +35,7 @@
export function newAddTag(params){
params.method='datahub.api.label.addlabel'
return http({
url: '/router',
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
......@@ -46,7 +46,7 @@
export function updateTag(params){
params.method='datahub.api.label.updatelabel'
return http({
url: '/router',
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
......

125 KB | W: | H:

35.9 KB | W: | H:

src/assets/clientDataOverview/allPicture.png
src/assets/clientDataOverview/allPicture.png
src/assets/clientDataOverview/allPicture.png
src/assets/clientDataOverview/allPicture.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -11,6 +11,8 @@
<slot name="btn-front"></slot>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm" :loading="btnLoading">{{ btnOkLabel }}</el-button>
<el-button v-if="isShowThirdBtn" @click="btnClick">创建标签</el-button>
<slot name="btn-behind"></slot>
</div>
</el-dialog>
......@@ -28,7 +30,10 @@ export default {
type: Boolean,
default: false
},
isShowThirdBtn: {
type: Boolean,
default: false
},
isVisible: {
type: Boolean,
default: false
......@@ -52,6 +57,9 @@ export default {
},
handleConfirm() {
this.$emit('confirmDialog')
},
btnClick() {
this.$emit('btnEvent')
}
}
}
......
......@@ -94,10 +94,20 @@ export default {
}, 200)
})
var that = this
var resizeTimer = null
// 如何实现不管窗口如何改变,只在停止改变之后才执行代码呢?
// $(window).bind('resize', function() {
// if (resizeTimer) clearTimeout(resizeTimer)
// resizeTimer = setTimeout(function() {
// console.log('窗口发生改变了哟!')
// }, 100)
// })
window.onresize = () => {
return (() => {
that.FormHeight = document.getElementById('searchForm').offsetHeight
// console.log(that.FormHeight, '窗口这里')
if (resizeTimer) clearTimeout(resizeTimer)
resizeTimer = setTimeout(function() {
that.FormHeight = document.getElementById('searchForm').offsetHeight
}, 100)
})()
}
},
......@@ -178,7 +188,7 @@ export default {
}
}
.expande {
overflow: auto;
// overflow: auto;
height: auto;
// padding-bottom: 22px;
}
......
......@@ -17,12 +17,12 @@ module.exports = {
code_success_value: '0',
code_message_map: {}
},
// 王小龙:http://192.168.2.108:8091/rop-scrm-datahub 冯支:http://192.168.3.191:8064/rop-scrm-entmicro/
/* 开发环境的域名:http://scrm.dev.glsx.com.cn/rop-scrm-datahub
http://scrm.dev.glsx.com.cn/rop-scrm-entmicro
// 王小龙:http://192.168.2.98:8091/rop-scrm-datahub 冯支:http://192.168.3.191:8064/rop-scrm-entmicro/
/* 开发环境的域名:http://scrm.dev.glsx.com.cn/rop-scrm-datahub 测试:https://scrm.test.glsx.com.cn
http://scrm.dev.glsx.com.cn/rop-scrm-entmicro http://scrm.test.glsx.com.cn/
*/
request: {
baseURL: 'http://192.168.3.191:8064/rop-scrm-entmicro/',
baseURL: 'http://scrm.test.glsx.com.cn',
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -8,7 +8,7 @@ module.exports = {
code_message_map: {}
},
request: {
baseURL: 'http://192.168.3.171:7300/mock/6136bea6ceeb5a5c2bec6950/',
baseURL: 'http://scrm.test.glsx.com.cn',
// 设置超时时间
timeout: 180000,
// 携带凭证
......
import axios from "axios";
//子系统不需要axios,以下都废弃
// import axios from "axios";
// import { BASE_URL, TIME_OUT } from './config'
// import { checkStatus} from '../utils/checkStatus';
export function request(config) {
//1.创建axios的实例 "http://152.136.185.210:8000/api/w6"
const instance = axios.create({
......
import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree,Row,Table,TableColumn,Dialog,Pagination,Loading,Tooltip } from 'element-ui'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree,Row,Table,TableColumn,Dialog,Pagination,Loading,Tooltip,Divider } from 'element-ui'
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
......@@ -23,4 +23,5 @@ Vue.use(Dialog)
Vue.use(Pagination)
Vue.use(Loading)
Vue.use(Tooltip)
Vue.use(Divider)
export const message = Message
......@@ -29,12 +29,12 @@ const staticRoutes = Object.freeze([
component: resolve => require([`@/views/clientManage/clientDetail.vue`], resolve),
meta: {}
},
{
name: 'clientDemo',
path: "/clientManage/clientDemo",
component: resolve => require([`@/views/clientManage/demo.vue`], resolve),
meta: {}
},
// {
// name: 'clientDemo',
// path: "/clientManage/clientDemo",
// component: resolve => require([`@/views/clientManage/demo.vue`], resolve),
// meta: {}
// },
{
name: 'clientGroupManage',
path: "/clientGroupManage/index",
......
......@@ -17,7 +17,7 @@ import { routes } from '@/router'
export async function start() {
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-a9edd006-4600-47a3-834e-d9915dd082ad-rop' } })
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-ab3d905b-5148-42ba-86dd-8ec6a51b9b86-rop' } })
Vue.use(GLButton,GLTable, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
......
......@@ -2,15 +2,7 @@
@import './common.scss';
@import './resetelement.scss';
body {
padding: 0;
margin: 0;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-color: $bgColor;
// overflow: auto !important;
}
body,html{
width:100%;
......@@ -21,6 +13,7 @@ body {
padding:0;
overflow: hidden;
background-color: $bgColor;
}
......@@ -47,5 +40,5 @@ body {
}
// 子系统不设外边距
.scrm-sub-client-container{
padding: 20px;
padding: 20px 20px 20px 40px;
}
\ No newline at end of file
......@@ -47,7 +47,7 @@
}
}
.el-button:nth-child(2){
height: 32px;
// height: 32px;
background: $btnBlue;
border: 1px solid $btnBlue;
color: #fff;
......
......@@ -39,7 +39,7 @@
<div class="rightWrap">
<p>
<span>客户列表</span>
<span>{{ clientGroupFormList.length || 0 }}个</span>
<span>{{ clientTableDataNum || 0 }}个</span>
</p>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientGroupFormList">
<span class="inline-b" slot="form-slot">
......@@ -53,7 +53,7 @@
<el-button v-for="(j, idx) in tableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" :size="btn_size" @click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button>
</span>
</basic-table> -->
<GLTable ref="clientGroupDetail" :tableId="$route.query.id" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :tableId="$route.query.id" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" slot-scope="scope">
<span>{{ scope.scope.customerName }}</span>
<span class="blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
......@@ -167,16 +167,8 @@ export default {
}
],
tableOption: {
width: 170,
width: 80,
btnList: [
// {
// name: "编辑",
// pType: "edit",
// },
// {
// name: "删除",
// pType: "delete",
// },
{
name: '详情',
pType: 'detail'
......@@ -184,7 +176,8 @@ export default {
]
}
},
getListApi: getDetailTableList
getListApi: getDetailTableList,
clientTableDataNum: 0
}
},
created() {
......@@ -204,8 +197,24 @@ export default {
}
this.leftPanelList = res
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm)
if (this.searchForm.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
} else {
if (this.searchForm.beginTime) delete this.searchForm.beginTime && delete this.searchForm.endTime
}
resolve()
})
},
setTableFinishFun(content) {
this.clientTableDataNum = content.length
},
goBack() {
this.$router.push({ name: 'clientGroupManage' })
this.$router.push({ path: '/clientGroupManage/index' })
},
//搜索表格
searchTable() {
......@@ -218,7 +227,7 @@ export default {
},
goDetail(id) {
this.$router.push({
name: 'clientDetail',
name: '/clientManage/clientDetail',
query: {
id: id
}
......
......@@ -14,7 +14,7 @@
<el-button v-for="(j, idx) in tableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" :size="btn_size" @click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button>
</span>
</basic-table> -->
<GLTable ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :noDataImg="url" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
<span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span>
......@@ -135,12 +135,24 @@ export default {
methods: {
setTableHeightEvent() {
console.log('emit事件')
this.$refs.clientGroupManage.setTableHeightFun()
},
searchTable() {
this.$refs.clientGroupManage.refreshTable()
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm)
if (this.searchForm.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
} else {
if (this.searchForm.beginTime) delete this.searchForm.beginTime && delete this.searchForm.endTime
}
resolve()
})
},
resetTable() {
this.searchForm = {}
......@@ -149,7 +161,7 @@ export default {
btnClick(ptype, scope) {},
goDetail(id) {
this.$router.push({
name: 'clientGroupDetail',
name: '/clientGroupManage/clientGroupDetail',
query: {
id: id
}
......
<!--
* @Descripttion:
* @version: X3版本
* @Author: lily
* @Date: 2021-10-12 10:21:48
* @LastEditors: lily
* @LastEditTime: 2021-10-12 11:01:29
-->
<template>
<div class="wrapper">
<!-- 头部部分 -->
<div class="header">
<el-input v-model="input" placeholder="请输入内容"></el-input>
</div>
<!-- table部分 -->
<div class="main">
<div class="table-box">
<el-table class="table-list__box" ref="tableList" :data="dataList" :height="tableHeight" border stripe tooltip-effect="dark">
<el-table-column v-for="column in columns" :key="column.key" :prop="column.key" :label="column.label" :width="column.width" :min-width="150" sortable show-overflow-tooltip filter-placement="bottom"></el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination__wrapper">
<cd-pagination ref="pager" :total="pagination.total" :currPage="pagination.pageNow" :pageSize="pagination.pageSize"></cd-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
const columns = [
{ key: 'accountName', label: '登录账号', width: 120 },
{ key: 'phone', label: '登录手机', width: 120 },
{ key: 'userName', label: '用户名称', width: 120 },
{ key: 'email', label: '登录邮箱', width: 210 },
{ key: 'orgNames', label: '所属组织', width: 210 },
{ key: 'roleName', label: '所属角色', width: 210 },
{ key: 'memo', label: '备注', width: 120 },
{ key: 'updateTime', label: '最后操作时间' }
]
import demo from '@/common/demo.json'
export default {
name: 'clientDemo',
components: {},
data() {
return {
input: '',
columns,
dataList: [],
tableHeight: null,
pagination: {
pageNow: 1,
pageSize: 20,
pages: 0,
total: 0
}
}
},
mounted() {
setTimeout(() => {
let height = this.$refs.tableList.$el.parentElement.clientHeight
this.tableHeight = `${height}px`
console.log(this.tableHeight, 'tableHeight')
})
this.dataList = demo.data.rows.concat([])
}
}
</script>
<style lang="scss" scoped>
.wrapper {
background: #fff !important;
height: 100%;
display: flex;
flex-direction: column;
}
.header {
padding: 20px 8px;
background: #ccc;
}
.main {
flex: 1;
overflow: hidden;
}
.table-box {
height: 100%;
display: flex;
flex: auto;
flex-direction: column;
overflow: hidden;
}
</style>
......@@ -11,23 +11,33 @@
</span>
</search-form>
<GLTable ref="clientManage" :hasNum="true" :getListApi="getListApi" :searchForm="searchForm" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="customerName" slot-scope="scope">
<span class="ellipsis-1" style="display:inline-block;max-width:70px;text-align:left;">{{ scope.scope.customerName }}</span>
<span class="blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display:inline-block;max-width:70px;text-align:left;">{{ scope.scope.customerName }}</span>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : '女' }}</span>
</span>
<span slot="addWay" slot-scope="scope" style="display:inline-block;max-width:120px;text-align:left;">
<span>{{ toLabel(scope.scope.addWay) }}</span>
<span slot="customerPhone" slot-scope="scope">
<span>{{ scope.scope.customerPhone == 'null' ? '' : scope.scope.customerPhone }}</span>
</span>
<span slot="addWay" slot-scope="scope">
<el-tooltip effect="dark" :content="toLabel(scope.scope.addWay)" placement="top">
<span style="display:inline-block;max-width:120px;text-align:left;">{{ toLabel(scope.scope.addWay) }}</span>
</el-tooltip>
</span>
<span slot="isJoin" slot-scope="scope">
<span>{{ scope.scope.isJoin ? '是' : '否' }}</span>
</span>
<span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
<span class="statusText" :class="{ 'red-text': scope.scope.status, 'green-text': scope.scope.status == 0 }">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : '正常' }}</span>
<span class="statusText" :class="{ 'red-text': scope.scope.status, 'green-text': scope.scope.status == 0 }">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '正常' }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
......@@ -154,7 +164,8 @@ export default {
},
{
label: '手机号',
prop: 'customerPhone'
prop: 'customerPhone',
addHtml: 'customerPhone'
},
{
label: '性别',
......@@ -186,15 +197,8 @@ export default {
}
],
tableOption: {
width: 80,
btnList: [
// {
// name: "编辑",
// pType: "edit",
// },
// {
// name: "删除",
// pType: "delete",
// },
{
name: '详情',
pType: 'detail'
......@@ -214,6 +218,19 @@ export default {
setTableHeightEvent() {
this.$refs.clientManage.setTableHeightFun()
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm)
if (this.searchForm.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
} else {
if (this.searchForm.beginTime) delete this.searchForm.beginTime && delete this.searchForm.endTime
}
resolve()
})
},
getDictionaryFun() {
getDictionaryFun({ dictType: 'add_way' }).then(res => {
if (!res) {
......@@ -263,7 +280,7 @@ export default {
},
goDetail(id) {
this.$router.push({
name: 'clientDetail',
path: '/clientManage/clientDetail',
query: {
id: id
}
......
......@@ -25,7 +25,7 @@
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
<glsx-table @setTableFinishFun="setTableFinishFun" ref="tagsManage" :hasNum="true" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" noDataText="你当前还没有添加的标签" :tableParams="tableParams" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable @setTableFinishFun="setTableFinishFun" ref="tagsManage" :hasNum="true" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" noDataText="你当前还没有添加的标签" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope">
<span>{{ scope.scope.labelGroup.name }}</span>
</span>
......@@ -55,7 +55,7 @@
<div class="additional-text">标签用于对客户进行分类,以便用户能够更好的识别客户类型</div>
<button class="btn-blue">创建标签</button>
</div> -->
</glsx-table>
</GLTable>
</div>
<basic-dialog class="role" :title="tagDialogTitle" :width="'712px'" :isVisible="tagVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose">
......@@ -63,7 +63,7 @@
<rule-form :ruleForm="tagForm" :rules="tagRules" :ruleData="tagDialogData" :labelWidth="'120px'" labelPosition="right" ref="tagForm">
<div slot="tagsGroup-type">
<el-select v-model="tagForm.initTagsGroup" placeholder="请选择" :disabled="tagDialogTitle != '添加标签组'">
<el-option v-for="item in tagsGroupList" :key="item.id" :label="item.name" :value="item.name"></el-option>
<el-option v-for="item in tagsGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组'">企业标签和自店标签分别最多3000个</span>
<span class="tagTipMsg" v-else>
......@@ -103,6 +103,7 @@
<script>
import { getTableList, getTableTagNum, newAddTag, updateTag } from '@/api/modules/tagsManage'
import { getLoginCount } from '@/api/modules/loginCount'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'tagsManage',
......@@ -181,8 +182,8 @@ export default {
tagDialogTitle: '添加标签组',
tagVisible: false,
tagForm: {
// tagsName: '',
// initTagsGroup: '',
tagsName: '',
initTagsGroup: '',
tagsList: []
},
tagDialogData: [
......@@ -238,6 +239,7 @@ export default {
}
},
created() {
this.getLoginCountFun()
this.getTableTagNumFun()
},
watch: {
......@@ -272,6 +274,7 @@ export default {
console.log('表格完成', content)
this.$nextTick(() => {
let lineHeight = 50
console.log('allTagsWrap', document.getElementById('allTagsWrap'))
if (document.getElementById('allTagsWrap').offsetHeight > lineHeight * 2) {
console.log('包含该行标签的div的高度:', document.getElementById('allTagsWrap').offsetHeight)
this.expande = false
......@@ -282,6 +285,13 @@ export default {
}
})
},
getLoginCountFun() {
//loginType:3是查客户数据概览浏览次数
getLoginCount({ loginType: 3 }).then(res => {
//获取是否第一次点击该页面
this.isFirstShow = res
})
},
getTableTagNumFun() {
getTableTagNum({ shopId: 10001001 }).then(res => {
if (!res) {
......@@ -317,7 +327,7 @@ export default {
this.tagDialogTitle = '编辑标签组'
this.$set(this.tagDialogData[0], 'disabled', true)
this.editEvent(rowData)
this.handleClose()
// this.handleClose()
//关闭验证规则
// this.tagRules = {}
//调编辑的接口
......@@ -327,13 +337,13 @@ export default {
},
//编辑触发事件
editEvent(rowData) {
// this.handleClose()
this.handleClose()
this.editTagList = rowData.labelList.map(item => {
return { ...item, inputVisible: false }
})
this.tagGroupId = rowData.labelGroup.id //标签组id
this.tagForm.tagsName = rowData.labelGroup.name //标签组名
this.tagForm.initTagsGroup = rowData.labelType //标签组类型
this.tagForm.initTagsGroup = rowData.labelType == '企业标签' ? 1 : rowData.labelType == '自店标签' ? 2 : '' //标签组类型
},
handleConfirm() {
......@@ -364,7 +374,9 @@ export default {
if (!this.tagVisible && this.$refs.tagForm) {
this.$refs.tagForm.$children[0].resetFields()
console.log(this.tagForm.initTagsGroup, '7777')
console.log(this.tagForm, '内')
}
console.log(this.tagForm, '外')
// if (!this.tagVisible && this.tagDialogTitle == '添加标签组') {
// this.tagForm.tagsName = ''
// this.tagForm.initTagsGroup = ''
......@@ -384,18 +396,22 @@ export default {
params.shopId = '10001001'
// params.staffId = '员工A'
params['labelDTO.labelGroup.name'] = this.tagForm.tagsName
params['labelDTO.labelType'] = this.tagForm.initTagsGroup
params['labelDTO.labelType'] = this.tagForm.initTagsGroup == 1 ? '企业标签' : '自店标签'
params['labelDTO.labelList'] = this.tagForm.tagsList
console.log('tagsForm提交', this.tagForm)
console.log(params)
newAddTag(params).then(res => {
if (!res) {
return
}
this.$message.success('添加成功')
// this.tagForm.tagsName = ''
// this.tagForm.initTagsGroup = ''
// this.tagForm.tagsList = []
if (res.code == 0) {
this.$message.success('添加成功')
// this.tagForm.tagsName = ''
// this.tagForm.initTagsGroup = ''
// this.tagForm.tagsList = []
this.resetTable() //刷新下表格
this.resetTable() //刷新下表格
}
})
},
updateTagFun() {
......
......@@ -2,27 +2,26 @@ const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
// const baseUrl = process.env.VUE_APP_BASE_URL;
const publicPath = node_env ? `/child/${packageName}/` : '/'
const baseUrl = '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcss.com'
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const cdn = {
css: [
`${CDN_DOMAIN}/element-ui/2.11.1/theme-chalk/index.css`
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}/vue/2.6.10/vue.min.js`,
`${CDN_DOMAIN}/vue-router/3.0.6/vue-router.min.js`,
`${CDN_DOMAIN}/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}/vuex/3.1.1/vuex.min.js`,
`${CDN_DOMAIN}/axios/0.19.0/axios.min.js`,
// `${CDN_DOMAIN}/echarts/4.3.0-rc.1/echarts.min.js`
// `https://lib.baomitu.com/echarts/5.2.0/echarts.esm.min.js`
`https://lib.baomitu.com/echarts/5.2.0/echarts.min.js`
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
// `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath: node_env ? baseUrl : '/',
publicPath ,//node_env ? baseUrl : '/'
assetsDir: 'static',
configureWebpack: {
resolve: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!