|
|
|
@ -65,10 +65,10 @@
|
|
|
|
|
<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:60%; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}" > |
|
|
|
|
<a slot="extra" @click="keyApp" v-has="">添加常用应用</a> |
|
|
|
|
<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 userChildren" @click="goRouteView(item.path)" :title="item.meta.title" |
|
|
|
|
<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> |
|
|
|
@ -86,8 +86,15 @@
|
|
|
|
|
</a-card> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-modal v-model="keyApplic" width="50%" title="添加常用应用" @ok="handleOk"> |
|
|
|
|
<KeyApplications :userChildren = this.userChildren></KeyApplications> |
|
|
|
|
<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">--> |
|
|
|
|
<!--<!– // closable 是否显示右上角的关闭按钮–>--> |
|
|
|
|
<!--<!– // slot="footer" 不需要默认确定取消按钮,重写确定和取消–>--> |
|
|
|
|
<!-- <a-button type="primary " @click="handleOk">确定</a-button>--> |
|
|
|
|
<!-- <a-button @click="handleCole">关闭</a-button>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
</a-modal> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
@ -104,7 +111,7 @@
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { getAction, putAction } from '@api/manage' |
|
|
|
|
import { getAction, putAction,postAction } from '@api/manage' |
|
|
|
|
import { JVXETypes } from '@/components/jeecg/JVxeTable/index' |
|
|
|
|
import { colorList } from '@/components/tools/setting' |
|
|
|
|
import ShowAnnouncement from '@comp/tools/ShowAnnouncement' |
|
|
|
@ -132,8 +139,9 @@ export default {
|
|
|
|
|
url: { |
|
|
|
|
listCementByUser:"/sys/annountCement/listByUser", |
|
|
|
|
todoManger: '/actTask/todoList', |
|
|
|
|
keyApplications: '/keyApplications/processKeyApplications/list', |
|
|
|
|
addKeyApplications: '/keyApplications/processKeyApplications/add', |
|
|
|
|
lists: '/sys/log/listHomePage', |
|
|
|
|
list: '', |
|
|
|
|
listMseeage: '/sys/sysAnnouncementSend/getMyAnnouncementSend', |
|
|
|
|
editCementSend:"/sys/sysAnnouncementSend/editByAnntIdAndUserId", |
|
|
|
|
}, |
|
|
|
@ -198,56 +206,109 @@ export default {
|
|
|
|
|
userMean:[], |
|
|
|
|
//用户子菜单 |
|
|
|
|
userChildren:[], |
|
|
|
|
keyChildren:[], |
|
|
|
|
KeyApplicationsChildren:[], |
|
|
|
|
selectRowKeys:[], |
|
|
|
|
routerGo:"", |
|
|
|
|
colors:[], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
getAction(this.url.keyApplications).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
// console.log("res===========",res.result); |
|
|
|
|
this.KeyApplicationsChildren = res.result; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.todoList(); |
|
|
|
|
this.loginList(); |
|
|
|
|
this.systemMessage(); |
|
|
|
|
this.getChildrenMenu(); |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
this.getChildrenMenu(); |
|
|
|
|
},500); |
|
|
|
|
|
|
|
|
|
this.colorLists(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
expandedRowKeys(row){ |
|
|
|
|
// console.log("=====",row); |
|
|
|
|
this.selectRowKeys = row; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//常用应用 |
|
|
|
|
keyApp(){ |
|
|
|
|
// console.log("执行了"); |
|
|
|
|
this.keyApplic = true; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
handleCole(e) { |
|
|
|
|
// console.log(e,"=============="); |
|
|
|
|
// this.batchDe(); |
|
|
|
|
this.$confirm({ |
|
|
|
|
title: "关闭", |
|
|
|
|
content: `确定关闭当前页面?`, |
|
|
|
|
centered: true, |
|
|
|
|
onOk: () => { |
|
|
|
|
// console.log("222222222222222") |
|
|
|
|
this.keyApplic = false; |
|
|
|
|
}, |
|
|
|
|
onCancel: ()=>{ |
|
|
|
|
// console.log("11111111111111") |
|
|
|
|
this.keyApplic = true; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//确定 |
|
|
|
|
handleOk(e) { |
|
|
|
|
// console.log(e,"=============="); |
|
|
|
|
this.keyApplic = false; |
|
|
|
|
this.batchDe(); |
|
|
|
|
}, |
|
|
|
|
batchDe() { |
|
|
|
|
console.log() |
|
|
|
|
if (this.selectedRowKeys.length <= 0) { |
|
|
|
|
// console.log(this.selectRowKeys,"什么鬼 ==-=-"); |
|
|
|
|
if (this.selectRowKeys.length <= 0) { |
|
|
|
|
this.$message.warning('请选择一条记录!'); |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
var ids = ""; |
|
|
|
|
for (var a = 0; a < this.selectedRowKeys.length; a++) { |
|
|
|
|
ids += this.selectedRowKeys[a] + ","; |
|
|
|
|
} |
|
|
|
|
let ids = []; |
|
|
|
|
this.selectRowKeys.forEach(item => { |
|
|
|
|
let i = { |
|
|
|
|
permissionId : item.id, permissionName: item.title |
|
|
|
|
} |
|
|
|
|
ids.push(i); |
|
|
|
|
}) |
|
|
|
|
// for (var a = 0; a < this.selectRowKeys.length; a++) { |
|
|
|
|
// // ids += this.selectRowKeys[a] + ","; |
|
|
|
|
// { |
|
|
|
|
// permissionId : this.selectRowKeys[a], |
|
|
|
|
// |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
this.keyApplic = false; |
|
|
|
|
var that = this; |
|
|
|
|
this.$confirm({ |
|
|
|
|
title: "确认删除", |
|
|
|
|
content: "是否删除选中数据?", |
|
|
|
|
title: "确认提交", |
|
|
|
|
content: "是否提交选中数据?", |
|
|
|
|
onOk: function () { |
|
|
|
|
// that.loading = true; |
|
|
|
|
// deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
|
|
|
|
// if (res.success) { |
|
|
|
|
// that.$message.success(res.message); |
|
|
|
|
// that.loadData(); |
|
|
|
|
// that.onClearSelected(); |
|
|
|
|
// } else { |
|
|
|
|
// that.$message.warning(res.message); |
|
|
|
|
// } |
|
|
|
|
// }).finally(() => { |
|
|
|
|
// that.loading = false; |
|
|
|
|
// }); |
|
|
|
|
that.loading = true; |
|
|
|
|
postAction(that.url.addKeyApplications, ids).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
that.$message.success(res.message); |
|
|
|
|
that.selectRowKeys = []; |
|
|
|
|
getAction(that.url.keyApplications).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
that.KeyApplicationsChildren = []; |
|
|
|
|
that.KeyApplicationsChildren = res.result; |
|
|
|
|
that.getChildrenMenu(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// that.onClearSelected(); |
|
|
|
|
} else { |
|
|
|
|
that.$message.warning(res.message); |
|
|
|
|
} |
|
|
|
|
}).finally(() => { |
|
|
|
|
that.loading = false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -300,7 +361,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log("到底了") |
|
|
|
|
// console.log("到底了") |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
colorLists(){ |
|
|
|
@ -315,7 +376,7 @@ export default {
|
|
|
|
|
getChildrenMenu() { |
|
|
|
|
let userMean = JSON.parse(sessionStorage.getItem('ASIDE_MEAN')) |
|
|
|
|
// console.log("userMean") |
|
|
|
|
console.log(userMean,"==========") |
|
|
|
|
// console.log(userMean,"==========") |
|
|
|
|
let children = [] |
|
|
|
|
for (let i in userMean){ |
|
|
|
|
if ( userMean[i].hidden != true){ |
|
|
|
@ -330,6 +391,18 @@ export default {
|
|
|
|
|
childrenMean.push(childrenArray[j]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.keyChildren = []; |
|
|
|
|
if(this.KeyApplicationsChildren.length > 0){ |
|
|
|
|
// console.log("=====进来了") |
|
|
|
|
this.KeyApplicationsChildren.forEach( item =>{ |
|
|
|
|
childrenMean.forEach(it =>{ |
|
|
|
|
if(item.permissionId == it.id){ |
|
|
|
|
this.keyChildren.push(it); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.userChildren = childrenMean |
|
|
|
|
for (let i in this.userChildren){ |
|
|
|
|
let j =i%4 |
|
|
|
@ -377,15 +450,17 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//待办任务查询 |
|
|
|
|
todoList(){ |
|
|
|
|
async todoList(){ |
|
|
|
|
|
|
|
|
|
getAction(this.url.todoManger).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
console.log("res") |
|
|
|
|
// console.log("res") |
|
|
|
|
this.loading = false |
|
|
|
|
this.tasks = res.result |
|
|
|
|
console.log(res.result) |
|
|
|
|
// console.log(res.result) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 系统消息查询 |
|
|
|
@ -397,7 +472,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
getAction(this.url.listMseeage,param).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
console.log("resMessage") |
|
|
|
|
// console.log("resMessage") |
|
|
|
|
this.loading = false |
|
|
|
|
this.msgContent = res.result.records |
|
|
|
|
console.log(res.result.records) |
|
|
|
|