From 57c5fcfd0a0120afab58a7a23023a6383c58d50b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 26 Jan 2024 17:01:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=B7=A5=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=8A=A5=E4=BF=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 6 +- api/device.js | 42 +++ api/dict.js | 23 ++ api/index.js | 9 + api/login.js | 16 +- api/repairOrder.js | 36 +++ components/form/index.vue | 9 +- config.js | 2 +- manifest.json | 23 +- pages.json | 111 +++----- pages/deviceReport/addForm.vue | 226 ++++++++++++++++ pages/deviceReport/index.vue | 242 +++++++++++++++++ pages/deviceReport/myDeviceReport.vue | 230 ++++++++++++++++ pages/index.vue | 98 ++++--- pages/login.vue | 33 +-- pages/mine/index.vue | 88 ++++--- pages/repairOrder/addForm.vue | 349 +++++++++++++++++++++++++ pages/repairOrder/detail.vue | 363 ++++++++++++++++++++++++++ pages/repairOrder/index.vue | 256 ++++++++++++++++++ pages/repairOrder/myDeviceReport.vue | 230 ++++++++++++++++ pages/repairOrder/screen.vue | 261 ++++++++++++++++++ pages/workOrderList/addForm.vue | 107 ++++++-- pages/workOrderList/index.vue | 4 +- permission.js | 46 ++-- plugins/index.js | 3 + plugins/modal.js | 1 - plugins/time.js | 19 ++ static/scss/colorui.css | 2 +- store/getters.js | 2 +- store/modules/user.js | 16 +- utils/constant.js | 2 +- utils/storage.js | 2 +- 32 files changed, 2630 insertions(+), 227 deletions(-) create mode 100644 api/device.js create mode 100644 api/dict.js create mode 100644 api/index.js create mode 100644 api/repairOrder.js create mode 100644 pages/deviceReport/addForm.vue create mode 100644 pages/deviceReport/index.vue create mode 100644 pages/deviceReport/myDeviceReport.vue create mode 100644 pages/repairOrder/addForm.vue create mode 100644 pages/repairOrder/detail.vue create mode 100644 pages/repairOrder/index.vue create mode 100644 pages/repairOrder/myDeviceReport.vue create mode 100644 pages/repairOrder/screen.vue create mode 100644 plugins/time.js diff --git a/App.vue b/App.vue index c5e0fb1..8d202ac 100644 --- a/App.vue +++ b/App.vue @@ -21,9 +21,9 @@ this.globalData.config = config }, checkLogin() { - if (!getAccessToken()) { - this.$tab.reLaunch('/pages/login') - } + // if (!getAccessToken()) { + // this.$tab.reLaunch('/pages/login') + // } } } } diff --git a/api/device.js b/api/device.js new file mode 100644 index 0000000..30482a4 --- /dev/null +++ b/api/device.js @@ -0,0 +1,42 @@ +import request from '@/utils/request' + +// 根据设备/模具号查询信息 +export function getDetailsByNumber(params) { + return request({ + url: '/eam/device-accounts/getDetailsByNumber', + 'method': 'GET', + params + }) +} +// 添加报修 +export function deviceRepairCreate(data) { + return request({ + url: '/eam/device-repair/create', + 'method': 'POST', + data + }) +} +// 报修列表 +export function deviceRepairPage(params) { + return request({ + url: '/eam/device-repair/getAppPage', + 'method': 'GET', + params + }) +} + +// 报修列表 +export function rejected(id) { + return request({ + url: '/eam/device-repair/rejected?id='+id, + 'method': 'DELETE', + }) +} +// 设备列表 +export function deviceList(params) { + return request({ + url: '/eam/device-accounts/selectData', + 'method': 'GET', + params + }) +} diff --git a/api/dict.js b/api/dict.js new file mode 100644 index 0000000..47116d2 --- /dev/null +++ b/api/dict.js @@ -0,0 +1,23 @@ +import request from '@/utils/request' + +// 获取字典 +function getDictList(type) { + return request({ + url: '/eam/device-maintenance-main/getDictList?type=' + type, + 'method': 'GET', + }) +} +export async function getDict(type) { + let data =[] + await getDictList(type).then((res) => { + if (res.code == 0) { + data = res.data.map(item=>{ + return { + label:item.label, + value:item.code, + } + }) + } else {} + }).catch((err) => {}) + return data +} \ No newline at end of file diff --git a/api/index.js b/api/index.js new file mode 100644 index 0000000..2ed8dfa --- /dev/null +++ b/api/index.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' +// 获取首页数量信息 +export function getCounts() { + return request({ + url: '/eam/device-accounts/getCounts', + 'method': 'GET' + }) +} + diff --git a/api/login.js b/api/login.js index b79fd07..4c9663e 100644 --- a/api/login.js +++ b/api/login.js @@ -1,11 +1,15 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, captchaVerification) { +export function login(username, password, captchaVerification,tenantName,rememberMe,code,uuid) { const data = { username, password, - captchaVerification + captchaVerification, + tenantName, + rememberMe, + code, + uuid, } return request({ url: '/system/auth/login', @@ -19,12 +23,18 @@ export function login(username, password, captchaVerification) { // 获取用户详细信息 export function getInfo() { + return request({ + url: '/system/user/profile/get', + 'method': 'GET' + }) +} +// 获取权限 +export function getPermissionInfo() { return request({ url: '/system/auth/get-permission-info', 'method': 'GET' }) } - // 退出方法 export function logout() { return request({ diff --git a/api/repairOrder.js b/api/repairOrder.js new file mode 100644 index 0000000..9c926bc --- /dev/null +++ b/api/repairOrder.js @@ -0,0 +1,36 @@ +import request from '@/utils/request' + + +// 添加工单 +export function repairOrderCreate(data) { + return request({ + url: '/eam/device-maintenance-main/create', + 'method': 'POST', + data + }) +} +// 编辑工单 +export function repairOrderUpdate(data) { + return request({ + url: '/eam/device-maintenance-main/update', + 'method': 'PUT', + data + }) +} +// 报修列表 +export function repairOrderPage(params) { + return request({ + url: '/eam/device-maintenance-main/getAppPage', + 'method': 'GET', + params + }) +} +// 操作工单 +export function orderClick(params) { + return request({ + url: '/eam/device-maintenance-main/orderClick', + 'method': 'GET', + params + }) +} + diff --git a/components/form/index.vue b/components/form/index.vue index 0c03d7d..e83165f 100644 --- a/components/form/index.vue +++ b/components/form/index.vue @@ -53,6 +53,7 @@ :trim='item.trim' :show-confirmbar='item.showConfirmbar' :adjust-position='item.adjustPosition' + @blur="blur($event,item.field)" v-if="item.type == 'text'||item.type == 'number'||item.type == 'idcard'||item.type == 'digit'||item.type == 'tel'||item.type == 'safePassword'||item.type == 'nickname'" /> @@ -249,7 +250,7 @@