xgwangman vor 4 Jahren
Ursprung
Commit
0494ea4317

+ 0 - 0
public/index34.html → public/index2.html


+ 1 - 1
src/api/api.js

@@ -19,7 +19,7 @@ export const updateBuyerclass = data => fetch.post('/entniche/subscribe/buyercla
 // 获取信息类型设置
 export const infotypeData = data => fetch.post('/entniche/subscribe/infotype/get', data);
 // 修改信息类型设置
-export const updateInfotype = data => fetch.post('/entniche/subscribe/infotype/get', data);
+export const updateInfotype = data => fetch.post('/entniche/subscribe/infotype/update', data);
 // 获取推送设置(关键词匹配方式)
 export const pushset = data => fetch.post('/entniche/subscribe/pushset/get', data);
 // 获取关键词设置

+ 7 - 9
src/assets/js/industry_data.js

@@ -173,15 +173,13 @@ export const industryData3 = [
     {title: '拟建项目'},
     {title: '招标预告'},
     {title: '招标公告',list: [
-        {name: '招标'},
-        {name: '邀标'},
-        {name: '询价'},
-        {name: '竞谈'},
-        {name: '单一'},
-        {name: '竞价'},
-        {name: '变更'},
-        {name: '其他'}
+         '招标','邀标','询价','竞谈', '单一','竞价', '变更','其他'
+    ]},
+    {title: '招标结果',list:[
+        '中标','成交','废标','流标'
+    ]},
+    {title: '招标信用信息',list:[
+        '合同','验收','违规'
     ]},
-    {title: '招标结果'},
 ]
 

+ 152 - 25
src/views/bus/components/editBox.vue

@@ -12,11 +12,14 @@
                         class="sear"
                         placeholder="搜索"
                         prefix-icon="el-icon-search"
+                        v-if="digs == 3 ?false : true"
                         v-model="input1">
                     </el-input>
                     <div class="industy_lis">
                         <div class="quan_bu" v-if="digs != 6">
                             <el-checkbox-button 
+                               @change="checkCountry"
+                               v-model="Country"
                                 :label="digs == 1?'全国':digs == 2?'全部行业':'全部类型'"
                                 :class="{c_active:digs != 2}"
                             >
@@ -39,12 +42,10 @@
                         <!-- 信息类型 -->
                         <div class="lists msg_type" v-if="digs == 3">
                             <ul>
-                                <li v-for="item in groupData3" :key="item.title" class="li_data">
-                                    <el-checkbox-group v-model="checkboxGroup3">
-                                        <el-checkbox-button class="titles" :label="item.title">{{item.title}}</el-checkbox-button>
-                                    </el-checkbox-group>
-                                    <el-checkbox-group v-model="checkboxGroup3">
-                                        <el-checkbox-button v-for="ite in item.list" :key="ite.name" :label="ite.name">{{ite.name}}</el-checkbox-button>
+                                <li v-for="(item,i) in groupData3" :key="item.title" class="li_data">
+                                    <el-checkbox class="titles"  v-model="selectcheckboxGroup3.status[i]" @change="handleCheckAllChange(item,i)">{{ item.title }}</el-checkbox>
+                                    <el-checkbox-group v-model="selectcheckboxGroup3.list[i]"  @change="handleCheckedCitiesChange(item,i)">
+                                        <el-checkbox-button v-for="ite in item.list" :key="ite" :label="ite">{{ite}}</el-checkbox-button>
                                     </el-checkbox-group>
                                 </li>
                             </ul>
@@ -73,7 +74,7 @@
 </template>
 
 <script>
-import { scribeKey, buyerUpdate } from '@/api/api';
+import { scribeKey, buyerUpdate, updateInfotype} from '@/api/api';
 import { industryData2, industryData3 } from'@/assets/js/industry_data.js';
 
 export default {
@@ -83,14 +84,20 @@ export default {
     },
     data() {
         return {
+            Country:false,
             boxVisible: false,
             care: 1,
             mails: false,
             keyShow: false,
             input1: '',
             checkboxGroup1: ['c21'],
-            checkboxGroup2: [],
-            checkboxGroup3: ['招标'],
+            checkboxGroup2: [''],
+            checkboxGroup3: [],
+            InformatioType:[],
+            selectcheckboxGroup3:{
+                status:[],
+                list:[]
+            },
             checkboxGroup4: ['b1'],
             activeNames: ['1'],
             groupData1: [],
@@ -110,6 +117,40 @@ export default {
     created() {
         this.groupData2 = industryData2;
         this.groupData3 = industryData3;
+        //信息类型数据处理
+        this.$watch('InformatioType', () =>{
+            this.selectcheckboxGroup3.status = [];
+            this.selectcheckboxGroup3.list = [];
+            this.Country = false;
+            if(this.InformatioType[0] =='全部类型'){
+                this.Country = true;
+            }
+            this.groupData3.forEach( (v,i) =>{
+                if(!Array.isArray(this.selectcheckboxGroup3.list[i])){
+                    this.selectcheckboxGroup3.list[i] = [];
+                }
+                this.selectcheckboxGroup3.status[i] = false;
+                if(v.list){
+                    v.list.forEach((item,x) =>{
+                            let current = this.InformatioType.find(n =>n === item);
+                            if(current !== undefined){
+                            this.selectcheckboxGroup3.list[i].push(current);
+                            }
+                    })
+                    if(this.selectcheckboxGroup3.list[i].length === v.list.length){
+                        this.selectcheckboxGroup3.status[i] = true
+                    }
+                }else{
+                    let current = this.InformatioType.find(n =>n === v.title);
+                    if(current !== undefined){
+                            this.selectcheckboxGroup3.list[i].push(current);
+                            this.selectcheckboxGroup3.status[i] = true;
+                    }
+                    
+                }
+            })
+        })
+
         this.checkboxGroup2 = this.boxData.buyerclass;
         console.log(this.checkboxGroup2);
         // scribeKey().then(res => {
@@ -125,8 +166,9 @@ export default {
         //     })
         // })
     },
+
     methods: {
-        fenLei(index,title) {
+         fenLei(index,title) {
             console.log(title)
             let arrIndex = this.leiIndex.indexOf(index);
             if(arrIndex>-1){
@@ -139,21 +181,79 @@ export default {
             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'
-                        });
+        //全选
+        checkCountry(){
+            if(this.digs ==3){
+                this.InformatioType = []
+            }
+        },
+        //保存
+        confirmed() { 
+            if(this.digs ==3){
+                let arr = '';
+                if(this.Country){
+                    this.selectcheckboxGroup3.list.forEach( v =>{
+                        if(v.length>0){
+                            arr += `${v.join('、')}、`
+                        }
+                    })
+                }else{
+                    arr = '全部类型'
+                }
+                arr = arr.replace(/(.*)、/,'$1');
+                let  newArr = arr.split('、');
+                this.$parent.bookForm.mesge = arr;
+                updateInfotype({msg:newArr}).then(res =>{
+                    if(res.data.status == 1){
+                       this.$message({ message: '设置成功',type: 'success'});
+                    }else{
+                       this.$message({ message: '设置失败',type: 'warning'});
+                    return;
                     }
                 })
-            } else if (this.$parent.digIndex == 'distri') {
-                this.$parent.tableData[this.$parent.cellIndex].buyerclass = String(this.boxData.buyerclass.join(",").replace(/,/g, "、"));
+            } else {
+                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, "、"));
+                }
+            }
+            this.boxVisible = false;
+        },
+        //信息类型全部选择
+        handleCheckAllChange(val,i){
+            console.log(val)
+            if(val.list){
+                if(this.selectcheckboxGroup3.list[i].length == 0){
+                    this.selectcheckboxGroup3.list.splice(i,1,val.list)
+                }else{
+                    this.selectcheckboxGroup3.list.splice(i,1,[])
+                } 
+                let checkedCount = val.list.length;
+                let status = checkedCount === this.selectcheckboxGroup3.list[i].length;
+                this.selectcheckboxGroup3.status.splice(i,1,status)
+            }else{
+                if(this.selectcheckboxGroup3.list[i].length == 0){
+                    this.selectcheckboxGroup3.list[i].push(val.title)
+                }else{
+                     this.selectcheckboxGroup3.list.splice(i,1,[])
+                }
+                
             }
+        },
+        //单个选择
+        handleCheckedCitiesChange(value,i) {
+            let checkedCount = value.list.length;
+            let status = checkedCount === this.selectcheckboxGroup3.list[i].length;
+            this.selectcheckboxGroup3.status.splice(i,1,status)
         }
     }
 }
@@ -183,6 +283,16 @@ export default {
                         display: flex;
                         padding: 8px 20px;
                         box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.05);
+                        /deep/.el-checkbox-button__inner{
+                            color: #1d1d1d;
+                        }
+                        /deep/.el-checkbox-button.is-checked .el-checkbox-button__inner{
+                            color: #2ABED1!important;
+                            border: 1px solid $light_color !important;
+                        }
+                        /deep/.el-checkbox-button__inner:hover{
+                            color: $light_color;
+                        }
                     }
                     .lists {
                         .li_data {
@@ -191,7 +301,7 @@ export default {
                             text-align: left;
                             width: 100%;
                             min-height: 40px;
-                            margin-top: 10px;
+                            margin-top: 14px;
                             box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.05);
                             h3 {
                                 font-size: 12px;
@@ -201,8 +311,25 @@ export default {
                                 background: #F5F5FB;
                             }
                             .el-checkbox-group {
-                                padding: 0 20px 8px 20px;
-                                
+                                padding: 0 20px 14px 20px; 
+                            }
+                            /deep/.titles{
+                                .el-checkbox__input{
+                                    display: none;
+                                }
+                                .el-checkbox__label{
+                                    box-sizing: border-box;
+                                   padding: 2px 10px;
+                                    font-weight: bold;
+                                    color: #1d1d1d;
+                                    margin-left: 20px;
+                                    border-radius: 4px!important;
+                                    border: 1px solid #DCDFE6;
+                                }
+                                .el-checkbox__input.is-checked + .el-checkbox__label{
+                                    color: #2ABED1!important;
+                                    border: 1px solid $light_color !important;
+                                }
                             }
                         }
                         .li_fen {

+ 18 - 1
src/views/bus/components/subMage.vue

@@ -121,7 +121,7 @@
 </template>
 
 <script>
-import { scribeData, subdis, updateArea, updateBuyerclass, updateInfotype, pushset, updatePush, projectUpdate,areaGetdata } from '@/api/api';
+import { scribeData, subdis, updateArea, updateBuyerclass, updateInfotype, pushset, updatePush, projectUpdate,areaGetdata,infotypeData} from '@/api/api';
 import vKey from './antistop.vue';
 import vDistri from './distribute.vue';
 import vWarn from './warnBox.vue';
@@ -193,9 +193,23 @@ export default {
               newArr += `${key} (${res.data.area[key].join('、')})、`
             }
           }
+          this.$refs.editArea.citys = res.data.area
           newArr = newArr.replace(/(.*)、/,'$1');
           this.bookForm.areas = newArr;
         })
+        //获取信息类型
+        infotypeData().then(res =>{
+            let arr = '';
+            console.log(res.data,"res.data")
+            res.data.forEach( v =>{
+                if(v.length>0){
+                    arr += `${v}、`
+                }
+            })
+            this.$refs.editModel.InformatioType = res.data;
+            arr = arr.replace(/(.*)、/,'$1');
+            this.bookForm.mesge = arr;
+        })
     },
     methods: {
         booked(num) {
@@ -237,6 +251,9 @@ export default {
                 this.digIndex = 'sub';
                 this.$refs.editModel.boxVisible = true;
                 this.digs = nums;
+            } else if (nums == 3) {
+                this.$refs.editModel.boxVisible = true;
+                this.digs = nums;
             }   
         },
         tuiChecked(val) {// 推送时间

+ 0 - 4
vue.config.js

@@ -40,10 +40,6 @@ module.exports = {
       "^/entdataexport": {
         // 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",
-        // target:'http://192.168.20.51:815/entbase',
-        // target:'http://192.168.20.51:813/entdataexport',
         target:'http://192.168.20.241:813',
         // target:'http://192.168.20.241:812',
         changeOrigin: true,