Browse Source

Signed-off-by: liuboyan <632697560@qq.com>
bug

liuboyan 3 years ago
parent
commit
6695df06d2
2 changed files with 20 additions and 7 deletions
  1. 19 5
      src/views/engineeringScreen/index.vue
  2. 1 2
      vite.config.js

+ 19 - 5
src/views/engineeringScreen/index.vue

@@ -12,6 +12,10 @@
           clearable
           @change="filterCharts"
         >
+          <el-option
+            label="全部项目"
+            value=""
+          />
           <el-option
             v-for="item in projectList"
             :key="item.projectId"
@@ -563,6 +567,8 @@ export default {
       getDeviceStatusDataOfEngineering(this.filterForm).then(res => {
         if (res.status == 200) {
           const myChart = echarts.init(document.getElementById('deviceStatus'))
+          myChart.clear()
+          myChart.off('click')
           myChart.setOption({
             color: this.colorList,
             title: {
@@ -666,6 +672,8 @@ export default {
       getDeviceTypeDataOfEngineering(this.filterForm).then(res => {
         if (res.status == 200) {
           const myChart = echarts.init(document.getElementById('deviceType'))
+          myChart.clear()
+          myChart.off('click')
           myChart.setOption({
             color: this.colorList,
             title: {
@@ -770,6 +778,8 @@ export default {
       getPatrolTaskDataOfEngineering(this.filterForm).then(res => {
         if (res.status == 200) {
           const myChart = echarts.init(document.getElementById('patrolTask'))
+          myChart.clear()
+          myChart.off('click')
           myChart.setOption({
             color: this.colorList,
             title: {
@@ -856,11 +866,11 @@ export default {
             ]
           })
           myChart.on('click', (params) => {
-            if (params.name == '过期' || params.name == '审核关闭') {
+            if (params.name == '过期' || params.name == '审核关闭') {
               this.tableOption.api = getTaskListOfEngineering
               this.tableOption.filterForm = {
                 lpCategory: 1,
-                taskState: params.name == '过期' ? 2 : 7
+                taskState: params.name == '过期' ? 2 : 7
               }
               this.tableOption.title = params.name == '过期' ? '过期任务' : '审核关闭任务'
               this.tableOption.type = 'patrolMaintenanceTask'
@@ -887,6 +897,8 @@ export default {
       getDeviceTaskDataOfEngineering(this.filterForm).then(res => {
         if (res.status == 200) {
           const myChart = echarts.init(document.getElementById('deviceTask'))
+          myChart.clear()
+          myChart.off('click')
           myChart.setOption({
             color: this.colorList,
             title: {
@@ -978,7 +990,7 @@ export default {
             if (params.name == '待处理' || params.name == '已超期') {
               this.tableOption.api = getDeviceTaskListOfEngineering
               this.tableOption.filterForm = {
-                warningStatus: params.name == '过期' ? 0 : 2
+                warningStatus: params.name == '待处理' ? 0 : 2
               }
               this.tableOption.title = params.name == '待处理' ? '待处理任务' : '已超期任务'
               this.tableOption.type = 'deviceTask'
@@ -997,6 +1009,8 @@ export default {
       getMaintenanceTaskDataOfEngineering(this.filterForm).then(res => {
         if (res.status == 200) {
           const myChart = echarts.init(document.getElementById('maintenanceTask'))
+          myChart.clear()
+          myChart.off('click')
           myChart.setOption({
             color: this.colorList,
             title: {
@@ -1083,11 +1097,11 @@ export default {
             ]
           })
           myChart.on('click', (params) => {
-            if (params.name == '过期' || params.name == '审核关闭') {
+            if (params.name == '过期' || params.name == '审核关闭') {
               this.tableOption.api = getTaskListOfEngineering
               this.tableOption.filterForm = {
                 lpCategory: 2,
-                taskState: params.name == '过期' ? 2 : 7
+                taskState: params.name == '过期' ? 2 : 7
               }
               this.tableOption.title = params.name == '过期' ? '过期任务' : '审核关闭任务'
               this.tableOption.type = 'patrolMaintenanceTask'

+ 1 - 2
vite.config.js

@@ -25,8 +25,7 @@ export default ({ command, mode }) => {
         port: 3001,
         proxy:{
           '/landcrm': {
-            // target: 'https://ebeitest.wuyeface.com:1188/',
-            target: 'http://172.18.0.23/',
+            target: 'https://ebeitest.wuyeface.com:1188/',
             changeOrigin: true,
             ws: true,
             rewrite: (path) => path.replace(/^\/landcrm/, '/landcrm')