diff --git a/api/check.js b/api/check.js index 417f242..719e90d 100644 --- a/api/check.js +++ b/api/check.js @@ -1,13 +1,64 @@ import fetch from '@/common/fetchs.js'; import useNetWork from '@/common/useNetWork.js'; -const visitReason = 'http://111.198.10.15:11406/device/list-page' -const baseConfig = 'http://111.198.10.15:11406/sys/config/baseConfig' -const Login = 'http://111.198.10.15:11406/sys/user/login' -const Alarm = 'http://111.198.10.15:11406/alarm/list' +const visitReason = 'https://smartwell.gd.smartlog.work/device/list-page' +const baseConfig = 'https://smartwell.gd.smartlog.work/sys/config/baseConfig' +const Login = 'https://smartwell.gd.smartlog.work/sys/user/login' +const Alarm = 'https://smartwell.gd.smartlog.work/alarm/list' +const JobInfo = 'https://smartwell.gd.smartlog.work/job/info' +const DeviceDetail = 'https://smartwell.gd.smartlog.work/overview/deviceDetail' +const WellInfo = 'https://smartwell.gd.smartlog.work/well/info' /** + * 获取井口详情 + * @param {*} + */ +export function getWellInfo(params) { + useNetWork(); + return fetch.get(WellInfo,params).then(res => res); +} + +/** + * 获取设备详情 + * @param {*} + */ +export function getDeviceDetail(params) { + useNetWork(); + return fetch.get(DeviceDetail,params).then(res => res); +} + +/** + * 批量消警 + * @param {*} + */ +export function getBatchCancel(data) { + useNetWork(); + const BatchCancel = `https://smartwell.gd.smartlog.work/alarm/batchCancel?keywords=${data.keywords}&alarmType=${data.alarmType} + &alarmContent=${data.alarmContent}&beginTime=${data.beginTime}&endTime=${data.endTime}&jobStatus=${data.jobStatus}&handleMessage=${data.handleMessage}` + return fetch.post(BatchCancel).then(res => res); +} + +/** + * 获取宵禁时间 + * @param {*} + */ +export function getJobInfo(params) { + useNetWork(); + return fetch.get(JobInfo,params).then(res => res); +} + +/** + * 取消报警 + * @param {*} + */ +export function getCancelAlarm(data) { + useNetWork(); + const CancelAlarm = `https://smartwell.gd.smartlog.work/alarm/cancelAlarm?id=${data.id}&jobStatus=${data.jobStatus}&handleMessage=${data.handleMessage}` + return fetch.post(CancelAlarm).then(res => res); +} + +/** * 获取到报警列表 * @param {*} */ diff --git a/api/check.js b/api/check.js index 417f242..719e90d 100644 --- a/api/check.js +++ b/api/check.js @@ -1,13 +1,64 @@ import fetch from '@/common/fetchs.js'; import useNetWork from '@/common/useNetWork.js'; -const visitReason = 'http://111.198.10.15:11406/device/list-page' -const baseConfig = 'http://111.198.10.15:11406/sys/config/baseConfig' -const Login = 'http://111.198.10.15:11406/sys/user/login' -const Alarm = 'http://111.198.10.15:11406/alarm/list' +const visitReason = 'https://smartwell.gd.smartlog.work/device/list-page' +const baseConfig = 'https://smartwell.gd.smartlog.work/sys/config/baseConfig' +const Login = 'https://smartwell.gd.smartlog.work/sys/user/login' +const Alarm = 'https://smartwell.gd.smartlog.work/alarm/list' +const JobInfo = 'https://smartwell.gd.smartlog.work/job/info' +const DeviceDetail = 'https://smartwell.gd.smartlog.work/overview/deviceDetail' +const WellInfo = 'https://smartwell.gd.smartlog.work/well/info' /** + * 获取井口详情 + * @param {*} + */ +export function getWellInfo(params) { + useNetWork(); + return fetch.get(WellInfo,params).then(res => res); +} + +/** + * 获取设备详情 + * @param {*} + */ +export function getDeviceDetail(params) { + useNetWork(); + return fetch.get(DeviceDetail,params).then(res => res); +} + +/** + * 批量消警 + * @param {*} + */ +export function getBatchCancel(data) { + useNetWork(); + const BatchCancel = `https://smartwell.gd.smartlog.work/alarm/batchCancel?keywords=${data.keywords}&alarmType=${data.alarmType} + &alarmContent=${data.alarmContent}&beginTime=${data.beginTime}&endTime=${data.endTime}&jobStatus=${data.jobStatus}&handleMessage=${data.handleMessage}` + return fetch.post(BatchCancel).then(res => res); +} + +/** + * 获取宵禁时间 + * @param {*} + */ +export function getJobInfo(params) { + useNetWork(); + return fetch.get(JobInfo,params).then(res => res); +} + +/** + * 取消报警 + * @param {*} + */ +export function getCancelAlarm(data) { + useNetWork(); + const CancelAlarm = `https://smartwell.gd.smartlog.work/alarm/cancelAlarm?id=${data.id}&jobStatus=${data.jobStatus}&handleMessage=${data.handleMessage}` + return fetch.post(CancelAlarm).then(res => res); +} + +/** * 获取到报警列表 * @param {*} */ diff --git a/pages/check/check.vue b/pages/check/check.vue index 07237ef..1fc2909 100644 --- a/pages/check/check.vue +++ b/pages/check/check.vue @@ -8,12 +8,12 @@ v-model="params.keywords" @change="inputChage" > - + - + {{item.deviceTypeName}} ({{item.devcode}}) @@ -27,8 +27,8 @@ - - + + @@ -87,6 +87,9 @@ this.getList() }, navigateCheck(index,type){ // 跳转 + if( typeof(type) === 'object' ) { + uni.setStorageSync('checkrow',type) + } if(index === '1') { wx.navigateTo({ url: '/pages/reportList/reportList', diff --git a/api/check.js b/api/check.js index 417f242..719e90d 100644 --- a/api/check.js +++ b/api/check.js @@ -1,13 +1,64 @@ import fetch from '@/common/fetchs.js'; import useNetWork from '@/common/useNetWork.js'; -const visitReason = 'http://111.198.10.15:11406/device/list-page' -const baseConfig = 'http://111.198.10.15:11406/sys/config/baseConfig' -const Login = 'http://111.198.10.15:11406/sys/user/login' -const Alarm = 'http://111.198.10.15:11406/alarm/list' +const visitReason = 'https://smartwell.gd.smartlog.work/device/list-page' +const baseConfig = 'https://smartwell.gd.smartlog.work/sys/config/baseConfig' +const Login = 'https://smartwell.gd.smartlog.work/sys/user/login' +const Alarm = 'https://smartwell.gd.smartlog.work/alarm/list' +const JobInfo = 'https://smartwell.gd.smartlog.work/job/info' +const DeviceDetail = 'https://smartwell.gd.smartlog.work/overview/deviceDetail' +const WellInfo = 'https://smartwell.gd.smartlog.work/well/info' /** + * 获取井口详情 + * @param {*} + */ +export function getWellInfo(params) { + useNetWork(); + return fetch.get(WellInfo,params).then(res => res); +} + +/** + * 获取设备详情 + * @param {*} + */ +export function getDeviceDetail(params) { + useNetWork(); + return fetch.get(DeviceDetail,params).then(res => res); +} + +/** + * 批量消警 + * @param {*} + */ +export function getBatchCancel(data) { + useNetWork(); + const BatchCancel = `https://smartwell.gd.smartlog.work/alarm/batchCancel?keywords=${data.keywords}&alarmType=${data.alarmType} + &alarmContent=${data.alarmContent}&beginTime=${data.beginTime}&endTime=${data.endTime}&jobStatus=${data.jobStatus}&handleMessage=${data.handleMessage}` + return fetch.post(BatchCancel).then(res => res); +} + +/** + * 获取宵禁时间 + * @param {*} + */ +export function getJobInfo(params) { + useNetWork(); + return fetch.get(JobInfo,params).then(res => res); +} + +/** + * 取消报警 + * @param {*} + */ +export function getCancelAlarm(data) { + useNetWork(); + const CancelAlarm = `https://smartwell.gd.smartlog.work/alarm/cancelAlarm?id=${data.id}&jobStatus=${data.jobStatus}&handleMessage=${data.handleMessage}` + return fetch.post(CancelAlarm).then(res => res); +} + +/** * 获取到报警列表 * @param {*} */ diff --git a/pages/check/check.vue b/pages/check/check.vue index 07237ef..1fc2909 100644 --- a/pages/check/check.vue +++ b/pages/check/check.vue @@ -8,12 +8,12 @@ v-model="params.keywords" @change="inputChage" > - + - + {{item.deviceTypeName}} ({{item.devcode}}) @@ -27,8 +27,8 @@ - - + + @@ -87,6 +87,9 @@ this.getList() }, navigateCheck(index,type){ // 跳转 + if( typeof(type) === 'object' ) { + uni.setStorageSync('checkrow',type) + } if(index === '1') { wx.navigateTo({ url: '/pages/reportList/reportList', diff --git a/pages/checkTable/checkTable.vue b/pages/checkTable/checkTable.vue index db45e8d..242bb23 100644 --- a/pages/checkTable/checkTable.vue +++ b/pages/checkTable/checkTable.vue @@ -6,7 +6,7 @@ }} - + - + - + - + - + - +