Browse Source

新闻和banner页面bug修复

master
yujintao 6 years ago
parent
commit
e322faf207
  1. 4
      src/views/modules/news/banner-add-or-update.vue
  2. 11
      src/views/modules/news/notice-add-or-update.vue
  3. 1
      src/views/modules/news/notice.vue

4
src/views/modules/news/banner-add-or-update.vue

@ -160,11 +160,11 @@ export default {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null
this.communityList = this.gridList = []
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo() this.getInfo()
} else {
this.dataForm = []
} }
}) })
}, },

11
src/views/modules/news/notice-add-or-update.vue

@ -20,7 +20,8 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属社区"> <el-form-item label="所属社区"
prop="communityId">
<el-select v-model="dataForm.communityId" <el-select v-model="dataForm.communityId"
@change="changeCommunity" @change="changeCommunity"
placeholder="所属社区"> placeholder="所属社区">
@ -31,7 +32,8 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属网格"> <el-form-item label="所属网格"
prop="gridId">
<el-select v-model="dataForm.gridId" <el-select v-model="dataForm.gridId"
@change="changeGrid" @change="changeGrid"
placeholder="所属网格"> placeholder="所属网格">
@ -98,13 +100,11 @@ export default {
quillEditor: null, quillEditor: null,
quillEditorToolbarOptions: [ quillEditorToolbarOptions: [
['bold', 'italic', 'underline', 'strike'], ['bold', 'italic', 'underline', 'strike'],
// ['blockquote', 'code-block', 'image'],
['image'], ['image'],
[{ 'header': 1 }, { 'header': 2 }], [{ 'header': 1 }, { 'header': 2 }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }], [{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'script': 'sub' }, { 'script': 'super' }], [{ 'script': 'sub' }, { 'script': 'super' }],
[{ 'indent': '-1' }, { 'indent': '+1' }], [{ 'indent': '-1' }, { 'indent': '+1' }],
// [{ 'direction': 'rtl' }],
[{ 'size': ['small', false, 'large', 'huge'] }], [{ 'size': ['small', false, 'large', 'huge'] }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }], [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }], [{ 'color': [] }, { 'background': [] }],
@ -174,6 +174,7 @@ export default {
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null
this.communityList = this.gridList = []
// //
this.hideUpload = false this.hideUpload = false
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
@ -186,8 +187,6 @@ export default {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo() this.getInfo()
} else {
this.dataForm = []
} }
}) })
}, },

1
src/views/modules/news/notice.vue

@ -116,7 +116,6 @@ export default {
deleteIsBatch: true deleteIsBatch: true
}, },
dataForm: { dataForm: {
id: '',
noticeTitle: '' noticeTitle: ''
} }
} }

Loading…
Cancel
Save