update
This commit is contained in:
parent
2874b1c139
commit
de770f0b33
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ThemePicker from "@/components/ThemePicker";
|
import ThemePicker from "@/components/ThemePicker";
|
||||||
|
import store from '@/store'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
@ -18,6 +20,12 @@ export default {
|
|||||||
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
store.dispatch('GetUserMsgCount').then(() => { })
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -184,5 +184,12 @@ export function getRecordbyPorcInstId(procInstId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getUserMsgCount() {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/msg/count/',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,30 @@
|
|||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="消息通知"
|
||||||
|
:visible.sync="msgVisible"
|
||||||
|
width="40%">
|
||||||
|
<el-table
|
||||||
|
:data="msgTableData"
|
||||||
|
border
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="消息通知类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="count"
|
||||||
|
label="消息通知数量">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text"@click="handleToMsgView(scope.row)">前往查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -46,6 +70,7 @@ import TopNav from '@/components/TopNav'
|
|||||||
import Hamburger from '@/components/Hamburger'
|
import Hamburger from '@/components/Hamburger'
|
||||||
import Screenfull from '@/components/Screenfull'
|
import Screenfull from '@/components/Screenfull'
|
||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
|
import { getUserMsgCount } from '@/api/my_business/workflow'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -82,6 +107,12 @@ export default {
|
|||||||
return this.$store.state.user.unreadMsgNumber ? this.$store.state.user.unreadMsgNumber : 0
|
return this.$store.state.user.unreadMsgNumber ? this.$store.state.user.unreadMsgNumber : 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msgVisible: false,
|
||||||
|
msgTableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
@ -99,8 +130,30 @@ export default {
|
|||||||
},
|
},
|
||||||
// 跳转到消息中心
|
// 跳转到消息中心
|
||||||
toMyCartPage() {
|
toMyCartPage() {
|
||||||
this.$router.push({ path: '/message', query: {'states':'1'} })
|
getUserMsgCount().then(res => {
|
||||||
|
this.msgTableData = [];
|
||||||
|
let msgItem = {};
|
||||||
|
msgItem['type'] = 'msg';
|
||||||
|
msgItem['name'] = '消息中心数量';
|
||||||
|
msgItem['count'] = res.msgCount;
|
||||||
|
let taskItem = {};
|
||||||
|
taskItem['type'] = 'task';
|
||||||
|
taskItem['name'] = '代办消息数量';
|
||||||
|
taskItem['count'] = res.taskCount;
|
||||||
|
this.msgTableData.push(msgItem);
|
||||||
|
this.msgTableData.push(taskItem);
|
||||||
|
}).catch(error => {
|
||||||
|
})
|
||||||
|
this.msgVisible = true;
|
||||||
},
|
},
|
||||||
|
handleToMsgView(row){
|
||||||
|
this.msgVisible = false;
|
||||||
|
if(row.type === 'msg'){
|
||||||
|
this.$router.push({ path: '/message', query: {'states':'1'} })
|
||||||
|
} else {
|
||||||
|
this.$router.push({ path: '/workstuff/dispose'})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { login, logout, getInfo } from '@/api/login'
|
import { login, logout, getInfo } from '@/api/login'
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||||
|
import { getUserMsgCount } from '@/api/my_business/workflow'
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
@ -102,6 +103,16 @@ const user = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
GetUserMsgCount({ commit, state }) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getUserMsgCount().then(res => {
|
||||||
|
commit('SET_UNREAD_MSG_NUMBER', res.totalMsgCount)
|
||||||
|
resolve()
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 前端 登出
|
// 前端 登出
|
||||||
FedLogOut({ commit }) {
|
FedLogOut({ commit }) {
|
||||||
|
@ -134,6 +134,7 @@ import { deptTreeSelect } from "@/api/system/user";
|
|||||||
import docDetail from "@/views/document/detail";
|
import docDetail from "@/views/document/detail";
|
||||||
import toolDetail from "@/views/tool/toolDetail";
|
import toolDetail from "@/views/tool/toolDetail";
|
||||||
import { getUserMsgCount } from "@/api/message/message"
|
import { getUserMsgCount } from "@/api/message/message"
|
||||||
|
import store from '@/store'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Document",
|
name: "Document",
|
||||||
@ -255,9 +256,7 @@ export default {
|
|||||||
self.$set(formData, "states", 2)
|
self.$set(formData, "states", 2)
|
||||||
updateMessage(formData).then(response => {
|
updateMessage(formData).then(response => {
|
||||||
self.$modal.msgSuccess(response?.msg || '操作成功')
|
self.$modal.msgSuccess(response?.msg || '操作成功')
|
||||||
getUserMsgCount(self.$store.getters.userId).then(res => {
|
store.dispatch('GetUserMsgCount').then(() => { })
|
||||||
self.$store.commit("SET_UNREAD_MSG_NUMBER", res.data);
|
|
||||||
});
|
|
||||||
self.getList();
|
self.getList();
|
||||||
})
|
})
|
||||||
}).catch((err) => {console.error(err)});
|
}).catch((err) => {console.error(err)});
|
||||||
@ -279,11 +278,7 @@ export default {
|
|||||||
}
|
}
|
||||||
allMarkedRead(formData).then(response => {
|
allMarkedRead(formData).then(response => {
|
||||||
self.$modal.msgSuccess(response?.msg || '操作成功')
|
self.$modal.msgSuccess(response?.msg || '操作成功')
|
||||||
|
store.dispatch('GetUserMsgCount').then(() => { })
|
||||||
getUserMsgCount(self .$store.getters.userId).then(res => {
|
|
||||||
self.$store.commit("SET_UNREAD_MSG_NUMBER", res.data);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.getList();
|
self.getList();
|
||||||
})
|
})
|
||||||
}).catch((err) => {console.error(err)});
|
}).catch((err) => {console.error(err)});
|
||||||
|
@ -338,6 +338,7 @@ import ToolSelector from '@/components/tool-selector/index.vue'
|
|||||||
import uploadVue from '@/components/FileUpload/optimizeToolUpload.vue'
|
import uploadVue from '@/components/FileUpload/optimizeToolUpload.vue'
|
||||||
import { addCount } from "@/api/tool/downloadCount";
|
import { addCount } from "@/api/tool/downloadCount";
|
||||||
import previewUtil from '@/components/PreviewUtil/previewUtil.vue'
|
import previewUtil from '@/components/PreviewUtil/previewUtil.vue'
|
||||||
|
import store from '@/store'
|
||||||
|
|
||||||
// PDF本地文件预览
|
// PDF本地文件预览
|
||||||
export default {
|
export default {
|
||||||
@ -834,10 +835,6 @@ export default {
|
|||||||
this.$set(formData,'attachmentList',_this.attachmentList)
|
this.$set(formData,'attachmentList',_this.attachmentList)
|
||||||
addTool(formData).then((res) => {
|
addTool(formData).then((res) => {
|
||||||
if (res.code===200) {
|
if (res.code===200) {
|
||||||
/* if(formData.recordStatus == 'done'){
|
|
||||||
console.info("2222222222222222", _this.$store.state.user.unreadMsgNumber+1)
|
|
||||||
store.commit('SET_UNREAD_MSG_NUMBER', _this.$store.state.user.unreadMsgNumber+1);
|
|
||||||
} */
|
|
||||||
_this.$message({
|
_this.$message({
|
||||||
message: '流程提交成功',//提示的信息
|
message: '流程提交成功',//提示的信息
|
||||||
type:'success', //类型是成功
|
type:'success', //类型是成功
|
||||||
@ -849,6 +846,8 @@ export default {
|
|||||||
_this.close();
|
_this.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
store.dispatch('GetUserMsgCount').then(() => { })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -621,9 +621,6 @@ export default {
|
|||||||
formData.editStatus = _this.editStatus
|
formData.editStatus = _this.editStatus
|
||||||
addApply(formData).then((res) => {
|
addApply(formData).then((res) => {
|
||||||
if (res.code===200) {
|
if (res.code===200) {
|
||||||
if(formData.recordStatus == 'done'){
|
|
||||||
store.commit('SET_UNREAD_MSG_NUMBER', _this.$store.state.user.unreadMsgNumber+1);
|
|
||||||
}
|
|
||||||
_this.$message({
|
_this.$message({
|
||||||
message: '流程提交成功',//提示的信息
|
message: '流程提交成功',//提示的信息
|
||||||
type:'success', //类型是成功
|
type:'success', //类型是成功
|
||||||
@ -635,6 +632,8 @@ export default {
|
|||||||
_this.close();
|
_this.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
store.dispatch('GetUserMsgCount').then(() => { })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user