Commit f2d2a38a by 前端

Merge branch 'v3.11.0' into 'master'

V3.11.0

See merge request !10
2 parents 6f10f42c 15fe3e43
Showing 83 changed files with 3052 additions and 144 deletions
...@@ -3,15 +3,17 @@ ...@@ -3,15 +3,17 @@
"env": { "env": {
"node": true "node": true
}, },
"globals": {
"AMap": true
},
"extends": ["plugin:vue/essential", "@vue/prettier"], "extends": ["plugin:vue/essential", "@vue/prettier"],
"rules": { "rules": {
"no-console": "off", "no-console": "off",
"no-unused-vars":"off", "no-unused-vars": "off",
"prettier.endOfLine": "crlf", "prettier.endOfLine": "crlf",
"endOfLine":"auto" "endOfLine": "auto"
}, },
"parserOptions": { "parserOptions": {
"parser": "babel-eslint" "parser": "babel-eslint"
} }
} }
...@@ -8,13 +8,16 @@ ...@@ -8,13 +8,16 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"@toast-ui/calendar": "^2.1.3",
"axios": "^0.21.1", "axios": "^0.21.1",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"dayjs": "^1.11.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.5.2", "glsx-components": "^1.5.2",
"glsx-table": "^1.0.9" "glsx-table": "^1.0.9",
"work-calendar": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<head> <meta charset="utf-8" />
<meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="referrer" content="no-referrer" />
<meta name="referrer" content="no-referrer"> <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- 使用CDN的CSS文件 --> <!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" /> <link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
...@@ -17,18 +16,16 @@ ...@@ -17,18 +16,16 @@
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" /> <link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %> <% } %>
<title>首页</title> <title>首页</title>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but module-report doesn't work properly without JavaScript enabled. Please enable it to <strong>We're sorry but module-report doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script> <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %> <% } %>
</body> </body>
</html> </html>
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 10:56:24
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-22 10:44:27
* @FilePath: \scrm-micro-home\src\api\modules\activity.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http, http_merchant,http_gpt } from '@/main'
const url = 'rop-scrm-marketing/router'
const findActivityInfo = params => {
params.method = 'marketing.api.supermarket.findActivityInfo'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
const activityDetail = params => {
params.method = 'scrm.api.shopmall.activity.detail'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//查询当前门店的超级营销的膨胀金列表
const listByPage = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//创建超级营销
const createSuperMarketing = params => {
params.method = 'marketing.api.supermarket.createSuperMarketing'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
//导入客户
const exportCustomer = params => {
params.method = 'marketing.api.supermarket.exportCustomer'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
// 营销日历列表
const getCalendarList = params => {
params.method = 'marketing.api.calendar.list'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 营销日历列表
const getCalendarDatail = params => {
params.method = 'marketing.api.calendar.detail'
return http({
url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 门店详情
const findMerchantDetailByMerchantNo = params => {
params.method = 'merchants.api.open.findMerchantDetailByMerchantNo'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getChatGPTList = params => {
return http_gpt({
url: 'openai/title',
method: 'POST',
data: params,
sign: false,
returnAll: false
})
}
export default {
findActivityInfo,
createSuperMarketing,
exportCustomer,
listByPage,
activityDetail,
getCalendarList,
getCalendarDatail,
findMerchantDetailByMerchantNo,
getChatGPTList
}
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 16:38:54
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-05-12 16:18:55
* @FilePath: \scrm-micro-link\src\api\modules\giftBag.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/main'
const getghDirectionalGiftListApi = params => {
// params.method = 'scrm.api.coupon.directional.gift.coupon.list'
params.method = 'scrm.api.coupon.directional.gift.coupon.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
const getEquityListApi = params => {
params.method = 'scrm.api.coupon.equity.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
const brandList = params => {
params.method = 'scrm.api.equity.goods.brand.list.all'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const couponTemplate = params => {
params.method = 'scrm.api.coupon.template.page'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const couponTemplateDetails = params => {
params.method = 'scrm.api.coupon.template.details.page'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const equityMerchant = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getghDirectionalGiftListApi, getEquityListApi, brandList, couponTemplate, couponTemplateDetails, equityMerchant }
...@@ -83,6 +83,10 @@ img { ...@@ -83,6 +83,10 @@ img {
margin-left: 20px; margin-left: 20px;
} }
.scrm-ml6 {
margin-left: 6px;
}
.scrm-mr10 { .scrm-mr10 {
margin-right: 10px; margin-right: 10px;
} }
...@@ -98,17 +102,21 @@ img { ...@@ -98,17 +102,21 @@ img {
.scrm-p20 { .scrm-p20 {
padding: 20px; padding: 20px;
} }
.scrm-p020 { .scrm-p020 {
padding: 0px 20px; padding: 0px 20px;
} }
.scrm-box-f { .scrm-box-f {
background: #ffffff; background: #ffffff;
} }
.count-item-question { .count-item-question {
width: 14px; width: 14px;
height: 14px; height: 14px;
display: inline-block; display: inline-block;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
width: 6px; width: 6px;
...@@ -121,9 +129,20 @@ img { ...@@ -121,9 +129,20 @@ img {
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
} }
.flex {
display: flex;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.glsx-table .line-ellipsis { .glsx-table .line-ellipsis {
display: inline; display: inline;
} }
.el-message--info { .el-message--info {
height: 40px; height: 40px;
background: #e6e9ff; background: #e6e9ff;
...@@ -132,7 +151,200 @@ img { ...@@ -132,7 +151,200 @@ img {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-message .el-icon-info { .el-message .el-icon-info {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.m-t-8 {
margin-top: 8px;
}
.m-t-10 {
margin-top: 10px;
}
.m-t-20 {
margin-top: 20px;
}
.m-b-8 {
margin-bottom: 8px;
}
.m-b-10 {
margin-bottom: 10px;
}
.m-b-20 {
margin-bottom: 20px;
}
.m-b-60 {
margin-bottom: 60px;
}
.m-r-8 {
margin-right: 8px;
}
.m-r-10 {
margin-right: 10px;
}
.m-r-20 {
margin-right: 20px;
}
.m-l-10 {
margin-left: 10px !important;
}
.m-l-20 {
margin-left: 20px;
}
.p-20 {
padding: 20px;
}
.p-t-10,
.p-t-10 {
padding-top: 10px;
}
.p-t-20,
.p-t-20 {
padding-top: 20px;
}
.p-l-40 {
padding-left: 40px;
}
.p-0 {
padding: 0;
}
.mrglr {
margin: 0 auto;
}
.circle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 6px;
margin-bottom: 3px;
background-color: #5850ff;
}
.grey {
background-color: #999999;
}
.txt-green {
color: #61cc43;
}
.txt-orange {
color: #fb8f28;
}
.txt-blue {
color: #5850ff;
}
.txt-grey {
color: #999999;
}
.text-e8 {
color: #eb4e4e !important;
}
.txt-center {
text-align: center;
}
.weight-6 {
font-weight: 600;
}
.weight-5 {
font-weight: 500;
}
.flex-default {
display: flex;
}
.flex {
display: flex;
justify-content: space-between;
}
.flex-wrap {
display: flex;
flex-wrap: wrap;
}
.flex-align {
display: flex;
align-items: center;
}
.flex-top {
display: flex;
align-items: flex-start;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.flex-grow {
flex: 1;
}
.pointer{
cursor: pointer;
}
.txt-red {
color: red;
}
.one-line-ellipsis {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.toastui-calendar-grid-cell-date .toastui-calendar-weekday-grid-date.toastui-calendar-weekday-grid-date-decorator{
background: #5850ff!important;
}
.toastui-calendar-weekday-event-block:hover {
border: 1px solid #fff;
}
.toastui-calendar-see-more {
box-shadow: 0 6px 20px 0 #7a7a7a33 !important;
border-radius: 4px;
border: 0 !important;
}
\ No newline at end of file \ No newline at end of file
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:21:34
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-05-15 16:23:13
* @FilePath: \scrm-micro-home\src\components\glsx-combi-form\common.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const rangetimePickerOptions = {
disabledDate(date) {
let dateHour = new Date()
dateHour.setDate(date.getDate())
dateHour.setHours(8)
dateHour.setMinutes(0)
dateHour.setSeconds(0)
if (dateHour.getTime() < date.getTime() < new Date(2016, 9, 10, 20, 0).getTime()) {
return true
}
return false
}
}
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>
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2021-09-06 10:10:44 * @Date: 2021-09-06 10:10:44
* @LastEditors: limin * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2021-09-06 10:11:49 * @LastEditTime: 2023-05-15 15:24:20
* @FilePath: \scrm\scrm-sub-blog\src\components\index.js * @FilePath: \scrm\scrm-sub-blog\src\components\index.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -12,6 +12,8 @@ import Vue from 'vue' ...@@ -12,6 +12,8 @@ import Vue from 'vue'
import _button from '@/components/glsx-button/index' import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue' import glsxTable from '@/components/glsx-table/index.vue'
import glsxPreview from '@/components/preview/index.vue' import glsxPreview from '@/components/preview/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
Vue.component('glsx-button', _button) Vue.component('glsx-button', _button)
Vue.component('glsx-preview', glsxPreview) Vue.component('glsx-preview', glsxPreview)
// Vue.component('glsx-table', glsxTable)
\ No newline at end of file \ No newline at end of file
Vue.component('glsx-combi-form', glsxCombiForm)
// Vue.component('glsx-table', glsxTable)
<template> <template>
<div class="square-main" v-loading="loading"> <div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose"> <el-dialog title="选择跟进专员" :append-to-body="true" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm"> <el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工"> <el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input> <el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
......
...@@ -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: 前端 qianduan01@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-12-22 14:29:51 * @LastEditTime: 2023-05-31 21:19:26
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
......
...@@ -3,18 +3,23 @@ ...@@ -3,18 +3,23 @@
* @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: limin * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2021-09-14 09:34:52 * @LastEditTime: 2023-05-20 10:49:23
* @FilePath: \scrm\scrm-sub-blog\src\main.js * @FilePath: \scrm\scrm-sub-blog\src\main.js
*/ */
import Vue from 'vue' import Vue from 'vue'
import apis from './api' import apis from './api'
import './public-path' import './public-path'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import '@/components'
import { start } from '@/setup' import { start } from '@/setup'
import '@toast-ui/calendar/dist/toastui-calendar.min.css'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.defaultLabelWidth = '154px'
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) export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_gpt = params => Vue.prototype.$http_gpt(params)
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 18:11:57
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { mapState, mapActions } from 'vuex'
import Drawing from '@/utils/drawing'
export default {
data() {
return {}
},
methods: {
//主图、内容图、logo合并图片
async createCanvas() {
this.loading = true
const { backgroundImage, detailImage, merchantLog, marketingTitle, marketingSubtitle } = this.editForm
if (!backgroundImage) return
try {
const res = await Promise.all([this.getImgWH(backgroundImage), this.getImgWH(detailImage), this.getImgWH(merchantLog)])
const h = (res[0].dh / res[0].dw) * 375 + (res[1].dh / res[1].dw) * 375
this.logoInfo = { url: merchantLog, x: 375 - res[2].dw / 2 - 20, y: 20, width: res[2].dw / 2, height: res[2].dh / 2 }
const drawfun = new Drawing(document.getElementById('canvasId'), {
width: 375,
height: h
}),
imageList = [
{
url: backgroundImage,
x: 0,
y: 0,
width: 375,
height: (res[0].dh / res[0].dw) * 375
},
{
url: detailImage,
x: 0,
y: (res[0].dh / res[0].dw) * 375,
width: 375,
height: (res[1].dh / res[1].dw) * 375
},
{ ...this.logoInfo }
].filter(item => item.url)
let textList = [],
title = this.cavansObj[this.editForm.templateId]
if (title) {
marketingTitle.split(' ').forEach((item, index) => {
textList.push({
x: title.titleStyle.x,
y: title.titleStyle.y + index * title.titleStyle.fontSize * 1.14,
fontSize: title.titleStyle.fontSize,
color: title.titleStyle.color,
text: item,
bold: title.titleStyle.bold
})
})
new Array(marketingSubtitle).forEach((item, index) => {
textList.push({
x: title.subTitleStyle.x,
y: title.subTitleStyle.y + title.titleStyle.fontSize * 1.14 * (textList.length - 1),
fontSize: title.subTitleStyle.fontSize,
color: title.subTitleStyle.color,
text: item
})
})
}
console.log(title, textList)
const canvasBase64 = await drawfun.begin({
imageList,
textList
})
await this.uploadImg(canvasBase64)
this.addOrUpdate()
} catch (e) {
console.log(e)
}
}
},
mounted() {}
}
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 16:21:24
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { mapState, mapActions } from 'vuex'
export default {
data() {
return {
t1: 0, // 主标题下标
t2: 0 // 副标题下标
}
},
computed: {
...mapState('marketing', ['keywords', 'GPTList'])
},
watch: {
GPTList: {
handler() {
this.t1 = 0
this.t2 = 0
},
deep: true
}
},
methods: {
getGPTitle(type) {
const len = this.GPTList.mainTitles.length
console.log(len)
if (type == 1) {
this.editForm.marketingTitle = this.GPTList.mainTitles[this.t1 % len].title
this.t1++
}
if (type == 2) {
this.editForm.marketingSubtitle = this.GPTList.subTitles[this.t2 % len].title
this.t2++
}
}
},
mounted() {}
}
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 14:38:23
* @FilePath: \scrm-micro-home\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 { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable, GLFull } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLFull, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import GLEditor from 'glsx-components/src/packages/Editor' import GLEditor from 'glsx-components/src/packages/Editor'
import render from './render' import render from './render'
...@@ -10,7 +18,7 @@ Vue.use(ElementUI) ...@@ -10,7 +18,7 @@ Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLEditor) Vue.use(GLEditor)
Vue.use(GLFull) Vue.use(GLFull)
Vue.use(GLDialog)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
// import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
...@@ -20,14 +28,17 @@ let routes = [] ...@@ -20,14 +28,17 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, sign_common ,scene} = await fetchConfig() const { response, request, sign, secret, request_common, request_merchant, request_gpt, sign_common, scene, cavansObj } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
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.cavansObj = cavansObj
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_gpt = new common.Http({ response, request: request_gpt, sign, secret, alert: ElementUI.Message.error })
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: globalState.session.token } })
Vue.prototype.$scene= scene Vue.prototype.$scene = scene
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 15:20:25
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import apis from '@/api'
export default {
namespaced: true,
state: {
activityInfo: {},
activityId: '',
activityDate: '',
activityProject: {},
customDetail: {},
calendarData: [],
calendarDataAll: [],
schemeList: {
list: []
},
mergeImg: {},
keywords: '',
GPTList: null,
merchantInfo: {},
isCover: false
},
mutations: {
// 设置客户信息
SET_CUSTOM_DETAIL(state, data) {
state.customDetail = data
},
// 设置活动信息
SET_ACTIVITY_INFO(state, data) {
state.activityInfo = data
},
// 设置活动ID
SET_ACTIVITY_ID(state, data) {
state.activityId = data
},
// 设置活动日期
SET_ACTIVITY_DATE(state, data) {
state.activityDate = data
},
// 设置活动项
SET_ACTIVITY_PEOJECT(state, data) {
state.activityProject = data
},
// 设置活动项
SET_KET_WORDs(state, data) {
state.keywords = data
},
// 设置合并图片
SET_MERGE_IMG(state, data) {
state.mergeImg = data
},
['SET_CALENDAR_DATA'](state, payload) {
state.calendarData = payload.calendarData
},
['SET_CALENDAR_DATA_ALL'](state, payload) {
state.calendarDataAll = payload
},
['SET_SCHEME_DATA'](state, payload) {
state.schemeList = payload
},
['SET_MERCHANT_INFO'](state, payload) {
state.merchantInfo = payload
},
['SET_GPT_LIST'](state, payload) {
state.GPTList = payload
},
['SET_COVER'](state, payload) {
state.isCover = payload
}
},
actions: {
setCustomDetail({ commit }, data) {
commit('SET_CUSTOM_DETAIL', data)
},
setActivityInfo({ commit }, data) {
commit('SET_ACTIVITY_INFO', data)
},
setActivityId({ commit }, data) {
commit('SET_TOKEN', data)
},
setActivityDate({ commit }, data) {
commit('SET_ACTIVITY_DATE', data)
},
setActivityProject({ commit }, data) {
commit('SET_ACTIVITY_PEOJECT', data)
},
setMergeImg({ commit }, data) {
commit('SET_MERGE_IMG', data)
},
setKeyWords({ commit, state }, data) {
if (state.keywords == data) return
commit('SET_KET_WORDs', data)
apis.activity.getChatGPTList({ 'req.userPrompt': data }).then(res => {
const gptList = JSON.parse(res.message)
commit('SET_KET_WORDs', '')
if (gptList.mainTitles) {
commit('SET_GPT_LIST', gptList)
}
})
},
//营销日历列表
getCalendarListData(conText, payload) {
apis.activity.getCalendarList(payload).then(res => {
console.log(res)
if (res.code == 0) {
conText.commit('SET_CALENDAR_DATA', { calendarData: res.data })
}
})
},
//营销方案列表
setSchemeListData(conText, payload) {
apis.activity.listByPage(payload).then(res => {
if (res) {
conText.commit('SET_SCHEME_DATA', res)
}
})
},
getCalendarListDataAll(conText, payload) {
apis.activity.getCalendarList({ status: 1 }).then(res => {
console.log(res)
if (res.code == 0) {
conText.commit('SET_CALENDAR_DATA_ALL', res.data)
}
})
},
getMerchantInfo(conText, payload) {
apis.activity.findMerchantDetailByMerchantNo(payload).then(res => {
if (res.data) {
conText.commit('SET_MERCHANT_INFO', res.data)
}
})
}
}
}
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-22 20:12:55
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 16:17:39
* @FilePath: \scrm-micro-home\src\utils\color.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
var img_width = 0,
img_height = 0
var canvas = document.createElement('canvas')
var context = canvas.getContext('2d')
var myColor = []
function getColor() {
var imageData = context.getImageData(img_width - 10, img_height - 10, img_width, img_height)
myColor = [imageData.data[0], imageData.data[1], imageData.data[2]]
var hexColor = gethex(...myColor)
return `#${hexColor}`
}
// 获取16进制颜色
function gethex(r, g, b) {
console.log(r, g, b)
r = r.toString(16)
g = g.toString(16)
b = b.toString(16)
// 补0
r.length == 1 ? (r = '0' + r) : ''
g.length == 1 ? (g = '0' + g) : ''
b.length == 1 ? (b = '0' + b) : ''
var hex = r + g + b
// 简化处理,如 FFEEDD 可以写为 FED
if (r.slice(0, 1) == r.slice(1, 1) && g.slice(0, 1) == g.slice(1, 1) && b.slice(0, 1) == b.slice(1, 1)) {
hex = r.slice(0, 1) + g.slice(0, 1) + b.slice(0, 1)
}
return hex
}
async function uploadImg(url, callbackFn) {
var image = new Image()
image.src = url
image.setAttribute('crossOrigin', 'Anonymous')
image.onload = function() {
img_width = this.width
img_height = this.height
// 设置画布尺寸
canvas.width = img_width
canvas.height = img_height
// 将图片按像素写入画布
context.drawImage(this, 0, 0, img_width, img_height)
callbackFn(getColor())
}
}
export default uploadImg
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-17 16:07:55
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 18:02:51
* @FilePath: \scrm-micro-home\src\utils\drawing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
class Drawing {
constructor(el, canvasParams) {
this.canvasId = el
let { width, height } = canvasParams
this.pixelRatio = 2
this.ctx = this.canvasId.getContext('2d')
width = this.toRpx(width)
height = this.toRpx(height)
this.canvasId.width = width
this.canvasId.height = height
}
async drawImages(imageParams, callback) {
this.ctx.beginPath()
this.ctx.save()
let { height, width, url, x, y } = imageParams
height = this.toRpx(height)
width = this.toRpx(width)
x = this.toRpx(x)
y = this.toRpx(y)
let image = this.createImage()
image.src = url
return new Promise(resolve => {
image.onload = () => {
setTimeout(() => {
this.ctx.drawImage(image, x, y, width, height)
// 再将图片填充到画布
let pattern = this.ctx.createPattern(image, 'no-repeat')
this.ctx.fillStyle = pattern
resolve(imageParams)
}, 3000)
}
})
}
toRpx(val) {
return this.pixelRatio * val
}
drawText(textParams) {
let { fontSize, color, text, x, y, bold } = textParams
fontSize = this.toRpx(fontSize)
x = this.toRpx(x)
y = this.toRpx(y)
this.ctx.font = `${bold ? 'bold ' : ''}${fontSize}px Calibri`
this.ctx.fillStyle = color
this.ctx.textAlign = 'center'
this.ctx.fillText(text, this.canvasId.width / 2, y + fontSize)
}
createImage() {
let image = new Image()
image.setAttribute('crossOrigin', 'Anonymous')
return image
}
async begin(data = {}) {
return new Promise(async (resolve, reject) => {
const drawFun = () => {
data.textList &&
data.textList.length &&
data.textList.map(e => {
this.drawText(e)
})
console.log(this.canvasId.toDataURL('image/png'))
resolve(this.canvasId.toDataURL('image/png'))
}
if (data.imageList && data.imageList.length) {
await this.drawImages(data.imageList[0])
if (data.imageList.length > 1)
for (let index = 1; index < data.imageList.length; index++) {
await this.drawImages(data.imageList[index])
if (index == data.imageList.length - 1) drawFun()
}
else drawFun()
} else drawFun()
})
}
}
export default Drawing
// 获取该月的天数
export const getDaysInMonth = (year, month) => {
const day = new Date(year, month + 1, 0).getDate()
// console.log("获取当前年", month, "当前月", month, "的天数", day);
return day
}
// 创建日期 yyyy-MM-dd 格式, 用于创建非当前月的日期
export const handleCrateDate = (year, month, start, end, type) => {
const arr = []
if (type === 'prev') {
// 上一月
if (start === end) return []
const daysInLastMonth = getDaysInMonth(year, month - 1) // 获取上一个月有多少天
// console.log(`当前月是${month + 1}月, 上一月${month}月的天数是${daysInLastMonth}天`)
for (let i = daysInLastMonth - end + 2; i <= daysInLastMonth; i++) {
arr.push({
// date: `${month === 0 ? year - 1 : year}-${(month + 1) < 10 ? month === 0 ? 12 : `0${month}` : month}-${i < 10 ? `0${i}` : i}`,
date: parseTime(new Date(year, month - 1, i)),
isCurMonth: false,
isSelected: false,
isRangeSelected: false
})
}
} else if (type === 'rear') {
// 下一月
for (let i = start; i <= end; i++) {
arr.push({
// date: `${month === 11 ? year + 1 : year}-${(month + 1) < 9 ? `0${month + 2}` : month + 2 <= 12 ? month + 2 : (month + 2) % 12 < 10 ? `0${(month + 2) % 12}` : (month + 2) % 12}-${i < 10 ? `0${i}` : i}`,
date: parseTime(new Date(year, month + 1, i)),
isCurMonth: false,
isSelected: false,
isRangeSelected: false
})
}
} else {
// 本月
for (let i = start; i <= end; i++) {
arr.push({
// date: `${year}-${(month + 1) < 10 ? `0${month + 1}` : month + 1}-${i < 10 ? `0${i}` : i}`,
date: parseTime(new Date(year, month, i)),
isCurMonth: true,
isSelected: false,
isRangeSelected: false
})
}
}
// console.log(arr)
return arr
}
// 创建年月时间 函数
export const handleCreateDatePicker = () => {
const years = []
const months = []
for (let i = 1970; i <= 2099; i++) {
years.push({
label: `${i}年`,
value: i
})
}
for (let i = 0; i <= 11; i++) {
months.push({
label: `${i + 1}月`,
value: i
})
}
return {
years,
months
}
}
/**
* Parse the time to string
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string | null}
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0 || !time) {
return null
}
const format = cFormat || '{y}-{m}-{d}'
let date
if (typeof time === 'object') {
date = time
} else {
if (typeof time === 'string') {
if (/^[0-9]+$/.test(time)) {
// support "1548221490638"
time = parseInt(time)
} else {
// support safari
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
time = time.replace(new RegExp(/-/gm), '/')
}
}
if (typeof time === 'number' && time.toString().length === 10) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
const value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
return value.toString().padStart(2, '0')
})
return time_str
}
...@@ -88,6 +88,38 @@ util.openTab = function(url) { ...@@ -88,6 +88,38 @@ util.openTab = function(url) {
link.rel = 'opener' link.rel = 'opener'
link.click() link.click()
} }
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
util.limitPrice = (newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) => {
/* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/,
zNumReg: /^\d*$/
}
/* eslint-enable */
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
}
if (newValue && reg[regRule].test(newValue + '')) {
if (/\./.test(newValue)) {
newValue = newValue + ''
var interger = newValue.split('.')[0]
var point = newValue.split('.')[1]
var intergerNum = interger.length > intergerDigit ? oldValue.split('.')[0] : interger
var pointNum = point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit ? intergerNum + '.' + pointNum : newValue.split('.')[0]
} else {
newValue = newValue.length > intergerDigit ? oldValue.slice(0, intergerDigit) : newValue
if (regRule == 'zNumReg') {
newValue = newValue.split('')[0] == '0' ? '0' : newValue
}
}
return newValue
} else {
return newValue ? oldValue : ''
}
}
util.isShowBtn = function(value, permissions) { util.isShowBtn = function(value, permissions) {
let isShowStatus = false let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST']) const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
...@@ -105,8 +137,11 @@ util.isShowBtn = function(value, permissions) { ...@@ -105,8 +137,11 @@ util.isShowBtn = function(value, permissions) {
.split('/') .split('/')
.slice(-2) .slice(-2)
.join('/') && .join('/') &&
itm.meta && itm.meta.permissions.includes(permissions) itm.meta &&
){isShowStatus = true} itm.meta.permissions.includes(permissions)
) {
isShowStatus = true
}
if (itm.children) { if (itm.children) {
menuLevel(itm.children) menuLevel(itm.children)
} }
...@@ -114,5 +149,4 @@ util.isShowBtn = function(value, permissions) { ...@@ -114,5 +149,4 @@ util.isShowBtn = function(value, permissions) {
} }
return isShowStatus return isShowStatus
} }
export default util export default util
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-16 10:20:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 15:53:44
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\ChatGPT.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="gpt-box">
<div class="gpt-header" v-if="query.purchaseCustomerCount">
<div class="import-base">
<div class="import-item" v-for="(item, index) in importItem" :key="index">
{{ item.title }}:
<span>{{ query[item.name] }}</span>
</div>
</div>
</div>
<div class="gpt-header" v-else>
<div class="import-panel">
<el-button type="primary" size="small" icon="el-icon-download" @click="jumpUrl">导入企微魔方</el-button>
</div>
<div class="import-illustrate">
当前门店基盘客户为空,请通过企微魔方导入门店基盘客户数据。
</div>
</div>
<div class="gpt-body">
<div class="chat-panel" ref="chatRef">
<div class="chat-panel-b" ref="chatBRef">
<div v-for="(item, i) in chatItem" :key="i">
<div class="error-tips flex-center" v-if="item.type == 'error'">
<i class="el-icon-error"></i>
<span>{{ item.content }}</span>
<!-- <i class="el-icon-close"></i> -->
</div>
<template v-else>
<div :class="['chat-item', item.type == 'answer' ? 'is-left' : 'is-right']">
<div class="item-content left-item" v-if="item.type == 'answer'">{{ item.content }}</div>
<div class="item-content right-item" v-else>{{ item.content }}</div>
</div>
</template>
</div>
</div>
</div>
</div>
<div class="gpt-footer">
<div class="input-box" contenteditable="true" v-html="contentHtml" ref="inputRef"></div>
<div class="input-operate">
<div class="select-box">
<el-button size="mini" @click="phrasesShow = true" ref="phrases">常用语</el-button>
<div class="select-panel" v-show="phrasesShow">
<div class="select-item" v-for="(item, index) in phrases" :key="index" v-html="item" @click="selectText(item)"></div>
</div>
</div>
<el-button type="primary" size="small" @click="sendMsg">发送</el-button>
</div>
</div>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
data() {
return {
isError: true,
phrasesShow: false,
query: {},
contentHtml: '我需要制定一套<span>续保</span>营销方案,活动时间为<span>5月份</span>。',
phrases: ['创建一个<span>端午节</span>的营销活动,活动时间为<span>6月份</span>', '我需要一个<span>立夏</span>的节日关怀营销活动', '建立一个<span>父亲节</span>的节日关怀活动'],
chatItem: [],
importItem: [
{
title: '基盘总客户数',
name: 'purchaseCustomerCount'
},
{
title: '企微客户数',
name: 'entmicroAddCustomerCount'
},
{
title: '未加企微客户数',
name: 'entmicroNotAddCustomerCount'
}
]
}
},
computed: {
...mapState('marketing', ['calendarDataAll', 'activityInfo', 'keywords', 'GPTList'])
},
watch: {
chatItem() {
const chatRef = this.$refs.chatRef
this.$nextTick(() => {
const height = this.$refs.chatBRef.offsetHeight - chatRef.offsetHeight + 40
chatRef.scrollTop = height //滚动到最底部
})
},
activityInfo(val) {
if (!val) return
if (val.type != 'chatgpt') this.chatItem = []
}
},
methods: {
...mapActions('marketing', ['setActivityInfo', 'setKeyWords']),
selectText(html) {
this.contentHtml = html
this.phrasesShow = false
},
jumpUrl() {
this.$history.push('/drainage/square/index')
},
//发送消息
sendMsg() {
console.log(this.calendarDataAll)
const content = this.$refs.inputRef.textContent
if (!content.trim()) return
this.chatItem.push({
type: 'question',
content
})
//根据关键字查找模板
const calendarData = this.calendarDataAll.find(item => content.includes(item.keywords))
if (calendarData) {
this.chatItem.push({
type: 'answer',
content: '我们为您生成以下方案,请查看“营销模型解析”'
})
this.setKeyWords(calendarData.keywords)
this.setActivityInfo({
id: calendarData.id,
type: 'chatgpt'
})
} else {
this.chatItem.push({
type: 'error',
content: '无法识别营销场景,请重新输入'
})
}
this.$refs.inputRef.textContent = ''
this.contentHtml = ''
},
/**点击空白处隐藏下拉框 */
bodyCloseMenus(e) {
const self = this
if (this.$refs.phrases && !this.$refs.phrases.$el.contains(e.target)) {
if (self.phrasesShow === true) {
self.phrasesShow = false
}
}
}
},
mounted() {
document.addEventListener('click', this.bodyCloseMenus)
this.query = this.$route.query || {}
console.log(this.$route.query)
},
beforeDestroy() {
document.removeEventListener('click', this.bodyCloseMenus)
}
}
</script>
<style lang="scss" scoped>
.gpt-box {
box-sizing: border-box;
padding: 8px;
.gpt-header {
height: 48px;
background: #e4e3ff;
border-radius: 4px;
display: flex;
align-items: center;
color: #000000a6;
.import-illustrate {
margin-left: 10px;
}
.import-base {
padding-left: 16px;
display: flex;
align-items: center;
.import-item {
margin-right: 80px;
span {
color: #5850ff;
}
}
}
}
.gpt-body {
height: 170px;
.error-tips {
width: 274px;
height: 40px;
background: #fce3e3;
border-radius: 4px;
margin: 0px auto;
font-size: 14px;
color: #000000a6;
span {
margin: 0 20px 0px 10px;
}
.el-icon-error {
color: #eb4e4e;
}
.el-icon-close {
color: #666666;
}
}
.chat-panel {
padding-top: 12px;
height: 150px;
overflow: auto;
.chat-item {
margin-top: 8px;
display: flex;
&.is-left {
justify-content: flex-start;
}
&.is-right {
justify-content: flex-end;
}
.item-content {
font-size: 14px;
display: inline-block;
padding: 12px 8px;
border: 1px solid #e5e5e5;
border-radius: 4px 4px 4px 0;
background: #fafbfe;
max-width: 500px;
}
}
}
}
.gpt-footer {
height: 98px;
background: #f5f5f5;
border: 1px solid #e5e5e5;
border-radius: 4px;
padding: 8px;
.input-box {
height: 66px;
overflow: auto;
}
.input-operate {
display: flex;
justify-content: space-between;
align-items: center;
.select-box {
position: relative;
.select-panel {
z-index: 1000;
background: #fff;
position: absolute;
top: 28px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px;
width: 343px;
.select-item {
padding-left: 10px;
line-height: 36px;
color: #666666ff;
font-size: 14px;
cursor: pointer;
span {
color: #eb4e4e;
}
&:hover {
background: #f2f1ff;
}
}
}
}
}
}
}
</style>
<style>
.select-item span,
.input-box span {
color: #eb4e4e;
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-23 17:35:23
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="left-wrap">
<div class="store-wrap">
<div class="mrglr text-16 scrm-c3 weight-6">{{ merchantInfo.merchantName }}</div>
<div class="merchantId scrm-c3 scrm-f14">商户号:{{ merchantInfo.merchantId }}</div>
<el-button class="mrglr add" icon="el-icon-plus" size="small" type="primary" @click="addSuper">新建</el-button>
</div>
<!-- 营销方案 -->
<div class="scheme-wrap">
<div class="scrm-ml6 scrm-c3 scrm-f14 weight-6">营销方案:</div>
<div class="scheme-list" v-infinite-scroll="scrollLoad">
<template v-for="(item, index) in schemeListData">
<div class="scheme-line scrm-c3 scrm-f14 flex" :class="{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div class="scheme-text one-line-ellipsis">{{ item.activityName }}</div>
<div class="flex txt-blue" v-show="item.hovering">
<span class="pointer" @click="getView(item)">预览</span>
<span class="scrm-ml6 pointer" @click="setActivity(item)">引用</span>
</div>
</div>
</template>
</div>
</div>
<!-- 营销日历 -->
<div class="calendar-market-wrap">
<div class="scrm-c3 scrm-f14 m-b-8 weight-6">营销日历:</div>
<glsx-calendar></glsx-calendar>
</div>
<!-- 营销主题 -->
<div class="theme-wrap">
<div class="scrm-c3 scrm-f14 m-b-8 weight-6">推荐近期营销主题:</div>
<div class="theme-list">
<template v-for="(item, index) in themeList">
<div class="theme-line scrm-c3 scrm-f12 flex" :class="{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div class="scheme-text">{{ index + 1 }}、{{ item.title }}</div>
<div class="flex txt-blue" v-show="item.hovering">
<span class="scrm-ml6 pointer" @click="setActivity(item)">引用</span>
</div>
</div>
</template>
</div>
</div>
<el-dialog title="预览" :append-to-body="true" :visible.sync="dialogVisible" width="30%">
<phone-view :activityInfo="activityInfo" :isSuper="isSuper"></phone-view>
</el-dialog>
</div>
</template>
<script>
import GlsxCalendar from './components/GlsxCalendar'
import PhoneView from './PhoneView'
import { mapState, mapActions } from 'vuex'
export default {
components: {
GlsxCalendar,
PhoneView
},
data() {
return {
activityInfo: {},
isSuper: true,
schemeListData: [],
total: 0,
dialogVisible: false,
themeList: [
{
text: '5月定保营销种草',
hovering: true
},
{
text: '5月特大活动定保营销种草活动即将开始',
hovering: false
},
{
text: '店庆7周年',
hovering: false
}
],
currentPage: 1,
merchantInfo: this.$globalState.session
}
},
computed: {
...mapState({
calendarData: state => state.marketing.calendarData,
schemeList: state => state.marketing.schemeList
})
},
watch: {
calendarData(newVal) {
this.getThemeData(newVal)
},
schemeList(val) {
this.getSchemeList(val)
}
},
mounted() {
this.getSchemeListData() //44211227 this.$globalState.session.merchantId
},
methods: {
...mapActions('marketing', ['setActivityInfo', 'setSchemeListData']),
getSchemeListData() {
this.setSchemeListData({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: this.currentPage })
},
scrollLoad() {
if (this.schemeList.length == this.total) return
this.currentPage++
this.getSchemeListData()
},
getView(val) {
this.isSuper = true
let { subscribe, id } = val,
param = {
activityId: id
},
activityAPi = 'findActivityInfo'
if (subscribe != 8) {
param = {
id
}
activityAPi = 'activityDetail'
this.isSuper = false
}
this.$apis.activity[activityAPi](param).then(res => {
console.log(res)
if (res) {
const activityCoupon = res.activityCouponBaseInfoDTOS || res.couponList || [],
selectedGoodsList = activityCoupon.filter(i => i.discountType == 8),
couponList = activityCoupon.filter(i => i.discountType != 8)
this.activityInfo = { ...res, selectedEquityList: res.serviceMerchantPackageConfigDTOList, couponList, selectedGoodsList }
this.dialogVisible = true
}
})
},
getSchemeList(val) {
if (!val) return
const list = val.pageNum == 1 ? val.list : this.schemeListData.concat(val.list)
this.schemeListData = list.map(item => {
return {
hovering: false,
activityName: item.activityName,
id: item.id,
subscribe: item.subscribe,
type: 'programme' //方案
}
})
},
addSuper() {
this.$parent.handleShowCalendar(0)
this.setActivityInfo({})
},
//设置活动详情
setActivity(item) {
this.$parent.handleShowCalendar(0)
this.setActivityInfo(item)
},
getThemeData(data) {
this.themeList = data.map(item => {
return {
title: item.title,
id: item.id,
hovering: false,
type: 'calendar' //方案
}
})
}
}
}
</script>
<style lang="scss" scoped>
.left-wrap {
width: 246px;
height: 100%;
background: #ffffff;
box-sizing: border-box;
display: flex;
flex-direction: column;
.store-wrap {
height: 192px;
padding-top: 48px;
display: flex;
flex-direction: column;
border-bottom: 1px solid #e5e5e5;
box-sizing: border-box;
.merchantId {
margin: 8px auto 24px;
line-height: 20px;
}
.add{
margin-bottom:36px;
}
}
.scheme-wrap {
padding: 16px 10px;
.scheme-list {
margin: 8px 0;
display: flex;
flex-direction: column;
height: 190px;
overflow-y: scroll;
overflow-x: hidden;
.scheme-line {
margin-bottom: 4px;
align-items: center;
height: 36px;
line-height: 36px;
.scheme-text {
width: 182px;
margin-left: 6px;
}
}
.select {
width: 226px;
height: 36px;
background: #f2f1ff;
border-radius: 4px;
padding: 0 6px;
box-sizing: border-box;
.scheme-text {
width: 140px;
}
}
}
}
.calendar-market-wrap {
padding: 0 16px 32px;
}
.theme-wrap {
padding: 0 16px;
.theme-list {
height: 200px;
// overflow-x: hidden;
overflow-y: scroll;
margin: 8px 0;
display: flex;
flex-direction: column;
.theme-line {
margin-bottom: 6px;
align-items: center;
line-height: 32px;
.scheme-text {
width: 182px;
margin-left: 6px;
}
}
.select {
width: 206px;
height: auto;
background: #f2f1ff;
border-radius: 4px;
padding: 0 6px;
box-sizing: border-box;
.scheme-text {
width: 140px;
}
}
}
}
}
</style>
<template>
<div class="container">
<div class="main-head">
<chat-gpt></chat-gpt>
</div>
<GPTAnalysis></GPTAnalysis>
</div>
</template>
<script>
import ChatGpt from './ChatGPT'
import GPTAnalysis from './GPTAnalysis'
export default {
data() {
return {}
},
componentsName: 'marketingMiddle',
name: 'marketingMiddle',
components: {
ChatGpt,
GPTAnalysis
}
}
</script>
<style lang="scss" scoped></style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 14:27:42
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="review-box">
<div class="review-title">预览营销方案</div>
<phone-view :activityInfo="activityDetail"></phone-view>
<div class="review-refresh" @click="renewImg">更新预览图</div>
</div>
</template>
<script>
import PhoneView from './PhoneView'
import { mapState } from 'vuex'
export default {
data() {
return {
activityDetail: {},
getComponent: ''
}
},
components: {
PhoneView
},
computed: {
...mapState('marketing', ['activityInfo', 'mergeImg'])
},
watch: {
mergeImg: {
handler(val) {
const [backgroundImage = '', detailImage = '', merchantLog = '', mainColor, logoInfo, marketingTitle, marketingSubtitle,templateId] = val
this.activityDetail = { ...this.activityDetail, ...{ backgroundImage, detailImage, merchantLog, mainColor, logoInfo, marketingTitle, marketingSubtitle,templateId } }
},
deep: true
}
// activityInfo(val) {
// this.activityDetail = {}
// }
},
methods: {
findComponent(children) {
for (let i = 0; i < children.length; i++) {
if (children[i].$options.componentsName == 'analysis') {
this.activityDetail = children[i].getViewParams()
return
}
if (children[i].$children) {
this.findComponent(children[i].$children)
}
}
},
renewImg() {
let children = this.$parent.$children
this.findComponent(children)
}
}
}
</script>
<style lang="scss" scoped>
.review-box {
background: #fff;
margin-top: 10px;
padding: 8px;
height: calc(100vh - 100px);
overflow-y: auto;
overflow-x: hidden;
.review-title {
padding: 8px;
font-size: 16px;
color: #333333;
}
.review-refresh {
margin: 18px auto 0px;
width: 274px;
height: 36px;
line-height: 36px;
text-align: center;
background: #685bff;
font-size: 14px;
color: #ffffff;
border-radius: 4px;
cursor: pointer;
}
}
</style>
<template>
<div class="calendar-card">
<div class="calendar-bar">
<button class="button button-year-minus" @click="minusYear(true)">
&lt;
</button>
<button class="button button-month-minus" @click="minusMonth">
&lt;
</button>
<div class="calendar-date">{{ date.year }}-{{ date.month + 1 }}-{{ date.date }}</div>
<button class="button button-month-plus" @click="plusMonth">&gt;</button>
<button class="button button-year-plus" @click="plusYear(true)">
&gt;
</button>
</div>
<div class="calendar-content">
<ul class="ul-week">
<li class="li-week" v-for="(item, index) in week" :key="index">{{ item }}</li>
</ul>
<ul class="ul-day" @click="handleShowCalendar">
<li class="li-day" v-for="(item, index) in days" :key="index" :isThisMonth="item.isThisMonth">
{{ item.date }}
<img v-if="item.isStar" class="star-icon" src="@/assets/star.png" />
</li>
</ul>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'SimpleCalendar',
data() {
return {
date: {
year: '',
month: '',
date: ''
},
current: {
year: '',
month: '',
date: ''
},
curretIndex: 30,
week: ['日', '一', '二', '三', '四', '五', '六'],
days: [],
starList: []
}
},
computed: {
...mapState({
calendarData: state => state.marketing.calendarDataAll
})
},
watch: {
calendarData(newVal) {
this.handleSelectCalendar(newVal)
}
},
methods: {
handleSelectCalendar(data) {
this.starList = data.map(item => {
let dateArray = item.startTime.split('/')
return {
date: +dateArray[2],
month: dateArray[1] - 1,
year: +dateArray[0]
}
})
this.createCalendar(this.current.year, this.current.month)
},
handleShowCalendar() {
this.$parent.$parent.handleShowCalendar(1)
},
plusMonth: function() {
if (this.date.month == 11) {
this.date.month = 0
this.plusYear(false)
} else {
this.date.month++
}
this.createCalendar(this.date.year, this.date.month)
},
minusMonth: function() {
if (this.date.month == 0) {
this.date.month = 11
this.minusYear(false)
} else {
this.date.month--
}
this.createCalendar(this.date.year, this.date.month)
},
plusYear: function(create) {
if (this.date.year == 2049) {
this.date.year = 1970
} else {
this.date.year++
}
if (create) {
this.createCalendar(this.date.year, this.date.month)
}
},
minusYear: function(create) {
if (this.date.year == 1970) {
this.date.year = 2049
} else {
this.date.year--
}
if (create) {
this.createCalendar(this.date.year, this.date.month)
}
},
createCalendar: function(year, month) {
let d = new Date()
d.setFullYear(year)
d.setMonth(month)
d.setDate(1)
let dayOfFirstDay = d.getDay()
this.days = []
let i = 0
for (; i < 42; i++) {
d.setDate(1)
d.setMonth(month)
d.setDate(i - dayOfFirstDay + 1)
let isThisMonth = 1
if (d.getMonth() == month) {
isThisMonth = 2
} else {
isThisMonth = 1
}
if (this.current.date == d.getDate() && this.current.month == d.getMonth() && this.current.year == d.getFullYear()) {
isThisMonth = 3
let date = {
year: year,
month: month,
date: d.getDate(),
isThisMonth: isThisMonth
}
this.days.push(date)
} else {
let date = {
year: d.getFullYear(),
month: d.getMonth(),
date: d.getDate(),
isThisMonth: isThisMonth
}
this.days.push(date)
}
}
if (i == 42) this.selectStar()
},
selectStar() {
let { days, starList } = this
for (let i = 0; i < starList.length; i++) {
for (let j = 0; j < days.length; j++) {
if (starList[i].date == days[j].date && starList[i].year == days[j].year && starList[i].month == days[j].month) {
days[j].isStar = true
}
}
}
}
},
created() {
let d = new Date()
this.date.year = d.getFullYear()
this.date.month = d.getMonth()
this.date.date = d.getDate()
this.current.year = d.getFullYear()
this.current.month = d.getMonth()
this.current.date = d.getDate()
}
}
</script>
<style scoped>
.calendar-card {
/* width: 290px; */
height: 210px;
padding: 5px 5px 0px 5px;
border: 1px solid #e8e8ea;
border-radius: 1.53px;
}
/* .calendar-card:hover {
box-shadow: 0px 0px 5px 5px #cfcfcf;
} */
.calendar-bar {
height: 30px;
color: #727272;
line-height: 30px;
text-align: center;
border-bottom: 1px solid #e8e8ea;
font-size: 12px;
/* background-color: #ebeef5; */
}
.calendar-date {
display: inline-block;
width: 100px;
}
.button {
width: 20px;
height: 20px;
background-color: #fff;
color: #aaa;
border: 0;
border-radius: 5px;
}
.button:hover {
background-color: #eee;
cursor: pointer;
}
.ul-week {
display: grid;
width: 245px;
grid-template-rows: 20px;
grid-template-columns: repeat(7, 24px); /**/
list-style: none;
text-align: center;
font-size: 13px;
color: #aaa;
margin: 5px 18px 5px 18px;
padding-inline-start: 0px;
padding-inline-end: 0px;
}
.li-week {
display: inline-block;
}
.ul-day {
display: grid;
width: 245px;
grid-template-rows: repeat(6, 22px);
grid-template-columns: repeat(7, 24px);
list-style: none;
text-align: center;
margin: 5px 18px 5px 18px;
padding-inline-start: 0px;
padding-inline-end: 0px;
}
.li-day {
display: inline-block;
font-size: 10px;
line-height: 22px;
text-align: center;
border-radius: 5px;
margin: 1px;
color: rgb(91, 91, 91);
position: relative;
}
.li-day:hover {
background-color: #5850ff;
color: #fff;
font-size: 15px;
cursor: pointer;
}
.li-day[isThisMonth='1'] {
color: rgb(190, 190, 190);
font-size: 10px;
}
.li-day[isThisMonth='1']:hover {
background-color: #5850ff;
color: #fff;
font-size: 15px;
cursor: pointer;
}
.li-day[isThisMonth='3'] {
border-radius: 5px;
color: rgb(255, 255, 255);
background-color: #5850ff;
font-weight: 600;
}
.star-icon {
width: 8px;
position: absolute;
top: 17px;
left: 8px;
height: 8px;
}
</style>
<template>
<div class="calendar-wrap">
<div class="header">
<div class="header-rounded" @click="handlePrev('prev')">
<img src="@/assets/arrow.png" />
</div>
<span class="range">{{ currentDate }}</span>
<div class="header-rounded next" @click="handlePrev('next')"><img src="@/assets/arrow.png" /></div>
<div class="close scrm-c3 scrm-f12 " @click="close()">
<img src="@/assets/close.png" />
关闭日历
</div>
</div>
<div ref="calendar" class="calendar"></div>
<div class="footer">
<div class="title">
2023年度
<br />
营销计划概览:
</div>
<div class="described">
1、本年度共计可营销场次48+次
<br />
2、推荐营销场次16次,查看
<br />
3、定保、续保、节日关怀、店庆等
</div>
</div>
</div>
</template>
<script>
import Calendar from '@toast-ui/calendar'
import * as dayjs from 'dayjs'
import { mapState, mapActions } from 'vuex'
export default {
data() {
return {
calendar: '',
currentDate: '',
options: {
defaultView: 'month',
isReadOnly: true,
month: {
dayNames: ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
},
usageStatistics: false,
template: {
milestone(event) {
return `<span style="color: ${event.color};">${event.title}</span>`
},
aaa(event) {
return `<span style="color: ${event.color};">${event.title}</span>`
}
}
},
eventList: []
}
},
computed: {
...mapState({
calendarData: state => state.marketing.calendarData
})
},
mounted() {
let container = this.$refs.calendar
this.calendar = new Calendar(container, this.options)
this.calendar.on('clickEvent', e => {
this.$parent.handleShowCalendar(0)
this.setActivityInfo({
id: e.event.calendarId,
type: 'calendar'
})
})
this.getCalendarData()
},
methods: {
...mapActions('marketing', ['setActivityInfo']),
close() {
this.$parent.handleShowCalendar(0)
},
getCalendarData() {
let colors = ['#BFEFD5', '#FEE9CC', '#FEDCCF', '', '#CAF2F1', '#ECD0FF']
let { eventList, calendarData, calendar, currentDate } = this
eventList = calendarData.map(item => {
let obj = {
id: item.id,
calendarId: item.id,
title: item.title,
start: item.startTime.replace('/', '-'),
end: item.endTime.replace('/', '-'),
color: '#333333',
backgroundColor: colors[item.marketingType - 1],
borderColor: colors[item.marketingType - 1],
dragBackgroundColor: colors[item.marketingType - 1],
customStyle: {
fontSize: '12px;'
}
}
if (item.startTime == item.endTime) {
obj.category = 'milestone'
} else {
obj.category = 'aaa'
}
return obj
})
calendar.createEvents(eventList)
this.currentDate = dayjs(this.calendar.getDate()).format('YYYY年MM')
},
handlePrev(type) {
this.calendar[type]()
this.currentDate = dayjs(this.calendar.getDate()).format('YYYY年MM')
}
}
}
</script>
<style lang="scss" scoped>
.calendar-wrap {
width: auto;
height: 100%;
margin-bottom: 20px;
margin-right: 10px;
}
.header {
display: flex;
margin-top: 11px;
align-items: center;
justify-content: center;
height: 44px;
background: #ffffff;
border-bottom: 1px solid #c6c6c6;
position: relative;
.range {
font-weight: 600;
font-size: 16px;
color: #333333;
text-align: center;
margin: 0 8px;
}
.next {
img {
transform: rotate(270deg);
}
}
.close {
display: flex;
align-items: center;
position: absolute;
cursor: pointer;
right: 16px;
img {
width: 12px;
height: 12px;
margin-right: 4px;
}
}
}
.calendar {
width: 100%;
height: 83%;
}
.header-rounded {
width: 28px;
height: 28px;
background: #ffffff;
border: 1px solid #e8e8ea;
border-radius: 2px;
display: flex;
img {
width: 11px;
height: 9px;
margin: auto;
transform: rotate(90deg);
}
}
.footer {
width: 100%;
height: 10%x;
background: #ffffff;
margin-top: 8px;
display: flex;
padding: 16px;
box-sizing: border-box;
.title {
text-align: right;
margin-right: 36px;
font-weight: 600;
font-size: 20px;
color: #333333;
text-align: center;
line-height: 28px;
}
.described {
font-size: 14px;
color: #333333;
letter-spacing: 0;
line-height: 22px;
}
}
</style>
<template>
<GLDialog mode="small" :appendToBody="true" title="选择营销跟进专员" cancelText="跳过" :hasFooter="hasFooter" :before-close="handleEmpClose" @onOk="handleEmpConfirm" @onCancel="handleEmpClose" :visible.sync="isSelectEmpVisible">
<div class="config-header">
本次营销活动导入客户
<span>{{ importNum }}</span>
人,请选择跟进专员对以上客户进行跟进:
</div>
<div class="config-item">
<div class="market-title">
<label>*</label>
跟进专员:
</div>
<div class="market-content">
<el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i>
选择专员
</el-button>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length">
<GLFull :label="tag.staffName" :identi="`${tag.staffId}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in staffInfo" :key="idx" @handleRemove="removeStaff(idx)"></GLFull>
</div>
</div>
</div>
<div class="tips">1、未加企微客户将发送本营销活动信息邀请添加跟进专员企业微信</div>
<div class="tips">2、已加企微客户将指派任务由跟进专员1V1发送营销提醒给客户</div>
<div class="tips">3、如跳过选择营销跟进专员,则不进行营销任务指派</div>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</GLDialog>
</template>
<script>
import selectEmp from '@/components/selectEmp/emp'
export default {
data() {
return {
staffInfo: []
}
},
components: {
selectEmp
},
props: {
isSelectEmpVisible: {
type: Boolean,
default: true
},
importNum: {
type: Number,
default: 0
}
},
methods: {
handleAddEmp() {
this.staffStatus = false
this.$refs.selectEmpForm.init(this.staffInfo)
},
selectTable(item) {
this.staffInfo = item.map(item => {
return {
staffId: item.id,
staffName: item.staffName
}
})
},
handleEmpConfirm() {
if (this.staffInfo && this.staffInfo.length) {
this.$emit('handleEmpConfirm', this.staffInfo[0])
} else {
this.$message.error('请选择跟进专员')
}
},
handleEmpClose() {
this.$emit('handleEmpConfirm', {})
}
}
}
</script>
<style lang="scss" scoped>
.config-header {
padding-left: 40px;
color: #333333ff;
font-size: 14px;
span {
color: #5850ff;
}
}
.tips {
padding-left: 40px;
font-size: 12x;
color: #999999;
line-height: 24px;
}
.config-item {
display: flex;
margin: 15px;
.market-title {
width: 100px;
text-align: right;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
font-weight: 400;
margin-right: 6px;
label {
color: #eb4e4e;
}
}
.market-content {
flex: 1;
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
}
</style>
<!-- 选择礼包弹窗 -->
<template>
<GLDialog mode="big" :appendToBody="true" class="muti-gift" bigTitle="选择内容" :hasFooter="hasFooter" :before-close="handleEquityClose" @onOk="handleEquityConfirm" @onCancel="handleEquityClose" :visible.sync="isSelectEquityVisible">
<div class="flex">
<div class="gift-table">
<div>
<glsx-combi-form :isEdit="false" labelWidth="70px" class="p-16" style="padding-bottom: 0px;" ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
<GLTable :hasPage="false" ref="equityRef" v-loading="loading" :tableData="EquityList" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList" @selectionTable="handleSelectionTable">
<span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span>
</span>
<span slot="stock" slot-scope="scope">
<span>{{ scope.scope.limitStockFlag == 1 ? scope.scope.stock : '无限制' }}</span>
</span>
<span slot="useType" slot-scope="scope">
<span>{{ toRestrictLabelText(scope.scope) }}</span>
</span>
</GLTable>
</div>
</div>
<div class="selected-list">
<p class="list-title p-16">已选({{ selectedList.length }})</p>
<div class="list-gifts">
<div class="gift-box" v-if="selectedList.length">
<div class="gift-label">
<img class="muti-icon" :src="require(`@/assets/img/coupon/equity.png`)" />
</div>
<div class="gift-content">
<div class="gift-item" :key="subItem.id" v-for="subItem in selectedList">
<img class="muti-icon" src="@/assets/img/muti-selected.png" @click="deleteSelected(subItem)" />
{{ subItem.packageName }}
</div>
</div>
</div>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import url from '@/assets/img/empty.png'
// import glsxDialog from '@/components/glsx-dialog'
export default {
name: 'selectEquityDialog',
data() {
return {
size: 'small',
// 表格组件
isMount: false,
userInfo: {},
EquityList: [],
fnCallBack: false,
url: url,
loading: true,
selectedSum: 0,
selectedList: [],
initSelected: '',
// 搜索
searchForm: {
packageName: ''
},
searchFormData: [
{
label: '权益名称',
name: 'packageName',
type: 'input',
maxlength: 30,
width: '185px',
placeholder: '请输入权益名称',
isClear: true
}
],
// pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '权益名称',
prop: 'packageName',
width: 300
},
{
label: '有效期',
prop: 'packageServicePeriod',
formatter: cellValue => {
return '一年'
}
}
]
},
tableParamsL: {}
}
},
props: {
isSelectEquityVisible: {
type: Boolean,
default: false
},
selectedEquityLists: {
type: Object,
default: () => []
}
},
// components: {
// glsxDialog
// },
mounted() {
this.getList()
},
methods: {
couponString(val) {
return val.packageName
},
handleSearch() {
this.getList()
},
getList() {
var params = {
...this.searchForm,
merchantId: this.$globalState.session.merchantId
}
this.loading = true
this.$apis.giftBag
.equityMerchant(params)
.then(res => {
this.EquityList = res.packageConfigs
this.$refs.equityRef.tableHeightValues = '52vh'
this.recoverySelected()
})
.finally(() => {
this.loading = false
})
},
recoverySelected() {
this.selectedEquityLists.forEach(item => {
var idx = this.EquityList.findIndex(k => k.packageCode == item.packageCode)
var index = this.selectedList.findIndex(k => k.packageCode == item.packageCode)
if (idx != -1 && index == -1) {
this.$refs.equityRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.EquityList[idx], true)
}
})
},
// 删除选中
deleteSelected(deleteList) {
this.$nextTick(() => {
var idx = this.EquityList.findIndex(k => k.packageCode == deleteList.packageCode)
if (idx != -1) {
this.$refs.equityRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.EquityList[idx], false)
}
})
},
// 选择/取消
handleSelectionTable(val) {
this.selectedList = val
},
handleEquityConfirm() {
if (this.selectedList.length == 0) {
this.$message.error('请选择权益')
return
}
this.$emit('handleEquityConfirm', this.selectedList)
},
handleEquityClose() {
this.$emit('handleEquityClose')
}
}
}
</script>
<style lang="scss">
.el-message {
z-index: 9999 !important;
}
.muti-gift .el-tabs__active-bar {
display: block;
}
.muti-gift .el-tabs__nav-scroll {
display: block;
border-bottom: 1px solid #eeeeee;
}
.muti-gift .el-tabs__item {
font-weight: 400;
font-size: 16px;
color: #717171;
height: 36px !important;
line-height: 36px !important;
}
.muti-gift .el-tabs__item:hover,
.muti-gift .el-tabs__item.is-active {
color: #5f5efb;
background: #fff !important;
border-width: 0px !important;
}
.muti-gift .m-t-10 {
margin-top: 10px;
}
.muti-gift .gift-table {
width: calc(100% - 280px);
border: 1px solid #eeeeee;
margin-right: 10px;
}
.muti-gift .p-16 {
padding: 16px;
}
.muti-gift .selected-list {
width: 280px;
border-radius: 2px;
border: 1px solid #eeeeee;
.list-title {
font-size: 16px;
border-bottom: 1px solid #f1f1f1;
}
.list-gifts {
height: 61vh;
overflow-y: scroll;
}
.gift-box {
padding: 16px;
.gift-label {
color: #999999;
margin-bottom: 14px;
}
.gift-content {
border-bottom: 1px solid #e5e5e5;
.gift-item {
margin-bottom: 20px;
display: flex;
align-items: flex-start;
line-height: 20px;
.muti-icon {
cursor: pointer;
margin-right: 4px;
}
.gift-coupon-name {
display: inline-block;
width: 109px;
margin: 0 5px 0 7px;
}
.gift-sum {
display: inline-block;
width: 82px;
text-align: right;
.el-input-number--mini .el-input__inner {
padding: 0 10px;
}
.sum-input {
display: inline-block;
width: 82px;
}
.el-input--mini .el-input__inner {
border: 0px;
}
.el-input-number--mini .el-input-number__decrease,
.el-input-number--mini .el-input-number__increase {
width: 20px !important;
border: 0px;
background-color: #fff;
}
}
.gift-tips {
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
color: #999999;
background-color: #eeeded;
margin-right: 7px;
}
}
.gift-item:last-child {
margin-bottom: 0;
}
}
.gift-content:last-child {
border-bottom: 0px;
}
}
}
</style>
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex'
export default { export default {
name: 'homeStep', name: 'homeStep',
data() { data() {
...@@ -113,6 +114,7 @@ export default { ...@@ -113,6 +114,7 @@ export default {
} }
}, },
methods: { methods: {
...mapActions('marketing', ['setCustomDetail']),
jumpUrl(url) { jumpUrl(url) {
this.$history.push(url) this.$history.push(url)
}, },
...@@ -121,6 +123,7 @@ export default { ...@@ -121,6 +123,7 @@ export default {
this.$apis.home.viewData({}).then(res => { this.$apis.home.viewData({}).then(res => {
this.loading = false this.loading = false
if (res) { if (res) {
this.setCustomDetail(res)
const { purchaseCustomerCount, waitMatchCustomerAddCount, purchaseCustomerAddCount, purchaseCustomerAddPercent, waitMatchPercent, entmicroAddCustomerCount, customerCount } = res const { purchaseCustomerCount, waitMatchCustomerAddCount, purchaseCustomerAddCount, purchaseCustomerAddPercent, waitMatchPercent, entmicroAddCustomerCount, customerCount } = res
this.purchaseCustomerCount = purchaseCustomerCount this.purchaseCustomerCount = purchaseCustomerCount
this.waitMatchCustomerAddCount = waitMatchCustomerAddCount this.waitMatchCustomerAddCount = waitMatchCustomerAddCount
......
...@@ -2,138 +2,76 @@ ...@@ -2,138 +2,76 @@
<div class="subscript-wrap scrm-box-f"> <div class="subscript-wrap scrm-box-f">
<p class="home-use-title">场景订阅商城</p> <p class="home-use-title">场景订阅商城</p>
<div class="home-use-box"> <div class="home-use-box">
<div class="home-use-item"> <div class="home-use-item" v-for="item in sceneData" :key="item.type">
<div :class="[isrenewal ? 'blur' : '']"> <div :class="[item.isShow ? 'blur' : '']">
<div class="use-item-icon"><img src="@/assets/img/home/renewal.png" alt="" /></div> <div class="use-item-icon"><img :src="require(`@/assets/img/home/${item.icon}.png`)" alt="" /></div>
<div class="use-item-title">续保招揽</div> <div class="use-item-title">{{ item.title }}</div>
<div class="use-item-content">平台可将店内续保套餐线上化,链接化。员工可通过企微、微信等渠道的分发。并提供了二次线索跟进功能,进一步提高对意向客户的跟进能力。</div> <div class="use-item-content">{{ item.content }}</div>
<div class="use-item-config"> <div class="use-item-config">
<div class="use-config-item"> <div class="use-config-item" v-for="(citem, index) in item.config" :key="index">
<i class="el-icon-check"></i> <i class="el-icon-check"></i>
续保线索二次跟进 {{ citem }}
</div> </div>
<div class="use-config-item">
<i class="el-icon-check"></i>
续保套餐线上化
</div>
<div class="use-config-item">
<i class="el-icon-check"></i>
套餐灵活打包
</div>
</div>
<div class="use-flex">
<div class="use-operation" @click="useHandle(5)">立即使用</div>
<div class="use-operation bgf" @click="scanningHandle('renewal')">扫码体验</div>
</div>
</div>
<div class="mask" v-show="isrenewal">
<div>
<p>门店端</p>
<img :src="this.$scene.renewal[0]" alt="" />
<p class="share-text">分享活动链接</p>
</div>
<div>
<p>车主端</p>
<img :src="this.$scene.renewal[1]" alt="" />
<p class="share-text">浏览并参与活动</p>
</div>
<div class="close" @click="scanningHandle('renewal')">+</div>
</div>
</div>
<div class="home-use-item">
<div :class="[isbail ? 'blur' : '']">
<div class="use-item-icon"><img src="@/assets/img/home/bail.png" alt="" /></div>
<div class="use-item-title">定保招揽</div>
<div class="use-item-content">基于店内定保业务场景, 平台通过整合第三方的福利卡券,为门店带来异业联盟的新契机,让定保套餐在销售路径上更丰富,提高对消费者的吸引力。</div>
<div class="use-item-config">
<div class="use-config-item">
<i class="el-icon-check"></i>
提高定保场景营销能力
</div>
<div class="use-config-item">
<i class="el-icon-check"></i>
拓宽营销触点
</div>
<div class="use-config-item">
<i class="el-icon-check"></i>
活动效果数据化
</div>
</div>
<div class="use-flex">
<div class="use-operation" @click="useHandle(2)">立即使用</div>
<div class="use-operation bgf" @click="scanningHandle('bail')">扫码体验</div>
</div> </div>
<div class="use-flex" v-if="item.isGPT">
<div class="use-operation" @click="useHandleGPT()">立即使用</div>
</div> </div>
<div class="mask" v-show="isbail"> <div class="use-flex" v-else>
<div> <div class="use-operation" @click="useHandle(item.type)">立即使用</div>
<p>门店端</p> <div class="use-operation bgf" @click="scanningHandle(item)">扫码体验</div>
<img :src="this.$scene.bail[0]" alt="" />
<p class="share-text">分享活动链接</p>
</div>
<div>
<p>车主端</p>
<img :src="this.$scene.bail[1]" alt="" />
<p class="share-text">浏览并参与活动</p>
</div> </div>
<div class="close" @click="scanningHandle('bail')">+</div>
</div>
</div>
<div class="home-use-item">
<div :class="[isfestivals ? 'blur' : '']">
<div class="use-item-icon"><img src="@/assets/img/home/festivals.png" alt="" /></div>
<div class="use-item-title">节假日关怀</div>
<div class="use-item-content">通过节日为契机,推送节日关怀链接并吸引用户购买相关服务。平台将提供贴合节日气氛的活动落地页,门店可根据业务需要整合服务或产品。</div>
<div class="use-item-config">
<div class="use-config-item">
<i class="el-icon-check"></i>
促进门店节假日产值转化
</div>
<div class="use-config-item">
<i class="el-icon-check"></i>
增加客户关怀
</div> </div>
<div class="use-config-item"> <div class="mask" v-if="item.isShow">
<i class="el-icon-check"></i>
实现软性营销
</div>
</div>
<div class="use-flex">
<div class="use-operation" @click="useHandle(6)">立即使用</div>
<div class="use-operation bgf" @click="scanningHandle('festivals')">扫码体验</div>
</div>
</div>
<div class="mask" v-show="isfestivals" >
<div> <div>
<p>门店端</p> <p>门店端</p>
<img :src="this.$scene.festivals[0]" alt="" /> <img :src="$scene[item.icon][0]" alt="" />
<p class="share-text">分享活动链接</p> <p class="share-text">分享活动链接</p>
</div> </div>
<div> <div>
<p>车主端</p> <p>车主端</p>
<img :src="this.$scene.festivals[1]" alt="" /> <img :src="$scene[item.icon][1]" alt="" />
<p class="share-text">浏览并参与活动</p> <p class="share-text">浏览并参与活动</p>
</div> </div>
<div class="close" @click="scanningHandle('festivals')">+</div> <div class="close" @click="scanningHandle(item)">+</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
const sceneData = [
{ title: 'ChatGPT超级营销', content: '场景营销结合对话机器人ChatGPT,通过ChatGPT与丰富的节假日场景库预设动态,生成营销主题内容,更快为门店创建适用的活动落地页。', config: ['ChatGPT结合', '丰富的预设场景', '平台免费提供优惠券'], icon: 'ChatGPT', isGPT: true },
{ title: '续保招揽', content: '平台可将店内续保套餐线上化,链接化。员工可通过企微、微信等渠道的分发。并提供了二次线索跟进功能,进一步提高对意向客户的跟进能力。', config: [' 续保线索二次跟进', '续保套餐线上化', '套餐灵活打包'], icon: 'renewal', type: 6, isShow: false },
{ title: '定保招揽', content: '基于店内定保业务场景, 平台通过整合第三方的福利卡券,为门店带来异业联盟的新契机,让定保套餐在销售路径上更丰富,提高对消费者的吸引力。', config: [' 提高定保场景营销能力', ' 拓宽营销触点', '活动效果数据化'], icon: 'bail', type: 2, isShow: false },
{ title: '节假日关怀', content: '通过节日为契机,推送节日关怀链接并吸引用户购买相关服务。平台将提供贴合节日气氛的活动落地页,门店可根据业务需要整合服务或产品。', config: [' 促进门店节假日产值转化', '增加客户关怀', '实现软性营销'], icon: 'festivals', type: 5, isShow: false }
]
import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
isrenewal: false, sceneData
isbail: false,
isfestivals: false
} }
}, },
computed: {
...mapGetters(['marketing'])
},
methods: { methods: {
scanningHandle(data) { scanningHandle(data) {
this['is' + data] = !this['is' + data] data.isShow = !data.isShow
}, },
useHandle(value) { useHandle(value) {
this.$history.push(`/link/activityLink/editActivity?addOrEdit=add&subscribe=${value}&$title=新建活动`) this.$history.push(`/link/activityLink/editActivity?addOrEdit=add&subscribe=${value}&$title=新建活动`)
},
useHandleGPT() {
const { purchaseCustomerCount, entmicroAddCustomerCount, entmicroNotAddCustomerCount } = this.marketing.customDetail
this.$router.push({
path: '/home/marketing',
query: {
purchaseCustomerCount,
entmicroAddCustomerCount,
entmicroNotAddCustomerCount
}
})
} }
} }
} }
...@@ -154,10 +92,9 @@ export default { ...@@ -154,10 +92,9 @@ export default {
display: flex; display: flex;
.home-use-item { .home-use-item {
position: relative; position: relative;
padding: 20px; padding: 1vw;
box-sizing: border-box; box-sizing: border-box;
flex: 1; flex: 1;
height: 371px;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
} }
.home-use-item + .home-use-item { .home-use-item + .home-use-item {
...@@ -180,18 +117,14 @@ export default { ...@@ -180,18 +117,14 @@ export default {
.use-item-content { .use-item-content {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
height: 60px;
color: #666666; color: #666666;
letter-spacing: 0; letter-spacing: 0;
font-weight: 400; font-weight: 400;
} }
.use-item-config { .use-item-config {
display: flex;
flex-wrap: wrap;
height: 60px; height: 60px;
.use-config-item { .use-config-item {
margin-top: 14px; margin-top: 14px;
width: 50%;
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
letter-spacing: 0; letter-spacing: 0;
...@@ -208,10 +141,11 @@ export default { ...@@ -208,10 +141,11 @@ export default {
.use-flex { .use-flex {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
margin-top: 30px; margin-top: 30px;
} }
.use-operation { .use-operation {
flex: 1; width: calc(50% - 8px);
height: 36px; height: 36px;
background: #5850ff; background: #5850ff;
font-weight: 400; font-weight: 400;
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-11 18:32:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-31 09:29:44
* @FilePath: \scrm-micro-home\src\views\home\marketing.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="full-box">
<div class="market-left">
<marketing-left></marketing-left>
</div>
<div class="market-m-r">
<div class="market-top">
<div class="market-header">
<div class="back-wrap" @click="goBack">
<i class="i i-back"></i>
<span class="back-text">返回</span>
<span class="sprator">|</span>
</div>
<div class="market-title">ChatGPT超级营销</div>
</div>
</div>
<div class="market-bottom" v-show="!showCalendar">
<!-- <template > -->
<div class="market-middle">
<marketing-middle></marketing-middle>
</div>
<div class="market-right">
<marketing-right></marketing-right>
</div>
<!-- </template> -->
</div>
<div v-if="showCalendar" class="calendar-panel">
<schedule-calendar ref="calendar"></schedule-calendar>
</div>
</div>
</div>
</template>
<script>
import ScheduleCalendar from './components/Marketing/components/ScheduleCalendar'
import MarketingLeft from './components/Marketing/MarketingLeft'
import MarketingMiddle from './components/Marketing/MarketingMiddle'
import MarketingRight from './components/Marketing/MarketingRight'
import { mapActions } from 'vuex'
export default {
components: {
MarketingLeft,
MarketingMiddle,
MarketingRight,
ScheduleCalendar
},
data() {
return {
showCalendar: false
}
},
mounted() {
this.getCalendarListData({ status: 1, recommendMonths: 3 })
this.getCalendarListDataAll()
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })
},
methods: {
...mapActions({
getCalendarListData: 'marketing/getCalendarListData',
getCalendarListDataAll: 'marketing/getCalendarListDataAll',
getMerchantInfo: 'marketing/getMerchantInfo'
}),
handleShowCalendar(value) {
this.showCalendar = Boolean(value)
},
goBack() {
this.$router.push('/home/index')
}
}
}
</script>
<style lang="scss" scoped>
.full-box {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: #f0f1f7;
z-index: 999;
display: flex;
.market-left {
width: 246px;
background: #fff;
height: 100%;
overflow-y: scroll;
overflow-x: hidden;
}
.market-m-r {
margin-left: 8px;
flex: 1;
position: relative;
.market-bottom {
display: flex;
margin-right: 10px;
height: calc(100% - 210px);
.market-middle {
flex: 1;
}
.market-right {
width: 303px;
margin-left: 8px;
}
}
.calendar-panel {
width: 100%;
height: calc(100% - 69px);
}
}
.market-top {
.market-header {
height: 56px;
background: #ffffff;
display: flex;
align-items: center;
padding-left: 20px;
color: #333;
.back-wrap {
font-size: 12px;
cursor: pointer;
.sprator {
margin: 0 8px;
color: #c3c3c3;
}
}
.market-title {
font-weight: 500;
font-size: 16px;
}
}
}
}
</style>
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 16:50:33
* @FilePath: \scrm-micro-home\vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const path = require('path') const path = require('path')
const packageName = require('./package.json').name const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/' const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/' const CDN_DOMAIN = 'https://img01.glsx.com.cn/'
const cdn = { const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`], css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`] js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
} }
module.exports = { module.exports = {
outputDir: `dist`, outputDir: `dist`,
...@@ -32,8 +40,8 @@ module.exports = { ...@@ -32,8 +40,8 @@ module.exports = {
'element-ui': 'ELEMENT', 'element-ui': 'ELEMENT',
'vue-router': 'VueRouter', 'vue-router': 'VueRouter',
vuex: 'Vuex', vuex: 'Vuex',
axios: 'axios', echarts: 'echarts',
echarts: 'echarts' AMap: 'AMap'
} }
}, },
devServer: { devServer: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!