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