Commit 1dcc3d9f by ext.wangyuman1

朋友圈模块

1 parent 31e7983a
...@@ -9,14 +9,19 @@ ...@@ -9,14 +9,19 @@
width="90%" width="90%"
append-to-body append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="mediaClose"> :before-close="mediaClose"
>
<el-alert type="warning" show-icon v-if="type === '11'"> <el-alert type="warning" show-icon v-if="type === '11'">
<template #title> <template #title>
<div style="display: flex"> <div style="display: flex">
<div style="color: var(--font-black)"> <div style="color: var(--font-black)">
小程序必须已经绑定关联到企业微信,否则将无法在欢迎语、群发、话术中正常发送。 小程序必须已经绑定关联到企业微信,否则将无法在欢迎语、群发、话术中正常发送。
</div> </div>
<a href="https://www.yuque.com/linkwechat/help/gy4ghv" target="_blank" style="color: var(--color)"> <a
href="https://www.yuque.com/linkwechat/help/gy4ghv"
target="_blank"
style="color: var(--color)"
>
如何关联绑定? 如何关联绑定?
</a> </a>
</div> </div>
...@@ -24,7 +29,12 @@ ...@@ -24,7 +29,12 @@
</el-alert> </el-alert>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="typeTitle[type] + '标题'" prop="materialName" v-if="type === '4'"> <el-form-item :label="typeTitle[type] + '标题'" prop="materialName" v-if="type === '4'">
<el-input v-model="form.materialName" placeholder="请输入标题" maxlength="50" show-word-limit></el-input> <el-input
v-model="form.materialName"
placeholder="请输入标题"
maxlength="50"
show-word-limit
></el-input>
<div class="tip">标题对客户不可见,仅用于查询场景</div> <div class="tip">标题对客户不可见,仅用于查询场景</div>
</el-form-item> </el-form-item>
<el-form-item label="文本内容" prop="content" v-if="type === '4'"> <el-form-item label="文本内容" prop="content" v-if="type === '4'">
...@@ -34,7 +44,8 @@ ...@@ -34,7 +44,8 @@
:autosize="{ minRows: 2, maxRows: 50 }" :autosize="{ minRows: 2, maxRows: 50 }"
placeholder="请输入内容" placeholder="请输入内容"
maxlength="1000" maxlength="1000"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<!-- 图片 --> <!-- 图片 -->
...@@ -46,9 +57,12 @@ ...@@ -46,9 +57,12 @@
:maxSize="20" :maxSize="20"
type="0" type="0"
:multiple="true" :multiple="true"
:limit="picMaxlength"> :limit="picMaxlength"
>
<template #tip> <template #tip>
<div>支持jpg/jpeg/png格式,图片大小不超过20M,支持最多{{ picMaxlength }}张批量上传</div> <div>
支持jpg/jpeg/png格式,图片大小不超过20M,支持最多{{ picMaxlength }}张批量上传
</div>
</template> </template>
</Upload> </Upload>
</el-form-item> </el-form-item>
...@@ -58,7 +72,8 @@ ...@@ -58,7 +72,8 @@
v-model:fileName="form.materialName" v-model:fileName="form.materialName"
:maxSize="20" :maxSize="20"
type="0" type="0"
v-if="dialogVisible"> v-if="dialogVisible"
>
<template #tip><div>支持jpg/jpeg/png格式,图片大小不超过20M</div></template> <template #tip><div>支持jpg/jpeg/png格式,图片大小不超过20M</div></template>
</Upload> </Upload>
</el-form-item> </el-form-item>
...@@ -70,7 +85,8 @@ ...@@ -70,7 +85,8 @@
<el-input <el-input
v-model="form.materialUrl" v-model="form.materialUrl"
type="text" type="text"
placeholder="请输入图文地址,以http://或https://开头"></el-input> placeholder="请输入图文地址,以http://或https://开头"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图文标题" prop="materialName"> <el-form-item label="图文标题" prop="materialName">
<el-input <el-input
...@@ -78,7 +94,8 @@ ...@@ -78,7 +94,8 @@
type="text" type="text"
:maxlength="32" :maxlength="32"
show-word-limit show-word-limit
placeholder="请输入图文标题"></el-input> placeholder="请输入图文标题"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图文描述"> <el-form-item label="图文描述">
<el-input <el-input
...@@ -87,7 +104,8 @@ ...@@ -87,7 +104,8 @@
:maxlength="128" :maxlength="128"
show-word-limit show-word-limit
:autosize="{ minRows: 3, maxRows: 50 }" :autosize="{ minRows: 3, maxRows: 50 }"
placeholder="请输入图文描述"></el-input> placeholder="请输入图文描述"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图文封面"> <el-form-item label="图文封面">
<Upload v-model:fileUrl="form.coverUrl" type="0" v-if="dialogVisible"> <Upload v-model:fileUrl="form.coverUrl" type="0" v-if="dialogVisible">
...@@ -104,7 +122,8 @@ ...@@ -104,7 +122,8 @@
type="text" type="text"
:maxlength="64" :maxlength="64"
show-word-limit show-word-limit
placeholder="请输入链接标题"></el-input> placeholder="请输入链接标题"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="链接" prop="materialUrl" :rules="rules.http"> <el-form-item label="链接" prop="materialUrl" :rules="rules.http">
<el-input v-model="form.materialUrl" placeholder="请输入链接"></el-input> <el-input v-model="form.materialUrl" placeholder="请输入链接"></el-input>
...@@ -119,18 +138,26 @@ ...@@ -119,18 +138,26 @@
v-model="form.materialName" v-model="form.materialName"
placeholder="请输入小程序标题" placeholder="请输入小程序标题"
:maxlength="16" :maxlength="16"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="小程序ID" prop="digest"> <el-form-item label="小程序ID" prop="digest">
<el-input v-model="form.digest" placeholder="小程序AppID"></el-input> <el-input v-model="form.digest" placeholder="小程序AppID"></el-input>
<div class="sub-des"> <div class="sub-des">
<a href="https://www.yuque.com/linkwechat/help/gy4ghv#cAwOh" target="_blank">如何查询小程序ID?</a> <a href="https://www.yuque.com/linkwechat/help/gy4ghv#cAwOh" target="_blank"
>如何查询小程序ID?</a
>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="页面路径" prop="materialUrl" :rules="rules.html"> <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>
<div class="sub-des"> <div class="sub-des">
<a href="https://www.yuque.com/linkwechat/help/gy4ghv#a1bXG" target="_blank">如何添加小程序页面路径?</a> <a href="https://www.yuque.com/linkwechat/help/gy4ghv#a1bXG" target="_blank"
>如何添加小程序页面路径?</a
>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="封面" prop="coverUrl"> <el-form-item label="封面" prop="coverUrl">
...@@ -147,8 +174,13 @@ ...@@ -147,8 +174,13 @@
v-model:fileUrl="form.materialUrl" v-model:fileUrl="form.materialUrl"
v-model:fileName="form.materialName" v-model:fileName="form.materialName"
:type="type" :type="type"
:format="audioType"> :format="audioType"
<template #tip><div>只能上传amr格式的语音文件。单个文件大小不超过2M,时长不超过1分钟</div></template> >
<template #tip
><div>
只能上传amr格式的语音文件。单个文件大小不超过2M,时长不超过1分钟
</div></template
>
</Upload> </Upload>
</el-form-item> </el-form-item>
<el-form-item label="名称" prop="materialName"> <el-form-item label="名称" prop="materialName">
...@@ -162,7 +194,8 @@ ...@@ -162,7 +194,8 @@
v-model="form.materialName" v-model="form.materialName"
placeholder="请输入视频标题" placeholder="请输入视频标题"
:maxlength="32" :maxlength="32"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="视频描述"> <el-form-item label="视频描述">
<el-input <el-input
...@@ -171,7 +204,8 @@ ...@@ -171,7 +204,8 @@
placeholder="请输入视频描述" placeholder="请输入视频描述"
:rows="3" :rows="3"
:maxlength="128" :maxlength="128"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传视频" prop="materialUrl"> <el-form-item label="上传视频" prop="materialUrl">
<Upload <Upload
...@@ -179,7 +213,8 @@ ...@@ -179,7 +213,8 @@
v-model:fileName="form.materialName" v-model:fileName="form.materialName"
:type="type" :type="type"
@getPicUrl="getPicUrl" @getPicUrl="getPicUrl"
v-if="dialogVisible"> v-if="dialogVisible"
>
<template #tip><div>支持mp4/mov格式,视频大小不超过100M</div></template> <template #tip><div>支持mp4/mov格式,视频大小不超过100M</div></template>
</Upload> </Upload>
</el-form-item> </el-form-item>
...@@ -192,7 +227,8 @@ ...@@ -192,7 +227,8 @@
v-model="form.materialName" v-model="form.materialName"
placeholder="请输入文件标题" placeholder="请输入文件标题"
:maxlength="32" :maxlength="32"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文件描述"> <el-form-item label="文件描述">
<el-input <el-input
...@@ -201,14 +237,16 @@ ...@@ -201,14 +237,16 @@
placeholder="请输入文件描述" placeholder="请输入文件描述"
:maxlength="100" :maxlength="100"
show-word-limit show-word-limit
:autosize="{ minRows: 2, maxRows: 10 }"></el-input> :autosize="{ minRows: 2, maxRows: 10 }"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传文件" prop="materialUrl"> <el-form-item label="上传文件" prop="materialUrl">
<Upload <Upload
v-model:fileUrl="form.materialUrl" v-model:fileUrl="form.materialUrl"
v-model:fileName="form.materialName" v-model:fileName="form.materialName"
:type="type" :type="type"
v-if="dialogVisible"> v-if="dialogVisible"
>
<template #tip><div>支持pdf/ppt/word文件,单个文件大小不超过50M</div></template> <template #tip><div>支持pdf/ppt/word文件,单个文件大小不超过50M</div></template>
</Upload> </Upload>
</el-form-item> </el-form-item>
...@@ -220,7 +258,8 @@ ...@@ -220,7 +258,8 @@
v-model="form.materialName" v-model="form.materialName"
placeholder="请输入文章标题" placeholder="请输入文章标题"
:maxlength="30" :maxlength="30"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文章描述"> <el-form-item label="文章描述">
<el-input <el-input
...@@ -228,23 +267,32 @@ ...@@ -228,23 +267,32 @@
type="textarea" type="textarea"
placeholder="请输入文章描述" placeholder="请输入文章描述"
:maxlength="100" :maxlength="100"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<!-- 富文本content --> <!-- 富文本content -->
<DefineQuillEditor <DefineQuillEditor
style="margin: 10px 10px 0" style="margin: 10px 10px 0"
:value="form.content" :value="form.content"
@change="getContent" @change="getContent"
ref="myQuillEditor"></DefineQuillEditor> ref="myQuillEditor"
></DefineQuillEditor>
</template> </template>
<!-- 海报 --> <!-- 海报 -->
<template v-else-if="type === '5'"> <template v-else-if="type === '5'">
<PosterAdd v-if="dialogVisible" :moduleType="moduleType" @getPosterForm="getPosterForm" :posId="posterId" /> <PosterAdd
v-if="dialogVisible"
:moduleType="moduleType"
@getPosterForm="getPosterForm"
:posId="posterId"
/>
</template> </template>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" v-loading="submitLoading" @click="submit" v-if="type !== '5'">确 定</el-button> <el-button type="primary" v-loading="submitLoading" @click="submit" v-if="type !== '5'"
>确 定</el-button
>
<el-button @click="cancel" v-if="type !== '5'">取 消</el-button> <el-button @click="cancel" v-if="type !== '5'">取 消</el-button>
</div> </div>
</template> </template>
......
...@@ -10,7 +10,18 @@ import OSS from 'ali-oss' ...@@ -10,7 +10,18 @@ import OSS from 'ali-oss'
export default { export default {
components: {}, components: {},
emits: ['update:fileUrl', 'update:fileName', 'update:fileList', 'upSuccess', 'getPicUrl', 'loadingChange'], emits: [
'update:fileUrl',
'update:fileName',
'update:imgSize',
'update:width',
'update:heigth',
'update:pixelSize',
'update:fileList',
'upSuccess',
'getPicUrl',
'loadingChange',
],
props: { props: {
// 单文件上传时使用 // 单文件上传时使用
fileUrl: { fileUrl: {
...@@ -21,6 +32,10 @@ export default { ...@@ -21,6 +32,10 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
imgSize: {
type: Number,
default: '',
},
// 多文件上传时使用,例如: [{name: 'food.jpg', url: 'https://xxx.cdn.com/xxx.jpg'}] // 多文件上传时使用,例如: [{name: 'food.jpg', url: 'https://xxx.cdn.com/xxx.jpg'}]
fileList: { fileList: {
...@@ -91,6 +106,7 @@ export default { ...@@ -91,6 +106,7 @@ export default {
fileUrlWatch: this.fileUrl, fileUrlWatch: this.fileUrl,
fileNameWatch: this.fileName, fileNameWatch: this.fileName,
fileListWatch: this.fileList, fileListWatch: this.fileList,
imgSizeWatch: this.imgSize,
picUrl: '', // 视频第一帧 picUrl: '', // 视频第一帧
file: undefined, file: undefined,
...@@ -114,6 +130,11 @@ export default { ...@@ -114,6 +130,11 @@ export default {
this.fileNameWatch = value this.fileNameWatch = value
}, },
}, },
imgSize: {
handler(value) {
this.imgSizeWatch = value
},
},
fileList: { fileList: {
handler(value) { handler(value) {
this.fileListWatch = value this.fileListWatch = value
...@@ -216,7 +237,7 @@ export default { ...@@ -216,7 +237,7 @@ export default {
? //获取视频第一帧画面 ? //获取视频第一帧画面
getVideoPic({ url: location }).then((res) => { getVideoPic({ url: location }).then((res) => {
this.loading = false this.loading = false
this.$emit('getPicUrl', res.data.url) this.$emit('getPicUrl', res.data.url, res.data)
}) })
: (this.loading = false) : (this.loading = false)
...@@ -224,13 +245,15 @@ export default { ...@@ -224,13 +245,15 @@ export default {
let url = window.URL.createObjectURL(file) let url = window.URL.createObjectURL(file)
let name = file.name let name = file.name
let memorySize = file.size
if (!this.multiple) { if (!this.multiple) {
this.fileUrlWatch = url this.fileUrlWatch = url
this.$emit('update:fileUrl', location) this.$emit('update:fileUrl', location)
this.$emit('update:fileName', (this.fileNameWatch = name)) this.$emit('update:fileName', (this.fileNameWatch = name))
this.$emit('update:imgSize', memorySize)
} else { } else {
this.fileListWatch = this.fileListWatch.concat({ name, url }) this.fileListWatch = this.fileListWatch.concat({ name, url, memorySize })
this.$emit('update:fileList', this.fileList.concat({ name, url: location })) this.$emit('update:fileList', this.fileList.concat({ name, url: location, memorySize }))
} }
} else { } else {
this.loading = false this.loading = false
...@@ -279,13 +302,15 @@ export default { ...@@ -279,13 +302,15 @@ export default {
let url = window.URL.createObjectURL(file) let url = window.URL.createObjectURL(file)
let name = file.name let name = file.name
let memorySize = file.size
if (!this.multiple) { if (!this.multiple) {
this.fileUrlWatch = url this.fileUrlWatch = url
this.$emit('update:fileUrl', location) this.$emit('update:fileUrl', location)
this.$emit('update:fileName', (this.fileNameWatch = name)) this.$emit('update:fileName', (this.fileNameWatch = name))
this.$emit('update:imgSize', memorySize)
} else { } else {
this.fileListWatch = this.fileListWatch.concat({ name, url }) this.fileListWatch = this.fileListWatch.concat({ name, url, memorySize })
this.$emit('update:fileList', this.fileList.concat({ name, url: location })) this.$emit('update:fileList', this.fileList.concat({ name, url: location, memorySize }))
} }
} }
} catch (e) { } catch (e) {
...@@ -349,16 +374,18 @@ export default { ...@@ -349,16 +374,18 @@ export default {
let url = window.URL.createObjectURL(file) let url = window.URL.createObjectURL(file)
let name = file.name let name = file.name
let memorySize = file.size
if (!this.multiple) { if (!this.multiple) {
this.fileUrlWatch = url this.fileUrlWatch = url
this.$emit('update:fileUrl', location) this.$emit('update:fileUrl', location)
this.$emit('update:fileName', (this.fileNameWatch = name)) this.$emit('update:fileName', (this.fileNameWatch = name))
this.$emit('update:imgSize', memorySize)
} else { } else {
this.fileListWatch = this.fileListWatch.concat({ name, url }) this.fileListWatch = this.fileListWatch.concat({ name, url, memorySize })
this.$emit('update:fileList', this.fileList.concat({ name, url: location })) this.$emit('update:fileList', this.fileList.concat({ name, url: location, memorySize }))
}
} }
} }
},
) )
}, },
remove(i) { remove(i) {
...@@ -552,7 +579,8 @@ export default { ...@@ -552,7 +579,8 @@ export default {
:src="item.url" :src="item.url"
fit="contain" fit="contain"
:preview-src-list="fileListWatch.map((e) => e.url)" :preview-src-list="fileListWatch.map((e) => e.url)"
alt="" /> alt=""
/>
<div class="action-mask"> <div class="action-mask">
<el-icon-search class="el-icon-search mr5" @click="showView(index)"></el-icon-search> <el-icon-search class="el-icon-search mr5" @click="showView(index)"></el-icon-search>
<!-- <span v-if="action.includes('download')" @click="download(item)"> <!-- <span v-if="action.includes('download')" @click="download(item)">
...@@ -580,7 +608,8 @@ export default { ...@@ -580,7 +608,8 @@ export default {
:limit="limit" :limit="limit"
:on-error="onError" :on-error="onError"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:before-upload="handleBeforeUpload"> :before-upload="handleBeforeUpload"
>
<!-- <!--
element-loading-text="正在上传..." element-loading-text="正在上传..."
:on-success="onSuccess" :on-success="onSuccess"
...@@ -616,7 +645,8 @@ export default { ...@@ -616,7 +645,8 @@ export default {
:preview-src-list="[fileUrlWatch]" :preview-src-list="[fileUrlWatch]"
preview-teleported preview-teleported
fit="contain" fit="contain"
@click.stop /> @click.stop
/>
<div class="action-mask" @click.self.stop> <div class="action-mask" @click.self.stop>
<el-icon-search class="el-icon-search" @click.stop="showView()"></el-icon-search> <el-icon-search class="el-icon-search" @click.stop="showView()"></el-icon-search>
...@@ -640,7 +670,8 @@ export default { ...@@ -640,7 +670,8 @@ export default {
playsinline="true" playsinline="true"
:autoplay="false" :autoplay="false"
:key="fileUrlWatch" :key="fileUrlWatch"
preload="auto"> preload="auto"
>
<source :src="fileUrlWatch" type="video/mp4" /> <source :src="fileUrlWatch" type="video/mp4" />
</video> </video>
<div class="action-mask" style="height: 30%" @click.self.stop> <div class="action-mask" style="height: 30%" @click.self.stop>
...@@ -651,8 +682,15 @@ export default { ...@@ -651,8 +682,15 @@ export default {
{{ fileNameWatch || fileUrlWatch }} {{ fileNameWatch || fileUrlWatch }}
<el-icon-EditPen class="el-icon-EditPen ml10"></el-icon-EditPen> <el-icon-EditPen class="el-icon-EditPen ml10"></el-icon-EditPen>
<!-- a链接用本地视频打不开,视频地址使用远程地址 --> <!-- a链接用本地视频打不开,视频地址使用远程地址 -->
<a @click.stop :href="/\.mp4$/.test(fileNameWatch) ? fileUrl : fileUrlWatch" target="_blank"> <a
<el-icon-view class="el-icon-view ml10" style="vertical-align: middle"></el-icon-view> @click.stop
:href="/\.mp4$/.test(fileNameWatch) ? fileUrl : fileUrlWatch"
target="_blank"
>
<el-icon-view
class="el-icon-view ml10"
style="vertical-align: middle"
></el-icon-view>
</a> </a>
</template> </template>
</div> </div>
......
...@@ -64,8 +64,8 @@ let config = { ...@@ -64,8 +64,8 @@ let config = {
services: { services: {
wecom: '/open', wecom: '/open',
// system: env.SYSTEM_API, system: env.SYSTEM_API,
system: 'http://192.168.4.168:6180', // system: 'http://192.168.4.168:6180',
common: '/common', common: '/common',
}, },
......
...@@ -7,19 +7,28 @@ ...@@ -7,19 +7,28 @@
<el-form-item label-width="0px"> <el-form-item label-width="0px">
<!-- 富文本content --> <!-- 富文本content -->
<!-- <quill-editor v-model="form.content" ref="myQuillEditor"></quill-editor> --> <!-- <quill-editor v-model="form.content" ref="myQuillEditor"></quill-editor> -->
<DefineQuillEditor :value="form.content" @change="getContent" ref="myQuillEditor"></DefineQuillEditor> <DefineQuillEditor
:value="form.content"
@change="getContent"
ref="myQuillEditor"
></DefineQuillEditor>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" class="g-card"> <el-col :span="6" class="g-card">
<el-form-item label="选择分组" prop="categoryId"> <el-form-item label="选择分组" prop="categoryId">
<el-cascader v-model="form.categoryId" :options="treeData[0].children" :props="groupProps"></el-cascader> <el-cascader
v-model="form.categoryId"
:options="treeData[0].children"
:props="groupProps"
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="文章标题" prop="materialName"> <el-form-item label="文章标题" prop="materialName">
<el-input <el-input
v-model="form.materialName" v-model="form.materialName"
placeholder="请输入文章标题" placeholder="请输入文章标题"
:maxlength="30" :maxlength="30"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文章描述"> <el-form-item label="文章描述">
...@@ -28,10 +37,11 @@ ...@@ -28,10 +37,11 @@
type="textarea" type="textarea"
placeholder="请输入文章描述" placeholder="请输入文章描述"
:maxlength="100" :maxlength="100"
show-word-limit></el-input> show-word-limit
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文章封面"> <el-form-item label="文章封面">
<upload v-model:fileUrl="form.coverUrl" type="0"> <upload v-model:fileUrl="form.coverUrl" v-model:imgSize="form.memorySize" type="0">
<template #tip><div>支持jpg/jpeg/png格式,建议200*200</div></template> <template #tip><div>支持jpg/jpeg/png格式,建议200*200</div></template>
</upload> </upload>
</el-form-item> </el-form-item>
...@@ -139,6 +149,14 @@ export default { ...@@ -139,6 +149,14 @@ export default {
this.times = setTimeout(() => { this.times = setTimeout(() => {
let form = JSON.parse(JSON.stringify(this.form)) let form = JSON.parse(JSON.stringify(this.form))
form.mediaType = 12 form.mediaType = 12
if (form.coverUrl) {
let img = new Image()
img.src = form.coverUrl //图片链接
form.width = img.width
form.height = img.height
form.pixelSize = img.width * img.height
}
;(form.id ? update : add)(form) ;(form.id ? update : add)(form)
.then(() => { .then(() => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
......
...@@ -22,11 +22,12 @@ ...@@ -22,11 +22,12 @@
/> />
<el-select <el-select
v-model="query.surveyState" v-model="query.surveyState"
placeholder="请选择状态" placeholder="请选择类型"
style="width: 150px; margin-right: 20px" style="width: 150px; margin-right: 20px"
v-if="type === 1"
> >
<el-option label="未执行" :value="0"></el-option> <el-option label="评论" :value="0"></el-option>
<el-option label="已执行" :value="1"></el-option> <el-option label="点赞" :value="1"></el-option>
</el-select> </el-select>
<el-button type="primary" @click="handleSearch">查询</el-button> <el-button type="primary" @click="handleSearch">查询</el-button>
<el-button @click="resetQuery">清空</el-button> <el-button @click="resetQuery">清空</el-button>
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
<el-table-column label="互动类型" align="center" prop="type" show-overflow-tooltip> <el-table-column label="互动类型" align="center" prop="type" show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<div> <div>
{{ row.type }} {{ row.type === 1 ? '点赞' : '评论' }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -107,7 +108,7 @@ export default { ...@@ -107,7 +108,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.type = this.$route.query.type this.type = +this.$route.query.type
this.id = this.$route.query.id this.id = this.$route.query.id
this.name = this.$route.query.name this.name = this.$route.query.name
this.getList() this.getList()
......
...@@ -246,6 +246,7 @@ export default { ...@@ -246,6 +246,7 @@ export default {
}, },
setEditTag() { setEditTag() {
if (this.form.customerTag && this.form.customerTag.length) { if (this.form.customerTag && this.form.customerTag.length) {
this.selectedTagList = []
getList({ groupTagType: 1 }).then(({ rows }) => { getList({ groupTagType: 1 }).then(({ rows }) => {
this.form.customerTag.forEach((dd) => { this.form.customerTag.forEach((dd) => {
rows.forEach((inx) => { rows.forEach((inx) => {
......
...@@ -280,7 +280,7 @@ export default { ...@@ -280,7 +280,7 @@ export default {
syncFn() { syncFn() {
syncHMoments(2).then((res) => { syncHMoments(2).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.msgSuccess(res.msg) this.msgSuccess(res.data)
this.getList() this.getList()
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!