Browse Source

增加用户访问数据的权限

redesign
zhangyuan 5 years ago
parent
commit
757a2b9133
  1. 4
      src/views/modules/honest/allnewshonest-add-or-update.vue
  2. 14
      src/views/modules/honest/newshonest-add-or-update.vue
  3. 2
      src/views/modules/honest/newshonest-list.vue

4
src/views/modules/honest/allnewshonest-add-or-update.vue

@ -181,10 +181,6 @@ export default {
return this.$message.error(res.msg)
}
this.dataForm = { ...this.dataForm, ...res.data }
console.log("this.quillEditor.root.innerHTML")
console.log(this.quillEditor.root.innerHTML)
console.log("res.data.newsContent")
console.log(res.data.newsContent)
this.quillEditor.root.innerHTML = res.data.newsContent
let business = this.options.find(item=>{
return item.code === this.dataForm.businessId

14
src/views/modules/honest/newshonest-add-or-update.vue

@ -6,6 +6,7 @@
@close="visible= false">
<el-form :model="dataForm"
:rules="dataRule"
v-loading="loading"
ref="dataForm"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="新闻模块"
@ -108,8 +109,8 @@ export default {
newsProperty: '',
newsColumn: '',
newsTitle: '',
newsReleaseStartTime: '',
newsReleaseEndTime: '',
newsApprovalState: '',
approvalReason: '',
newsContent: '',
newsImageUrl: '',
allDeptIdsShow: []
@ -226,12 +227,12 @@ export default {
},
//
getInfo () {
this.loading = true
this.$http.get(`/news/newshonest/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = { ...this.dataForm, ...res.data }
this.resetRegistTime()
this.quillEditor.root.innerHTML = res.data.newsContent
//
this.$http
@ -259,7 +260,10 @@ export default {
.catch(() => {
this.loading = false
})
}).catch(() => { })
this.loading = false
}).catch(() => {
this.loading = false
})
},
//
getDeptInfoList (dataReceiver, faDeptId) {
@ -376,6 +380,8 @@ export default {
dataFormSubmitHandle: debounce(function () {
this.dataForm.newsProperty = this.$refs.newsCateroryName.selectedLabel
this.dataForm.newsColumn = this.$refs.newsSubCateroryName.selectedLabel
this.dataForm.newsApprovalState = '0'
this.dataForm.approvalReason = ''
// if ((this.dataForm.newsContent).length > 10000) {
// return this.$message.error('')
// }

2
src/views/modules/honest/newshonest-list.vue

@ -82,7 +82,7 @@
<el-button v-if="$hasPermission('honest:newshonest:review') && scope.row.newsApprovalState === '2' && scope.row.newsUpDownState === '1'" type="text" size="small" @click="UpStateChange(scope.row.id)">上线</el-button>
<el-button v-if="$hasPermission('honest:newshonest:review') && scope.row.newsUpDownState === '0'" type="text" size="small" @click="DownStateChange(scope.row.id)">下线</el-button>
<el-button v-if="$hasPermission('honest:newshonest:review') && scope.row.newsApprovalState === '0'" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">审核</el-button>
<el-button v-if="!$hasPermission('honest:newshonest:review') || ($hasPermission('honest:newshonest:review') && scope.row.newsApprovalState !== '0')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">查看</el-button>
<el-button v-if="($hasPermission('honest:newshonest:view') && scope.row.newsApprovalState === '2') || ($hasPermission('honest:newshonest:review') && scope.row.newsApprovalState !== '0')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">查看</el-button>
</template>
</el-table-column>
</el-table>

Loading…
Cancel
Save