|
@@ -151,6 +151,8 @@
|
|
|
:visible.sync="notice"
|
|
|
width="70%"
|
|
|
class="Announcementdia"
|
|
|
+ @close="closeDialog"
|
|
|
+
|
|
|
>
|
|
|
<!-- <div>
|
|
|
<span>
|
|
@@ -169,6 +171,16 @@
|
|
|
<el-input placeholder="请填写新闻标题" v-model="AnnouncementFrom.title" :disabled="showANN"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="封面图:" prop="cover">
|
|
|
+ <p class="color666">图片大小不能超过3MB</p>
|
|
|
+ <UploadImage
|
|
|
+ v-model="AnnouncementFrom.cover"
|
|
|
+ :limit="1"
|
|
|
+ ref="upload">
|
|
|
+ </UploadImage>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
<el-row >
|
|
|
<el-form-item label="新闻内容:" prop="content">
|
|
|
<div v-if="showANN" v-html="AnnouncementFrom.content">
|
|
@@ -203,7 +215,7 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer Txc">
|
|
|
- <el-button type="info" size="small" plain @click="notice=false">取消</el-button>
|
|
|
+ <el-button type="info" size="small" plain @click="closeDialog()">取消</el-button>
|
|
|
<el-button type="primary" size="small" plain @click="subPicForm()">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -217,6 +229,7 @@ import 'quill/dist/quill.snow.css'
|
|
|
import 'quill/dist/quill.bubble.css'
|
|
|
import { quillEditor } from 'vue-quill-editor'
|
|
|
import '../../../../assets/css/font.css'
|
|
|
+import UploadImage from '@/apps/mobile/components/UploadImage/index';
|
|
|
|
|
|
// 工具栏配置
|
|
|
const toolbarOptions = [
|
|
@@ -239,7 +252,8 @@ const toolbarOptions = [
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- quillEditor
|
|
|
+ quillEditor,
|
|
|
+ UploadImage
|
|
|
},
|
|
|
name: "NewList",
|
|
|
data() {
|
|
@@ -290,6 +304,7 @@ export default {
|
|
|
content:'',
|
|
|
imgUrls:'',
|
|
|
topSerial:0,
|
|
|
+ cover:''
|
|
|
},
|
|
|
AnnouncementFromrule:{
|
|
|
title: [
|
|
@@ -435,15 +450,25 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
showNews(a){
|
|
|
- this.AnnouncementFrom = a
|
|
|
+ this.AnnouncementFrom = Object.assign({}, a)
|
|
|
this.showANN=true
|
|
|
- this.notice=true
|
|
|
+ this.notice=true;
|
|
|
+ if(a.cover) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.upload.watchValue()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
editNews(a){
|
|
|
- this.AnnouncementFrom = a
|
|
|
+ this.AnnouncementFrom = Object.assign({}, a)
|
|
|
this.IsEditANN=1
|
|
|
this.showANN=false
|
|
|
this.notice=true
|
|
|
+ if(a.cover) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.upload.watchValue()
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
addNews(){
|
|
|
this.IsEditANN=0
|
|
@@ -474,6 +499,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ closeDialog() {
|
|
|
+ this.AnnouncementFrom = Object.assign({}, {
|
|
|
+ cover: ''
|
|
|
+ })
|
|
|
+ this.notice=false
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.upload.watchValue()
|
|
|
+ })
|
|
|
+ },
|
|
|
showImage(imgUrl){
|
|
|
this.Image[0] = {
|
|
|
imgUrl:imgUrl,
|