Commit 65dbb685 by ext.wangyuman1

Merge branch 'vue3-master' of https://e.coding.net/linkwechat/linkwechat-front/l…

…inkwechat into bs-dev-wangyuman
2 parents a6f18501 23be040a
Showing 119 changed files with 739 additions and 408 deletions
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"driver.js": "^0.9.8", "driver.js": "^0.9.8",
"echarts": "^5.4.2", "echarts": "^5.4.2",
"element-plus": "^2.3.4", "element-plus": "^2.3.6",
"fabric": "^5.3.0", "fabric": "^5.3.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
......
...@@ -25,7 +25,7 @@ export function getListNew(params) { ...@@ -25,7 +25,7 @@ export function getListNew(params) {
return request({ return request({
url: service + '/findWeCustomerList', url: service + '/findWeCustomerList',
method: 'get', method: 'get',
params params,
}) })
} }
...@@ -47,7 +47,7 @@ export function getList(params) { ...@@ -47,7 +47,7 @@ export function getList(params) {
return request({ return request({
url: service + '/list', url: service + '/list',
method: 'get', method: 'get',
params params,
}) })
} }
...@@ -56,7 +56,7 @@ export function getList(params) { ...@@ -56,7 +56,7 @@ export function getList(params) {
*/ */
export function sync() { export function sync() {
return request({ return request({
url: service + '/synchWeCustomer' url: service + '/synchWeCustomer',
}) })
} }
...@@ -76,7 +76,7 @@ export function makeLabel(data) { ...@@ -76,7 +76,7 @@ export function makeLabel(data) {
return request({ return request({
url: service + '/makeLabel', url: service + '/makeLabel',
method: 'post', method: 'post',
data data,
}) })
} }
...@@ -96,7 +96,7 @@ export function removeLabel(data) { ...@@ -96,7 +96,7 @@ export function removeLabel(data) {
return request({ return request({
url: service + '/removeLabel', url: service + '/removeLabel',
method: 'DELETE', method: 'DELETE',
data data,
}) })
} }
...@@ -112,7 +112,7 @@ export function updateBirthday(data) { ...@@ -112,7 +112,7 @@ export function updateBirthday(data) {
return request({ return request({
url: service, url: service,
method: 'PUT', method: 'PUT',
data data,
}) })
} }
...@@ -121,7 +121,7 @@ export function exportCustomer(query) { ...@@ -121,7 +121,7 @@ export function exportCustomer(query) {
return request({ return request({
url: service + '/export', url: service + '/export',
method: 'get', method: 'get',
params: query params: query,
}) })
} }
...@@ -132,13 +132,13 @@ export function exportCustomer(query) { ...@@ -132,13 +132,13 @@ export function exportCustomer(query) {
export function lossRemind(status) { export function lossRemind(status) {
return request({ return request({
url: getway + '/corp/startCustomerChurnNoticeSwitch/' + status, url: getway + '/corp/startCustomerChurnNoticeSwitch/' + status,
method: 'PUT' method: 'PUT',
}) })
} }
export function getLossRemindStatus(status) { export function getLossRemindStatus(status) {
return request({ return request({
url: getway + '/corp/getCustomerChurnNoticeSwitch/' url: getway + '/corp/getCustomerChurnNoticeSwitch/',
}) })
} }
/** /**
...@@ -155,7 +155,7 @@ export function jobExtends(data) { ...@@ -155,7 +155,7 @@ export function jobExtends(data) {
return request({ return request({
url: service + '/jobExtends', url: service + '/jobExtends',
method: 'POST', method: 'POST',
data data,
}) })
} }
...@@ -169,7 +169,7 @@ export function jobExtends(data) { ...@@ -169,7 +169,7 @@ export function jobExtends(data) {
export function getDetail(params) { export function getDetail(params) {
return request({ return request({
url: service + '/findWeCustomerBaseInfo', url: service + '/findWeCustomerBaseInfo',
params params,
}) })
} }
...@@ -184,8 +184,8 @@ export function getSummary({ externalUserid, delFlag }) { ...@@ -184,8 +184,8 @@ export function getSummary({ externalUserid, delFlag }) {
url: service + '/findWeCustomerInfoSummary', url: service + '/findWeCustomerInfoSummary',
params: { params: {
externalUserid, externalUserid,
delFlag delFlag,
} },
}) })
} }
/** /**
...@@ -199,7 +199,7 @@ export function getSummary({ externalUserid, delFlag }) { ...@@ -199,7 +199,7 @@ export function getSummary({ externalUserid, delFlag }) {
export function getCustomerInfoByUserId(data) { export function getCustomerInfoByUserId(data) {
return request({ return request({
url: service + '/findWeCustomerInfoByUserId', url: service + '/findWeCustomerInfoByUserId',
params: data params: data,
}) })
} }
...@@ -217,14 +217,14 @@ export function getFollowUpRecord(params) { ...@@ -217,14 +217,14 @@ export function getFollowUpRecord(params) {
return request({ return request({
// url: service + '/followUpRecord', // url: service + '/followUpRecord',
url: getway + '/trajectory/findTrajectory', url: getway + '/trajectory/findTrajectory',
params params,
}) })
} }
export function getRecordList(params) { export function getRecordList(params) {
return request({ return request({
url: getway + '/trackRecord/followUpRecord', url: getway + '/trackRecord/followUpRecord',
params params,
}) })
} }
...@@ -235,7 +235,7 @@ export function getRecordList(params) { ...@@ -235,7 +235,7 @@ export function getRecordList(params) {
*/ */
export function syncTrack(userIds) { export function syncTrack(userIds) {
return request({ return request({
url: getway + `/moments/synchMomentsInteracte/${userIds}` url: getway + `/moments/synchMomentsInteracte/${userIds}`,
}) })
} }
...@@ -253,7 +253,7 @@ export function checkByCondition(data) { ...@@ -253,7 +253,7 @@ export function checkByCondition(data) {
return request({ return request({
url: service + '/checkByCondition', url: service + '/checkByCondition',
method: 'post', method: 'post',
data data,
}) })
} }
...@@ -262,7 +262,7 @@ export function multiMakeTag(data) { ...@@ -262,7 +262,7 @@ export function multiMakeTag(data) {
return request({ return request({
url: service + '/batchMakeLabel', url: service + '/batchMakeLabel',
method: 'post', method: 'post',
data data,
}) })
} }
...@@ -270,6 +270,13 @@ export function multiMakeTag(data) { ...@@ -270,6 +270,13 @@ export function multiMakeTag(data) {
export function getFieldFn(params) { export function getFieldFn(params) {
return request({ return request({
url: getway + '/portrait/findSysFieldTemplate', url: getway + '/portrait/findSysFieldTemplate',
params params,
})
}
export function findCustomerAddWay(params) {
return request({
url: service + '/findCustomerAddWay',
params,
}) })
} }
<script> <script>
export default { export default {
name: 'ButtonSync', name: 'ButtonSync',
emits: ['click'],
props: { props: {
customeBtn: { customeBtn: {
type: Boolean, type: Boolean,
......
...@@ -48,12 +48,15 @@ export default { ...@@ -48,12 +48,15 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
deep: true,
handler(val) {
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart() this.drawChart()
}) })
}, },
}, },
},
created() {}, created() {},
mounted() { mounted() {
this.drawChart() this.drawChart()
......
...@@ -49,12 +49,15 @@ export default { ...@@ -49,12 +49,15 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
deep: true,
handler() {
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart() this.drawChart()
}) })
}, },
}, },
},
created() {}, created() {},
mounted() { mounted() {
this.drawChart() this.drawChart()
......
...@@ -36,10 +36,13 @@ export default { ...@@ -36,10 +36,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
deep: true,
handler() {
this.drawChart() this.drawChart()
}, },
}, },
},
created() {}, created() {},
mounted() { mounted() {
this.drawChart() this.drawChart()
......
...@@ -22,7 +22,10 @@ ...@@ -22,7 +22,10 @@
<el-checkbox-group v-model="paneList[picindex].list" class="imgStyle"> <el-checkbox-group v-model="paneList[picindex].list" class="imgStyle">
<div class="imgItem" v-for="(item, index) in list" :key="index" @click="changeBox($event, item)"> <div class="imgItem" v-for="(item, index) in list" :key="index" @click="changeBox($event, item)">
<div class="checkboxStyle"> <div class="checkboxStyle">
<el-checkbox :label="item" style="width: 20px" :checked="item.isCheck"></el-checkbox> <el-checkbox
:label="item"
style="width: 20px; height: 20px"
:checked="item.isCheck"></el-checkbox>
<el-tooltip <el-tooltip
:content="item.materialName" :content="item.materialName"
placement="top" placement="top"
......
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
<el-table v-loading="loading" :data="list" @current-change="currentChange"> <el-table v-loading="loading" :data="list" @current-change="currentChange">
<el-table-column width="60"> <el-table-column width="60">
<template #default="{ row }"> <template #default="{ row }">
<i <el-icon-check
v-if="welSelected ? welSelected.id === row.id : false" v-if="welSelected ? welSelected.id === row.id : false"
class="el-icon-check" class="el-icon-check"
style="color: rgb(65, 133, 244); font-size: 25px"></i> style="color: rgb(65, 133, 244); font-size: 25px"></el-icon-check>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="isGroup ? '群发内容' : '欢迎语'" align="center" min-width="250" show-overflow-tooltip> <el-table-column :label="isGroup ? '群发内容' : '欢迎语'" align="center" min-width="250" show-overflow-tooltip>
......
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
this.selectedList = [...val] this.selectedList = [...val]
}, },
immediate: true, immediate: true,
deep: true,
}, },
}, },
computed: { computed: {
......
...@@ -145,6 +145,7 @@ export default { ...@@ -145,6 +145,7 @@ export default {
}) })
}, },
immediate: true, immediate: true,
deep: true,
}, },
}, },
......
...@@ -39,12 +39,19 @@ export default { ...@@ -39,12 +39,19 @@ export default {
}, },
}, },
watch: { watch: {
routes() { routes: {
deep: true,
handler() {
this.searchPool = this.generateRoutes(this.routes) this.searchPool = this.generateRoutes(this.routes)
}, },
searchPool(list) { },
searchPool: {
deep: true,
handler(list) {
this.initFuse(list) this.initFuse(list)
}, },
},
show(value) { show(value) {
if (value) { if (value) {
document.body.addEventListener('click', this.close) document.body.addEventListener('click', this.close)
......
...@@ -365,6 +365,7 @@ export default { ...@@ -365,6 +365,7 @@ export default {
this.talkList = JSON.parse(JSON.stringify(val)) this.talkList = JSON.parse(JSON.stringify(val))
}, },
immediate: true, immediate: true,
deep: true,
}, },
materialForm: { materialForm: {
handler(val) { handler(val) {
......
<template> <template>
<div class="pagination-container" ref="pagination"> <div
class="pagination-container"
ref="pagination"
v-if="$attrs['hide-on-single-page'] === false || $attrs.total > limit">
<el-pagination <el-pagination
v-bind="$attrs" v-bind="$attrs"
:background="background" :background="background"
......
...@@ -41,13 +41,19 @@ export default { ...@@ -41,13 +41,19 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
list(val) { },
list: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
}, },
},
computed: { computed: {
Pvisible: { Pvisible: {
get() { get() {
......
...@@ -43,7 +43,9 @@ export default { ...@@ -43,7 +43,9 @@ export default {
} }
}, },
watch: { watch: {
defaultValues(value) { defaultValues: {
deep: true,
handler(value) {
const checkedUserList = [] const checkedUserList = []
if (!Array.isArray(value) || value.length == 0) { if (!Array.isArray(value) || value.length == 0) {
this.userList = [] this.userList = []
...@@ -58,6 +60,7 @@ export default { ...@@ -58,6 +60,7 @@ export default {
this.userList = checkedUserList this.userList = checkedUserList
} }
}, },
},
Pvisible(val) { Pvisible(val) {
val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.deptId)) val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.deptId))
if (!this.$refs.tree) { if (!this.$refs.tree) {
......
...@@ -41,6 +41,7 @@ export default { ...@@ -41,6 +41,7 @@ export default {
this.selectList = value this.selectList = value
}, },
immediate: true, immediate: true,
deep: true,
}, },
Pvisible(val) { Pvisible(val) {
this.selectList = this.defaultValues this.selectList = this.defaultValues
......
...@@ -40,13 +40,19 @@ export default { ...@@ -40,13 +40,19 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
list(val) { },
list: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
}, },
},
computed: { computed: {
Pvisible: { Pvisible: {
get() { get() {
...@@ -144,9 +150,7 @@ export default { ...@@ -144,9 +150,7 @@ export default {
</el-table-column> </el-table-column>
<el-table-column label="客群标签"> <el-table-column label="客群标签">
<template #default="{ row }"> <template #default="{ row }">
<div> <tag-ellipsis v-if="row.tags" limit="1" :list="row.tags.split(',')"></tag-ellipsis>
<tag-ellipsis limit="1" :list="row.tags.split(',')"></tag-ellipsis>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活码客群数" align="center" prop="chatGroupNum"></el-table-column> <el-table-column label="活码客群数" align="center" prop="chatGroupNum"></el-table-column>
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<el-table-column label="短链地址" align="center" prop="shortLink" show-overflow-tooltip> <el-table-column label="短链地址" align="center" prop="shortLink" show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<span>{{ row.shortLink }}</span> <span>{{ row.shortLink }}</span>
<i <el-icon-copy-document
class="el-icon-copy-document copy-btn cp ml20" class="el-icon-copy-document copy-btn cp ml20"
title="复制" title="复制"
:data-clipboard-text="row.shortLink"></i> :data-clipboard-text="row.shortLink" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最近更新时间" align="center" prop="updateTime" width="180"></el-table-column> <el-table-column label="最近更新时间" align="center" prop="updateTime" width="180"></el-table-column>
...@@ -117,13 +117,19 @@ export default { ...@@ -117,13 +117,19 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
list(val) { },
list: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
}, },
},
computed: { computed: {
Pvisible: { Pvisible: {
get() { get() {
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
query: { query: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
categoryId: '', groupId: '',
// createBy: '', // createBy: '',
// beginTime: '', // beginTime: '',
// endTime: '' // endTime: ''
...@@ -43,13 +43,19 @@ export default { ...@@ -43,13 +43,19 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
list(val) { },
list: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
}, },
},
computed: { computed: {
Pvisible: { Pvisible: {
get() { get() {
...@@ -67,7 +73,7 @@ export default { ...@@ -67,7 +73,7 @@ export default {
methods: { methods: {
switchGroup(index, data) { switchGroup(index, data) {
this.groupIndex = index this.groupIndex = index
this.query.categoryId = data.id this.query.groupId = data.id
this.search() this.search()
}, },
search() { search() {
...@@ -78,7 +84,7 @@ export default { ...@@ -78,7 +84,7 @@ export default {
getCodeCategoryList({ mediaType: '6' }).then((res) => { getCodeCategoryList({ mediaType: '6' }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.groupList = res.data this.groupList = res.data
this.query.categoryId = this.groupList[0].id this.query.groupId = this.groupList[0].id
this.groupIndex = 0 this.groupIndex = 0
this.query.pageNum = 1 this.query.pageNum = 1
this.getList() this.getList()
......
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
this.selectedList = [...val] this.selectedList = [...val]
}, },
immediate: true, immediate: true,
deep: true,
}, },
// 下一主版本弃用 // 下一主版本弃用
defaultValues: { defaultValues: {
...@@ -52,6 +53,7 @@ export default { ...@@ -52,6 +53,7 @@ export default {
this.selectedList = [...val] this.selectedList = [...val]
}, },
immediate: true, immediate: true,
deep: true,
}, },
}, },
computed: { computed: {
......
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
this.selectedList = [...val] this.selectedList = [...val]
}, },
immediate: true, immediate: true,
deep: true,
}, },
}, },
computed: { computed: {
......
...@@ -42,6 +42,11 @@ export default { ...@@ -42,6 +42,11 @@ export default {
default: () => [], default: () => [],
}, },
destroyOnClose: Boolean, destroyOnClose: Boolean,
// 选中部门时,是否用部门代替显示该部门下所有人员
departReplaceUser: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -72,6 +77,7 @@ export default { ...@@ -72,6 +77,7 @@ export default {
} }
}, },
immediate: true, immediate: true,
deep: true,
}, },
Pvisible(val) { Pvisible(val) {
val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id)) val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id))
...@@ -104,6 +110,19 @@ export default { ...@@ -104,6 +110,19 @@ export default {
}, },
} }
}, },
dealedUserList() {
if (!this.departReplaceUser) {
return this.userList
}
// 提取所有部门
let arr = this.userList.filter((e) => e.isParty)
// 提取所有非选中部门的人员
let userList = this.userList.filter((e) => !e.isParty && !arr.some((e2) => e.userDepts[0]?.deptId == e2.deptId))
// 提取无父级部门
arr = arr.filter((e) => !arr.some((e2) => e.parentId == e2.id))
arr.push(...userList)
return arr
},
}, },
created() {}, created() {},
mounted() {}, mounted() {},
...@@ -183,6 +202,14 @@ export default { ...@@ -183,6 +202,14 @@ export default {
getDeptUser({ deptId: node.data.id }).then(({ rows }) => { getDeptUser({ deptId: node.data.id }).then(({ rows }) => {
let arr = this.handleUser(rows) let arr = this.handleUser(rows)
node.data.children && arr.push(...node.data.children) node.data.children && arr.push(...node.data.children)
// 懒加载选中状态的子节点不会触发子节点的选中事件,需要手动触发
if (node.checked) {
setTimeout(() => {
arr.forEach((e) => {
this.handleCheckChange(e, true)
})
}, 200)
}
resolve(arr) resolve(arr)
}) })
} }
...@@ -242,7 +269,7 @@ export default { ...@@ -242,7 +269,7 @@ export default {
// 确 定 // 确 定
submit() { submit() {
this.Pvisible = false this.Pvisible = false
this.$emit('success', [...this.userList]) this.$emit('success', [...this.dealedUserList])
}, },
// 取消选择 // 取消选择
cancle(key) { cancle(key) {
...@@ -303,7 +330,7 @@ export default { ...@@ -303,7 +330,7 @@ export default {
</div> </div>
<div class="right user-list"> <div class="right user-list">
<div>选择人员列表</div> <div>选择人员列表</div>
<div v-for="(item, index) in userList" :key="index" class="flex aic"> <div v-for="(item, index) in dealedUserList" :key="index" class="flex aic">
<el-icon-UserFilled class="el-icon-UserFilled"></el-icon-UserFilled> <el-icon-UserFilled class="el-icon-UserFilled"></el-icon-UserFilled>
<span class="user-name">{{ item.name }}</span> <span class="user-name">{{ item.name }}</span>
<el-icon-minus class="el-icon-minus cp" title="取消选择" @click="cancle(item.userId)"></el-icon-minus> <el-icon-minus class="el-icon-minus cp" title="取消选择" @click="cancle(item.userId)"></el-icon-minus>
......
...@@ -42,8 +42,9 @@ export default { ...@@ -42,8 +42,9 @@ export default {
</template> </template>
<el-popover v-else placement="bottom" trigger="hover"> <el-popover v-else placement="bottom" trigger="hover">
<div class="tag-all"> <!-- 插入到body,这里用css scoped calss无效,需使用style-->
<el-tag v-for="(item, unique) in _list" :key="unique"> <div class="tag-all" style="display: flex; flex-wrap: wrap; gap: 10px">
<el-tag v-for="(item, unique) in _list" :key="unique" style="margin: 0">
{{ item[defaultProps] || item }} {{ item[defaultProps] || item }}
</el-tag> </el-tag>
</div> </div>
......
...@@ -118,6 +118,7 @@ export default { ...@@ -118,6 +118,7 @@ export default {
handler(value) { handler(value) {
this.fileListWatch = value this.fileListWatch = value
}, },
deep: true,
}, },
loading(val) { loading(val) {
this.$emit('loadingChange', val) this.$emit('loadingChange', val)
...@@ -490,7 +491,7 @@ export default { ...@@ -490,7 +491,7 @@ export default {
// if (beforeUpload) { // if (beforeUpload) {
// return beforeUpload(file) // return beforeUpload(file)
// } // }
if (!this.multiple || this.limit == 1) { else if (!this.multiple || this.limit == 1) {
this.file = file this.file = file
} else { } else {
Array.isArray(this.file) || (this.file = []) // 多选 Array.isArray(this.file) || (this.file = []) // 多选
......
<script> <script>
import BenzAMRRecorder from 'benz-amr-recorder' import BenzAMRRecorder from 'benz-amr-recorder'
let $isVoice = undefined
let $playRec = undefined
let $playRecSymbole = undefined
export default { export default {
name: 'Voice', name: 'Voice',
props: { props: {
...@@ -18,27 +21,27 @@ export default { ...@@ -18,27 +21,27 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
this.__proto__.$isVoice || document.addEventListener('click', this.stop) $isVoice || document.addEventListener('click', this.stop)
this.__proto__.$isVoice = true $isVoice = true
}, },
mounted() {}, mounted() {},
methods: { methods: {
play() { play() {
if (this.amrUrl) { if (this.amrUrl) {
if (this.$playRec) { if ($playRec) {
if (this.stop(true)) { if (this.stop(true)) {
return return
} }
} }
this.__proto__.$playRec = new BenzAMRRecorder() $playRec = new BenzAMRRecorder()
this.__proto__.$playRecSymbole = this.amrUrl $playRecSymbole = this.amrUrl
this.$playRec.initWithUrl(this.amrUrl).then(() => { $playRec.initWithUrl(this.amrUrl).then(() => {
this.actived = true this.actived = true
this.$playRec.play() $playRec.play()
this.$playRec.onEnded(() => { $playRec.onEnded(() => {
this.actived = false this.actived = false
}) })
console.log('amr 时长:' + this.$playRec.getDuration()) console.log('amr 时长:' + $playRec.getDuration())
}) })
// .catch((e) => { // .catch((e) => {
// this.$message.error('播放录音失败,或文件损坏') // this.$message.error('播放录音失败,或文件损坏')
...@@ -48,10 +51,10 @@ export default { ...@@ -48,10 +51,10 @@ export default {
}, },
//停止播放 //停止播放
stop(noset) { stop(noset) {
if (this.$playRec && this.$playRec.isPlaying()) { if ($playRec && $playRec.isPlaying()) {
this.$playRec.stop() $playRec.stop()
if (!noset || this.__proto__.$playRecSymbole === this.amrUrl) { if (!noset || $playRecSymbole === this.amrUrl) {
this.__proto__.$playRecSymbole = '' $playRecSymbole = ''
return true return true
} }
} }
...@@ -70,10 +73,10 @@ export default { ...@@ -70,10 +73,10 @@ export default {
<template> <template>
<div> <div>
<i <el-icon-microphone
:class="['el-icon-microphone', actived && 'actived']" :class="['el-icon-microphone', actived && 'actived']"
style="font-size: 40px; color: var(--color)" style="font-size: 40px; color: var(--color)"
@click.stop="play('attachment')"></i> @click.stop="play('attachment')" />
<!-- <AudioPlayer <!-- <AudioPlayer
:audio-list="audioSrc" :audio-list="audioSrc"
......
...@@ -227,10 +227,10 @@ ...@@ -227,10 +227,10 @@
</el-table-column> </el-table-column>
<el-table-column width="60"> <el-table-column width="60">
<template #default="{ row }"> <template #default="{ row }">
<i <el-icon-check
v-if="welSelected.id === row.id" v-if="welSelected.id === row.id"
class="el-icon-check" class="el-icon-check"
style="color: rgb(65, 133, 244); font-size: 25px"></i> style="color: rgb(65, 133, 244); font-size: 25px" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -42,7 +42,7 @@ const common = { ...@@ -42,7 +42,7 @@ const common = {
// 以下仅用于系统信息展示,不作为项目变量使用,请勿在代码中使用 // 以下仅用于系统信息展示,不作为项目变量使用,请勿在代码中使用
const project = { const project = {
_version: 'v5.0.0.Beta.1', // 当前版本信息 _version: 'v5.0.0-beta.5', // 当前版本信息
_packDateTime: __PACK_DATETIME__, // 打包时间 _packDateTime: __PACK_DATETIME__, // 打包时间
_env: process.env.VUE_APP_ENV, // 前端系统环境模式 _env: process.env.VUE_APP_ENV, // 前端系统环境模式
} }
......
...@@ -57,17 +57,15 @@ ...@@ -57,17 +57,15 @@
<el-tooltip content="功能清单" effect="dark" placement="bottom"> <el-tooltip content="功能清单" effect="dark" placement="bottom">
<div class="right-menu-item hover-effect"> <div class="right-menu-item hover-effect">
<i <el-icon-tickets class="el-icon-tickets right-icon"
class="el-icon-tickets right-icon" @click="goto('https://docs.qq.com/sheet/DZW9HSHpHdWlOYWh2?tab=BB08J3')"/>
@click="goto('https://docs.qq.com/sheet/DZW9HSHpHdWlOYWh2?tab=BB08J3')"></i>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip content="需求墙" effect="dark" placement="bottom"> <el-tooltip content="需求墙" effect="dark" placement="bottom">
<div class="right-menu-item hover-effect"> <div class="right-menu-item hover-effect">
<i <el-icon-data-board class="el-icon-data-board right-icon"
class="el-icon-data-board right-icon" @click="goto('https://docs.qq.com/sheet/DZWxGU0JGVFRVdWZV?tab=BB08J2')"/>
@click="goto('https://docs.qq.com/sheet/DZWxGU0JGVFRVdWZV?tab=BB08J2')"></i>
</div> </div>
</el-tooltip> --> </el-tooltip> -->
......
...@@ -373,7 +373,8 @@ ...@@ -373,7 +373,8 @@
background-color: #f5f7fa; background-color: #f5f7fa;
} }
.el-tabs__nav-wrap { .el-tabs__nav-wrap,
.el-tabs__content {
overflow: initial; overflow: initial;
} }
...@@ -410,6 +411,10 @@ ...@@ -410,6 +411,10 @@
.el-pagination.is-background .el-pager li:disabled { .el-pagination.is-background .el-pager li:disabled {
background-color: transparent; background-color: transparent;
} }
// 分页大小选择框
.el-pagination .el-select .el-input {
width: 115px;
}
// to fixed https://github.com/ElemeFE/element/issues/2461 // to fixed https://github.com/ElemeFE/element/issues/2461
// .el-dialog { // .el-dialog {
// transform: none; // transform: none;
...@@ -582,6 +587,9 @@ ...@@ -582,6 +587,9 @@
// border-top: 1px solid #dfe6ec; // border-top: 1px solid #dfe6ec;
padding: 15px 0; padding: 15px 0;
} }
.cell {
padding: 0 10px;
}
th.el-table__cell.is-leaf { th.el-table__cell.is-leaf {
border-bottom: 0; border-bottom: 0;
} }
...@@ -637,4 +645,8 @@ ...@@ -637,4 +645,8 @@
width: 5px; width: 5px;
} }
.el-checkbox-group {
line-height: initial;
}
// } // }
...@@ -240,6 +240,7 @@ div:focus { ...@@ -240,6 +240,7 @@ div:focus {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 100%; height: 100%;
max-height: calc(100vh - 135px);
.left { .left {
flex: auto; flex: auto;
display: flex; display: flex;
......
export const dictAddType = Object.freeze({ import { findCustomerAddWay } from '@/api/customer'
0: '未知来源',
1: '扫描二维码', let _dictAddType = undefined
2: '搜索手机号', export let dictAddType = (async function () {
3: '名片分享', if (!_dictAddType) {
4: '群聊', let { data } = await findCustomerAddWay()
5: '手机通讯录', _dictAddType = {}
6: '微信联系人', data.forEach((element) => {
7: '来自微信好友的添加申请', _dictAddType[element.code] = element.value
8: '安装第三方应用时自动添加的客服人员', })
9: '搜索邮箱', }
10: '视频号主页添加', return _dictAddType
11: '员工活码', })()
12: '新客拉群',
13: '活动裂变', // export default {
201: '内部成员共享', // get dictAddType() {
202: '管理员/负责人分配' // return findCustomerAddWay().then(({ data }) => {
}) // data.forEach((element) => {
// this.dictAddType[element.code] = element.value
// })
// })
// },
// }
export const dictJoinGroupType = Object.freeze({ export const dictJoinGroupType = Object.freeze({
1: '由成员邀请入群(直接邀请入群)', 1: '由成员邀请入群(直接邀请入群)',
2: '由成员邀请入群(通过邀请链接入群)', 2: '由成员邀请入群(通过邀请链接入群)',
3: '通过扫描群二维码入群' 3: '通过扫描群二维码入群',
}) })
export const dictTrackState = Object.freeze({ export const dictTrackState = Object.freeze({
...@@ -28,5 +33,5 @@ export const dictTrackState = Object.freeze({ ...@@ -28,5 +33,5 @@ export const dictTrackState = Object.freeze({
2: { name: '跟进中', color: 'warning' }, 2: { name: '跟进中', color: 'warning' },
3: { name: '已成交', color: 'success' }, 3: { name: '已成交', color: 'success' },
4: { name: '无意向', color: 'info' }, 4: { name: '无意向', color: 'info' },
5: { name: '已流失', color: 'danger' } 5: { name: '已流失', color: 'danger' },
}) })
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
}, },
watch: { watch: {
dateRange: { dateRange: {
deep: true,
handler(newValue, oldValue) { handler(newValue, oldValue) {
if (newValue && newValue[0]) { if (newValue && newValue[0]) {
let date = new Date() let date = new Date()
......
...@@ -35,7 +35,10 @@ ...@@ -35,7 +35,10 @@
</el-col> </el-col>
<el-col style="flex-basis: 370px"> <el-col style="flex-basis: 370px">
<div class="g-card"> <div class="g-card">
<PreviewInPhone name="客群" :list="[form.wematerial]" :templateInfo="form.content"></PreviewInPhone> <PreviewInPhone
name="客群"
:list="form.wematerial && [form.wematerial]"
:templateInfo="form.content"></PreviewInPhone>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</el-steps> </el-steps>
</div> </div>
<template v-if="currentActive == 0"> <template v-if="currentActive == 0">
<el-row :gutter="20" type="flex" style="margin-top: 20px"> <el-row :gutter="20" type="flex" style="margin-top: 20px;">
<el-col> <el-col>
<div class="g-card"> <div class="g-card">
<el-form ref="baseForm" :rules="rules" :model="form" label-position="right" label-width="100px"> <el-form ref="baseForm" :rules="rules" :model="form" label-position="right" label-width="100px">
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
placeholder="请输入名称" placeholder="请输入名称"
v-model="form.taskName" v-model="form.taskName"
show-word-limit show-word-limit
clearable></el-input> clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="推广短链:" prop="shortLinkId"> <el-form-item label="推广短链:" prop="shortLinkId">
<el-button type="primary" icon="el-icon-plus" @click="showShortLink = true"> <el-button type="primary" icon="el-icon-plus" @click="showShortLink = true">
...@@ -26,11 +27,12 @@ ...@@ -26,11 +27,12 @@
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
@click="$router.push('/drainageCode/publicCustomer/IntelligentShortLink/index')"> @click="$router.push('/drainageCode/publicCustomer/IntelligentShortLink/index')"
>
去新建 去新建
</el-button> </el-button>
<div style="margin-top: 10px"> <div style="margin-top: 10px;">
<ShowShortLinkVue :data="shortLinkObj"></ShowShortLinkVue> <ShowShortLinkVue :data="shortLinkObj"></ShowShortLinkVue>
</div> </div>
</el-form-item> </el-form-item>
...@@ -46,10 +48,10 @@ ...@@ -46,10 +48,10 @@
<el-button type="primary" icon="el-icon-plus" @click="choseDialog = true"> <el-button type="primary" icon="el-icon-plus" @click="choseDialog = true">
{{ form.materialId ? '编辑' : '选择' }}海报 {{ form.materialId ? '编辑' : '选择' }}海报
</el-button> </el-button>
<div style="margin-top: 10px" v-if="posterUrl"> <div style="margin-top: 10px;" v-if="posterUrl">
<ul class="el-upload-list el-upload-list--picture-card"> <ul class="el-upload-list el-upload-list--picture-card">
<li class="el-upload-list__item is-success"> <li class="el-upload-list__item is-success">
<img style="width: 100%; height: 100%" :src="posterUrl" /> <img style="width: 100%; height: 100%;" :src="posterUrl" />
<span class="el-upload-list__item-actions"> <span class="el-upload-list__item-actions">
<span class="el-upload-list__item-delete"> <span class="el-upload-list__item-delete">
<el-icon-delete class="el-icon-delete" @click="handleRemove"></el-icon-delete> <el-icon-delete class="el-icon-delete" @click="handleRemove"></el-icon-delete>
...@@ -61,13 +63,13 @@ ...@@ -61,13 +63,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="g-card" style="text-align: right"> <div class="g-card" style="text-align: right;">
<el-button plain @click="$router.go(-1)">取消</el-button> <el-button plain @click="$router.go(-1)">取消</el-button>
<el-button type="primary" @click="gotoNext">下一步</el-button> <el-button type="primary" @click="gotoNext">下一步</el-button>
</div> </div>
</el-col> </el-col>
<el-col style="flex-basis: 370px"> <el-col style="flex-basis: 370px;">
<div class="g-card" style="height: 100%"> <div class="g-card" style="height: 100%;">
<div class="info_title">消息预览</div> <div class="info_title">消息预览</div>
<Preview :value="posterUrl"></Preview> <Preview :value="posterUrl"></Preview>
</div> </div>
...@@ -93,8 +95,8 @@ ...@@ -93,8 +95,8 @@
<div class="unit"> <div class="unit">
<div class="unit-item" :class="{ active_item: form.type == 0 }" @click="setTypeFn(0)"> <div class="unit-item" :class="{ active_item: form.type == 0 }" @click="setTypeFn(0)">
<div> <div>
<img v-if="form.type == 0" class="icon-style" src="./assets/customer_active.png" alt="" /> <img v-if="form.type == 0" class="icon-style" src="@/assets/image/customer_active.png" alt="" />
<img v-else class="icon-style" src="./assets/customer.png" alt="" /> <img v-else class="icon-style" src="@/assets/image/customer.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">群发客户</div> <div class="item-title">群发客户</div>
...@@ -103,8 +105,8 @@ ...@@ -103,8 +105,8 @@
</div> </div>
<div class="unit-item" :class="{ active_item: form.type == 1 }" @click="setTypeFn(1)"> <div class="unit-item" :class="{ active_item: form.type == 1 }" @click="setTypeFn(1)">
<div> <div>
<img v-if="form.type == 1" class="icon-style" src="./assets/group_active.png" alt="" /> <img v-if="form.type == 1" class="icon-style" src="@/assets/image/group_active.png" alt="" />
<img v-else class="icon-style" src="./assets/group.png" alt="" /> <img v-else class="icon-style" src="@/assets/image/group.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">群发客户群</div> <div class="item-title">群发客户群</div>
...@@ -113,8 +115,8 @@ ...@@ -113,8 +115,8 @@
</div> </div>
<div class="unit-item" :class="{ active_item: form.type == 2 }" @click="setTypeFn(2)"> <div class="unit-item" :class="{ active_item: form.type == 2 }" @click="setTypeFn(2)">
<div> <div>
<img v-if="form.type == 2" class="icon-style" src="./assets/friends_active.png" alt="" /> <img v-if="form.type == 2" class="icon-style" src="@/assets/image/friends_active.png" alt="" />
<img v-else class="icon-style" src="./assets/friends.png" alt="" /> <img v-else class="icon-style" src="@/assets/image/friends.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">群发朋友圈</div> <div class="item-title">群发朋友圈</div>
...@@ -123,8 +125,8 @@ ...@@ -123,8 +125,8 @@
</div> </div>
<div class="unit-item" :class="{ active_item: form.type == 3 }" @click="setTypeFn(3)"> <div class="unit-item" :class="{ active_item: form.type == 3 }" @click="setTypeFn(3)">
<div> <div>
<img v-if="form.type == 3" class="icon-style" src="./assets/app_active.png" alt="" /> <img v-if="form.type == 3" class="icon-style" src="@/assets/image/app_active.png" alt="" />
<img v-else class="icon-style" src="./assets/app.png" alt="" /> <img v-else class="icon-style" src="@/assets/image/app.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">应用消息</div> <div class="item-title">应用消息</div>
...@@ -133,7 +135,7 @@ ...@@ -133,7 +135,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="g-card" style="text-align: right"> <div class="g-card" style="text-align: right;">
<el-button plain @click="currentActive = 0">上一步</el-button> <el-button plain @click="currentActive = 0">上一步</el-button>
<el-button plain @click="saveFn" v-loading="loading">保存,暂不推广</el-button> <el-button plain @click="saveFn" v-loading="loading">保存,暂不推广</el-button>
<el-button type="primary" @click="currentActive = 2">下一步</el-button> <el-button type="primary" @click="currentActive = 2">下一步</el-button>
...@@ -151,21 +153,21 @@ ...@@ -151,21 +153,21 @@
</div> </div>
</template> </template>
<script> <script>
import SelectPosterSingle from './components/SelectPosterSingle.vue' import SelectPosterSingle from './components/SelectPosterSingle.vue'
import Preview from './components/PreviewInPhone.vue' import Preview from './components/PreviewInPhone.vue'
import SelectShortLink from '@/components/SelectShortLink' import SelectShortLink from '@/components/SelectShortLink'
import Step3 from './components/Step3.vue' import Step3 from './components/Step3.vue'
import ShowShortLinkVue from './components/ShowShortLink.vue' import ShowShortLinkVue from './components/ShowShortLink.vue'
import { getDetail, savePromotion } from './api' import { getDetail, savePromotion } from './api'
export default { export default {
name: 'short-link-popularize-add', name: 'short-link-popularize-add',
components: { components: {
Preview, Preview,
SelectPosterSingle, SelectPosterSingle,
SelectShortLink, SelectShortLink,
ShowShortLinkVue, ShowShortLinkVue,
Step3, Step3
}, },
data() { data() {
return { return {
...@@ -186,10 +188,10 @@ export default { ...@@ -186,10 +188,10 @@ export default {
userIds: '', userIds: '',
sendType: 0, sendType: 0,
taskSendTime: '', taskSendTime: '',
taskEndTime: '', taskEndTime: ''
}, },
attachments: [], attachments: [],
senderList: [], senderList: []
}, },
currentActive: 0, currentActive: 0,
choseDialog: false, choseDialog: false,
...@@ -202,31 +204,31 @@ export default { ...@@ -202,31 +204,31 @@ export default {
{ {
required: true, required: true,
message: '请输入任务名称', message: '请输入任务名称',
trigger: 'blur', trigger: 'blur'
}, }
], ],
shortLinkId: [ shortLinkId: [
{ {
required: true, required: true,
message: '请选择短链', message: '请选择短链',
trigger: 'blur', trigger: 'blur'
}, }
], ],
style: [ style: [
{ {
required: true, required: true,
message: '请选择推广样式', message: '请选择推广样式',
trigger: 'blur', trigger: 'blur'
}, }
], ],
materialId: [ materialId: [
{ {
required: true, required: true,
message: '请选择海报', message: '请选择海报',
trigger: 'blur', trigger: 'blur'
}, }
], ]
}, }
} }
}, },
methods: { methods: {
...@@ -294,7 +296,7 @@ export default { ...@@ -294,7 +296,7 @@ export default {
this.posterObj = this.form.weMaterial this.posterObj = this.form.weMaterial
this.posterUrl = this.posterObj.materialUrl this.posterUrl = this.posterObj.materialUrl
} }
}, }
}, },
created() { created() {
this.id = this.$route.query.id this.id = this.$route.query.id
...@@ -304,30 +306,30 @@ export default { ...@@ -304,30 +306,30 @@ export default {
if (this.id) { if (this.id) {
this.getDetailFn() this.getDetailFn()
} }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.info_title { .info_title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #1d2129; color: #1d2129;
margin-bottom: 10px; margin-bottom: 10px;
} }
.sub-des { .sub-des {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
.title { .title {
font-size: 16px; font-size: 16px;
font-family: PingFang SC-Bold, PingFang SC; font-family: PingFang SC-Bold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #1d2129; color: #1d2129;
margin: 24px 0; margin: 24px 0;
} }
.unit { .unit {
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -373,5 +375,5 @@ export default { ...@@ -373,5 +375,5 @@ export default {
border: 1px solid rgba(7, 193, 96, 1); border: 1px solid rgba(7, 193, 96, 1);
background-color: rgba(7, 193, 96, 0.09019607843137255); background-color: rgba(7, 193, 96, 0.09019607843137255);
} }
} }
</style> </style>
...@@ -146,6 +146,7 @@ export default { ...@@ -146,6 +146,7 @@ export default {
this.tableData = JSON.parse(JSON.stringify(val)) this.tableData = JSON.parse(JSON.stringify(val))
}, },
immediate: true, immediate: true,
deep: true,
}, },
}, },
...@@ -245,7 +246,7 @@ export default { ...@@ -245,7 +246,7 @@ export default {
}, },
//表格拖动排序 //表格拖动排序
dragSort() { dragSort() {
const el = this.$refs.singleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0] const el = this.$refs.singleTable.$el.querySelectorAll('.el-table__body-wrapper table > tbody')[0]
this.sortable = Sortable.create(el, { this.sortable = Sortable.create(el, {
ghostClass: 'sortable-ghost', ghostClass: 'sortable-ghost',
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<!-- <div class="title">{{ name }}</div> --> <!-- <div class="title">{{ name }}</div> -->
<div class="content"> <div class="content">
<div class="header_bg"> <div class="header_bg">
<img class="header" src="../assets/header_b.png" alt="" /> <img class="header" src="@/assets/image/header_b.png" alt="" />
</div> </div>
<div class="header_con"> <div class="header_con">
<div class="img"> <div class="img">
<div> <div>
<img width="32px" src="../assets/header_a.png" alt="" /> <img width="32px" src="@/assets/image/header_a.png" alt="" />
</div> </div>
<div class="name">运营部-小王</div> <div class="name">运营部-小王</div>
</div> </div>
...@@ -26,22 +26,22 @@ ...@@ -26,22 +26,22 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'short-link-preview-type-3', name: 'short-link-preview-type-3',
components: {}, components: {},
props: { props: {
name: { name: {
type: String, type: String,
default: '短链推广', default: '短链推广'
}, },
value: { value: {
type: String, type: String,
default: '', default: ''
}, },
poster: { poster: {
type: String, type: String,
default: '', default: ''
}, }
}, },
watch: { watch: {
value(val) { value(val) {
...@@ -49,21 +49,21 @@ export default { ...@@ -49,21 +49,21 @@ export default {
}, },
poster() { poster() {
// this.$forceUpdate() // this.$forceUpdate()
}, }
}, },
data() { data() {
return { return {
list: [], list: []
} }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.preview { .preview {
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
width: 300px; width: 300px;
...@@ -136,12 +136,12 @@ export default { ...@@ -136,12 +136,12 @@ export default {
} }
} }
} }
} }
.sub-des { .sub-des {
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
} }
</style> </style>
<template> <template>
<div> <div>
<el-dialog :title="title" v-model:visible="Pvisible" width="800px" append-to-body :close-on-click-modal="false"> <el-dialog :title="title" v-model="Pvisible" width="800px" append-to-body :close-on-click-modal="false">
<el-row v-if="list.length || !isInit" type="flex" justify="space-between" style="max-height: 500px"> <el-row v-if="list.length || !isInit" type="flex" justify="space-between" style="max-height: 500px">
<el-col style="margin-top: 0px"> <el-col style="margin-top: 0px">
<div> <div>
...@@ -90,13 +90,19 @@ export default { ...@@ -90,13 +90,19 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
list(val) { },
list: {
deep: true,
handler(val) {
this.setSelected() this.setSelected()
}, },
}, },
},
computed: { computed: {
Pvisible: { Pvisible: {
get() { get() {
......
...@@ -50,6 +50,9 @@ export default { ...@@ -50,6 +50,9 @@ export default {
mounted() { mounted() {
this.clipboard = new this.ClipboardJS('.copy-btn') this.clipboard = new this.ClipboardJS('.copy-btn')
}, },
unmounted() {
this.clipboard.destroy()
},
methods: {}, methods: {},
} }
</script> </script>
......
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
this.$emit('preview', { this.$emit('preview', {
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)), previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)),
}) })
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) }) this.$emit('previewText', { templateInfo: this.attachmentsData.templateInfo })
} }
if (!this.form.client) { if (!this.form.client) {
this.form.client = { this.form.client = {
......
...@@ -5,55 +5,51 @@ ...@@ -5,55 +5,51 @@
:isDetail="isDetail" :isDetail="isDetail"
ref="selectCustomer" ref="selectCustomer"
:dataObj="form.group" :dataObj="form.group"
@update="getUpdateCustomer" @update="getUpdateCustomer"></SelectGroupVue>
></SelectGroupVue>
<IdentityAttachmentVue <IdentityAttachmentVue
:isDetail="isDetail" :isDetail="isDetail"
ref="selectAttachment" ref="selectAttachment"
@phoneData="getPhoneData" @phoneData="getPhoneData"
@success="getAttentment" @success="getAttentment"
@changeInfo="changeInfo" @changeInfo="changeInfo"
:baseData="attachmentsData" :baseData="attachmentsData"></IdentityAttachmentVue>
></IdentityAttachmentVue>
<SelectSendTypeVue <SelectSendTypeVue
:isDetail="isDetail" :isDetail="isDetail"
ref="selectSendType" ref="selectSendType"
:data="form.group" :data="form.group"
@update="getSendType" @update="getSendType"></SelectSendTypeVue>
></SelectSendTypeVue>
<SelectEndDateVue <SelectEndDateVue
:isDetail="isDetail" :isDetail="isDetail"
ref="selectEndDate" ref="selectEndDate"
:data="form.group" :data="form.group"
@update="getEndDate" @update="getEndDate"></SelectEndDateVue>
></SelectEndDateVue>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import { dateFormat, setAttachments } from '@/utils/index' import { dateFormat, setAttachments } from '@/utils/index'
import IdentityAttachmentVue from './IdentityAttachment.vue' import IdentityAttachmentVue from './IdentityAttachment.vue'
import SelectGroupVue from './SelectGroup.vue' import SelectGroupVue from './SelectGroup.vue'
import SelectEndDateVue from './SelectEndDate.vue' import SelectEndDateVue from './SelectEndDate.vue'
import SelectSendTypeVue from './SelectSendType.vue' import SelectSendTypeVue from './SelectSendType.vue'
export default { export default {
name: 'step3-type-2', name: 'step3-type-2',
components: { components: {
SelectGroupVue, SelectGroupVue,
IdentityAttachmentVue, IdentityAttachmentVue,
SelectSendTypeVue, SelectSendTypeVue,
SelectEndDateVue SelectEndDateVue,
}, },
props: { props: {
data: { data: {
type: Object, type: Object,
default: {} default: {},
}, },
isDetail: { isDetail: {
type: Boolean, type: Boolean,
default: false default: false,
} },
}, },
watch: { watch: {
data: { data: {
...@@ -64,14 +60,14 @@ ...@@ -64,14 +60,14 @@
} }
}, },
deep: true, deep: true,
immediate: true immediate: true,
} },
}, },
data() { data() {
return { return {
attachmentsData: { attachmentsData: {
templateInfo: '', templateInfo: '',
attachments: [] attachments: [],
}, },
previewData: [], previewData: [],
form: { form: {
...@@ -82,11 +78,11 @@ ...@@ -82,11 +78,11 @@
userIds: '', userIds: '',
sendType: 0, sendType: 0,
taskSendTime: '', taskSendTime: '',
taskEndTime: '' taskEndTime: '',
}, },
attachmentsList: [], attachmentsList: [],
senderList: [] senderList: [],
} },
} }
}, },
methods: { methods: {
...@@ -98,7 +94,7 @@ ...@@ -98,7 +94,7 @@
userIds: '', userIds: '',
sendType: 0, sendType: 0,
taskSendTime: '', taskSendTime: '',
taskEndTime: '' taskEndTime: '',
} }
} }
if (!this.form.attachments) { if (!this.form.attachments) {
...@@ -115,9 +111,9 @@ ...@@ -115,9 +111,9 @@
let data = setAttachments(arr) let data = setAttachments(arr)
this.attachmentsData.attachments = data this.attachmentsData.attachments = data
this.$emit('preview', { this.$emit('preview', {
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)) previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)),
}) })
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) }) this.$emit('previewText', { templateInfo: this.attachmentsData.templateInfo })
} }
}, },
changeInfo(data) { changeInfo(data) {
...@@ -129,7 +125,7 @@ ...@@ -129,7 +125,7 @@
this.previewData = data this.previewData = data
this.$emit('preview', { this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo, templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(data)) previewData: JSON.parse(JSON.stringify(data)),
}) })
}, },
getAttentment(data) { getAttentment(data) {
...@@ -148,9 +144,9 @@ ...@@ -148,9 +144,9 @@
getUpdateCustomer(data) { getUpdateCustomer(data) {
this.form.group = data this.form.group = data
this.$emit('update', this.form) this.$emit('update', this.form)
} },
} },
} }
</script> </script>
<style scoped></style> <style scoped></style>
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
<div> <div>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="任务信息" name="first"> <el-tab-pane label="任务信息" name="first">
<el-row :gutter="20" type="flex" style="margin-top: 20px"> <el-row :gutter="20" type="flex" style="margin-top: 20px;">
<el-col> <el-col>
<div class="g-card"> <div class="g-card">
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between;">
<div class="info_title">基本信息</div> <div class="info_title">基本信息</div>
<el-button <el-button
v-if="form.taskStatus == 0" v-if="form.taskStatus == 0"
type="primary" type="primary"
@click="$router.push({ path: './add', query: { id: id } })"> @click="$router.push({ path: './add', query: { id: id } })"
>
编辑 编辑
</el-button> </el-button>
</div> </div>
...@@ -22,7 +23,8 @@ ...@@ -22,7 +23,8 @@
v-model="form.taskName" v-model="form.taskName"
show-word-limit show-word-limit
disabled disabled
clearable></el-input> clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="任务状态:"> <el-form-item label="任务状态:">
<el-tag :type="form.taskStatus == 0 ? 'info' : form.taskStatus == 2 ? 'danger' : ''"> <el-tag :type="form.taskStatus == 0 ? 'info' : form.taskStatus == 2 ? 'danger' : ''">
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
</el-tag> </el-tag>
</el-form-item> </el-form-item>
<el-form-item label="推广短链:"> <el-form-item label="推广短链:">
<div style="margin-top: 10px"> <div style="margin-top: 10px;">
<ShowShortLinkVue :data="shortLinkObj"></ShowShortLinkVue> <ShowShortLinkVue :data="shortLinkObj"></ShowShortLinkVue>
</div> </div>
</el-form-item> </el-form-item>
...@@ -41,10 +43,10 @@ ...@@ -41,10 +43,10 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="form.style == 1" label="推广海报:" prop="materialId"> <el-form-item v-if="form.style == 1" label="推广海报:" prop="materialId">
<div style="margin-top: 10px" v-if="posterUrl"> <div style="margin-top: 10px;" v-if="posterUrl">
<ul class="el-upload-list el-upload-list--picture-card"> <ul class="el-upload-list el-upload-list--picture-card">
<li class="el-upload-list__item is-success"> <li class="el-upload-list__item is-success">
<img style="width: 100%; height: 100%" :src="posterUrl" /> <img style="width: 100%; height: 100%;" :src="posterUrl" />
</li> </li>
</ul> </ul>
</div> </div>
...@@ -52,8 +54,8 @@ ...@@ -52,8 +54,8 @@
</el-form> </el-form>
</div> </div>
</el-col> </el-col>
<el-col style="flex-basis: 370px"> <el-col style="flex-basis: 370px;">
<div class="g-card" style="height: 100%"> <div class="g-card" style="height: 100%;">
<div class="info_title">消息预览</div> <div class="info_title">消息预览</div>
<Preview :value="posterUrl"></Preview> <Preview :value="posterUrl"></Preview>
</div> </div>
...@@ -68,7 +70,7 @@ ...@@ -68,7 +70,7 @@
<div class="unit"> <div class="unit">
<div class="unit-item" v-if="form.type == 0" :class="{ active_item: form.type == 0 }"> <div class="unit-item" v-if="form.type == 0" :class="{ active_item: form.type == 0 }">
<div> <div>
<img class="icon-style" src="./assets/customer_active.png" alt="" /> <img class="icon-style" src="@/assets/image/customer_active.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">群发客户</div> <div class="item-title">群发客户</div>
...@@ -77,7 +79,7 @@ ...@@ -77,7 +79,7 @@
</div> </div>
<div class="unit-item" v-if="form.type == 1" :class="{ active_item: form.type == 1 }"> <div class="unit-item" v-if="form.type == 1" :class="{ active_item: form.type == 1 }">
<div> <div>
<img class="icon-style" src="./assets/group_active.png" alt="" /> <img class="icon-style" src="@/assets/image/group_active.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">群发客户群</div> <div class="item-title">群发客户群</div>
...@@ -86,7 +88,7 @@ ...@@ -86,7 +88,7 @@
</div> </div>
<div class="unit-item" v-if="form.type == 2" :class="{ active_item: form.type == 2 }"> <div class="unit-item" v-if="form.type == 2" :class="{ active_item: form.type == 2 }">
<div> <div>
<img class="icon-style" src="./assets/friends_active.png" alt="" /> <img class="icon-style" src="@/assets/image/friends_active.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">群发朋友圈</div> <div class="item-title">群发朋友圈</div>
...@@ -95,7 +97,7 @@ ...@@ -95,7 +97,7 @@
</div> </div>
<div class="unit-item" v-if="form.type == 3" :class="{ active_item: form.type == 3 }"> <div class="unit-item" v-if="form.type == 3" :class="{ active_item: form.type == 3 }">
<div> <div>
<img class="icon-style" src="./assets/app_active.png" alt="" /> <img class="icon-style" src="@/assets/image/app_active.png" alt="" />
</div> </div>
<div> <div>
<div class="item-title">应用消息</div> <div class="item-title">应用消息</div>
...@@ -116,20 +118,20 @@ ...@@ -116,20 +118,20 @@
</template> </template>
<script> <script>
import Statistics from './statistics' import Statistics from './statistics'
import Preview from './components/PreviewInPhone.vue' import Preview from './components/PreviewInPhone.vue'
import ShowShortLinkVue from './components/ShowShortLink.vue' import ShowShortLinkVue from './components/ShowShortLink.vue'
import Step3 from './components/Step3.vue' import Step3 from './components/Step3.vue'
import { getDetail } from './api' import { getDetail } from './api'
export default { export default {
name: 'short-link-popularize-detail', name: 'short-link-popularize-detail',
components: { components: {
Statistics, Statistics,
ShowShortLinkVue, ShowShortLinkVue,
Preview, Preview,
Step3, Step3
}, },
data() { data() {
return { return {
...@@ -140,7 +142,7 @@ export default { ...@@ -140,7 +142,7 @@ export default {
style: 0, style: 0,
materialId: '', materialId: '',
type: null, type: null,
attachments: [], attachments: []
}, },
choseDialog: false, choseDialog: false,
showShortLink: false, showShortLink: false,
...@@ -150,8 +152,8 @@ export default { ...@@ -150,8 +152,8 @@ export default {
statusType: [ statusType: [
{ name: '待推广', key: 0 }, { name: '待推广', key: 0 },
{ name: '推广中', key: 1 }, { name: '推广中', key: 1 },
{ name: '已结束', key: 2 }, { name: '已结束', key: 2 }
], ]
} }
}, },
methods: { methods: {
...@@ -175,19 +177,19 @@ export default { ...@@ -175,19 +177,19 @@ export default {
this.posterUrl = this.posterObj.materialUrl this.posterUrl = this.posterObj.materialUrl
} }
}) })
}, }
}, },
created() { created() {
this.id = this.$route.query.id this.id = this.$route.query.id
if (this.id) { if (this.id) {
this.getDetailFn() this.getDetailFn()
} }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.unit { .unit {
// margin: 0 auto; // margin: 0 auto;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -233,11 +235,11 @@ export default { ...@@ -233,11 +235,11 @@ export default {
border: 1px solid rgba(7, 193, 96, 1); border: 1px solid rgba(7, 193, 96, 1);
background-color: rgba(7, 193, 96, 0.09019607843137255); background-color: rgba(7, 193, 96, 0.09019607843137255);
} }
} }
.info_title { .info_title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #1d2129; color: #1d2129;
margin-bottom: 10px; margin-bottom: 10px;
} }
</style> </style>
...@@ -127,9 +127,7 @@ export default { ...@@ -127,9 +127,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
remove(id) { remove(id) {
const operIds = id || this.ids + '' const operIds = id || this.ids + ''
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
type: 'warning',
})
.then(function () { .then(function () {
return api.remove(operIds) return api.remove(operIds)
}) })
...@@ -200,9 +198,9 @@ export default { ...@@ -200,9 +198,9 @@ export default {
</div> </div>
<!-- 弹窗 --> <!-- 弹窗 -->
<el-dialog :title="form.id ? '修改' : '新建'" v-model="dialogVisible" :close-on-click-modal="false"> <el-dialog :title="form.id ? '修改' : '新建'" v-model="dialogVisible" :close-on-click-modal="false" width="auto">
<el-row> <div class="flex">
<el-col :span="12"> <div :span="12">
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="商品封面" prop="picture"> <el-form-item label="商品封面" prop="picture">
<upload v-model:fileUrl="form.picture" type="0" :maxSize="10" :format="['jpg', 'png']"> <upload v-model:fileUrl="form.picture" type="0" :maxSize="10" :format="['jpg', 'png']">
...@@ -234,8 +232,8 @@ export default { ...@@ -234,8 +232,8 @@ export default {
</upload> </upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </div>
<el-col :span="12"> <div :span="12">
<PhoneTemplate> <PhoneTemplate>
<div class="phone-content"> <div class="phone-content">
<el-image <el-image
...@@ -249,8 +247,8 @@ export default { ...@@ -249,8 +247,8 @@ export default {
<el-image v-for="(item, index) in fileList" class="commodity-img" :src="item.url" :key="index"></el-image> <el-image v-for="(item, index) in fileList" class="commodity-img" :src="item.url" :key="index"></el-image>
</div> </div>
</PhoneTemplate> </PhoneTemplate>
</el-col> </div>
</el-row> </div>
<template #footer> <template #footer>
<div class="dialog-footer ar"> <div class="dialog-footer ar">
<el-button type="primary" v-loading="submitLoading" @click="submit">确 定</el-button> <el-button type="primary" v-loading="submitLoading" @click="submit">确 定</el-button>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<el-image style="width: 50px; height: 50px; flex: none" :src="row.externalAvatar" fit="fill"></el-image> <el-image style="width: 50px; height: 50px; flex: none" :src="row.externalAvatar" fit="fill"></el-image>
<div class="ml10"> <div class="ml10">
<p>{{ row.externalName }}</p> <p>{{ row.externalName }}</p>
<!-- <i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[row.gender]]"></i> --> <!-- <el-icon-Avatar :class="['el-icon-Avatar', { 1: 'man', 2: 'woman' }[row.gender]]"/> -->
<span :style="{ color: row.externalType === 1 ? '#4bde03' : '#f9a90b' }"> <span :style="{ color: row.externalType === 1 ? '#4bde03' : '#f9a90b' }">
{{ { 1: '@微信', 2: '@企业微信' }[row.externalType] }} {{ { 1: '@微信', 2: '@企业微信' }[row.externalType] }}
</span> </span>
......
...@@ -29,15 +29,18 @@ export default { ...@@ -29,15 +29,18 @@ export default {
}, },
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
handler(val) {
if (!val || val.length !== 2) {
this.query.beginTime = '' this.query.beginTime = ''
this.query.endTime = '' this.query.endTime = ''
} else { } else {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = val
} }
}, },
}, },
},
created() { created() {
this.getList(1) this.getList(1)
this.$store.setBusininessDesc( this.$store.setBusininessDesc(
......
...@@ -37,14 +37,20 @@ export default { ...@@ -37,14 +37,20 @@ export default {
} }
}, },
watch: { watch: {
tags(tags) { tags: {
deep: true,
handler(tags) {
this.form.tagList = tags.map((t) => t.tagId) this.form.tagList = tags.map((t) => t.tagId)
}, },
users(users) { },
users: {
deep: true,
handler(users) {
this.form.emplList = users.map((u) => u.businessId) this.form.emplList = users.map((u) => u.businessId)
this.$refs.form.validateField('emplList') this.$refs.form.validateField('emplList')
}, },
}, },
},
created() { created() {
this.newGroupId = this.$route.query.id this.newGroupId = this.$route.query.id
this.newGroupId && this.getDetail(this.newGroupId) this.newGroupId && this.getDetail(this.newGroupId)
......
...@@ -33,15 +33,18 @@ export default { ...@@ -33,15 +33,18 @@ export default {
computed: {}, computed: {},
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
handler(val) {
if (!val || val.length !== 2) {
this.query.beginTime = '' this.query.beginTime = ''
this.query.endTime = '' this.query.endTime = ''
} else { } else {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = val
} }
}, },
}, },
},
created() { created() {
this.getList() this.getList()
this.$store.setBusininessDesc( this.$store.setBusininessDesc(
......
...@@ -193,27 +193,36 @@ export default { ...@@ -193,27 +193,36 @@ export default {
}, },
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
handler(val) {
if (!val || val.length !== 2) {
this.form.cusBeginTime = '' this.form.cusBeginTime = ''
this.form.cusEndTime = '' this.form.cusEndTime = ''
} else { } else {
;[this.form.cusBeginTime, this.form.cusEndTime] = dateRange ;[this.form.cusBeginTime, this.form.cusEndTime] = val
} }
}, },
users(users) { },
this.form.scopeList = users.map((user) => { users: {
deep: true,
handler(val) {
this.form.scopeList = val.map((user) => {
return user.userId return user.userId
}) })
this.$refs.form.validateField('scopeList') this.$refs.form.validateField('scopeList')
}, },
tags(tags) { },
this.form.tagList = tags.map((tag) => { tags: {
deep: true,
handler(val) {
this.form.tagList = val.map((tag) => {
return tag.tagId return tag.tagId
}) })
this.$refs.form.validateField('tagList') this.$refs.form.validateField('tagList')
}, },
}, },
},
created() { created() {
this.taskId = this.$route.query.id this.taskId = this.$route.query.id
this.taskId && this.getDetail(this.taskId) this.taskId && this.getDetail(this.taskId)
......
...@@ -54,14 +54,17 @@ export default { ...@@ -54,14 +54,17 @@ export default {
}, },
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
handler(val) {
if (!val || val.length !== 2) {
this.query.beginTime = '' this.query.beginTime = ''
this.query.endTime = '' this.query.endTime = ''
} else { } else {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = val
} }
}, },
},
dialogVisible(val) { dialogVisible(val) {
if (!val) this.$refs['customerForm'].resetFields() if (!val) this.$refs['customerForm'].resetFields()
this.customerList = [] this.customerList = []
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
content="仅统计话术中轨迹素材被查看情况统计,排行权重:查看总人数 > 查看总次数 > 发送总次数" content="仅统计话术中轨迹素材被查看情况统计,排行权重:查看总人数 > 查看总次数 > 发送总次数"
placement="top-start" placement="top-start"
> >
<i slot="reference" class="el-icon-QuestionFilled"></i> <el-icon-QuestionFilled slot="reference" class="el-icon-QuestionFilled"/>
</el-popover> --> </el-popover> -->
</div> </div>
<search-title :showToday="true" @search="getTableData" style="margin-top: 20px"></search-title> <search-title :showToday="true" @search="getTableData" style="margin-top: 20px"></search-title>
...@@ -511,6 +511,7 @@ export default { ...@@ -511,6 +511,7 @@ export default {
// console.log(669, this.mobForm) // console.log(669, this.mobForm)
}, },
immediate: true, immediate: true,
deep: true,
}, },
}, },
} }
......
...@@ -469,6 +469,8 @@ export default { ...@@ -469,6 +469,8 @@ export default {
remove(id) { remove(id) {
const Ids = id || this.selected + '' const Ids = id || this.selected + ''
this.$confirm('是否确认删除当前' + this.typeTitle[this.type] + '?该操作不可撤销,请谨慎操作。', '警告', { this.$confirm('是否确认删除当前' + this.typeTitle[this.type] + '?该操作不可撤销,请谨慎操作。', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(function () { .then(function () {
......
...@@ -521,7 +521,7 @@ export default { ...@@ -521,7 +521,7 @@ export default {
} }
this.setPosterBackgroundImage() this.setPosterBackgroundImage()
// 删除某个图层 // 删除图层按钮
let deleteBtn = document.getElementById('deleteBtn') let deleteBtn = document.getElementById('deleteBtn')
function addDeleteBtn(x, y) { function addDeleteBtn(x, y) {
...@@ -532,10 +532,15 @@ export default { ...@@ -532,10 +532,15 @@ export default {
} }
canvas.on('selection:created', function (e) { canvas.on('selection:created', function (e) {
addDeleteBtn(e.target.lineCoords.tr.x, e.target.lineCoords.tr.y) addDeleteBtn(e.selected[0].lineCoords.tr.x, e.selected[0].lineCoords.tr.y)
}) })
canvas.on('selection:updated', function (e) { canvas.on('selection:updated', function (e) {
addDeleteBtn(e.target.lineCoords.tr.x, e.target.lineCoords.tr.y) let activeObject = canvas.getActiveObject()
if (activeObject._objects?.length > 1) {
deleteBtn.style.display = 'none'
} else {
addDeleteBtn(e.selected[0].lineCoords.tr.x, e.selected[0].lineCoords.tr.y)
}
}) })
//通用事件另外写法 //通用事件另外写法
...@@ -620,23 +625,25 @@ export default { ...@@ -620,23 +625,25 @@ export default {
}) })
// alt键缩放 // alt键缩放
document.getElementById('canvas-wrap').addEventListener('wheel', (e) => { // document.getElementById('canvas-wrap').addEventListener('wheel', (e) => {
// e.stopPropagation() // // e.stopPropagation()
if (e.altKey) { // if (e.altKey) {
e.preventDefault() // e.preventDefault()
console.log(e) // console.log(e)
let zoom = (e.deltaY > 0 ? 0.1 : -0.1) + canvas.getZoom() // let zoom = (e.deltaY > 0 ? 0.1 : -0.1) + canvas.getZoom()
zoom = Math.max(0.1, zoom) //最小为原来的1/10 // zoom = Math.max(0.1, zoom) //最小为原来的1/10
zoom = Math.min(5, zoom) //最大是原来的5倍 // zoom = Math.min(5, zoom) //最大是原来的5倍
let zoomPoint = new fabric.Point(e.offsetX, e.offsetY) // let zoomPoint = new fabric.Point(e.offsetX, e.offsetY)
canvas.zoomToPoint(zoomPoint, zoom) // canvas.zoomToPoint(zoomPoint, zoom)
} // }
}) // })
deleteBtn.addEventListener('click', () => { deleteBtn.addEventListener('click', () => {
let activeObject = canvas.getActiveObject() let activeObject = canvas.getActiveObject()
if (activeObject) { if (activeObject) {
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {
canvas.remove(activeObject) canvas.remove(activeObject)
......
...@@ -346,6 +346,8 @@ export default { ...@@ -346,6 +346,8 @@ export default {
const Ids = id || this.selected + '' const Ids = id || this.selected + ''
let _this = this let _this = this
this.$confirm('是否确认删除当前' + this.typeTitle[this.type] + '?该操作不可撤销,请谨慎操作。', '警告', { this.$confirm('是否确认删除当前' + this.typeTitle[this.type] + '?该操作不可撤销,请谨慎操作。', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(function () { .then(function () {
......
...@@ -73,9 +73,7 @@ ...@@ -73,9 +73,7 @@
</el-table-column> </el-table-column>
<el-table-column label="客群标签" width="180px"> <el-table-column label="客群标签" width="180px">
<template #default="{ row }"> <template #default="{ row }">
<div> <tag-ellipsis v-if="row.tags" limit="2" :list="row.tags.split(',')"></tag-ellipsis>
<tag-ellipsis limit="2" :list="row.tags ? row.tags.split(',') : []"></tag-ellipsis>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活码客群数" align="center" width="120px" prop="chatGroupNum"> <el-table-column label="活码客群数" align="center" width="120px" prop="chatGroupNum">
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
content="仅统计话术中轨迹素材被查看情况统计,排行权重:查看总人数 > 查看总次数 > 发送总次数" content="仅统计话术中轨迹素材被查看情况统计,排行权重:查看总人数 > 查看总次数 > 发送总次数"
placement="top-start" placement="top-start"
> >
<i slot="reference" class="el-icon-QuestionFilled"></i> <el-icon-QuestionFilled slot="reference" class="el-icon-QuestionFilled"/>
</el-popover> --> </el-popover> -->
</div> </div>
<div> <div>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
content="仅统计话术中轨迹素材被查看情况统计,排行权重:查看总人数 > 查看总次数 > 发送总次数" content="仅统计话术中轨迹素材被查看情况统计,排行权重:查看总人数 > 查看总次数 > 发送总次数"
placement="top-start" placement="top-start"
> >
<i slot="reference" class="el-icon-QuestionFilled"></i> <el-icon-QuestionFilled slot="reference" class="el-icon-QuestionFilled"/>
</el-popover> --> </el-popover> -->
</div> </div>
<div> <div>
......
...@@ -168,9 +168,7 @@ export default { ...@@ -168,9 +168,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
remove(id) { remove(id) {
// const operIds = id || this.ids + ""; // const operIds = id || this.ids + "";
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
type: 'warning',
})
.then(() => { .then(() => {
return remove(id) return remove(id)
}) })
...@@ -184,9 +182,7 @@ export default { ...@@ -184,9 +182,7 @@ export default {
this.msgInfo('请勾选需要删除的项!') this.msgInfo('请勾选需要删除的项!')
return return
} }
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
type: 'warning',
})
.then(() => { .then(() => {
return remove(this.ids.join(',')) return remove(this.ids.join(','))
}) })
......
<script> <script>
import MaPage from '@/views/contentCenter/components/MaPage' import MaPage from '@/views/contentCenter/components/MaPage'
import PicTitContent from '@/views/contentCenter/components/PicTitContent' import PicTitContent from '@/views/contentCenter/components/PicTitContent'
export default { import { tsThisType } from '@babel/types'
export default {
name: 'MImageText', name: 'MImageText',
components: { MaPage, PicTitContent }, components: { MaPage, PicTitContent },
data() { data() {
return { return {
srcList: [], srcList: [],
ids: [], // 选中数组 ids: [], // 选中数组
dialogVisible: false,
currentType: 0,
poster: ''
} }
}, },
watch: {}, watch: {},
...@@ -20,11 +24,53 @@ export default { ...@@ -20,11 +24,53 @@ export default {
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id)
}, },
gotoSend(data) {
console.log(data)
this.dialogVisible = true
this.poster = data
}, },
} setTypeFn(type) {
this.currentType = type
},
gotoRoute() {
if (this.currentType == 0) {
this.$router.push({
path: '/customerMaintain/groupMessage/record/add',
query: {
posterId: this.poster.id,
chatType: 1
}
})
} else if (this.currentType == 1) {
this.$router.push({
path: '/customerMaintain/groupMessage/record/add',
query: {
posterId: this.poster.id,
chatType: 2
}
})
} else if (this.currentType == 2) {
this.$router.push({
path: '/customerMaintain/friendCircle/publish',
query: {
posterId: this.poster.id
}
})
} else {
this.$router.push({
path: '/enterpriseManage/internalCollaborate/appManage',
query: {
posterId: this.poster.materialUrl
}
})
}
}
}
}
</script> </script>
<template> <template>
<div>
<MaPage ref="page" type="5" @listChange="listChange" :selected="ids" v-slot="{ list }"> <MaPage ref="page" type="5" @listChange="listChange" :selected="ids" v-slot="{ list }">
<el-table :data="list" @selection-change="handleSelectionChange"> <el-table :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
...@@ -118,14 +164,113 @@ export default { ...@@ -118,14 +164,113 @@ export default {
</el-button> </el-button>
<el-button text @click="$refs.page.edit(scope.row)">编辑</el-button> <el-button text @click="$refs.page.edit(scope.row)">编辑</el-button>
<el-button text @click="$refs.page.remove(scope.row.id)">删除</el-button> <el-button text @click="$refs.page.remove(scope.row.id)">删除</el-button>
<el-button text @click="gotoSend(scope.row)">推广</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</MaPage> </MaPage>
<el-dialog title="推广方式" :close-on-click-modal="false" :show-close="false" v-model="dialogVisible" width="40%">
<div class="unit">
<div class="unit-item" :class="{ active_item: currentType == 0 }" @click="setTypeFn(0)">
<div>
<img v-if="currentType == 0" class="icon-style" src="@/assets/image/customer_active.png" alt="" />
<img v-else class="icon-style" src="@/assets/image/customer.png" alt="" />
</div>
<div>
<div class="item-title">群发客户</div>
<div class="item-text">员工将推广内容一键群发给客户</div>
</div>
</div>
<div class="unit-item" :class="{ active_item: currentType == 1 }" @click="setTypeFn(1)">
<div>
<img v-if="currentType == 1" class="icon-style" src="@/assets/image/group_active.png" alt="" />
<img v-else class="icon-style" src="@/assets/image/group.png" alt="" />
</div>
<div>
<div class="item-title">群发客户群</div>
<div class="item-text">员工将推广内容一键群发给客户群</div>
</div>
</div>
<div class="unit-item" :class="{ active_item: currentType == 2 }" @click="setTypeFn(2)">
<div>
<img v-if="currentType == 2" class="icon-style" src="@/assets/image/friends_active.png" alt="" />
<img v-else class="icon-style" src="@/assets/image/friends.png" alt="" />
</div>
<div>
<div class="item-title">群发朋友圈</div>
<div class="item-text">员工将推广内容一键群发到朋友圈</div>
</div>
</div>
<div class="unit-item" :class="{ active_item: currentType == 3 }" @click="setTypeFn(3)">
<div>
<img v-if="currentType == 3" class="icon-style" src="@/assets/image/app_active.png" alt="" />
<img v-else class="icon-style" src="@/assets/image/app.png" alt="" />
</div>
<div>
<div class="item-title">应用消息</div>
<div class="item-text">员工收到应用消息,选择客户发送</div>
</div>
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="gotoRoute">去推广</el-button>
</span>
</template>
</el-dialog>
</div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.img-wrap { .unit {
margin: 0 auto;
display: flex;
flex-wrap: wrap;
width: 580px;
justify-content: space-between;
.unit-item {
width: 280px;
height: 80px;
border-width: 1px;
border-style: solid;
border-color: rgba(242, 242, 242, 1);
border-radius: 5px;
display: flex;
padding: 17px;
margin-bottom: 20px;
cursor: pointer;
.icon-style {
margin-right: 10px;
margin-top: 7px;
font-size: 22px;
width: 24px;
// height: 20px;
}
.item-title {
margin-top: 4px;
font-size: 16px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #1d2129;
}
.item-text {
margin-top: 6px;
font-size: 12px;
color: #aaaaaa;
line-height: 24px;
}
&:hover {
border: 1px solid rgba(7, 193, 96, 1);
background-color: rgba(7, 193, 96, 0.09019607843137255);
}
}
.active_item {
border: 1px solid rgba(7, 193, 96, 1);
background-color: rgba(7, 193, 96, 0.09019607843137255);
}
}
.img-wrap {
position: relative; position: relative;
height: 0; height: 0;
padding: 70% 0 0 0; padding: 70% 0 0 0;
...@@ -133,8 +278,8 @@ export default { ...@@ -133,8 +278,8 @@ export default {
&:hover .actions { &:hover .actions {
opacity: 1; opacity: 1;
} }
} }
.actions { .actions {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 50px; height: 50px;
...@@ -149,9 +294,9 @@ export default { ...@@ -149,9 +294,9 @@ export default {
.el-icon-EditPen { .el-icon-EditPen {
margin-right: 20px; margin-right: 20px;
} }
} }
.el-image { .el-image {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
</style> </style>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<span :style="{ color: item.customerType === 1 ? '#4bde03' : '#f9a90b' }"> <span :style="{ color: item.customerType === 1 ? '#4bde03' : '#f9a90b' }">
{{ { 1: '@微信', 2: '@企业微信' }[item.customerType] }} {{ { 1: '@微信', 2: '@企业微信' }[item.customerType] }}
</span> </span>
<i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[item.gender]]"></i> <el-icon-Avatar :class="['el-icon-Avatar', { 1: 'man', 2: 'woman' }[item.gender]]"></el-icon-Avatar>
</el-col> </el-col>
</el-row> </el-row>
<div class="ac mt10 mb15"> <div class="ac mt10 mb15">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="chatContent" v-model="chatContent"
@keyup.enter="getChatList()"></el-input> @keyup.enter="getChatList()"></el-input>
<el-tabs v-model="activeName" @tab-click="getChatList()"> <el-tabs v-model="activeName" @tab-change="getChatList()">
<el-tab-pane label="单聊" name="0"> <el-tab-pane label="单聊" name="0">
<userList <userList
v-if="activeName == 0" v-if="activeName == 0"
...@@ -266,7 +266,7 @@ export default { ...@@ -266,7 +266,7 @@ export default {
} }
} }
.el-icon-s-custom { .el-icon-Avatar {
font-size: 16px; font-size: 16px;
margin-left: 4px; margin-left: 4px;
color: #999; color: #999;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="ct_box" style="height: calc(100vh - 197px)"> <div class="ct_box" style="height: calc(100vh - 197px)">
<template v-if="talkName"> <template v-if="talkName">
<div class="name pd15">{{ talkName }}</div> <div class="name pd15">{{ talkName }}</div>
<el-tabs v-model="activeName" @tab-click="tabClick(true)"> <el-tabs v-model="activeName" @tab-change="tabClick(true)">
<el-tab-pane label="内部联系人" name="0"> <el-tab-pane label="内部联系人" name="0">
<userList <userList
v-if="activeName == 0" v-if="activeName == 0"
......
<template> <template>
<div> <div>
<el-dialog title="查看详情" :close-on-click-modal="false" :show-close="false" v-model:visible="Pvisible"> <el-dialog title="查看详情" :close-on-click-modal="false" :show-close="false" v-model="Pvisible">
<el-tabs v-model="activeTab" @tab-click="(v) => opened.includes(v.name) || opened.push(v.name)"> <el-tabs v-model="activeTab" @tab-click="(v) => opened.includes(v.paneName) || opened.push(v.paneName)">
<el-tab-pane v-for="(item, index) of list" :key="index" :label="item.label" :name="item.type"> <el-tab-pane v-for="(item, index) of list" :key="index" :label="item.label" :name="item.type">
<chatListClassTab <chatListClassTab
v-if="opened.includes(item.type)" v-if="opened.includes(item.type)"
......
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
this.$router.push({ path: path, query: { id } }) this.$router.push({ path: path, query: { id } })
}, },
removeFn(id) { removeFn(id) {
this.$confirm('是否确认删除当前质检规则??', '提示', { this.$confirm('是否确认删除当前质检规则?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
......
<!-- 敏感行为警告页面 --> <!-- 敏感行为警告页面 -->
<template> <template>
<div class="alarming"> <div class="alarming">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-change="handleClick">
<el-tab-pane label="敏感记录" name="1"> <el-tab-pane label="敏感记录" name="1">
<el-table :data="recordSensitive" stripe style="width: 100%" :header-cell-style="{ background: '#fff' }"> <el-table :data="recordSensitive" stripe style="width: 100%" :header-cell-style="{ background: '#fff' }">
<el-table-column prop="createBy" label="操作员工"></el-table-column> <el-table-column prop="createBy" label="操作员工"></el-table-column>
......
...@@ -70,6 +70,7 @@ export default { ...@@ -70,6 +70,7 @@ export default {
watch: {}, watch: {},
computed: {}, computed: {},
created() { created() {
dictAddType.then((res) => (this.dictAddType = res))
this.getStage() this.getStage()
this.getList() this.getList()
this.getListTag() this.getListTag()
...@@ -343,11 +344,20 @@ export default { ...@@ -343,11 +344,20 @@ export default {
this.queryTag = selected this.queryTag = selected
this.dialogVisible = false this.dialogVisible = false
} else { } else {
let deleteTag = []
this.selectedTag.forEach((dd) => {
let index = selected.findIndex((item) => item.tagId == dd.tagId)
if (index == -1) {
deleteTag.push(dd)
}
})
let data = { let data = {
externalUserid: this.currentEidt.externalUserid, externalUserid: this.currentEidt.externalUserid,
removeTag: deleteTag,
addTag: selected, addTag: selected,
userId: this.currentEidt.firstUserId, userId: this.currentEidt.firstUserId,
} }
// let apiType = { // let apiType = {
// add: 'makeLabel', // add: 'makeLabel',
// remove: 'removeLabel' // remove: 'removeLabel'
...@@ -526,7 +536,7 @@ export default { ...@@ -526,7 +536,7 @@ export default {
<el-image class="avatar" :src="row.avatar" fit="fill"></el-image> <el-image class="avatar" :src="row.avatar" fit="fill"></el-image>
<div class="ml10"> <div class="ml10">
<p class="blod">{{ row.customerName }}</p> <p class="blod">{{ row.customerName }}</p>
<i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[row.gender]]"></i> <el-icon-Avatar :class="['el-icon-Avatar', { 1: 'man', 2: 'woman' }[row.gender]]" />
<span :style="{ color: row.customerType === 1 ? '#4bde03' : '#f9a90b' }"> <span :style="{ color: row.customerType === 1 ? '#4bde03' : '#f9a90b' }">
{{ { 1: '@微信', 2: '@企业微信' }[row.customerType] }} {{ { 1: '@微信', 2: '@企业微信' }[row.customerType] }}
</span> </span>
...@@ -641,7 +651,7 @@ export default { ...@@ -641,7 +651,7 @@ export default {
flex: none; flex: none;
border-radius: var(--border-radius-big); border-radius: var(--border-radius-big);
} }
.el-icon-s-custom { .el-icon-Avatar {
font-size: 16px; font-size: 16px;
// margin-left: 4px; // margin-left: 4px;
color: #999; color: #999;
......
...@@ -47,6 +47,7 @@ export default { ...@@ -47,6 +47,7 @@ export default {
computed: {}, computed: {},
watch: { watch: {
stageList: { stageList: {
deep: true,
immediate: true, immediate: true,
handler(val) { handler(val) {
if (val) { if (val) {
...@@ -266,44 +267,57 @@ export default { ...@@ -266,44 +267,57 @@ export default {
<div style="max-height: 450px; overflow: hidden auto"> <div style="max-height: 450px; overflow: hidden auto">
<el-row :gutter="20" type="type" class="pad10" justify="space-between" style="flex-wrap: wrap"> <el-row :gutter="20" type="type" class="pad10" justify="space-between" style="flex-wrap: wrap">
<template v-for="(item, index) in fieldList" :key="index"> <template v-for="(item, index) in fieldList" :key="index">
<template v-if="!['address', 'customerFullName'].includes(item.labelVal)">
<el-col :span="12" v-if="item.isDefault == 1"> <el-col :span="12" v-if="item.isDefault == 1">
<!-- <el-row class="baseinfo-row" v-if="item.labelVal == 'customerFullName'">
<!- 姓名 ->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.customerFullName || '无' }}</el-col>
</el-row> -->
<el-row class="baseinfo-row" v-if="item.labelVal == 'remarkMobiles'"> <el-row class="baseinfo-row" v-if="item.labelVal == 'remarkMobiles'">
<el-col :span="6">手机号</el-col> <!-- 手机号 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.phone || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.phone || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'age'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'age'">
<el-col :span="6">年龄</el-col> <!-- 年龄 -->
<el-col :span="18">{{ jsGetAge(portrayalSum.birthday) }}</el-col> <el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ jsGetAge(portrayalSum.bkirthday) }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'birthday'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'birthday'">
<el-col :span="6">生日</el-col> <!-- 生日 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.birthday || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.birthday || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'email'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'email'">
<el-col :span="6">邮箱</el-col> <!-- 邮箱 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.email || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.email || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'area'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'area'">
<el-col :span="6">地址</el-col> <!-- 地址 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.address || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.address || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'qq'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'qq'">
<el-col :span="6">QQ</el-col> <!-- QQ -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.qq || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.qq || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'position'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'position'">
<el-col :span="6">职业</el-col> <!-- 职业 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.position || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.position || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'remarkCorpName'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'remarkCorpName'">
<el-col :span="6">公司</el-col> <!-- 公司 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.corpName || '无' }}</el-col> <el-col :span="18">{{ portrayalSum.corpName || '无' }}</el-col>
</el-row> </el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'otherDescr'"> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'otherDescr'">
<el-col :span="6">其他描述</el-col> <!-- 其他描述 -->
<el-col :span="18"> <el-col :span="6">{{ item.labelName }}</el-col>
{{ portrayalSum.otherDescr || '无' }} <el-col :span="18">{{ portrayalSum.otherDescr || '无' }}</el-col>
</el-col>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="12" v-else> <el-col :span="12" v-else>
...@@ -335,6 +349,7 @@ export default { ...@@ -335,6 +349,7 @@ export default {
</template> </template>
</el-col> </el-col>
</template> </template>
</template>
</el-row> </el-row>
</div> </div>
</el-card> </el-card>
......
...@@ -47,6 +47,7 @@ export default { ...@@ -47,6 +47,7 @@ export default {
computed: {}, computed: {},
watch: { watch: {
stageList: { stageList: {
deep: true,
immediate: true, immediate: true,
handler(val) { handler(val) {
if (val) { if (val) {
......
...@@ -73,7 +73,6 @@ export default { ...@@ -73,7 +73,6 @@ export default {
}, },
/** 查询 */ /** 查询 */
getList(page) { getList(page) {
debugger
Object.assign(this.query, { Object.assign(this.query, {
externalUserid: this.$route.query.externalUserid, externalUserid: this.$route.query.externalUserid,
weUserId: this.userId, weUserId: this.userId,
......
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
} }
}, },
created() { created() {
dictAddType.then((res) => (this.dictAddType = res))
this.getDetail() this.getDetail()
this.getStage() this.getStage()
}, },
...@@ -103,7 +104,7 @@ export default { ...@@ -103,7 +104,7 @@ export default {
<div> <div>
{{ customer.customerName + (customer.corpName ? '-' + customer.corpName : '') }} {{ customer.customerName + (customer.corpName ? '-' + customer.corpName : '') }}
<i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[customer.gender]]"></i> <el-icon-Avatar :class="['el-icon-Avatar', { 1: 'man', 2: 'woman' }[customer.gender]]" />
</div> </div>
<div class="mt10"> <div class="mt10">
<span :style="{ color: customer.customerType === 1 ? '#4bde03' : '#f9a90b' }"> <span :style="{ color: customer.customerType === 1 ? '#4bde03' : '#f9a90b' }">
......
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
multiField(this.list) multiField(this.list)
}, },
dragSort() { dragSort() {
const el = this.$refs.table.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0] const el = this.$refs.table.$el.querySelectorAll('.el-table__body-wrapper table > tbody')[0]
this.sortable = Sortable.create(el, { this.sortable = Sortable.create(el, {
ghostClass: 'sortable-ghost', ghostClass: 'sortable-ghost',
setData: function (dataTransfer) { setData: function (dataTransfer) {
......
...@@ -238,12 +238,12 @@ export default { ...@@ -238,12 +238,12 @@ export default {
<el-table-column prop="tags" label="群标签" align="center"> <el-table-column prop="tags" label="群标签" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.tags"> <div v-if="row.tags">
<TagEllipsis :list="row.tagNames"></TagEllipsis> <TagEllipsis :list="row.tags"></TagEllipsis>
</div> </div>
<span v-else>无标签</span> <span v-else>无标签</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"></el-table-column> <el-table-column label="创建时间" align="center" prop="addTime" width="180"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button <el-button
......
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
<!-- <span <!-- <span
:style="{color: scope.row.joinType == 1 ? '#4bde03' : '#f9a90b'}" :style="{color: scope.row.joinType == 1 ? '#4bde03' : '#f9a90b'}"
>{{ ({1: '@微信', 2: '@企业微信'})[scope.row.joinType] }}</span>--> >{{ ({1: '@微信', 2: '@企业微信'})[scope.row.joinType] }}</span>-->
<!-- <i :class="['el-icon-s-custom', ({1: 'man', 2: 'woman'})[scope.row.gender]]"></i> --> <!-- <el-icon-Avatar :class="['el-icon-Avatar', ({1: 'man', 2: 'woman'})[scope.row.gender]]"/> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进群时间" prop="joinTime"></el-table-column> <el-table-column label="进群时间" prop="joinTime"></el-table-column>
......
...@@ -240,7 +240,7 @@ export default { ...@@ -240,7 +240,7 @@ export default {
<!-- <span :style="{ color: scope.row.type === 1 ? '#4bde03' : '#f9a90b' }">{{ <!-- <span :style="{ color: scope.row.type === 1 ? '#4bde03' : '#f9a90b' }">{{
{ 1: '@微信', 2: '@企业微信' }[scope.row.type] { 1: '@微信', 2: '@企业微信' }[scope.row.type]
}}</span> }}</span>
<i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[scope.row.gender]]"></i> --> <el-icon-Avatar :class="['el-icon-Avatar', { 1: 'man', 2: 'woman' }[scope.row.gender]]"/> -->
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="corpName" label="公司名称" align="center"></el-table-column> --> <!-- <el-table-column prop="corpName" label="公司名称" align="center"></el-table-column> -->
......
...@@ -104,7 +104,11 @@ export default { ...@@ -104,7 +104,11 @@ export default {
remove(id) { remove(id) {
const operIds = id || this.ids + '' const operIds = id || this.ids + ''
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning', type: 'warning',
confirmButtonText: '确定',
cancelButtonText: '取消',
}) })
.then(function () { .then(function () {
return api.remove(operIds) return api.remove(operIds)
......
...@@ -47,9 +47,7 @@ ...@@ -47,9 +47,7 @@
<el-table-column label="群主" align="center" prop="groupLeaderName" /> <el-table-column label="群主" align="center" prop="groupLeaderName" />
<el-table-column label="群标签" width="180"> <el-table-column label="群标签" width="180">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.tags"> <tag-ellipsis v-if="row.tags" :list="row.tags.split(',')" limit="1"></tag-ellipsis>
<tag-ellipsis :list="row.tags.split(',')" limit="1"></tag-ellipsis>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="群总人数 " align="center " prop="memberNum" /> <el-table-column label="群总人数 " align="center " prop="memberNum" />
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
rules: { rules: {
activityName: [{ required: true, message: '请输入活码名称', trigger: 'blur' }], activityName: [{ required: true, message: '请输入活码名称', trigger: 'blur' }],
chatIdList: [{ required: true, message: '请添加活码客群', trigger: 'blur' }], chatIdList: [{ required: true, message: '请添加活码客群', trigger: 'blur' }],
tagIds: [{ required: true, message: '请添加客群标签', trigger: 'blur' }], // tagIds: [{ required: true, message: '请添加客群标签', trigger: 'blur' }],
roomBaseName: [{ required: true, message: '请输入群名前缀', trigger: 'blur' }], roomBaseName: [{ required: true, message: '请输入群名前缀', trigger: 'blur' }],
roomBaseId: [{ required: true, message: '请输入群起始序号', trigger: 'blur' }], roomBaseId: [{ required: true, message: '请输入群起始序号', trigger: 'blur' }],
}, },
......
...@@ -26,7 +26,9 @@ export default { ...@@ -26,7 +26,9 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
deep: true,
handler(dateRange) {
if (!dateRange || dateRange.length !== 2) { if (!dateRange || dateRange.length !== 2) {
this.query.beginTime = '' this.query.beginTime = ''
this.query.endTime = '' this.query.endTime = ''
...@@ -35,6 +37,7 @@ export default { ...@@ -35,6 +37,7 @@ export default {
} }
}, },
}, },
},
created() { created() {
this.getList() this.getList()
}, },
......
...@@ -43,9 +43,7 @@ ...@@ -43,9 +43,7 @@
</el-table-column> </el-table-column>
<el-table-column label="客群标签" width="180px"> <el-table-column label="客群标签" width="180px">
<template #default="{ row }"> <template #default="{ row }">
<div> <tag-ellipsis v-if="row.tags" limit="2" :list="row.tags.split(',')"></tag-ellipsis>
<tag-ellipsis limit="2" :list="row.tags.split(',')"></tag-ellipsis>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="活码客群数" align="center" width="120px" prop="chatGroupNum"> <el-table-column label="活码客群数" align="center" width="120px" prop="chatGroupNum">
...@@ -246,7 +244,9 @@ export default { ...@@ -246,7 +244,9 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
deep: true,
handler(dateRange) {
if (!dateRange || dateRange.length !== 2) { if (!dateRange || dateRange.length !== 2) {
this.query.beginTime = '' this.query.beginTime = ''
this.query.endTime = '' this.query.endTime = ''
...@@ -254,6 +254,7 @@ export default { ...@@ -254,6 +254,7 @@ export default {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = dateRange
} }
}, },
},
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
realCodeDialog(val) { realCodeDialog(val) {
if (val === false) this.getGroupCodes() if (val === false) this.getGroupCodes()
......
...@@ -263,10 +263,10 @@ export default { ...@@ -263,10 +263,10 @@ export default {
<el-table-column property="welcomeMsg" show-overflow-tooltip></el-table-column> <el-table-column property="welcomeMsg" show-overflow-tooltip></el-table-column>
<el-table-column width="60"> <el-table-column width="60">
<template #default="{ row }"> <template #default="{ row }">
<i <el-icon-check
v-if="welSelected.id === row.id" v-if="welSelected.id === row.id"
class="el-icon-check" class="el-icon-check"
style="color: rgb(65, 133, 244); font-size: 25px"></i> style="color: rgb(65, 133, 244); font-size: 25px" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
...@@ -67,7 +66,6 @@ ...@@ -67,7 +66,6 @@
v-model:limit="query.pageSize" v-model:limit="query.pageSize"
@pagination="getList()" /> @pagination="getList()" />
</div> </div>
</div>
<!-- <div v-if="dialogVisible"> --> <!-- <div v-if="dialogVisible"> -->
<!-- 批量新建弹窗 --> <!-- 批量新建弹窗 -->
......
...@@ -173,7 +173,9 @@ export default { ...@@ -173,7 +173,9 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
deep: true,
handler(dateRange) {
if (!dateRange || dateRange.length !== 2) { if (!dateRange || dateRange.length !== 2) {
this.query.beginTime = '' this.query.beginTime = ''
this.query.endTime = '' this.query.endTime = ''
...@@ -181,6 +183,7 @@ export default { ...@@ -181,6 +183,7 @@ export default {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = dateRange
} }
}, },
},
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
// realCodeDialog(val) { // realCodeDialog(val) {
// if (val === false) this.getGroupCodes() // if (val === false) this.getGroupCodes()
......
...@@ -3,14 +3,14 @@ import draggable from 'vuedraggable' ...@@ -3,14 +3,14 @@ import draggable from 'vuedraggable'
import render from './generator/render' import render from './generator/render'
const components = { const components = {
itemBtns(element, index, parent) { itemBtns(element, index, parent) {
const { copyItem, deleteItem } = this.$attrs const { onCopyItem, onDeleteItem } = this.$attrs
return ( return (
<> <>
<span <span
class='drawing-item-copy ssc' class='drawing-item-copy ssc'
title='复制' title='复制'
onClick={(event) => { onClick={(event) => {
copyItem(element, parent) onCopyItem(element, parent)
event.stopPropagation() event.stopPropagation()
}}> }}>
<el-icon-CopyDocument class='el-icon-CopyDocument' /> <el-icon-CopyDocument class='el-icon-CopyDocument' />
...@@ -19,7 +19,7 @@ const components = { ...@@ -19,7 +19,7 @@ const components = {
class='drawing-item-delete ssc' class='drawing-item-delete ssc'
title='删除' title='删除'
onClick={(event) => { onClick={(event) => {
deleteItem(index, parent) onDeleteItem(index, parent)
event.stopPropagation() event.stopPropagation()
}}> }}>
<el-icon-delete class='el-icon-delete' /> <el-icon-delete class='el-icon-delete' />
...@@ -30,7 +30,7 @@ const components = { ...@@ -30,7 +30,7 @@ const components = {
} }
const layouts = { const layouts = {
colFormItem(element, index, parent) { colFormItem(element, index, parent) {
const { activeItem } = this.$attrs const { onActiveItem } = this.$attrs
console.log('element.formId', element.formId) console.log('element.formId', element.formId)
let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item' let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item'
//只是用顶部样式 //只是用顶部样式
...@@ -42,7 +42,7 @@ const layouts = { ...@@ -42,7 +42,7 @@ const layouts = {
span={element.span} span={element.span}
class={className} class={className}
onClick={(event) => { onClick={(event) => {
activeItem && activeItem(element) onActiveItem && onActiveItem(element)
event.stopPropagation() event.stopPropagation()
}}> }}>
<el-form-item <el-form-item
...@@ -80,7 +80,7 @@ const layouts = { ...@@ -80,7 +80,7 @@ const layouts = {
) )
}, },
rowFormItem(element, index, parent) { rowFormItem(element, index, parent) {
const { activeItem } = this.$attrs const { onActiveItem } = this.$attrs
const className = this.activeId === element.formId ? 'drawing-row-item active-from-item' : 'drawing-row-item' const className = this.activeId === element.formId ? 'drawing-row-item active-from-item' : 'drawing-row-item'
let child = renderChildren.apply(this, arguments) let child = renderChildren.apply(this, arguments)
if (element.type === 'flex') { if (element.type === 'flex') {
...@@ -97,7 +97,7 @@ const layouts = { ...@@ -97,7 +97,7 @@ const layouts = {
gutter={element.gutter} gutter={element.gutter}
class={className} class={className}
onClick={(event) => { onClick={(event) => {
activeItem && activeItem(element) onActiveItem && onActiveItem(element)
event.stopPropagation() event.stopPropagation()
}}> }}>
<span class='component-name'>{element.componentName}</span> <span class='component-name'>{element.componentName}</span>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<ul class="icon-ul"> <ul class="icon-ul">
<li v-for="icon in iconList" :key="icon" :class="active === icon ? 'active-item' : ''" @click="onSelect(icon)"> <li v-for="icon in iconList" :key="icon" :class="active === icon ? 'active-item' : ''" @click="onSelect(icon)">
<i :class="icon" /> <components :is="icon" :class="icon" />
<div>{{ icon }}</div> <div>{{ icon }}</div>
</li> </li>
</ul> </ul>
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
:min="0" :min="0"
:max="activeData.options.length" :max="activeData.options.length"
placeholder="至少应选" placeholder="至少应选"
@input="$set(activeData, 'maxZ', $event ? $event : undefined)" /> @input="activeData['maxZ'] = $event ? $event : undefined" />
</el-form-item> </el-form-item>
<el-form-item v-if="activeData.tag === 'el-checkbox-group'" label="最多可选"> <el-form-item v-if="activeData.tag === 'el-checkbox-group'" label="最多可选">
<el-input-number <el-input-number
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
:min="0" :min="0"
:max="activeData.options.length" :max="activeData.options.length"
placeholder="最多可选" placeholder="最多可选"
@input="$set(activeData, 'max', $event ? $event : undefined)" /> @input="activeData['max'] = $event ? $event : undefined" />
</el-form-item> </el-form-item>
<!-- <el-form-item v-if="activeData.prepend!==undefined" label="前缀"> <!-- <el-form-item v-if="activeData.prepend!==undefined" label="前缀">
<el-input v-model="activeData.prepend" placeholder="请输入前缀" /> <el-input v-model="activeData.prepend" placeholder="请输入前缀" />
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
</template> </template>
</draggable> </draggable>
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<el-button style="padding-bottom: 0" icon="el-icon-circle - plus - outline" text @click="addSelectItem"> <el-button style="padding-bottom: 0" icon="el-icon-CirclePlus" text @click="addSelectItem">
添加选项 添加选项
</el-button> </el-button>
</div> </div>
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
:expand-on-click-node="false" :expand-on-click-node="false"
:render-content="renderContent" /> :render-content="renderContent" />
<div v-if="activeData.dataType === 'static'" style="margin-left: 20px"> <div v-if="activeData.dataType === 'static'" style="margin-left: 20px">
<el-button style="padding-bottom: 0" icon="el-icon-circle - plus - outline" text @click="addTreeItem"> <el-button style="padding-bottom: 0" icon="el-icon-CirclePlus" text @click="addTreeItem">
添加父级 添加父级
</el-button> </el-button>
</div> </div>
...@@ -526,9 +526,9 @@ ...@@ -526,9 +526,9 @@
</el-scrollbar> </el-scrollbar>
</div> </div>
<treeNode-dialog v-model:visible="dialogVisible" title="添加选项" @commit="addNode" /> <treeNode-dialog v-model="dialogVisible" title="添加选项" @commit="addNode" />
<treeNode-dialog v-model:visible="ifEditor" title="修改选项名" @commit="EditorNode" /> <treeNode-dialog v-model="ifEditor" title="修改选项名" @commit="EditorNode" />
<icons-dialog v-model:visible="iconsVisible" :current="activeData[currentIconModel]" @select="setIcon" /> <icons-dialog v-model="iconsVisible" :current="activeData[currentIconModel]" @select="setIcon" />
</div> </div>
</template> </template>
...@@ -789,11 +789,11 @@ export default { ...@@ -789,11 +789,11 @@ export default {
addNode(data) { addNode(data) {
this.currentNode.push(data) this.currentNode.push(data)
console.log('this.currentNode', this.currentNode) // console.log('this.currentNode', this.currentNode)
}, },
EditorNode(data) { EditorNode(data) {
console.log('currentNode', this.currentNode) // console.log('currentNode', this.currentNode)
console.log('data', data) // console.log('data', data)
this.currentNode.label = data.label this.currentNode.label = data.label
this.currentNode.value = data.value this.currentNode.value = data.value
}, },
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
}, },
onClose() {}, onClose() {},
close() { close() {
this.$emit('update:visible', false) this.$emit('update:model-value', false)
}, },
handelConfirm() { handelConfirm() {
this.$refs.elForm.validate((valid) => { this.$refs.elForm.validate((valid) => {
......
...@@ -240,10 +240,11 @@ export const inputComponents = [ ...@@ -240,10 +240,11 @@ export const inputComponents = [
labelWidth: null, labelWidth: null,
style: { width: '100%' }, style: { width: '100%' },
ssq: '', ssq: '',
// props: { options: [],
// value: 'id', props: {
// label: 'name', value: 'id',
// }, label: 'name',
},
'show-all-levels': true, 'show-all-levels': true,
disabled: false, disabled: false,
clearable: true, clearable: true,
......
...@@ -19,9 +19,9 @@ const isAttr = makeMap( ...@@ -19,9 +19,9 @@ const isAttr = makeMap(
) )
function vModel(self, dataObject, defaultValue) { function vModel(self, dataObject, defaultValue) {
console.log('defaultValue111', defaultValue) // console.log('defaultValue111', defaultValue)
console.log('dataObject', dataObject) // console.log('dataObject', dataObject)
console.log('self', self) // console.log('self', self)
if (dataObject.formCodeId == 5 || dataObject.formCodeId == 625) { if (dataObject.formCodeId == 5 || dataObject.formCodeId == 625) {
if (defaultValue) { if (defaultValue) {
console.log('(/(^[1-9]d*$)/.test(defaultValue))', /(^[1-9]\d*$)/.test(defaultValue)) console.log('(/(^[1-9]d*$)/.test(defaultValue))', /(^[1-9]\d*$)/.test(defaultValue))
...@@ -47,9 +47,9 @@ function vModel(self, dataObject, defaultValue) { ...@@ -47,9 +47,9 @@ function vModel(self, dataObject, defaultValue) {
// console.log('dataObject.props', dataObject.props) // console.log('dataObject.props', dataObject.props)
dataObject['model-value'] = defaultValue dataObject['model-value'] = defaultValue
// dataObject.onInput = (val) => { dataObject.onInput = (val) => {
// self.$emit('input', val) self.$emit('input', val)
// } }
} }
const componentChild = { const componentChild = {
...@@ -146,12 +146,7 @@ const componentChild = { ...@@ -146,12 +146,7 @@ const componentChild = {
export default { export default {
props: ['conf'], props: ['conf'],
render() { render() {
const dataObject = { const dataObject = {}
// attrs: {},
// props: {},
// on: {},
// style: {},
}
const confClone = JSON.parse(JSON.stringify(this.conf)) const confClone = JSON.parse(JSON.stringify(this.conf))
const children = [] const children = []
...@@ -165,11 +160,13 @@ export default { ...@@ -165,11 +160,13 @@ export default {
}) })
} }
console.log('confClone', confClone.formCodeId) console.log('confClone', confClone.formCodeId)
Object.keys(confClone).forEach((key) => {
const val = confClone[key]
if (confClone.layout != 'rowFormItem') { if (confClone.layout != 'rowFormItem') {
vModel(this, dataObject, confClone.defaultValue) vModel(this, dataObject, confClone.defaultValue)
} }
Object.assign(dataObject, confClone)
// Object.keys(confClone).forEach((key) => {
// const val = confClone[key]
// if (key === 'style') { // if (key === 'style') {
// Object.assign(dataObject[key], val) // Object.assign(dataObject[key], val)
// } else if (!isAttr(key)) { // } else if (!isAttr(key)) {
...@@ -177,31 +174,15 @@ export default { ...@@ -177,31 +174,15 @@ export default {
// } else { // } else {
// dataObject.attrs[key] = val // dataObject.attrs[key] = val
// } // }
}) // })
Object.assign(dataObject, confClone)
// 配置省市区数据首次加载
// 配置省市区数据首次懒加载 if (confClone.formCodeId == 9 && !this.conf.options?.length) {
if (confClone.formCodeId == 9) {
dataObject.props = {
value: 'id',
label: 'name',
lazy: true,
lazyLoad(node, resolve) {
if (node.level == 0) {
getProvinceCityTree().then((data) => { getProvinceCityTree().then((data) => {
resolve(data) this.conf.options= data
}) })
} else {
if (node.level == 2) {
node.data.children.forEach((e) => (e.leaf = true))
}
resolve([])
}
},
}
} }
return h(resolveComponent(this.conf.tag), dataObject, children) return h(resolveComponent(this.conf.tag), dataObject, children?.length ? children : undefined)
}, },
} }
...@@ -398,7 +398,7 @@ export default { ...@@ -398,7 +398,7 @@ export default {
activeFormItem(element) { activeFormItem(element) {
this.activeData = element this.activeData = element
this.activeId = element.formId this.activeId = element.formId
// this.$forceUpdate() this.$forceUpdate()
}, },
onEnd(obj, a) { onEnd(obj, a) {
if (obj.from !== obj.to) { if (obj.from !== obj.to) {
...@@ -460,7 +460,11 @@ export default { ...@@ -460,7 +460,11 @@ export default {
document.getElementById('copyNode').click() document.getElementById('copyNode').click()
}, },
empty() { empty() {
this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(() => { this.$confirm('确定要清空所有组件吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
this.drawingList = [] this.drawingList = []
}) })
}, },
......
...@@ -14,10 +14,13 @@ export default { ...@@ -14,10 +14,13 @@ export default {
}) })
}, },
watch: { watch: {
Datas() { Datas: {
deep: true,
handler() {
this.initEchart() this.initEchart()
}, },
}, },
},
props: ['Datas'], props: ['Datas'],
data() { data() {
return { return {
......
...@@ -28,12 +28,15 @@ export default { ...@@ -28,12 +28,15 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
deep: true,
handler() {
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart() this.drawChart()
}) })
}, },
}, },
},
created() {}, created() {},
mounted() { mounted() {
this.drawChart() this.drawChart()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!