From 53caddfa1e964dd5a232de7f11ec294acfc611cd Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Mon, 29 Jan 2024 18:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quality.js | 20 +++- src/assets/back.png | Bin 0 -> 6280 bytes src/assets/record.png | Bin 0 -> 6389 bytes src/router/index.js | 7 +- src/utils/auth.js | 12 +++ src/utils/request.js | 3 +- src/utils/time.js | 51 ++++++++++ src/views/HomeView.vue | 17 +++- src/views/Login.vue | 96 ++++++++++++++++++- src/views/Quality.vue | 57 ++++++++---- src/views/Scrap.vue | 201 +++++++++++++++++++++++++++++++++++----- src/views/ScrapList.vue | 153 ++++++++++++++++++++++++++++++ 12 files changed, 567 insertions(+), 50 deletions(-) create mode 100644 src/assets/back.png create mode 100644 src/assets/record.png create mode 100644 src/utils/time.js create mode 100644 src/views/ScrapList.vue diff --git a/src/api/quality.js b/src/api/quality.js index d8e3ef8..c24d4c9 100644 --- a/src/api/quality.js +++ b/src/api/quality.js @@ -1,7 +1,7 @@ /* * @Author: Do not edit * @Date: 2023-11-20 11:05:00 - * @LastEditTime: 2024-01-10 11:20:45 + * @LastEditTime: 2024-01-29 16:51:45 * @LastEditors: DY * @Description: 质量和报废 */ @@ -69,3 +69,21 @@ export function createInspection (data) { data: data }) } + +// 获得所有报废日志列表 +export function scrapLogList (data) { + return request({ + url: '/base/quality-scrap-log/page', + method: 'get', + params: data + }) +} + +// 获得安灯权限 +export function authList (data) { + return request({ + url: '/base/quality-inspection-box-btn-auth/get', + method: 'get', + params: data + }) +} diff --git a/src/assets/back.png b/src/assets/back.png new file mode 100644 index 0000000000000000000000000000000000000000..98bba34536a71909cc99fc6c4686df597e766e2d GIT binary patch literal 6280 zcmV;37Py2LP(}3R&bf~&6HcP-Iq&52*x}^>E(YOQ%-98B z3xMf%GZz6ICBi;19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Riege)=A1@?E?S=q^fP_VXBmNZ}b*z>jpXqYB>aSZdlNP`Y-`6K#{Nn zEY3Lxc6qK73IwbiLzD~bfB=@)0kUkpOG;(6O-S^uph^J<9D*oOUgt3~PdH|BhOvJ? z%Jv5CfvB>Gm#Z+xa}UuI}6)f z=(H;by}A|P0=(K*#(@KflI<)jKm}rWe{z}4f!Xl9NIHW-4z_qzo0r?SZlI%;DtqK} z`^6WnhJjVE@|lE#0xpm%xA+@@TyALZ^8#KDaE5{XC_|L@<=#vEK$cY*T6-dI8C;xL zm77|Z)!I?4JPD&#y>Rm+R&05A7=Uy?f{j-{&67+&i1MD?cd6KSRIDuat9k?0-WDE{ zLdyrK3U(M=`K$me&n4y#Q)ls6u0Yw^aZ#RrBY&qqMEPWM?hfAhA*wWd)IOvB#{lKK zhZo0M6B3FK`rH93hmAa$^loi{qae!X!)~)KpC79#%T21Jgi%0?&qsj``Y7F+y&v4F z-_>uwRXgWOtO9XdAjhiEekWH2?jXR&2DLiCaYNiRg$@Ey74D$FFH}9svZH>8aaelf ycZ}L$Gd|xa;Hqsp9sqmWGS(Pc^+bP__xpch@8O>f@lr4V0000p(UD literal 0 HcmV?d00001 diff --git a/src/assets/record.png b/src/assets/record.png new file mode 100644 index 0000000000000000000000000000000000000000..87085a9240d72c5f4e2a3e78ad15e468970fe0db GIT binary patch literal 6389 zcmVPy2uSrBfRCr$9oei)gRdvVz=ib}hGw)+}AMEbqQ*Z+qK_E(^f>=l@iBS_ZDhg`+ z2$hs6@guQPMbu<#HL*ygjEY#Xk|HsQ3Wzak5)(~Dw1fpsPyrWo#T5jB3i>q=l1kW&%Bv=Gw;m#;7tSC3!+@$)8Bz-!Qo>JJZH=xI}S&{H=*&?dp?41_xhgAf;(2A{UFK(UAza$ z!-sGcGp-;&Zzjy**bF!#Tyy+(TzS)Or2W2goN&hibP&j($}7^-Jtx-_;hB#I$nNi8 z#&;B@m)>(tGBA0K1MG%@4uZL7&mOw&(C+iW_#%K~o(Pzw?>qv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ONZit(v(0(9>h1>7%3stXW*|mO% zaaelI?^tVx&G>wyfQLP&#{*#Zxr{Z24tt^hpZEJed;smAUu%2*00000NkvXXu0mjf D1$Sgc literal 0 HcmV?d00001 diff --git a/src/router/index.js b/src/router/index.js index b1b748e..c0642b9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ /* * @Author: Do not edit * @Date: 2023-12-27 16:41:40 - * @LastEditTime: 2024-01-09 13:58:18 + * @LastEditTime: 2024-01-29 10:04:05 * @LastEditors: DY * @Description: */ @@ -43,6 +43,11 @@ const routes = [ path: '/scrap', name: 'scrap', component: () => import('../views/Scrap.vue') + }, + { + path: '/list', + name: 'scrapList', + component: () => import('../views/ScrapList.vue') } ] diff --git a/src/utils/auth.js b/src/utils/auth.js index 9314c9e..69326d0 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,3 +1,10 @@ +/* + * @Author: Do not edit + * @Date: 2024-01-09 09:55:17 + * @LastEditTime: 2024-01-29 16:56:22 + * @LastEditors: DY + * @Description: cookie + */ // ========== 租户相关 ========== @@ -21,6 +28,10 @@ export function getAccessToken () { return localStorage.getItem(AccessTokenKey) } +export function getUserId () { + return localStorage.getItem('UserId') +} + export function getRefreshToken () { return localStorage.getItem(RefreshTokenKey) } @@ -28,6 +39,7 @@ export function getRefreshToken () { export function setToken (token) { localStorage.setItem(AccessTokenKey, token.accessToken) localStorage.setItem(RefreshTokenKey, token.refreshToken) + localStorage.setItem('UserId', token.userId) } export function removeToken () { diff --git a/src/utils/request.js b/src/utils/request.js index 9c2d1bf..3b562dc 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,7 +1,7 @@ /* * @Author: Do not edit * @Date: 2023-11-20 11:02:29 - * @LastEditTime: 2024-01-11 10:34:34 + * @LastEditTime: 2024-01-29 16:48:54 * @LastEditors: DY * @Description: */ @@ -13,6 +13,7 @@ import { MessageBox } from 'element-ui' axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' const service = axios.create({ + // baseURL: 'http://192.168.1.20:48080', // baseURL: 'http://192.168.1.78:48082/admin-api', baseURL: 'http://192.168.0.33:48082/admin-api', timeout: 30000, diff --git a/src/utils/time.js b/src/utils/time.js new file mode 100644 index 0000000..79b6c6b --- /dev/null +++ b/src/utils/time.js @@ -0,0 +1,51 @@ +/* + * @Author: Do not edit + * @Date: 2024-01-29 15:33:10 + * @LastEditTime: 2024-01-29 15:39:34 + * @LastEditors: DY + * @Description: + */ +// 日期格式化(通用) +export function parseTime (time, pattern) { + if (arguments.length === 0 || !time) { + return null + } + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + time = parseInt(time) + } else if (typeof time === 'string') { + // const reg1 = new RegExp(/-/gm) + // const reg2 = new RegExp(/\.\d{3}/gm) + // time = time.replace(reg1, '/').replace('T', ' ').replace(reg2, '') + } + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const timeStr = format.replace(/{([ymdhisa])+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { + return ['日', '一', '二', '三', '四', '五', '六'][value] + } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return timeStr +} diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index b85465a..3b84f51 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,12 +1,18 @@