From 18858bb56e253457fc4a60b662638076caaabe8b Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Fri, 14 Mar 2025 14:14:24 +0800 Subject: [PATCH] jsc --- src/router/index.js | 24 +- src/views/jsc/allTable.vue | 206 +++++++++--------- src/views/jsc/components/evection.vue | 301 +++++++++++++------------- 3 files changed, 264 insertions(+), 267 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index b809c79..717cd44 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -89,18 +89,18 @@ export const constantRoutes = [ meta: { title: '首页', icon: 'dashboard' } }] }, - { - path: '/jsc', - component: Layout, - redirect: '/jsc', - meta: { title: '驾驶舱', icon: 'dashboard' }, - children: [{ - path: 'jsc', - name: 'jsc', - component: () => import('@/views/jsc/jsc'), - meta: { title: '驾驶舱', icon: 'dashboard' } - }] - }, + // { + // path: '/jsc', + // component: Layout, + // redirect: '/jsc', + // meta: { title: '驾驶舱', icon: 'dashboard' }, + // children: [{ + // path: 'jsc', + // name: 'jsc', + // component: () => import('@/views/jsc/jsc'), + // meta: { title: '驾驶舱', icon: 'dashboard' } + // }] + // }, { path: '/info', component: Layout, diff --git a/src/views/jsc/allTable.vue b/src/views/jsc/allTable.vue index 47d715a..c7688ca 100644 --- a/src/views/jsc/allTable.vue +++ b/src/views/jsc/allTable.vue @@ -3,9 +3,9 @@
- +
@@ -15,7 +15,8 @@
- + @@ -26,8 +27,8 @@
-
+
- - + +
@@ -66,10 +60,10 @@ import ElementResize from 'element-resize-detector' import { defaultModalSize - } from '@/settings' - import axios from 'axios' - import { - getToken + } from '@/settings' + import axios from 'axios' + import { + getToken } from '@/utils/auth' export default { @@ -91,8 +85,8 @@ data() { return { defaultModalSize, - tableHeight: 400, - loading:false, + tableHeight: 400, + loading: false, list: [], total: 0, table: [], @@ -169,16 +163,18 @@ ], chuchai: [{ title: '人员', - key: 'flow.creator.name', - width: 120, + key: 'renyuan_name', align: 'left', + 'show-overflow-tooltip': true, + minWidth:120 + // flow.creator.name }, { title: '去向', key: 'mudidi', align: 'left', 'show-overflow-tooltip': true, - minWidth: 120 + width: 80 }, { title: '交通方式', @@ -192,44 +188,44 @@ key: 'chuchaishiyou', align: 'left', 'show-overflow-tooltip': true, - }, - { - title: '开始日期', - key: 'kaishi', - align: 'left', - 'show-overflow-tooltip': true, - width: 120 - }, - { - title: '结束日期', - key: '结束', - align: 'left', - 'show-overflow-tooltip': true, - width: 120 + }, + { + title: '开始日期', + key: 'kaishi', + align: 'left', + 'show-overflow-tooltip': true, + width: 100 + }, + { + title: '结束日期', + key: 'jieshu', + align: 'left', + 'show-overflow-tooltip': true, + width: 100 } ] }, // 弹窗选择 tagList: [{ name: '出差', - id: 'chuchai', - type:3 + id: 'chuchai', + type: 3 }, { name: '用车', - id: 'yongche', - type:3 + id: 'yongche', + type: 3 }, { name: '加班', - id: 'jiaban', - type:1 + id: 'jiaban', + type: 1 }, { name: '请假', - id: 'qingjia', - type:2 + id: 'qingjia', + type: 2 }], - changeSelect:false, + changeSelect: false, dateRange: '', pickerOptions: { shortcuts: [{ @@ -285,14 +281,14 @@ } }, computed: {}, - watch: { - modalSelect(newval){ - console.log("isShowModal",newval) - this.getChartOverallList() - } + watch: { + modalSelect(newval) { + console.log("isShowModal", newval) + this.getChartOverallList() + } }, - created() { - this.getChartOverallList() + created() { + this.getChartOverallList() }, beforeDestroy() {}, mounted() { @@ -317,11 +313,11 @@ // 弹出的总览数据 async getChartOverallList() { try { - this.loading = true - if(this.changeSelect){ - this.list = [] - this.total = 0 - this.modalSelect.page = 1 + this.loading = true + if (this.changeSelect) { + this.list = [] + this.total = 0 + this.modalSelect.page = 1 } const res = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/chart/overall-list`, { headers: { @@ -336,28 +332,28 @@ page_size: this.modalSelect.page_size } }) - if (res.status === 200) { - console.log("res",res) - - this.table = this.tableList[this.modalSelect.searchTag] - this.changeSelect = false - let list = res.data.data.data - this.total = res.data.data.total - if(this.modalSelect.searchTag==='yongche'){ - let carList = [] - list.map(a=>{ - if(a.chucheqingkuang){ - let car = JSON.parse(a.chucheqingkuang) - car.map(item=>{ - item.mudidi = a.mudidi - }) - carList.push(...car) - } - }) - this.list = carList - this.total = carList.length - }else{ - this.list = list + if (res.status === 200) { + console.log("res", res) + + this.table = this.tableList[this.modalSelect.searchTag] + this.changeSelect = false + let list = res.data.data.data + this.total = res.data.data.total + if (this.modalSelect.searchTag === 'yongche') { + let carList = [] + list.map(a => { + if (a.chucheqingkuang) { + let car = JSON.parse(a.chucheqingkuang) + car.map(item => { + item.mudidi = a.mudidi + }) + carList.push(...car) + } + }) + this.list = carList + this.total = carList.length + } else { + this.list = list } // this.list.map(item => { @@ -375,26 +371,26 @@ console.log("e", e) if (e) { this.modalSelect.start_date = e[0] - this.modalSelect.end_date = e[1] + this.modalSelect.end_date = e[1] this.changeSelect = true } else { this.modalSelect.start_date = '' this.modalSelect.end_date = '' } - }, - changeDepartment(e){ - if(e || e==''){ - this.changeSelect = true - this.modalSelect.department_id = e - } - }, - changeTag(e){ - this.tagList.map(item=>{ - if(item.id==e){ - this.changeSelect = true - this.modalSelect.type = item.type - } - }) + }, + changeDepartment(e) { + if (e || e == '') { + this.changeSelect = true + this.modalSelect.department_id = e + } + }, + changeTag(e) { + this.tagList.map(item => { + if (item.id == e) { + this.changeSelect = true + this.modalSelect.type = item.type + } + }) } diff --git a/src/views/jsc/components/evection.vue b/src/views/jsc/components/evection.vue index b4b7c3a..9e76400 100644 --- a/src/views/jsc/components/evection.vue +++ b/src/views/jsc/components/evection.vue @@ -1,151 +1,152 @@ - - - - -