|
@@ -3,12 +3,13 @@
|
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="header">
|
|
|
<div class="type-box">
|
|
|
- <span class="act">中文分类</span>
|
|
|
- <span @click="$emit('typeChange','2')">英文分类</span>
|
|
|
+ <span class="act" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify">中文分类</span>
|
|
|
+ <span @click="$emit('typeChange','2')" v-permission="permissionBtn.enClassifyBtn.classifyList_enClassify">英文分类</span>
|
|
|
</div>
|
|
|
<el-form :inline="true" :model="searchform" @submit.native.prevent>
|
|
|
<el-form-item label="">
|
|
|
- <el-button type="primary" size="small" @click="aeDialogTrue">添加分类</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyAdd"
|
|
|
+ type="primary" size="small" @click="aeDialogTrue">添加分类</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-input placeholder="分类名称" @change="search" v-model="searchform.key_word" clearable size="small">
|
|
@@ -18,7 +19,8 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<template>
|
|
|
- <el-table style="border:1px solid #eaeaea;" :data="tableData" v-loading="listLoading" :row-class-name="tableRowClassName" element-loading-text="数据加载中..." :default-expand-all='isexpand' row-key="Id" :tree-props="{children:'children',hasChildren:'hasChildren'}">
|
|
|
+ <el-table v-if="isTableShow"
|
|
|
+ style="border:1px solid #eaeaea;" :data="tableData" v-loading="listLoading" :row-class-name="tableRowClassName" element-loading-text="数据加载中..." :default-expand-all='isexpand' row-key="Id" :tree-props="{children:'children',hasChildren:'hasChildren'}">
|
|
|
<!-- <el-table-column prop="id" label="序号" width="100px" align="left">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{scope.row.ischild?'':scope.row.id}}</span>
|
|
@@ -39,20 +41,24 @@
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div style="color:#4099ef; font-size:24px;">
|
|
|
- <span class="editsty" v-if="scope.row.ClassifyName=='晨报' || scope.row.ClassifyName=='周报'" @click="chapterSetting(scope.row)">章节设置</span>
|
|
|
- <span class="editsty" :class="{'editedsty' : editedItems.includes(scope.row.Id)}" v-if="scope.row.ischild" @click="configitem(scope.row)">权限配置</span>
|
|
|
+ <span class="editsty" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_chapterSetting"
|
|
|
+ v-if="scope.row.ClassifyName=='晨报' || scope.row.ClassifyName=='周报'" @click="chapterSetting(scope.row)">章节设置</span>
|
|
|
+ <span class="editsty" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_authSetting"
|
|
|
+ :class="{'editedsty' : editedItems.includes(scope.row.Id)}" v-if="scope.row.ischild" @click="configitem(scope.row)">权限配置</span>
|
|
|
|
|
|
<!-- <i class="el-icon-edit-outline" @click="edititem(scope.row)"></i> -->
|
|
|
- <span class="editsty" @click="edititem(scope.row)">编辑</span>
|
|
|
+ <span class="editsty" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyAdd"
|
|
|
+ @click="edititem(scope.row)">编辑</span>
|
|
|
|
|
|
<!-- <i class="el-icon-delete" @click="checkdeleteitem(scope.row)"></i> -->
|
|
|
- <span class="deletesty" @click="checkdeleteitem(scope.row)">删除</span>
|
|
|
+ <span v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyDel"
|
|
|
+ class="deletesty" @click="checkdeleteitem(scope.row)">删除</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</template>
|
|
|
- <el-col :span="24" class="toolbar">
|
|
|
+ <el-col :span="24" class="toolbar" v-if="isTableShow">
|
|
|
<el-pagination v-if="ispage" layout="total,prev,pager,next,jumper" background @current-change="handleCurrentChange" :page-size="pageSize" @size-change="handleSizeChange" :total="total" style="float:right;"></el-pagination>
|
|
|
</el-col>
|
|
|
</el-card>
|
|
@@ -73,7 +79,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- 子目录 -->
|
|
|
- <el-form-item label="子目录" v-if="aeForm.parent_id==0&&aeForm.showType==1">
|
|
|
+ <el-form-item label="子目录" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_childMenu"
|
|
|
+ v-if="aeForm.parent_id==0&&aeForm.showType==1">
|
|
|
<draggable v-model="ClassifyMenuList" animation="300">
|
|
|
<div style="display:inline-block;margin-right:5px" v-for="(item,index) in ClassifyMenuList" :key="item">
|
|
|
<el-input
|
|
@@ -111,7 +118,8 @@
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="子目录" v-if="aeForm.parent_id!=0">
|
|
|
+ <el-form-item label="子目录" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_childMenu"
|
|
|
+ v-if="aeForm.parent_id!=0">
|
|
|
<el-select v-model="aeForm.ClassifyMenuId" clearable placeholder="请选择" style="width:400px;">
|
|
|
<el-option
|
|
|
:label="item.MenuName"
|
|
@@ -125,28 +133,33 @@
|
|
|
<el-form-item prop="label" label="分类标签" v-if="aeForm.parent_id!=0">
|
|
|
<el-input type="textarea" autosize v-model="aeForm.label" placeholder="请输入" size="small" style="width:400px;font-size:14px;"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="展示形式" prop="showType" v-if="aeForm.parent_id==0">
|
|
|
+ <el-form-item label="展示形式" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_showType"
|
|
|
+ prop="showType" v-if="aeForm.parent_id==0">
|
|
|
<el-select v-model="aeForm.showType" placeholder="请选择" style="width:400px;">
|
|
|
<el-option label="列表" :value="1"></el-option>
|
|
|
<el-option label="专栏" :value="2"></el-option>
|
|
|
<el-option label="品种" :value="3"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="后台排序" prop="Sort" v-if="aeForm.parent_id==0">
|
|
|
+ <el-form-item label="后台排序" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_backSort"
|
|
|
+ prop="Sort" v-if="aeForm.parent_id==0">
|
|
|
<el-input-number v-model="aeForm.Sort" placeholder="请输入数字"></el-input-number>
|
|
|
<!-- <el-input type="number" v-model="aeForm.Sort" placeholder="请输入数字" size="small" ></el-input> -->
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="FICC页排序" prop="YbFiccSort" v-if="aeForm.parent_id==0">
|
|
|
+ <el-form-item label="FICC页排序" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_ficcSort"
|
|
|
+ prop="YbFiccSort" v-if="aeForm.parent_id==0">
|
|
|
<el-input-number v-model="aeForm.YbFiccSort" placeholder="请输入数字"></el-input-number>
|
|
|
<!-- <el-input type="number" v-model="aeForm.YbFiccSort" placeholder="请输入数字" size="small" style="width:400px;"></el-input> -->
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="FICC页icon" v-if="aeForm.parent_id==0" prop="YbFiccIcon">
|
|
|
+ <el-form-item label="FICC页icon" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_ficcIcon"
|
|
|
+ v-if="aeForm.parent_id==0" prop="YbFiccIcon">
|
|
|
<input type="file" size="small" name="file" @change="fileSelected(6)" id="file6" class="true-file" style="display:none;">
|
|
|
<el-input readonly type="text" v-model="aeForm.YbFiccIcon" placeholder="上传FICC页icon" size="medium" style="width:400px;">
|
|
|
<el-button slot="append" type="primary" size="mini" @click.native="clickinput(6)">选择图片</el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="报告合集配图" v-if="aeForm.parent_id==0&&aeForm.showType!==2" prop="YbRightBanner">
|
|
|
+ <el-form-item label="报告合集配图" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_reportImgs"
|
|
|
+ v-if="aeForm.parent_id==0&&aeForm.showType!==2" prop="YbRightBanner">
|
|
|
<input type="file" size="small" name="file" @change="fileSelected(11)" id="file11" class="true-file" style="display:none;">
|
|
|
<el-input readonly type="text" v-model="aeForm.YbRightBanner" placeholder="上传报告合集配图" size="medium" style="width:400px;">
|
|
|
<el-button slot="append" type="primary" size="mini" @click.native="clickinput(11)">选择图片</el-button>
|
|
@@ -165,18 +178,21 @@
|
|
|
</el-input>
|
|
|
</el-form-item> -->
|
|
|
<!-- 一级分类 展示分享链接配图 -->
|
|
|
- <el-form-item label="分享链接配图" prop="YbShareBgImg" v-if="aeForm.parent_id==0">
|
|
|
+ <el-form-item label="分享链接配图" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_shareImgs"
|
|
|
+ prop="YbShareBgImg" v-if="aeForm.parent_id==0">
|
|
|
<input type="file" size="small" name="file" @change="fileSelected(10)" id="file10" class="true-file" style="display:none;">
|
|
|
<el-input readonly type="text" v-model="aeForm.YbShareBgImg" placeholder="上传分享链接配图" size="medium" style="width:400px;">
|
|
|
<el-button slot="append" type="primary" size="mini" @click.native="clickinput(10)">选择图片</el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="PC端背景颜色" prop="YbFiccPcIcon" v-if="aeForm.parent_id==0">
|
|
|
+ <el-form-item label="PC端背景颜色" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_pcBackColor"
|
|
|
+ prop="YbFiccPcIcon" v-if="aeForm.parent_id==0">
|
|
|
<el-select v-model="aeForm.YbFiccPcIcon" placeholder="选择背景颜色" style="width:400px;">
|
|
|
<el-option :label="item.label" :value="item.val" v-for="item in YbFiccPcIconList" :key="item.label"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="小程序端隐藏" prop="IsShow" v-if="aeForm.parent_id==0">
|
|
|
+ <el-form-item label="小程序端隐藏" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_miniHidden"
|
|
|
+ prop="IsShow" v-if="aeForm.parent_id==0">
|
|
|
<el-switch v-model="aeForm.IsShow" inactive-color="#ededed"></el-switch>
|
|
|
<!-- <span>{{aeForm.IsShow?'开':'关'}}</span> -->
|
|
|
</el-form-item>
|
|
@@ -186,7 +202,8 @@
|
|
|
<el-option label="有" :value="1"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="关联设置" prop="relate" v-if="!['晨报','周报'].includes(aeForm.classify_name)">
|
|
|
+ <el-form-item label="关联设置" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_relateSetting"
|
|
|
+ prop="relate" v-if="!['晨报','周报'].includes(aeForm.classify_name)">
|
|
|
<el-select v-model="aeForm.relate" multiple placeholder="请选择" style="width:400px;">
|
|
|
<el-option label="报告电话会" :value="1"></el-option>
|
|
|
<el-option label="视频关联报告" :value="2"></el-option>
|
|
@@ -315,6 +332,13 @@ export default{
|
|
|
}
|
|
|
return arr
|
|
|
},
|
|
|
+ //通过计算属性判断是否展示
|
|
|
+ //当没有中文分类页面权限时,啥都不展示
|
|
|
+ isTableShow(){
|
|
|
+ return this.permissionBtn.checkPermissionBtn(
|
|
|
+ this.permissionBtn.classifyBtn.classifyList_cnClassify
|
|
|
+ )
|
|
|
+ },
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
@@ -514,6 +538,7 @@ export default{
|
|
|
// this.getlist();
|
|
|
// }
|
|
|
// }
|
|
|
+ this.setPermissRules()
|
|
|
},
|
|
|
methods:{
|
|
|
showInput(index){
|
|
@@ -871,7 +896,22 @@ export default{
|
|
|
if(!parent) return
|
|
|
YbShareBgImg = parent.YbShareBgImg||''
|
|
|
return YbShareBgImg
|
|
|
- }
|
|
|
+ },
|
|
|
+ //由于表单一些项可配置,表单验证规则也需要过滤掉不展示的项
|
|
|
+ setPermissRules(){
|
|
|
+ const {classifyBtn,checkPermissionBtn} = this.permissionBtn
|
|
|
+ const permissMap={
|
|
|
+ 'YbFiccIcon':checkPermissionBtn(classifyBtn.classifyList_cnClassify_ficcIcon),
|
|
|
+ 'YbRightBanner':checkPermissionBtn(classifyBtn.classifyList_cnClassify_reportImgs),
|
|
|
+ 'YbShareBgImg':checkPermissionBtn(classifyBtn.classifyList_cnClassify_shareImgs),
|
|
|
+ 'YbFiccPcIcon':checkPermissionBtn(classifyBtn.classifyList_cnClassify_pcBackColor)
|
|
|
+ }
|
|
|
+ for(let k in permissMap){
|
|
|
+ if(!permissMap[k]&&this.aerules[k]){
|
|
|
+ delete this.aerules[k]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|