diff --git a/.env.development b/.env.development index 7dc61fc..84af96b 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,4 @@ VITE_BASE_URL=http://192.168.0.106:12080/admin-api +#VITE_BASE_URL=http://dev.ccwin-in.com:25202/api/admin-api VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 9375ec3..0aad051 100644 --- a/src/App.vue +++ b/src/App.vue @@ -51,29 +51,39 @@ }) } // #endif - uni.getPushClientId({ - success: (res) => { - console.log(res); - console.log(res.cid); - }, - fail(err) { - console.log(err) + + // #ifdef APP-PLUS + const notificationAuthorized = uni.getAppAuthorizeSetting().notificationAuthorized + if (notificationAuthorized == 'denied') { + uni.showModal({ + title: '提示', + content: '是否前往打开通知权限', + success: res => { + if (res.confirm) { + // this.openTongZhi() + } else if (res.cancel) { + } } }) - uni.onPushMessage((res)=>{ - console.log(res) - // uni.createPushMessage({ - // title: '自创标题', - // content: res.data, - // payload: {}, - // success: () => { - // console.log("自创推送成功") - // }, - // fail: () => { - // console.log("自创推送失败") - // } - // }) - }) + } + plus.push.addEventListener("click", function (data) { + // 0或者2是维修工单 + if(data.payload.status == 0 || data.payload.status == 2){ + uni.navigateTo({ + url: (`/pages/repairOrder/detail?type=${data.payload.type}&number=${data.payload.number}`) + }) + } + }, false); + uni.getPushClientId({ + success: (res) => { + uni.setStorageSync('cid',res.cid) + }, + fail(err) { + } + }) + uni.onPushMessage((res) => { + }) + // #endif if (getAccessToken()) { await store.GetPermissionInfo().then(res => { }).catch(() => { }) diff --git a/src/api/http.ts b/src/api/http.ts index 9aa2a75..30e8a39 100644 --- a/src/api/http.ts +++ b/src/api/http.ts @@ -103,7 +103,6 @@ instance.interceptors.response.use((v) => { } return Promise.reject(v) },error=>{ - console.log(error) uni.showToast({ title: '网络错误', icon: 'none' diff --git a/src/api/login.js b/src/api/login.js index cdae309..2e9bf50 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -1,7 +1,7 @@ import http from './http' // 登录方法 -export function login(username, password, captchaVerification, tenantName, rememberMe, code, uuid) { +export function login(username, password, captchaVerification, tenantName, rememberMe, code, uuid,cid) { const data = { username, password, @@ -10,6 +10,7 @@ export function login(username, password, captchaVerification, tenantName, remem rememberMe, code, uuid, + cid } return http.post('/system/auth/login', data) } diff --git a/src/api/repairOrder.js b/src/api/repairOrder.js index 5ec3d43..251c291 100644 --- a/src/api/repairOrder.js +++ b/src/api/repairOrder.js @@ -13,6 +13,10 @@ export function repairOrderUpdate(data) { export function repairOrderPage(params) { return http.get('/eam/device-maintenance-job-main/getAppPage',{params}) } +// 获取维修工单详情信息 +export function getDeviceRepairDetail(number) { + return http.get('eam/device-maintenance-job-main/getAppByNumber?number='+number) +} // 操作工单 export function orderClick(params) { return http.get('/eam/device-maintenance-job-main/orderClick',{params}) @@ -44,4 +48,5 @@ export function repairOrderList(params) { // 获取维修工单的报修信息 export function getDeviceRepairDetailsByNumber(params) { return http.get('/eam/device-repair-request/getDetailsByNumber',{params}) -} \ No newline at end of file +} + diff --git a/src/api/uploadHttp.ts b/src/api/uploadHttp.ts index d27dd10..2bf165d 100644 --- a/src/api/uploadHttp.ts +++ b/src/api/uploadHttp.ts @@ -58,7 +58,6 @@ upload.interceptors.request.use((config) => { }) } - console.log(11, headers) return { ...config, headers diff --git a/src/components/search/index.vue b/src/components/search/index.vue index 309ff32..90f8630 100644 --- a/src/components/search/index.vue +++ b/src/components/search/index.vue @@ -34,7 +34,6 @@ } }); function search() { - console.log( keyWord.value) emits('search', keyWord.value) } // 搜索 diff --git a/src/pages/device/index.vue b/src/pages/device/index.vue index 1e0931d..f8aa637 100644 --- a/src/pages/device/index.vue +++ b/src/pages/device/index.vue @@ -78,7 +78,6 @@ if (status.value == 'nomore') return; status.value = 'loading'; proxy.$modal.loading('加载中') - console.log('params.value',params.value) deviceApi.devicePage(params.value).then((res) => { proxy.$modal.closeLoading() if (res.data.list.length > 0) { diff --git a/src/pages/deviceReport/addForm.vue b/src/pages/deviceReport/addForm.vue index 14e3205..9464a16 100644 --- a/src/pages/deviceReport/addForm.vue +++ b/src/pages/deviceReport/addForm.vue @@ -138,7 +138,6 @@ type: type.value, flag:1 }).then((res) => { - console.log(res) if (!res.data) { msg.value = res.msg form.value.deviceName = '' @@ -150,7 +149,6 @@ form.value.factoryAreaName = res.data.factoryAreaName form.value.factoryAreaNumber = res.data.factoryAreaNumber }).catch((err) => { - console.log(err) form.value.deviceName = '' form.value.factoryAreaName = '' form.value.factoryAreaNumber = '' @@ -171,7 +169,6 @@ form.value.factoryAreaName = res.data.factoryAreaName form.value.factoryAreaNumber = res.data.factoryAreaNumber }).catch((err) => { - console.log(err) form.value.deviceName = '' form.value.factoryAreaName = '' form.value.factoryAreaNumber = '' diff --git a/src/pages/deviceReport/index.vue b/src/pages/deviceReport/index.vue index a334171..a42034e 100644 --- a/src/pages/deviceReport/index.vue +++ b/src/pages/deviceReport/index.vue @@ -117,10 +117,8 @@ longPressActions: { itemList: ['发送给朋友', '保存图片', '收藏'], success: function (data) { - console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); }, fail: function (err) { - // console.log(err.errMsg); } } }); @@ -137,7 +135,7 @@ }) } }) - onShow(() => { + onShow(async() => { params.value.pageNo = 1 list.value = [] status.value = 'loadmore' diff --git a/src/pages/deviceReport/myDeviceReport.vue b/src/pages/deviceReport/myDeviceReport.vue index 6a93083..1d88bbc 100644 --- a/src/pages/deviceReport/myDeviceReport.vue +++ b/src/pages/deviceReport/myDeviceReport.vue @@ -90,10 +90,8 @@ longPressActions: { itemList: ['发送给朋友', '保存图片', '收藏'], success: function (data) { - console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); }, fail: function (err) { - // console.log(err.errMsg); } } }); diff --git a/src/pages/login.vue b/src/pages/login.vue index 18faabd..9378ef4 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -55,7 +55,8 @@ captchaVerification: "", rememberMe: false, code: '1', - uuid: "APP" + uuid: "APP", + cid:uni.getStorageSync('cid') }) import { storeToRefs } from 'pinia' diff --git a/src/pages/overhaulOrder/addForm.vue b/src/pages/overhaulOrder/addForm.vue index 134413e..6d53198 100644 --- a/src/pages/overhaulOrder/addForm.vue +++ b/src/pages/overhaulOrder/addForm.vue @@ -272,7 +272,6 @@ form.value.factoryAreaName = res.data.factoryAreaName form.value.factoryAreaNumber = res.data.factoryAreaNumber }).catch((error) => { - console.log(error) msg.value = error.msg form.value.deviceName = '' form.value.factoryAreaName = '' @@ -282,7 +281,6 @@ moldApi.getMoldDetailsByNumber({ number: form.value.deviceNumber }).then((res) => { - console.log(22,res) if (!res.data) { msg.value = res.msg form.value.deviceName = '' @@ -294,7 +292,6 @@ form.value.factoryAreaName = res.data.factoryAreaName form.value.factoryAreaNumber = res.data.factoryAreaNumber }).catch((error) => { - console.log(error) msg.value = error.msg form.value.deviceName = '' form.value.factoryAreaName = '' diff --git a/src/pages/overhaulOrder/addServiceRecord.vue b/src/pages/overhaulOrder/addServiceRecord.vue index 70122b7..597c228 100644 --- a/src/pages/overhaulOrder/addServiceRecord.vue +++ b/src/pages/overhaulOrder/addServiceRecord.vue @@ -464,7 +464,6 @@ } // 日期模式点击确定之后 function chooseDatetime(e) { - console.log(e) let array1 = [] let array2 = [] if (formatValue.value.indexOf('YYYY') > -1) { @@ -488,7 +487,6 @@ let str = array1.join('-') + ' ' + array2.join(':') formatDate.value = str form.value[field.value] = e.timestamp*1000 - console.log(form.value[field.value] ) } onLoad(async(option) => { if (option.type) type.value = option.type; diff --git a/src/pages/repairOrder/detail.vue b/src/pages/repairOrder/detail.vue index 72b9ac7..bcc277d 100644 --- a/src/pages/repairOrder/detail.vue +++ b/src/pages/repairOrder/detail.vue @@ -2,7 +2,8 @@ - + + 维修工单 转办 @@ -81,6 +82,8 @@ {{data.verifyer}} + +
@@ -223,6 +226,7 @@ +