Commit edcc4c88 by test

朋友圈数据格式调整

1 parent 5ce0151f
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<el-table-column show-overflow-tooltip prop="content" label="朋友圈内容"> <el-table-column show-overflow-tooltip prop="content" label="朋友圈内容">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-image v-if="row.contentType === 'image'" :src="row.content" fit="fit" :preview-src-list="[row.content]" style="width: 100px; height: 100px"></el-image> <el-image v-if="row.contentType === 'image'" :src="row.content" fit="fit" :preview-src-list="[row.content]" style="width: 100px; height: 100px"></el-image>
<video v-else-if="row.contentType === 'video'" style="width: 100px; height: 100px;" :src="row.content"></video>
<div v-else>{{row.content}}</div> <div v-else>{{row.content}}</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -87,22 +88,27 @@ ...@@ -87,22 +88,27 @@
<SelectUser :visible.sync="dialogVisible" title="组织架构" :defaultValues="userArray" @success="getSelectUser"></SelectUser> <SelectUser :visible.sync="dialogVisible" title="组织架构" :defaultValues="userArray" @success="getSelectUser"></SelectUser>
<el-dialog title="详情" :visible.sync="detailDialogVisible" width="40%"> <el-dialog title="详情" :visible.sync="detailDialogVisible" width="40%">
<el-form label-position="right" label-width="100px"> <el-form label-position="right" label-width="100px">
<el-form-item label="内容:">
{{detail.content}}
</el-form-item>
<el-form-item v-if="detail.otherContent" label=" ">
<template v-for="(data, index) in detail.otherContent"> <template v-for="(data, index) in detail.otherContent">
<div style="display:inline-block;margin-right:10px;" v-if="data.annexType === 'image'"> <el-form-item label="内容:" v-if="data.annexType === 'text'">
{{data.other}}
</el-form-item>
<el-form-item label=" " v-if="data.annexType === 'image'">
<div style="display:inline-block;margin-right:10px;">
<el-image style="width: 100px; height: 100px" :src="data.annexUrl"></el-image> <el-image style="width: 100px; height: 100px" :src="data.annexUrl"></el-image>
</div> </div>
<div style="display:inline-block;margin-right:10px;" v-else-if="data.annexType === 'video'"> </el-form-item>
<video style="width: 100px; height: 100px" :src="data.annexUrl"></video> <el-form-item label=" " v-if="data.annexType === 'video'">
<div style="display:inline-block;margin-right:10px;" v-else-if="">
<video style="width: 200px; height: 200px" :src="data.annexUrl" controls></video>
</div> </div>
<div style="display:inline-block;margin-right:10px;" v-else-if="data.annexType === 'link'"> </el-form-item>
<video style="width: 100px; height: 100px" :src="data.annexUrl"></video> <el-form-item label=" " v-if="data.annexType === 'link'">
<div style="display:inline-block;margin-right:10px;">
<span style="width: 100px; height: 100px">{{data.annexUrl}}</span>
</div> </div>
</template>
</el-form-item> </el-form-item>
</template>
<el-form-item label="已发送员工" v-if="detail.addUserName"> <el-form-item label="已发送员工" v-if="detail.addUserName">
<el-tag v-for="(data, key) in detail.addUserName.split(',')" :key="key">{{data}}</el-tag> <el-tag v-for="(data, key) in detail.addUserName.split(',')" :key="key">{{data}}</el-tag>
</el-form-item> </el-form-item>
...@@ -212,8 +218,8 @@ ...@@ -212,8 +218,8 @@
if (this.lastSyncTime) { if (this.lastSyncTime) {
let date1 = moment(this.lastSyncTime) let date1 = moment(this.lastSyncTime)
let date2 = moment() let date2 = moment()
let date3 = date2.diff(date1,'minute') let date3 = date2.diff(date1, 'minute')
const h = Math.floor(date3/60) const h = Math.floor(date3 / 60)
console.log(h) console.log(h)
if (h >= 2) { if (h >= 2) {
this.disable = false this.disable = false
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<el-table-column show-overflow-tooltip prop="content" label="朋友圈内容"> <el-table-column show-overflow-tooltip prop="content" label="朋友圈内容">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-image v-if="row.contentType === 'image'" :src="row.content" fit="fit" :preview-src-list="[row.content]" style="width: 100px; height: 100px"></el-image> <el-image v-if="row.contentType === 'image'" :src="row.content" fit="fit" :preview-src-list="[row.content]" style="width: 100px; height: 100px"></el-image>
<video v-else-if="row.contentType === 'video'" style="width: 100px; height: 100px" :src="row.content"></video>
<div v-else>{{row.content}}</div> <div v-else>{{row.content}}</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -52,22 +53,26 @@ ...@@ -52,22 +53,26 @@
<SelectUser :visible.sync="dialogVisible" title="组织架构" :defaultValues="userArray" @success="getSelectUser"></SelectUser> <SelectUser :visible.sync="dialogVisible" title="组织架构" :defaultValues="userArray" @success="getSelectUser"></SelectUser>
<el-dialog title="详情" :visible.sync="detailDialogVisible" width="40%"> <el-dialog title="详情" :visible.sync="detailDialogVisible" width="40%">
<el-form label-position="right" label-width="100px"> <el-form label-position="right" label-width="100px">
<el-form-item label="内容:">
{{detail.content}}
</el-form-item>
<el-form-item v-if="detail.otherContent" label=" ">
<template v-for="(data, index) in detail.otherContent"> <template v-for="(data, index) in detail.otherContent">
<div style="display:inline-block;margin-right:10px;" v-if="data.annexType === 'image'"> <el-form-item label="内容:" v-if="data.annexType === 'text'">
{{data.other}}
</el-form-item>
<el-form-item label=" " v-if="data.annexType === 'image'">
<div style="display:inline-block;margin-right:10px;">
<el-image style="width: 100px; height: 100px" :src="data.annexUrl"></el-image> <el-image style="width: 100px; height: 100px" :src="data.annexUrl"></el-image>
</div> </div>
<div style="display:inline-block;margin-right:10px;" v-else-if="data.annexType === 'video'"> </el-form-item>
<video style="width: 100px; height: 100px" :src="data.annexUrl"></video> <el-form-item label=" " v-if="data.annexType === 'video'">
<div style="display:inline-block;margin-right:10px;" v-else-if="">
<video style="width: 200px; height: 200px" :src="data.annexUrl" controls></video>
</div> </div>
<div style="display:inline-block;margin-right:10px;" v-else-if="data.annexType === 'link'"> </el-form-item>
<video style="width: 100px; height: 100px" :src="data.annexUrl"></video> <el-form-item label=" " v-if="data.annexType === 'link'">
<div style="display:inline-block;margin-right:10px;">
<span style="width: 100px; height: 100px">{{data.annexUrl}}</span>
</div> </div>
</template>
</el-form-item> </el-form-item>
</template>
<el-form-item label="点赞客户:" v-if="detail.pointCustomerName"> <el-form-item label="点赞客户:" v-if="detail.pointCustomerName">
<el-tag v-for="(data, key) in detail.pointCustomerName.split(',')" :key="key">{{data}}</el-tag> <el-tag v-for="(data, key) in detail.pointCustomerName.split(',')" :key="key">{{data}}</el-tag>
</el-form-item> </el-form-item>
...@@ -177,8 +182,8 @@ ...@@ -177,8 +182,8 @@
if (this.lastSyncTime) { if (this.lastSyncTime) {
let date1 = moment(this.lastSyncTime) let date1 = moment(this.lastSyncTime)
let date2 = moment() let date2 = moment()
let date3 = date2.diff(date1,'minute') let date3 = date2.diff(date1, 'minute')
const h = Math.floor(date3/60) const h = Math.floor(date3 / 60)
console.log(h) console.log(h)
if (h >= 2) { if (h >= 2) {
this.disable = false this.disable = false
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</template> </template>
<script> <script>
import { gotoPublish } from '@/api/circle' import { gotoPublish } from '@/api/circle'
import SelectTag from '@/components/SelectTag' import SelectTag from '@/components/SelectTag'
import SelectUser from '@/components/SelectUser' import SelectUser from '@/components/SelectUser'
import upload from '@/components/Upload' import upload from '@/components/Upload'
...@@ -130,8 +130,8 @@ import { gotoPublish } from '@/api/circle' ...@@ -130,8 +130,8 @@ import { gotoPublish } from '@/api/circle'
loading: false, loading: false,
selectedUserList: [], selectedUserList: [],
dialogVisibleSelectUser: false, dialogVisibleSelectUser: false,
dialogVisibleSelectTag:false, dialogVisibleSelectTag: false,
selectedTagList:[] selectedTagList: []
} }
}, },
mounted () { mounted () {
...@@ -155,7 +155,7 @@ import { gotoPublish } from '@/api/circle' ...@@ -155,7 +155,7 @@ import { gotoPublish } from '@/api/circle'
this.form.otherContent.push({ this.form.otherContent.push({
annexType: e, annexType: e,
annexUrl: '', annexUrl: '',
contentError:'' contentError: ''
}) })
}, },
onRemoveMaterial (index) { onRemoveMaterial (index) {
...@@ -175,7 +175,7 @@ import { gotoPublish } from '@/api/circle' ...@@ -175,7 +175,7 @@ import { gotoPublish } from '@/api/circle'
dd.contentError = '内容不能为空' dd.contentError = '内容不能为空'
goto = false goto = false
} else { } else {
dd.contentError ='' dd.contentError = ''
} }
}) })
return goto return goto
...@@ -202,7 +202,8 @@ import { gotoPublish } from '@/api/circle' ...@@ -202,7 +202,8 @@ import { gotoPublish } from '@/api/circle'
delete dd.contentError delete dd.contentError
if (dd.annexType === 'link') { if (dd.annexType === 'link') {
let reUrl = /(http|https):\/\/([\w.]+\/?)\S*/ let reUrl = /(http|https):\/\/([\w.]+\/?)\S*/
if (!reUrl.test(dd.content)) { if (!reUrl.test(dd.annexUrl)) {
console.log(123)
goto = false goto = false
dd.contentError = '必须以 http://或 https://开头' dd.contentError = '必须以 http://或 https://开头'
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!