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 924 additions and 740 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,10 +48,13 @@ export default { ...@@ -48,10 +48,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.$nextTick(() => { deep: true,
this.drawChart() handler(val) {
}) this.$nextTick(() => {
this.drawChart()
})
},
}, },
}, },
created() {}, created() {},
......
...@@ -49,10 +49,13 @@ export default { ...@@ -49,10 +49,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.$nextTick(() => { deep: true,
this.drawChart() handler() {
}) this.$nextTick(() => {
this.drawChart()
})
},
}, },
}, },
created() {}, created() {},
......
...@@ -36,8 +36,11 @@ export default { ...@@ -36,8 +36,11 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.drawChart() deep: true,
handler() {
this.drawChart()
},
}, },
}, },
created() {}, created() {},
......
...@@ -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"
...@@ -136,7 +139,7 @@ export default { ...@@ -136,7 +139,7 @@ export default {
} }
return str return str
}, },
listChange(list, type) { listChange(list, type) {
this.paneList = this.paneList.map((item) => { this.paneList = this.paneList.map((item) => {
if (type === item.type) { if (type === item.type) {
item.list.forEach((one) => { item.list.forEach((one) => {
......
...@@ -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,11 +39,18 @@ export default { ...@@ -39,11 +39,18 @@ export default {
}, },
}, },
watch: { watch: {
routes() { routes: {
this.searchPool = this.generateRoutes(this.routes) deep: true,
handler() {
this.searchPool = this.generateRoutes(this.routes)
},
}, },
searchPool(list) {
this.initFuse(list) searchPool: {
deep: true,
handler(list) {
this.initFuse(list)
},
}, },
show(value) { show(value) {
if (value) { if (value) {
......
...@@ -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,11 +41,17 @@ export default { ...@@ -41,11 +41,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -43,20 +43,23 @@ export default { ...@@ -43,20 +43,23 @@ export default {
} }
}, },
watch: { watch: {
defaultValues(value) { defaultValues: {
const checkedUserList = [] deep: true,
if (!Array.isArray(value) || value.length == 0) { handler(value) {
this.userList = [] const checkedUserList = []
} else { if (!Array.isArray(value) || value.length == 0) {
value.forEach((i) => { this.userList = []
const id = i.deptId } else {
if (id) { value.forEach((i) => {
checkedUserList.push(i) const id = i.deptId
} if (id) {
}) checkedUserList.push(i)
console.log(checkedUserList) }
this.userList = checkedUserList })
} console.log(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))
......
...@@ -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,11 +40,17 @@ export default { ...@@ -40,11 +40,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
...@@ -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,11 +117,17 @@ export default { ...@@ -117,11 +117,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -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,11 +43,17 @@ export default { ...@@ -43,11 +43,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
...@@ -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>
......
...@@ -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,122 +26,122 @@ ...@@ -26,122 +26,122 @@
</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) { // this.$forceUpdate()
// this.$forceUpdate() },
poster() {
// this.$forceUpdate()
}
}, },
poster() { data() {
// this.$forceUpdate() return {
list: []
}
}, },
}, created() {},
data() { mounted() {},
return { methods: {}
list: [], }
}
},
created() {},
mounted() {},
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;
height: 640px; height: 640px;
background: url(../../../../assets/drainageCode/preview-bg.png); background: url(../../../../assets/drainageCode/preview-bg.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {
position: absolute; position: absolute;
top: 37px; top: 37px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
.content { .content {
// text-align: center; // text-align: center;
position: absolute; position: absolute;
height: 545px; height: 545px;
width: 280px; width: 280px;
overflow-y: auto; overflow-y: auto;
top: 70px; top: 70px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
border-bottom-left-radius: 20px; border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px; border-bottom-right-radius: 20px;
.header_bg { .header_bg {
height: 200px; height: 200px;
background-color: #cdf3df; background-color: #cdf3df;
position: relative; position: relative;
.header { .header {
height: 48px; height: 48px;
width: 48px; width: 48px;
position: absolute; position: absolute;
bottom: -25px; bottom: -25px;
right: 16px; right: 16px;
}
}
.header_con {
padding: 0 20px;
margin-top: 60px;
.img {
display: flex;
align-items: center;
.name {
margin-left: 10px;
font-size: 14px;
font-weight: 600;
color: #596c94;
} }
} }
.circle_con { .header_con {
margin-left: 42px; padding: 0 20px;
// margin-top: 10px; margin-top: 60px;
.word { .img {
font-size: 14px; display: flex;
font-weight: 400; align-items: center;
color: #191919; .name {
margin-left: 10px;
font-size: 14px;
font-weight: 600;
color: #596c94;
}
} }
.code_img { .circle_con {
height: 140px; margin-left: 42px;
width: 140px; // margin-top: 10px;
margin: 5px auto; .word {
font-size: 14px;
font-weight: 400;
color: #191919;
}
.code_img {
height: 140px;
width: 140px;
margin: 5px auto;
}
} }
} }
} }
} }
} .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,11 +90,17 @@ export default { ...@@ -90,11 +90,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -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,152 +5,148 @@ ...@@ -5,152 +5,148 @@
: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: {
data: {
type: Object,
default: {},
}, },
props: { isDetail: {
data: { type: Boolean,
type: Object, default: false,
default: {}
},
isDetail: {
type: Boolean,
default: false
}
}, },
watch: { },
data: { watch: {
handler(val, old) { data: {
if (val) { handler(val, old) {
this.form = val if (val) {
this.setData() this.form = val
} this.setData()
}, }
deep: true, },
immediate: true deep: true,
} immediate: true,
}, },
data() { },
return { data() {
attachmentsData: { return {
templateInfo: '', attachmentsData: {
attachments: [] templateInfo: '',
attachments: [],
},
previewData: [],
form: {
type: 0,
group: {
content: '',
type: 0,
userIds: '',
sendType: 0,
taskSendTime: '',
taskEndTime: '',
}, },
previewData: [], attachmentsList: [],
form: { senderList: [],
},
}
},
methods: {
setData() {
if (!this.form.group) {
this.form.group = {
type: 0, type: 0,
group: { content: '',
content: '', userIds: '',
type: 0, sendType: 0,
userIds: '', taskSendTime: '',
sendType: 0, taskEndTime: '',
taskSendTime: '',
taskEndTime: ''
},
attachmentsList: [],
senderList: []
} }
} }
}, if (!this.form.attachments) {
methods: { this.form.attachments = []
setData() { }
if (!this.form.group) { if (this.form.attachments) {
this.form.group = { let arr = []
type: 0, this.form.attachments.forEach((dd) => {
content: '', if (dd.msgType !== 'text') {
userIds: '', arr.push(dd)
sendType: 0,
taskSendTime: '',
taskEndTime: ''
} }
} })
if (!this.form.attachments) { this.attachmentsData.templateInfo = this.form.group.content
this.form.attachments = [] let data = setAttachments(arr)
} this.attachmentsData.attachments = data
if (this.form.attachments) {
let arr = []
this.form.attachments.forEach((dd) => {
if (dd.msgType !== 'text') {
arr.push(dd)
}
})
this.attachmentsData.templateInfo = this.form.group.content
let data = setAttachments(arr)
this.attachmentsData.attachments = data
this.$emit('preview', {
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments))
})
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
}
},
changeInfo(data) {
this.form.group.content = data
this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: data })
},
getPhoneData(data) {
this.previewData = data
this.$emit('preview', { this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo, previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)),
previewData: JSON.parse(JSON.stringify(data))
}) })
}, this.$emit('previewText', { templateInfo: this.attachmentsData.templateInfo })
getAttentment(data) {
this.form.attachments = data
this.$emit('update', this.form)
},
getSendType(data) {
this.form.group.sendType = data.sendType
this.form.group.taskSendTime = dateFormat(data.taskSendTime)
this.$emit('update', this.form)
},
getEndDate(data) {
this.form.group.taskEndTime = dateFormat(data.taskEndTime)
this.$emit('update', this.form)
},
getUpdateCustomer(data) {
this.form.group = data
this.$emit('update', this.form)
} }
} },
} changeInfo(data) {
this.form.group.content = data
this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: data })
},
getPhoneData(data) {
this.previewData = data
this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(data)),
})
},
getAttentment(data) {
this.form.attachments = data
this.$emit('update', this.form)
},
getSendType(data) {
this.form.group.sendType = data.sendType
this.form.group.taskSendTime = dateFormat(data.taskSendTime)
this.$emit('update', this.form)
},
getEndDate(data) {
this.form.group.taskEndTime = dateFormat(data.taskEndTime)
this.$emit('update', this.form)
},
getUpdateCustomer(data) {
this.form.group = data
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,128 +118,128 @@ ...@@ -116,128 +118,128 @@
</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() {
return {
activeName: 'first',
form: {
taskName: '',
shortLinkId: '',
style: 0,
materialId: '',
type: null,
attachments: [],
},
choseDialog: false,
showShortLink: false,
shortLinkObj: [],
posterUrl: '',
posterObj: {},
statusType: [
{ name: '待推广', key: 0 },
{ name: '推广中', key: 1 },
{ name: '已结束', key: 2 },
],
}
},
methods: {
setStatus(data) {
let str = ''
this.statusType.forEach((dd) => {
if (dd.key == data.taskStatus) {
str = dd.name
}
})
return str
}, },
getDetailFn() { data() {
getDetail(this.id).then((res) => { return {
this.form = res.data activeName: 'first',
if (this.form.shortLinkId) { form: {
this.shortLinkObj = [this.form.shortLink] taskName: '',
} shortLinkId: '',
if (this.form.style == 1) { style: 0,
this.posterObj = this.form.weMaterial materialId: '',
this.posterUrl = this.posterObj.materialUrl type: null,
} attachments: []
}) },
choseDialog: false,
showShortLink: false,
shortLinkObj: [],
posterUrl: '',
posterObj: {},
statusType: [
{ name: '待推广', key: 0 },
{ name: '推广中', key: 1 },
{ name: '已结束', key: 2 }
]
}
},
methods: {
setStatus(data) {
let str = ''
this.statusType.forEach((dd) => {
if (dd.key == data.taskStatus) {
str = dd.name
}
})
return str
},
getDetailFn() {
getDetail(this.id).then((res) => {
this.form = res.data
if (this.form.shortLinkId) {
this.shortLinkObj = [this.form.shortLink]
}
if (this.form.style == 1) {
this.posterObj = this.form.weMaterial
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;
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; display: flex;
padding: 17px; flex-wrap: wrap;
margin-bottom: 20px; // width: 580px;
// cursor: pointer; justify-content: space-between;
.icon-style { .unit-item {
margin-right: 10px; width: 280px;
margin-top: 7px; // height: 80px;
font-size: 22px; border-width: 1px;
width: 24px; border-style: solid;
// height: 20px; border-color: rgba(242, 242, 242, 1);
} border-radius: 5px;
.item-title { display: flex;
margin-top: 4px; padding: 17px;
font-size: 16px; margin-bottom: 20px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN; // cursor: pointer;
font-weight: 400; .icon-style {
color: #1d2129; margin-right: 10px;
} margin-top: 7px;
.item-text { font-size: 22px;
margin-top: 6px; width: 24px;
font-size: 12px; // height: 20px;
color: #aaaaaa; }
line-height: 24px; .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);
}
} }
&:hover { .active_item {
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);
} }
} }
.active_item { .info_title {
border: 1px solid rgba(7, 193, 96, 1); font-size: 16px;
background-color: rgba(7, 193, 96, 0.09019607843137255); font-weight: 600;
color: #1d2129;
margin-bottom: 10px;
} }
}
.info_title {
font-size: 16px;
font-weight: 600;
color: #1d2129;
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,13 +29,16 @@ export default { ...@@ -29,13 +29,16 @@ export default {
}, },
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(val) {
this.query.endTime = '' if (!val || val.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = val
}
},
}, },
}, },
created() { created() {
......
...@@ -37,12 +37,18 @@ export default { ...@@ -37,12 +37,18 @@ export default {
} }
}, },
watch: { watch: {
tags(tags) { tags: {
this.form.tagList = tags.map((t) => t.tagId) deep: true,
handler(tags) {
this.form.tagList = tags.map((t) => t.tagId)
},
}, },
users(users) { users: {
this.form.emplList = users.map((u) => u.businessId) deep: true,
this.$refs.form.validateField('emplList') handler(users) {
this.form.emplList = users.map((u) => u.businessId)
this.$refs.form.validateField('emplList')
},
}, },
}, },
created() { created() {
......
...@@ -33,13 +33,16 @@ export default { ...@@ -33,13 +33,16 @@ export default {
computed: {}, computed: {},
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(val) {
this.query.endTime = '' if (!val || val.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = val
}
},
}, },
}, },
created() { created() {
......
...@@ -193,25 +193,34 @@ export default { ...@@ -193,25 +193,34 @@ export default {
}, },
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.form.cusBeginTime = '' handler(val) {
this.form.cusEndTime = '' if (!val || val.length !== 2) {
} else { this.form.cusBeginTime = ''
;[this.form.cusBeginTime, this.form.cusEndTime] = dateRange this.form.cusEndTime = ''
} } else {
;[this.form.cusBeginTime, this.form.cusEndTime] = val
}
},
}, },
users(users) { users: {
this.form.scopeList = users.map((user) => { deep: true,
return user.userId handler(val) {
}) this.form.scopeList = val.map((user) => {
this.$refs.form.validateField('scopeList') return user.userId
})
this.$refs.form.validateField('scopeList')
},
}, },
tags(tags) { tags: {
this.form.tagList = tags.map((tag) => { deep: true,
return tag.tagId handler(val) {
}) this.form.tagList = val.map((tag) => {
this.$refs.form.validateField('tagList') return tag.tagId
})
this.$refs.form.validateField('tagList')
},
}, },
}, },
created() { created() {
......
...@@ -54,13 +54,16 @@ export default { ...@@ -54,13 +54,16 @@ export default {
}, },
watch: { watch: {
// 日期选择器数据同步至查询参数 // 日期选择器数据同步至查询参数
dateRange(dateRange) { dateRange: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(val) {
this.query.endTime = '' if (!val || val.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = val
}
},
}, },
dialogVisible(val) { dialogVisible(val) {
if (!val) this.$refs['customerForm'].resetFields() if (!val) this.$refs['customerForm'].resetFields()
......
...@@ -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(','))
}) })
......
...@@ -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,57 +267,61 @@ export default { ...@@ -266,57 +267,61 @@ 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">
<el-col :span="12" v-if="item.isDefault == 1"> <template v-if="!['address', 'customerFullName'].includes(item.labelVal)">
<el-row class="baseinfo-row" v-if="item.labelVal == 'remarkMobiles'"> <el-col :span="12" v-if="item.isDefault == 1">
<el-col :span="6">手机号</el-col> <!-- <el-row class="baseinfo-row" v-if="item.labelVal == 'customerFullName'">
<el-col :span="18">{{ portrayalSum.phone || '无' }}</el-col> <!- 姓名 ->
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'age'">
<el-col :span="6">年龄</el-col>
<el-col :span="18">{{ jsGetAge(portrayalSum.birthday) }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'birthday'">
<el-col :span="6">生日</el-col>
<el-col :span="18">{{ portrayalSum.birthday || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'email'">
<el-col :span="6">邮箱</el-col>
<el-col :span="18">{{ portrayalSum.email || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'area'">
<el-col :span="6">地址</el-col>
<el-col :span="18">{{ portrayalSum.address || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'qq'">
<el-col :span="6">QQ</el-col>
<el-col :span="18">{{ portrayalSum.qq || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'position'">
<el-col :span="6">职业</el-col>
<el-col :span="18">{{ portrayalSum.position || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'remarkCorpName'">
<el-col :span="6">公司</el-col>
<el-col :span="18">{{ portrayalSum.corpName || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-if="item.labelVal == 'otherDescr'">
<el-col :span="6">其他描述</el-col>
<el-col :span="18">
{{ portrayalSum.otherDescr || '无' }}
</el-col>
</el-row>
</el-col>
<el-col :span="12" v-else>
<template v-if="item.type !== 3">
<el-row class="baseinfo-row">
<el-col :span="6">{{ item.labelName }}</el-col> <el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18"> <el-col :span="18">{{ portrayalSum.customerFullName || '无' }}</el-col>
{{ item.value || '无' }} </el-row> -->
</el-col> <el-row class="baseinfo-row" v-if="item.labelVal == 'remarkMobiles'">
<!-- 手机号 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.phone || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'age'">
<!-- 年龄 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ jsGetAge(portrayalSum.bkirthday) }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'birthday'">
<!-- 生日 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.birthday || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'email'">
<!-- 邮箱 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.email || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'area'">
<!-- 地址 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.address || '无' }}</el-col>
</el-row> </el-row>
</template> <el-row class="baseinfo-row" v-else-if="item.labelVal == 'qq'">
<template v-else> <!-- QQ -->
<template v-if="item.typeSub == 1"> <el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.qq || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'position'">
<!-- 职业 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.position || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'remarkCorpName'">
<!-- 公司 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.corpName || '无' }}</el-col>
</el-row>
<el-row class="baseinfo-row" v-else-if="item.labelVal == 'otherDescr'">
<!-- 其他描述 -->
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">{{ portrayalSum.otherDescr || '无' }}</el-col>
</el-row>
</el-col>
<el-col :span="12" v-else>
<template v-if="item.type !== 3">
<el-row class="baseinfo-row"> <el-row class="baseinfo-row">
<el-col :span="6">{{ item.labelName }}</el-col> <el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18"> <el-col :span="18">
...@@ -325,15 +330,25 @@ export default { ...@@ -325,15 +330,25 @@ export default {
</el-row> </el-row>
</template> </template>
<template v-else> <template v-else>
<el-row class="baseinfo-row"> <template v-if="item.typeSub == 1">
<el-col :span="6">{{ item.labelName }}</el-col> <el-row class="baseinfo-row">
<el-col :span="18"> <el-col :span="6">{{ item.labelName }}</el-col>
{{ item.value.join(',') || '无' }} <el-col :span="18">
</el-col> {{ item.value || '无' }}
</el-row> </el-col>
</el-row>
</template>
<template v-else>
<el-row class="baseinfo-row">
<el-col :span="6">{{ item.labelName }}</el-col>
<el-col :span="18">
{{ item.value.join(',') || '无' }}
</el-col>
</el-row>
</template>
</template> </template>
</template> </el-col>
</el-col> </template>
</template> </template>
</el-row> </el-row>
</div> </div>
......
...@@ -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,13 +26,16 @@ export default { ...@@ -26,13 +26,16 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(dateRange) {
this.query.endTime = '' if (!dateRange || dateRange.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = dateRange
}
},
}, },
}, },
created() { created() {
......
...@@ -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,13 +244,16 @@ export default { ...@@ -246,13 +244,16 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(dateRange) {
this.query.endTime = '' if (!dateRange || dateRange.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = dateRange
}
},
}, },
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
realCodeDialog(val) { realCodeDialog(val) {
......
...@@ -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,14 +59,12 @@ ...@@ -59,14 +59,12 @@
</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" v-model:page="query.pageNum"
v-model:page="query.pageNum" 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,13 +173,16 @@ export default { ...@@ -173,13 +173,16 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(dateRange) {
this.query.endTime = '' if (!dateRange || dateRange.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = dateRange
}
},
}, },
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
// realCodeDialog(val) { // realCodeDialog(val) {
......
...@@ -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) => { if (confClone.layout != 'rowFormItem') {
const val = confClone[key] vModel(this, dataObject, confClone.defaultValue)
if (confClone.layout != 'rowFormItem') { }
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) { getProvinceCityTree().then((data) => {
dataObject.props = { this.conf.options= data
value: 'id', })
label: 'name',
lazy: true,
lazyLoad(node, resolve) {
if (node.level == 0) {
getProvinceCityTree().then((data) => {
resolve(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,8 +14,11 @@ export default { ...@@ -14,8 +14,11 @@ export default {
}) })
}, },
watch: { watch: {
Datas() { Datas: {
this.initEchart() deep: true,
handler() {
this.initEchart()
},
}, },
}, },
props: ['Datas'], props: ['Datas'],
......
...@@ -28,10 +28,13 @@ export default { ...@@ -28,10 +28,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.$nextTick(() => { deep: true,
this.drawChart() handler() {
}) this.$nextTick(() => {
this.drawChart()
})
},
}, },
}, },
created() {}, created() {},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!