Commit 505fed4d by xuyl

页面搜索框组件修改

1 parent a3fdb1c9
import GLCombiForm from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLCombiForm.install = function(Vue) {
Vue.component(GLCombiForm.name, GLCombiForm)
}
// 默认导出组件
export default GLCombiForm
\ No newline at end of file \ No newline at end of file
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
import GLSearch from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearch.install = function(Vue) {
Vue.component(GLSearch.name, GLSearch)
}
// 默认导出组件
export default GLSearch
\ No newline at end of file \ No newline at end of file
<!-- <content> -->
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
<el-button type="warning" @click="toggleShow(1)">显示代码</el-button>
```js {mixin:true}
{
data() {
return {
demo1: true,
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods:{
toggleShow(num){
// console.log(123)
this['demo' + num] = !this['demo' + num]
},
//gl-search 方法
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
```
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```vue
<template>
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
</template>
<script>
import {GLSearch, GLSearchItem} from 'glsx-components'
// 全局引入一次css即可
import 'glsx-components/dist/glsx-components.css'
export default {
data() {
return {
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods: {
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
</script>
```
</div>
<!-- </content> -->
<template>
<div class="gl-search" id="gl-search" :class="{ transTo: !expand }">
<div class="search-list">
<!-- 默认插槽 -->
<slot></slot>
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div>
<div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
</div>
<div class="gl-operate">
<div class="operate">
<el-button size="small" type="primary" @click="handleOk">查询</el-button>
<el-button size="small" @click="handleRest">重置</el-button>
<el-button type="text" size="small" @click="expandFn" v-if="hasExpand">
<span>{{ !expand ? '展开' : '收起' }}</span>
<i class="expand" :class="classIcon"></i>
</el-button>
<!-- <i class="el-icon-arrow-down expand"></i> -->
<!-- <i class="el-icon-arrow-up"></i> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GLSearch',
props: {},
data() {
return {
// input: '',
expand: false,
itemNum: 0,
time: null,
hasExpand: false
}
},
created() {},
mounted() {
this.getItemNum()
// 判断宽度按,是否显示展开收起
this.getClientWith()
window.addEventListener('resize', this.getClientWith, false)
},
computed: {
classIcon() {
return !this.expand ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
}
},
methods: {
// 展开收起
expandFn() {
this.expand = !this.expand
},
// 获取item 输入框 的个数
getItemNum() {
const items = document.getElementById('gl-search').getElementsByClassName('search-item').length
this.itemNum = items
},
// 判断是否有展开收起标志
ifHasExpand(nowCol) {
if (this.itemNum > nowCol) {
return true
}
return false
},
// 监听函数
getClientWith() {
if (this.time) clearTimeout(this.time)
this.time = setTimeout(() => {
const clientWidth = document.documentElement.clientWidth
// console.log('clientWidth: ', clientWidth)
if (clientWidth <= 800) {
// 1列
this.hasExpand = this.ifHasExpand(1)
} else if (clientWidth <= 1440 && clientWidth > 800) {
// 2列
this.hasExpand = this.ifHasExpand(2)
} else if (clientWidth <= 1720 && clientWidth > 1440) {
// 3列
this.hasExpand = this.ifHasExpand(3)
} else {
// 4列
this.hasExpand = this.ifHasExpand(4)
}
}, 300)
},
handleOk() {
// 点击确定的回调
this.$emit('onOk')
},
handleRest() {
// 点击重置的回调
this.$emit('onRest')
}
},
components: {},
watch: {},
beforeDestroy() {
window.removeEventListener('resize', this.getClientWith, false)
this.time = null
}
}
</script>
<style lang="scss">
.gl-search {
&.transTo {
height: 52px;
}
display: flex;
justify-content: space-between;
overflow: hidden;
// @media screen and (max-width: 1062px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1062px) and (max-width: 1440px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
.search-list {
.search-item {
width: 100%;
}
}
.search-list {
flex: 1;
display: flex;
flex-wrap: wrap;
.search-item {
// flex: 1;
// padding-right: 12px;
margin-bottom: 20px;
min-width: 276px;
display: flex;
align-items: center;
box-sizing: border-box;
.name {
width: 112px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #666;
}
.input {
flex: 1;
// width:100%;
}
.el-input {
width: 100%;
}
.el-select {
width: 100%;
}
.el-date-editor {
width: 100%;
}
}
}
.gl-operate {
display: flex;
align-items: flex-end;
.operate {
text-align: left;
width: 190px;
margin-bottom: 20px;
.expand {
font-size: 14px;
}
.el-button + .el-button {
margin-left: 8px;
}
}
}
}
</style>
import GLSearchItem from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearchItem.install = function(Vue) {
Vue.component(GLSearchItem.name, GLSearchItem)
}
// 默认导出组件
export default GLSearchItem
\ No newline at end of file \ No newline at end of file
<template>
<div :style="{ 'padding-right': spacer + 'px' }" class="search-item">
<div class="name">
<!-- {{ label }} -->
<!-- name 插槽 -->
<slot name="name"></slot>
</div>
<div class="input">
<!-- 默认插槽 -->
<slot></slot>
<!-- <el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input> -->
</div>
</div>
</template>
<script>
export default {
name: 'GLSearchItem',
props: {
// 每个项间隙
spacer: {
type: Number,
default: 12
}
},
data () {
return {}
},
created () {},
mounted () {},
computed: {},
methods: {},
components: {},
watch: {}
}
</script>
...@@ -5,6 +5,12 @@ import ElementUI from 'element-ui' ...@@ -5,6 +5,12 @@ import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import GLCombiForm from '@/components/GlCombiForm'
import GlSearch from '@/components/GlSearch'
import GlSearchItem from '@/components/GlSearchItem'
Vue.use(GlSearch)
Vue.use(GlSearchItem)
Vue.use(GLCombiForm)
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
...@@ -12,9 +18,9 @@ import 'glsx-components/dist/glsx-components.css' ...@@ -12,9 +18,9 @@ import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3 // http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request,request2,request3, request4,sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch const { response, request, request2, request3, request4, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch) //globalState.configSwitch
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <!-- <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </search-form> -->
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable">
<span slot="footer">
<el-button size="small" type="primary" @click="handleExport">导出</el-button>
</span>
</GLCombiForm>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 --> <!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url"> <GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" class="flex-center" slot-scope="scope"> <span slot="customerName" class="flex-center" slot-scope="scope">
...@@ -14,7 +19,7 @@ ...@@ -14,7 +19,7 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' : '' }}</span>
<!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' :''}}</span> --> <!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' :''}}</span> -->
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
...@@ -31,7 +36,7 @@ ...@@ -31,7 +36,7 @@
</template> </template>
<script> <script>
import { getDetailTableList,clientExportApi } from '@/api/modules/clientGroupManage' import { getDetailTableList, clientExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -45,9 +50,12 @@ export default { ...@@ -45,9 +50,12 @@ export default {
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'datePicker',
prop: 'daterange', name: 'daterange',
label: '入群时间', label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -56,10 +64,12 @@ export default { ...@@ -56,10 +64,12 @@ export default {
}, },
{ {
type: 'select', type: 'select',
prop: 'customerSex', name: 'customerSex',
label: '性别', label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别', placeholder: '请选择性别',
options: [ optionList: [
{ {
label: '全部', label: '全部',
value: null value: null
...@@ -81,14 +91,14 @@ export default { ...@@ -81,14 +91,14 @@ export default {
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupNickName', name: 'groupNickName',
label: '本群昵称', label: '本群昵称',
placeholder: '请输入本群昵称' placeholder: '请输入本群昵称'
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'customerName', name: 'customerName',
label: '客户名称', label: '客户名称',
placeholder: '请输入客户名称' placeholder: '请输入客户名称'
} }
...@@ -101,7 +111,7 @@ export default { ...@@ -101,7 +111,7 @@ export default {
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName', prop: 'groupNickName',
minWidth:120 minWidth: 120
}, },
{ {
label: '客户名称', label: '客户名称',
...@@ -112,7 +122,7 @@ export default { ...@@ -112,7 +122,7 @@ export default {
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone', prop: 'customerPhone',
minWidth:120 minWidth: 120
}, },
{ {
label: '性别', label: '性别',
...@@ -123,12 +133,12 @@ export default { ...@@ -123,12 +133,12 @@ export default {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene', addHtml: 'joinScene',
minWidth:120 minWidth: 120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName', prop: 'invitorName',
minWidth:120 minWidth: 120
}, },
{ {
label: '入群时间', label: '入群时间',
...@@ -156,7 +166,7 @@ export default { ...@@ -156,7 +166,7 @@ export default {
} }
}, },
methods: { methods: {
getParams(){ getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var 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]
...@@ -199,7 +209,7 @@ export default { ...@@ -199,7 +209,7 @@ export default {
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出 //导出
handleExport(){ handleExport() {
var params = this.getParams() var params = this.getParams()
clientExportApi(params).then(res => { clientExportApi(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <!-- <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </search-form> -->
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable">
<span slot="footer">
<el-button size="small" type="primary" @click="handleExport">导出</el-button>
</span>
</GLCombiForm>
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url"> <GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span> <span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span> </span>
...@@ -23,7 +27,7 @@ ...@@ -23,7 +27,7 @@
</template> </template>
<script> <script>
import { getDetailStaffTableList,followEmployeeExportApi } from '@/api/modules/clientGroupManage' import { getDetailStaffTableList, followEmployeeExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -37,9 +41,12 @@ export default { ...@@ -37,9 +41,12 @@ export default {
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'datePicker',
prop: 'daterange', name: 'daterange',
label: '入群时间', label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -48,10 +55,12 @@ export default { ...@@ -48,10 +55,12 @@ export default {
}, },
{ {
type: 'select', type: 'select',
prop: 'customerSex', name: 'customerSex',
label: '性别', label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别', placeholder: '请选择性别',
options: [ optionList: [
{ {
label: '全部', label: '全部',
value: null value: null
...@@ -73,14 +82,14 @@ export default { ...@@ -73,14 +82,14 @@ export default {
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupNickName', name: 'groupNickName',
label: '本群昵称', label: '本群昵称',
placeholder: '请输入本群昵称' placeholder: '请输入本群昵称'
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'customerName', name: 'customerName',
label: '客户名称', label: '客户名称',
placeholder: '请输入客户名称' placeholder: '请输入客户名称'
} }
...@@ -94,18 +103,17 @@ export default { ...@@ -94,18 +103,17 @@ export default {
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName', prop: 'groupNickName',
minWidth:120 minWidth: 120
}, },
{ {
label: '员工名称', label: '员工名称',
prop: 'staffName', prop: 'staffName',
minWidth: 150 minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone', prop: 'customerPhone',
minWidth:120 minWidth: 120
}, },
{ {
label: '性别', label: '性别',
...@@ -116,12 +124,12 @@ export default { ...@@ -116,12 +124,12 @@ export default {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene', addHtml: 'joinScene',
minWidth:120 minWidth: 120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName', prop: 'invitorName',
minWidth:120 minWidth: 120
}, },
{ {
label: '入群时间', label: '入群时间',
...@@ -129,7 +137,6 @@ export default { ...@@ -129,7 +137,6 @@ export default {
width: 140 width: 140
} }
] ]
}, },
getListApi: getDetailStaffTableList, getListApi: getDetailStaffTableList,
clientTableDataNum: 0 clientTableDataNum: 0
...@@ -141,7 +148,7 @@ export default { ...@@ -141,7 +148,7 @@ export default {
} }
}, },
methods: { methods: {
getParams(){ getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var 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]
...@@ -184,7 +191,7 @@ export default { ...@@ -184,7 +191,7 @@ export default {
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出 //导出
handleExport(){ handleExport() {
var params = this.getParams() var params = this.getParams()
followEmployeeExportApi(params).then(res => { followEmployeeExportApi(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <!-- <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </search-form> -->
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable">
<span slot="footer">
<el-button size="small" type="primary" @click="handleExport">导出</el-button>
</span>
</GLCombiForm>
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url"> <GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" class="flex-center" slot-scope="scope"> <span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top"> <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> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}} </span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' : '' }}</span>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span> <span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
...@@ -29,7 +34,7 @@ ...@@ -29,7 +34,7 @@
</template> </template>
<script> <script>
import { getDetailQuitTableList,leaveGroupExportApi } from '@/api/modules/clientGroupManage' import { getDetailQuitTableList, leaveGroupExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -43,9 +48,12 @@ export default { ...@@ -43,9 +48,12 @@ export default {
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'datePicker',
prop: 'daterange', name: 'daterange',
label: '入群时间', label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -54,10 +62,12 @@ export default { ...@@ -54,10 +62,12 @@ export default {
}, },
{ {
type: 'select', type: 'select',
prop: 'customerSex', name: 'customerSex',
label: '性别', label: '性别',
placeholder: '请选择性别', placeholder: '请选择性别',
options: [ optionLabel: 'label',
optionId: 'value',
optionList: [
{ {
label: '全部', label: '全部',
value: null value: null
...@@ -79,14 +89,14 @@ export default { ...@@ -79,14 +89,14 @@ export default {
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupNickName', name: 'groupNickName',
label: '本群昵称', label: '本群昵称',
placeholder: '请输入本群昵称' placeholder: '请输入本群昵称'
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'customerName', name: 'customerName',
label: '客户名称', label: '客户名称',
placeholder: '请输入客户名称' placeholder: '请输入客户名称'
} }
...@@ -98,7 +108,7 @@ export default { ...@@ -98,7 +108,7 @@ export default {
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName', prop: 'groupNickName',
minWidth:120 minWidth: 120
}, },
{ {
label: '客户名称', label: '客户名称',
...@@ -109,7 +119,7 @@ export default { ...@@ -109,7 +119,7 @@ export default {
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone', prop: 'customerPhone',
minWidth:120 minWidth: 120
}, },
{ {
label: '性别', label: '性别',
...@@ -120,12 +130,12 @@ export default { ...@@ -120,12 +130,12 @@ export default {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene', addHtml: 'joinScene',
minWidth:120 minWidth: 120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName', prop: 'invitorName',
minWidth:120 minWidth: 120
}, },
{ {
label: '入群时间', label: '入群时间',
...@@ -153,7 +163,7 @@ export default { ...@@ -153,7 +163,7 @@ export default {
} }
}, },
methods: { methods: {
getParams(){ getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var 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]
...@@ -195,7 +205,7 @@ export default { ...@@ -195,7 +205,7 @@ export default {
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出 //导出
handleExport(){ handleExport() {
var params = this.getParams() var params = this.getParams()
leaveGroupExportApi(params).then(res => { leaveGroupExportApi(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <!-- <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </search-form> -->
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable">
<span slot="footer">
<el-button size="small" type="primary" @click="handleExport">导出</el-button>
</span>
</GLCombiForm>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 --> <!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url"> <GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" class="flex-center" slot-scope="scope"> <span slot="customerName" class="flex-center" slot-scope="scope">
...@@ -14,7 +19,7 @@ ...@@ -14,7 +19,7 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}} </span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' : '' }}</span>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span> <span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
...@@ -30,7 +35,7 @@ ...@@ -30,7 +35,7 @@
</template> </template>
<script> <script>
import { getDetailPotentialTableList,potentialClientExportApi } from '@/api/modules/clientGroupManage' import { getDetailPotentialTableList, potentialClientExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -44,9 +49,12 @@ export default { ...@@ -44,9 +49,12 @@ export default {
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'datePicker',
prop: 'daterange', name: 'daterange',
label: '入群时间', label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -80,7 +88,7 @@ export default { ...@@ -80,7 +88,7 @@ export default {
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupNickName', name: 'groupNickName',
label: '本群昵称', label: '本群昵称',
placeholder: '请输入本群昵称' placeholder: '请输入本群昵称'
} }
...@@ -117,7 +125,7 @@ export default { ...@@ -117,7 +125,7 @@ export default {
prop: 'joinTime', prop: 'joinTime',
width: 140 width: 140
} }
], ]
// tableOption: { // tableOption: {
// width: 80, // width: 80,
// btnList: [ // btnList: [
...@@ -138,7 +146,7 @@ export default { ...@@ -138,7 +146,7 @@ export default {
} }
}, },
methods: { methods: {
getParams(){ getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var 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]
...@@ -180,7 +188,7 @@ export default { ...@@ -180,7 +188,7 @@ export default {
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出 //导出
handleExport(){ handleExport() {
var params = this.getParams() var params = this.getParams()
potentialClientExportApi(params).then(res => { potentialClientExportApi(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
......
...@@ -3,16 +3,18 @@ ...@@ -3,16 +3,18 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户群管理</p> --> <!-- <p class="pageTitle">客户群管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick"> <!-- <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
<!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> -->
</span> </span>
</search-form> </search-form> -->
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable">
<span slot="footer">
<el-button size="small" type="primary" @click="handleExport">导出</el-button>
</span>
</GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams"> <GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams">
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> --> <!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
...@@ -21,7 +23,7 @@ ...@@ -21,7 +23,7 @@
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
<span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text"> <span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">
{{scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : ''}} {{ scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : '' }}
</span> </span>
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> --> <!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template> </template>
...@@ -42,15 +44,16 @@ export default { ...@@ -42,15 +44,16 @@ export default {
isReload: true, isReload: true,
url: url, url: url,
sloading: false, sloading: false,
searchForm: { searchForm: {},
},
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'datePicker',
prop: 'daterange', name: 'daterange',
label: '创建时间', label: '创建时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -60,30 +63,32 @@ export default { ...@@ -60,30 +63,32 @@ export default {
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'custGroupName', name: 'custGroupName',
label: '群聊名称', label: '群聊名称',
placeholder: '请输入群聊名称' placeholder: '请输入群聊名称'
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupHostName', name: 'groupHostName',
label: '群主', label: '群主',
placeholder: '请输入群主' placeholder: '请输入群主'
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupAdminName', name: 'groupAdminName',
label: '管理员', label: '管理员',
placeholder: '请输入管理员' placeholder: '请输入管理员'
}, },
{ {
type: 'select', type: 'select',
prop: 'creationMethod', name: 'creationMethod',
label: '创建方式', label: '创建方式',
placeholder: '请选择', placeholder: '请选择',
options: [ optionLabel: 'label',
optionId: 'value',
optionList: [
{ {
label: '全部', label: '全部',
value: null value: null
...@@ -100,10 +105,12 @@ export default { ...@@ -100,10 +105,12 @@ export default {
}, },
{ {
type: 'select', type: 'select',
prop: 'delFlag', name: 'delFlag',
label: '群聊状态', label: '群聊状态',
placeholder: '请选择', placeholder: '请选择',
options: [ optionLabel: 'label',
optionId: 'value',
optionList: [
{ {
label: '全部', label: '全部',
value: null value: null
...@@ -176,7 +183,7 @@ export default { ...@@ -176,7 +183,7 @@ export default {
width: 95, width: 95,
formatter: cellValue => { formatter: cellValue => {
return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '已解散' : '' return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '已解散' : ''
}, }
}, },
{ {
label: '创建时间', label: '创建时间',
...@@ -307,7 +314,7 @@ export default { ...@@ -307,7 +314,7 @@ export default {
} else { } else {
if (params.beginTime) delete params.beginTime && delete params.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
console.log('params',params) console.log('params', params)
delete params.daterange delete params.daterange
return params return params
}, },
......
...@@ -3,16 +3,20 @@ ...@@ -3,16 +3,20 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户管理</p> --> <!-- <p class="pageTitle">客户管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form :ploading="sloading" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick"> <!-- <search-form :ploading="sloading" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button> <el-button type="primary" @click="handleExport">导出</el-button> -->
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" 不做判定了, 允许所有人同步 --> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" 不做判定了, 允许所有人同步 -->
<!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> --> <!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> -->
<!-- </span>
</search-form> -->
<GLCombiForm :formObj="searchForm" :formData="clientManageFormList" @handleOk="searchTable" @handleRest="resetTable">
<span slot="footer">
<el-button size="small" type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </GLCombiForm>
<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" class="flex-center" slot-scope="scope"> <span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top"> <el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
...@@ -109,45 +113,63 @@ export default { ...@@ -109,45 +113,63 @@ export default {
url: url, url: url,
sloading: false, sloading: false,
CLIENTSTATUS: this.$Constants.CLIENT_STATUS, CLIENTSTATUS: this.$Constants.CLIENT_STATUS,
searchForm: {}, searchForm: {
// customerPhone: '',
// followStaff: '',
// customerName: '',
// nickName: '',
// isJoin: '',
// status: '',
// daterange: '',
// addWay: '',
// customerSex: ''
},
searchFormTable: {}, searchFormTable: {},
clientManageFormList: [ clientManageFormList: [
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'customerPhone', // prop: 'customerPhone',
name: 'customerPhone',
label: '联系电话', label: '联系电话',
placeholder: '联系电话' placeholder: '联系电话'
}, },
{ {
type: 'select', type: 'select',
name: 'followStaffList', name: 'followStaff',
prop: 'followStaff', // prop: 'followStaff',
noFilter: false, noFilter: false,
optionLabel: 'label',
optionId: 'value',
label: '跟进员工', label: '跟进员工',
placeholder: '请输入跟进员工', placeholder: '请输入跟进员工',
options: [] optionList: []
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'customerName', // prop: 'customerName',
name: 'customerName',
label: '客户名称', label: '客户名称',
placeholder: '请输入客户名称' placeholder: '请输入客户名称'
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'nickName', // prop: 'nickName',
name: 'nickName',
label: '企微名称', label: '企微名称',
placeholder: '请输入企微名称' placeholder: '请输入企微名称'
}, },
{ {
type: 'select', type: 'select',
prop: 'isJoin', // prop: 'isJoin',
name: 'isJoin',
label: '是否已加企微', label: '是否已加企微',
placeholder: '请选择', placeholder: '请选择',
options: [ optionLabel: 'label',
optionId: 'value',
optionList: [
{ {
label: '全部', label: '全部',
value: null value: null
...@@ -164,28 +186,35 @@ export default { ...@@ -164,28 +186,35 @@ export default {
}, },
{ {
type: 'select', type: 'select',
prop: 'status', // prop: 'status',
name: 'status',
label: '当前状态', label: '当前状态',
placeholder: '请选择当前状态', placeholder: '请选择当前状态',
options: [ optionLabel: 'optionLabel',
optionId: 'optionId',
optionList: [
{ {
label: '全部', optionLabel: '全部',
value: null optionId: null
}, },
{ {
label: '正常', optionLabel: '正常',
value: 0 optionId: 0
}, },
{ {
label: '删除好友', optionLabel: '删除好友',
value: -1 optionId: -1
} }
] ]
}, },
{ {
type: 'daterange', type: 'datePicker',
prop: 'daterange', // prop: 'daterange',
name: 'daterange',
label: '添加时间', label: '添加时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -195,18 +224,23 @@ export default { ...@@ -195,18 +224,23 @@ export default {
{ {
type: 'select', type: 'select',
prop: 'addWay', // prop: 'addWay',
name: 'addWaySource', name: 'addWay',
label: '添加来源', label: '添加来源',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择当前来源', placeholder: '请选择当前来源',
options: [] //this.$Constants.SOURCE_OPTION optionList: [] //this.$Constants.SOURCE_OPTION
}, },
{ {
type: 'select', type: 'select',
prop: 'customerSex', // prop: 'customerSex',
name: 'customerSex',
label: '性别', label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别', placeholder: '请选择性别',
options: this.$Constants.GENDER_OPTION optionList: this.$Constants.GENDER_OPTION
} }
], ],
...@@ -392,7 +426,7 @@ export default { ...@@ -392,7 +426,7 @@ export default {
} }
// addWaySource // addWaySource
const id = this.clientManageFormList.findIndex(item => { const id = this.clientManageFormList.findIndex(item => {
return item.name == 'addWaySource' return item.name == 'addWay'
}) })
let data = res.map(item => { let data = res.map(item => {
return { return {
...@@ -406,7 +440,7 @@ export default { ...@@ -406,7 +440,7 @@ export default {
if (data && data.length > 0) { if (data && data.length > 0) {
window.localStorage.setItem('sourceList', JSON.stringify(data)) window.localStorage.setItem('sourceList', JSON.stringify(data))
} }
this.$set(this.clientManageFormList[id], 'options', data) this.$set(this.clientManageFormList[id], 'optionList', data)
}) })
}, },
getStaffList(val) { getStaffList(val) {
...@@ -418,7 +452,7 @@ export default { ...@@ -418,7 +452,7 @@ export default {
return '' return ''
} }
const id = this.clientManageFormList.findIndex(item => { const id = this.clientManageFormList.findIndex(item => {
return item.name == 'followStaffList' return item.name == 'followStaff'
}) })
const staff = res.map(item => { const staff = res.map(item => {
return { return {
...@@ -429,7 +463,7 @@ export default { ...@@ -429,7 +463,7 @@ export default {
staff.unshift({ label: '全部', value: '' }) staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => { this.$nextTick(() => {
this.clientManageFormList[id].options = staff this.clientManageFormList[id].optionList = staff
}) })
}) })
}, },
...@@ -453,6 +487,8 @@ export default { ...@@ -453,6 +487,8 @@ export default {
}, },
//搜索表格 //搜索表格
searchTable() { searchTable() {
console.log('进来了1111111111111111111111111')
console.log(this.searchForm)
this.$refs.clientManage.refreshTable() this.$refs.clientManage.refreshTable()
}, },
syncClick() { syncClick() {
......
...@@ -11,15 +11,13 @@ ...@@ -11,15 +11,13 @@
<img src="@/assets/guestCustom/chat-logo.png" alt /> <img src="@/assets/guestCustom/chat-logo.png" alt />
</div> </div>
<div class="group-name-info"> <div class="group-name-info">
<div>{{groupInfo.groupName}}</div> <div>{{ groupInfo.groupName }}</div>
<div <div class="group-name-info-count">{{ groupInfo.userList ? groupInfo.userList.length : 0 }}人</div>
class="group-name-info-count"
>{{groupInfo.userList ? groupInfo.userList.length : 0}}人</div>
</div> </div>
</div> </div>
<div class="text-info"> <div class="text-info">
已建群数量: 已建群数量:
<span class="group-number">{{groupInfo.groupCount}}</span> <span class="group-number">{{ groupInfo.groupCount }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -40,12 +38,7 @@ ...@@ -40,12 +38,7 @@
<el-popover placement="top" width="600" trigger="hover"> <el-popover placement="top" width="600" trigger="hover">
<span slot="reference">...({{ followList.length }})</span> <span slot="reference">...({{ followList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in followList" :key="index" :disable-transitions="false">
type="info"
v-for="(i, index) in followList"
:key="index"
:disable-transitions="false"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag> </el-tag>
...@@ -67,12 +60,7 @@ ...@@ -67,12 +60,7 @@
<el-popover placement="top" width="600" trigger="hover"> <el-popover placement="top" width="600" trigger="hover">
<span slot="reference">...({{ memberList.length }})</span> <span slot="reference">...({{ memberList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in memberList" :key="index" :disable-transitions="false">
type="info"
v-for="(i, index) in memberList"
:key="index"
:disable-transitions="false"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag> </el-tag>
...@@ -92,20 +80,9 @@ ...@@ -92,20 +80,9 @@
<i class="el-icon-refresh"></i> <i class="el-icon-refresh"></i>
更新数据 更新数据
</div> </div>
<div class="text-info">更新于:{{currentTime}}</div> <div class="text-info">更新于:{{ currentTime }}</div>
</div> </div>
<GLTable <GLTable class="table" :searchForm="searchForm" ref="groupDetail" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :tableData="tableData">
class="table"
:searchForm="searchForm"
ref="groupDetail"
:hasNum="false"
:getListApi="getListApi"
:beforeSearchFn="beforeSearchFn"
:noDataImg="url"
:pageConf="pageConf"
:tableParams="tableParams"
:tableData="tableData"
>
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<div class=""> <div class="">
<!-- <div class="customer-img"> <!-- <div class="customer-img">
...@@ -113,9 +90,7 @@ ...@@ -113,9 +90,7 @@
</div>--> </div>-->
<div class="customer-name"> <div class="customer-name">
{{ scope.scope.customerName }} {{ scope.scope.customerName }}
<label <label class="origin">{{ WECHANT_TYPE[scope.scope.type] }}</label>
class="origin"
>{{ WECHANT_TYPE[scope.scope.type]}}</label>
</div> </div>
</div> </div>
</span> </span>
...@@ -135,10 +110,7 @@ ...@@ -135,10 +110,7 @@
class="statusText" class="statusText"
v-if="scope.scope.delFlag == '0'" v-if="scope.scope.delFlag == '0'"
>使用</span> --> >使用</span> -->
<span <span class="statusText" :class="{ 'red-text': scope.scope.delFlag == '-1' }">{{ scope.scope.delFlag == '0' ? '使用' : scope.scope.delFlag == '-1' ? '解散于' : '' }}</span>
class="statusText"
:class="{ 'red-text': scope.scope.delFlag == '-1' }"
>{{ scope.scope.delFlag == '0' ? '使用' : scope.scope.delFlag == '-1' ? '解散于' : '' }}</span>
<span v-if="scope.scope.delFlag == '-1'" class="gray-text">{{ scope.scope.disMiss }}</span> <span v-if="scope.scope.delFlag == '-1'" class="gray-text">{{ scope.scope.disMiss }}</span>
</span> </span>
</GLTable> </GLTable>
...@@ -198,32 +170,32 @@ export default { ...@@ -198,32 +170,32 @@ export default {
{ {
label: '客户', label: '客户',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName'
//align: 'left' //align: 'left'
// width: 200 // width: 200
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime'
//align: 'left' //align: 'left'
// width: 200 // width: 200
}, },
{ {
label: '现群名称', label: '现群名称',
prop: 'chatName', prop: 'chatName'
//align: 'left' //align: 'left'
}, },
{ {
label: '现群主', label: '现群主',
prop: 'createdBy', prop: 'createdBy',
// minWidth: '180px', // minWidth: '180px',
addHtml: 'groupOwner', addHtml: 'groupOwner'
//align: 'left' //align: 'left'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status'
// width: 250, // width: 250,
//align: 'left' //align: 'left'
} }
...@@ -607,7 +579,6 @@ export default { ...@@ -607,7 +579,6 @@ export default {
height: 100%; height: 100%;
} }
} }
} }
} }
.entmicro { .entmicro {
......
...@@ -9,26 +9,13 @@ ...@@ -9,26 +9,13 @@
</div> </div>
<div class="container"> <div class="container">
<search-form <search-form class="searchTop border-shadow" :formModel="searchForm" :formList="searchFormData" labelWidth="70px">
class="searchTop border-shadow"
:formModel="searchForm"
:formList="searchFormData"
labelWidth="70px"
>
<span class="inline-b" style="float: right" slot="form-slot"> <span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
</search-form> </search-form>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable <GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
ref="gueastGroup"
@setTableFinishFun="setTableFinishFun"
:noDataImg="url"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope"> <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<!-- <span v-for="(i, index) in scope.scope.userList" :key="index"> <!-- <span v-for="(i, index) in scope.scope.userList" :key="index">
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
...@@ -42,20 +29,10 @@ ...@@ -42,20 +29,10 @@
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }} {{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag> </el-tag>
<el-tag type="info" v-if="scope.scope.userList.length > 9 && idx == 9"> <el-tag type="info" v-if="scope.scope.userList.length > 9 && idx == 9">
<el-popover <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
placement="top"
width="600"
trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<span slot="reference">...({{ scope.scope.userList.length }})</span> <span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in scope.scope.userList" :key="index" :disable-transitions="false">
type="info"
v-for="(i, index) in scope.scope.userList"
:key="index"
:disable-transitions="false"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag> </el-tag>
...@@ -65,20 +42,13 @@ ...@@ -65,20 +42,13 @@
</div> </div>
</div> </div>
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<span <span class="statusText" :class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }">{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
class="statusText"
:class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }"
>{{ scope.scope.status == '1' ? '启用' : '停用' }}</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="btnClick('edit', scope.scope)">修改</el-button> <!-- <el-button type="text" @click="btnClick('edit', scope.scope)">修改</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">查看详情</el-button>--> <el-button type="text" @click="btnClick('detail', scope.scope)">查看详情</el-button>-->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton> <GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton>
<GLButton <GLButton type="text" @click="btnClick('status', scope.scope)" fn="启用禁用">{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
type="text"
@click="btnClick('status', scope.scope)"
fn="启用禁用"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<GLButton type="text" @click="btnClick('detail', scope.scope)" fn="客户群详情">查看详情</GLButton> <GLButton type="text" @click="btnClick('detail', scope.scope)" fn="客户群详情">查看详情</GLButton>
<!-- <el-button <!-- <el-button
type="text" type="text"
...@@ -343,6 +313,34 @@ export default { ...@@ -343,6 +313,34 @@ 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';
.searchTop {
/deep/ .el-form-item:nth-child(2) {
position: static !important;
.el-form-item__content {
margin-left: 15px !important;
}
}
}
/deep/.search-form {
.itemWidth {
display: flex;
.el-form-item {
display: flex;
}
}
.el-form-item__content {
width: auto;
display: inline-block;
margin-left: 0px !important;
.el-input {
width: 415px;
.el-input__inner {
width: 415px;
}
}
}
}
.btn-header { .btn-header {
margin-bottom: 20px; margin-bottom: 20px;
} }
...@@ -417,8 +415,5 @@ export default { ...@@ -417,8 +415,5 @@ export default {
.search-form .el-form-item:last-child { .search-form .el-form-item:last-child {
float: right; float: right;
} }
.search-form .el-form-item__content {
width: 215px;
}
} }
</style> </style>
...@@ -30,14 +30,13 @@ ...@@ -30,14 +30,13 @@
</div> </div>
<div class="pageContent"> <div class="pageContent">
<!-- @setTableHeightEvent="setTableHeightEvent" --> <!-- <search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent" labelWidth="54px">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent" labelWidth="54px">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button @click="resetTable" plain>重置</el-button> <el-button @click="resetTable" plain>重置</el-button>
<!-- :id="tableParams.btnId" -->
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
</search-form> </search-form> -->
<GLCombiForm :formObj="searchForm" :formData="tagsPartFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- noDataText="你当前还没有添加的标签" --> <!-- noDataText="你当前还没有添加的标签" -->
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="tagsManage" :hasNum="false" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="tagsManage" :hasNum="false" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope"> <span slot="labelGroup" slot-scope="scope">
...@@ -67,8 +66,8 @@ ...@@ -67,8 +66,8 @@
<template slot="xxx" slot-scope="scope"> <template slot="xxx" slot-scope="scope">
<!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑--> <!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑-->
<!-- v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" --> <!-- v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" -->
<span @click="btnClick('edit', scope.scope)" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" class="blue-text" >编辑标签组</span> <span @click="btnClick('edit', scope.scope)" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" class="blue-text">编辑标签组</span>
<GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType!==2" @click="toViewCustomer(scope.scope)" >查看客户</GLButton> <GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType !== 2" @click="toViewCustomer(scope.scope)">查看客户</GLButton>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -197,15 +196,17 @@ export default { ...@@ -197,15 +196,17 @@ export default {
tagsPartFormList: [ tagsPartFormList: [
{ {
type: 'select', type: 'select',
prop: 'labelTreeReq.labelTypesStr', name: 'labelTreeReq.labelTypesStr',
label: '标签组', label: '标签组',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择标签组类型', placeholder: '请选择标签组类型',
options: this.$Constants.LABEL_OPTION optionList: this.$Constants.LABEL_OPTION
}, },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'labelTreeReq.labelGroupName', name: 'labelTreeReq.labelGroupName',
label: '搜索', label: '搜索',
placeholder: '请输入标签组或标签名称', placeholder: '请输入标签组或标签名称',
clearable: true clearable: true
...@@ -220,7 +221,7 @@ export default { ...@@ -220,7 +221,7 @@ export default {
label: '标签组', label: '标签组',
prop: 'labelGroup', prop: 'labelGroup',
addHtml: 'labelGroup', addHtml: 'labelGroup',
width: 230, width: 230
}, },
{ {
label: '标签组类型', label: '标签组类型',
...@@ -263,7 +264,7 @@ export default { ...@@ -263,7 +264,7 @@ export default {
// maxlength: 30, // maxlength: 30,
// showWordLimit: true, // showWordLimit: true,
disabled: false, disabled: false,
clickFunc:this.watchInput clickFunc: this.watchInput
}, },
{ {
label: '标签组类型', label: '标签组类型',
...@@ -282,7 +283,7 @@ export default { ...@@ -282,7 +283,7 @@ export default {
], ],
tagRules: { tagRules: {
tagsName: [ tagsName: [
{ required: true, message: '请输入名称', trigger: 'blur' }, { required: true, message: '请输入名称', trigger: 'blur' }
// { // {
// validator: checkName, // validator: checkName,
// trigger: 'change' // trigger: 'change'
...@@ -366,10 +367,10 @@ export default { ...@@ -366,10 +367,10 @@ export default {
const type = info.labelType const type = info.labelType
this.$router.push({ this.$router.push({
// path:`/tagsManage/viewCustomers/530` // path:`/tagsManage/viewCustomers/530`
path:`/tagsManage/viewCustomers/${id}/${type}` path: `/tagsManage/viewCustomers/${id}/${type}`
}) })
}, },
watchInput(){ watchInput() {
console.log('点击标签组名称输入框') console.log('点击标签组名称输入框')
}, },
showTagArray(list) { showTagArray(list) {
...@@ -387,7 +388,6 @@ export default { ...@@ -387,7 +388,6 @@ export default {
return e return e
} }
return this.$Utils.cutMaxCharStr(e) return this.$Utils.cutMaxCharStr(e)
}, },
isShowEditBtn(row) { isShowEditBtn(row) {
//集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店 //集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店
...@@ -718,7 +718,7 @@ export default { ...@@ -718,7 +718,7 @@ 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';
.leftDistance{ .leftDistance {
margin-left: 10px; margin-left: 10px;
} }
.scrm-sub-client-container { .scrm-sub-client-container {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!