xgwangman 4 年之前
父节点
当前提交
9fbbaa5896

+ 11 - 9
src/components/areaSelect.vue

@@ -101,7 +101,6 @@ export default {
                     })
                 })
           }
-          console.log(city_arr,"sss")
           return city_arr;
         }
     },
@@ -219,11 +218,10 @@ export default {
       },
       //保存
       saveDepart(){
-         let newArr = "";
-         console.log()
-         if(Object.keys(this.citys).length == 0){
+        let newArr = "";
+        if(Object.keys(this.citys).length == 0){
             newArr = "全国"
-         }else{
+        }else{
             for(let key in this.citys){
               if(this.citys[key].length == 0){
                   newArr += `${key}、`
@@ -231,9 +229,12 @@ export default {
                 newArr += `${key} (${this.citys[key].join('、')})、`
               }
             }
-         }
-          
-          newArr = newArr.replace(/(.*)、/,'$1');
+        }
+        console.log(this.citys)
+        newArr = newArr.replace(/(.*)、/,'$1');
+        if (this.$parent.digIndex == "fenAreas") {
+          this.$parent.tableData[this.$parent.cellIndex].area = newArr;
+        } else {
           areaUpdate(this.citys).then(res =>{
             console.log(res.data)
             if(res.data.status == 1){
@@ -245,7 +246,8 @@ export default {
           })
           console.log(newArr,"newArr")
           this.$parent.bookForm.areas = newArr;
-          this.boxVisible = false;
+        }
+        this.boxVisible = false;
       },
       //取消
       cancle(){

+ 8 - 11
src/views/bus/components/antistop.vue

@@ -47,7 +47,7 @@
                         <p>附加词:{{String(ite.appendkey)?String(ite.appendkey.join(",").replace(/,/g, "、")):'--'}}</p>
                         <p>排除词:{{String(ite.notkey) ? String(ite.notkey.join(",").replace(/,/g, "、")) : '--'}}</p>
                         <img src="@/assets/images/del.png" @click="keyDel(index,indx)">
-                        <div class="top_edit" @click="toop(item.s_item,String(ite.key),String(ite.appendkey),String(ite.notkey),index,'edit')">编辑<i class="tri-down"></i></div>
+                        <div class="top_edit" @click="toop(item.s_item,String(ite.key),String(ite.appendkey),String(ite.notkey),index,'edit',indx)">编辑<i class="tri-down"></i></div>
                     </div>
                     <div class="lis_card add_card" @click="addCell(item.s_item,'add',index)"><i class="el-icon-plus"></i></div>
                 </div>
@@ -156,7 +156,7 @@ export default {
             this.wordType = tip;
             this.toopIndex = inx;
         },
-        toop(ite1,ite2,ite3,ite4,index,name) {
+        toop(ite1,ite2,ite3,ite4,index,name,indx) {
             this.editVisible = true;
             this.tips = true;
             this.editsForm.keyClassify = ite1;
@@ -164,6 +164,7 @@ export default {
             this.editsForm.lWord = ite3.split(',');
             this.editsForm.rWord = ite4.split(',');
             this.toopIndex = index;
+            this.keyIndex = indx;
             this.wordType = name;
         },
         delKey(name,index) {
@@ -285,15 +286,10 @@ export default {
                     rWord: []
                 };
             } else if(this.wordType == 'edit') {
-                this.keyDatas.data.splice(this.toopIndex,1,{ 
-                    s_item: this.editsForm.keyClassify,
-                    a_key:[
-                        {
-                            key: this.editsForm.botWord,
-                            appendkey: this.editsForm.lWord,
-                            notkey: this.editsForm.rWord
-                        }
-                    ]
+                this.keyDatas.data[this.toopIndex].a_key.splice(this.keyIndex,1,{
+                    key: this.editsForm.botWord,
+                    appendkey: this.editsForm.lWord,
+                    notkey: this.editsForm.rWord
                 })
                 this.editsForm = {
                     botWord: '',
@@ -303,6 +299,7 @@ export default {
             } else if(this.wordType == 'i_edit') {
                 this.keyDatas.data[this.toopIndex].s_item = this.editsForm.keyClassify;
             }
+            console.log(this.keyDatas.data)
             this.updated({a_items:this.keyDatas.data})
         }
     }

+ 14 - 5
src/views/bus/components/distribute.vue

@@ -73,8 +73,10 @@
         </div>
         <!-- 选择分发人员弹框 -->
         <v-fenbox ref="fenModel"></v-fenbox>
-        <!-- 选择区域、采购单位行业、信息类型弹框 -->
+        <!-- 选择采购单位行业、信息类型弹框 -->
         <v-edit ref="editModel1" :digs="digs" :boxData="boxData"></v-edit>
+        <!-- 区域选择弹框 -->
+        <area-select ref="editArea"></area-select>
     </div>
 </template>
 
@@ -82,13 +84,15 @@
 import vFenbox from './fenBox.vue';
 import vEdit from './editBox.vue';
 import { nodiff, nodiffList } from '@/api/api';
+import areaSelect from "@/components/areaSelect.vue"
 export default {
     props: {
         viewDatas: {}
     },
     components: {
         vFenbox,
-        vEdit
+        vEdit,
+        areaSelect
     },
     data() {
         return {
@@ -100,7 +104,8 @@ export default {
             elBtn: false,
             digs: 1,
             boxData: [],
-            cellIndex: 0
+            cellIndex: 0,
+            digIndex: ''
         }
     },
     created() {
@@ -150,9 +155,13 @@ export default {
                 this.$refs.fenModel.centerDialogVisible = true;
                 // this.$refs.fenModel.selectedList = [];
             } else if (indx == 6) {
-                
-            } else {
                 this.$refs.editModel1.boxVisible = true;
+            } else if (indx == 2) {
+                this.digIndex = 'distri';
+                this.$refs.editModel1.boxVisible = true;
+            } else if (indx == 1) {
+                this.digIndex = 'fenAreas';
+                this.$refs.editArea.boxVisible = true;
             }
         },
         newRules() {

+ 62 - 39
src/views/bus/components/editBox.vue

@@ -30,7 +30,7 @@
                             <ul>
                                 <li v-for="item in groupData2" :key="item.id" class="li_data">
                                     <h3>{{item.letter}}</h3>
-                                    <el-checkbox-group v-model="checkboxGroup2">
+                                    <el-checkbox-group v-model="boxData.buyerclass">
                                         <el-checkbox-button v-for="ite in item.list" :key="ite.id" :label="ite.name">{{ite.name}}</el-checkbox-button>
                                     </el-checkbox-group>
                                 </li>
@@ -51,13 +51,13 @@
                         </div>
                         <!-- 分类名称 -->
                         <div class="lists" v-if="digs == 6">
-                            <div class="li_fen" v-for="(item,index) in groupData6" :key="index">
-                                <div class="card_icons">
-                                    <i class="el-icon-check"></i>
+                            <div class="li_fen" v-for="(item,index) in groupData6" :key="index" @click="fenLei(index,item.s_item)">
+                                <div class="card_icons" :class="{'f_active':leiIndex.indexOf(index)>-1}">
+                                    <i :class="leiIndex.indexOf(index)>-1?'el-icon-check':''"></i>
                                 </div>
                                 <div class="conts">
-                                    <h2>钢筋水泥</h2>
-                                    <p>钢筋水泥、钢筋水泥】钢筋水泥、钢筋水泥钢筋水泥钢筋水泥钢筋水泥、钢筋水泥】钢筋水泥、钢筋水泥钢筋水泥钢筋水泥</p>
+                                    <h2>{{item.s_item}}</h2>
+                                    <p>{{item.keys}}</p>
                                 </div>
                             </div>
                         </div>
@@ -73,13 +73,12 @@
 </template>
 
 <script>
-import { scribeKey } from '@/api/api';
-import { industryData2, industryData3 } from'@/assets/js/industry_data';
+import { scribeKey, buyerUpdate } from '@/api/api';
+import { industryData2, industryData3 } from'@/assets/js/industry_data.js';
 
 export default {
     props: {
         digs: Number,
-        boxCheck: {},
         boxData: {}
     },
     data() {
@@ -90,7 +89,7 @@ export default {
             keyShow: false,
             input1: '',
             checkboxGroup1: ['c21'],
-            checkboxGroup2: [''],
+            checkboxGroup2: [],
             checkboxGroup3: ['招标'],
             checkboxGroup4: ['b1'],
             activeNames: ['1'],
@@ -98,25 +97,14 @@ export default {
             groupData2: [],
             groupData3: [],
             groupData4: [],
-            provinceData: {
-                // '#': ['全国'],
-                A: ['安徽', '澳门'],
-                B: ['北京'],
-                C: ['重庆'],
-                F: ['福建'],
-                G: ['广东', '广西', '贵州', '甘肃'],
-                H: ['河北', '湖北', '黑龙江', '海南', '河南', '湖南'],
-                J: ['吉林', '江苏', '江西'],
-                L: ['辽宁'],
-                N: ['内蒙古', '宁夏'],
-                Q: ['青海'],
-                S: ['山西', '陕西', '上海', '山东', '四川'],
-                T: ['天津', '台湾'],
-                X: ['西藏', '新疆', '香港'],
-                Y: ['云南'],
-                Z: ['浙江']
-            },
-            proMapList: []
+            groupData6: [
+                {s_item: '钢筋混凝土',keys:'钢筋、水泥钢筋、水泥钢筋、水泥钢筋、水泥'},
+                {s_item: '楼房',keys:'钢筋、水泥钢筋、水泥钢筋、水泥钢筋、水泥'},
+                {s_item: '土地',keys:'钢筋、水泥钢筋、水泥钢筋、水泥钢筋、水泥'}
+            ],
+            proMapList: [],
+            leiIndex: [],
+            arrs: []
         }
     },
     created() {
@@ -124,19 +112,48 @@ export default {
         this.groupData3 = industryData3;
         this.checkboxGroup2 = this.boxData.buyerclass;
         console.log(this.checkboxGroup2);
-        for (const key in this.provinceData) {
-            this.groupData1.push(key);
-            this.proMapList[key] =this.provinceData[key].map(v => {
-                return v
-            });
-        }
-        scribeKey().then(res => {
-            this.groupData6 = res.data;
-        })
+        // scribeKey().then(res => {
+        //     res.data.data.map(v => {
+        //         let arr1 = [];
+        //         for(let i=0; i<v.a_key.length;i++) {
+        //             arr1.push(v.a_key[i].key)
+        //         }
+        //         this.groupData6.push({
+        //             s_item: v.s_item,
+        //             keys: String(arr1.join(",").replace(/,/g, "、"))
+        //         })
+        //     })
+        // })
     },
     methods: {
+        fenLei(index,title) {
+            console.log(title)
+            let arrIndex = this.leiIndex.indexOf(index);
+            if(arrIndex>-1){
+                this.leiIndex.splice(arrIndex,1);
+                this.arr.splice(arrIndex,1);
+            }else{
+                this.leiIndex.push(index);
+                this.arr.push(title);
+            }
+            console.log(this.arr)
+            // this.$parent.tableData[this.$parent.cellIndex].items = ''
+        },
         confirmed() {
             this.boxVisible = false;
+            if (this.$parent.digIndex == 'sub') {
+                this.$parent.bookForm.indust = String(this.boxData.buyerclass.join(",").replace(/,/g, "、"));
+                buyerUpdate({buyer:this.boxData.buyerclass}).then(res => {
+                    if (res.data.status == 1) {
+                        this.$message({
+                            message: '设置成功',
+                            type: 'success'
+                        });
+                    }
+                })
+            } else if (this.$parent.digIndex == 'distri') {
+                this.$parent.tableData[this.$parent.cellIndex].buyerclass = String(this.boxData.buyerclass.join(",").replace(/,/g, "、"));
+            }
         }
     }
 }
@@ -194,16 +211,22 @@ export default {
                             text-align: left;
                             padding: 10px 20px!important;
                             box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.05);
+                            cursor: pointer;
                             .card_icons {
                                 width: 18px;
                                 height: 18px;
                                 line-height: 18px;
                                 text-align: center;
                                 color: #2ABED1;
-                                background: #F5F6F7;
                                 border-radius: 50%;
                                 border: 1px solid #C0C4CC;
                             }
+                            .f_active {
+                                background: #2ABED1;
+                                i {
+                                    color: #fff;
+                                }
+                            }
                             .conts {
                                 margin-left: 12px;
                                 h2 {

+ 15 - 11
src/views/bus/components/subMage.vue

@@ -113,9 +113,9 @@
         </div>
         <!-- 开启邮箱提醒 -->
         <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>
@@ -135,12 +135,13 @@ export default {
         vKey, 
         vDistri,
         vWarn,
-        vEdit,areaSelect
+        vEdit,
+        areaSelect
     },
     data() {
         return {
             viewDatas: [],
-            boxData: [],
+            boxData: {},
             apper: 0,
             bookForm: {
                 dispense: false,
@@ -162,7 +163,8 @@ export default {
             ],
             emailVis: false,
             digs: 1,
-            exportData: []
+            exportData: [],
+            digIndex: ''
         }
     },
     created() {
@@ -173,6 +175,7 @@ export default {
             this.boxData = res.data.subscribe;
             this.bookForm.tuiRadio = res.data.subscribe.ratemode;
             this.bookForm.proPei = res.data.subscribe.projectmatch == '1' ? true : false;
+            this.bookForm.indust = String(res.data.subscribe.buyerclass.join(",").replace(/,/g, "、"));
         })
         // 获取推送设置
         pushset().then(res => {
@@ -228,12 +231,13 @@ export default {
             })
         },
         decMsg(nums) {// 弹框
-        if(nums == 1){
-             this.$refs.editArea.boxVisible = true;
-        }else{
-            this.$refs.editModel.boxVisible = true;
-            this.digs = nums;
-        }   
+            if(nums == 1){
+                this.$refs.editArea.boxVisible = true;
+            } else if (nums == 2) {
+                this.digIndex = 'sub';
+                this.$refs.editModel.boxVisible = true;
+                this.digs = nums;
+            }   
         },
         tuiChecked(val) {// 推送时间
             this.ratemodes = val;

+ 4 - 5
vue.config.js

@@ -16,9 +16,8 @@ module.exports = {
     disableHostCheck: true,
     proxy: {
       "/entbase": {
-        // target: "https://app2-jytest.jianyu360.cn",
-        // target: "http://127.0.0.1:812",
-        // target: "http://127.0.0.1:812",
+        // target: "http://ent-xzhs.jianyu360.cn",
+        // target: "http://127.0.0.1:815",
         // target:'http://192.168.20.214:815',//任
         target:'http://192.168.20.241:815',
         changeOrigin: true,
@@ -28,7 +27,7 @@ module.exports = {
         }
       },
       "/entniche": {
-        // target: "https://app2-jytest.jianyu360.cn",
+        // target: "http://ent-xzhs.jianyu360.cn",
         target: "http://192.168.20.241:812",
         // target: "http://127.0.0.1:812",
         // target:'http://192.168.20.214:812',//任
@@ -39,7 +38,7 @@ module.exports = {
         }
       },
       "^/entdataexport": {
-        // target: "http://ent-xzh.jianyu360.cn",
+        // target: "http://ent-xzhs.jianyu360.cn",
         // target: "https://app2-jytest.jianyu360.cn",
         // target: "http://192.168.20.241:813/entniche",
         // target: "http://127.0.0.1:813",