From 4cb6fb0e63228dde8b486e6b017e042dcd06b67e Mon Sep 17 00:00:00 2001 From: yujt Date: Mon, 22 Jun 2020 14:42:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E9=97=BB=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E7=BB=B4=E6=8A=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/newscategory-add-or-update.vue | 35 ++++++++++++---- src/views/modules/news/newscategory.vue | 41 ++++++++++++++++--- .../psychologisttitle-add-or-update.vue | 6 +-- 3 files changed, 64 insertions(+), 18 deletions(-) diff --git a/src/views/modules/news/newscategory-add-or-update.vue b/src/views/modules/news/newscategory-add-or-update.vue index d76c557..ddd1e32 100644 --- a/src/views/modules/news/newscategory-add-or-update.vue +++ b/src/views/modules/news/newscategory-add-or-update.vue @@ -8,19 +8,23 @@ ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> - + + + + + + - + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.sectionCodeList = res.data + }) + .catch(() => {}) + }, getInfo () { this.$http.get(`/news/newscategory/${this.dataForm.id}`).then(({ data: res }) => { if (res.code !== 0) { @@ -98,9 +115,9 @@ export default { ...this.dataForm, ...res.data } - if (res.data.independentFlag === '1') { - this.codeReadOnly = true - } + // if (res.data.independentFlag === '1') { + // this.codeReadOnly = true + // } }).catch(() => { }) }, // 表单提交 diff --git a/src/views/modules/news/newscategory.vue b/src/views/modules/news/newscategory.vue index 9f6820b..86cb6e6 100644 --- a/src/views/modules/news/newscategory.vue +++ b/src/views/modules/news/newscategory.vue @@ -2,11 +2,13 @@
- + + + + + - 刷新 + 查询 {{ $t('add') }} @@ -20,6 +22,7 @@ {{scope.$index+1}} + @@ -59,12 +62,38 @@ export default { deleteIsBatch: true }, dataForm: { - id: '' - } + id: '', + sectionCode: '' + }, + sectionCodeList: [] } }, components: { AddOrUpdate + }, + created () { + this.getsectionCodeList() + }, + methods: { + getsectionCodeList () { + this.$http.get(`/sys/dict/listSimple/function_section_article`) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.sectionCodeList = res.data + }) + .catch(() => {}) + }, + showSectionCode: function (row, column) { + if (row.sectionCode) { + let dict = this.sectionCodeList.filter(item => item.dictValue === row.sectionCode)[0] + if (dict) { + return dict.dictName + } + } + return '' + } } } diff --git a/src/views/modules/psychology/psychologisttitle-add-or-update.vue b/src/views/modules/psychology/psychologisttitle-add-or-update.vue index 7f77e73..56f34d0 100644 --- a/src/views/modules/psychology/psychologisttitle-add-or-update.vue +++ b/src/views/modules/psychology/psychologisttitle-add-or-update.vue @@ -47,9 +47,9 @@ export default { code: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], - sort: [ - { required: true, message: this.$t('validate.required'), trigger: 'blur' } - ], + sort: [ + { required: true, message: this.$t('validate.required'), trigger: 'blur' } + ], delFlag: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ],