From 06d4f0ec91fa51a991f6de52466284796de6e8dc Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Wed, 28 May 2025 08:41:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E8=88=B1=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/system-boot/csstatisticalset.ts | 43 +- src/api/user-boot/dept.ts | 36 ++ src/api/user-boot/user.ts | 7 + src/assets/imgs/1x1.png | Bin 0 -> 118 bytes src/assets/imgs/2x2.png | Bin 0 -> 137 bytes src/assets/imgs/2x3.png | Bin 0 -> 160 bytes src/assets/imgs/3x3.png | Bin 0 -> 179 bytes src/assets/imgs/amplify.png | Bin 0 -> 4439 bytes src/assets/imgs/reduce.png | Bin 0 -> 4689 bytes src/components/echarts/MyEchart.vue | 2 +- src/styles/vxeTable.scss | 8 +- src/utils/formatTime.ts | 328 +++++++-------- src/views/cockpit/TerminalLog.vue | 105 +++++ src/views/cockpit/qualifiedRate.vue | 263 ++++++++++++ src/views/cockpit/testEchart.vue | 98 +++++ src/views/pqs/cockpit/homePage/index.vue | 242 ++++++++++++ .../pqs/cockpit/setUp/components/popup.vue | 374 ++++++++++++++++++ src/views/pqs/cockpit/setUp/index.vue | 287 ++++++++++++++ .../setting/dictionary/component/add.vue | 113 ++++++ .../setting/dictionary/component/index.vue | 129 ++++++ 21 files changed, 1866 insertions(+), 170 deletions(-) create mode 100644 src/assets/imgs/1x1.png create mode 100644 src/assets/imgs/2x2.png create mode 100644 src/assets/imgs/2x3.png create mode 100644 src/assets/imgs/3x3.png create mode 100644 src/assets/imgs/amplify.png create mode 100644 src/assets/imgs/reduce.png create mode 100644 src/views/cockpit/TerminalLog.vue create mode 100644 src/views/cockpit/qualifiedRate.vue create mode 100644 src/views/cockpit/testEchart.vue create mode 100644 src/views/pqs/cockpit/homePage/index.vue create mode 100644 src/views/pqs/cockpit/setUp/components/popup.vue create mode 100644 src/views/pqs/cockpit/setUp/index.vue create mode 100644 src/views/setting/dictionary/component/add.vue create mode 100644 src/views/setting/dictionary/component/index.vue diff --git a/package.json b/package.json index dba621cd..f20bcbfb 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "element-plus": "^2.8.7", "exceljs": "^4.4.0", "file-saver": "^2.0.5", + "grid-layout-plus": "^1.1.0", "html2canvas": "^1.4.1", "jquery": "^3.7.1", "js-pinyin": "^0.2.5", diff --git a/src/api/system-boot/csstatisticalset.ts b/src/api/system-boot/csstatisticalset.ts index c3d8b367..5385f0a5 100644 --- a/src/api/system-boot/csstatisticalset.ts +++ b/src/api/system-boot/csstatisticalset.ts @@ -1,6 +1,6 @@ import createAxios from '@/utils/request' // 查询指标 -export const queryStatistical = (id:string) => { +export const queryStatistical = (id: string) => { let form = new FormData() form.append('id', id) return createAxios({ @@ -14,10 +14,49 @@ export const queryStatistical = (id:string) => { } // 绑定指标 -export const addStatistical = (params:any) => { +export const addStatistical = (params: any) => { return createAxios({ url: '/system-boot/csstatisticalset/addStatistical', method: 'post', data: params }) } +// 新增驾驶舱页面 +export const addDashboard = (data: any) => { + return createAxios({ + url: '/system-boot/dashboard/addDashboard', + method: 'post', + data: data + }) +} +// 修改驾驶舱页面 +export const updateDashboard = (data: any) => { + return createAxios({ + url: '/system-boot/dashboard/updateDashboard', + method: 'post', + data: data + }) +} +// 删除驾驶舱页面 +export const deleteDashboard = (params: any) => { + return createAxios({ + url: '/system-boot/dashboard/deleteDashboard', + method: 'post', + params + }) +} +// 激活的驾驶舱页面 +export const activatePage = (params: any) => { + return createAxios({ + url: '/system-boot/dashboard/activatePage', + method: 'post', + params + }) +} +// 查询激活的驾驶舱页面 +export const queryActivatePage = () => { + return createAxios({ + url: '/system-boot/dashboard/queryActivatePage', + method: 'post' + }) +} diff --git a/src/api/user-boot/dept.ts b/src/api/user-boot/dept.ts index 3839c30f..2afd75cd 100644 --- a/src/api/user-boot/dept.ts +++ b/src/api/user-boot/dept.ts @@ -80,3 +80,39 @@ export function getDeptListByIds(data:any) { }) } +// 查询组件 +export function getFatherComponent(params:any) { + return request({ + url: '/user-boot/component/getFatherComponent', + method: 'GET', + params + }) +} + +// 删除组件 +export function deleteSubassembly(params:any) { + return request({ + url: '/user-boot/component/delete', + method: 'DELETE', + params + }) +} + +// 新增组件 +export function componentAdd(data:any) { + return request({ + url: '/user-boot/component/add', + method: 'post', + data + }) +} + +// 修改组件 +export function componentEdit(data:any) { + return request({ + url: '/user-boot/component/update', + method: 'put', + data + }) +} + diff --git a/src/api/user-boot/user.ts b/src/api/user-boot/user.ts index 480dc2db..e4d325b5 100644 --- a/src/api/user-boot/user.ts +++ b/src/api/user-boot/user.ts @@ -206,3 +206,10 @@ export const getSysConfig = () => { method: 'get' }) } +// 驾驶舱组件配置 +export const componentTree = () => { + return request({ + url: '/user-boot/component/componentTree', + method: 'GET' + }) +} diff --git a/src/assets/imgs/1x1.png b/src/assets/imgs/1x1.png new file mode 100644 index 0000000000000000000000000000000000000000..b9a83e950951be8c4f5ef8fccb00b3f8be35bbe8 GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|3_M*NLoEE0 zQx*sqG<|vf;>92J<8!pb*BSIl8A!1$e%a92c*($`;OQw*_ky%VEDQ|J5tf3E$8Ai3 PdKo-j{an^LB{Ts5F&QIl literal 0 HcmV?d00001 diff --git a/src/assets/imgs/2x2.png b/src/assets/imgs/2x2.png new file mode 100644 index 0000000000000000000000000000000000000000..49aedb71317ab6dbe7dc80d489cd92ba49f2a1eb GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|oIPC}LoEE0 zuUx$N^Lzty%+8|LKzH}!jg5_o_IjoYtc%%r+6-147w+x7kg?^sc&~`GgNAH_PR0Ti i#a^iei=A&9FfhCe40kL&eMTQ>9D}E;pUXO@geCwq8!G|; literal 0 HcmV?d00001 diff --git a/src/assets/imgs/2x3.png b/src/assets/imgs/2x3.png new file mode 100644 index 0000000000000000000000000000000000000000..1d153e895da955f1157aed168893cee84be87802 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|qC8z3LoEE0 zQxXyi5)u+Nq$}`9NlHk(x;Vwuh>7*T@HOtRha6in?04N-n9fioVKCtpYtI9vs||?) z9T9sSQmhWG;|W(t@-9_bdPFgeL8HWAlcw0l=7>$T$_$n4O00iYC@lxt!r8KS)H(luFVdQ&MBb@0BU7JhX4Qo literal 0 HcmV?d00001 diff --git a/src/assets/imgs/amplify.png b/src/assets/imgs/amplify.png new file mode 100644 index 0000000000000000000000000000000000000000..b9fb44979283e9458ed13c8268bbecb95c392f59 GIT binary patch literal 4439 zcmeHLhf`C_+dk)TfCOndND(PX2okALib#zRG;~DiElN?4CPEzijkQ!XFPx2v!rU8ScFzGS45gTV9BB{PUOb~R6aS>Zv%N&0y$_*$|EWWo zNTq6iXO}Z?&vJJF=b(lo)MzgtR$JUcQqcT?!bhW=Iz^4?9qp#dXikAEKA{- zy&3p!Eb6@+fw!Rpd^`QkFJvOCy`~8S6aaYD_dY zG*ZB)T}ywsEky>XSo;}V5_K$k+l}|+&d2Vz<#`K&Gm8$NrhgBX=P6FTP82=1vbQ}F z%LJ~!kMpu?C4xX$@LcOq=jlY>|j>dR8^>v*vBcsh#s{rIDnO7P(!CGvcr#{LVgY-vX&B zfZx+CYWR+O&FqP}lItxG5SkhGU~)l22bxxUl)z!?=Ad0L&u()rcZ5}zb*Q`VdboyA z*|?a$?y|VjS9LE6YoFF1RcN{b%OFG>L9T6M?V|ANDgBeKNNIIEzEAIWg(bWjZ#K8q@;UQX3IJ%` z51(DE3$Ei?(z)|_Lm{<_D}@?=$?j`dD)6lEclGqUw^`PSkeW-;DYp!v0f$$|zg*dx zpf9D26%uDv=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ya6Rvf5nG%bp<`Vr2Oh`bXJ8pb=^`r*Lcr+#m|t73SQ zHShT+CS|s@xj;Kbe%I@&4UBA$oe?y{>QCP*)$W>JU0g6U+3_&3qPa$GE#>2yqKU%J z+@Jb8R3F5^q5-dz^df(spH4C^X5Qi`z1ei(!Czv&8OFCTpANos+W#bSKcAAMO$9}v zSwP!+)i3w{-MRWXqu*jM37JZ4=M1`uLs!8|(KT!{1cmYU6{s z$_G1ClXB1Pkph@EWn$jVL7xi4<45=wuiR4b&#*}%G>{iH4E!UFPX9p3RA1{S?PpLWr~q@YY266|dV$fF5tce2c6aP7 z>Hz~BYLHZ`LZ0*n;^@G5NF$bxjV=PSS2XHD!YtgkQuO?YxJs%M0hv(Sj7TtG){9=P z-7;c(*yR{DFB8v3Fuw1~B6WJxZsTSP(A*VCY4pkVs)jE)K}jn{Z?f;6UbRq;u{Yng z6>47*toK?U^VfHq&~5PiLK_v)?s6xx9iqkW#gJV^9sk0(%H#sqi#}(&oyc%!8K|-~ shj7FgUITX)LqcY8tR=Vq2m`KKpQuQd;ne#)!5tBx?sD2$ZReZzZ{C&;YybcN literal 0 HcmV?d00001 diff --git a/src/components/echarts/MyEchart.vue b/src/components/echarts/MyEchart.vue index 9e9efda4..4ea16338 100644 --- a/src/components/echarts/MyEchart.vue +++ b/src/components/echarts/MyEchart.vue @@ -112,7 +112,7 @@ const initChart = () => { ...(props.options?.legend || null) }, grid: { - top: '70px', + top: '50px', left: '30px', right: '70px', bottom: props.options?.options?.dataZoom === null ? '10px' : '40px', diff --git a/src/styles/vxeTable.scss b/src/styles/vxeTable.scss index 7d6cc4ff..56ce9d97 100644 --- a/src/styles/vxeTable.scss +++ b/src/styles/vxeTable.scss @@ -20,10 +20,10 @@ // } .vxe-header--row { - // background: var(--vxe-table-header-background-color); - // color: var(--vxe-table-header-font-color); - background: var(--el-color-primary); - color: #fff; + background: var(--vxe-table-header-background-color); + color: var(--vxe-table-header-font-color); + // background: var(--el-color-primary); + // color: #fff; font-size: 14px; } diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 134a986e..cfd958b1 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -5,51 +5,51 @@ import type { TableColumnCtx } from 'element-plus' * 日期快捷选项适用于 el-date-picker */ export const defaultShortcuts = [ - { - text: '今天', - value: () => { - return new Date() + { + text: '今天', + value: () => { + return new Date() + } + }, + { + text: '昨天', + value: () => { + const date = new Date() + date.setTime(date.getTime() - 3600 * 1000 * 24) + return [date, date] + } + }, + { + text: '最近七天', + value: () => { + const date = new Date() + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7) + return [date, new Date()] + } + }, + { + text: '最近 30 天', + value: () => { + const date = new Date() + date.setTime(date.getTime() - 3600 * 1000 * 24 * 30) + return [date, new Date()] + } + }, + { + text: '本月', + value: () => { + const date = new Date() + date.setDate(1) // 设置为当前月的第一天 + return [date, new Date()] + } + }, + { + text: '今年', + value: () => { + const date = new Date() + return [new Date(`${date.getFullYear()}-01-01`), date] + } } - }, - { - text: '昨天', - value: () => { - const date = new Date() - date.setTime(date.getTime() - 3600 * 1000 * 24) - return [date, date] - } - }, - { - text: '最近七天', - value: () => { - const date = new Date() - date.setTime(date.getTime() - 3600 * 1000 * 24 * 7) - return [date, new Date()] - } - }, - { - text: '最近 30 天', - value: () => { - const date = new Date() - date.setTime(date.getTime() - 3600 * 1000 * 24 * 30) - return [date, new Date()] - } - }, - { - text: '本月', - value: () => { - const date = new Date() - date.setDate(1) // 设置为当前月的第一天 - return [date, new Date()] - } - }, - { - text: '今年', - value: () => { - const date = new Date() - return [new Date(`${date.getFullYear()}-01-01`), date] - } - } ] /** @@ -64,19 +64,19 @@ export const defaultShortcuts = [ * @returns 返回拼接后的时间字符串 */ export function formatDate(date: Date, format?: string): string { - // 日期不存在,则返回空 - if (!date) { - return '' - } - // 日期存在,则进行格式化 - return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : '' + // 日期不存在,则返回空 + if (!date) { + return '' + } + // 日期存在,则进行格式化 + return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : '' } /** * 获取当前的日期+时间 */ export function getNowDateTime() { - return dayjs() + return dayjs() } /** @@ -85,18 +85,18 @@ export function getNowDateTime() { * @returns 返回第几周数字值 */ export function getWeek(dateTime: Date): number { - const temptTime = new Date(dateTime.getTime()) - // 周几 - const weekday = temptTime.getDay() || 7 - // 周1+5天=周六 - temptTime.setDate(temptTime.getDate() - weekday + 1 + 5) - let firstDay = new Date(temptTime.getFullYear(), 0, 1) - const dayOfWeek = firstDay.getDay() - let spendDay = 1 - if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1 - firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay) - const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000) - return Math.ceil(d / 7) + const temptTime = new Date(dateTime.getTime()) + // 周几 + const weekday = temptTime.getDay() || 7 + // 周1+5天=周六 + temptTime.setDate(temptTime.getDate() - weekday + 1 + 5) + let firstDay = new Date(temptTime.getFullYear(), 0, 1) + const dayOfWeek = firstDay.getDay() + let spendDay = 1 + if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1 + firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay) + const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000) + return Math.ceil(d / 7) } /** @@ -111,38 +111,38 @@ export function getWeek(dateTime: Date): number { * @returns 返回拼接后的时间字符串 */ export function formatPast(param: string | Date, format = 'YYYY-mm-dd HH:MM:SS'): string { - // 传入格式处理、存储转换值 - let t: any, s: number - // 获取js 时间戳 - let time: number = new Date().getTime() - // 是否是对象 - typeof param === 'string' || 'object' ? (t = new Date(param).getTime()) : (t = param) - // 当前时间戳 - 传入时间戳 - time = Number.parseInt(`${time - t}`) - if (time < 10000) { - // 10秒内 - return '刚刚' - } else if (time < 60000 && time >= 10000) { - // 超过10秒少于1分钟内 - s = Math.floor(time / 1000) - return `${s}秒前` - } else if (time < 3600000 && time >= 60000) { - // 超过1分钟少于1小时 - s = Math.floor(time / 60000) - return `${s}分钟前` - } else if (time < 86400000 && time >= 3600000) { - // 超过1小时少于24小时 - s = Math.floor(time / 3600000) - return `${s}小时前` - } else if (time < 259200000 && time >= 86400000) { - // 超过1天少于3天内 - s = Math.floor(time / 86400000) - return `${s}天前` - } else { - // 超过3天 - const date = typeof param === 'string' || 'object' ? new Date(param) : param - return formatDate(date, format) - } + // 传入格式处理、存储转换值 + let t: any, s: number + // 获取js 时间戳 + let time: number = new Date().getTime() + // 是否是对象 + typeof param === 'string' || 'object' ? (t = new Date(param).getTime()) : (t = param) + // 当前时间戳 - 传入时间戳 + time = Number.parseInt(`${time - t}`) + if (time < 10000) { + // 10秒内 + return '刚刚' + } else if (time < 60000 && time >= 10000) { + // 超过10秒少于1分钟内 + s = Math.floor(time / 1000) + return `${s}秒前` + } else if (time < 3600000 && time >= 60000) { + // 超过1分钟少于1小时 + s = Math.floor(time / 60000) + return `${s}分钟前` + } else if (time < 86400000 && time >= 3600000) { + // 超过1小时少于24小时 + s = Math.floor(time / 3600000) + return `${s}小时前` + } else if (time < 259200000 && time >= 86400000) { + // 超过1天少于3天内 + s = Math.floor(time / 86400000) + return `${s}天前` + } else { + // 超过3天 + const date = typeof param === 'string' || 'object' ? new Date(param) : param + return formatDate(date, format) + } } /** @@ -152,15 +152,15 @@ export function formatPast(param: string | Date, format = 'YYYY-mm-dd HH:MM:SS') * @returns 返回拼接后的时间字符串 */ export function formatAxis(param: Date): string { - const hour: number = new Date(param).getHours() - if (hour < 6) return '凌晨好' - else if (hour < 9) return '早上好' - else if (hour < 12) return '上午好' - else if (hour < 14) return '中午好' - else if (hour < 17) return '下午好' - else if (hour < 19) return '傍晚好' - else if (hour < 22) return '晚上好' - else return '夜里好' + const hour: number = new Date(param).getHours() + if (hour < 6) return '凌晨好' + else if (hour < 9) return '早上好' + else if (hour < 12) return '上午好' + else if (hour < 14) return '中午好' + else if (hour < 17) return '下午好' + else if (hour < 19) return '傍晚好' + else if (hour < 22) return '晚上好' + else return '夜里好' } /** @@ -170,24 +170,24 @@ export function formatAxis(param: Date): string { * @returns {string} 字符串 */ export function formatPast2(ms: number): string { - const day = Math.floor(ms / (24 * 60 * 60 * 1000)) - const hour = Math.floor(ms / (60 * 60 * 1000) - day * 24) - const minute = Math.floor(ms / (60 * 1000) - day * 24 * 60 - hour * 60) - const second = Math.floor(ms / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60) - if (day > 0) { - return day + ' 天' + hour + ' 小时 ' + minute + ' 分钟' - } - if (hour > 0) { - return hour + ' 小时 ' + minute + ' 分钟' - } - if (minute > 0) { - return minute + ' 分钟' - } - if (second > 0) { - return second + ' 秒' - } else { - return 0 + ' 秒' - } + const day = Math.floor(ms / (24 * 60 * 60 * 1000)) + const hour = Math.floor(ms / (60 * 60 * 1000) - day * 24) + const minute = Math.floor(ms / (60 * 1000) - day * 24 * 60 - hour * 60) + const second = Math.floor(ms / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60) + if (day > 0) { + return day + ' 天' + hour + ' 小时 ' + minute + ' 分钟' + } + if (hour > 0) { + return hour + ' 小时 ' + minute + ' 分钟' + } + if (minute > 0) { + return minute + ' 分钟' + } + if (second > 0) { + return second + ' 秒' + } else { + return 0 + ' 秒' + } } /** @@ -198,7 +198,7 @@ export function formatPast2(ms: number): string { * @param cellValue 字段值 */ export function dateFormatter(_row: any, _column: TableColumnCtx, cellValue: any): string { - return cellValue ? formatDate(cellValue) : '' + return cellValue ? formatDate(cellValue) : '' } /** @@ -209,7 +209,7 @@ export function dateFormatter(_row: any, _column: TableColumnCtx, cellValue * @param cellValue 字段值 */ export function dateFormatter2(_row: any, _column: TableColumnCtx, cellValue: any): string { - return cellValue ? formatDate(cellValue, 'YYYY-MM-DD') : '' + return cellValue ? formatDate(cellValue, 'YYYY-MM-DD') : '' } /** @@ -218,7 +218,7 @@ export function dateFormatter2(_row: any, _column: TableColumnCtx, cellValu * @returns 带时间00:00:00的日期 */ export function beginOfDay(param: Date): Date { - return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 0, 0, 0) + return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 0, 0, 0) } /** @@ -227,7 +227,7 @@ export function beginOfDay(param: Date): Date { * @returns 带时间23:59:59的日期 */ export function endOfDay(param: Date): Date { - return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 23, 59, 59) + return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 23, 59, 59) } /** @@ -236,10 +236,10 @@ export function endOfDay(param: Date): Date { * @param param2 日期2 */ export function betweenDay(param1: Date, param2: Date): number { - param1 = convertDate(param1) - param2 = convertDate(param2) - // 计算差值 - return Math.floor((param2.getTime() - param1.getTime()) / (24 * 3600 * 1000)) + param1 = convertDate(param1) + param2 = convertDate(param2) + // 计算差值 + return Math.floor((param2.getTime() - param1.getTime()) / (24 * 3600 * 1000)) } /** @@ -248,8 +248,8 @@ export function betweenDay(param1: Date, param2: Date): number { * @param param2 添加的时间 */ export function addTime(param1: Date, param2: number): Date { - param1 = convertDate(param1) - return new Date(param1.getTime() + param2) + param1 = convertDate(param1) + return new Date(param1.getTime() + param2) } /** @@ -257,10 +257,10 @@ export function addTime(param1: Date, param2: number): Date { * @param param 日期 */ export function convertDate(param: Date | string): Date { - if (typeof param === 'string') { - return new Date(param) - } - return param + if (typeof param === 'string') { + return new Date(param) + } + return param } /** @@ -269,11 +269,11 @@ export function convertDate(param: Date | string): Date { * @param b 日期 B */ export function isSameDay(a: dayjs.ConfigType, b: dayjs.ConfigType): boolean { - if (!a || !b) return false + if (!a || !b) return false - const aa = dayjs(a) - const bb = dayjs(b) - return aa.year() == bb.year() && aa.month() == bb.month() && aa.day() == bb.day() + const aa = dayjs(a) + const bb = dayjs(b) + return aa.year() == bb.year() && aa.month() == bb.month() && aa.day() == bb.day() } /** @@ -281,39 +281,36 @@ export function isSameDay(a: dayjs.ConfigType, b: dayjs.ConfigType): boolean { * @param date 日期 * @param days 天数 */ -export function getDayRange( - date: dayjs.ConfigType, - days: number -): [dayjs.ConfigType, dayjs.ConfigType] { - const day = dayjs(date).add(days, 'd') - return getDateRange(day, day) +export function getDayRange(date: dayjs.ConfigType, days: number): [dayjs.ConfigType, dayjs.ConfigType] { + const day = dayjs(date).add(days, 'd') + return getDateRange(day, day) } /** * 获取最近7天的开始时间、截止时间 */ export function getLast7Days(): [dayjs.ConfigType, dayjs.ConfigType] { - const lastWeekDay = dayjs().subtract(7, 'd') - const yesterday = dayjs().subtract(1, 'd') - return getDateRange(lastWeekDay, yesterday) + const lastWeekDay = dayjs().subtract(7, 'd') + const yesterday = dayjs().subtract(1, 'd') + return getDateRange(lastWeekDay, yesterday) } /** * 获取最近30天的开始时间、截止时间 */ export function getLast30Days(): [dayjs.ConfigType, dayjs.ConfigType] { - const lastMonthDay = dayjs().subtract(30, 'd') - const yesterday = dayjs().subtract(1, 'd') - return getDateRange(lastMonthDay, yesterday) + const lastMonthDay = dayjs().subtract(30, 'd') + const yesterday = dayjs().subtract(1, 'd') + return getDateRange(lastMonthDay, yesterday) } /** * 获取最近1年的开始时间、截止时间 */ export function getLast1Year(): [dayjs.ConfigType, dayjs.ConfigType] { - const lastYearDay = dayjs().subtract(1, 'y') - const yesterday = dayjs().subtract(1, 'd') - return getDateRange(lastYearDay, yesterday) + const lastYearDay = dayjs().subtract(1, 'y') + const yesterday = dayjs().subtract(1, 'd') + return getDateRange(lastYearDay, yesterday) } /** @@ -321,12 +318,17 @@ export function getLast1Year(): [dayjs.ConfigType, dayjs.ConfigType] { * @param beginDate 开始日期 * @param endDate 截止日期 */ -export function getDateRange( - beginDate: dayjs.ConfigType, - endDate: dayjs.ConfigType -): [string, string] { - return [ - dayjs(beginDate).startOf('d').format('YYYY-MM-DD HH:mm:ss'), - dayjs(endDate).endOf('d').format('YYYY-MM-DD HH:mm:ss') - ] +export function getDateRange(beginDate: dayjs.ConfigType, endDate: dayjs.ConfigType): [string, string] { + return [ + dayjs(beginDate).startOf('d').format('YYYY-MM-DD HH:mm:ss'), + dayjs(endDate).endOf('d').format('YYYY-MM-DD HH:mm:ss') + ] +} +/** + * 获取当月时间 + * @param beginDate 开始日期 + * @param endDate 截止日期 + */ +export function getTimeOfTheMonth(): [string, string] { + return [formatDate(new Date(), 'YYYY-MM') + '-01', formatDate(new Date(), 'YYYY-MM-DD')] } diff --git a/src/views/cockpit/TerminalLog.vue b/src/views/cockpit/TerminalLog.vue new file mode 100644 index 00000000..0ea4e991 --- /dev/null +++ b/src/views/cockpit/TerminalLog.vue @@ -0,0 +1,105 @@ + + + diff --git a/src/views/cockpit/qualifiedRate.vue b/src/views/cockpit/qualifiedRate.vue new file mode 100644 index 00000000..9ce14cc6 --- /dev/null +++ b/src/views/cockpit/qualifiedRate.vue @@ -0,0 +1,263 @@ + + + diff --git a/src/views/cockpit/testEchart.vue b/src/views/cockpit/testEchart.vue new file mode 100644 index 00000000..fe9532df --- /dev/null +++ b/src/views/cockpit/testEchart.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/views/pqs/cockpit/homePage/index.vue b/src/views/pqs/cockpit/homePage/index.vue new file mode 100644 index 00000000..910bba19 --- /dev/null +++ b/src/views/pqs/cockpit/homePage/index.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/src/views/pqs/cockpit/setUp/components/popup.vue b/src/views/pqs/cockpit/setUp/components/popup.vue new file mode 100644 index 00000000..d8a9d5f1 --- /dev/null +++ b/src/views/pqs/cockpit/setUp/components/popup.vue @@ -0,0 +1,374 @@ + + + diff --git a/src/views/pqs/cockpit/setUp/index.vue b/src/views/pqs/cockpit/setUp/index.vue new file mode 100644 index 00000000..64d6060a --- /dev/null +++ b/src/views/pqs/cockpit/setUp/index.vue @@ -0,0 +1,287 @@ + + + diff --git a/src/views/setting/dictionary/component/add.vue b/src/views/setting/dictionary/component/add.vue new file mode 100644 index 00000000..40682714 --- /dev/null +++ b/src/views/setting/dictionary/component/add.vue @@ -0,0 +1,113 @@ + + diff --git a/src/views/setting/dictionary/component/index.vue b/src/views/setting/dictionary/component/index.vue new file mode 100644 index 00000000..939432d2 --- /dev/null +++ b/src/views/setting/dictionary/component/index.vue @@ -0,0 +1,129 @@ + +