瀏覽代碼

Merge branch 'dev4.5' of http://192.168.3.207:8080/qmx/jy into dev4.5

zhangxinlei1996 4 年之前
父節點
當前提交
cf244e870c

+ 14 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -26,7 +26,7 @@ var vm = new Vue({
         this.$refs.dateItem.toggle()
         this.time = data.data
         initpage()
-      } else if(data.name === 'areaitem'){
+      } else if(data.name === 'areaItem'){
         this.$refs.areaItem.toggle()
         this.area = data.data.join('、')
       } else if(data.name === 'industryItem'){
@@ -35,6 +35,12 @@ var vm = new Vue({
       } else if(data.name === 'cateItem'){
         this.$refs.cateItem.toggle()
         this.industry = data.data.join(',')
+      } else if(data.name === 'keywordItem'){
+        this.$refs.keywordItem.toggle()
+        this.industry = data.data.join(',')
+      } else if(data.name === 'noticeItem'){
+        this.$refs.noticeItem.toggle()
+        this.industry = data.data.join(',')
       }
     },
     cancel: function(data){
@@ -43,7 +49,7 @@ var vm = new Vue({
         this.$refs.dateItem.toggle()
         // this.time = data.data
         initpage()
-      } else if(data.name === 'areaitem'){
+      } else if(data.name === 'areaItem'){
         this.$refs.areaItem.toggle()
         // this.area = data.data.join('、')
       } else if(data.name === 'industryItem'){
@@ -52,6 +58,12 @@ var vm = new Vue({
       } else if(data.name === 'cateItem'){
         this.$refs.cateItem.toggle()
         // this.industry = data.data.join(',')
+      } else if(data.name === 'keywordItem'){
+        this.$refs.keywordItem.toggle()
+        // this.industry = data.data.join(',')
+      } else if(data.name === 'noticeItem'){
+        this.$refs.noticeItem.toggle()
+        // this.industry = data.data.join(',')
       }
     }
   }

+ 7 - 7
src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html

@@ -72,19 +72,19 @@
               <div class="collec_li" v-for="(item, index) in listState.list" :key="index">
                 <div class="collec_head">
                   <div class="collec_title ellipsis-2">
-                    ${item.docName}
+                    ${item.title}
                   </div>
-                  <div class="collec_star" @click="collecClick(item.id)">
+                  <div class="collec_star" @click="collecClick(item._id)">
                     <span class="shoucang" v-if="condition"></span>
-                    <span class="weishoucang" v-if="!condition"></span>
+                    <!-- <span class="weishoucang" v-if="!condition"></span> -->
                   </div>
                 </div>
                 <div class="collec_action">
                   <ul class="collec_tags">
-                    <li class="tag_active">${item.area}</li>
-                    <li class="tag_active">${item.industry}</li>
-                    <li class="tag_active">${item.type}</li>
-                    <li class="tag_active">${item.price}</li>
+                    <li class="tag_active" v-if="item.area&&item.area!==''">${item.area}</li>
+                    <li class="tag_active" v-if="item.s_subscopeclass&&item.s_subscopeclass!==''">${item.s_subscopeclass}</li>
+                    <li class="tag_active" v-if="item.type&&item.type!==''">${item.type}</li>
+                    <li class="tag_active" v-if="item.bidamount&&item.bidamount!==''">${item.bidamount}</li>
                   </ul>
                   <div class="collec_time">${item.time}</div>
                 </div>

+ 5 - 3
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -124,10 +124,12 @@
                         <van-dropdown-item title="采购单位" ref="cateItem">
                             <cate-component @cancel="cancel" @confirm="confirm"></cate-component>
                         </van-dropdown-item>
-                        <van-dropdown-item title="关键词" ref="">
-                            <keyword-component></keyword-component>
+                        <van-dropdown-item title="关键词" ref="keywordItem">
+                            <keyword-component @cancel="cancel" @confirm="confirm"></keyword-component>
+                        </van-dropdown-item>
+                        <van-dropdown-item title="公告类型" ref="noticeItem">
+                            <notice-component @cancel="cancel" @confirm="confirm"></notice-component>
                         </van-dropdown-item>
-                        <notice-component></notice-component>
                     </van-dropdown-menu>
                 </div>
                 <div class="screen"></div>

+ 6 - 1
src/jfw/modules/subscribepay/src/util/vrew.go

@@ -260,11 +260,16 @@ func MergeKws(userId string) {
 	}
 }
 
-//m 月 超过一年传12+n月 如14; endtime 当前周期结束时间戳 int64 ;val -   1:年 2:月
+//m 月 超过一年传12+n月 如14; endtime 当前周期结束时间戳 int64 ;val -   1:年 2:月 3:季度
 func GetDATE(val int, m int, endtime int64) (_endtime time.Time) {
+	//一年12个月
 	if val == 1 {
 		m = m * 12
 	}
+	//一个季度3个月
+	if val == 3 {
+		m = m * 3
+	}
 	endFormat := qutil.FormatDateByInt64(&endtime, qutil.Date_Short_Layout)
 	date_y, _ := strconv.Atoi(strings.Split(endFormat, "-")[0])
 	date_m, _ := strconv.Atoi(strings.Split(endFormat, "-")[1])

+ 6 - 0
src/web/staticres/common-module/collection/css/index.css

@@ -31,6 +31,9 @@
 .collection .search-container{
   position: relative;
 }
+.collection .van-dropdown-menu__bar{
+  box-shadow: none;
+}
 .collection .van-dropdown-menu__bar.van-dropdown-menu__bar--opened{
   width: auto;
   overflow: auto;
@@ -338,6 +341,9 @@
   flex: 1;
   display: flex;
 }
+.collection .unitType .van-cell.van-cell--clickable.checkActive .van-cell__title{
+  color: #2ABED1;
+}
 .collection .unitType .van-tabs__wrap{
   height: 100%;
   overflow: auto;

+ 2 - 2
src/web/staticres/common-module/collection/js/area-mobile.js

@@ -211,7 +211,7 @@ var areaComponent = {
       this.refresh = !this.refresh
       this.refresh = !this.refresh
       let params = {
-        name: 'areaitem',
+        name: 'areaItem',
         data: []
       }
       this.$emit('cancel', params)
@@ -228,7 +228,7 @@ var areaComponent = {
       console.log(t)
       console.log(value.join(','))
       let params = {
-        name: 'areaitem',
+        name: 'areaItem',
         data: value
       }
       this.$emit('confirm', params)

+ 4 - 1
src/web/staticres/common-module/collection/js/cate-mobile.js

@@ -7,6 +7,7 @@ var cateComponentTemplate = `<div class="j-container">
         clickable
         type="primary"
         title="全选"
+        :class="{checkActive:checkedAll==true}"
         @click="checkBoxAll"
         >
         <template #right-icon>
@@ -25,6 +26,7 @@ var cateComponentTemplate = `<div class="j-container">
       <van-cell
           clickable
           title="全选"
+          :class="{checkActive:item[Object.keys(item)[1]]==true}"
           @click="checkAll(item)"
           >
           <template #right-icon>
@@ -37,6 +39,7 @@ var cateComponentTemplate = `<div class="j-container">
           clickable
           label-disabled="false"
           :key="i"
+          :class="{checkActive:iitem.type==true}"
           :title="iitem.name"
           @click="toggleCheck(iitem, item)"
         >
@@ -162,7 +165,7 @@ var cateComponent = {
     },
     resetAll:function() {
       let params = {
-        name: 'industryItem',
+        name: 'cateItem',
         data: ''
       }
       this.$emit('cancel', params)

+ 82 - 44
src/web/staticres/common-module/collection/js/index.js

@@ -45,13 +45,13 @@ var vNode = {
     },
     limitshow: false, // 筛选框显示
     condition: true, // 列表星星显示
-    checked: false,
     personTagactive:0, //个人标签选择按钮下标
     colDate:0 // 收藏日期选择按钮下标
   },
   computed: {},
   created () {
     this.getList()
+    this.getTagsList()
   },
   mounted() {
   },
@@ -67,61 +67,99 @@ var vNode = {
       return this.$refs.searchContainer
     },
     getList: function() {
-      this.checked = false
-      this.listState.list = [
-        {
-          id: 1,
-          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安市高级职业技术学校台式电...',
-          area: '江苏',
-          industry: '建筑工程',
-          type: '招标',
-          price: 10,
-          time: '2021/06/15'
-        },
-        {
-          id: 2,
-          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-          area: '江苏',
-          industry: '建筑工程',
-          type: '招标',
-          price: 100,
-          time: '2021/06/14'
+      let _this = this
+      let params = {
+        pagenum: _this.listState.pageNum
+      }
+      $.ajax({
+        url: '/publicapply/bidcoll/list',
+        type: "POST",
+        contentType: 'application/json;charset=utf-8',
+        data: JSON.stringify(params),
+        success: function(res){
+          console.log(res)
         },
+        error: function(err){
+          console.log(err)
+        }
+      })
+      this.listState.list = [
         {
-          id: 2,
-          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-          area: '江苏',
-          industry: '建筑工程',
-          type: '招标',
-          price: 100,
-          time: '2021/06/14'
+          "_id": "ABCY1wIfjwOOyw7I39zcE8sMDI%2FQTBgcUJ1Px4sODogZ31wAFpUCeg%3D",
+          "title": "吉林市鑫业建筑安装有限公司舒兰市人民医院异地新建项目户外门采购项目中标公告",
+          "area": "吉林",
+          "buyerclass": "建筑业",
+          "type": "成交",
+          "s_subscopeclass": "建筑工程",
+          "publishtime": 1619573067,
+          "budget": null,
+          "bidamount": 2270472.4
         },
         {
-          id: 2,
-          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-          area: '江苏',
-          industry: '建筑工程',
-          type: '招标',
-          price: 100,
-          time: '2021/06/14'
+          "_id": "ABCY2EEcjxYNyAsI2t2c2UoDScoGj10XFJ%2BPy8FJiEgWX1zYy9UCbE%3D",
+          "title": "广东实验中学货物采购合同采购合同",
+          "area": "广东",
+          "buyerclass": "学校",
+          "type": "合同",
+          "s_subscopeclass": "",
+          "publishtime": 1514735849,
+          "budget": 1799691.27,
+          "bidamount": 1728000
         },
         {
-          id: 2,
-          docName: '淮安市高级职业技术学校台式电脑采购项目招标公告淮安业技术学校台式电...',
-          area: '江苏',
-          industry: '建筑工程',
-          type: '招标',
-          price: 100,
-          time: '2021/06/14'
+          "_id": "ABCY1wIfjwOAj07NFlzcE8sMDI%2FQTBgcUJ1Px4vIDogUXxwBFpUCYM%3D",
+          "title": "大埔县农业农村局2021年食用农产品抽检服务项目成交公告",
+          "area": "广东",
+          "buyerclass": "农业",
+          "type": "成交",
+          "s_subscopeclass": "服务采购",
+          "publishtime": 1619573075,
+          "budget": null,
+          "bidamount": 223500
         }
       ]
     },
+    // 获取个人标签列表
+    getTagsList: function() {
+      let _this = this
+      $.ajax({
+        url: '/publicapply/bidcoll/getLabel',
+        type: "POST",
+        success: function(res){
+          console.log(res)
+        },
+        error: function(err){
+          console.log(err)
+        }
+      })
+    },
     // 取消收藏
     collecClick: function(id) {
-      this.listState.list.map((item) => {
+      let _this = this
+      let params = {
+        baction: 'R',
+        binfo: [
+          {
+            bid: id
+          }
+        ]
+      }
+      $.ajax({
+        url: '/publicapply/bidcoll/action',
+        type: "POST",
+        contentType: 'application/json;charset=utf-8',
+        data:JSON.stringify(params),
+        success: function(res){
+          console.log(res)
+        },
+        error: function(err){
+          console.log(err)
+        }
+      })
+      this.listState.list.map((item,index) => {
         console.log(item)
-        if(id === item.id) {
-          this.condition = false
+        if(id === item._id) {
+          this.getList()
         }
       })
     },

+ 3 - 0
src/web/staticres/common-module/collection/js/industry-mobile.js

@@ -7,6 +7,7 @@ var industryComponentTemplate = `<div class="j-container">
         clickable
         type="primary"
         title="全选"
+        :class="{checkActive:checkedAll==true}"
         @click="checkBoxAll"
         >
         <template #right-icon>
@@ -25,6 +26,7 @@ var industryComponentTemplate = `<div class="j-container">
       <van-cell
           clickable
           title="全选"
+          :class="{checkActive:item[Object.keys(item)[1]]==true}"
           @click="checkAll(item)"
           >
           <template #right-icon>
@@ -37,6 +39,7 @@ var industryComponentTemplate = `<div class="j-container">
           clickable
           label-disabled="false"
           :key="i"
+          :class="{checkActive:iitem.type==true}"
           :title="iitem.name"
           @click="toggleCheck(iitem, item)"
         >

+ 161 - 42
src/web/staticres/common-module/collection/js/keyword-mobile.js

@@ -1,40 +1,53 @@
 var keywordComponentTemplate = `<div class="j-container">
 <div class="j-main unitTab">
   <van-tabs type="card" class="unitType">
-    <van-tab title="全部">内容 3</van-tab>
-    <van-tab v-for="(item, index) in Object.keys(list)" :key="index">
+    <van-tab title="全部">
+      <van-cell-group>
+        <van-cell
+        clickable
+        type="primary"
+        title="全选"
+        :class="{checkActive:checkedAll==true}"
+        @click="checkBoxAll"
+        >
+        <template #right-icon>
+          <van-checkbox checked-color="#2ABED1" :bind-group="false" v-model="checkedAll"></van-checkbox>
+        </template>
+        </van-cell>
+      </van-cell-group>
+    </van-tab>
+    <van-tab v-for="(item, index) in tablist" :key="index">
       <template #title>
         <div class="tabtitle">
-          {{item}}
+          {{Object.keys(item)[0]}}
         </div>
-        <div class="optionnum">36/51</div>
+        <div class="optionnum">36/{{item[Object.keys(item)[0]].length}}</div>
       </template>
-      <van-checkbox-group v-model="result" ref="checkboxGroup">
-        <van-cell-group>
-          <van-cell
-          v-model="checked"
+      <van-cell
           clickable
-          type="primary"
           title="全选"
-          @click="checkAll"
+          :class="{checkActive:item[Object.keys(item)[1]]==true}"
+          @click="checkAll(item)"
           >
           <template #right-icon>
-            <van-checkbox checked-color="#2ABED1"></van-checkbox>
+            <van-checkbox checked-color="#2ABED1" :bind-group="false" v-model="item[Object.keys(item)[1]]"></van-checkbox>
           </template>
-          </van-cell>
-          <van-cell
-            v-for="(con, i) in list[item]"
-            clickable
-            :key="i"
-            :title="con"
-            @click="toggle(index)"
-          >
-            <template #right-icon>
-              <van-checkbox checked-color="#2ABED1" :name="con" ref="checkboxes" />
-            </template>
-          </van-cell>
-        </van-cell-group>
-      </van-checkbox-group>
+      </van-cell>
+      <van-cell-group>
+        <van-cell
+          v-for="(iitem, i) in item[Object.keys(item)[0]]"
+          clickable
+          label-disabled="false"
+          :key="i"
+          :class="{checkActive:iitem.type==true}"
+          :title="iitem.name"
+          @click="toggleCheck(iitem, item)"
+        >
+          <template #right-icon>
+            <van-checkbox checked-color="#2ABED1" :bind-group="false" v-model="iitem.type" :name="iitem.name" ref="checkboxes" />
+          </template>
+        </van-cell>
+      </van-cell-group>
     </van-tab>
   </van-tabs>
 </div>
@@ -52,29 +65,135 @@ var keywordComponent = {
   template: keywordComponentTemplate,
   data:function () {
     return {
-      result: [],
-      list: {
-        "党政机关事业单位": ['人大', '政协', '党委办','组织', '宣传', '统战', '纪委', '政府办', '发改委','财政','教育','科技','工信','民政', '民宗', '人社', '公安', '检察院','法院', '司法', '应急管理', '军队', '自然资源', '生态环境','住建', '市政',  '城管', '交通', '水利','农业','文旅', '卫健委','医疗','学校','档案', '体育', '政务中心', '机关事务', '国资委','海关','税务', '市场监管', '商务','人行', '银保监', '证监', '审计', '出版广电','统计', '公共资源交易', '社会团体','气象'],
-        "企业": ['传媒','采矿业', '电信行业', '金融业', '建筑业', '能源化工', '农林牧渔','批发零售', '信息技术', '运输物流', '制造业', '住宿餐饮']  
-      },
-      checked: true
+      initlist: [],
+      tablist: [],
+      checkedAll: false
     }
   },
+  created () {
+    this.getIndustryData()
+  },
   methods: {
-    checkAll: function(){
-      console.log(this.checked)
-      if(this.checked){
-        this.checked = false
-        this.$refs.checkboxGroup.toggleAll(true);
+    // 获取行业数据
+    getIndustryData: function(){
+      const _this = this
+      $.ajax({
+        url: '/subscribepay/afterPay/getUserInfo',
+        type:'POST',
+        success: function(res){
+          console.log(res)
+          this.initlist = res.userData.o_vipjy.a_items
+          let data = res.userData.o_vipjy.a_items
+          let maxarr = []
+          data.forEach(function(item,index) {
+            let minarr = []
+            let keyname = item.s_item
+            let eachArr = item.a_key
+            eachArr.forEach(function(data, i){
+              data = {
+                name: data.key[0],
+                type: false
+              }
+              minarr.push(data)
+            })
+            let obj = {
+              [keyname]: minarr,
+              type: false
+            }
+            maxarr.push(obj)
+          })
+          _this.tablist = maxarr
+          console.log(maxarr)
+        },
+        error: function(err){
+          console.log(err)
+        }
+      })
+    },
+    // 总全选
+    checkBoxAll:function() {
+      if(this.checkedAll){
+        this.tablist.forEach(function(item, index){
+          item[Object.keys(item)[0]].forEach(function(data, i){
+            item.type = false
+            data.type = false
+          })
+        })
+        this.checkedAll = false
+      }else{
+        this.tablist.forEach(function(item, index){
+          item[Object.keys(item)[0]].forEach(function(data, i){
+            item.type = true
+            data.type = true
+          })
+        })
+        this.checkedAll = true
+      }
+    },
+    // 模块全选
+    checkAll: function(data){
+      console.log(data)
+      let selectBool = data[Object.keys(data)[1]]
+      let dataArr = data[Object.keys(data)[0]]
+      console.log(selectBool, dataArr)
+      if(selectBool) {
+        dataArr.forEach(function(item, index){
+          item.type = false
+        })
       }else{
-        this.checked = true
-        this.$refs.checkboxGroup.toggleAll(false);
+        dataArr.forEach(function(item, index){
+          item.type = true
+        })
       }
     },
-    resetAll:function() {},
-    onConfirm:function() {},
-    toggle: function (index) {
-      this.$refs.checkboxes[index].toggle()
+    // 模块单选
+    toggleCheck: function (data, item) {
+      if(data.type){
+        data.type = false
+      }else{
+        data.type = true
+      }
+
+      // 模块全部选中,全选自动勾选
+      const allselect = item[Object.keys(item)[0]].some(function(sum, index){
+        if(sum.type == false){
+          return true
+        }
+      })
+      item[Object.keys(item)[1]] = !allselect
+
+      // 只要有一个没有选中,总全选不勾选
+      let industryAll = this.tablist.some(function(itemall, index){
+        if(itemall.type == false) {
+          return true
+        }
+      })
+      this.checkedAll = !industryAll
+    },
+    resetAll:function() {
+      let params = {
+        name: 'keywordItem',
+        data: ''
+      }
+      this.$emit('cancel', params)
+    },
+    // 确定按钮
+    onConfirm:function() {
+      let keywordArr = []
+      this.tablist.forEach(function(item, index){
+        item[Object.keys(item)[0]].forEach(function(data, i) {
+          if(data.type){
+            console.log(data)
+            let str = Object.keys(item)[0] +'_'+data.name
+            keywordArr.push(str)
+          }
+        })
+      })
+      let params = {
+        name: 'keywordItem',
+        data: keywordArr
+      }
+      this.$emit('confirm', params)
     }
   }
 }

+ 213 - 15
src/web/staticres/common-module/collection/js/notice-mobile.js

@@ -1,26 +1,224 @@
-var noticeComponentTemplate = `
-<van-dropdown-item title="公告类型" v-model="params.value" :options="params.option4">
-                            
-</van-dropdown-item>`
+var noticeComponentTemplate = `<div class="j-container">
+<div class="j-main unitTab">
+  <van-tabs type="card" class="unitType">
+    <van-tab title="全部">
+      <van-cell-group>
+        <van-cell
+        clickable
+        type="primary"
+        title="全选"
+        :class="{checkActive:checkedAll==true}"
+        @click="checkBoxAll"
+        >
+        <template #right-icon>
+          <van-checkbox checked-color="#2ABED1" :bind-group="false" v-model="checkedAll"></van-checkbox>
+        </template>
+        </van-cell>
+      </van-cell-group>
+    </van-tab>
+    <van-tab v-for="(item, index) in tablist" :key="index">
+      <template #title>
+        <div class="tabtitle">
+          {{Object.keys(item)[0]}}
+        </div>
+        <div class="optionnum">36/{{item[Object.keys(item)[0]].length}}</div>
+      </template>
+      <van-cell
+          :class="{checkActive:item[Object.keys(item)[1]]==true}"
+          clickable
+          title="全选"
+          @click="checkAll(item)"
+          >
+          <template #right-icon>
+            <van-checkbox checked-color="#2ABED1" :bind-group="false" v-model="item[Object.keys(item)[1]]"></van-checkbox>
+          </template>
+      </van-cell>
+      <van-cell-group>
+        <van-cell
+          v-for="(iitem, i) in item[Object.keys(item)[0]]"
+          clickable
+          label-disabled="false"
+          :key="i"
+          :title="iitem.name"
+          :class="{checkActive:iitem.type==true}"
+          @click="toggleCheck(iitem, item)"
+        >
+          <template #right-icon>
+            <van-checkbox checked-color="#2ABED1" :bind-group="false" v-model="iitem.type" :name="iitem.name" ref="checkboxes" />
+          </template>
+        </van-cell>
+      </van-cell-group>
+    </van-tab>
+  </van-tabs>
+</div>
+<div class="j-footer">
+  <div class="j-button-group">
+    <button class="j-button-cancel" @click="resetAll">重置</button>
+    <button class="j-button-confirm" @click="onConfirm">确认</button>
+  </div>
+</div>
+</div>
+`
 
 var noticeComponent = {
   name: 'notice-mobile',
   template: noticeComponentTemplate,
   data:function () {
     return {
-      // 下拉菜单参数
-      params: {
-        value: 'a',
-        option4: [
-          { text: '有联系方式', value: 'a' },
-          { text: '无联系方式', value: 'b' },
-          { text: '无联系方式', value: 'b' },
-          { text: '无联系方式', value: 'b' },
-          { text: '无联系方式', value: 'b' },
-        ],
-      },
+      tablist: [],
+      checkedAll: false
     }
   },
+  created () {
+    this.getIndustryData()
+  },
   methods: {
+    // 获取行业数据
+    getIndustryData: function(){
+      const _this = this
+      _this.tablist =  [
+        {
+          "拟建项目": [
+            "拟建项目"
+          ]
+        },
+        {
+          "招标预告": [
+            "招标预告"
+          ]
+        },
+        {
+          "招标公告": [
+            "招标",
+            "邀标",
+            "询价",
+            "竞谈",
+            "单一",
+            "竞价",
+            "变更",
+            "其它"
+          ]
+        },
+        {
+          "招标结果": [
+            "中标",
+            "成交",
+            "废标",
+            "流标"
+          ]
+        },
+        {
+          "招标信用信息": [
+            "合同",
+            "验收",
+            "违规"
+          ]
+        }
+      ]
+      let maxarr = []
+      _this.tablist.forEach(function(item,index) {
+        let minarr = []
+        let keyname = Object.keys(item)[0]
+        let eachArr = item[Object.keys(item)[0]]
+        eachArr.forEach(function(data, i){
+          data = {
+            name: data,
+            type: false
+          }
+          minarr.push(data)
+        })
+        let obj = {
+          [keyname]: minarr,
+          type: false
+        }
+        maxarr.push(obj)
+      })
+      _this.tablist = maxarr
+    },
+    // 总全选
+    checkBoxAll:function() {
+      if(this.checkedAll){
+        this.tablist.forEach(function(item, index){
+          item[Object.keys(item)[0]].forEach(function(data, i){
+            item.type = false
+            data.type = false
+          })
+        })
+        this.checkedAll = false
+      }else{
+        this.tablist.forEach(function(item, index){
+          item[Object.keys(item)[0]].forEach(function(data, i){
+            item.type = true
+            data.type = true
+          })
+        })
+        this.checkedAll = true
+      }
+    },
+    // 模块全选
+    checkAll: function(data){
+      console.log(data)
+      let selectBool = data[Object.keys(data)[1]]
+      let dataArr = data[Object.keys(data)[0]]
+      console.log(selectBool, dataArr)
+      if(selectBool) {
+        dataArr.forEach(function(item, index){
+          item.type = false
+        })
+      }else{
+        dataArr.forEach(function(item, index){
+          item.type = true
+        })
+      }
+    },
+    // 模块单选
+    toggleCheck: function (data, item) {
+      if(data.type){
+        data.type = false
+      }else{
+        data.type = true
+      }
+
+      // 模块全部选中,全选自动勾选
+      const allselect = item[Object.keys(item)[0]].some(function(sum, index){
+        if(sum.type == false){
+          return true
+        }
+      })
+      item[Object.keys(item)[1]] = !allselect
+
+      // 只要有一个没有选中,总全选不勾选
+      let industryAll = this.tablist.some(function(itemall, index){
+        if(itemall.type == false) {
+          return true
+        }
+      })
+      this.checkedAll = !industryAll
+    },
+    resetAll:function() {
+      let params = {
+        name: 'noticeItem',
+        data: ''
+      }
+      this.$emit('cancel', params)
+    },
+    // 确定按钮
+    onConfirm:function() {
+      let noticeArr = []
+      this.tablist.forEach(function(item, index){
+        item[Object.keys(item)[0]].forEach(function(data, i) {
+          if(data.type){
+            console.log(data)
+            let str = Object.keys(item)[0] +'_'+data.name
+            noticeArr.push(str)
+          }
+        })
+      })
+      let params = {
+        name: 'noticeItem',
+        data: noticeArr
+      }
+      this.$emit('confirm', params)
+    }
   }
 }