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
/**
* 时间控件-限制月份
*/
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
<!-- <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
<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'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
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(GLTable)
import 'glsx-components/dist/glsx-components.css'
......@@ -12,42 +18,42 @@ import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
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
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
// { name, id, }
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
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
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
// { name, id, }
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
<template>
<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">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</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" 去掉,表格组件也应该去掉 -->
<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">
......@@ -14,7 +19,7 @@
<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 ? '@企微' : 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>
<span slot="customerSex" slot-scope="scope">
......@@ -31,7 +36,7 @@
</template>
<script>
import { getDetailTableList,clientExportApi } from '@/api/modules/clientGroupManage'
import { getDetailTableList, clientExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -45,9 +50,12 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -56,10 +64,12 @@ export default {
},
{
type: 'select',
prop: 'customerSex',
name: 'customerSex',
label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别',
options: [
optionList: [
{
label: '全部',
value: null
......@@ -81,14 +91,14 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
......@@ -101,7 +111,7 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth:120
minWidth: 120
},
{
label: '客户名称',
......@@ -112,7 +122,7 @@ export default {
{
label: '手机号码',
prop: 'customerPhone',
minWidth:120
minWidth: 120
},
{
label: '性别',
......@@ -123,12 +133,12 @@ export default {
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth:120
minWidth: 120
},
{
label: '邀请人',
prop: 'invitorName',
minWidth:120
minWidth: 120
},
{
label: '入群时间',
......@@ -156,10 +166,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -199,7 +209,7 @@ export default {
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
handleExport() {
var params = this.getParams()
clientExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -226,4 +236,4 @@ export default {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file
</style>
<template>
<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">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</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">
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
......@@ -23,7 +27,7 @@
</template>
<script>
import { getDetailStaffTableList,followEmployeeExportApi } from '@/api/modules/clientGroupManage'
import { getDetailStaffTableList, followEmployeeExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -37,9 +41,12 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -48,10 +55,12 @@ export default {
},
{
type: 'select',
prop: 'customerSex',
name: 'customerSex',
label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别',
options: [
optionList: [
{
label: '全部',
value: null
......@@ -73,14 +82,14 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
......@@ -94,18 +103,17 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth:120
minWidth: 120
},
{
label: '员工名称',
prop: 'staffName',
minWidth: 150
},
{
label: '手机号码',
prop: 'customerPhone',
minWidth:120
minWidth: 120
},
{
label: '性别',
......@@ -116,12 +124,12 @@ export default {
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth:120
minWidth: 120
},
{
label: '邀请人',
prop: 'invitorName',
minWidth:120
minWidth: 120
},
{
label: '入群时间',
......@@ -129,7 +137,6 @@ export default {
width: 140
}
]
},
getListApi: getDetailStaffTableList,
clientTableDataNum: 0
......@@ -141,10 +148,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -164,7 +171,7 @@ export default {
// }
// resolve()
// })
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
......@@ -183,8 +190,8 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
//导出
handleExport() {
var params = this.getParams()
followEmployeeExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -211,4 +218,4 @@ export default {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file
</style>
<template>
<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">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</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">
<span slot="customerName" class="flex-center" slot-scope="scope">
<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 ? '@企微' : 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 slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -29,7 +34,7 @@
</template>
<script>
import { getDetailQuitTableList,leaveGroupExportApi } from '@/api/modules/clientGroupManage'
import { getDetailQuitTableList, leaveGroupExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -43,9 +48,12 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -54,10 +62,12 @@ export default {
},
{
type: 'select',
prop: 'customerSex',
name: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -79,14 +89,14 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
......@@ -98,7 +108,7 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth:120
minWidth: 120
},
{
label: '客户名称',
......@@ -109,7 +119,7 @@ export default {
{
label: '手机号码',
prop: 'customerPhone',
minWidth:120
minWidth: 120
},
{
label: '性别',
......@@ -120,12 +130,12 @@ export default {
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth:120
minWidth: 120
},
{
label: '邀请人',
prop: 'invitorName',
minWidth:120
minWidth: 120
},
{
label: '入群时间',
......@@ -153,10 +163,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -176,7 +186,7 @@ export default {
// }
// resolve()
// })
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
......@@ -194,8 +204,8 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
//导出
handleExport() {
var params = this.getParams()
leaveGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -222,4 +232,4 @@ export default {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file
</style>
<template>
<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">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</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" 去掉,表格组件也应该去掉 -->
<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">
......@@ -14,7 +19,7 @@
<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 ? '@企微' : 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 slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -30,7 +35,7 @@
</template>
<script>
import { getDetailPotentialTableList,potentialClientExportApi } from '@/api/modules/clientGroupManage'
import { getDetailPotentialTableList, potentialClientExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -44,9 +49,12 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -80,7 +88,7 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
}
......@@ -117,7 +125,7 @@ export default {
prop: 'joinTime',
width: 140
}
],
]
// tableOption: {
// width: 80,
// btnList: [
......@@ -138,10 +146,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -161,7 +169,7 @@ export default {
// }
// resolve()
// })
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
......@@ -179,8 +187,8 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
//导出
handleExport() {
var params = this.getParams()
potentialClientExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -207,4 +215,4 @@ export default {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file
</style>
......@@ -3,16 +3,18 @@
<div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户群管理</p> -->
<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">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</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>
</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">
<span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
......@@ -21,8 +23,8 @@
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
<span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">
{{scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : ''}}
</span>
{{ scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : '' }}
</span>
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template>
</GLTable>
......@@ -42,15 +44,16 @@ export default {
isReload: true,
url: url,
sloading: false,
searchForm: {
},
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '创建时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -60,30 +63,32 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'custGroupName',
name: 'custGroupName',
label: '群聊名称',
placeholder: '请输入群聊名称'
},
{
type: 'input',
inputType: 'text',
prop: 'groupHostName',
name: 'groupHostName',
label: '群主',
placeholder: '请输入群主'
},
{
type: 'input',
inputType: 'text',
prop: 'groupAdminName',
name: 'groupAdminName',
label: '管理员',
placeholder: '请输入管理员'
},
{
type: 'select',
prop: 'creationMethod',
name: 'creationMethod',
label: '创建方式',
placeholder: '请选择',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -100,10 +105,12 @@ export default {
},
{
type: 'select',
prop: 'delFlag',
name: 'delFlag',
label: '群聊状态',
placeholder: '请选择',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -174,9 +181,9 @@ export default {
label: '群聊状态',
prop: 'delFlag',
width: 95,
formatter: cellValue => {
formatter: cellValue => {
return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '已解散' : ''
},
}
},
{
label: '创建时间',
......@@ -307,7 +314,7 @@ export default {
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
console.log('params',params)
console.log('params', params)
delete params.daterange
return params
},
......
......@@ -3,16 +3,20 @@
<div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户管理</p> -->
<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">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</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> -->
<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>
</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>
</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">
<span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
......@@ -109,45 +113,63 @@ export default {
url: url,
sloading: false,
CLIENTSTATUS: this.$Constants.CLIENT_STATUS,
searchForm: {},
searchForm: {
// customerPhone: '',
// followStaff: '',
// customerName: '',
// nickName: '',
// isJoin: '',
// status: '',
// daterange: '',
// addWay: '',
// customerSex: ''
},
searchFormTable: {},
clientManageFormList: [
{
type: 'input',
inputType: 'text',
prop: 'customerPhone',
// prop: 'customerPhone',
name: 'customerPhone',
label: '联系电话',
placeholder: '联系电话'
},
{
type: 'select',
name: 'followStaffList',
prop: 'followStaff',
name: 'followStaff',
// prop: 'followStaff',
noFilter: false,
optionLabel: 'label',
optionId: 'value',
label: '跟进员工',
placeholder: '请输入跟进员工',
options: []
optionList: []
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
// prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
},
{
type: 'input',
inputType: 'text',
prop: 'nickName',
// prop: 'nickName',
name: 'nickName',
label: '企微名称',
placeholder: '请输入企微名称'
},
{
type: 'select',
prop: 'isJoin',
// prop: 'isJoin',
name: 'isJoin',
label: '是否已加企微',
placeholder: '请选择',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -164,28 +186,35 @@ export default {
},
{
type: 'select',
prop: 'status',
// prop: 'status',
name: 'status',
label: '当前状态',
placeholder: '请选择当前状态',
options: [
optionLabel: 'optionLabel',
optionId: 'optionId',
optionList: [
{
label: '全部',
value: null
optionLabel: '全部',
optionId: null
},
{
label: '正常',
value: 0
optionLabel: '正常',
optionId: 0
},
{
label: '删除好友',
value: -1
optionLabel: '删除好友',
optionId: -1
}
]
},
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
// prop: 'daterange',
name: 'daterange',
label: '添加时间',
datePickerAttrs: {
'value-format': 'yyyy-MM-dd'
},
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -195,18 +224,23 @@ export default {
{
type: 'select',
prop: 'addWay',
name: 'addWaySource',
// prop: 'addWay',
name: 'addWay',
label: '添加来源',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择当前来源',
options: [] //this.$Constants.SOURCE_OPTION
optionList: [] //this.$Constants.SOURCE_OPTION
},
{
type: 'select',
prop: 'customerSex',
// prop: 'customerSex',
name: 'customerSex',
label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别',
options: this.$Constants.GENDER_OPTION
optionList: this.$Constants.GENDER_OPTION
}
],
......@@ -392,7 +426,7 @@ export default {
}
// addWaySource
const id = this.clientManageFormList.findIndex(item => {
return item.name == 'addWaySource'
return item.name == 'addWay'
})
let data = res.map(item => {
return {
......@@ -406,7 +440,7 @@ export default {
if (data && data.length > 0) {
window.localStorage.setItem('sourceList', JSON.stringify(data))
}
this.$set(this.clientManageFormList[id], 'options', data)
this.$set(this.clientManageFormList[id], 'optionList', data)
})
},
getStaffList(val) {
......@@ -418,7 +452,7 @@ export default {
return ''
}
const id = this.clientManageFormList.findIndex(item => {
return item.name == 'followStaffList'
return item.name == 'followStaff'
})
const staff = res.map(item => {
return {
......@@ -429,7 +463,7 @@ export default {
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.clientManageFormList[id].options = staff
this.clientManageFormList[id].optionList = staff
})
})
},
......@@ -453,6 +487,8 @@ export default {
},
//搜索表格
searchTable() {
console.log('进来了1111111111111111111111111')
console.log(this.searchForm)
this.$refs.clientManage.refreshTable()
},
syncClick() {
......
......@@ -11,15 +11,13 @@
<img src="@/assets/guestCustom/chat-logo.png" alt />
</div>
<div class="group-name-info">
<div>{{groupInfo.groupName}}</div>
<div
class="group-name-info-count"
>{{groupInfo.userList ? groupInfo.userList.length : 0}}人</div>
<div>{{ groupInfo.groupName }}</div>
<div class="group-name-info-count">{{ groupInfo.userList ? groupInfo.userList.length : 0 }}人</div>
</div>
</div>
<div class="text-info">
已建群数量:
<span class="group-number">{{groupInfo.groupCount}}</span>
<span class="group-number">{{ groupInfo.groupCount }}</span>
</div>
</div>
</div>
......@@ -40,12 +38,7 @@
<el-popover placement="top" width="600" trigger="hover">
<span slot="reference">...({{ followList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
v-for="(i, index) in followList"
:key="index"
:disable-transitions="false"
>
<el-tag type="info" v-for="(i, index) in followList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
......@@ -67,12 +60,7 @@
<el-popover placement="top" width="600" trigger="hover">
<span slot="reference">...({{ memberList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
v-for="(i, index) in memberList"
:key="index"
:disable-transitions="false"
>
<el-tag type="info" v-for="(i, index) in memberList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
......@@ -92,20 +80,9 @@
<i class="el-icon-refresh"></i>
更新数据
</div>
<div class="text-info">更新于:{{currentTime}}</div>
<div class="text-info">更新于:{{ currentTime }}</div>
</div>
<GLTable
class="table"
:searchForm="searchForm"
ref="groupDetail"
:hasNum="false"
:getListApi="getListApi"
:beforeSearchFn="beforeSearchFn"
:noDataImg="url"
:pageConf="pageConf"
:tableParams="tableParams"
:tableData="tableData"
>
<GLTable 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">
<div class="">
<!-- <div class="customer-img">
......@@ -113,9 +90,7 @@
</div>-->
<div class="customer-name">
{{ scope.scope.customerName }}
<label
class="origin"
>{{ WECHANT_TYPE[scope.scope.type]}}</label>
<label class="origin">{{ WECHANT_TYPE[scope.scope.type] }}</label>
</div>
</div>
</span>
......@@ -135,10 +110,7 @@
class="statusText"
v-if="scope.scope.delFlag == '0'"
>使用</span> -->
<span
class="statusText"
:class="{ 'red-text': scope.scope.delFlag == '-1' }"
>{{ scope.scope.delFlag == '0' ? '使用' : scope.scope.delFlag == '-1' ? '解散于' : '' }}</span>
<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>
</GLTable>
......@@ -198,32 +170,32 @@ export default {
{
label: '客户',
prop: 'customerName',
addHtml: 'customerName',
addHtml: 'customerName'
//align: 'left'
// width: 200
},
{
label: '创建时间',
prop: 'createdTime',
prop: 'createdTime'
//align: 'left'
// width: 200
},
{
label: '现群名称',
prop: 'chatName',
prop: 'chatName'
//align: 'left'
},
{
label: '现群主',
prop: 'createdBy',
// minWidth: '180px',
addHtml: 'groupOwner',
addHtml: 'groupOwner'
//align: 'left'
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
addHtml: 'status'
// width: 250,
//align: 'left'
}
......@@ -607,7 +579,6 @@ export default {
height: 100%;
}
}
}
}
.entmicro {
......@@ -654,4 +625,4 @@ i {
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
\ No newline at end of file
</style>
......@@ -9,26 +9,13 @@
</div>
<div class="container">
<search-form
class="searchTop border-shadow"
:formModel="searchForm"
:formList="searchFormData"
labelWidth="70px"
>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="searchFormData" labelWidth="70px">
<span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
<!-- 表格区域 开始 -->
<GLTable
ref="gueastGroup"
@setTableFinishFun="setTableFinishFun"
:noDataImg="url"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
>
<GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<!-- <span v-for="(i, index) in scope.scope.userList" :key="index">
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
......@@ -42,20 +29,10 @@
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
<el-tag type="info" v-if="scope.scope.userList.length > 9 && idx == 9">
<el-popover
placement="top"
width="600"
trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
v-for="(i, index) in scope.scope.userList"
:key="index"
:disable-transitions="false"
>
<el-tag type="info" v-for="(i, index) in scope.scope.userList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
......@@ -65,20 +42,13 @@
</div>
</div>
<span slot="status" slot-scope="scope">
<span
class="statusText"
:class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }"
>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
<span class="statusText" :class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }">{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
</span>
<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('detail', scope.scope)">查看详情</el-button>-->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton>
<GLButton
type="text"
@click="btnClick('status', scope.scope)"
fn="启用禁用"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<GLButton type="text" @click="btnClick('status', scope.scope)" fn="启用禁用">{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<GLButton type="text" @click="btnClick('detail', scope.scope)" fn="客户群详情">查看详情</GLButton>
<!-- <el-button
type="text"
......@@ -343,6 +313,34 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.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 {
margin-bottom: 20px;
}
......@@ -417,8 +415,5 @@ export default {
.search-form .el-form-item:last-child {
float: right;
}
.search-form .el-form-item__content {
width: 215px;
}
}
</style>
......@@ -30,14 +30,13 @@
</div>
<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">
<el-button @click="resetTable" plain>重置</el-button>
<!-- :id="tableParams.btnId" -->
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
</search-form> -->
<GLCombiForm :formObj="searchForm" :formData="tagsPartFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- 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' }">
<span slot="labelGroup" slot-scope="scope">
......@@ -47,7 +46,7 @@
<!-- :class="[expande ? 'expande' : 'close']" -->
<div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelList)" :key="index" class="ellipsis-1 tag-box-wrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelList)" :key="index" class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.name" placement="top">
<span>{{ item.name }}</span>
</el-tooltip>
......@@ -67,8 +66,8 @@
<template slot="xxx" slot-scope="scope">
<!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑-->
<!-- 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>
<GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType!==2" @click="toViewCustomer(scope.scope)" >查看客户</GLButton>
<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>
</template>
</GLTable>
</div>
......@@ -197,15 +196,17 @@ export default {
tagsPartFormList: [
{
type: 'select',
prop: 'labelTreeReq.labelTypesStr',
name: 'labelTreeReq.labelTypesStr',
label: '标签组',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择标签组类型',
options: this.$Constants.LABEL_OPTION
optionList: this.$Constants.LABEL_OPTION
},
{
type: 'input',
inputType: 'text',
prop: 'labelTreeReq.labelGroupName',
name: 'labelTreeReq.labelGroupName',
label: '搜索',
placeholder: '请输入标签组或标签名称',
clearable: true
......@@ -220,7 +221,7 @@ export default {
label: '标签组',
prop: 'labelGroup',
addHtml: 'labelGroup',
width: 230,
width: 230
},
{
label: '标签组类型',
......@@ -239,7 +240,7 @@ export default {
fixed: 'right',
addHtml: 'xxx',
width: 180
}
}
]
// tableOption: {
// width: 120
......@@ -263,7 +264,7 @@ export default {
// maxlength: 30,
// showWordLimit: true,
disabled: false,
clickFunc:this.watchInput
clickFunc: this.watchInput
},
{
label: '标签组类型',
......@@ -282,7 +283,7 @@ export default {
],
tagRules: {
tagsName: [
{ required: true, message: '请输入名称', trigger: 'blur' },
{ required: true, message: '请输入名称', trigger: 'blur' }
// {
// validator: checkName,
// trigger: 'change'
......@@ -360,17 +361,17 @@ export default {
// toViewCustomer(info) {
// this.$router.push('/tagsManage/viewCustomers')
// },
toViewCustomer(info) {
console.log(info)
const id = info.labelGroup.id
const type = info.labelType
this.$router.push({
// path:`/tagsManage/viewCustomers/530`
path:`/tagsManage/viewCustomers/${id}/${type}`
})
toViewCustomer(info) {
console.log(info)
const id = info.labelGroup.id
const type = info.labelType
this.$router.push({
// path:`/tagsManage/viewCustomers/530`
path: `/tagsManage/viewCustomers/${id}/${type}`
})
},
watchInput(){
console.log('点击标签组名称输入框')
watchInput() {
console.log('点击标签组名称输入框')
},
showTagArray(list) {
if (list.length == 0) {
......@@ -380,14 +381,13 @@ export default {
return list.slice(0, 9)
},
checkInputContent(e) {
//确保每个输入框的内容不和已存在的编辑标签相同
//确保每个输入框的内容不和已存在的编辑标签相同
let isHasSameTag = this.editTagList.some(ele => ele.name == e)
if (isHasSameTag) {
this.$message.error('不允许输入已存在的标签')
return e
}
return this.$Utils.cutMaxCharStr(e)
return this.$Utils.cutMaxCharStr(e)
},
isShowEditBtn(row) {
//集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店
......@@ -697,7 +697,7 @@ export default {
i.inputVisible = false
}
})
return this.$Utils.cutMaxCharStr(inputValue)
return this.$Utils.cutMaxCharStr(inputValue)
},
handleSelect(value) {
console.log('值内容', value)
......@@ -718,7 +718,7 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.leftDistance{
.leftDistance {
margin-left: 10px;
}
.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!