Commit 80951c94 by 王玉曼 Committed by Coding

Accept Merge Request #23: (dev-wangyuman-外链 -> vue3-master)

Merge Request: 外链

Created By: @王玉曼
Accepted By: @王玉曼
URL: https://linkwechat.coding.net/p/linkwechat-front/d/linkwechat/git/merge/23?initial=true
2 parents 73c838b7 4041c13a
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="40" height="40" viewBox="0 0 40 40"><g><g><g><rect x="0" y="0" width="40" height="40" rx="4" fill="#0052CC" fill-opacity="1"/></g><g><g><g><path d="M26.435999850988388,6L9.871579850988388,6C8.841530850988388,6,7.999999850988388,6.841042,7.999999850988388,7.87109L7.999999850988388,32.1289C7.999999850988388,33.159,8.841530850988388,34,9.871579850988388,34L30.643599850988387,34C31.67359985098839,34,32.51509985098839,33.159,32.51509985098839,32.1289L32.51509985098839,12.0791L26.435999850988388,6Z" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M26.43651247024536,10.20725C26.43651247024536,11.23731,27.277962470245363,12.078759999999999,28.308012470245362,12.078759999999999L32.515272470245364,12.078759999999999L26.43651247024536,6L26.43651247024536,10.20725Z" fill="#267DFF" fill-opacity="1"/></g><g><path d="M20.02689666213989,30.4890096875L7.999996662139893,30.4892596875L7.999996662139893,23.8154296875L20.012396662139892,23.8154296875C20.578196662139895,23.8154296875,21.042496662139893,24.2506626875,21.042496662139893,24.7874506875L21.042496662139893,29.5024796875C21.056996662139895,30.0537696875,20.592696662139893,30.488999687499998,20.02689666213989,30.4890096875Z" fill="#D5E8FC" fill-opacity="1"/></g><g><path d="M10.253386761581421,29.3315409375Q10.652237761581421,28.8951509375,10.91735576158142,28.4869209375Q11.182469761581421,28.0786809375,11.342009761581421,27.6516809375L10.811777761581421,27.3701409375Q10.75077676158142,27.5812909375,10.67100676158142,27.7924509375L9.999999761581421,27.7924509375Q10.47861976158142,26.4926709375,10.61000676158142,25.1084225375L11.262239761581421,25.1084225375Q11.234089761581421,25.4181179375,11.215319761581421,25.5682739375L12.252329761581422,25.5682739375Q12.252329761581422,26.412900937499998,12.156139761581422,27.0393309375Q12.059939761581422,27.6657609375,11.80889976158142,28.2264909375Q11.55785976158142,28.7872309375,11.093319761581421,29.3315409375L10.253386761581421,29.3315409375ZM11.51562976158142,27.0510609375Q11.60478976158142,26.6522109375,11.63293976158142,26.1782809375L11.093319761581421,26.1782809375Q11.037009761581421,26.5114409375,10.976009761581421,26.7648209375L11.51562976158142,27.0510609375ZM12.61833976158142,25.1084225375L13.22833976158142,25.1084225375L13.22833976158142,29.3315409375L12.61833976158142,29.3315409375L12.61833976158142,25.1084225375ZM13.95565976158142,25.9014309375Q14.27942976158142,27.1214409375,14.32165976158142,28.4446909375L13.753889761581421,28.4446909375Q13.711649761581421,27.1730609375,13.34564976158142,25.9014309375L13.95565976158142,25.9014309375ZM17.334149761581422,25.9201999375L17.03383976158142,25.9201999375L17.03383976158142,25.3383479375L17.50776976158142,25.3383479375L17.58284976158142,25.0849609375L18.18346976158142,25.0849609375L18.10838976158142,25.3383479375L18.962399761581423,25.3383479375L18.962399761581423,25.9201999375L17.89253976158142,25.9201999375L17.72361976158142,26.5114409375L17.92538976158142,26.5114409375L17.92538976158142,26.0985109375L18.44154976158142,26.0985109375L18.44154976158142,26.5114409375L18.915479761581423,26.5114409375L18.915479761581423,27.0745209375L18.42277976158142,27.0745209375L18.42277976158142,27.5343709375L19.00932976158142,27.5343709375L19.00932976158142,28.0974509375L18.42277976158142,28.0974509375L18.42277976158142,28.5948409375L17.83623976158142,28.5948409375L17.83623976158142,28.0974509375L17.03383976158142,28.0974509375L17.03383976158142,27.5343709375L17.83623976158142,27.5343709375L17.83623976158142,27.0745209375L16.991609761581422,27.0745209375L17.334149761581422,25.9201999375ZM14.692359761581422,26.6569009375Q14.917589761581421,25.8873539375,14.931669761581421,25.1084225375L15.53697976158142,25.1084225375L15.52289976158142,25.4603499375L16.07190976158142,25.4603499375L16.07190976158142,26.0422019375L15.46189976158142,26.0422019375Q15.443129761581421,26.1970509375,15.40559976158142,26.356590937500002L16.00621976158142,26.356590937500002L16.00621976158142,26.9290609375L15.70120976158142,26.9290609375L15.70120976158142,27.3419809375L16.07190976158142,27.3419809375L16.07190976158142,27.9144509375L15.70120976158142,27.9144509375L15.70120976158142,28.5854609375L16.06721976158142,28.4963009375L16.06721976158142,29.1016209375L15.124049761581421,29.3315409375L15.124049761581421,27.9144509375L14.786199761581422,27.9144509375L14.786199761581422,27.3419809375L15.124049761581421,27.3419809375L15.124049761581421,26.9290609375L14.926979761581421,26.9290609375L14.926979761581421,26.6569009375L14.692359761581422,26.6569009375ZM16.02967976158142,29.3315409375Q16.222069761581423,28.7121509375,16.29244976158142,28.2218009375Q16.36283976158142,27.7314509375,16.37221976158142,27.0557509375L16.10944976158142,27.0557509375L16.10944976158142,26.4457409375L16.954069761581422,26.4457409375Q16.94937976158142,27.1496009375,16.928269761581422,27.5836409375Q16.907149761581422,28.0176809375,16.846149761581422,28.4259209375Q16.991609761581422,28.5666909375,17.174609761581422,28.6300409375Q17.35761976158142,28.6933809375,17.61569976158142,28.6933809375L19.05624976158142,28.6933809375L19.05624976158142,29.2846209375L17.61569976158142,29.2846209375Q17.305999761581422,29.2846209375,17.099539761581422,29.2259709375Q16.893069761581422,29.167310937499998,16.733529761581423,29.026540937500002L16.658449761581423,29.3315409375L16.02967976158142,29.3315409375ZM16.75229976158142,25.1084225375L16.939999761581422,26.1266609375L16.381609761581423,26.1266609375L16.19390976158142,25.1084225375L16.75229976158142,25.1084225375Z" fill="#0052CC" fill-opacity="1"/></g><g><path d="M19.6034987310791,16.35850686630249L17.3547887310791,18.60721686630249L15.874998731079101,17.09840686630249L18.123698731079102,14.84969686630249L17.731988731079102,14.48700686630249C17.5288787310791,14.28389686630249,17.195198731079103,14.28389686630249,16.977588731079102,14.48700686630249L14.743389731079102,16.72120686630249C14.540280831079102,16.92431686630249,14.540280831079102,17.25798686630249,14.743389731079102,17.475606866302492L16.992098731079103,19.72431686630249C17.195198731079103,19.92741686630249,17.5288787310791,19.92741686630249,17.7464987310791,19.72431686630249L19.9951987310791,17.475606866302492C20.198308731079102,17.27249686630249,20.198308731079102,16.93881686630249,19.9951987310791,16.72120686630249L19.6034987310791,16.35850686630249ZM23.723698731079104,12.992706866302491L21.4749987310791,10.74400186630249C21.3734387310791,10.64244766630249,21.242868731079103,10.58441686630249,21.097798731079102,10.58441686630249C20.952718731079102,10.58441686630249,20.822148731079103,10.642448266302491,20.7205887310791,10.74400186630249L18.486398731079102,12.992706866302491C18.3848387310791,13.09425686630249,18.3268087310791,13.22482686630249,18.3268087310791,13.36990686630249C18.3268087310791,13.51498686630249,18.3848387310791,13.64555686630249,18.486398731079102,13.74710686630249L19.2262887310791,14.48700686630249L18.8635987310791,14.12431686630249L21.1122987310791,11.87560686630249L22.606598731079103,13.36990686630249L20.357898731079104,15.60410686630249L20.735098731079102,15.98130686630249C20.9382087310791,16.18441686630249,21.271888731079102,16.18441686630249,21.489498731079102,15.98130686630249L23.7382087310791,13.73260686630249C23.926808731079102,13.529496866302491,23.926808731079102,13.19581686630249,23.723698731079104,12.992706866302491ZM17.731988731079102,16.72120686630249C17.9350987310791,16.92431686630249,18.268778731079102,16.92431686630249,18.486398731079102,16.72120686630249L20.735098731079102,14.48700686630249C20.8656687310791,14.35643686630249,20.9236987310791,14.15332686630249,20.8656687310791,13.97923686630249C20.822148731079103,13.79063686630249,20.677068731079103,13.66006686630249,20.488468731079102,13.602036866302491C20.2998687310791,13.54399686630249,20.1112687310791,13.602036866302491,19.9806987310791,13.73260686630249L19.240798731079103,14.48700686630249L18.8635987310791,14.86420686630249L17.7464987310791,15.98130686630249C17.5288787310791,16.18441686630249,17.5288787310791,16.51809686630249,17.731988731079102,16.72120686630249Z" fill="#0052CC" fill-opacity="1"/></g></g></g></g></g></svg>
\ No newline at end of file
......@@ -107,6 +107,9 @@
<el-dropdown-item :command="'5'">
<el-button text>海报</el-button>
</el-dropdown-item>
<el-dropdown-item :command="'19'">
<el-button text>外链</el-button>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
......
......@@ -197,6 +197,7 @@ export default {
{ list: [], label: '视频', name: 'video', type: '2' },
{ list: [], label: '文件', name: 'file', type: '3' },
{ list: [], label: '海报', name: 'poster', type: '5' },
{ list: [], label: '外链', name: 'outChain', type: '19' },
]
this.picindex = 1
this.activeName = 'text'
......
......@@ -6,7 +6,10 @@
<div class="avatar222"><img src="../../assets/drainageCode/header.png" /></div>
<div class="msg">
<div class="word">
<p style="line-height: 18px" v-html="templateInfo?.replace(/\n|\r\n/g, '<br>').replace(/ /g, ' &nbsp')"></p>
<p
style="line-height: 18px"
v-html="templateInfo?.replace(/\n|\r\n/g, '<br>').replace(/ /g, ' &nbsp')"
></p>
<div v-if="liveUrl" style="margin-top: 10px">
<p>直播链接:</p>
{{ liveUrl }}
......@@ -26,7 +29,7 @@
<img :src="data.materialUrl" />
</div>
</div>
<div class="msg" v-if="data.mediaType === '9'">
<div class="msg" v-if="['9'].includes(data.mediaType)">
<div class="word-and-image">
<div>
{{ data.materialName }}
......@@ -42,6 +45,22 @@
</div>
</div>
</div>
<div class="msg" v-if="['19'].includes(data.mediaType)">
<div class="word-and-image">
<div>
{{ data.materialName }}
</div>
<div class="sub-content">
<div>
{{ data.content }}
</div>
<div>
<img :src="data.coverUrl" v-if="data.coverUrl && data.coverUrl != ''" />
<svg-icon class="icon-style" icon="outLine" v-else></svg-icon>
</div>
</div>
</div>
</div>
<div class="msg" v-if="data.mediaType === '11'">
<div class="miniprogram">
<div class="mini-header">
......@@ -103,7 +122,8 @@
<svg-icon
class="icon-style"
:icon="data.materialUrl ? filType(data.materialUrl) : ''"
v-if="data.materialUrl"></svg-icon>
v-if="data.materialUrl"
></svg-icon>
</div>
</div>
</div>
......
......@@ -184,6 +184,9 @@ export default {
case '5':
return '海报'
break
case '19':
return '外链'
break
}
},
// 超过50个。。。展示
......
......@@ -289,6 +289,9 @@ export default {
case '5':
return '海报'
break
case '19':
return '外链'
break
}
},
//表格拖动排序
......
......@@ -130,6 +130,45 @@
<div class="sub-des">必须以 http://或 https://开头</div>
</el-form-item>
</template>
<!-- 外链 -->
<template v-else-if="type === '19'">
<el-form-item label="外链地址" prop="materialUrl">
<el-input
v-model="form.materialUrl"
type="text"
placeholder="请输入外链地址,以http://或https://开头"
></el-input>
</el-form-item>
<el-form-item label="外链标题" prop="materialName">
<el-input
v-model="form.materialName"
type="text"
:maxlength="32"
show-word-limit
placeholder="请输入外链标题"
></el-input>
</el-form-item>
<el-form-item label="外链描述">
<el-input
v-model="form.content"
type="textarea"
:maxlength="128"
show-word-limit
:autosize="{ minRows: 3, maxRows: 50 }"
placeholder="请输入外链描述"
></el-input>
</el-form-item>
<el-form-item label="外链封面">
<Upload
v-model:fileUrl="form.coverUrl"
v-model:imgSize="form.memorySize"
type="0"
v-if="dialogVisible"
>
<template #tip><div>支持jpg/jpeg/png格式,建议200*200</div></template>
</Upload>
</el-form-item>
</template>
<!-- 小程序标题 -->
<template v-else-if="type === '11'">
......@@ -352,6 +391,11 @@ export default {
'文章',
'企业话术',
'客服话术',
'智能表单',
'SOP模板',
'群发模板',
'收集表',
'外链',
],
// 表单校验
rules: Object.freeze({
......
......@@ -285,6 +285,9 @@ export default {
case '5':
return '海报'
break
case '19':
return '外链'
break
}
},
//表格拖动排序
......
......@@ -6,16 +6,29 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
<div style="display: flex">
<el-form-item :label="typeTitle[type] + '标题'" prop="materialName" v-if="!disabled && type !== '0'">
<el-form-item
:label="typeTitle[type] + '标题'"
prop="materialName"
v-if="!disabled && type !== '0'"
>
<el-input
v-model="form.materialName"
placeholder="请输入标题"
:maxlength="titleLength"
show-word-limit
:disabled="disabled"></el-input>
:disabled="disabled"
></el-input>
</el-form-item>
<el-form-item :label="typeTitle[type] + '标题'" prop="materialName" v-if="!disabled && type === '0'">
<el-input v-model="form.materialName" placeholder="请输入标题" :disabled="true"></el-input>
<el-form-item
:label="typeTitle[type] + '标题'"
prop="materialName"
v-if="!disabled && type === '0'"
>
<el-input
v-model="form.materialName"
placeholder="请输入标题"
:disabled="true"
></el-input>
</el-form-item>
<div class="title" v-else-if="disabled">{{ form.materialName }}</div>
<el-form-item prop="categoryId" label="选择分组" v-if="!disabled">
......@@ -23,7 +36,8 @@
v-model="form.categoryId"
:options="treeData[0].children"
:props="groupProps"
:disabled="disabled"></el-cascader>
:disabled="disabled"
></el-cascader>
</el-form-item>
<div v-else class="group">
{{ form.categoryId === '1' ? '默认分组' : form.categoryName }}
......@@ -43,9 +57,16 @@
maxlength="1000"
show-word-limit
:disabled="disabled"
:rows="4"></TextareaExtend>
:rows="4"
></TextareaExtend>
</el-form-item>
<el-input v-model="form.content" type="textarea" :disabled="disabled" :rows="4" v-else></el-input>
<el-input
v-model="form.content"
type="textarea"
:disabled="disabled"
:rows="4"
v-else
></el-input>
</div>
<!-- 图片 -->
<div v-if="type === '0'">
......@@ -68,7 +89,9 @@
<el-image
style="width: 200px; height: 200px; flex: none"
:src="form.materialUrl"
fit="fill"></el-image>
:preview-src-list="[form.materialUrl]"
fit="fill"
></el-image>
</div>
</div>
</div>
......@@ -87,13 +110,15 @@
:maxlength="128"
show-word-limit
:autosize="{ minRows: 3, maxRows: 50 }"
placeholder="请输入图文描述"></el-input>
placeholder="请输入图文描述"
></el-input>
</el-form-item>
<el-form-item label="图文地址" prop="materialUrl">
<el-input
v-model="form.materialUrl"
type="text"
placeholder="请输入图文地址,以http://或https://开头"></el-input>
placeholder="请输入图文地址,以http://或https://开头"
></el-input>
</el-form-item>
</div>
<div v-else>
......@@ -102,14 +127,18 @@
style="width: 200px; height: 200px; flex: none"
:src="form.coverUrl"
fit="fill"
v-if="form.coverUrl"></el-image>
v-if="form.coverUrl"
:preview-src-list="[form.coverUrl]"
></el-image>
<svg-icon v-else class="icon-style" icon="imgText"></svg-icon>
<div class="ml10">
<div style="text-align: left; over-flow: hidden; margin-bottom: 20px">
{{ form.content && form.content.toString() }}
</div>
<div>
<a class="previewStyle" :href="form.materialUrl" target="_blank">{{ form.materialUrl }}</a>
<a class="previewStyle" :href="form.materialUrl" target="_blank">{{
form.materialUrl
}}</a>
</div>
</div>
</div>
......@@ -127,12 +156,19 @@
<el-input v-model="form.digest" placeholder="小程序AppID"></el-input>
</el-form-item>
<el-form-item label="页面路径" prop="materialUrl" :rules="rules.html">
<el-input v-model="form.materialUrl" placeholder="请输入小程序路径,必须以 html 作为后缀"></el-input>
<el-input
v-model="form.materialUrl"
placeholder="请输入小程序路径,必须以 html 作为后缀"
></el-input>
</el-form-item>
</div>
<div v-else>
<div class="cp flex">
<el-image style="width: 200px; height: 200px; flex: none" :src="form.coverUrl" fit="fill"></el-image>
<el-image
style="width: 200px; height: 200px; flex: none"
:src="form.coverUrl"
fit="fill"
></el-image>
<div class="ml10">
<div style="text-align: left; over-flow: hidden; margin-bottom: 20px">
小程序ID:{{ form.digest }}
......@@ -148,7 +184,12 @@
<div class="g-card-title">数据趋势</div>
<CardGroupIndex :data="cardData"></CardGroupIndex>
<search-title @search="getLineData"></search-title>
<chart-line style="height: 300px" :legend="legend" :xData="xdata" :series="series"></chart-line>
<chart-line
style="height: 300px"
:legend="legend"
:xData="xdata"
:series="series"
></chart-line>
</div>
<div class="g-card">
<div class="g-card-title">
......@@ -161,22 +202,34 @@
<el-icon-QuestionFilled slot="reference" class="el-icon-QuestionFilled"/>
</el-popover> -->
</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>
<el-table v-loading="loading" :data="tableList" style="width: 100%">
<el-table-column label="发送员工" align="center" min-width="100" prop="sendBy" show-overflow-tooltip />
<el-table-column
label="发送员工"
align="center"
min-width="100"
prop="sendBy"
show-overflow-tooltip
/>
<el-table-column
label="发送次数"
align="center"
min-width="100"
prop="sendTotalNum"
show-overflow-tooltip />
show-overflow-tooltip
/>
</el-table>
<!-- <div class="bottom"> -->
<pagination
:total="total"
v-model:page="query.pageNum"
v-model:limit="query.pageSize"
@pagination="getTableChangeSize()" />
@pagination="getTableChangeSize()"
/>
<!-- </div> -->
</div>
</div>
......
......@@ -2,7 +2,8 @@
<div>
<!-- 基础素材 -->
<!-- <div class="g-card" style="padding: 10px"> -->
<el-tabs v-model="activeName" @tab-click="(v) => opened.includes(v.paneName) || opened.push(v.paneName)">
<el-tabs v-model="activeName" @tab-click="tabClick">
{{ activeTab }}
<el-tab-pane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.name">
<component v-if="opened.includes(item.name)" :is="item.component"></component>
</el-tab-pane>
......@@ -16,6 +17,7 @@ import Mtext from './text'
import Mimage from './image'
import MimageText from './imageText'
import Mapplet from './applet'
let activeTab = ''
export default {
name: '',
components: {
......@@ -26,22 +28,31 @@ export default {
},
data() {
return {
activeName: 'text',
activeName: activeTab,
list: [
{ label: '文本', name: 'text', component: Mtext },
{ label: '图片', name: 'image', component: Mimage },
{ label: '图文', name: 'imageText', component: MimageText },
{ label: '小程序', name: 'applet', component: Mapplet },
],
opened: ['text'],
opened: [activeTab],
}
},
methods: {
tabClick(v) {
activeTab = v.paneName
this.opened.includes(v.paneName) || this.opened.push(v.paneName)
},
},
created() {
this.$store.setBusininessDesc(
`
<div>文本、图片等基础素材,可直接用于聊天话术、欢迎语等场景</div>
`,
`
)
let first = 'text'
activeTab || (this.activeName = activeTab = first)
this.opened.push(activeTab)
},
}
</script>
......
......@@ -5,7 +5,8 @@
style="width: 50px; height: 50px; flex: none"
:src="objRow.coverUrl"
fit="fill"
v-if="objRow.coverUrl"></el-image>
v-if="objRow.coverUrl"
></el-image>
<div class="icon" v-else-if="objRow.svgName">
<svg-icon class="icon-style" :icon="objRow.svgName"></svg-icon>
</div>
......@@ -13,12 +14,16 @@
<el-tooltip
:content="objRow.materialName"
placement="top"
:disabled="objRow.materialName ? objRow.materialName.length < titleNum : true">
:disabled="objRow.materialName ? objRow.materialName.length < titleNum : true"
>
<p style="text-align: left">
{{ coverContent(objRow.materialName, titleNum) }}
</p>
</el-tooltip>
<el-tooltip placement="top" :disabled="objRow.digest ? objRow.digest.length < contentNum : true">
<el-tooltip
placement="top"
:disabled="objRow.digest ? objRow.digest.length < contentNum : true"
>
<template #content><p style="white-space: pre-line" v-html="objRow.digest"></p></template>
<p style="color: var(--font-black-7); text-align: left">
{{ coverContent(objRow.digest, contentNum) }}
......@@ -116,6 +121,11 @@ export default {
} else if (this.objRow.mediaType === '4') {
// 文本
this.objRow.digest = data.content
} else if (this.objRow.mediaType === '19') {
// 外链
this.objRow.svgName = 'outLine'
this.objRow.digest = data.content
}
},
// 处理文件类型
......
......@@ -6,7 +6,8 @@
<el-tooltip
:content="row.materialName"
placement="top"
:disabled="row.materialName ? row.materialName.length < 12 : true">
:disabled="row.materialName ? row.materialName.length < 12 : true"
>
<span class="title">{{ coverContent(row.materialName, 12) }}</span>
</el-tooltip>
<!-- 文本 -->
......@@ -22,11 +23,20 @@
</div>
<!-- 图文 -->
<div v-if="row.mediaType === '9'" style="display: flex">
<el-image :src="row.coverUrl" fit="contain" class="imgsize" v-if="row.coverUrl"></el-image>
<el-image
:src="row.coverUrl"
fit="contain"
class="imgsize"
v-if="row.coverUrl"
></el-image>
<div class="icon-style" v-else>
<svg-icon class="icon-style" icon="imgText"></svg-icon>
</div>
<el-tooltip :content="row.content" placement="top" :disabled="row.content ? row.content.length < 50 : true">
<el-tooltip
:content="row.content"
placement="top"
:disabled="row.content ? row.content.length < 50 : true"
>
<span class="twosplice distStyle">{{ coverContent(row.content, 50) }}</span>
</el-tooltip>
</div>
......@@ -36,18 +46,31 @@
</div>
<!-- 文章 -->
<div v-if="row.mediaType === '12'" style="display: flex">
<el-image :src="row.coverUrl" fit="contain" class="imgsize" v-if="row.coverUrl"></el-image>
<el-image
:src="row.coverUrl"
fit="contain"
class="imgsize"
v-if="row.coverUrl"
></el-image>
<div class="icon-style" v-else>
<svg-icon class="icon-style" icon="article"></svg-icon>
</div>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
<!-- 视频 -->
<div v-if="row.mediaType === '2'" style="display: flex">
<el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
......@@ -55,16 +78,27 @@
<div v-if="row.mediaType === '3'" style="display: flex">
<!-- <el-image :src="row.coverUrl" fit="contain" class="imgsize"></el-image> -->
<div class="icon-style" v-if="row.materialUrl">
<svg-icon class="icon-style" :icon="row.materialUrl ? filType(row.materialUrl) : ''"></svg-icon>
<svg-icon
class="icon-style"
:icon="row.materialUrl ? filType(row.materialUrl) : ''"
></svg-icon>
</div>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
<!-- 海报 -->
<div v-if="row.mediaType === '5'" style="display: flex">
<el-image :src="row.materialUrl" fit="contain" class="imgsize"></el-image>
<el-tooltip :content="row.digest" placement="top" :disabled="row.digest ? row.digest.length < 50 : true">
<el-tooltip
:content="row.digest"
placement="top"
:disabled="row.digest ? row.digest.length < 50 : true"
>
<span class="twosplice distStyle">{{ coverContent(row.digest, 50) }}</span>
</el-tooltip>
</div>
......@@ -121,7 +155,7 @@ export default {
return btoa(
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function toSolidBytes(match, p1) {
return String.fromCharCode('0x' + p1)
}),
})
)
},
preview(row) {
......@@ -179,6 +213,9 @@ export default {
case '5':
return '海报'
break
case '19':
return '外链'
break
}
},
},
......
......@@ -2,7 +2,7 @@
<div>
<!-- 基础素材 -->
<!-- <div class="g-card" style="padding: 10px"> -->
<el-tabs v-model="activeName" @tab-click="(v) => opened.includes(v.paneName) || opened.push(v.paneName)">
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.name">
<component v-if="opened.includes(item.name)" :is="item.component"></component>
</el-tab-pane>
......@@ -12,14 +12,16 @@
</template>
<script>
import OutChain from './outChain'
import Marticle from './article'
import Mvideo from './video'
import Mfile from './file'
import Mposter from './poster'
let activeTab = ''
export default {
name: '',
components: {
OutChain,
Marticle,
Mvideo,
Mfile,
......@@ -27,26 +29,37 @@ export default {
},
data() {
return {
activeName: 'article',
activeName: activeTab,
list: [
{ label: '外链', name: 'outChain', component: OutChain },
{ label: '文章', name: 'article', component: Marticle },
{ label: '视频', name: 'video', component: Mvideo },
{ label: '文件', name: 'file', component: Mfile },
{ label: '海报', name: 'poster', component: Mposter },
],
opened: ['article'],
opened: [activeTab],
}
},
methods: {
tabClick(v) {
activeTab = v.paneName
this.opened.includes(v.paneName) || this.opened.push(v.paneName)
},
},
created() {
this.$store.setBusininessDesc(
`
<div>支持智能记录客户访问行为,辅助运营把握客户动向。</div>
`,
`
)
let activeName = this.$route.query.activeName
if (activeName) {
this.activeName = activeName
this.opened = ['poster']
} else {
let first = 'outChain'
activeTab || (this.activeName = activeTab = first)
this.opened.push(activeTab)
}
},
}
......
<script>
import MaPage from '@/views/contentCenter/components/MaPage'
import PicTitContent from '@/views/contentCenter/components/PicTitContent'
export default {
name: 'MImageText',
components: { MaPage, PicTitContent },
data() {
return {
srcList: [],
ids: [], // 选中数组
}
},
watch: {},
created() {},
methods: {
listChange(data) {
this.srcList = data.map((item) => item.materialUrl)
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id)
},
// 超过50个。。。展示
// coverContent(str) {
// if (str && str.length > 50) {
// str = str.substr(0, 50) + '...'
// }
// return str
// },
},
}
</script>
<template>
<MaPage ref="page" type="19" @listChange="listChange" :selected="ids" v-slot="{ list }">
<el-table :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="外链" align="center" prop="materialName" width="260">
<template #default="{ row }">
<PicTitContent :row="row" />
</template>
</el-table-column>
<el-table-column
label="发送总次数"
align="center"
prop="sendNum"
:show-overflow-tooltip="true"
>
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
发送总次数
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>当前素材在侧边栏被员工发送的总次数</div>
</el-popover>
</template>
<template #default="{ row }">
{{ row.sendNum }}
</template>
</el-table-column>
<el-table-column
label="查看总次数"
align="center"
prop="viewNum"
:show-overflow-tooltip="true"
>
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
查看总次数
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>当前轨迹素材被客户打开的次数,不去重</div>
</el-popover>
</template>
<template #default="{ row }">
{{ row.viewNum }}
</template>
</el-table-column>
<el-table-column
label="查看总人数"
align="center"
prop="viewByNum"
:show-overflow-tooltip="true"
>
<template #header>
<el-popover placement="top" trigger="hover">
<template #reference>
<div>
查看总人数
<el-icon-QuestionFilled class="el-icon-QuestionFilled"></el-icon-QuestionFilled>
</div>
</template>
<div>当前轨迹素材被客户打开且授权的人数,去重</div>
</el-popover>
</template>
<template #default="{ row }">
{{ row.viewByNum }}
</template>
</el-table-column>
<el-table-column label="最近更新" align="center" width="160px">
<template #default="scope">
<div>{{ scope.row.updateBy }}</div>
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="160px"
>
<template #default="scope">
<el-button
text
@click="$refs.page.detail(scope.row)"
v-hasPermi="['wechat:material:detail']"
>
详情|统计
</el-button>
<el-button text @click="$refs.page.edit(scope.row)">编辑</el-button>
<el-button text @click="$refs.page.remove(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</MaPage>
</template>
<style lang="scss" scoped>
.img-wrap {
position: relative;
height: 0;
padding: 70% 0 0 0;
border-bottom: 1px solid var(--border-black-9);
&:hover .actions {
opacity: 1;
}
}
.actions {
position: absolute;
width: 100%;
height: 50px;
left: 0;
top: 0;
text-align: center;
color: var(--font-white, #fff);
opacity: 0;
font-size: 20px;
background-color: var(--bg-black-5);
transition: opacity 0.3s;
.el-icon-EditPen {
margin-right: 20px;
}
}
.el-image {
width: 80px;
height: 80px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!