Commit 9c923e39 by xuyl

Merge branch 'v2.11.0' of http://192.168.3.233:8090/saas/scrm-micro-authorize into xuyl_dev_v2.11.0

2 parents 334e1e7b 5f7b3e4e
import { http, http_common, http2, http_merchant } from '@/main' /*
const defaultPath = 'scrm.api.carlife.' * @Author: yangming yangming@didihu.com.cn
* @Date: 2022-09-15 15:23:08
const getMerchantGoodsListApi = params => { * @LastEditors: yangming yangming@didihu.com.cn
params.method = 'scrm.api.shopmall.goods.page.curMerchant' * @LastEditTime: 2022-09-23 09:39:55
return http({ * @FilePath: \scrm-micro-authorize\src\api\modules\common.js
url: 'rop-scrm-shopmall/router', * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
method: 'GET', */
data: params, import { http_common } from '@/main'
sign: true
})
}
const getGoodsListApi = params => {
// scrm.api.shopmall.goods.getGoodsList
params.method = 'scrm.api.shopmall.goods.getGoodsList'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
const uploadImgApi = params => {
params.method = `${defaultPath}common.uploadImg`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadMusicApi = params => {
params.method = 'scrm.api.carlife.common.uploadMusic'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadVideoApi = params => {
params.method = `${defaultPath}common.uploadVideo`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadFundingVideoApi = params => {
params.method = 'scrm.api.carlife.crowd.funding.uploadVideo'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const getMerchantList = params => {
params.method = `${defaultPath}merchant.listWithPageByCurMerchant`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
const getSimpleMerchantList = params => {
params.method = 'scrm.api.carlife.merchant.listWithPageSimpleByCurMerchant'
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true
})
}
const getZoneListApi = params => {
params.method = 'scrm.api.shopmall.zoneInfo.listCurMerchantId'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const getClassifyListApi = params => {
params.method = 'scrm.api.shopmall.classify.list.curMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const pictureUpload = params => { const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload' params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({ return http_common({
...@@ -117,48 +18,4 @@ const pictureUpload = params => { ...@@ -117,48 +18,4 @@ const pictureUpload = params => {
}) })
} }
const querylabeltree = params => { export default { pictureUpload }
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
// params.sessionId = session
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 人群列表
const getCrowdTreeListApi = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 跟进员工类型
const getStaffFollowerListApi = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取商户信息
const getMerchantInfoApi = params => {
params.method = 'merchants.api.merchant.findMerchantBaseInfo'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getMerchantGoodsListApi, getGoodsListApi, uploadImgApi, uploadMusicApi, uploadVideoApi, uploadFundingVideoApi, getMerchantList, getSimpleMerchantList, getZoneListApi, getClassifyListApi, pictureUpload, querylabeltree, getCrowdTreeListApi, getStaffFollowerListApi, getMerchantInfoApi }
import { http } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
const customerList = params => {
params.type = 1
params.method = `${path}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerGroupList = params => {
params.type = 2
params.method = `${path}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const insert = params => {
params.method = `${path}insert`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const detail = params => {
params.type = 2
params.method = `${path}detail`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const findLordGroup = params => {
params.method = 'entmicro.api.staff.findLordGroup'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const querylabeltree = params => {
// params.method = 'scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const groupList = params => {
params.method = 'entmicro.api.customer.group.list.by.merchant'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count'
// return http({
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
// 客户群发、客户群群发基本信息详情
const customerDetail = params => {
params.method = `${path}detail`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发统计
const detailStatistic = params => {
params.method = `${path}detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发统计
const groupDetailStatistic = params => {
params.method = `${path}group.detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发员工列表
const staffList = params => {
params.method = `${path}staff.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发客户列表
const customerDetailList = params => {
params.method = `${path}customer.list.page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发列表
const groupDetailList = params => {
params.method = `${path}group.detail.sender.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 根据id提醒用户 ,列表
const listRemindOperate = params => {
params.method = `${path}listRemindOperate`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 详情页客户群提醒
const remindUserGroup = params => {
params.method = `${path}remindUserGroup`
return http({
url: URL,
method: 'GET',
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 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 getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
return http({
url: '/rop-scrm-wechat/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
})
}
const groupDetailUpdate = params => {
params.method = `${path}update.group.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const followerType = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const followerEcho = params => {
params.method = 'entmicro.api.mass.follower.echo'
return http({
url: 'rop-scrm-entmicro/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 renewDetailList = params => {
params.method = `${path}update.merchant`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 客户群发统计
const renewStatistic = params => {
params.method = `${path}update.group.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {
customerList,
customerGroupList,
insert,
detail,
remindUserGroup,
listRemindOperate,
listDepartmentTree,
querylabeltree,
groupList,
customerCount,
customerDetail,
detailStatistic,
groupDetailStatistic,
staffList,
customerDetailList,
groupDetailList,
getMerchant,
getCard,
getCoupon,
merchant,
merchantOpen,
getPackage,
getActivity,
nameVaild,
getStatus,
templatePage,
templateSave,
templateUpdate,
createdNameList,
templateDetail,
groupDetailUpdate,
findLordGroup,
followerType,
queryCrowdtree,
followerEcho,
getGroupListApi,
getMaterialListApi,
renewDetailList,
renewStatistic
}
import { http } from '@/main'
//朋友圈群发任务多条件分页查询
const conditionPage = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmoment.condition.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈群发任务新建
const batchmomentSave = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmoment.save'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//发送记录分页查询
const batchmomentRecord = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmoment.record.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//企微高级群发创建门店列表
const merchantList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
merchantList,
conditionPage,
batchmomentRecord,
batchmomentSave
}
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 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
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave,
crowdfundingActivity
}
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: huyue * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-04-25 11:31:28 * @LastEditTime: 2022-09-23 09:40:29
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
...@@ -12,14 +12,14 @@ let cfg = require('./conf.js') ...@@ -12,14 +12,14 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
// if (isEnv) { if (isEnv) {
// let { request } = cfg let { request } = cfg
// Object.assign(request, { timeout }) Object.assign(request, { timeout })
// return Promise.resolve(cfg) return Promise.resolve(cfg)
// } }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/6215f98e60f415276f6dfe56/authorize/config')
return new Http().get('https://oss-config.test.glsx.com.cn/mock/6215f98e60f415276f6dfe56/authorize/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/6215f98e60f415276f6dfe56/authorize/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6215f98e60f415276f6dfe56/authorize/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2021-08-13 14:12:11 * @Date: 2021-08-13 14:12:11
* @LastEditors: Please set LastEditors * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-02-16 14:49:58 * @LastEditTime: 2022-09-21 16:49:04
* @FilePath: \scrm\scrm-sub-blog\src\main.js * @FilePath: \scrm\scrm-sub-blog\src\main.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -15,7 +15,8 @@ import { start } from '@/setup' ...@@ -15,7 +15,8 @@ import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
Vue.config.silent = true
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
\ No newline at end of file \ No newline at end of file
export const http_common = params => Vue.prototype.$http_common(params)
export default {
methods: {
merchantList() {
const params = {
pageNum: 1,
pageSize: 10000
}
return this.$apis.friendGroup.merchantList(params)
}
}
}
/* /*
* @Author: your name * @Author: your name
* @Date: 2022-02-10 19:00:41 * @Date: 2022-02-10 19:00:41
* @LastEditTime: 2022-07-11 18:35:19 * @LastEditTime: 2022-09-22 14:30:10
* @LastEditors: huyue * @LastEditors: yangming yangming@didihu.com.cn
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-pay\src\setup\qiankun.js * @FilePath: \scrm-micro-pay\src\setup\qiankun.js
*/ */
...@@ -15,6 +15,7 @@ import ElementUI from 'element-ui' ...@@ -15,6 +15,7 @@ import ElementUI from 'element-ui'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/public.scss' import '@/assets/css/public.scss'
import render from './render' import render from './render'
// import GLEditor from 'glsx-components/src/packages/Editor'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
...@@ -23,6 +24,7 @@ Vue.use(GLTable) ...@@ -23,6 +24,7 @@ Vue.use(GLTable)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GLTableButton) Vue.use(GLTableButton)
Vue.use(GLEditor)
Vue.use(GLDialog) Vue.use(GLDialog)
Vue.use(GLEditor) Vue.use(GLEditor)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
...@@ -31,8 +33,8 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -31,8 +33,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-75e8cc22-c5d9-4c85-8ee7-3d15ef1faac1-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.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: 'scrm-base-75e8cc22-c5d9-4c85-8ee7-3d15ef1faac1-rop' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
......
/* /*
* @Descripttion: * @Author: yangming yangming@didihu.com.cn
* @version: 1.0.0 * @Date: 2022-09-15 13:59:56
* @Author: limin * @LastEditors: yangming yangming@didihu.com.cn
* @Date: 2021-08-13 14:12:11 * @LastEditTime: 2022-09-22 09:41:50
* @LastEditors: limin * @FilePath: \scrm-micro-authorize\src\store\index.js
* @LastEditTime: 2021-08-25 14:14:44 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm\scrm-base\src\store\index.js
*/ */
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
......
<template>
<div>
<el-drawer title="发送记录" :visible.sync="drawVisible" direction="rtl" size="50%">
<div class="drawer-body">
<div class="record-panel">
<div class="record-border">
<div class="record-status">发送成功</div>
<div class="record-num">{{ successCount }}</div>
</div>
<div class="record-border">
<div class="record-status">发送失败</div>
<div class="record-num">{{ failCount }}</div>
</div>
</div>
<GLTable ref="proGroupRef" @refreshTable="getListData" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" :pageConf="pageConf">
<div slot="status" slot-scope="scope">
<span style="color: #EB4E4E" v-if="scope.scope.status == 2">发送失败</span>
<span style="color: #2CCA74" v-else-if="scope.scope.status == 3">发送成功</span>
</div>
</GLTable>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
data() {
return {
successCount: 0,
failCount: 0,
drawVisible: false,
tableData: [],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '员工',
prop: 'staffName',
minwidth: 240
},
{
label: '发送时间',
prop: 'sendTime',
minwidth: 180
},
{
label: '发送结果',
prop: 'status',
addHtml: 'status',
minwidth: 180
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
}
},
methods: {
getListData(id) {
this.loading = true
const params = {
pageSize: this.$refs.proGroupRef.page.pageSize,
pageNum: this.$refs.proGroupRef.page.pageNum,
id
}
this.$apis.friendGroup.batchmomentRecord(params).then(res => {
this.loading = false
if (res) {
this.tableData = res.data
this.tableTotal = res.count
}
})
},
init(row) {
const { id, successCount, failCount } = row
this.successCount = successCount
this.failCount = failCount
this.drawVisible = true
this.$nextTick(() => {
this.getListData(id)
})
}
}
}
</script>
<style scoped lang="scss">
.drawer-body {
padding: 0px 20px 20px;
}
.record-panel {
display: flex;
.record-border {
width: 50%;
height: 66px;
padding: 8px 20px;
background: #ffffff;
border: 1px solid #e8e8ea;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 16px;
&:first-child {
margin-right: 20px;
.record-num {
color: #2cca74;
}
}
.record-status {
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
line-height: 22px;
}
.record-num {
font-size: 20px;
color: #eb4e4e;
letter-spacing: 0;
line-height: 24px;
margin-top: 6px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!