Browse Source

首页感谢信跳转逻辑; 大屏三率排行查看体验优化;

master
21819 2 years ago
parent
commit
2b574b6dde
  1. 18
      src/api/work/index.ts
  2. 10
      src/stores/modules/routerParams.ts
  3. 51
      src/views/datascreen/index.vue
  4. 8
      src/views/home/components/Daily.vue
  5. 44
      src/views/work/Query.vue

18
src/api/work/index.ts

@ -1,33 +1,37 @@
import request from '@/utils/request' import request from '@/utils/request'
// 我的待办 // 我的待办
export function getTodos(query) { export function getTodos(query: any) {
return request.get({ url: '/work/todo', query }) return request.get({ url: '/work/todo', query })
} }
// 我的已办 // 我的已办
export function getDones(query) { export function getDones(query: any) {
return request.get({ url: '/work/done', query }) return request.get({ url: '/work/done', query })
} }
// 信件查询 // 信件查询
export function getMails(query) { export function getMails(query: any) {
return request.get({ url: '/work/query', query }) return request.get({ url: '/work/query', query })
} }
export function getDissatisfied(query) { export function getDissatisfied(query: any) {
return request.get({ url: '/work/dissatisfied', query }) return request.get({ url: '/work/dissatisfied', query })
} }
// 获取信件详情 // 获取信件详情
export function getMailDetail(query) { export function getMailDetail(query: any) {
return request.get({ url: '/work/mail/detail', query }) return request.get({ url: '/work/mail/detail', query })
} }
export function getSendMsg(query){ export function getSendMsg(query: any) {
return request.get({ url: '/work/send', query }) return request.get({ url: '/work/send', query })
} }
export function mailChange(query){ export function mailChange(query: any) {
return request.get({ url: '/work/change', query }) return request.get({ url: '/work/change', query })
} }
export function exportLedger(query: any) {
return request.get({ url: '/work/exportLedger', query })
}

10
src/stores/modules/routerParams.ts

@ -6,18 +6,24 @@ export const useRouterParamsStore = defineStore('routerParams', {
flowKey: '', flowKey: '',
mailState: '', mailState: '',
signRoleId: '', signRoleId: '',
signDeptId: '' signDeptId: '',
mailCategory: ''
}, },
}), }),
actions: { actions: {
setParams(params: any) { setParams(params: any) {
this.params = params; this.params = params;
}, },
setMailCategory(mailCategory: string) {
this.params.mailCategory = mailCategory;
},
removeParams() { removeParams() {
this.params.flowKey = ''; this.params.flowKey = '';
this.params.mailState = ''; this.params.mailState = '';
this.params.signRoleId = ''; this.params.signRoleId = '';
this.params.signDeptId = '' this.params.signDeptId = '';
this.params.mailCategory = '';
} }
}, },
}); });

51
src/views/datascreen/index.vue

@ -61,8 +61,8 @@
</div> </div>
<div class="box-container"> <div class="box-container">
<el-tabs v-model="rateName" class="echart-tabs" type="card" @tab-click="categoryChange"> <el-tabs v-model="rateName" class="echart-tabs" type="card" @tab-click="categoryChange">
<div @mouseenter="clearRateTimer" @mouseleave="startRateAutoSwitch">
<el-tab-pane label="分县市局三率排名" name="county"> <el-tab-pane label="分县市局三率排名" name="county">
<div>
<el-tabs v-model="rateActiveName" class="echart-tabs" @tab-click="rateResetTimer" type="card"> <el-tabs v-model="rateActiveName" class="echart-tabs" @tab-click="rateResetTimer" type="card">
<el-tab-pane label="办结率" name="completionRate"> <el-tab-pane label="办结率" name="completionRate">
<div class="ratesbox rates"> <div class="ratesbox rates">
@ -113,9 +113,9 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="部委支队三率排名" name="branch"> <el-tab-pane label="部委支队三率排名" name="branch">
<div> <div>
<el-tabs v-model="rateActiveName" class="echart-tabs" @tab-click="rateResetTimer" type="card"> <el-tabs v-model="rateActiveName" class="echart-tabs" @tab-click="rateResetTimer" type="card">
@ -123,12 +123,14 @@
<div class="ratesbox rates"> <div class="ratesbox rates">
<ul class="h100 animated-list"> <ul class="h100 animated-list">
<li v-for="item in rateBranch.completeList" :key="item.id"> <li v-for="item in rateBranch.completeList" :key="item.id">
<span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span> <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name
}}</span>
<div class="ratenav" width="80%"> <div class="ratenav" width="80%">
<div class="ratebar"><span :style="{ width: item.rate }"></span></div> <div class="ratebar"><span :style="{ width: item.rate }"></span></div>
</div> </div>
<div class="ratesum"> <div class="ratesum">
<p>{{ item.rate }}<span class="ratespan"><i>{{ item.completed }} / </i>{{ item.sum }}</span> <p>{{ item.rate }}<span class="ratespan"><i>{{ item.completed }} / </i>{{ item.sum
}}</span>
</p> </p>
</div> </div>
</li> </li>
@ -139,12 +141,14 @@
<div class="ratesbox rates"> <div class="ratesbox rates">
<ul class="h100 animated-list"> <ul class="h100 animated-list">
<li v-for="item in rateBranch.resolvedList" :key="item.id"> <li v-for="item in rateBranch.resolvedList" :key="item.id">
<span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span> <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name
}}</span>
<div class="ratenav" width="80%"> <div class="ratenav" width="80%">
<div class="ratebar"><span :style="{ width: item.rate }"></span></div> <div class="ratebar"><span :style="{ width: item.rate }"></span></div>
</div> </div>
<div class="ratesum"> <div class="ratesum">
<p>{{ item.rate }}<span class="ratespan"><i>{{ item.resolved }} / </i>{{ item.sum }}</span> <p>{{ item.rate }}<span class="ratespan"><i>{{ item.resolved }} / </i>{{ item.sum
}}</span>
</p> </p>
</div> </div>
</li> </li>
@ -155,12 +159,14 @@
<div class="ratesbox rates"> <div class="ratesbox rates">
<ul class="h100 animated-list"> <ul class="h100 animated-list">
<li v-for="item in rateBranch.satisfiedList" :key="item.id"> <li v-for="item in rateBranch.satisfiedList" :key="item.id">
<span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name }}</span> <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.name
}}</span>
<div class="ratenav" width="80%"> <div class="ratenav" width="80%">
<div class="ratebar"><span :style="{ width: item.rate }"></span></div> <div class="ratebar"><span :style="{ width: item.rate }"></span></div>
</div> </div>
<div class="ratesum"> <div class="ratesum">
<p>{{ item.rate }}<span class="ratespan"><i>{{ item.satisfied }} / </i>{{ item.sum }}</span> <p>{{ item.rate }}<span class="ratespan"><i>{{ item.satisfied }} / </i>{{ item.sum
}}</span>
</p> </p>
</div> </div>
</li> </li>
@ -170,6 +176,7 @@
</el-tabs> </el-tabs>
</div> </div>
</el-tab-pane> </el-tab-pane>
</div>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
@ -184,7 +191,7 @@
<h2 class="yellowbg">{{ consoleMap.allSum }}</h2><span>来信总数</span> <h2 class="yellowbg">{{ consoleMap.allSum }}</h2><span>来信总数</span>
</li> </li>
<li> <li>
<h2 class="bulebg">{{ consoleMap.completed }}</h2><span>办结总数</span> <h2 class="bulebg">{{ consoleMap.completedsum }}</h2><span>办结总数</span>
</li> </li>
<li> <li>
<el-popover placement="right-start" title="办结率计算方式" :width="200" trigger="hover" show-after="700" <el-popover placement="right-start" title="办结率计算方式" :width="200" trigger="hover" show-after="700"
@ -358,7 +365,7 @@ const completedrateContent = ref('')
const satisfiedrateContent = ref('') const satisfiedrateContent = ref('')
const resolvedrateContent = ref('') const resolvedrateContent = ref('')
const intervalTimeRate = 4000; // const intervalTimeRate = 6000; //
const intervalTimeTrend = 3000; // const intervalTimeTrend = 3000; //
const intervalTimeDuty = 3200; // const intervalTimeDuty = 3200; //
let intervalIdRate: NodeJS.Timeout | null = null; let intervalIdRate: NodeJS.Timeout | null = null;
@ -555,6 +562,7 @@ const formatDate = (value) => {
return date.toLocaleString(); return date.toLocaleString();
} }
const startRateAutoSwitch = () => { const startRateAutoSwitch = () => {
console.log("startRateAutoSwitch")
intervalIdRate = setInterval(() => { intervalIdRate = setInterval(() => {
if (rateActiveName.value === 'completionRate') { if (rateActiveName.value === 'completionRate') {
rateActiveName.value = 'resolutionRate'; rateActiveName.value = 'resolutionRate';
@ -566,6 +574,8 @@ const startRateAutoSwitch = () => {
}, intervalTimeRate); }, intervalTimeRate);
}; };
const startTrendAutoSwitch = () => { const startTrendAutoSwitch = () => {
var dayChart = echarts.init(day_echart.value); var dayChart = echarts.init(day_echart.value);
var monthChart = echarts.init(month_echart.value); var monthChart = echarts.init(month_echart.value);
@ -619,6 +629,7 @@ const clearCarouselTime = () => {
}; };
const clearRateTimer = () => { const clearRateTimer = () => {
if (intervalIdRate) { if (intervalIdRate) {
console.log("clearCarouselTime")
clearInterval(intervalIdRate); clearInterval(intervalIdRate);
intervalIdRate = null; intervalIdRate = null;
} }
@ -692,24 +703,16 @@ const changsMap = () => {
trigger: 'item', trigger: 'item',
position: 'right', position: 'right',
formatter: function (params) { formatter: function (params) {
const data = params.data || {
todaysum: 0,
allsum: 0,
completed: 0,
completedrate: '0%',
resolvedrate: '0%',
satisfiedrate: '0%'
};
var tt = '<div class="tooltip">' + var tt = '<div class="tooltip">' +
'<div class="tooltip-title" > ' + params.name + '</div>' + '<div class="tooltip-title" > ' + params.name + '</div>' +
'<div class="tooltip-content" >' + '<div class="tooltip-content" >' +
'<ul class="tooltip-ul">' + '<ul class="tooltip-ul">' +
'<li>今日来信 <span>' + data.todaysum + '</span></li>' + '<li>今日来信 <span>' + params.data.todaysum + '</span></li>' +
'<li>来信总数 <span>' + data.allsum + '</span></li>' + '<li>来信总数 <span>' + params.data.allsum + '</span></li>' +
'<li>办结总数 <span>' + data.completed + '</span></li>' + '<li>办结总数 <span>' + params.data.completed + '</span></li>' +
'<li>办结率 <span>' + data.completedrate + '</span></li>' + '<li>办结率 <span>' + params.data.completedrate + '</span></li>' +
'<li>解决率 <span>' + data.resolvedrate + '</span></li>' + '<li>解决率 <span>' + params.data.resolvedrate + '</span></li>' +
'<li>满意率 <span>' + data.satisfiedrate + '</span></li>' + '<li>满意率 <span>' + params.data.satisfiedrate + '</span></li>' +
' </ul></div></div>' ' </ul></div></div>'
return tt; return tt;
}, },

8
src/views/home/components/Daily.vue

@ -19,7 +19,7 @@
<div class="number">{{ daily.completedTotal }}</div> <div class="number">{{ daily.completedTotal }}</div>
<span>累计办结</span> <span>累计办结</span>
</section> </section>
<section class="flex column v-center item pointer"> <section class="flex column v-center item pointer" @click="goThanks">
<div class="number" style="color: var(--primary-color)"> <div class="number" style="color: var(--primary-color)">
{{ daily.thankTotal }} {{ daily.thankTotal }}
</div> </div>
@ -30,9 +30,11 @@
<script setup> <script setup>
import { getMailDaily } from "@/api/home"; import { getMailDaily } from "@/api/home";
import emitter from "@/utils/bus"; import emitter from "@/utils/bus";
import { useRouterParamsStore } from '@/stores/modules/routerParams'
const router = useRouter(); const router = useRouter();
const daily = ref({}); const daily = ref({});
const routerParams = useRouterParamsStore()
function getData() { function getData() {
getMailDaily().then((data) => { getMailDaily().then((data) => {
@ -48,6 +50,10 @@ emitter.on('notice',()=>{
function goMailQuery() { function goMailQuery() {
router.push("/work/query"); router.push("/work/query");
} }
const goThanks = () => {
routerParams.setMailCategory(49)
router.push("/work/query");
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box { .box {

44
src/views/work/Query.vue

@ -110,6 +110,11 @@
<div> <div>
<el-button type="primary" @click="checkMail">信件核对</el-button> <el-button type="primary" @click="checkMail">信件核对</el-button>
<el-button type="primary" @click="outputSelectedMail" class="ml-4">信件导出</el-button> <el-button type="primary" @click="outputSelectedMail" class="ml-4">信件导出</el-button>
<el-popconfirm title="是否导出当前筛选条件的所有信件?" @confirm="exportLedger">
<template #reference>
<el-button type="primary" @click="getList" class="ml-4">台账导出</el-button>
</template>
</el-popconfirm>
</div> </div>
<div> <div>
<el-button type="primary" @click="getList">查询</el-button> <el-button type="primary" @click="getList">查询</el-button>
@ -157,6 +162,7 @@
<el-table-column label="流程限时" width="140" align="center"> <el-table-column label="流程限时" width="140" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.flowName !== '已办结'">
<div v-if="row.flowLimitedRemainingTime > 0" class="success"> <div v-if="row.flowLimitedRemainingTime > 0" class="success">
<span class="mr-4">剩余</span> <span class="mr-4">剩余</span>
<span class="text">{{ formatTimeText(row.flowLimitedRemainingTime) }}</span> <span class="text">{{ formatTimeText(row.flowLimitedRemainingTime) }}</span>
@ -165,6 +171,7 @@
<span class="mr-4">超时</span> <span class="mr-4">超时</span>
<span class="text">{{ formatTimeText(-row.flowLimitedRemainingTime) }}</span> <span class="text">{{ formatTimeText(-row.flowLimitedRemainingTime) }}</span>
</div> </div>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="信件等级" width="100" align="center"> <el-table-column label="信件等级" width="100" align="center">
@ -221,8 +228,8 @@ import { useDictOptions } from '@/hooks/useDictOptions'
import { deptLists } from '@/api/org/department' import { deptLists } from '@/api/org/department'
import { labelLists } from '@/api/org/label' import { labelLists } from '@/api/org/label'
import { getFlowNodes } from '@/api/org/flowNode' import { getFlowNodes } from '@/api/org/flowNode'
import { ref, reactive, watch, onMounted, onUnmounted } from "vue"; import { ref, reactive, watch, onMounted, onUnmounted, nextTick } from "vue";
import { ElTable } from "element-plus"; import { ElMessage, ElTable } from "element-plus";
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import axios from 'axios' import axios from 'axios'
import { useRouterParamsStore } from "@/stores/modules/routerParams"; import { useRouterParamsStore } from "@/stores/modules/routerParams";
@ -299,6 +306,10 @@ watch(() => route.path, () => {
query.value.signRoleId = useRouterParams.params.signRoleId query.value.signRoleId = useRouterParams.params.signRoleId
else else
delete query.value.signRoleId delete query.value.signRoleId
if (useRouterParams.params.mailCategory)
query.value.mailCategory = useRouterParams.params.mailCategory
else
delete query.value.mailCategory
getList() getList()
useRouterParams.removeParams() useRouterParams.removeParams()
@ -348,6 +359,28 @@ const outputSelectedMail = () => {
}); });
} }
const exportLedger = () => {
console.log("exportLedger", query.value);
axios.post('/lan-api/api/work/exportLedger', query.value, {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
"Admin": getToken()
},
responseType: 'blob'
}).then((res: any) => {
const url = window.URL.createObjectURL(new Blob([res.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'data.xlsx'); //
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}).catch((err: any) => {
console.log(err);
});
}
const form = ref([]); const form = ref([]);
const showModel = ref(false); const showModel = ref(false);
@ -395,6 +428,10 @@ function getList() {
query.value.signRoleId = useRouterParams.params.signRoleId query.value.signRoleId = useRouterParams.params.signRoleId
else else
delete query.value.signRoleId delete query.value.signRoleId
if (useRouterParams.params.mailCategory)
query.value.mailCategory = useRouterParams.params.mailCategory
else
delete query.value.mailCategory
} }
loading.value = true loading.value = true
@ -424,6 +461,9 @@ function getList() {
// //
delete query.value.signDeptId delete query.value.signDeptId
delete query.value.signRoleId delete query.value.signRoleId
return new Promise((res) => {
})
}); });
} }

Loading…
Cancel
Save