Commit 7dfb4aea by xinla

活码详情显示问题

1 parent 8933dad3
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
<div> <div>
<!-- 新建欢迎语 --> <!-- 新建欢迎语 -->
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col <el-col :span="!showPhone ? 24 : 16" :class="!showPhone ? 'mt10' : 'boxClass'" class="left radius">
:span="!showPhone ? 24 : 16"
:class="!showPhone ? 'mt10' : 'boxClass'"
class="left radius"
>
<div class="g-card" v-if="showModle"> <div class="g-card" v-if="showModle">
<el-button type="primary" @click="welcomVisible = true">从模板库中选择</el-button> <el-button type="primary" @click="welcomVisible = true">从模板库中选择</el-button>
</div> </div>
...@@ -14,8 +10,7 @@ ...@@ -14,8 +10,7 @@
<div <div
class="g-card-title" class="g-card-title"
v-if="iswelcom || (moduleType === 4 && otherType !== 3)" v-if="iswelcom || (moduleType === 4 && otherType !== 3)"
style="margin-bottom: 20px" style="margin-bottom: 20px">
>
{{ titleOne }} {{ titleOne }}
<el-popover trigger="hover" content="最多发送1条文字信息" placement="top-start"> <el-popover trigger="hover" content="最多发送1条文字信息" placement="top-start">
<template #reference> <template #reference>
...@@ -28,32 +23,15 @@ ...@@ -28,32 +23,15 @@
<el-cascader <el-cascader
v-model="talkForm.categoryId" v-model="talkForm.categoryId"
:options="treeData[0].children" :options="treeData[0].children"
:props="groupProps" :props="groupProps"></el-cascader>
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="话术标题" prop="talkTitle" v-if="moduleType !== 3 && moduleType !== 4">
label="话术标题" <el-input v-model="talkForm.talkTitle" placeholder="请输入标题" maxlength="30" show-word-limit></el-input>
prop="talkTitle"
v-if="moduleType !== 3 && moduleType !== 4"
>
<el-input
v-model="talkForm.talkTitle"
placeholder="请输入标题"
maxlength="30"
show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="使用员工" required v-if="iswelcom && tplType === '2'" :error="userInfo">
label="使用员工"
required
v-if="iswelcom && tplType === '2'"
:error="userInfo"
>
<el-tag sizi="mini" v-for="(unit, key) in users" :key="key">{{ unit.name }}</el-tag> <el-tag sizi="mini" v-for="(unit, key) in users" :key="key">{{ unit.name }}</el-tag>
<div> <div>
<el-button type="primary" plain @click="onSelectUser" :error="userInfo" <el-button type="primary" plain @click="onSelectUser" :error="userInfo">选择员工</el-button>
>选择员工</el-button
>
</div> </div>
<div class="sub-des"> <div class="sub-des">
员工被设置多个欢迎语时,以最新设置或修改的为准,如果通过活码添加,则只推送活码欢迎语 员工被设置多个欢迎语时,以最新设置或修改的为准,如果通过活码添加,则只推送活码欢迎语
...@@ -64,15 +42,11 @@ ...@@ -64,15 +42,11 @@
required required
style="margin-right: 200px !important" style="margin-right: 200px !important"
:error="templateInfo" :error="templateInfo"
v-if="[3, 4].includes(moduleType)" v-if="[3, 4].includes(moduleType)">
>
<div v-if="tips" class="tips">{{ tips }}</div> <div v-if="tips" class="tips">{{ tips }}</div>
<TextareaExtend <TextareaExtend
v-model="talkForm.templateInfo" v-model="talkForm.templateInfo"
:toolbar="[ :toolbar="['emoji', (iswelcom || [1, 4].includes(otherType)) && 'insertCustomerNickName']"
'emoji',
(iswelcom || [1, 4].includes(otherType)) && 'insertCustomerNickName',
]"
maxlength="2000" maxlength="2000"
show-word-limit show-word-limit
placeholder="请输入" placeholder="请输入"
...@@ -80,19 +54,14 @@ ...@@ -80,19 +54,14 @@
clearable clearable
:autofocus="true" :autofocus="true"
@input="changeInfo" @input="changeInfo"
:nikeName="tplType === '3' ? '%NICKNAME%' : '#客户昵称#'" :nikeName="tplType === '3' ? '%NICKNAME%' : '#客户昵称#'" />
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="g-card" v-if="!detail"> <div class="g-card" v-if="!detail">
<div class="g-card-title" v-if="otherType !== 3"> <div class="g-card-title" v-if="otherType !== 3">
{{ titleTwo }} {{ titleTwo }}
<el-popover <el-popover trigger="hover" :content="'最多添加' + maxlength + '个素材'" placement="top-start">
trigger="hover"
:content="'最多添加' + maxlength + '个素材'"
placement="top-start"
>
<template #reference> <template #reference>
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled> <el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</template> </template>
...@@ -102,32 +71,19 @@ ...@@ -102,32 +71,19 @@
<div style="text-align: left" class="mt20 flex"> <div style="text-align: left" class="mt20 flex">
<el-popover <el-popover
trigger="hover" trigger="hover"
:content=" :content="'最多添加' + maxlength + '个' + fontType + ',如需修改请删除已有' + fontType + '后重新尝试'"
'最多添加' +
maxlength +
'个' +
fontType +
',如需修改请删除已有' +
fontType +
'后重新尝试'
"
placement="top-start" placement="top-start"
:disabled="talkList.length < maxlength" :disabled="talkList.length < maxlength">
>
<template #reference> <template #reference>
<el-dropdown <el-dropdown
@command="moveGroup" @command="moveGroup"
:disabled="talkList.length > maxlength || talkList.length === maxlength" :disabled="talkList.length > maxlength || talkList.length === maxlength">
> <el-button type="primary" v-show="!(moduleType === 4 && otherType === 3)">
<el-button type="primary" v-show="!(moduleType === 4 && otherType === 3)" + {{ '新建' + fontType }}
>+ {{ '新建' + fontType }}</el-button </el-button>
>
<template #dropdown> <template #dropdown>
<el-dropdown-menu trigger="click"> <el-dropdown-menu trigger="click">
<el-dropdown-item <el-dropdown-item :command="'4'" v-if="!this.templateType && this.moduleType !== 4">
:command="'4'"
v-if="!this.templateType && this.moduleType !== 4"
>
<el-button text>文本</el-button> <el-button text>文本</el-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :command="'0'"> <el-dropdown-item :command="'0'">
...@@ -158,23 +114,12 @@ ...@@ -158,23 +114,12 @@
</el-popover> </el-popover>
<el-popover <el-popover
trigger="hover" trigger="hover"
:content=" :content="'最多添加' + maxlength + '个' + fontType + ',如需修改请删除已有' + fontType + '后重新尝试'"
'最多添加' +
maxlength +
'个' +
fontType +
',如需修改请删除已有' +
fontType +
'后重新尝试'
"
placement="top-start" placement="top-start"
:disabled="talkList.length < maxlength" :disabled="talkList.length < maxlength">
>
<template #reference> <template #reference>
<div class="ml20"> <div class="ml20">
<el-button @click="choseCenter" :disabled="talkList.length >= maxlength"> <el-button @click="choseCenter" :disabled="talkList.length >= maxlength">从素材中心选择</el-button>
从素材中心选择
</el-button>
</div> </div>
</template> </template>
</el-popover> </el-popover>
...@@ -187,8 +132,7 @@ ...@@ -187,8 +132,7 @@
@setData="setData" @setData="setData"
@getEdit="getEdit" @getEdit="getEdit"
:dargAble="[2].includes(moduleType)" :dargAble="[2].includes(moduleType)"
:isDeatail="detail" :isDeatail="detail" />
/>
</div> </div>
<div <div
class="g-card mt20 g-pad20" class="g-card mt20 g-pad20"
...@@ -198,8 +142,7 @@ ...@@ -198,8 +142,7 @@
(otherType !== 3 && moduleType !== 2) || (otherType !== 3 && moduleType !== 2) ||
(otherType === 3 && moduleType !== 2)) && (otherType === 3 && moduleType !== 2)) &&
!detail !detail
" ">
>
<!-- 话术中心,有列表才显示 --> <!-- 话术中心,有列表才显示 -->
<template v-if="talkList.length && moduleType === 2"> <template v-if="talkList.length && moduleType === 2">
<el-button @click="getCancel">取消</el-button> <el-button @click="getCancel">取消</el-button>
...@@ -229,8 +172,7 @@ ...@@ -229,8 +172,7 @@
@dialogClose="dialogClose" @dialogClose="dialogClose"
:materialTalkList="talkList" :materialTalkList="talkList"
:moduleType="moduleType" :moduleType="moduleType"
:maxlength="maxlength" :maxlength="maxlength" />
/>
<!-- 模板库 --> <!-- 模板库 -->
<el-dialog <el-dialog
:title="otherType === 2 ? '选择群发模板' : '选择欢迎语模板'" :title="otherType === 2 ? '选择群发模板' : '选择欢迎语模板'"
...@@ -238,8 +180,7 @@ ...@@ -238,8 +180,7 @@
width="60%" width="60%"
append-to-body append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
v-if="welcomVisible" v-if="welcomVisible">
>
<TemplateLibrary @changeObj="changeObj" :isGroup="otherType === 2" /> <TemplateLibrary @changeObj="changeObj" :isGroup="otherType === 2" />
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
...@@ -258,14 +199,12 @@ ...@@ -258,14 +199,12 @@
:moduleType="moduleType" :moduleType="moduleType"
:maxlength="maxlength" :maxlength="maxlength"
:noApplets="otherType === 3" :noApplets="otherType === 3"
:isFriends="otherType === 3" :isFriends="otherType === 3" />
/>
<SelectUser <SelectUser
:defaultValues="selectedUserList" :defaultValues="selectedUserList"
v-model:visible="dialogVisibleSelectUser" v-model:visible="dialogVisibleSelectUser"
title="选择使用员工" title="选择使用员工"
@success="selectedUser" @success="selectedUser"></SelectUser>
></SelectUser>
</div> </div>
</template> </template>
...@@ -418,16 +357,20 @@ export default { ...@@ -418,16 +357,20 @@ export default {
}, },
}, },
watch: { watch: {
baseData(val) { baseData: {
if (val.templateInfo || val.attachments) { handler(val) {
this.form.templateInfo = val.templateInfo ? val.templateInfo : '' if (val.templateInfo || val.attachments) {
this.form.attachments = val.attachments this.form.templateInfo = val.templateInfo ? val.templateInfo : ''
// this.$forceUpdate() this.form.attachments = val.attachments
if (this.otherType === 3 && this.detail) { // this.$forceUpdate()
this.talkForm = val if (this.otherType === 3 && this.detail) {
this.talkList = val.attachments this.talkForm = val
this.talkList = val.attachments
}
} }
} },
deep: true,
immediate: true,
}, },
talkId: { talkId: {
handler(val) { handler(val) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!