diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}} -
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/page/jobSearch/searchPage.vue b/src/page/jobSearch/searchPage.vue new file mode 100644 index 0000000..d54d5c4 --- /dev/null +++ b/src/page/jobSearch/searchPage.vue @@ -0,0 +1,517 @@ + + + + + + diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/page/jobSearch/searchPage.vue b/src/page/jobSearch/searchPage.vue new file mode 100644 index 0000000..d54d5c4 --- /dev/null +++ b/src/page/jobSearch/searchPage.vue @@ -0,0 +1,517 @@ + + + + + + diff --git a/src/page/layout/components/TabBottom.vue b/src/page/layout/components/TabBottom.vue index 503bda1..4457ed5 100644 --- a/src/page/layout/components/TabBottom.vue +++ b/src/page/layout/components/TabBottom.vue @@ -5,9 +5,9 @@ 首页 - - - 闸井 + + + 搜索 @@ -65,6 +65,9 @@ goJob(){ this.$router.push({name: 'job'}) }, + goSearch(){ + this.$router.push({name: 'jobSearch'}) + }, goMessage(){ this.$router.push({name: 'index'}) }, diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/page/jobSearch/searchPage.vue b/src/page/jobSearch/searchPage.vue new file mode 100644 index 0000000..d54d5c4 --- /dev/null +++ b/src/page/jobSearch/searchPage.vue @@ -0,0 +1,517 @@ + + + + + + diff --git a/src/page/layout/components/TabBottom.vue b/src/page/layout/components/TabBottom.vue index 503bda1..4457ed5 100644 --- a/src/page/layout/components/TabBottom.vue +++ b/src/page/layout/components/TabBottom.vue @@ -5,9 +5,9 @@ 首页 - - - 闸井 + + + 搜索 @@ -65,6 +65,9 @@ goJob(){ this.$router.push({name: 'job'}) }, + goSearch(){ + this.$router.push({name: 'jobSearch'}) + }, goMessage(){ this.$router.push({name: 'index'}) }, diff --git a/src/page/layout/index.vue b/src/page/layout/index.vue index d67e69e..6fd544e 100644 --- a/src/page/layout/index.vue +++ b/src/page/layout/index.vue @@ -18,6 +18,12 @@
+
+
+
超时工单
+
+
+
布防撤防
@@ -75,6 +81,7 @@ return { iconWell: require('@/assets/icons/icon-well.png'), iconAlarm: require('@/assets/icons/icon-alarm.png'), + iconOvertime: require('@/assets/icons/icon-overtime.png'), iconGuard: require('@/assets/icons/icon-guard.png'), wellCount:[ { @@ -231,8 +238,10 @@ }else if(name=='已完成'){ this.$router.push({name: 'job', query:{tab:'4'}}) } + }, + openOvertime(){ + this.$router.push({name: 'jobOvertime', query:{tab:'1'}}) } - } } @@ -242,11 +251,11 @@ width 100vh .index-func-div{ height 15vh - padding 3vh 12.5vw + padding 3vh 6vw background-color #fdfdfd border-bottom 1px solid #e8e8e8 .index-func-btn-div{ - width 25vw + width 22vw float left text-align center .btn-icon{ diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/page/jobSearch/searchPage.vue b/src/page/jobSearch/searchPage.vue new file mode 100644 index 0000000..d54d5c4 --- /dev/null +++ b/src/page/jobSearch/searchPage.vue @@ -0,0 +1,517 @@ + + + + + + diff --git a/src/page/layout/components/TabBottom.vue b/src/page/layout/components/TabBottom.vue index 503bda1..4457ed5 100644 --- a/src/page/layout/components/TabBottom.vue +++ b/src/page/layout/components/TabBottom.vue @@ -5,9 +5,9 @@ 首页 - - - 闸井 + + + 搜索 @@ -65,6 +65,9 @@ goJob(){ this.$router.push({name: 'job'}) }, + goSearch(){ + this.$router.push({name: 'jobSearch'}) + }, goMessage(){ this.$router.push({name: 'index'}) }, diff --git a/src/page/layout/index.vue b/src/page/layout/index.vue index d67e69e..6fd544e 100644 --- a/src/page/layout/index.vue +++ b/src/page/layout/index.vue @@ -18,6 +18,12 @@
+
+
+
超时工单
+
+
+
布防撤防
@@ -75,6 +81,7 @@ return { iconWell: require('@/assets/icons/icon-well.png'), iconAlarm: require('@/assets/icons/icon-alarm.png'), + iconOvertime: require('@/assets/icons/icon-overtime.png'), iconGuard: require('@/assets/icons/icon-guard.png'), wellCount:[ { @@ -231,8 +238,10 @@ }else if(name=='已完成'){ this.$router.push({name: 'job', query:{tab:'4'}}) } + }, + openOvertime(){ + this.$router.push({name: 'jobOvertime', query:{tab:'1'}}) } - } } @@ -242,11 +251,11 @@ width 100vh .index-func-div{ height 15vh - padding 3vh 12.5vw + padding 3vh 6vw background-color #fdfdfd border-bottom 1px solid #e8e8e8 .index-func-btn-div{ - width 25vw + width 22vw float left text-align center .btn-icon{ diff --git a/src/router/modules/router.js b/src/router/modules/router.js index 637f198..4e042df 100644 --- a/src/router/modules/router.js +++ b/src/router/modules/router.js @@ -64,11 +64,32 @@ } }, { + path:'/jobOvertime', + name: 'jobOvertime', + component: () => import('@/page/overtimeJob/OvertimeJobManage'), + meta:{ + keepAlive:true + } + }, + { path:'/jobDetail/:id', name: 'jobDetail', component: () => import('@/page/jobManage/modules/JobDetail') }, { + path:'/jobSearch', + name: 'jobSearch', + component: () => import('@/page/jobSearch/searchPage'), + }, + { + path:'/searchList', + name: 'searchList', + component: () => import('@/page/jobSearch/searchList'), + meta:{ + keepAlive:true + } + }, + { path:'/mine', name: 'mine', component: () => import('@/page/mine/index') diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/page/jobSearch/searchPage.vue b/src/page/jobSearch/searchPage.vue new file mode 100644 index 0000000..d54d5c4 --- /dev/null +++ b/src/page/jobSearch/searchPage.vue @@ -0,0 +1,517 @@ + + + + + + diff --git a/src/page/layout/components/TabBottom.vue b/src/page/layout/components/TabBottom.vue index 503bda1..4457ed5 100644 --- a/src/page/layout/components/TabBottom.vue +++ b/src/page/layout/components/TabBottom.vue @@ -5,9 +5,9 @@ 首页 - - - 闸井 + + + 搜索 @@ -65,6 +65,9 @@ goJob(){ this.$router.push({name: 'job'}) }, + goSearch(){ + this.$router.push({name: 'jobSearch'}) + }, goMessage(){ this.$router.push({name: 'index'}) }, diff --git a/src/page/layout/index.vue b/src/page/layout/index.vue index d67e69e..6fd544e 100644 --- a/src/page/layout/index.vue +++ b/src/page/layout/index.vue @@ -18,6 +18,12 @@
+
+
+
超时工单
+
+
+
布防撤防
@@ -75,6 +81,7 @@ return { iconWell: require('@/assets/icons/icon-well.png'), iconAlarm: require('@/assets/icons/icon-alarm.png'), + iconOvertime: require('@/assets/icons/icon-overtime.png'), iconGuard: require('@/assets/icons/icon-guard.png'), wellCount:[ { @@ -231,8 +238,10 @@ }else if(name=='已完成'){ this.$router.push({name: 'job', query:{tab:'4'}}) } + }, + openOvertime(){ + this.$router.push({name: 'jobOvertime', query:{tab:'1'}}) } - } } @@ -242,11 +251,11 @@ width 100vh .index-func-div{ height 15vh - padding 3vh 12.5vw + padding 3vh 6vw background-color #fdfdfd border-bottom 1px solid #e8e8e8 .index-func-btn-div{ - width 25vw + width 22vw float left text-align center .btn-icon{ diff --git a/src/router/modules/router.js b/src/router/modules/router.js index 637f198..4e042df 100644 --- a/src/router/modules/router.js +++ b/src/router/modules/router.js @@ -64,11 +64,32 @@ } }, { + path:'/jobOvertime', + name: 'jobOvertime', + component: () => import('@/page/overtimeJob/OvertimeJobManage'), + meta:{ + keepAlive:true + } + }, + { path:'/jobDetail/:id', name: 'jobDetail', component: () => import('@/page/jobManage/modules/JobDetail') }, { + path:'/jobSearch', + name: 'jobSearch', + component: () => import('@/page/jobSearch/searchPage'), + }, + { + path:'/searchList', + name: 'searchList', + component: () => import('@/page/jobSearch/searchList'), + meta:{ + keepAlive:true + } + }, + { path:'/mine', name: 'mine', component: () => import('@/page/mine/index') diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js new file mode 100644 index 0000000..2e08ec4 --- /dev/null +++ b/src/utils/dateutils.js @@ -0,0 +1,54 @@ +// 获取当天0点时间 +export function getDayTime(nowTime) { + const nowTimeDate = new Date(nowTime) + nowTimeDate.setHours(0, 0, 0, 0) + return new Date(nowTimeDate) +} + +export function getToday(fmt) { // 默认显示今天 + return new Date().Format(fmt) +} + +export function getYesterDay() { // 默认显示昨天 + const ct_month = new Date() + ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24) + return ct_month +} + +export function getLastWeek() { // 默认显示上周 + const ct_month = new Date() + ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24 * 7) + return ct_month +} +export function getLastMonth() { // 默认显示上个月 + const ct_month = new Date() + ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24 * 30) + return ct_month +} + +export function formatDate(date,fmt='yyyy-MM-dd hh:mm:ss'){ + return date.Format(fmt) +} + +// 对Date的扩展,将 Date 转化为指定格式的String +// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, +// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) +// 例子: +// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 +// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 +Date.prototype.Format = function(fmt) { // author: meizz + var o = { + 'M+': this.getMonth() + 1, // 月份 + 'd+': this.getDate(), // 日 + 'h+': this.getHours(), // 小时 + 'm+': this.getMinutes(), // 分 + 's+': this.getSeconds(), // 秒 + 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度 + 'S': this.getMilliseconds() // 毫秒 + } + if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) } + for (var k in o) { + if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))) } + } + return fmt +} diff --git a/config/dev.env.js b/config/dev.env.js index df0ed63..e38ab3a 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -5,5 +5,5 @@ module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://119.254.103.80:14537"', - // BASE_API: '"http://192.168.0.225:8083"', + // BASE_API: '"http://192.168.0.166:14537"', }) diff --git a/config/index.js b/config/index.js index 88422c3..c39d894 100644 --- a/config/index.js +++ b/config/index.js @@ -14,7 +14,7 @@ // Various Dev Server settings host: '0.0.0.0', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, @@ -43,7 +43,7 @@ // Paths assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', - assetsPublicPath: './', + assetsPublicPath: '/smartwell_app', //ori: ./ /** * Source Maps diff --git a/config/prod.env.js b/config/prod.env.js index 3327c7d..af31832 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { NODE_ENV: '"production"', - // BASE_API: '"http://119.254.103.80:14536"', - BASE_API: '"http://106.74.146.218:2031"', + BASE_API: '"http://119.254.103.80:14537"', + // BASE_API: '"http://106.74.146.218:2031"', } diff --git a/src/api/job.js b/src/api/job.js index 7f55c0c..c02fdd5 100644 --- a/src/api/job.js +++ b/src/api/job.js @@ -2,6 +2,27 @@ * 告警工单管理接口 */ import request from '@/utils/request' + +// 查询工单状态 +export function getJobStatus(params) { + return request({ + url: 'dict/code/jobStatus', + method: 'get', + params + }) +} + +// 告警内容列表 +export function getAlarmContentType(alarmType) { + return request({ + url: 'alarm/contentType', + method: 'get', + params: { + alarmType: alarmType + } + }) +} + // 告警工单查询 export function getJobList(params) { return request({ @@ -11,6 +32,33 @@ }) } +// 全部工单查询接口 +export function getJobSearchList(params) { + return request({ + url: 'job/searchList', + method: 'get', + params + }) +} + +// 超时未接收工单查询 +export function getOvertimeGetList(params) { + return request({ + url: 'job/overtimeGetList', + method: 'get', + params + }) +} + +// 超时未处理 +export function getOvertimeHandleList(params) { + return request({ + url: 'job/overtimeHandleList', + method: 'get', + params + }) +} + // 工单详情 export function getJobInfo(jobId) { return request({ diff --git a/src/assets/icons/icon-overtime.png b/src/assets/icons/icon-overtime.png new file mode 100644 index 0000000..7d23573 --- /dev/null +++ b/src/assets/icons/icon-overtime.png Binary files differ diff --git a/src/page/jobManage/JobManage.vue b/src/page/jobManage/JobManage.vue index fce5367..ef6c264 100644 --- a/src/page/jobManage/JobManage.vue +++ b/src/page/jobManage/JobManage.vue @@ -15,10 +15,10 @@ - + - + @@ -38,6 +38,7 @@ import WaitConfirmJob from './modules/WaitConfirmJob' import InHandleJob from './modules/InHandleJob' import OverJob from './modules/OverJob' + let isFromDetail = false export default { name: "JobManage", components: { @@ -51,20 +52,46 @@ selected: '1' } }, + beforeRouteEnter(to, from, next) { + console.log('overtimeJobManage beforeRoute') + if (from.name) { + if (from.name.indexOf('jobDetail') === -1) { + isFromDetail = false + } else { + isFromDetail = true + } + } else { + isFromDetail = false + } + next() + }, activated(){ console.log('activated JobManage') - if(this.$route.query && this.$route.query.tab){ - this.selected = this.$route.query.tab - } - const val = this.selected - if(val=='1'){ - this.$refs.waitTab.loadTop() - }else if(val=='2'){ - this.$refs.confirmTab.loadTop() - }else if(val=='3'){ - this.$refs.handleTab.loadTop() - }else if(val=='4'){ - this.$refs.overTab.loadTop() + if(!isFromDetail){ + if(this.$route.query && this.$route.query.tab){ + this.selected = this.$route.query.tab + } + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } + }else{ + const val = this.selected + if(val=='1'){ + this.$refs.waitTab.loadTop() + }else if(val=='2'){ + this.$refs.confirmTab.loadTop() + }else if(val=='3'){ + this.$refs.handleTab.loadTop() + }else if(val=='4'){ + this.$refs.overTab.loadTop() + } } }, watch:{ diff --git a/src/page/jobManage/modules/JobDetail.vue b/src/page/jobManage/modules/JobDetail.vue index 1747fe6..b421c88 100644 --- a/src/page/jobManage/modules/JobDetail.vue +++ b/src/page/jobManage/modules/JobDetail.vue @@ -14,14 +14,22 @@ {{jobForm.alarmContentName}} {{jobForm.createTime}}
-
+
+ 应接单时间 + {{jobForm.shouldGetTime}} +
+
+ 应处理完成时间 + {{jobForm.shouldHandleTime}} +
+
{{item.title}} {{item.value}} {{item.value}}
-
+
现场情况
@@ -56,7 +64,7 @@
-
+
维护情况
@@ -91,7 +99,7 @@ {{item.time}}
-
+
接单 到这里去 转单 @@ -135,6 +143,7 @@ id: '', // 工单id jobCode:'',//工单编号 createTime:'',//工单创建时间 + jobFlag: '', //工单延时标志,1为超时未接单,2位超时未处理 wellId:1, wellCode: '', // 闸井编号 wellType: '', // 闸井类型 @@ -155,8 +164,11 @@ flow:[], firstState:'', firstStatePhotos:'', + shouldGetTime:'', + shouldHandleTime:'', handleMessage:'', - handlePhotos:'' + handlePhotos:'', + editable:1 }, // 表单 isLoading:true, //是否显示加载按钮 multiple:true,//是否允许多张图片 @@ -194,8 +206,17 @@ class:'text-blue' }, { + title:'设备编号', + value:this.jobForm.devcode, + }, + { + title:'告警等级', + value: this.computeLevel(this.jobForm.alarmLevel), + class:'text-red' + }, + { title:'告警数值', - value:this.jobForm.alarmValue, + value:this.jobForm.alarmValue.replace(/,/g,'\n'), class:'text-red' }, { @@ -250,6 +271,19 @@ } }, methods:{ + // 等级转换 + computeLevel(val){ + switch (val) { + case 1: + return '一级' + case 2: + return '二级' + case 3: + return '三级' + default: + return '' + } + }, //跳转地图 goToMap(){ openMapWindow(this.jobForm.lngGaode,this.jobForm.latGaode,this.jobForm.wellName) @@ -452,6 +486,8 @@ line-height 2rem margin-bottom 0.6rem .title-left{ + display: inline-block; + max-width: 45vw; font-size 1.2rem font-weight 600 color: #000 diff --git a/src/page/jobSearch/searchList.vue b/src/page/jobSearch/searchList.vue new file mode 100644 index 0000000..7050094 --- /dev/null +++ b/src/page/jobSearch/searchList.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/page/jobSearch/searchPage.vue b/src/page/jobSearch/searchPage.vue new file mode 100644 index 0000000..d54d5c4 --- /dev/null +++ b/src/page/jobSearch/searchPage.vue @@ -0,0 +1,517 @@ + + + + + + diff --git a/src/page/layout/components/TabBottom.vue b/src/page/layout/components/TabBottom.vue index 503bda1..4457ed5 100644 --- a/src/page/layout/components/TabBottom.vue +++ b/src/page/layout/components/TabBottom.vue @@ -5,9 +5,9 @@ 首页 - - - 闸井 + + + 搜索 @@ -65,6 +65,9 @@ goJob(){ this.$router.push({name: 'job'}) }, + goSearch(){ + this.$router.push({name: 'jobSearch'}) + }, goMessage(){ this.$router.push({name: 'index'}) }, diff --git a/src/page/layout/index.vue b/src/page/layout/index.vue index d67e69e..6fd544e 100644 --- a/src/page/layout/index.vue +++ b/src/page/layout/index.vue @@ -18,6 +18,12 @@
+
+
+
超时工单
+
+
+
布防撤防
@@ -75,6 +81,7 @@ return { iconWell: require('@/assets/icons/icon-well.png'), iconAlarm: require('@/assets/icons/icon-alarm.png'), + iconOvertime: require('@/assets/icons/icon-overtime.png'), iconGuard: require('@/assets/icons/icon-guard.png'), wellCount:[ { @@ -231,8 +238,10 @@ }else if(name=='已完成'){ this.$router.push({name: 'job', query:{tab:'4'}}) } + }, + openOvertime(){ + this.$router.push({name: 'jobOvertime', query:{tab:'1'}}) } - } } @@ -242,11 +251,11 @@ width 100vh .index-func-div{ height 15vh - padding 3vh 12.5vw + padding 3vh 6vw background-color #fdfdfd border-bottom 1px solid #e8e8e8 .index-func-btn-div{ - width 25vw + width 22vw float left text-align center .btn-icon{ diff --git a/src/router/modules/router.js b/src/router/modules/router.js index 637f198..4e042df 100644 --- a/src/router/modules/router.js +++ b/src/router/modules/router.js @@ -64,11 +64,32 @@ } }, { + path:'/jobOvertime', + name: 'jobOvertime', + component: () => import('@/page/overtimeJob/OvertimeJobManage'), + meta:{ + keepAlive:true + } + }, + { path:'/jobDetail/:id', name: 'jobDetail', component: () => import('@/page/jobManage/modules/JobDetail') }, { + path:'/jobSearch', + name: 'jobSearch', + component: () => import('@/page/jobSearch/searchPage'), + }, + { + path:'/searchList', + name: 'searchList', + component: () => import('@/page/jobSearch/searchList'), + meta:{ + keepAlive:true + } + }, + { path:'/mine', name: 'mine', component: () => import('@/page/mine/index') diff --git a/src/utils/dateutils.js b/src/utils/dateutils.js new file mode 100644 index 0000000..2e08ec4 --- /dev/null +++ b/src/utils/dateutils.js @@ -0,0 +1,54 @@ +// 获取当天0点时间 +export function getDayTime(nowTime) { + const nowTimeDate = new Date(nowTime) + nowTimeDate.setHours(0, 0, 0, 0) + return new Date(nowTimeDate) +} + +export function getToday(fmt) { // 默认显示今天 + return new Date().Format(fmt) +} + +export function getYesterDay() { // 默认显示昨天 + const ct_month = new Date() + ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24) + return ct_month +} + +export function getLastWeek() { // 默认显示上周 + const ct_month = new Date() + ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24 * 7) + return ct_month +} +export function getLastMonth() { // 默认显示上个月 + const ct_month = new Date() + ct_month.setTime(ct_month.getTime() - 3600 * 1000 * 24 * 30) + return ct_month +} + +export function formatDate(date,fmt='yyyy-MM-dd hh:mm:ss'){ + return date.Format(fmt) +} + +// 对Date的扩展,将 Date 转化为指定格式的String +// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, +// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) +// 例子: +// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 +// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 +Date.prototype.Format = function(fmt) { // author: meizz + var o = { + 'M+': this.getMonth() + 1, // 月份 + 'd+': this.getDate(), // 日 + 'h+': this.getHours(), // 小时 + 'm+': this.getMinutes(), // 分 + 's+': this.getSeconds(), // 秒 + 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度 + 'S': this.getMilliseconds() // 毫秒 + } + if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)) } + for (var k in o) { + if (new RegExp('(' + k + ')').test(fmt)) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length))) } + } + return fmt +} diff --git a/src/utils/request.js b/src/utils/request.js index 237db57..b43d4e9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -43,15 +43,15 @@ }else if (res.code !== 200) { // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了; if (res.code === 401 || res.code === 50012 || res.code === 50014) { - Toast({ - message: res.message, - position:'bottom', - duration: 3 * 1000 - }).then(()=>{ + // Toast({ + // message: res.message, + // position:'bottom', + // duration: 3 * 1000 + // }).then(()=>{ store.dispatch('FedLogOut').then(() => { location.reload() // 为了重新实例化vue-router对象 避免bug }) - }) + // }) } else { Toast({ message: res.message,