diff --git a/hb_client/src/App.vue b/hb_client/src/App.vue
index a1084ae..e50cc4e 100644
--- a/hb_client/src/App.vue
+++ b/hb_client/src/App.vue
@@ -19,7 +19,7 @@ export default {
}
},
mounted(){
- this.$store.dispatch("user/getCount", {})
+ // this.$store.dispatch("user/getCount", {})
this.timer = window.setInterval(() => {
setTimeout(() => {
this.$store.dispatch("user/getCount", {})
diff --git a/hb_client/src/layout/components/Navbar.vue b/hb_client/src/layout/components/Navbar.vue
index 55113ad..1ba9bc9 100644
--- a/hb_client/src/layout/components/Navbar.vue
+++ b/hb_client/src/layout/components/Navbar.vue
@@ -6,8 +6,8 @@
-
-
+
+
+
+
{{item.workflow__name}}:{{item.count}}
+
@@ -58,8 +61,14 @@ export default {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
},
+
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: 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;
+ }
diff --git a/hb_client/src/store/modules/user.js b/hb_client/src/store/modules/user.js
index 1ebc241..c8c3190 100644
--- a/hb_client/src/store/modules/user.js
+++ b/hb_client/src/store/modules/user.js
@@ -8,7 +8,7 @@ const getDefaultState = () => {
token: getToken(),
name: '',
avatar: '',
- count: '',
+ count: {},
perms: []
}
}
@@ -110,7 +110,7 @@ const actions = {
getCount({ commit }) {
return new Promise((resolve, reject) => {
getCount({}).then((res) => {
- commit('SET_COUNT', res.data.total_count);
+ commit('SET_COUNT', res.data);
resolve()
}).catch(error => {
reject(error)
diff --git a/hb_client/src/views/dashboard/index.vue b/hb_client/src/views/dashboard/index.vue
index 5690923..5dc8de5 100644
--- a/hb_client/src/views/dashboard/index.vue
+++ b/hb_client/src/views/dashboard/index.vue
@@ -1,7 +1,7 @@
-
-
+
+
name: {{ name }}
@@ -23,8 +23,12 @@ export default {
},
methods:{
gotoTicketPage(){
- debugger;
- 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:{}})
+ }
},
}
}
diff --git a/hb_client/src/views/workflow/ticket.vue b/hb_client/src/views/workflow/ticket.vue
index c482c7f..1696843 100644
--- a/hb_client/src/views/workflow/ticket.vue
+++ b/hb_client/src/views/workflow/ticket.vue
@@ -29,12 +29,15 @@
-
+
@@ -615,6 +618,7 @@
ticketRetreat(this.retreatId,this.handleForm).then(res=>{
this.limitedRetreat = false;
this.getList();
+ this.$store.dispatch("user/getCount", {})
this.$message.success("成功");
})
})
@@ -631,6 +635,7 @@
ticketClose(this.retreatId,this.handleForm).then(res=>{
this.limitedRetreat = false;
this.getList();
+ this.$store.dispatch("user/getCount", {})
this.$message.success("成功");
})
})
diff --git a/hb_client/src/views/workflow/ticketHandle.vue b/hb_client/src/views/workflow/ticketHandle.vue
index 4d16f96..aa9a9ea 100644
--- a/hb_client/src/views/workflow/ticketHandle.vue
+++ b/hb_client/src/views/workflow/ticketHandle.vue
@@ -517,6 +517,7 @@
console.log(this.ticketForm);
ticketHandle(this.ticketId,obj).then(res=>{
if (res.data){
+ this.$store.dispatch("user/getCount", {})
this.$router.replace({name:"ticket"})
}
})
@@ -544,6 +545,7 @@
.then(async () => {
url(this.ticketId,this.handleForm).then(res=>{
this.limitedHandle = false;
+ this.$store.dispatch("user/getCount", {})
this.$router.replace({name:"ticket"})
this.$message.success("成功");
})
@@ -579,6 +581,7 @@
this.limitedAdd = false;
this.$nextTick(function () {
this.limitedAdd = true;
+ this.$store.dispatch("user/getCount", {})
this.$router.replace({name:"ticket"})
})