Commit 765da579 by 前端

Merge branch 'v3.4.0' into 'develop'

V3.4.0

See merge request !21
2 parents 47cc256d 2021f7f2
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
"js-message": "1.0.7" "js-message": "1.0.7"
} }
}, },
"@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@ampproject/remapping": { "@ampproject/remapping": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
...@@ -1873,6 +1878,51 @@ ...@@ -1873,6 +1878,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
...@@ -1881,6 +1931,28 @@ ...@@ -1881,6 +1931,28 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -6403,14 +6475,16 @@ ...@@ -6403,14 +6475,16 @@
} }
}, },
"glsx-components": { "glsx-components": {
"version": "1.5.2", "version": "1.5.4",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.2.tgz", "resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.4.tgz",
"integrity": "sha512-5/LaPu0B1uT7Kzl6oyIqyFT/NXIz2w7HNstiRtHaUQN1waSrPPPtzRRwywJg6CSSL+p994NaqPRnX696NAYzKg==", "integrity": "sha512-TemXhzs6giPF7idPHNhrpeMNvP4O6hbm6q/aKPNJSldZB7o+MbmPxeYXKZydvvz6V53tk+KBLbgVhcSv1F8FIA==",
"requires": { "requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",
"glsx-common": "^1.4.9", "glsx-common": "^1.4.9",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"
}, },
"dependencies": { "dependencies": {
...@@ -12934,6 +13008,21 @@ ...@@ -12934,6 +13008,21 @@
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
"dev": true "dev": true
}, },
"uppercamelcase": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
"integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
"requires": {
"camelcase": "^1.2.1"
},
"dependencies": {
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g=="
}
}
},
"uri-js": { "uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
...@@ -13117,6 +13206,14 @@ ...@@ -13117,6 +13206,14 @@
"csstype": "^3.1.0" "csstype": "^3.1.0"
} }
}, },
"vue-amap": {
"version": "0.5.10",
"resolved": "https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.10.tgz",
"integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
"requires": {
"uppercamelcase": "^1.1.0"
}
},
"vue-cli-plugin-element": { "vue-cli-plugin-element": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/vue-cli-plugin-element/download/vue-cli-plugin-element-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/vue-cli-plugin-element/download/vue-cli-plugin-element-1.0.1.tgz",
...@@ -13197,75 +13294,6 @@ ...@@ -13197,75 +13294,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.5.4", "version": "3.5.4",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.4.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.4.tgz",
...@@ -14052,6 +14080,33 @@ ...@@ -14052,6 +14080,33 @@
"dayjs": "^1.8.25" "dayjs": "^1.8.25"
} }
}, },
"word-edit": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/word-edit/-/word-edit-1.0.6.tgz",
"integrity": "sha512-9RF7SICFSzNbPRSPflBe/J/sKgtxDwJsc3PDjxgYVJtIdDCDSZyOXnyFifVCzOg6xLK4V1J4Ou20BNFkJSOuMA==",
"requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
"glsx-common": "^1.4.9",
"vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vuedraggable": "^2.24.3"
},
"dependencies": {
"glsx-common": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz",
"integrity": "sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg==",
"requires": {
"axios": "^0.21.3",
"md5": "^2.3.0",
"qs": "^6.10.1",
"sha1": "^1.1.1"
}
}
}
},
"word-wrap": { "word-wrap": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
......
...@@ -13,11 +13,12 @@ ...@@ -13,11 +13,12 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^2.0.4", "glsx-common": "^2.0.4",
"glsx-components": "^1.5.2", "glsx-components": "^1.5.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2" "vuex": "^3.1.2",
"word-edit": "^1.0.6"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-09 09:34:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-12 10:36:35
* @FilePath: \scrm-micro-services\src\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view />
...@@ -18,6 +26,16 @@ export default { ...@@ -18,6 +26,16 @@ export default {
} }
}, },
created() { created() {
//输入框换行符阻止默认事件
document.onkeydown = function() {
var evt = window.event || arguments[0]
if (evt && evt.keyCode == 13) {
if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true
if (typeof evt.stopPropagation == 'function') evt.stopPropagation()
return false
}
return true
}
this.myMsg = this.msg this.myMsg = this.msg
this.myMessage = this.message this.myMessage = this.message
} }
......
import { http, request_merchant } 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 bulgeActivity = params => {
params.method = 'scrm.api.shopmall.all.bulge.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 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 findMerchantListByPage = params => {
params.method = 'merchants.api.open.findMerchantListByPage'
return request_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
const channelPreview = params => {
params.method = `scrm.api.shopmall.discover.channel.merchant.preview`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave,
bulgeActivity,
channelPreview,
findMerchantListByPage
}
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config') return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
} }
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-09 09:34:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-11 18:19:23
* @FilePath: \scrm-micro-services\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import Vue from 'vue' import Vue from 'vue'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { message, messageBox } from '@/plugins/element.js' import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton, GLTable, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLCombiForm, GLTableButton, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLEditor } from 'word-edit'
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import 'word-edit/dist/glsx-components.css'
// import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
let routes = [] let routes = []
let router = null let router = null
...@@ -15,7 +25,7 @@ Vue.use(ElementUI) ...@@ -15,7 +25,7 @@ Vue.use(ElementUI)
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
Vue.use(GLTableButton) Vue.use(GLTableButton)
Vue.use(GLDialog) Vue.use(GLDialog)
// Vue.use(Table) Vue.use(GLEditor)
// Vue.use(TableColumn) // Vue.use(TableColumn)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, request_common, request_merchant, sign_common, sign, secret } = await fetchConfig() const { response, request, request_brand, request_common, request_merchant, sign_common, sign, secret } = await fetchConfig()
......
...@@ -85,4 +85,23 @@ util.openUrl = function(url) { ...@@ -85,4 +85,23 @@ util.openUrl = function(url) {
link.rel = 'opener' link.rel = 'opener'
link.click() link.click()
} }
util.isShowBtn = function(value, permissions) {
let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (value && itm.path == value) {
isShowStatus = true
}
if (!value && itm.meta && itm.meta.permissions.includes(permissions)) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
export default util export default util
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<span v-if="selectPerson.departmentName" class="depart-name">{{ selectPerson.departmentName }}</span> <span v-if="selectPerson.departmentName" class="depart-name">{{ selectPerson.departmentName }}</span>
</div> </div>
<div slot="welcomeSlot"> <div slot="welcomeSlot">
<WelcomeWords ref="welcome" :btnList="btnList" :eventBus="eventBus"></WelcomeWords> <GLEditor ref="welcome" :form="'customer'" :btnList="btnList" @previewWord="previewForm"></GLEditor>
<div class="tips-text"> <div class="tips-text">
<p>当「精品升级」小程序提交升级订单时,</p> <p>当「精品升级」小程序提交升级订单时,</p>
<p> <p>
...@@ -44,12 +44,24 @@ ...@@ -44,12 +44,24 @@
</template> </template>
<script> <script>
const ATT_TYPE = {
TEXT: 1,
IMAGE: 2,
VEDIO: 3,
URL: 4,
MINIPROGRAM: 5,
FILE: 6,
ACTIVITY: 7,
MATERIAL: 10
}
import Vue from 'vue' import Vue from 'vue'
import emoji from '@/util/emo' import emoji from '@/util/emo'
import WelcomeWords from './components/welcomeWords.vue' import WelcomeWords from './components/welcomeWords.vue'
import SelectMember from './components/selectMember.vue' import SelectMember from './components/selectMember.vue'
import glsxDialog from '@/components/glsx-dialog/index.vue' import glsxDialog from '@/components/glsx-dialog/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import { pictureUpload } from '@/api/modules/common'
import util from '@/util/util'
export default { export default {
name: 'expert_detail', name: 'expert_detail',
components: { components: {
...@@ -60,58 +72,117 @@ export default { ...@@ -60,58 +72,117 @@ export default {
}, },
data() { data() {
return { return {
size: 'small',
eventBus: new Vue(),
expertId: '',
merchantId: '',
routeInfo: {},
expertTypeList: [],
basicRule: {
businessType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
staffId: [{ required: true, message: '请选择指定成员', trigger: 'change' }],
expertType: [{ required: true, message: '请选择专家类型', trigger: 'change' }]
},
btnList: [ btnList: [
{ {
id: 1,
name: '表情', name: '表情',
funcName: '', funcName: '',
type: 'expression', type: 'expression',
limitSize: 10 limitSize: 10
}, },
{ {
id: 2,
name: '图片', name: '图片',
funcName: '', funcName: '',
type: 'img', type: 'img',
limitSize: 10 togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitPx: 1000
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: pictureUpload
}, },
{ {
id: 3,
name: '昵称', name: '昵称',
type: 'nickname', type: 'nickname',
funName: 'nickname' funName: 'nickname'
}, },
{ {
id: 4,
name: '活动', name: '活动',
type: 'acivity', type: 'activity',
funName: 'activity' funName: 'activity',
togetherItem: [ATT_TYPE.TEXT, ATT_TYPE.FILE],
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: {}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
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
}
}
]
}, },
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// },
{ {
id: 6,
name: '插入质保链接', name: '插入质保链接',
type: 'link', type: 'link',
funName: 'link', funName: 'link',
isHide: true text: '车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
} }
// {
// name: '插入推荐频道',
// type: 'channelLink',
// funName: 'channelLink',
// getMerchantList: this.$apis.welcomeword.getMerchantList,
// channelPreview: this.$apis.welcomeword.channelPreview
// }
], ],
size: 'small',
eventBus: new Vue(),
expertId: '',
merchantId: '',
routeInfo: {},
expertTypeList: [],
basicRule: {
businessType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
staffId: [{ required: true, message: '请选择指定成员', trigger: 'change' }],
expertType: [{ required: true, message: '请选择专家类型', trigger: 'change' }]
},
membersVisible: false, membersVisible: false,
selectData: [], selectData: [],
basicForm: { basicForm: {
...@@ -158,8 +229,9 @@ export default { ...@@ -158,8 +229,9 @@ export default {
watch: { watch: {
'basicForm.businessType': { 'basicForm.businessType': {
handler(nVal) { handler(nVal) {
if (nVal) { console.log(nVal)
this.btnList.find(item => item.id == 6).isHide = nVal != 1 if (nVal && nVal != 1) {
this.btnList = this.btnList.filter(item => item.type != 'link')
} }
}, },
immediate: true immediate: true
...@@ -173,7 +245,17 @@ export default { ...@@ -173,7 +245,17 @@ export default {
deep: true deep: true
} }
}, },
created() {}, created() {
if (util.isShowBtn(null, '插入推荐频道')) {
this.btnList.push({
name: '插入推荐频道',
type: 'channelLink',
funName: 'channelLink',
getMerchantList: this.$apis.welcomeword.findMerchantListByPage,
channelPreview: this.$apis.welcomeword.channelPreview
})
}
},
mounted() { mounted() {
const urlParam = this.$route.params const urlParam = this.$route.params
this.routeInfo = JSON.parse(urlParam.id) this.routeInfo = JSON.parse(urlParam.id)
...@@ -205,7 +287,14 @@ export default { ...@@ -205,7 +287,14 @@ export default {
this.$apis.expert.expertDetail({ id }).then(res => { this.$apis.expert.expertDetail({ id }).then(res => {
if (res?.id) { if (res?.id) {
this.selectPerson = res this.selectPerson = res
this.$refs.welcome.setDetail(res.welcomeInfo) // this.$refs.welcome.setDetail(res.welcomeInfo)
if (res.welcomeInfo.length != 0) {
const previewList = res.welcomeInfo.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
this.$refs.welcome.updateList(previewList)
}
this.basicForm.businessType = res.businessType this.basicForm.businessType = res.businessType
this.basicForm.expertType = res.expertType this.basicForm.expertType = res.expertType
this.merchantId = res.merchantId this.merchantId = res.merchantId
...@@ -255,7 +344,7 @@ export default { ...@@ -255,7 +344,7 @@ export default {
} else if (item.attType == 1) { } else if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]') item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
} }
if (item.attType == 7) { if (item.attType == 7 || item.attType == 5) {
item.attContent = JSON.stringify(item.attContent) item.attContent = JSON.stringify(item.attContent)
} }
}) })
...@@ -314,9 +403,6 @@ export default { ...@@ -314,9 +403,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .gl-dialog-wrap .el-dialog__body {
padding-top: 0;
}
.operate-btn { .operate-btn {
margin-top: 16px; margin-top: 16px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!