1020
This commit is contained in:
parent
76d1142741
commit
8db20b3f0f
|
@ -19,7 +19,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.$store.dispatch("user/getCount", {})
|
// this.$store.dispatch("user/getCount", {})
|
||||||
this.timer = window.setInterval(() => {
|
this.timer = window.setInterval(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$store.dispatch("user/getCount", {})
|
this.$store.dispatch("user/getCount", {})
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<template>
|
<template>
|
||||||
<el-badge v-if="count>0" :value="count" class="item right-menu-item navbarBadge" @click.native="gotoTicketPage">
|
<el-badge v-if="count.total_count>0" :value="count.total_count" class="item right-menu-item navbarBadge" @click.native="gotoTicketPage">
|
||||||
<el-icon class="el-icon-s-management" @click.native="gotoTicketPage" style="font-size: 25px;color: #409EFF;padding-top: 12px;cursor: pointer;"></el-icon>
|
<el-icon class="el-icon-s-management" style="font-size: 25px;color: #409EFF;padding-top: 12px;cursor: pointer;"></el-icon>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
<search id="header-search" class="right-menu-item" />
|
<search id="header-search" class="right-menu-item" />
|
||||||
<el-tooltip content="全局组件大小" effect="dark" placement="bottom">
|
<el-tooltip content="全局组件大小" effect="dark" placement="bottom">
|
||||||
|
@ -77,8 +77,12 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gotoTicketPage(){
|
gotoTicketPage(){
|
||||||
debugger;
|
let path = this.$route.path;
|
||||||
this.$router.push({name:'ticket',params:{}})
|
if(path==='/workflow/ticket'){
|
||||||
|
this.$message.success("已在当前页面");
|
||||||
|
}else{
|
||||||
|
this.$router.push({name:'ticket',params:{}})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
|
|
|
@ -9,10 +9,13 @@
|
||||||
</div>
|
</div>
|
||||||
<app-main />
|
<app-main />
|
||||||
|
|
||||||
<div class="floatDiv" @click="gotoTicketPage" v-if="count>0">
|
<div class="floatDiv" @click="gotoTicketPage" v-if="count.total_count>0">
|
||||||
<el-badge :value="count" class="item ">
|
<el-badge :value="count.total_count" class="item ">
|
||||||
<el-icon class="el-icon-s-management" style="font-size: 30px;color: #409EFF;padding-top: 12px;"></el-icon>
|
<el-icon class="el-icon-s-management" style="font-size: 30px;color: #409EFF;padding-top: 12px;"></el-icon>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
|
<div class="typeWrap">
|
||||||
|
<div class="detailItem" v-for="item in count.details" :key="item.workflow">{{item.workflow__name}}:{{item.count}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,8 +61,14 @@ export default {
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||||
},
|
},
|
||||||
|
|
||||||
gotoTicketPage(){
|
gotoTicketPage(){
|
||||||
this.$router.push({name:'ticket',params:{}})
|
let path = this.$route.path;
|
||||||
|
if(path==='/workflow/ticket'){
|
||||||
|
this.$message.success("已在当前页面");
|
||||||
|
}else{
|
||||||
|
this.$router.push({name:'ticket',params:{}})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,4 +127,22 @@ export default {
|
||||||
border-radius: 26px;
|
border-radius: 26px;
|
||||||
border: 2px solid #409EFF;
|
border: 2px solid #409EFF;
|
||||||
}
|
}
|
||||||
|
.typeWrap{
|
||||||
|
display: none;
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 10px;
|
||||||
|
box-shadow: 0 0 7px 2px #d3dce6;
|
||||||
|
position: absolute;
|
||||||
|
right: 60px;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
.floatDiv:hover>.typeWrap{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.detailItem{
|
||||||
|
height: 30px;
|
||||||
|
color: #888888;
|
||||||
|
line-height: 30px;
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -8,7 +8,7 @@ const getDefaultState = () => {
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
name: '',
|
name: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
count: '',
|
count: {},
|
||||||
perms: []
|
perms: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ const actions = {
|
||||||
getCount({ commit }) {
|
getCount({ commit }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getCount({}).then((res) => {
|
getCount({}).then((res) => {
|
||||||
commit('SET_COUNT', res.data.total_count);
|
commit('SET_COUNT', res.data);
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-container">
|
<div class="dashboard-container">
|
||||||
<el-badge v-if="count>0" :value="count" class="item" @click.native="gotoTicketPage">
|
<el-badge v-if="count.total_count>0" :value="count.total_count" class="item" @click.native="gotoTicketPage">
|
||||||
<el-icon class="el-icon-s-management" @click.native="gotoTicketPage" style="font-size: 70px;color: #d29898"></el-icon>
|
<el-icon class="el-icon-s-management" style="font-size: 70px;color: #d29898"></el-icon>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
<div></div>
|
<div></div>
|
||||||
<div class="dashboard-text">name: {{ name }}</div>
|
<div class="dashboard-text">name: {{ name }}</div>
|
||||||
|
@ -23,8 +23,12 @@ export default {
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
gotoTicketPage(){
|
gotoTicketPage(){
|
||||||
debugger;
|
let path = this.$route.path;
|
||||||
this.$router.push({name:'ticket',params:{}})
|
if(path==='/workflow/ticket'){
|
||||||
|
this.$message.success("已在当前页面");
|
||||||
|
}else{
|
||||||
|
this.$router.push({name:'ticket',params:{}})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,12 +29,15 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-tabs v-model="pageForm.category" type="border-card" @tab-click="handleClick">
|
<el-tabs v-model="pageForm.category" type="border-card" @tab-click="handleClick">
|
||||||
<el-tab-pane label="待处理" name="duty">
|
<el-tab-pane label="待处理" name="duty">
|
||||||
<el-table :data="tickets"
|
<el-table
|
||||||
border fit stripe
|
v-loading="listLoading"
|
||||||
style="width: 100%"
|
:data="tickets"
|
||||||
height="100"
|
border fit stripe
|
||||||
highlight-current-row
|
style="width: 100%"
|
||||||
v-el-height-adaptive-table="{bottomOffset: 60}">
|
height="100"
|
||||||
|
highlight-current-row
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 100}"
|
||||||
|
>
|
||||||
<el-table-column label="工单标题" min-width="100" prop="title">
|
<el-table-column label="工单标题" min-width="100" prop="title">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="当前状态" min-width="100">
|
<el-table-column label="当前状态" min-width="100">
|
||||||
|
@ -615,6 +618,7 @@
|
||||||
ticketRetreat(this.retreatId,this.handleForm).then(res=>{
|
ticketRetreat(this.retreatId,this.handleForm).then(res=>{
|
||||||
this.limitedRetreat = false;
|
this.limitedRetreat = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.$store.dispatch("user/getCount", {})
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -631,6 +635,7 @@
|
||||||
ticketClose(this.retreatId,this.handleForm).then(res=>{
|
ticketClose(this.retreatId,this.handleForm).then(res=>{
|
||||||
this.limitedRetreat = false;
|
this.limitedRetreat = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.$store.dispatch("user/getCount", {})
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -517,6 +517,7 @@
|
||||||
console.log(this.ticketForm);
|
console.log(this.ticketForm);
|
||||||
ticketHandle(this.ticketId,obj).then(res=>{
|
ticketHandle(this.ticketId,obj).then(res=>{
|
||||||
if (res.data){
|
if (res.data){
|
||||||
|
this.$store.dispatch("user/getCount", {})
|
||||||
this.$router.replace({name:"ticket"})
|
this.$router.replace({name:"ticket"})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -544,6 +545,7 @@
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
url(this.ticketId,this.handleForm).then(res=>{
|
url(this.ticketId,this.handleForm).then(res=>{
|
||||||
this.limitedHandle = false;
|
this.limitedHandle = false;
|
||||||
|
this.$store.dispatch("user/getCount", {})
|
||||||
this.$router.replace({name:"ticket"})
|
this.$router.replace({name:"ticket"})
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
|
@ -579,6 +581,7 @@
|
||||||
this.limitedAdd = false;
|
this.limitedAdd = false;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.limitedAdd = true;
|
this.limitedAdd = true;
|
||||||
|
this.$store.dispatch("user/getCount", {})
|
||||||
this.$router.replace({name:"ticket"})
|
this.$router.replace({name:"ticket"})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue