Commit 35a2c0d5 by xinla

Merge branch 'vue3-master' into xxj-23.10.16-新老客拉群优化-open

2 parents fbb40b5c 5c5e4a08
# 更新日志
## v5.11.0
2023.10.26
1. 新增 pc 端企微配置-默认欢迎语配置
2. 修复 智能表单 填写页面中级联选择的宽度超出滚动问题
3. 其他已知 bug 修复和组件优化
## v5.10.2
2023.10.16
1. 修复 阿里云上传配置问题
2. 修复 智能表单二维码下载问题
3. 修复 表单默认提交行为问题
4. 修复 登录重定向问题
5. 修复 名称查询人员问题
6. 修复 短链详情回显问题
7. 修复 企微配置异步偶发的不回显问题
8. 修改 智能短链小程序路径规则问题
9. 优化 智能短链
10. 优化 组织架构接口
11. 优化 主题色暗黑色阶
12. 优化 企微配置和外链校验
13. 优化 线索公海 tab 超出样式
14. 删除 商城小程序配置
15. 其他已知 bug 修复和组件优化
## v5.10.1
2023.10.09
......
......@@ -8,7 +8,7 @@ const service = window.lwConfig.services.wecom + '/corp'
export function getList(params) {
return request({
url: service + '/list',
params,
params
})
}
......@@ -30,7 +30,7 @@ export function add(data) {
return request({
url: service,
method: 'post',
data,
data
})
}
/**
......@@ -56,7 +56,7 @@ export function update(data) {
return request({
url: service,
method: 'put',
data,
data
})
}
......@@ -67,14 +67,14 @@ export function update(data) {
export function start(corpId) {
return request({
url: service + '/startVailWeCorpAccount/' + corpId,
method: 'put',
method: 'put'
})
}
// 获取当前企业相关参数
export function getDetail() {
return request({
url: service + '/findCurrentCorpAccount',
url: service + '/findCurrentCorpAccount'
})
}
......@@ -83,6 +83,22 @@ export function addOrUpdate(data) {
return request({
url: service + '/addOrUpdate',
method: 'post',
data,
data
})
}
// 获取欢迎语配置
export function getWecomeTemplate() {
return request({
url: service + '/findDefaultWelcomeMsg'
})
}
// 保存欢迎语配置
export function setWecomeTemplate(data) {
return request({
url: service + '/editWelComeMsg',
method: 'post',
data
})
}
<template>
<div
:style="
Ifcontainer
? 'height: 100%;'
: 'background:#666;display: flex;justify-content: center;height: 100%;padding: 30px;'
">
<div :style="Ifcontainer ? 'height: 100%;' : 'background:#666;display: flex;justify-content: center;height: 100%;'">
<div
:class="Ifcontainer ? 'container' : 'container containerPC'"
data-title="调查问卷"
......@@ -907,7 +902,7 @@ export default {
background: var(--bg-white);
}
.containerPC {
max-width: 350px;
max-width: 370px;
}
.formDetailPush {
......@@ -940,3 +935,10 @@ export default {
padding: 0 0 5px 0 !important;
}
</style>
<style>
/* 级联选择,宽度超出滚动 */
.el-cascader__dropdown {
max-width: 100vw;
overflow: auto;
}
</style>
......@@ -2,7 +2,13 @@
<div>
<el-tabs v-model="active">
<el-tab-pane v-for="(item, key) in tabs" :key="key" :label="item" :name="key">
<component :is="'part' + key" :ref="'part' + key" @submit="savePart" :data="form"></component>
<component
:is="'part' + key"
:ref="'part' + key"
@submit="savePart"
:data="form"
:initData="welcome"
></component>
</el-tab-pane>
</el-tabs>
<div class="g-footer-sticky">
......@@ -11,77 +17,61 @@
</div>
</template>
<script>
import * as api from '@/api/enterpriseId'
import part1 from './part1.vue'
import part2 from './part2.vue'
import part3 from './part3.vue'
import part4 from './part4.vue'
import part5 from './part5.vue'
import part6 from './part6.vue'
import part7 from './part7.vue'
export default {
components: {
part1,
part2,
part3,
part4,
part5,
part6,
part7,
},
props: {},
data() {
return {
active: this.$route.query.index || '1',
tabs: {
1: '基础配置',
2: '应用配置',
3: '客服配置',
4: '支付配置',
5: '公众号配置',
6: '直播配置',
7: '小程序配置',
},
form: {},
loading: false,
}
},
watch: {},
computed: {},
created() {
this.getDetail()
},
mounted() {},
methods: {
savePart(data) {
api
.addOrUpdate(data)
.then(() => {
this.msgSuccess('操作成功')
// this.dialogVisible = false
this.getDetail()
})
.catch(() => {
// this.dialogVisible = false
})
import * as api from '@/api/enterpriseId'
import part1 from './part1.vue'
import part2 from './part2.vue'
import part3 from './part3.vue'
import part4 from './part4.vue'
import part5 from './part5.vue'
import part6 from './part6.vue'
import part7 from './part7.vue'
import part8 from './part8.vue'
export default {
components: {
part1,
part2,
part3,
part4,
part5,
part6,
part7,
part8
},
getDetail() {
this.loading = true
api
.getDetail()
.then(({ data }) => {
this.form = data
this.loading = false
})
.catch(() => {
this.loading = false
})
props: {},
data() {
return {
active: this.$route.query.index || '1',
tabs: {
1: '基础配置',
2: '应用配置',
3: '客服配置',
4: '支付配置',
5: '公众号配置',
6: '直播配置',
7: '小程序配置',
8: '欢迎语配置'
},
form: {},
loading: false,
welcome: []
}
},
watch: {},
computed: {},
created() {
this.getDetail()
},
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
mounted() {},
methods: {
savePart(data) {
if (this.active == 8) {
api.setWecomeTemplate(data).then(() => {
this.msgSuccess('操作成功')
this.getDetail()
})
} else {
api
.addOrUpdate(this.form)
.addOrUpdate(data)
.then(() => {
this.msgSuccess('操作成功')
// this.dialogVisible = false
......@@ -91,21 +81,58 @@ export default {
// this.dialogVisible = false
})
}
})
},
// start(corpId) {
// api.start(corpId).then(({ rows, total }) => {
// this.msgSuccess('操作成功')
// this.getList()
// })
// },
},
}
},
getDetail() {
this.loading = true
api
.getDetail()
.then(({ data }) => {
this.form = data
this.loading = false
})
.catch(() => {
this.loading = false
})
api.getWecomeTemplate().then(({ data }) => {
this.welcome = data
})
},
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.active == 8) {
api.setWecomeTemplate(this.welcome).then(() => {
this.msgSuccess('操作成功')
this.getDetail()
})
} else {
api
.addOrUpdate(this.form)
.then(() => {
this.msgSuccess('操作成功')
// this.dialogVisible = false
this.getDetail()
})
.catch(() => {
// this.dialogVisible = false
})
}
}
})
}
// start(corpId) {
// api.start(corpId).then(({ rows, total }) => {
// this.msgSuccess('操作成功')
// this.getList()
// })
// },
}
}
</script>
<style lang="scss" scoped>
.tips {
color: var(--font-black-7);
font-size: 12px;
}
.tips {
color: var(--font-black-7);
font-size: 12px;
}
</style>
<template>
<div>
<div class="flex">
<div style="width: calc(100% - 425px); padding-right: var(--card-margin);">
<el-form :model="form" :rules="rules" ref="form" label-width="140px">
<el-row class="g-card">
<el-col>
<Attachment
@phoneData="getPhoneData"
@success="getAttentment"
@changeInfo="changeInfo"
:baseData="attachmentsData"
:showModle="false"
></Attachment>
</el-col>
</el-row>
</el-form>
</div>
<div class="g-card" style="width: 425px; margin-top: 0;">
<PreviewInPhone :list="previewData" :templateInfo="templateInfo"></PreviewInPhone>
</div>
</div>
</div>
</template>
<script>
import Attachment from './Attachment.vue'
import PreviewInPhone from '@/components/ContentCenter/PreviewInPhone'
export default {
props: {
initData: {
type: Object,
default: {}
}
},
components: {
Attachment,
PreviewInPhone
},
data() {
return {
previewData: [],
templateInfo: '',
attachmentsData: {
templateInfo: '',
attachments: []
},
form: []
}
},
mounted() {},
watch: {
initData: {
deep: true,
immediate: true,
handler(newData, old) {
this.form = JSON.parse(JSON.stringify(this.initData))
this.setData()
}
}
},
methods: {
changeInfo(data) {
this.templateInfo = data
},
getAttentment(data) {
this.form = data
},
getPhoneData(data) {
this.previewData = data
},
// 提交
submit() {
if (!this.templateInfo) {
this.msgError('欢迎语不能为空!')
return
}
let arr = JSON.parse(JSON.stringify(this.form))
arr.unshift({
content: this.templateInfo,
msgType: 'text'
})
this.$emit('submit', arr)
this.setData()
},
setData() {
if (this.form) {
let arr = []
this.form.forEach((dd) => {
if (dd.msgType == 'text') {
this.templateInfo = dd.content
} else {
arr.push(dd)
}
})
this.form = arr
let data = this.setAttachments(arr)
;(this.attachmentsData = {
templateInfo: this.templateInfo,
attachments: data
}),
(this.previewData = data)
console.log(this.attachmentsData)
}
// this.$forceUpdate()
},
setAttachments(list) {
let arr = []
if (list && list.length) {
list.forEach((dd) => {
if (dd.msgType === 'image') {
let obj = {
id: dd.materialId,
mediaType: '0',
materialUrl: dd.picUrl
}
arr.push(obj)
} else if (dd.msgType === 'video') {
let obj = {
id: dd.materialId,
mediaType: '2',
materialUrl: dd.fileUrl,
coverUrl: dd.picUrl,
digest: dd.description,
materialName: dd.title
}
arr.push(obj)
} else if (dd.msgType === 'file') {
let obj = {
id: dd.materialId,
mediaType: '3',
materialUrl: dd.fileUrl,
digest: dd.description,
materialName: dd.title
}
arr.push(obj)
} else if (dd.msgType === 'text') {
let obj = {
id: dd.materialId,
mediaType: '4',
content: dd.content
}
arr.push(obj)
} else if (dd.msgType === 'link') {
let obj = {
id: dd.materialId,
mediaType: '9',
content: dd.content,
coverUrl: dd.picUrl,
materialUrl: dd.linkUrl,
materialName: dd.title
}
arr.push(obj)
} else if (dd.msgType === 'miniprogram') {
let ff = {
id: dd.materialId,
mediaType: '11',
digest: dd.appId,
materialName: dd.title,
coverUrl: dd.picUrl,
materialUrl: dd.fileUrl
}
arr.push(ff)
} else if (dd.msgType === 'news') {
let ff = {
id: dd.materialId,
mediaType: '12',
digest: dd.description,
materialUrl: dd.fileUrl,
coverUrl: dd.picUrl,
content: dd.content,
materialName: dd.title
}
arr.push(ff)
} else if (dd.msgType === 'posters') {
let obj = {
id: dd.materialId,
mediaType: '5',
materialUrl: dd.fileUrl,
materialName: dd.title
}
arr.push(obj)
}
})
}
return arr
}
}
}
</script>
<style scoped lang="scss">
.sub-des {
font-size: 12px;
font-weight: 400;
color: var(--font-black-6);
}
::v-deep .image-uploader {
.uploader-icon {
width: 80px;
height: 80px;
line-height: 80px;
}
.upload-img {
width: 80px;
height: 80px;
}
}
::v-deep .image-uploader2 {
.uploader-icon {
width: 120px;
height: 120px;
line-height: 120px;
}
.upload-img {
width: 120px;
height: 120px;
}
}
.el-form-item {
margin-bottom: 30px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!