xgwangman 4 years ago
parent
commit
db57a16365
3 changed files with 27 additions and 11 deletions
  1. 1 4
      src/components/areaSelect.vue
  2. 22 3
      src/views/bus/components/subMage.vue
  3. 4 4
      vue.config.js

+ 1 - 4
src/components/areaSelect.vue

@@ -48,10 +48,7 @@ export default {
           initals:[ 'A','B','C','F','G','H','J','L','N','Q','S','T','X','Y','Z'],
           newArea:null,
           input:'',
-          citys:{
-            "安徽省":["合肥市","芜湖市"],
-            "北京市":[],
-          },
+          citys:{},
           isCountry:false,
       }
     },

+ 22 - 3
src/views/bus/components/subMage.vue

@@ -115,16 +115,18 @@
         <v-warn ref="emailed" :exportData="exportData"></v-warn>
         <!-- 选择区域、采购单位行业、信息类型弹框 -->
         <v-edit ref="editModel" :digs="digs" :boxData="boxData"></v-edit>
-        
+         <!-- 区域选择 -->
+        <area-select ref="editArea"></area-select>
     </div>
 </template>
 
 <script>
-import { scribeData, subdis, updateArea, updateBuyerclass, updateInfotype, pushset, updatePush, projectUpdate } from '@/api/api';
+import { scribeData, subdis, updateArea, updateBuyerclass, updateInfotype, pushset, updatePush, projectUpdate,areaGetdata } from '@/api/api';
 import vKey from './antistop.vue';
 import vDistri from './distribute.vue';
 import vWarn from './warnBox.vue';
 import vEdit from './editBox.vue';
+import areaSelect from "@/components/areaSelect.vue"
 export default {
     props: {
         entData: {}
@@ -133,7 +135,7 @@ export default {
         vKey, 
         vDistri,
         vWarn,
-        vEdit
+        vEdit,areaSelect
     },
     data() {
         return {
@@ -178,6 +180,19 @@ export default {
             this.bookForm.tuiCheck1 = res.data.apppush == '1' ? true : false;
             this.bookForm.tuiCheck2 = res.data.mailpush == '1' ? true : false;
         })
+        //获取区域设置
+       areaGetdata().then(res =>{
+          let newArr = "";
+          for(let key in res.data.area){
+            if(res.data.area[key].length == 0){
+                newArr += `${key}、`
+            }else{
+              newArr += `${key} (${res.data.area[key].join('、')})、`
+            }
+          }
+          newArr = newArr.replace(/(.*)、/,'$1');
+          this.bookForm.areas = newArr;
+        })
     },
     methods: {
         booked(num) {
@@ -213,8 +228,12 @@ export default {
             })
         },
         decMsg(nums) {// 弹框
+        if(nums == 1){
+             this.$refs.editArea.boxVisible = true;
+        }else{
             this.$refs.editModel.boxVisible = true;
             this.digs = nums;
+        }   
         },
         tuiChecked(val) {// 推送时间
             this.ratemodes = val;

+ 4 - 4
vue.config.js

@@ -19,8 +19,8 @@ module.exports = {
         // target: "https://app2-jytest.jianyu360.cn",
         // target: "http://127.0.0.1:812",
         // target: "http://127.0.0.1:812",
-        target:'http://192.168.20.214:815',//任
-        // target:'http://192.168.20.241:815',
+        // target:'http://192.168.20.214:815',//任
+        target:'http://192.168.20.241:815',
         changeOrigin: true,
         ws: true,
         pathRewrite: {
@@ -29,9 +29,9 @@ module.exports = {
       },
       "/entniche": {
         // target: "https://app2-jytest.jianyu360.cn",
-        // target: "http://192.168.20.241:812",
+        target: "http://192.168.20.241:812",
         // target: "http://127.0.0.1:812",
-        target:'http://192.168.20.214:812',//任
+        // target:'http://192.168.20.214:812',//任
         changeOrigin: true,
         ws: true,
         pathRewrite: {