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 @@