Authored by 王涛

文档管理增加参数:是否展示标题,是否有切换展示类型,默认展示视图

... ... @@ -3,7 +3,7 @@
<el-col :span="layout.left">
<div style="border-radius: 3px;background-color: white"
:style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}">
<div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<div v-if="showTitle" style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<slot name="title">
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
</slot>
... ... @@ -72,7 +72,7 @@
{{selectText}}
</el-button>
</div>
<div style="text-align: right;width: 150px">
<div v-if="isCut" style="text-align: right;width: 150px">
<el-button-group>
<el-button :size="$global.elementSize" :type="activeBtn == 'view' ? 'primary' : ''"
@click="activeModel('view')">
... ...
... ... @@ -57,7 +57,22 @@ export default {
isEditName:{
type:Boolean,
default:false
}
},
// 是否展示标题,默认不展示
showTitle:{
type:Boolean,
default:false
},
// 是否有切换展示类型,默认展示
isCut:{
type:Boolean,
default:true
},
// 默认展示视图,默认视图
defaultView:{
type:String,
default:'view'
},
},
data() {
return {
... ... @@ -179,7 +194,7 @@ export default {
let columns = Vue.ref([{
prop: 'fileName',
label: '文档名称',
label: '名称',
sortable: true,
align: 'left',
click: function (row) {
... ... @@ -192,7 +207,7 @@ export default {
},
{
prop: 'fname',
label: '文档分类',
label: '类型',
sortable: true,
width: '120px'
},
... ... @@ -207,22 +222,22 @@ export default {
sortable: true,
width: '180px'
}
/*,{
prop: 'handle',
label: '操作',
sortable: false,
width: '180px',
render: function (row) {
return `<i class="el-icon-plus " @click='handleView(row)'></i><i class="iconfont el-icon-download " @click='handleDownload(row)'></i><i class="iconfont el-icon-delete" @click='handleDelete(row)'></i>`
}
}*/
// ,{
// prop: 'handle',
// label: '操作',
// sortable: false,
// width: '180px',
// render: function (row) {
// return `<i class="el-icon-plus " @click='handleView(row)'></i><i class="iconfont el-icon-download " @click='handleDownload(row)'></i><i class="iconfont el-icon-delete" @click='handleDelete(row)'></i>`
// }
// }
]);
// 表格数据
let dataList = Vue.ref([]);
// 总数
let total = Vue.ref(0);
// 当前展示视图
let activeBtn = Vue.ref('view');
let activeBtn = Vue.ref(props.defaultView);
// // 当前展示视图
// let viewEdit = Vue.ref(false);
//是否全选
... ...