zhaozhipeng 3 anni fa
parent
commit
0be6f51701
4 ha cambiato i file con 12 aggiunte e 11 eliminazioni
  1. 2 2
      config/dev.env.js
  2. 2 0
      config/prod.env.js
  3. BIN
      dist.zip
  4. 8 9
      src/views/index.vue

+ 2 - 2
config/dev.env.js

@@ -4,8 +4,8 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  BASE_API: '"http://39.100.230.190:30047/"',
+  // BASE_API: '"http://39.100.230.190:30047/"',
+  BASE_API: '"http://172.18.1.227:30047/"',
   VERSION: '"1.0"',
-  // EMBED_API: '"http://39.100.230.190:8089"',
   TIME_OUT: '"100000"'
 })

+ 2 - 0
config/prod.env.js

@@ -2,5 +2,7 @@
 module.exports = {
   NODE_ENV: '"production"',
   BASE_API: '"http://39.100.230.190:30047/"',
+  // BASE_API: '"http://81.70.84.72:30047/"',
+  VERSION: '"1.0"',
   TIME_OUT: '"100000"'
 }

BIN
dist.zip


+ 8 - 9
src/views/index.vue

@@ -118,7 +118,8 @@
         rightList: [],
         areas: [],
         stations: [],
-        version: process.env.VERSION
+        version: process.env.VERSION,
+        word: ''
       }
     },
     created() {
@@ -216,19 +217,14 @@
         this.rightTitle = '全部点检表'
         this.select_template_info_list(data)
       },
-      change_index(id,index) {
+      async change_index(id,index) {
         this.leftIndex = index
         this.rightIndex = -1
         this.selectId = id
         let data = this.searchData
-        this.rightTitle = this.leftList[index].name
-        if(this.leftList[index].lingjianming) {
-          this.rightTitle = this.leftList[index].name + '(' + this.leftList[index].lingjianming +')'
-        } else {
-          this.rightTitle = this.leftList[index].name
-        }
+        this.word = this.leftList[index].name
         data['id'] = id
-        this.select_template_info_list(data)
+        await this.select_template_info_list(data)
       },
       get_region() {
         getRegion().then(res=> {
@@ -285,6 +281,9 @@
       async select_template_info_list(data) {
         await selectTemplateInfoList(data).then(res=> {
           this.rightList = res.data
+          if(this.rightList[0].parameterList) {
+            this.rightTitle = this.word + '(' + this.rightList[0].parameterList[0].value +')'
+          }
         })
       }
     },