Commit e74ebb04 by 王琦琳

Merge branch 'SAAS+V4.43-0807' into 'develop'

上线合并

See merge request !346
2 parents 8e929266 636dc6de
...@@ -1290,6 +1290,22 @@ ...@@ -1290,6 +1290,22 @@
} }
} }
}, },
"@babel/runtime-corejs3": {
"version": "7.25.0",
"resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.25.0.tgz",
"integrity": "sha512-BOehWE7MgQ8W8Qn0CQnMtg2tHPHPulcS/5AVpFvs2KCK1ET+0WqZqPvnpRpFN81gYoFopdIEJX9Sgjw3ZBccPg==",
"requires": {
"core-js-pure": "^3.30.2",
"regenerator-runtime": "^0.14.0"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.14.1",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
}
}
},
"@babel/template": { "@babel/template": {
"version": "7.18.10", "version": "7.18.10",
"resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.18.10.tgz", "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.18.10.tgz",
...@@ -3508,6 +3524,27 @@ ...@@ -3508,6 +3524,27 @@
"whatwg-fetch": "^3.6.2" "whatwg-fetch": "^3.6.2"
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": { "acorn-walk": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz", "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
...@@ -3897,27 +3934,6 @@ ...@@ -3897,27 +3934,6 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
...@@ -5863,6 +5879,11 @@ ...@@ -5863,6 +5879,11 @@
} }
} }
}, },
"core-js-pure": {
"version": "3.37.1",
"resolved": "https://registry.npmmirror.com/core-js-pure/-/core-js-pure-3.37.1.tgz",
"integrity": "sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA=="
},
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
...@@ -17080,7 +17101,7 @@ ...@@ -17080,7 +17101,7 @@
}, },
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", "resolved": "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true "dev": true
}, },
...@@ -17242,6 +17263,23 @@ ...@@ -17242,6 +17263,23 @@
"makeerror": "1.0.12" "makeerror": "1.0.12"
} }
}, },
"wangeditor": {
"version": "4.7.15",
"resolved": "https://registry.npmmirror.com/wangeditor/-/wangeditor-4.7.15.tgz",
"integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==",
"requires": {
"@babel/runtime": "^7.11.2",
"@babel/runtime-corejs3": "^7.11.2",
"tslib": "^2.1.0"
},
"dependencies": {
"tslib": {
"version": "2.6.3",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.3.tgz",
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
}
}
},
"watchpack": { "watchpack": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz", "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz",
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
"vue-router": "3.0.5", "vue-router": "3.0.5",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
"vuex": "^3.0.1", "vuex": "^3.0.1",
"wangeditor": "4.7.15",
"webpack-theme-color-replacer": "^1.4.2", "webpack-theme-color-replacer": "^1.4.2",
"webpack5-svg-sprite-loader": "^5.1.1", "webpack5-svg-sprite-loader": "^5.1.1",
"xlsx": "^0.16.9", "xlsx": "^0.16.9",
......
...@@ -65,3 +65,39 @@ export function getBrandList(data) { ...@@ -65,3 +65,39 @@ export function getBrandList(data) {
data.method = `dj.api.smartcarlife.common.car.brand.page` data.method = `dj.api.smartcarlife.common.car.brand.page`
return request(data) return request(data)
} }
// 分页查询标签员工
export function getListLabelStaffPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.listLabelStaffPage`
return request(data)
}
// 员工群发-分页查询列表
export function contentManagerTaskPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.page`
return request(data, "POST")
}
// 员工群发-删除记录
export function deleteTaskById(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.deleteById`
return request(data, "POST")
}
// 员工群发-分页查询内容管理统计信息
export function getStatisticPage(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.statistic.page`
return request(data, "POST")
}
// 员工群发-添加/修改记录
export function insertOrUpdate(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.insertOrUpdate`
return request(data, "POST")
}
// 根据ID查询详细信息
export function contentManagerTaskById(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.getById`
return request(data, "POST")
}
...@@ -894,3 +894,17 @@ export const subBusinessList = [ ...@@ -894,3 +894,17 @@ export const subBusinessList = [
{ confId: "0", confValue: "权益" }, { confId: "0", confValue: "权益" },
{ confId: "1", confValue: "延保" } { confId: "1", confValue: "延保" }
] ]
// 内容管理-员工群发-内容类型
export const contentTypeList = [
{ confId: 1, confValue: "图文" },
{ confId: 2, confValue: "视频" },
{ confId: 3, confValue: "pdf" }
]
// 内容管理-员工群发-发送状态
export const sendStatusList = [
{ confId: 1, confValue: "草稿" },
{ confId: 2, confValue: "待发送" },
{ confId: 3, confValue: "已发送" }
]
...@@ -5,20 +5,21 @@ ...@@ -5,20 +5,21 @@
</template> </template>
<script> <script>
import E from 'wangeditor' import { uploadImg, syncUploadVideo, uploadVideo } from "@/api/sys.base"
import E from "wangeditor"
export default { export default {
name: 'TextBox', name: "TextBox",
data() { data() {
return { return {
editor: '', editor: "",
content: '', content: "",
editorOption: {} editorOption: {}
} }
}, },
props: { props: {
excludeMenus: { excludeMenus: {
type: Array, type: Array,
default: () => ['code'] default: () => ["code"]
}, },
boxHeight: { boxHeight: {
type: Number, type: Number,
...@@ -31,37 +32,41 @@ export default { ...@@ -31,37 +32,41 @@ export default {
methods: { methods: {
getEdit() { getEdit() {
const _this = this const _this = this
this.editor = new E('#div-demo') this.editor = new E("#div-demo")
this.editor.config.uploadImgShowBase64 = true this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down' this.editor.config.menuTooltipPosition = "down"
this.editor.config.height = this.boxHeight this.editor.config.height = this.boxHeight
this.editor.config.width = 500 this.editor.config.width = "500px"
this.editor.config.excludeMenus = this.excludeMenus this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.onchange = html => { this.editor.config.onchange = (html) => {
// console.log(html); // console.log(html);
this.content = html // 绑定当前逐渐地值 this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中 this.$emit("change", this.content) // 将内容同步到父组件中
} }
this.editor.config.onfocus = () => { this.editor.config.onfocus = () => {
this.$emit('focus') this.$emit("focus")
} }
// 上传图片 // 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) { this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
const limitSize = 10 const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) { if (!isLt) {
_this.$message.error('上传图片大小不能超过' + limitSize + 'MB!') _this.$message.error("上传图片大小不能超过" + limitSize + "MB!")
return true return true
} }
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = e => { reader.onload = (e) => {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1] const base64 =
_this.$apis.common.pictureUpload({ file: base64 }).then(res => { file.name.split(".")[file.name.split(".").length - 1] +
"@" +
imgFile.split(",")[1]
// _this.$apis.common.pictureUpload({ file: base64 }).then(res => {
uploadImg({ file: base64, compress: 0 }).then((res) => {
if (res) { if (res) {
// console.log(res) // console.log(res)
insertImgFn(res) insertImgFn(res)
...@@ -73,21 +78,27 @@ export default { ...@@ -73,21 +78,27 @@ export default {
} }
} }
// 上传视频 // 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) { this.editor.config.customUploadVideo = function (
resultFiles,
insertVideoFn
) {
var file = resultFiles[0] var file = resultFiles[0]
var reader = new FileReader() var reader = new FileReader()
// 默认1MB // 默认1MB
const limitSize = 10 const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) { if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!') _this.$message.error("上传视频大小不能超过" + limitSize + "MB!")
return true return true
} }
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = e => { reader.onload = (e) => {
const videoFile = e.target.result const videoFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + videoFile.split(',')[1] const base64 =
_this.$apis.common.pictureUpload({ file: base64 }).then(res => { file.name.split(".")[file.name.split(".").length - 1] +
"@" +
videoFile.split(",")[1]
_this.$apis.common.pictureUpload({ file: base64 }).then((res) => {
if (res) { if (res) {
// console.log(res) // console.log(res)
insertVideoFn(res) insertVideoFn(res)
...@@ -116,6 +127,7 @@ export default { ...@@ -116,6 +127,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
#div-demo { #div-demo {
width: 575px;
// margin: 16px 300px 0 0; // margin: 16px 300px 0 0;
} }
.el-form .editor { .el-form .editor {
......
...@@ -36,12 +36,12 @@ export const routerName = { ...@@ -36,12 +36,12 @@ export const routerName = {
} }
] ]
}, },
{ // {
authId: "90705", // authId: "90705",
parentId: "907", // parentId: "907",
category: "Button", // category: "Button",
label: "编辑单店信息" // label: "编辑单店信息"
}, // },
{ {
authId: "90706", authId: "90706",
parentId: "907", parentId: "907",
......
...@@ -106,7 +106,7 @@ export const routerName = { ...@@ -106,7 +106,7 @@ export const routerName = {
1: "停用" 1: "停用"
} }
} }
}, }
], ],
component: _import("contentManager/contentManagerList") component: _import("contentManager/contentManagerList")
}, },
...@@ -121,6 +121,7 @@ export const routerName = { ...@@ -121,6 +121,7 @@ export const routerName = {
activePath: "/contentManagerList" activePath: "/contentManagerList"
}, },
component: _import("contentManager/contentAdd") component: _import("contentManager/contentAdd")
// component: _import("contentManager/SopContentAdd")
}, },
91303: { 91303: {
path: "/contentDetail", path: "/contentDetail",
...@@ -154,5 +155,120 @@ export const routerName = { ...@@ -154,5 +155,120 @@ export const routerName = {
} }
], ],
component: _import("contentManager/statisticsList") component: _import("contentManager/statisticsList")
},
91305: {
path: "/staffMassSending",
name: "staffMassSending",
meta: {
title: "员工群发",
authId: "91305",
parentId: "913",
cache: false
},
auth: [
{
authId: "9130501",
parentId: "91305",
label: "新增群发",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "91306",
name: "内容编辑",
parentId: "91305"
}
]
},
{
authId: "9130502",
parentId: "91305",
label: "查看",
handle: "handleDetail",
addRoutePath: [
{
authId: "91307",
name: "查看",
parentId: "91305"
}
]
},
{
authId: "9130503",
parentId: "91305",
label: "编辑",
handle: "handleAdd"
},
{
authId: "9130504",
parentId: "91305",
label: "统计",
handle: "goStatisticsPage",
addRoutePath: [
{
authId: "9130506",
name: "统计",
parentId: "91305"
}
]
},
{
authId: "9130505",
parentId: "91305",
label: "删除",
handle: "handleDel"
}
],
component: _import("contentManager/staffMassSending/index")
},
9130506: {
path: "/statisticsPage",
name: "statisticsPage",
meta: {
title: "统计",
authId: "9130506",
parentId: "91305",
cache: false,
activePath: "/statisticsPage"
},
auth: [
{
authId: "913050601",
parentId: "9130506",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("contentManager/staffMassSending/statisticsPage")
},
91306: {
path: "/SopContentAdd",
name: "SopContentAdd",
meta: {
title: "内容编辑",
authId: "91306",
parentId: "91301",
cache: false,
activePath: "/staffMassSending"
},
component: _import("contentManager/SopContentAdd")
},
91307: {
path: "/sopContentDetail",
name: "sopContentDetail",
meta: {
title: "查看",
authId: "91307",
parentId: "91301",
cache: false,
activePath: "/staffMassSending"
},
component: _import("contentManager/sopContentDetail")
} }
} }
...@@ -3,27 +3,31 @@ ...@@ -3,27 +3,31 @@
<draggable <draggable
:value="imageUrlArr" :value="imageUrlArr"
@end="dragEnd" @end="dragEnd"
:disabled="!picOptions.isDrag"> :disabled="!picOptions.isDrag"
>
<transition-group class="activity-img-box"> <transition-group class="activity-img-box">
<template v-if="imageUrlArr && imageUrlArr.length > 0"> <template v-if="imageUrlArr && imageUrlArr.length > 0">
<div v-for="(item, index) in imageUrlArr" :key="index"> <div v-for="(item, index) in imageUrlArr" :key="index">
<div <div
class="pic-box" class="pic-box"
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
v-if="picOptions.type == 'video'"> v-if="picOptions.type == 'video'"
>
<video id="video" width="100%" height="100%" preload loop muted> <video id="video" width="100%" height="100%" preload loop muted>
<source :src="item" type="video/mp4" /> <source :src="item" type="video/mp4" />
</video> </video>
<div class="mask"> <div class="mask">
<div <div
class="pic-pane-close" class="pic-pane-close"
@click="handleEnlarge(item, 'video')"> @click="handleEnlarge(item, 'video')"
>
<img :src="require('@/assets/view.png')" alt="" /> <img :src="require('@/assets/view.png')" alt="" />
</div> </div>
<div <div
class="pic-pane-close" class="pic-pane-close"
@click="close('video', index)" @click="close('video', index)"
v-if="picOptions.isClose"> v-if="picOptions.isClose"
>
<img :src="require('@/assets/icon-delete.png')" alt="" /> <img :src="require('@/assets/icon-delete.png')" alt="" />
</div> </div>
</div> </div>
...@@ -31,11 +35,13 @@ ...@@ -31,11 +35,13 @@
<div <div
class="pic-box" class="pic-box"
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
v-else> v-else
>
<img class="photo-activity" :src="item" alt="" /> <img class="photo-activity" :src="item" alt="" />
<div <div
class="mask" class="mask"
:style="{ width: picOptions.width, height: picOptions.height }"> :style="{ width: picOptions.width, height: picOptions.height }"
>
<div class="pic-pane-close" @click="handleEnlarge(item, 'img')"> <div class="pic-pane-close" @click="handleEnlarge(item, 'img')">
<img :src="require('@/assets/view.png')" alt="" /> <img :src="require('@/assets/view.png')" alt="" />
</div> </div>
...@@ -54,11 +60,13 @@ ...@@ -54,11 +60,13 @@
v-if=" v-if="
(imageUrlArr && imageUrlArr.length < 10 && limit > 1) || (imageUrlArr && imageUrlArr.length < 10 && limit > 1) ||
(imageUrlArr && imageUrlArr.length == 0 && limit == 1) (imageUrlArr && imageUrlArr.length == 0 && limit == 1)
"> "
>
<div <div
class="upload-img" class="upload-img"
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
@click="selectFile()"> @click="selectFile()"
>
<i class="el-icon-plus avatar-uploader-desc-icon"></i> <i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word"> <div class="avatar-uploader-desc-word">
上传{{ picOptions.type == "video" ? "视频" : "图片" }} 上传{{ picOptions.type == "video" ? "视频" : "图片" }}
...@@ -70,16 +78,30 @@ ...@@ -70,16 +78,30 @@
:style="{ width: picOptions.width, height: picOptions.height }" :style="{ width: picOptions.width, height: picOptions.height }"
style="opacity: 0; z-index: -1" style="opacity: 0; z-index: -1"
:accept="picOptions.type == 'video' ? '.mp4' : '.jpg, .jpeg, .png,'" :accept="picOptions.type == 'video' ? '.mp4' : '.jpg, .jpeg, .png,'"
@change="(e) => handleImgChange(e)" /> @change="(e) => handleImgChange(e)"
/>
</div> </div>
</template> </template>
<el-dialog <el-dialog
class="image-dialog" class="image-dialog"
:visible.sync="dialogVisibleImg" :visible.sync="dialogVisibleImg"
:append-to-body="true" :append-to-body="true"
width="50%"> width="50%"
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" /> >
<video width="100%" autoplay controls :src="dialogSrc" v-else></video> <img
:src="dialogSrc"
class="preVideo"
width="100%"
v-if="dialogType == 'img'"
/>
<video
width="100%"
autoplay
controls
:src="dialogSrc"
v-else
class="preVideo"
></video>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -325,7 +347,7 @@ export default { ...@@ -325,7 +347,7 @@ export default {
background: rgba(0, 0, 0, 0.04); background: rgba(0, 0, 0, 0.04);
border: 1px dashed rgba(0, 0, 0, 0.15); border: 1px dashed rgba(0, 0, 0, 0.15);
border-radius: 4px; border-radius: 4px;
overflow: hidden;
input { input {
position: absolute; position: absolute;
// top: 0; // top: 0;
...@@ -347,4 +369,7 @@ export default { ...@@ -347,4 +369,7 @@ export default {
} }
} }
} }
.preVideo {
max-height: 60vh;
}
</style> </style>
<!-- 关联门店弹窗 -->
<template>
<d2-dialog
:title="title"
:is-visible.sync="relateStoreVisible"
width="50%"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateStore"
>
<slot />
<el-row class="tableCon">
<div class="tableBox">
<!-- height="300px" -->
<el-table
ref="seletingTable"
:data="selectingData"
class="table"
border
v-loading="$store.state.d2admin.loading.value"
>
<el-table-column label="序号" type="index" align="center" width="60">
<template slot-scope="scope">{{
(pageNum - 1) * pageSize + scope.$index + 1
}}</template>
</el-table-column>
<!-- @select="handleChange"
@select-all="handleAll" -->
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column> -->
<el-table-column prop="staffName" label="员工名称" align="center">
</el-table-column>
<el-table-column prop="phoneNumber" label="手机号" align="center">
</el-table-column>
</el-table>
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page.sync="pageNum"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
/>
</div>
</el-row>
</d2-dialog>
</template>
<script>
export default {
name: "SelectEmployees",
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
pageNum: 1,
pageSize: 10
}
},
props: {
title: {
type: String,
default: "驻店员工"
},
relateStoreVisible: {
type: Boolean,
default: false
},
storeApi: {
type: Function,
default: () => {}
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => {}
},
merchantIds: {
type: Array,
default: () => []
}
},
mounted() {
this.selectedData = this.storeSelected
this.getSelectingList()
console.log(this.selectedData, "---------")
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.staffUuid)
this.selectingData.forEach((item) => {
exitIds.includes(item.staffUuid) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
const _storeSearchForm = this.storeSearchForm
// 会员权益/积分商城获取账户中心所有门店 接口不同 接口新增查询参数merchantName 不需单独处理
// if ([0, 4].includes(this.selectedScene)) {
// // 会员权益,积分商城场景查询门店名称参数
// _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件
// }
console.log(this.storeSearchForm, "this.storeSearchForm")
this.storeSearchForm.labelInfoList.length &&
this.storeApi({
...this.storeSearchForm,
pageNum: this.pageNum,
pageSize: this.pageSize
// merchantNoList: this.merchantIds
}).then((res) => {
// res?.forEach((val) => {
// 账户中心门店返回商户号字段是merchantNo
// if (val.merchantNo) val.merchantId = Number(val.merchantNo)
// val?.sceneList?.forEach((subVal) => {
// if (subVal.scene == this.selectedScene) {
// val.yqMerchantId = subVal?.yqMerchant?.merchantId || "-"
// val.yqMerchantName = subVal?.yqMerchant?.merchantName || "-"
// }
// })
// })
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.staffUuid === row.staffUuid
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.staffUuid === item.staffUuid
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
)
const obj = this.selectingData.find((v) => v.staffUuid == row.staffUuid)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.pageNum = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
handleRelateStoreClose() {
this.$emit("handleRelateStoreClose")
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
...@@ -6,14 +6,18 @@ ...@@ -6,14 +6,18 @@
size="small" size="small"
icon="el-icon-puls" icon="el-icon-puls"
key="btn-i" key="btn-i"
@click="selectFile()">上传文件</el-button> :disabled="imageUrlArr.length"
@click="selectFile()"
>上传文件</el-button
>
<input <input
type="file" type="file"
ref="uploadImgRef" ref="uploadImgRef"
class="upload-img" class="upload-img"
style="opacity: 0; z-index: -1" style="opacity: 0; z-index: -1"
accept=".pdf" accept=".pdf"
@change="(e) => handleImgChange(e)" /> @change="(e) => handleImgChange(e)"
/>
</div> </div>
<template v-if="imageUrlArr && imageUrlArr.length > 0"> <template v-if="imageUrlArr && imageUrlArr.length > 0">
<div class="file-wrap" v-for="(item, index) in imageUrlArr" :key="index"> <div class="file-wrap" v-for="(item, index) in imageUrlArr" :key="index">
...@@ -26,14 +30,16 @@ ...@@ -26,14 +30,16 @@
class="process" class="process"
:style="{ :style="{
width: item.image ? '432px' : (compress * 432) / 100 + 'px' width: item.image ? '432px' : (compress * 432) / 100 + 'px'
}"></div> }"
></div>
</div> </div>
<img <img
v-if="item.image" v-if="item.image"
class="del-btn" class="del-btn"
:src="require('@/assets/icon-delete.png')" :src="require('@/assets/icon-delete.png')"
alt="" alt=""
@click="delFile(index)" /> @click="delFile(index)"
/>
</div> </div>
</template> </template>
</div> </div>
......
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
<el-image <el-image
v-if="orderInfo[item.prop]" v-if="orderInfo[item.prop]"
style="width: 88px; height: 88px" style="width: 88px; height: 88px"
:src="orderInfo[item.prop]" :src="orderInfo[item.prop] || ''"
:preview-src-list="[orderInfo[item.prop]]"> :preview-src-list="[orderInfo[item.prop]]"
>
</el-image> </el-image>
<span v-else>--</span> <span v-else>--</span>
</div> </div>
...@@ -25,7 +26,8 @@ ...@@ -25,7 +26,8 @@
<div <div
v-for="(i, idx) in orderInfo[item.prop]" v-for="(i, idx) in orderInfo[item.prop]"
:key="idx" :key="idx"
class="img-box mar"> class="img-box mar"
>
<!-- <el-image <!-- <el-image
v-if="orderInfo.type == 0" v-if="orderInfo.type == 0"
style="width: 88px; height: 88px" style="width: 88px; height: 88px"
...@@ -37,7 +39,8 @@ ...@@ -37,7 +39,8 @@
@click="showMiniView" @click="showMiniView"
:src="i" :src="i"
style="width: 88px; height: 88px; cursor: pointer" style="width: 88px; height: 88px; cursor: pointer"
v-if="orderInfo.type == 0" /> v-if="orderInfo.type == 0"
/>
<video <video
controls controls
style=" style="
...@@ -47,7 +50,8 @@ ...@@ -47,7 +50,8 @@
border-radius: 4px; border-radius: 4px;
" "
v-else-if="orderInfo.type == 1" v-else-if="orderInfo.type == 1"
:src="i"></video> :src="i"
></video>
<div v-if="orderInfo.type == 2" class="file-box"> <div v-if="orderInfo.type == 2" class="file-box">
<div @click="toOpenPDF(i)" class="file-box-inner"> <div @click="toOpenPDF(i)" class="file-box-inner">
<img class="icon" src="../../assets/pdf.png" /> <img class="icon" src="../../assets/pdf.png" />
...@@ -91,21 +95,25 @@ ...@@ -91,21 +95,25 @@
}" }"
:row-style="{ height: '48px' }" :row-style="{ height: '48px' }"
style="width: 100%" style="width: 100%"
:height="orderInfo[item.prop].length > 10 ? '350' : ''"> :height="orderInfo[item.prop].length > 10 ? '350' : ''"
>
<el-table-column <el-table-column
type="index" type="index"
align="center" align="center"
width="80" width="80"
label="序号"></el-table-column> label="序号"
></el-table-column>
<el-table-column <el-table-column
prop="assignName" prop="assignName"
align="center" align="center"
:label="orderInfo.showMerchant == 1 ? '品牌名称' : '园区店名称'" /> :label="orderInfo.showMerchant == 1 ? '品牌名称' : '园区店名称'"
/>
<el-table-column <el-table-column
v-if="orderInfo.showMerchant == 2" v-if="orderInfo.showMerchant == 2"
prop="assignId" prop="assignId"
align="center" align="center"
label="园区店号" /> label="园区店号"
/>
</el-table> </el-table>
</div> </div>
</div> </div>
...@@ -116,7 +124,8 @@ ...@@ -116,7 +124,8 @@
:visible="showImageView" :visible="showImageView"
:list="orderInfo.contentList" :list="orderInfo.contentList"
:title="orderInfo.title" :title="orderInfo.title"
@closeDialog="closeDialog"></previewEffectDialog> @closeDialog="closeDialog"
></previewEffectDialog>
</d2-container> </d2-container>
</template> </template>
......
<!-- 员工群发 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span>
<span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span>
<span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
<!-- 新增提现 -->
<!-- <add-dialog :add-visible="addVisible"
v-if="addVisible"
@dialogClose="addDialogClose" /> -->
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex"
import { contentTypeList, sendStatusList } from "@/common/constants.js"
// import { rewithdraw } from '@api/withdrawalManage'
import { contentManagerTaskPage, deleteTaskById } from "@api/contentManager"
// import addDialog from './components/addDialog'
export default {
name: "StaffMassSendingIndex",
components: {
// addDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: "100px",
searchForm: {
title: "",
contentType: "",
sendStatus: ""
},
searchFormSearch: {},
showFormData: [
{
label: "标题",
name: "title",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "类型",
name: "contentType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "contentTypeList"
},
{
label: "状态",
name: "sendStatus",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "sendStatusList"
}
],
getListApi: contentManagerTaskPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [
{
label: "标题",
prop: "title"
// width: '200px'
},
{
label: "类型",
prop: "contentType",
width: "100px",
formatter: (cellValue) => {
return this.baseData.contentTypeList.find(
(item) => item.confId === cellValue.contentType
)?.confValue
}
},
{
label: "发送时间",
prop: "sendTime",
width: "150px",
formatter: (cellValue) => {
if (cellValue.sendType == 1) {
// 发送方式(1.即时推送,2:定时推送)
return "立即发送"
} else {
return cellValue.sendTime
? Util.dateFormate(cellValue.sendTime, "YYYY-MM-DD HH:mm:ss")
: "--"
}
}
},
{
label: "发送员工",
prop: "sendTotal",
width: "100px"
},
{
label: "状态",
prop: "sendStatus",
width: "100px",
formatter: (cellValue) => {
return this.baseData.sendStatusList.find(
(item) => item.confId === cellValue.sendStatus
)?.confValue
}
},
{
label: "创建时间",
prop: "createdDate",
width: "150px",
formatter: (cellValue) => {
return cellValue.createdDate
? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss")
: "--"
}
}
]
},
baseData: {
contentTypeList: deepClone(contentTypeList),
sendStatusList: deepClone(sendStatusList)
},
infos: [],
recordInfo: null,
addVisible: false
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
title: "",
contentType: "",
sendStatus: ""
}
this.$refs.recordTable.refreshTable(false, true)
},
handleAdd(scope) {
console.log(scope)
// this.addVisible = !this.addVisible
if (scope) {
this.$router.push({
name: "SopContentAdd",
query: {
id: scope.id
}
})
} else {
this.$router.push({ name: "SopContentAdd" })
}
},
handleDetail(row) {
this.$router.push({
name: "sopContentDetail",
query: {
id: row.id
}
})
},
addDialogClose(obj) {
this[obj.attrName] = !this[obj.attrName]
if (obj.flag) {
this.$refs.recordTable.refreshTable()
}
},
// 删除
handleDel(row) {
this.$confirm("删除后不可恢复,是否确定删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
})
.then(() => {
deleteTaskById({ id: row.id }).then((res) => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
})
.catch((err) => {
console.log(err)
})
},
goStatisticsPage(row) {
this.$router.push({
name: "statisticsPage",
query: {
id: row.id,
title: row.title
}
})
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
<!-- 员工群发 - 统计列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header"
slot="header"
style="padding: 10px 20px">
<div class="header-bar">
<h3>{{ title }}</h3>
<div class="btn">
<el-button size="small"
@click="handleRecord"> 返回 </el-button>
</div>
</div>
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset"> 重置 </el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex"
import { getStatisticPage } from "@api/contentManager"
export default {
name: "StatisticPage",
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: "100px",
searchForm: {
staffName: "",
phoneNumber: "",
lookDate: ""
},
searchFormSearch: {},
showFormData: [
{
label: "员工姓名",
name: "staffName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "手机号",
name: "phoneNumber",
type: "input",
inputType: "number",
maxlength: "11",
isClear: true
},
{
label: "查看时间",
name: "lookDate",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
],
getListApi: getStatisticPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "员工姓名",
prop: "staffName"
// width: '200px'
},
{
label: "员工手机号",
prop: "phoneNumber"
// width: '150px'
},
{
label: "发送时间",
prop: "sendTime",
// width: '150px',
formatter: (cellValue) => {
return cellValue.sendTime
? Util.dateFormate(cellValue.sendTime, "YYYY-MM-DD HH:mm:ss")
: "--"
}
},
{
label: "首次查看时间",
prop: "firstViewTime",
// width: '150px',
formatter: (cellValue) => {
return cellValue.firstViewTime
? Util.dateFormate(
cellValue.firstViewTime,
"YYYY-MM-DD HH:mm:ss"
)
: "--"
}
},
{
label: "总浏览时长",
prop: "totalViewTime",
formatter: (cellValue) => {
return cellValue.totalViewTime ? cellValue.totalViewTime + "s" : '--'
}
}
]
},
baseData: {},
title: ""
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.title = this.$route.query.title
this.getBaseData()
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.lookDate) {
this.searchFormSearch.startDate = Util.dateFormate(
this.searchFormSearch.lookDate[0],
"YYYY-MM-DD"
)
this.searchFormSearch.endDate = Util.dateFormate(
this.searchFormSearch.lookDate[1],
"YYYY-MM-DD"
)
delete this.searchFormSearch.lookDate
}
this.searchFormSearch.taskId = this.$route.query.id
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
staffName: "",
phoneNumber: "",
lookDate: ""
}
this.$refs.recordTable.refreshTable(false, true)
},
handleExport() {
var params = this.searchFormSearch
// 去除为null的值
for (const key in params) {
if (
params[key] === null ||
params[key] === "" ||
params[key].length == 0
) {
delete params[key]
}
}
// 内容管理统计信息导出
params.method =
"dj.api.smartcarlife.contentManagerTask.statistic.export.async"
const list = [
...this.dowloadList,
{
name: "统计信息",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
handleRecord() {
this.$router.push({ name: "staffMassSending" })
}
}
}
</script>
<style scoped lang="scss">
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.header-bar {
display: flex;
align-items: center;
.btn {
margin-left: 15px;
}
}
</style>
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
</el-table-column> </el-table-column>
<el-table-column prop="outputValue" label="区域督导" width="150"> <el-table-column prop="outputValue" label="区域督导" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- multiple -->
<el-select clearable filterable value-key="userId" v-model="scope.row['areaSupervision']" class="select" <el-select clearable filterable value-key="userId" v-model="scope.row['areaSupervision']" class="select"
collapse-tags placeholder="请选择"> collapse-tags placeholder="请选择">
<el-option v-for="item in supervisionOptionsList" :key="item.userId" :label="item.userName" <el-option v-for="item in supervisionOptionsList" :key="item.userId" :label="item.userName"
......
...@@ -30,9 +30,8 @@ ...@@ -30,9 +30,8 @@
<auth-button category="Button" :show-btn-ids="['90706']" /> <auth-button category="Button" :show-btn-ids="['90706']" />
</div> </div>
<div class="inputTargetBtn"> <div class="inputTargetBtn">
<div @click="goCheck" v-if="checkBtnFlag" <div @click="goCheck" v-if="checkBtnFlag"><i class="el-icon-chat-round"></i>查看企微推送对象</div>
style="margin-right: 32px;"><i class="el-icon-chat-round"></i>查看企微推送对象</div> <!-- <div @click="outputVisible = true" v-if="editBtnFlag"><i class="el-icon-edit"></i>编辑单店信息</div> -->
<div @click="outputVisible = true" v-if="editBtnFlag"><i class="el-icon-edit"></i>编辑单店信息</div>
</div> </div>
</div> </div>
</el-card> </el-card>
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
btn-ok-label="确定" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose" @closeDialog="handleRelateStoreClose"
class="relateStore"> class="relateStore"
>
<slot /> <slot />
<el-row class="tableCon"> <el-row class="tableCon">
<div class="tableBox"> <div class="tableBox">
...@@ -17,8 +18,10 @@ ...@@ -17,8 +18,10 @@
height="464px" height="464px"
class="table" class="table"
border border
v-loading="$store.state.d2admin.loading.value"
@select="handleChange" @select="handleChange"
@select-all="handleAll"> @select-all="handleAll"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="merchantName" label="门店名称" align="center"> <el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column> </el-table-column>
...@@ -34,13 +37,16 @@ ...@@ -34,13 +37,16 @@
:current-page.sync="pageNum" :current-page.sync="pageNum"
:page-size="pageSize" :page-size="pageSize"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" /> :total="total"
/>
</div> </div>
<el-table <el-table
class="tableBox table" class="tableBox table"
:data="selectedData" :data="selectedData"
v-loading="loading"
border border
height="464px"> height="464px"
>
<el-table-column prop="merchantName" label="门店名称" align="center"> <el-table-column prop="merchantName" label="门店名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span> <span>{{ scope.row.merchantName }}</span>
...@@ -61,7 +67,8 @@ ...@@ -61,7 +67,8 @@
<el-button <el-button
class="el-icon-delete" class="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
type="text" /> type="text"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -113,7 +120,7 @@ export default { ...@@ -113,7 +120,7 @@ export default {
mounted() { mounted() {
this.selectedData = this.storeSelected this.selectedData = this.storeSelected
this.getSelectingList() this.getSelectingList()
console.log(this.selectedData, '---------') console.log(this.selectedData, "---------")
}, },
methods: { methods: {
......
...@@ -259,7 +259,12 @@ export default { ...@@ -259,7 +259,12 @@ export default {
}, },
{ {
label: "区域督导", label: "区域督导",
prop: "areaSupervision" prop: "areaSupervisionList",
width: "200px",
formatter: (cellValue) => {
let areaSuper = (cellValue.areaSupervisionList && cellValue.areaSupervisionList.length) ? cellValue.areaSupervisionList.map(item => item.userName).join('/') : '-'
return areaSuper
}
}, },
{ {
label: "门店标签", label: "门店标签",
......
...@@ -69,18 +69,18 @@ ...@@ -69,18 +69,18 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="设置区域督导:" <el-form-item label="设置区域督导:"
prop="areaSupervision"> prop="areaSupervisionList">
<el-select clearable <el-select clearable
multiple
filterable filterable
value-key="userId" value-key="userId"
v-model="form.areaSupervision" v-model="form.areaSupervisionList"
collapse-tags
class="el_select itd" class="el_select itd"
placeholder="请选择"> placeholder="请选择">
<el-option v-for="item in supervisionOptionsList" <el-option v-for="item in supervisionOptionsList"
:key="item.userId" :key="item.userId"
:label="item.userName" :label="item.userName"
:value="item"> :value="item.userId">
</el-option> </el-option>
</el-select> </el-select>
<span class="item-tips">注:区域督导在账户中心创建广联数科员工,角色类型选区域督导</span> <span class="item-tips">注:区域督导在账户中心创建广联数科员工,角色类型选区域督导</span>
...@@ -104,8 +104,9 @@ ...@@ -104,8 +104,9 @@
</el-form-item> </el-form-item>
<el-form-item label="1.1服务商负责人:" <el-form-item label="1.1服务商负责人:"
prop="boutiqueServiceDirectorUserId"> prop="boutiqueServiceDirectorUserId">
<el-select v-model="form.shopMerchantConfig.boutiqueServiceDirectorUserId" <el-select v-model="directorList[2]"
clearable clearable
multiple
filterable filterable
value-key="userId" value-key="userId"
placeholder="请选择" placeholder="请选择"
...@@ -119,8 +120,9 @@ ...@@ -119,8 +120,9 @@
</el-form-item> </el-form-item>
<el-form-item label="2.1服务商负责人:" <el-form-item label="2.1服务商负责人:"
prop="quotationServiceDirectorUserId"> prop="quotationServiceDirectorUserId">
<el-select v-model="form.shopMerchantConfig.quotationServiceDirectorUserId" <el-select v-model="directorList[4]"
clearable clearable
multiple
filterable filterable
value-key="userId" value-key="userId"
placeholder="请选择" placeholder="请选择"
...@@ -134,8 +136,9 @@ ...@@ -134,8 +136,9 @@
</el-form-item> </el-form-item>
<el-form-item label="1.1业务负责人:" <el-form-item label="1.1业务负责人:"
prop="boutiqueDirectorUserId"> prop="boutiqueDirectorUserId">
<el-select v-model="form.shopMerchantConfig.boutiqueDirectorUserId" <el-select v-model="directorList[1]"
clearable clearable
multiple
filterable filterable
value-key="userId" value-key="userId"
placeholder="请选择" placeholder="请选择"
...@@ -149,8 +152,9 @@ ...@@ -149,8 +152,9 @@
</el-form-item> </el-form-item>
<el-form-item label="2.1业务负责人:" <el-form-item label="2.1业务负责人:"
prop="quotationDirectorUserId"> prop="quotationDirectorUserId">
<el-select v-model="form.shopMerchantConfig.quotationDirectorUserId" <el-select v-model="directorList[3]"
clearable clearable
multiple
filterable filterable
value-key="userId" value-key="userId"
placeholder="请选择" placeholder="请选择"
...@@ -319,12 +323,12 @@ export default { ...@@ -319,12 +323,12 @@ export default {
businessType: '', businessType: '',
list: [], list: [],
deployScene: [], deployScene: [],
areaSupervision: {}, areaSupervisionList: [],
residentManager: {}, residentManager: {},
currentMonthOutputValue: '', currentMonthOutputValue: '',
nextMonthOutputValue: '', nextMonthOutputValue: '',
serviceMerchantServiceChargeConfig: {}, serviceMerchantServiceChargeConfig: {},
shopMerchantConfig: {} shopMerchantConfig: {},
// boutiqueSunshineInspiration: '', // boutiqueSunshineInspiration: '',
// quotationSunshineInspiration: '', // quotationSunshineInspiration: '',
// boutiqueMarketInspiration: '', // boutiqueMarketInspiration: '',
...@@ -332,6 +336,12 @@ export default { ...@@ -332,6 +336,12 @@ export default {
// boutiqueDirectorUserId: '', // boutiqueDirectorUserId: '',
// quotationDirectorUserId: '' // quotationDirectorUserId: ''
}, },
directorList: {
1: [],
2: [],
3: [],
4: []
},
outputValueListByYear: [], outputValueListByYear: [],
year: '', year: '',
nowYear: null, nowYear: null,
...@@ -407,6 +417,16 @@ export default { ...@@ -407,6 +417,16 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getShopSetting({ merchantId }).then(res => { getShopSetting({ merchantId }).then(res => {
// this.setInfo = res // this.setInfo = res
let areaSupervisionList = []
res.areaSupervisionList?.forEach(item => {
const target = this.supervisionOptionsList.find(ele => ele.userId == item.userId)
if(target) areaSupervisionList.push(item.userId)
})
res.areaSupervisionList = areaSupervisionList
res.shopMerchantConfig?.directorList?.forEach(item => {
const target = this[(item.directorType==4 || item.directorType == 2) ? 'serviceBossList' : 'sellerMerchantStaffList']?.find(ele => ele.userId == item.directorUserId)
if(target) this.directorList[item.directorType].push(item.directorUserId)
})
this.form = deepClone(res) this.form = deepClone(res)
if (!this.form.serviceMerchantServiceChargeConfig) { if (!this.form.serviceMerchantServiceChargeConfig) {
// 未设置过时,手续费默认为打开并且费率为2 // 未设置过时,手续费默认为打开并且费率为2
...@@ -438,12 +458,12 @@ export default { ...@@ -438,12 +458,12 @@ export default {
checkSelectOption() { checkSelectOption() {
let _form = this.form let _form = this.form
let selectItemKey = [ let selectItemKey = [
{ item: 'areaSupervision', optionsList: 'supervisionOptionsList', key: 'userId'}, // { item: 'areaSupervision', optionsList: 'supervisionOptionsList', key: 'userId'},
{ item: 'residentManager', optionsList: 'residentManagerOptionsList', key: 'userId'}, { item: 'residentManager', optionsList: 'residentManagerOptionsList', key: 'userId'},
{ item: 'boutiqueServiceDirectorUserId', optionsList: 'serviceBossList' }, // { item: 'boutiqueServiceDirectorUserId', optionsList: 'serviceBossList' },
{ item: 'quotationServiceDirectorUserId', optionsList: 'serviceBossList' }, // { item: 'quotationServiceDirectorUserId', optionsList: 'serviceBossList' },
{ item: 'boutiqueDirectorUserId', optionsList: 'sellerMerchantStaffList' }, // { item: 'boutiqueDirectorUserId', optionsList: 'sellerMerchantStaffList' },
{ item: 'quotationDirectorUserId', optionsList: 'sellerMerchantStaffList' } // { item: 'quotationDirectorUserId', optionsList: 'sellerMerchantStaffList' }
] ]
selectItemKey.map(val => { selectItemKey.map(val => {
if (typeof _form[val.item] == 'object') { if (typeof _form[val.item] == 'object') {
...@@ -630,15 +650,18 @@ export default { ...@@ -630,15 +650,18 @@ export default {
}) })
_params.list = list _params.list = list
} }
if (!_params.areaSupervision) { if(_params.areaSupervisionList?.length){
_params.areaSupervision = {} _params.areaSupervisionList = _params.areaSupervisionList.map(item=>{
} else { let target = this.supervisionOptionsList.find(ele => ele.userId == item)
_params.areaSupervision = { return {
userId: _params.areaSupervision.userId, userId: target?.userId,
userType: _params.areaSupervision.userType, userType: target?.userType,
userName: _params.areaSupervision.userName, userName: target?.userName,
userNum: _params.areaSupervision.userNum userNum: target?.userNum
} }
})
}else{
_params.areaSupervisionList = []
} }
if (!_params.residentManager) { if (!_params.residentManager) {
_params.residentManager = {} _params.residentManager = {}
...@@ -679,24 +702,37 @@ export default { ...@@ -679,24 +702,37 @@ export default {
} }
} }
const shopMerchantConfig = _params.shopMerchantConfig const shopMerchantConfig = _params.shopMerchantConfig
_params.boutiqueDirectorUserId = shopMerchantConfig.boutiqueDirectorUserId // _params.boutiqueDirectorUserId = shopMerchantConfig.boutiqueDirectorUserId
if (shopMerchantConfig.boutiqueDirectorUserId) { // if (shopMerchantConfig.boutiqueDirectorUserId) {
_params.boutiqueDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.boutiqueDirectorUserId)?.userName // _params.boutiqueDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.boutiqueDirectorUserId)?.userName
} // }
_params.quotationDirectorUserId = shopMerchantConfig.quotationDirectorUserId // _params.quotationDirectorUserId = shopMerchantConfig.quotationDirectorUserId
if (shopMerchantConfig.quotationDirectorUserId) { // if (shopMerchantConfig.quotationDirectorUserId) {
_params.quotationDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.quotationDirectorUserId)?.userName // _params.quotationDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.quotationDirectorUserId)?.userName
} // }
// 1.1服务商负责人 // // 1.1服务商负责人
_params.boutiqueServiceDirectorUserId = shopMerchantConfig.boutiqueServiceDirectorUserId // _params.boutiqueServiceDirectorUserId = shopMerchantConfig.boutiqueServiceDirectorUserId
if (shopMerchantConfig.boutiqueServiceDirectorUserId) { // if (shopMerchantConfig.boutiqueServiceDirectorUserId) {
_params.boutiqueServiceDirectorName = this.serviceBossList.find(item => item.userId === shopMerchantConfig.boutiqueServiceDirectorUserId)?.userName // _params.boutiqueServiceDirectorName = this.serviceBossList.find(item => item.userId === shopMerchantConfig.boutiqueServiceDirectorUserId)?.userName
} // }
// 2.1服务商负责人 // // 2.1服务商负责人
_params.quotationServiceDirectorUserId = shopMerchantConfig.quotationServiceDirectorUserId // _params.quotationServiceDirectorUserId = shopMerchantConfig.quotationServiceDirectorUserId
if (shopMerchantConfig.quotationServiceDirectorUserId) { // if (shopMerchantConfig.quotationServiceDirectorUserId) {
_params.quotationServiceDirectorName = this.serviceBossList.find(item => item.userId === shopMerchantConfig.quotationServiceDirectorUserId)?.userName // _params.quotationServiceDirectorName = this.serviceBossList.find(item => item.userId === shopMerchantConfig.quotationServiceDirectorUserId)?.userName
// }
// 1.精品升级业务负责人,2.精品升级业务服务商负责人,3.会员权益业务负责人,4.会员权益业务服务商负责人)
let directorList = []
for(let key in this.directorList) {
this.directorList[key]?.forEach(item => {
const target = this[(key==4 || key == 2) ? 'serviceBossList' : 'sellerMerchantStaffList']?.find(ele => ele.userId == item)
directorList.push({
directorUserId : target?.userId,
directorType: key,
directorName: target?.userName,
})
})
} }
_params.directorList = directorList
_params.boutiqueSunshineInspiration = shopMerchantConfig.boutiqueSunshineInspiration _params.boutiqueSunshineInspiration = shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration = shopMerchantConfig.quotationSunshineInspiration _params.quotationSunshineInspiration = shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration = shopMerchantConfig.boutiqueMarketInspiration _params.boutiqueMarketInspiration = shopMerchantConfig.boutiqueMarketInspiration
......
...@@ -961,6 +961,21 @@ ...@@ -961,6 +961,21 @@
resolved "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" resolved "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
"@babel/runtime-corejs3@^7.11.2":
version "7.24.8"
resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.8.tgz#c0ae5a1c380f8442920866d0cc51de8024507e28"
integrity sha512-DXG/BhegtMHhnN7YPIvxWd303/9aXvYFD1TjNL3CD6tUrhI2LVsg3Lck0aql5TRH29n4sj3emcROypkZVUfSuA==
dependencies:
core-js-pure "^3.30.2"
regenerator-runtime "^0.14.0"
"@babel/runtime@^7.11.2":
version "7.24.8"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.8.tgz#5d958c3827b13cc6d05e038c07fb2e5e3420d82e"
integrity sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==
dependencies:
regenerator-runtime "^0.14.0"
"@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.8.4": "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.8.4":
version "7.21.0" version "7.21.0"
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673"
...@@ -3727,6 +3742,11 @@ core-js-compat@^3.25.1, core-js-compat@^3.8.3: ...@@ -3727,6 +3742,11 @@ core-js-compat@^3.25.1, core-js-compat@^3.8.3:
dependencies: dependencies:
browserslist "^4.21.5" browserslist "^4.21.5"
core-js-pure@^3.30.2:
version "3.37.1"
resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.37.1.tgz#2b4b34281f54db06c9a9a5bd60105046900553bd"
integrity sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA==
core-js@^2.4.0: core-js@^2.4.0:
version "2.6.12" version "2.6.12"
resolved "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" resolved "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
...@@ -9144,6 +9164,11 @@ regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.7: ...@@ -9144,6 +9164,11 @@ regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.7:
resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" resolved "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
regenerator-runtime@^0.14.0:
version "0.14.1"
resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
regenerator-transform@^0.15.1: regenerator-transform@^0.15.1:
version "0.15.1" version "0.15.1"
resolved "https://registry.npmmirror.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" resolved "https://registry.npmmirror.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56"
...@@ -10457,6 +10482,11 @@ tslib@^2.0.3: ...@@ -10457,6 +10482,11 @@ tslib@^2.0.3:
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" resolved "https://registry.npmmirror.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
tslib@^2.1.0:
version "2.6.3"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
type-check@^0.4.0, type-check@~0.4.0: type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" resolved "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
...@@ -10843,6 +10873,15 @@ walker@^1.0.7: ...@@ -10843,6 +10873,15 @@ walker@^1.0.7:
dependencies: dependencies:
makeerror "1.0.12" makeerror "1.0.12"
wangeditor@4.7.15:
version "4.7.15"
resolved "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.15.tgz#38c5e279a79d0428e4fd77ae5be46367e9c819e5"
integrity sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==
dependencies:
"@babel/runtime" "^7.11.2"
"@babel/runtime-corejs3" "^7.11.2"
tslib "^2.1.0"
watchpack@^2.4.0: watchpack@^2.4.0:
version "2.4.0" version "2.4.0"
resolved "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" resolved "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!