East 4 лет назад
Родитель
Сommit
3faed24b6a
2 измененных файлов с 15 добавлено и 8 удалено
  1. 14 7
      src/views/modules/basicdata/branch.vue
  2. 1 1
      static/config/index.js

+ 14 - 7
src/views/modules/basicdata/branch.vue

@@ -40,13 +40,14 @@
         label="名称">
       </el-table-column>
       <el-table-column
+        prop="frontLocation"
         header-align="center"
         align="center"
         label="地址">
-        <template slot-scope="scope">
+        <!-- <template slot-scope="scope">
           {{ comLocation(scope.row.location) }}
-          <!-- {{scope.row.location}} -->
-        </template>
+          {{scope.row.location}}
+        </template> -->
       </el-table-column>
       <el-table-column
         prop="manager"
@@ -155,10 +156,12 @@ export default {
         manager: '',
         name: '',
         buildTime: '',
-        selectedOptions: []
+        selectedOptions: [],
+        loc: ''
       },
       options: regionData,
       selectedOptions: [],
+      loc: '',
       dataRule: { // 校验规则
         name: [
           { required: true, message: '牧场名称不能为空', trigger: 'blur' },
@@ -232,9 +235,10 @@ export default {
       var loc = "";
       this.form.location1 = ''
       for (let i = 0; i < this.form.selectedOptions.length; i++) {
-        loc += CodeToText[this.form.selectedOptions[i]];
+        loc += CodeToText[this.form.selectedOptions[i]]
         this.form.location1 += this.form.selectedOptions[i] + ','
       }
+      this.loc = loc
       console.log(loc);
     },
     // 当前页
@@ -336,7 +340,8 @@ export default {
             location: this.form.location,
             manager: this.form.manager,
             name: this.form.name,
-            buildTime: this.form.buildTime
+            buildTime: this.form.buildTime,
+            frontLocation: this.form.loc
           })
         }).then(result => {
           if (result.data.code === 0) {
@@ -373,7 +378,8 @@ export default {
             location: this.form.location,
             manager: this.form.manager,
             name: this.form.name,
-            buildTime: this.form.buildTime
+            buildTime: this.form.buildTime,
+            frontLocation: this.form.loc
           })
         }).then(result => {
           if (result.data.code === 0) {
@@ -409,6 +415,7 @@ export default {
     // 校验输入是否完整
     validComplete (val) {
       this.form.location = this.form.location1 + this.form.location2
+      this.form.loc = this.loc + this.form.location2
       val && (delete this.form.id)
       for (let i in this.form) {
         if (!this.form[i].toString()) {

+ 1 - 1
static/config/index.js

@@ -6,7 +6,7 @@
 
   // api接口请求地址
   // window.SITE_CONFIG['baseUrl'] = 'http://localhost:8080/renren-fast';
-  window.SITE_CONFIG['baseUrl'] = 'http://192.168.1.44:88/api';
+  window.SITE_CONFIG['baseUrl'] = 'http://192.168.1.57:88/api';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名