diff --git a/src/views/modules/custom/module-style-list.vue b/src/views/modules/news/module-style-list.vue
similarity index 80%
rename from src/views/modules/custom/module-style-list.vue
rename to src/views/modules/news/module-style-list.vue
index 2dad220..8003832 100644
--- a/src/views/modules/custom/module-style-list.vue
+++ b/src/views/modules/news/module-style-list.vue
@@ -14,18 +14,22 @@
:label="item.dictValue" style="margin-left: 30px;margin-top: 30px" @change="setModuleStyle(item.dictName,item.dictValue)">
{{ `${item.dictName}` }}
-
-
+
+
+
+ {{ $t('cancel') }}
+ {{ $t('confirm') }}
+
@@ -41,7 +45,11 @@ export default {
moduleStyle: ''
},
moduleStyleList: [],
- previewImgList: []
+ previewImgList: [],
+ data: {
+ moduleStyle: '',
+ moduleStyleName: ''
+ }
}
},
computed: {
@@ -62,7 +70,7 @@ export default {
this.previewImgList.push(url)
},
getModuleStyleList () {
- this.$http.get(`/custom/module/listSimple/jinshui_gui_style`).then(({ data: res }) => {
+ this.$http.get(`/sys/dict/listSimple/jinshui_gui_style`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
@@ -70,15 +78,18 @@ export default {
}).catch(() => {})
},
setModuleStyle (name, value) {
+ this.data.moduleStyle = value
+ this.data.moduleStyleName = name
+ },
+ dataFormSubmitHandle () {
+ if (this.data.moduleStyle === '' || this.data.moduleStyle === undefined || this.data.moduleStyleName === '' || this.data.moduleStyleName === undefined) {
+ return this.$message.error('请选择模块样式')
+ }
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
- let data = {
- moduleStyle: value,
- moduleStyleName: name
- }
- this.$emit('setModuleStyle', data)
+ this.$emit('setModuleStyle', this.data)
this.visible = false
})
},
diff --git a/src/views/modules/custom/modulecategory-add-or-update.vue b/src/views/modules/news/modulecategory-add-or-update.vue
similarity index 96%
rename from src/views/modules/custom/modulecategory-add-or-update.vue
rename to src/views/modules/news/modulecategory-add-or-update.vue
index 1139085..e7a8f13 100644
--- a/src/views/modules/custom/modulecategory-add-or-update.vue
+++ b/src/views/modules/news/modulecategory-add-or-update.vue
@@ -175,7 +175,7 @@ export default {
this.getSecondOrgDicList()
},
getModuleStyleList () {
- this.$http.get(`/custom/module/listSimple/jinshui_gui_style`).then(({ data: res }) => {
+ this.$http.get(`/sys/dict/listSimple/jinshui_gui_style`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
@@ -207,7 +207,7 @@ export default {
this.dataForm.categoryType = item
},
getcategoryList () {
- return this.$http.get('/custom/modulecategory/list').then(({ data: res }) => {
+ return this.$http.get('/news/modulecategory/list').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
@@ -223,7 +223,7 @@ export default {
}).catch(() => { })
},
getInfo () {
- this.$http.get(`/custom/modulecategory/${this.dataForm.id}`).then(({ data: res }) => {
+ this.$http.get(`/news/modulecategory/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
@@ -258,7 +258,7 @@ export default {
if (!valid) {
return false
}
- this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/modulecategory', this.dataForm).then(({ data: res }) => {
+ this.$http[!this.dataForm.id ? 'post' : 'put']('/news/modulecategory', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
diff --git a/src/views/modules/custom/modulecategory.vue b/src/views/modules/news/modulecategory.vue
similarity index 89%
rename from src/views/modules/custom/modulecategory.vue
rename to src/views/modules/news/modulecategory.vue
index 232c4f3..3b7f20c 100644
--- a/src/views/modules/custom/modulecategory.vue
+++ b/src/views/modules/news/modulecategory.vue
@@ -8,7 +8,6 @@
-
-
@@ -50,8 +48,8 @@ export default {
data () {
return {
mixinViewModuleOptions: {
- getDataListURL: '/custom/modulecategory/list',
- deleteURL: '/custom/modulecategory'
+ getDataListURL: '/news/modulecategory/list',
+ deleteURL: '/news/modulecategory'
},
upLoadUrl: ''
}
diff --git a/src/views/modules/news/notice-add-or-update.vue b/src/views/modules/news/notice-add-or-update.vue
index 845d094..7678aaf 100644
--- a/src/views/modules/news/notice-add-or-update.vue
+++ b/src/views/modules/news/notice-add-or-update.vue
@@ -35,14 +35,9 @@
-
-
-
-
+
+
+
@@ -150,7 +145,20 @@ export default {
gridList: [],
options: [],
optionNoticeCategoryCode: [],
- videoLoading: false
+ videoLoading: false,
+ moduleCategoryList: [],
+ noticeCategoryList: [],
+ optionProps: {
+ checkStrictly: true,
+ value: 'categoryCode'
+ }
+ }
+ },
+ watch: {
+ 'noticeCategoryList': function (val) {
+ if (val.length !== 0) {
+ this.dataForm.noticeCategory = val[val.length - 1]
+ }
}
},
computed: {
@@ -185,6 +193,7 @@ export default {
this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))
// 根据数据字典类型notice_category 获取简版数据字典列表,用于页面下拉菜单
this.getListSimpleByDictType()
+ this.getModuleCategoryList()
},
methods: {
// 富文本编辑器
@@ -251,6 +260,7 @@ export default {
}
this.dataForm = { ...this.dataForm, ...res.data }
// this.quillEditor.root.innerHTML = res.data.noticeContent
+ this.noticeCategoryList = res.data.noticeCategoriesShow
if (this.dataForm.streetId) {
if (this.dataForm.communityId === 0) {
this.dataForm.communityId = this.dataForm.gridId = null
@@ -368,6 +378,24 @@ export default {
}
this.optionNoticeCategoryCode = res.data
}).catch(() => {})
+ },
+ getModuleCategoryList () {
+ this.$http.get('/news/modulecategory/list').then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.getSelectedNode(res.data, res.data)
+ this.moduleCategoryList = res.data
+ }).catch(() => { })
+ },
+ getSelectedNode (nodeData, parent) {
+ nodeData.forEach(item => {
+ if ('children' in item && item.children.length === 0) {
+ delete item.children
+ } else if ('children' in item && item.children.length) {
+ this.getSelectedNode(item.children, item)
+ }
+ })
}
},
components: {
diff --git a/src/views/modules/news/notice.vue b/src/views/modules/news/notice.vue
index 1f7751a..f94eaf8 100644
--- a/src/views/modules/news/notice.vue
+++ b/src/views/modules/news/notice.vue
@@ -10,16 +10,11 @@
placeholder="通知标题"
clearable>
-
-
-
-
-
-
+
+
+
+
+
{{ $t('query') }}
@@ -48,12 +43,12 @@
align="center"
show-overflow-tooltip
min-width="200">
-
+ >
{})
},
- noticeCategoryFormat (row, column) {
- for (var property in this.optionNoticeCategoryCode) {
- if (row.noticeCategory === this.optionNoticeCategoryCode[property].dictValue) {
- return this.optionNoticeCategoryCode[property].dictName
+ getModuleCategoryList () {
+ this.$http.get('/news/modulecategory/list').then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
}
- }
+ this.getSelectedNode(res.data, res.data)
+ this.moduleCategoryList = res.data
+ }).catch(() => { })
+ },
+ getSelectedNode (nodeData, parent) {
+ nodeData.forEach(item => {
+ if ('children' in item && item.children.length === 0) {
+ delete item.children
+ } else if ('children' in item && item.children.length) {
+ this.getSelectedNode(item.children, item)
+ }
+ })
}
}
}