Browse Source

Merge branch 'dev_0814' of http://121.42.41.42:7070/r/esua-epdc-admin into dev_0814

master
王金鹏 6 years ago
parent
commit
d9d1b0c967
  1. BIN
      src/assets/img/home_bg.png
  2. 5
      src/assets/scss/modules/home.scss
  3. 2
      src/i18n/zh-CN.js
  4. 4
      src/views/modules/home.vue
  5. 8
      src/views/modules/news/banner-add-or-update.vue
  6. 16
      src/views/modules/news/news-add-or-update.vue
  7. 4
      src/views/modules/news/news-publish.vue
  8. 16
      src/views/modules/news/notice-add-or-update.vue

BIN
src/assets/img/home_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

5
src/assets/scss/modules/home.scss

@ -4,3 +4,8 @@
color: $--color-text-regular; color: $--color-text-regular;
} }
} }
.home_bg_img {
background: url(~@/assets/img/home_bg.png) no-repeat;
background-position: center;
}

2
src/i18n/zh-CN.js

@ -3,7 +3,7 @@ const t = {}
t.loading = '加载中...' t.loading = '加载中...'
t.brand = {} t.brand = {}
t.brand.lg = '党群e家后台管理系统' t.brand.lg = '党群e家管理平台'
t.brand.mini = '党群' t.brand.mini = '党群'
t.add = '新增' t.add = '新增'

4
src/views/modules/home.vue

@ -1,8 +1,8 @@
<template> <template>
<el-card shadow="never" <el-card shadow="never"
class="aui-card--fill"> class="aui-card--fill home_bg_img">
<div class="mod-home"> <div class="mod-home">
<h1>欢迎使用党群e家后台管理系统</h1> <h1>欢迎使用党群e家管理平台</h1>
</div> </div>
</el-card> </el-card>
</template> </template>

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

@ -16,6 +16,8 @@
<el-form-item label="标题" <el-form-item label="标题"
prop="title"> prop="title">
<el-input v-model="dataForm.title" <el-input v-model="dataForm.title"
maxlength="50"
show-word-limit
placeholder="标题"></el-input> placeholder="标题"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属街道" <el-form-item label="所属街道"
@ -74,6 +76,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="banner图片" <el-form-item label="banner图片"
v-loading="loading"
prop="imgUrl"> prop="imgUrl">
<el-upload class="avatar-uploader" <el-upload class="avatar-uploader"
:action="this.uploadUrl" :action="this.uploadUrl"
@ -122,7 +125,8 @@ export default {
communityList: [], communityList: [],
gridList: [], gridList: [],
uploadUrl: '', uploadUrl: '',
positionList: [] positionList: [],
loading: false
} }
}, },
computed: { computed: {
@ -214,8 +218,10 @@ export default {
// //
handleAvatarSuccess (res, file) { handleAvatarSuccess (res, file) {
this.dataForm.imgUrl = res.data.url this.dataForm.imgUrl = res.data.url
this.loading = false
}, },
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
this.loading = true
}, },
getListFromDict (dictType) { getListFromDict (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => { this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {

16
src/views/modules/news/news-add-or-update.vue

@ -133,12 +133,12 @@ export default {
}, },
dataForm: { dataForm: {
id: '', id: '',
streetId: '', streetId: null,
street: '', street: null,
communityId: '', communityId: null,
community: '', community: null,
gridId: '', gridId: null,
grid: '', grid: null,
newsCateroryId: '', newsCateroryId: '',
newsProperty: '', newsProperty: '',
newsTitle: '', newsTitle: '',
@ -232,7 +232,7 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.dataForm = res.data this.dataForm = { ...this.dataForm, ...res.data }
this.resetRegistTime() this.resetRegistTime()
this.quillEditor.root.innerHTML = res.data.newsContent this.quillEditor.root.innerHTML = res.data.newsContent
if (this.dataForm.streetId) { if (this.dataForm.streetId) {
@ -371,7 +371,7 @@ export default {
} }
}) })
}).catch(() => { }) }).catch(() => { })
this.dataForm = [] this.dataForm = {}
}) })
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
}, },

4
src/views/modules/news/news-publish.vue

@ -89,6 +89,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item prop="newsImageUrl" <el-form-item prop="newsImageUrl"
v-loading="loading"
label="新闻首图"> label="新闻首图">
<el-upload class="avatar-uploader" <el-upload class="avatar-uploader"
:action="uploadUrl" :action="uploadUrl"
@ -160,6 +161,7 @@ export default {
communityList: [], communityList: [],
gridList: [], gridList: [],
categorys: [], categorys: [],
loading: false,
// //
quillEditor: null, quillEditor: null,
quillEditorToolbarOptions: [ quillEditorToolbarOptions: [
@ -375,6 +377,7 @@ export default {
}) })
}, 1000, { 'leading': true, 'trailing': false }), }, 1000, { 'leading': true, 'trailing': false }),
handleAvatarSuccess (res, file) { handleAvatarSuccess (res, file) {
this.loading = false
this.dataForm.newsImageUrl = res.data.url this.dataForm.newsImageUrl = res.data.url
}, },
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
@ -387,6 +390,7 @@ export default {
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传图片大小不能超过 500KB!') this.$message.error('上传图片大小不能超过 500KB!')
} }
this.loading = true
return isJPG && isLt2M return isJPG && isLt2M
} }
}, },

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

@ -46,6 +46,8 @@
<el-form-item label="通知标题" <el-form-item label="通知标题"
prop="noticeTitle"> prop="noticeTitle">
<el-input v-model="dataForm.noticeTitle" <el-input v-model="dataForm.noticeTitle"
maxlength="50"
show-word-limit
placeholder="通知标题"></el-input> placeholder="通知标题"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="noticeContent" <el-form-item prop="noticeContent"
@ -86,12 +88,12 @@ export default {
visible: false, visible: false,
dataForm: { dataForm: {
id: '', id: '',
streetId: '', streetId: null,
street: '', street: null,
communityId: '', communityId: null,
community: '', community: null,
gridId: '', gridId: null,
grid: '', grid: null,
noticeTitle: '', noticeTitle: '',
noticeContent: '' noticeContent: ''
}, },
@ -195,7 +197,7 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.dataForm = res.data this.dataForm = { ...this.dataForm, ...res.data }
this.quillEditor.root.innerHTML = res.data.noticeContent this.quillEditor.root.innerHTML = res.data.noticeContent
if (this.dataForm.streetId) { if (this.dataForm.streetId) {
if (this.dataForm.communityId === 0) { if (this.dataForm.communityId === 0) {

Loading…
Cancel
Save