zhaozhipeng 3 vuotta sitten
vanhempi
commit
e03aa635f0
3 muutettua tiedostoa jossa 15 lisäystä ja 6 poistoa
  1. 2 2
      config/dev.env.js
  2. 7 2
      src/views/index.vue
  3. 6 2
      src/views/info.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://172.18.1.227:30047/"',
+  BASE_API: '"http://39.100.230.190:30047/"',
+  // BASE_API: '"http://172.18.1.227:30047/"',
   VERSION: '"1.0"',
   TIME_OUT: '"100000"'
 })

+ 7 - 2
src/views/index.vue

@@ -119,7 +119,8 @@
         areas: [],
         stations: [],
         version: process.env.VERSION,
-        word: ''
+        word: '',
+        infoMessage: ''
       }
     },
     created() {
@@ -255,7 +256,7 @@
       },
       jump_info(id,name,index) {
         this.rightIndex = index
-        this.$router.push({ path: '/info', query:{ id : id ,name: name}})
+        this.$router.push({ path: '/info', query:{ id : id ,name: name,lj: this.infoMessage}})
       },
       async switchTo() {
         if(!this.searchData.areaId || !this.searchData.workstationId) {
@@ -281,8 +282,12 @@
       async select_template_info_list(data) {
         await selectTemplateInfoList(data).then(res=> {
           this.rightList = res.data
+          this.infoMessage = ''
           if(this.rightList[0].parameterList) {
+            this.infoMessage = this.rightList[0].parameterList[0].value
             this.rightTitle = this.word + '(' + this.rightList[0].parameterList[0].value +')'
+          } else {
+            this.rightTitle = this.word
           }
         })
       }

+ 6 - 2
src/views/info.vue

@@ -7,9 +7,9 @@
     <div class="content">
       <div class="content_child">
         <table border="1" cellspacing="0" style="width:100%;">
-          <tr height="53">
+          <tr v-if="lj" height="53">
             <th colspan="2">零件名</th>
-            <th colspan="9">{{ data.lingjianming || 2 }}</th>
+            <th colspan="9">{{ lj }}</th>
           </tr>
            <tr height="53">
               <th colspan="2">班次</th>
@@ -101,6 +101,9 @@
     created() {
       num = 0
       this.mainTitle = this.$route.query.name
+      if(this.$route.query.lj) {
+         this.lj = this.$route.query.lj
+      }
       const rLoading = this.openLoading()
       selectDetailById({'id':this.$route.query.id}).then(res=> {
         if (res.status === "20000") {
@@ -130,6 +133,7 @@
         mainTitle: '',
         commonNum: 0,
         newProjectCommonList: [],
+        lj: ''
       }
     },
     computed: {