|
@@ -117,7 +117,7 @@
|
|
|
<el-col :span="6" class="flex flex-col items-center" @click="openForm(queryParams.deptId,0,queryParams.createTime)">
|
|
|
<div ref="transOrderChartRef1" class="h-[160px] w-full"></div>
|
|
|
<div class="text-center mt-2">
|
|
|
- <span class="text-sm text-gray-600">待填写</span>
|
|
|
+ <span class="text-sm text-gray-600">未填写</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -228,7 +228,7 @@ const openForm = (deptId?:string,isFill?:string,createTime?:[]) => {
|
|
|
push({ name: 'FillOrderInfo2',params:{deptId,isFill,createTime}})
|
|
|
}
|
|
|
const openFill = (deptId?:string,orderStatus?:string,createTime?:[]) => {
|
|
|
- push({ name: 'FillOrderInfo1',params:{deptId,orderStatus,createTime}})
|
|
|
+ push({ name: 'IotOpeationFill1',params:{deptId,orderStatus,createTime}})
|
|
|
}
|
|
|
|
|
|
|
|
@@ -394,23 +394,23 @@ const initCharts = () => {
|
|
|
initGaugeChart(
|
|
|
dealFinishedChartRef.value,
|
|
|
firstStatus.filledCount === undefined ? 0 : firstStatus.filledCount,
|
|
|
- '#f50'
|
|
|
+ '#05b'
|
|
|
)
|
|
|
initGaugeChart(
|
|
|
dealFinishedChartRef1.value,
|
|
|
firstStatus1.filledCount === undefined ? 0 : firstStatus1.filledCount,
|
|
|
- '#f50'
|
|
|
+ '#05b'
|
|
|
)
|
|
|
// 转工单
|
|
|
initGaugeChart(
|
|
|
transOrderChartRef.value,
|
|
|
firstStatus.unfilledCount === undefined ? 0 : firstStatus.unfilledCount,
|
|
|
- '#05b'
|
|
|
+ '#f50'
|
|
|
)
|
|
|
initGaugeChart(
|
|
|
transOrderChartRef1.value,
|
|
|
firstStatus1.unfilledCount === undefined ? 0 : firstStatus1.unfilledCount,
|
|
|
- '#05b'
|
|
|
+ '#f50'
|
|
|
)
|
|
|
// 待填写
|
|
|
initGaugeChart(
|
|
@@ -594,6 +594,20 @@ const initChart = () => {
|
|
|
const handleResize = () => {
|
|
|
chartInstance?.resize()
|
|
|
}
|
|
|
+const router = useRouter()
|
|
|
+const route = useRoute()
|
|
|
+// 监听路由变化
|
|
|
+const removeBeforeEach = router.beforeEach((to, from, next) => {
|
|
|
+ // 如果是从FillOrderInfo1页面返回
|
|
|
+ if (from.name === 'FillOrderInfo1' && to.name === route.name) {
|
|
|
+ // 恢复查询参数
|
|
|
+ Object.assign(queryParams, initialQueryParams)
|
|
|
+ // 阻止刷新,使用replace而不是push
|
|
|
+ next({ ...to, replace: true })
|
|
|
+ } else {
|
|
|
+ next()
|
|
|
+ }
|
|
|
+})
|
|
|
|
|
|
/** 初始化 */
|
|
|
onMounted(async () => {
|
|
@@ -601,12 +615,9 @@ onMounted(async () => {
|
|
|
getStats()
|
|
|
getDevStats();
|
|
|
deptList.value = handleTree(await DeptApi.getSimpleDeptList())
|
|
|
-})
|
|
|
|
|
|
-onUnmounted(() => {
|
|
|
- chartInstance?.dispose()
|
|
|
- window.removeEventListener('resize', handleResize)
|
|
|
})
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|