Commit f5328e36 by 前端

更新物业需求

1 parent a82b935e
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-animate-number": "^0.4.2", "vue-animate-number": "^0.4.2",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2" "vuex": "^3.1.2",
"wangeditor": "^4.7.15"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
export function getTableList (params){ export function getTableList (params){
params.method='entmicro.api.customer.base.page' params.method='entmicro.api.customer.base.page'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
sign: true sign: true
}) })
} }
export function syncCustomerBase(params){ export function syncCustomerBase(params){
params.method='entmicro.api.synchro.syncCustomerBase' params.method='entmicro.api.synchro.syncCustomerBase'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -181,4 +181,16 @@ export function addSingleClientTag(params) { ...@@ -181,4 +181,16 @@ export function addSingleClientTag(params) {
sign: true, sign: true,
returnAll: true returnAll: true
}) })
}
\ No newline at end of file \ No newline at end of file
}
// 入群欢迎语添加
export function addWelcomeGroup(params) {
params.method = 'entmicro.api.customer.base.chat.group.welcome.message.add'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
import { http } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
//权益卡
const getCard = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//权益卡
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//是否开通权益
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//优惠券
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//套餐
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
//秒杀活动
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 众筹模式活动
const crowdfundingActivity = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板保存
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板更新
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板创建人
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const templateDetail = params => {
params.method = `${path}template.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave,
templateDetail,
crowdfundingActivity,
bulgeActivity
}
...@@ -20,7 +20,30 @@ ...@@ -20,7 +20,30 @@
.el-tag.el-tag--info.el-tag--plain { .el-tag.el-tag--info.el-tag--plain {
background: transparent !important; background: transparent !important;
} }
.live-room .container {
background: #ffffff;
padding: 20px;
}
.live-room .container-nop {
background: #ffffff;
}
.live-room .m-b-20 {
margin-bottom: 20px;
}
.live-room .m-t-20 {
margin-top: 20px;
}
.border-title {
height: 56px;
background: #ffffff;
padding: 20px;
box-sizing: border-box;
font-weight: 600;
font-size: 16px;
color: #333333;
border-bottom: 1px solid #e5e5e5;
}
// ::-webkit-scrollbar { // ::-webkit-scrollbar {
// /*滚动条整体样式*/ // /*滚动条整体样式*/
// width: 6px; // width: 6px;
...@@ -51,7 +74,10 @@ ...@@ -51,7 +74,10 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.is_error{
color: #f56c6c;
font-size: 12px;
}
.color-6 { .color-6 {
color: #666666; color: #666666;
} }
...@@ -192,4 +218,4 @@ ...@@ -192,4 +218,4 @@
.headPortrait { .headPortrait {
vertical-align: middle; vertical-align: middle;
}
\ 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
}
}
<template>
<div class="map-box" :style="{ height: mapHeight + 'px', width: mapWidth + 'xp' }">
<div id="container">
<el-select v-model="input" class="map-input" filterable remote reserve-keyword placeholder="请输入" :remote-method="remoteMethod" @change="handleChangeAdr" :loading="loading">
<el-option v-for="item in adrList" :key="item.id" :label="item.address" :value="item.id"></el-option>
</el-select>
</div>
<div class="map-address">
<img class="icon-map" src="./images/icon-map.png" />
{{ address }}
</div>
</div>
</template>
<script>
let map, marker, placeSearch
export default {
name: 'map',
props: {
mapHeight: {
type: Number,
default: 460
},
mapWidth: {
type: Number,
default: 740
}
},
data() {
return {
input: [],
address: '',
adrList: [],
lnglat: [],
geocoderAddress: {}
}
},
mounted() {
this.mapInit()
},
methods: {
// initMap() {
// console.log(document.getElementsByTagName('head'))
// var script = document.createElement('script')
// script.type = 'text/javascript'
// script.src = 'https://webapi.amap.com/loader.js'
// document.getElementsByTagName('head')[0].appendChild(script)
// },
mapInit() {
/* eslint-disable */
AMapLoader.load({
/* eslint-enable */
key: '44cc16e43ad7ed3358df507bd0618181', // 申请好的Web端开发者Key,首次调用 load 时必填
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
// 需要使用的的插件列表
plugins: ['AMap.ToolBar', 'AMap.Scale', 'AMap.Geocoder'],
AMapUI: {
// 是否加载 AMapUI,缺省不加载
version: '1.1', // AMapUI 版本
plugins: ['overlay/SimpleMarker'] // 需要加载的 AMapUI ui插件
},
Loca: {
// 是否加载 Loca, 缺省不加载
version: '2.0' // Loca 版本
}
})
.then(AMap => {
map = new AMap.Map('container', {
zoom: 20,
autoFitView: true,
resizeEnable: true,
cursor: 'move'
})
if (this.lnglat.length) {
this.addMarker(this.lnglat)
}
map.addControl(new AMap.Scale())
map.addControl(new AMap.ToolBar())
this.geocoder = new AMap.Geocoder()
map.setDefaultCursor('pointer')
AMap.plugin(['AMap.PlaceSearch'], function() {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
pageIndex: 1, // 页码
citylimit: false, //是否强制限制在设置的城市内搜索
// panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
renderStyle: 'default'
})
})
map.on('click', this.getAddress)
})
.catch(e => {
console.error(e) //加载错误提示
})
},
remoteMethod(query) {
if (query == '') {
return true
}
let _this = this
placeSearch.search(query, function(status, result) {
if (status === 'complete' && result.poiList.pois.length) {
_this.adrList = result.poiList.pois
}
})
},
addMarker(lnglat) {
let position
if (lnglat.lng) {
position = [lnglat.lng, lnglat.lat]
} else {
position = lnglat
}
this.lnglat = position
marker = new AMap.Marker({
map: map,
icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34)
}),
// draggable: true,
position: position,
offset: new AMap.Pixel(-10, -10)
})
map.setCenter(position)
map.add(marker)
marker.setMap(map)
// this.map.setFitView()
},
getAddress(e) {
let self = this
let position
if (e.type == 'click') {
position = e.lnglat
} else {
let { lng, lat } = e
position = [lng, lat]
}
if (marker) {
map.remove(marker)
marker.setMap(null)
marker = null
}
self.addMarker(position)
AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder()
geocoder.getAddress(position, (status, result) => {
self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
self.geocoderAddress = result.geocodes[0]
}
})
})
})
},
handleChangeAdr(val) {
if (val) {
var location = this.adrList.find(item => item.id == val)
this.getAddress(location.location)
this.input = ''
this.adrList = []
}
}
}
}
</script>
<style scoped lang="scss">
.map-box {
display: flex;
#container {
position: relative;
width: calc(100% - 284px - 16px);
height: 100%;
}
.map-input {
position: absolute;
top: 32px;
width: 60%;
left: 25%;
z-index: 2;
}
}
#panel {
position: absolute;
max-height: 90%;
overflow-y: auto;
top: 80px;
right: 10px;
width: 280px;
}
.map-address {
display: flex;
box-sizing: border-box;
width: 284px;
height: 100%;
background-color: #f9f9f9;
padding: 20px;
margin-left: 16px;
line-height: 20px;
.icon-map {
width: 16px;
height: 16px;
margin-right: 6px;
}
}
</style>
<template>
<div v-if="provinceView">
<el-form ref="provinceForm" :model="provinceForm" inline="true" class="province" style="padding-left: 0;">
<el-select size="small" v-model="provinceForm.provinceName" clearable :disabled="isDisabled" placeholder="选择省份" :style="{ width: defaultWidth }" @change="selectProvince" class="select-padding">
<el-option v-for="item in AllData" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option>
</el-select>
<el-select size="small" v-model="provinceForm.cityName" clearable :disabled="isDisabled" placeholder="选择市" :style="{ width: defaultWidth }" @change="selectCity" class="select-padding">
<el-option v-for="item in cityList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option>
</el-select>
<el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable :disabled="isDisabled" placeholder="选择区" :style="{ width: defaultWidth }" @change="selectTown" class="select-padding">
<el-option v-for="item in townList" :key="item.adcode" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option>
</el-select>
</el-form>
</div>
</template>
<script>
export default {
name: 'GLProvince',
props: {
// 省市级别,2--只显示省市,3--显示省市区,默认只显示省市
subdistrict: {
type: Number,
default: 2
},
// 省市下拉组件宽度
defaultWidth: {
type: String,
default: '150px'
},
// 组件是否展示,默认展示
provinceView: {
type: Boolean,
default: true
},
isDisabled: {
type: Boolean,
default: false
}
},
data() {
return {
// 所有数据
AllData: [],
// 城市列表
cityList: [],
// 地区列表
townList: [],
provinceForm: {
// 省份名称
provinceName: '',
// 城市名称
cityName: '',
// 地区名称
townName: '',
// 省份代码
provinceCode: '',
// 城市代码
cityCode: '',
// 地区代码
townCode: ''
}
}
},
mounted() {
this.provinceList()
},
methods: {
/*
* @params:传入的为一个key-value的对象
1、keywords --查询关键字,只支持单个关键词语搜索关键词支持:行政区名称、citycode、adcode
列如:this.provinceList({keywords: '山东省'}),这样就可以筛选出山东省下的市、区信息
2、subdistrict --设置显示下级行政区级数,0:不返回下级行政区;1:返回下一级行政区;2:返回下两级行政区;3:返回下三级行政区;
不传的话默认为2,可以在组件中穿,也可以在调用方法的时候传,如果需要展示省市组件,传值最小为2
3、page --最外层的districts最多会返回20个数据,若超过限制,请用page请求下一页数据。
例如page=2;page=3。默认page=1
4、extensions --控制行政区信息中返回行政区边界坐标点; 可选值:base、all;
base:不返回行政区边界坐标点;(默认)
all:只返回当前查询district的边界值,不返回子节点的边界值;目前不能返回乡镇/街道级别的边界值
5、filter -- 按照指定行政区划进行过滤,填入后则只返回该省/直辖市信息,需填入adcode,为了保证数据的正确,强烈建议填入此参数
6、callback -- callback值是用户定义的函数名称,此参数只在output=JSON时有效
7、output --返回数据格式类型,可选值:JSON,XML(默认JSON)
* @return:返回的是一个promise对象,如果不需要展示组件,只需要获取值,可以直接调用方法,异步获取返回值
列如:
const p = this.$refs.provinceForm.provinceList({xxxx(可传值,传值可参考上文params描述) })
p.then(r => {
// r 为返回结果
console.log(r)
})
**/
// 获取省市信息
provinceList(params = {}) {
params ? (params.subdistrict ? '' : (params.subdistrict = this.subdistrict)) : (params.subdistrict = this.subdistrict)
let data = ''
for (let key in params) {
data += '&' + key + '=' + params[key]
}
let path = `https://restapi.amap.com/v3/config/district?key=d22348363c34c266f772ae9b635eef2a`
path = path + data
const pro = fetch(path).then(res => {
return res.json()
})
if (this.provinceView) {
pro.then(r => {
this.AllData = r.districts[0].districts
})
}
return pro
},
// 省市回显
init(province, city, town) {
this.provinceForm = {
provinceName: province,
cityName: city,
townName: town
}
if (province) {
this.AllData.map(item => {
if (item.name.indexOf(province) != -1) {
this.provinceForm.provinceName = item.name
this.cityList = item.districts
this.provinceForm.provinceCode = item.adcode
if (city) {
this.cityList.map(itm => {
if (itm.name.indexOf(city) != -1) {
this.provinceForm.cityCode = itm.adcode
this.provinceForm.cityName = itm.name
this.townList = itm.districts
if (town) {
this.townList.map(itmx => {
if (itmx.name.indexOf(town) != -1) {
this.provinceForm.townCode = itmx.adcode
this.provinceForm.townName = itmx.name
}
})
}
}
})
}
}
})
}
},
// 选择省
selectProvince(val) {
this.provinceForm.cityName = ''
this.provinceForm.townName = ''
this.cityList = val.districts
this.$emit('selectProvince', { provinceName: val.name, provinceCode: val.adcode })
},
// 选择市
selectCity(val) {
this.provinceForm.townName = ''
this.townList = val.districts
this.$emit('selectCity', { cityName: val.name, cityCode: val.adcode })
},
// 选择区
selectTown(val) {
this.$emit('selectTown', { townName: val.name, townCode: val.adcode })
}
}
}
</script>
<style lang="scss">
.province {
display: inline-flex;
.el-select .el-input {
width: auto !important;
}
}
.select-padding {
margin-right: 10px;
}
</style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-col :span="12" :key="index"> <el-col :span="12" :key="index">
<div class="label-wrap"> <div class="label-wrap">
<label>{{ params.label }}</label> <label>{{ params.label }}</label>
<span>{{ list[params.prop] ? list[params.prop] : '--' }}</span> <span >{{ list[params.prop] ? list[params.prop] : '--' }}</span>
</div> </div>
</el-col> </el-col>
</template> </template>
......
<template>
<div>
<div id="div-demo"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'textBox',
data() {
return {
editor: '',
content: '',
editorOption: {}
}
},
props: {
excludeMenus: {
type: Array,
default: () => ['code']
},
boxHeight: {
type: Number,
default: 240
}
},
mounted() {
this.getEdit()
},
methods: {
getEdit() {
const _this = this
this.editor = new E('#div-demo')
this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = this.boxHeight
this.editor.config.width = 500
this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertImgFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
// 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const videoFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + videoFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertVideoFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
this.editor.config.onchangeTimeout = 5000
this.editor.create()
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
},
forbidEdit() {
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
}
}
}
</script>
<style lang="scss" scoped>
#div-demo {
// margin: 16px 300px 0 0;
}
.el-form .editor {
margin-top: 20px;
}
.myQuillEditor {
background-color: #fff;
height: 200px;
}
</style>
<style>
.w-e-text-container {
z-index: 1 !important;
}
.w-e-toolbar {
z-index: 2 !important;
}
</style>
<template>
<div class="live-room">
<div class="m-b-20 container-nop">
<div class="border-title">
基本信息
</div>
<div class="container">
<glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px"
defaultWidth="432px" :formObj="formObj" :formData="formData" :formRules="myRule">
<div slot="welcomeWordMaterial">
<GLEditor ref="welcome" :form="'customer'" style="line-height: 12px;" :btnList="btnList"></GLEditor>
<div v-if="!haveActivity" class="is_error">请选择活动</div>
</div>
</glsx-combi-form>
</div>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter>
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
import {addWelcomeGroup} from '@/api/modules/clientGroupManage'
export default {
name: "addMaterial",
components: {
glsxCombiForm
},
data() {
return {
haveActivity: true,
formObj: {
attachName: '',
},
myRule: {
attachName: [{required: true, message: '请输入资料名称', trigger: 'change'}],
// attachmentList: [{ required: true, message: '请选择视频', trigger: 'change' }],
},
formData: [
{
label: '资料名称',
name: 'attachName',
maxlength: 50,
showLimit: true,
type: 'input',
isDisabled: false
},
{
label: '群聊欢迎语素材',
name: 'attachmentList',
addHtml: 'welcomeWordMaterial'
}
],
btnList: [
// {
// name: '表情',
// funcName: '',
// type: 'expression',
// limitSize: 10
// },
// {
// name: '图片',
// funcName: '',
// type: 'img',
// uploadApi: this.$apis.common.pictureUpload
// },
{
name: '活动',
type: 'activity',
funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
// {
// itemName: '秒杀活动',
// itemValue: 5,
// itemType: 'activity',
// getInterfaceApi: this.$apis.welcomeword.getActivity,
// // params: {
// // activityStatus: 2,
// // currentPage: 1
// // }
// },
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
},
// {
// itemName: '众筹活动',
// itemValue: 7,
// itemType: 'crowdfunding',
// getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
// params: {
// currentPage: 1,
// activityStatus: 2
// }
// }
]
},
// {
// name: '素材',
// type: 'material',
// funName: 'material',
// groupListApi: this.$apis.welcomeword.getGroupListApi,
// materialListApi: this.$apis.welcomeword.getMaterialListApi,
// params: {
// merchant: this.$globalState.session.merchantId
// }
// },
// {
// name: '模板',
// type: 'message',
// funName: 'message',
// getSearchApi: this.$apis.welcomeword.createdNameList,
// templateApi: this.$apis.welcomeword.templatePage,
// templateUpdateApi: this.$apis.welcomeword.templateUpdate,
// templateSaveApi: this.$apis.welcomeword.templateSave,
// templateDetailApi: this.$apis.welcomeword.templateDetail,
// params: {
// merchant: this.$globalState.session.merchantId
// }
// }
],
}
},
methods: {
handleCancel(){
this.$emit('changeTab',1)
},
handleSave() {
this.$refs.baseInfoRef.$refs.formRef.validate(valid => {
if (valid) {
let params = JSON.parse(JSON.stringify(this.formObj))
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
// 校验是否有填活动
this.haveActivity = previewList.find(item => item.attType == 7)
if (!this.haveActivity) return;
const attachmentList = previewList.map(item => {
if (item && item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
params.attachmentList = attachmentList
addWelcomeGroup(params).then(res => {
if (res.data) {
this.$message.success('新建成功')
// this.formObj.attachName = ''
// this.$refs.welcome.updateList([])
this.handleCancel()
} else {
this.$message.error(res.message)
}
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.scrm-sub-client-container {
.pageTitle {
position: relative;
margin-bottom: 20px;
height: 20px;
font-size: 20px;
font-weight: 700;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.pageContent {
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
.glsx-table {
/deep/ .el-table__fixed,
/deep/ .el-table__fixed-right {
height: 100% !important; //设置高优先,以覆盖内联样式
}
}
padding: 20px 20px 30px;
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
margin-left: 10px;
}
}
.el-message--info {
height: 40px;
background: #e6e9ff;
border: 1px solid $btnBlue;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
color: $btnBlue;
font-size: 16px;
}
}
</style>
<template> <template>
<div> <div>
<div class="scrm-sub-client-container"> <el-tabs class="gl-tabs" v-model="activeName" @tab-click="clickNav(activeName)">
<!-- <p class="pageTitle">客户群管理</p> --> <el-tab-pane label="群聊列表" name='first'>
<!-- :style="{ 'min-height': heightBox + 'px' }" --> <div class="scrm-sub-client-container">
<div class="pageContent"> <!-- <p class="pageTitle">客户群管理</p> -->
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm> <!-- :style="{ 'min-height': heightBox + 'px' }" -->
<div class="leadList"> <div class="pageContent">
<div> <GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<span></span> <div class="leadList">
</div> <div>
<GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton> <span></span>
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams"> <GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton>
</div>
<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> -->
<span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span> <span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span>
</span> </span>
<span slot="delFlag" slot-scope="scope"> <span slot="delFlag" slot-scope="scope">
<span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span> <span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span>
<span>{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}</span> <span>{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}</span>
</span> </span>
<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>
</GLTable> </GLTable>
</div> </div>
</div> </div>
</el-tab-pane>
<el-tab-pane label="新增素材" name='second'>
<add-material v-if="activeName=='second'" @changeTab="cancel"></add-material>
</el-tab-pane>
</el-tabs>
</div> </div>
</template> </template>
<script> <script>
import { getTableList, syncCustomerBase, getStatus, clientGroupExportApi } from '@/api/modules/clientGroupManage' import { getTableList, syncCustomerBase, getStatus, clientGroupExportApi } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
import AddMaterial from "views/clientGroupManage/components/addMaterial";
export default { export default {
name: 'clientGroupManage', name: 'clientGroupManage',
components: {AddMaterial},
// inject: ['reload'], // inject: ['reload'],
data() { data() {
return { return {
activeName:'first',
isReload: true, isReload: true,
url: url, url: url,
sloading: false, sloading: false,
...@@ -223,7 +235,7 @@ export default { ...@@ -223,7 +235,7 @@ export default {
// 'searchForm.daterange':{ // 'searchForm.daterange':{
// deep: true, // deep: true,
// handler(val) { // handler(val) {
// //
// if(val){ // if(val){
// this.searchTable() // this.searchTable()
// } // }
...@@ -237,6 +249,9 @@ export default { ...@@ -237,6 +249,9 @@ export default {
this.wxTips() this.wxTips()
}, },
methods: { methods: {
cancel(){
this.activeName = 'first'
},
jumpWx() { jumpWx() {
this.$history.push('/settings/enterpriseWechat/index') this.$history.push('/settings/enterpriseWechat/index')
}, },
...@@ -262,6 +277,7 @@ export default { ...@@ -262,6 +277,7 @@ export default {
}) })
}) })
}, },
syncClick() { syncClick() {
let _this = this let _this = this
_this.sloading = true _this.sloading = true
...@@ -285,7 +301,7 @@ export default { ...@@ -285,7 +301,7 @@ export default {
this.$refs.clientGroupManage.setTableHeightFun() this.$refs.clientGroupManage.setTableHeightFun()
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
// if (!this.flushTime) { // if (!this.flushTime) {
// this.flushTime = true // this.flushTime = true
// this.searchTable() // this.searchTable()
...@@ -315,7 +331,7 @@ export default { ...@@ -315,7 +331,7 @@ export default {
} else { } else {
if (params.beginTime) delete params.beginTime && delete params.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange delete params.daterange
return params return params
}, },
......
...@@ -326,6 +326,12 @@ export default { ...@@ -326,6 +326,12 @@ export default {
line: 1 line: 1
}, },
{ {
label: '小区信息',
prop: 'communityInfo',
width: 250,
line: 1
},
{
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '66px', width: '66px',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!