|
|
|
@ -115,28 +115,53 @@
|
|
|
|
|
<!--全部应用--> |
|
|
|
|
<div style="width: 100%; height:70%; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}"> |
|
|
|
|
<a-row :gutter="24"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-card class="bottom-card" title="常用应用" style="width: 100%; height:478px; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}" > |
|
|
|
|
<a slot="extra" @click="keyApp" v-has="'dashboard:addKey'" >添加常用应用</a> |
|
|
|
|
<div style="max-height: 420px;overflow-y: auto;"> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-card class="bottom-card" title="快捷" style="width: 100%; height:478px; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}" > |
|
|
|
|
<!-- <a slot="extra" @click="keyApp" v-has="'dashboard:addKey'" >添加常用应用</a>--> |
|
|
|
|
<!-- <div style="max-height: 420px;overflow-y: auto;">--> |
|
|
|
|
<!-- <span class="ant-col-md-4" v-for="(item,index) in keyChildren" @click="goRouteView(item.path)" :title="item.meta.title"--> |
|
|
|
|
<!-- style="display: inline-block; margin: 20px;">--> |
|
|
|
|
<!-- <a-icon :type="item.meta.icon" :style="{'color':item.color}" style="font-size: 25px"></a-icon> {{ item.meta.title }}--> |
|
|
|
|
<!-- </span>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- </a-card>--> |
|
|
|
|
<!-- <a-card class="bottom-card" title="全部应用" style="width: 100%; height:478px; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}" >--> |
|
|
|
|
<!-- <div style="max-height: 420px;overflow-y: auto;">--> |
|
|
|
|
<!-- <span class="ant-col-md-4" v-for="(item,index) in userChildren" @click="goRouteView(item.path)" :title="item.meta.title"--> |
|
|
|
|
<!-- style="display: inline-block; margin: 25px;">--> |
|
|
|
|
<!-- <a-icon :type="item.meta.icon" :style="{'color':item.color}" style="font-size: 25px"></a-icon> {{ item.meta.title }}--> |
|
|
|
|
<!-- </span>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- </a-card>--> |
|
|
|
|
|
|
|
|
|
<a-tabs> |
|
|
|
|
<a-tab-pane tab="常用应用" key="1" forceRender > |
|
|
|
|
|
|
|
|
|
<div style="max-height: 420px;overflow-y: auto; width: 100%" > |
|
|
|
|
<!-- <div> <a slot="extra" @click="keyApp">添加常用应用</a></div>--> |
|
|
|
|
<span class="ant-col-md-4" v-for="(item,index) in keyChildren" @click="goRouteView(item.path)" :title="item.meta.title" |
|
|
|
|
style="display: inline-block; margin: 20px;"> |
|
|
|
|
<a-icon :type="item.meta.icon" :style="{'color':item.color}" style="font-size: 25px"></a-icon> {{ item.meta.title }} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</a-card> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-card class="bottom-card" title="全部应用" style="width: 100%; height:478px; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}" > |
|
|
|
|
<div style="max-height: 420px;overflow-y: auto;"> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</a-tab-pane> |
|
|
|
|
<a-tab-pane tab="全部应用" key="2" forceRender> |
|
|
|
|
<div style="max-height: 420px;overflow-y: auto; width: 100%"> |
|
|
|
|
<span class="ant-col-md-4" v-for="(item,index) in userChildren" @click="goRouteView(item.path)" :title="item.meta.title" |
|
|
|
|
style="display: inline-block; margin: 25px;"> |
|
|
|
|
<a-icon :type="item.meta.icon" :style="{'color':item.color}" style="font-size: 25px"></a-icon> {{ item.meta.title }} |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</a-tab-pane> |
|
|
|
|
</a-tabs> |
|
|
|
|
</a-card> |
|
|
|
|
</a-col> |
|
|
|
|
<!-- <a-col :span="12">--> |
|
|
|
|
<!-- --> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
</a-row> |
|
|
|
|
|
|
|
|
|
<a-modal v-model="keyApplic" width="50%" title="添加常用应用" @ok="handleOk" :destroyOnClose= true @cancel = "handleCole" :maskClosable=true > |
|
|
|
|
<KeyApplications :userChildren = this.userChildren :keyChildren = this.keyChildren @expandedRow = expandedRowKeys></KeyApplications> |
|
|
|
|
<!-- <template slot="footer">--> |
|
|
|
@ -259,6 +284,7 @@ export default {
|
|
|
|
|
//用户子菜单 |
|
|
|
|
userChildren:[], |
|
|
|
|
keyChildren:[], |
|
|
|
|
cachelist:[], |
|
|
|
|
KeyApplicationsChildren:[], |
|
|
|
|
selectRowKeys:[], |
|
|
|
|
routerGo:"", |
|
|
|
@ -464,10 +490,15 @@ export default {
|
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
childrenMean.forEach(it =>{ |
|
|
|
|
if(item.permissionId == it.id){ |
|
|
|
|
if(JSON.parse(localStorage.getItem(it.name))){ |
|
|
|
|
it.sum = JSON.parse(localStorage.getItem(it.name)).sum |
|
|
|
|
this.keyChildren.push(it); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.deWeight(this.keyChildren) |
|
|
|
|
this.keyChildren.sort((a, b) => { |
|
|
|
|
return b.sum - a.sum |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -479,6 +510,21 @@ export default {
|
|
|
|
|
// console.log("this.userChildren") |
|
|
|
|
// console.log(this.userChildren) |
|
|
|
|
}, |
|
|
|
|
//去重 |
|
|
|
|
deWeight(arr) { |
|
|
|
|
for (var i = 0; i < arr.length - 1; i++) { |
|
|
|
|
for (var j = i + 1; j < arr.length; j++) { |
|
|
|
|
if (arr[i].id == arr[j].id) { // id为需要去重字段 |
|
|
|
|
arr.splice(j, 1); |
|
|
|
|
//因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j-- |
|
|
|
|
j--; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return arr; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//待办任务的行点击事件(前往待办) |
|
|
|
|
rowClick: function(record, index) { |
|
|
|
|
return { |
|
|
|
|