|  | @@ -10,7 +10,7 @@
 | 
											
												
													
														|  |  <!--              <div class="org-label">检查机构</div>-->
 |  |  <!--              <div class="org-label">检查机构</div>-->
 | 
											
												
													
														|  |  <!--            </van-col>-->
 |  |  <!--            </van-col>-->
 | 
											
												
													
														|  |              <van-col span="24">
 |  |              <van-col span="24">
 | 
											
												
													
														|  | -              <org-tree v-model="query.checkOrgId" placeholder="选择检查机构" @change="refreshData"></org-tree>
 |  | 
 | 
											
												
													
														|  | 
 |  | +              <org-tree v-model="query.checkOrgId" placeholder="选择检查机构" @change="changeOrgId"></org-tree>
 | 
											
												
													
														|  |              </van-col>
 |  |              </van-col>
 | 
											
												
													
														|  |            </van-row>
 |  |            </van-row>
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
										
											
												
													
														|  | @@ -27,7 +27,12 @@
 | 
											
												
													
														|  |        </div>
 |  |        </div>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        <div class="van-hairline--bottom">
 |  |        <div class="van-hairline--bottom">
 | 
											
												
													
														|  | -        <search-select-cell title="检查角色" v-model="query.roldIds" :dataList="rolesList" :prop="prop" @change="refreshData"/>
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <search-select-cell
 | 
											
												
													
														|  | 
 |  | +          title="检查角色"
 | 
											
												
													
														|  | 
 |  | +          v-model="query.roldIds"
 | 
											
												
													
														|  | 
 |  | +          :dataList="rolesList"
 | 
											
												
													
														|  | 
 |  | +          :prop="prop"
 | 
											
												
													
														|  | 
 |  | +          @change="refreshData"/>
 | 
											
												
													
														|  |        </div>
 |  |        </div>
 | 
											
												
													
														|  |        <div class="van-hairline--bottom">
 |  |        <div class="van-hairline--bottom">
 | 
											
												
													
														|  |          <date-cell title="检查日期"  v-model="query.taskTime" date-type="date" @change="refreshData"/>
 |  |          <date-cell title="检查日期"  v-model="query.taskTime" date-type="date" @change="refreshData"/>
 | 
											
										
											
												
													
														|  | @@ -36,17 +41,15 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        <div class="card-list">
 |  |        <div class="card-list">
 | 
											
												
													
														|  |          <Scroll
 |  |          <Scroll
 | 
											
												
													
														|  | -          @pulldown="refreshData"
 |  | 
 | 
											
												
													
														|  | -          @pullup="getDataList"
 |  | 
 | 
											
												
													
														|  | -          :data='dataList'
 |  | 
 | 
											
												
													
														|  | -          :pullup="pullup"
 |  | 
 | 
											
												
													
														|  | -          class="wrapper"
 |  | 
 | 
											
												
													
														|  | -          ref="wrapper">
 |  | 
 | 
											
												
													
														|  | 
 |  | +          ref="Scroll"
 | 
											
												
													
														|  | 
 |  | +          @refresh="refreshData"
 | 
											
												
													
														|  | 
 |  | +          @loadMore="getDataList"
 | 
											
												
													
														|  | 
 |  | +          :pullup="pullup">
 | 
											
												
													
														|  |            <van-empty description="暂无数据" v-if="!dataList || dataList.length === 0" />
 |  |            <van-empty description="暂无数据" v-if="!dataList || dataList.length === 0" />
 | 
											
												
													
														|  |            <div  v-else class="list-item">
 |  |            <div  v-else class="list-item">
 | 
											
												
													
														|  | -            <van-panel v-for="(v,i) in dataList" :title="v.taskName" :desc="`${formatDate(v.planStartTime,'YYYY-MM-DD')}~${formatDate(v.planEndTime,'YYYY-MM-DD')}`" >
 |  | 
 | 
											
												
													
														|  | 
 |  | +            <van-panel v-for="(v,i) in dataList" :title="v.taskName" :desc="rangDate(formatDate(v.planStartTime,'DATE'),formatDate(v.planEndTime,'DATE'))" >
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -              <van-collapse v-model="active" :key="v.planId">
 |  | 
 | 
											
												
													
														|  | 
 |  | +              <van-collapse v-model="active" :key="v.planId" @change="collapseChange">
 | 
											
												
													
														|  |                  <van-collapse-item :name="v.planId" >
 |  |                  <van-collapse-item :name="v.planId" >
 | 
											
												
													
														|  |                    <template #title>
 |  |                    <template #title>
 | 
											
												
													
														|  |                      <div class="collapse-title">
 |  |                      <div class="collapse-title">
 | 
											
										
											
												
													
														|  | @@ -77,7 +80,7 @@ import OrgTree from '@/components/orgTree'
 | 
											
												
													
														|  |  import KList from '@/components/list'
 |  |  import KList from '@/components/list'
 | 
											
												
													
														|  |  import DateCell from '@/components/dateCell'
 |  |  import DateCell from '@/components/dateCell'
 | 
											
												
													
														|  |  import SelectCell from '@/components/selectCell'
 |  |  import SelectCell from '@/components/selectCell'
 | 
											
												
													
														|  | -import SearchSelectCell from '@/components/SearchSelectCell'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import SearchSelectCell from '@/components/Yselectcell'
 | 
											
												
													
														|  |  import Scroll from '@/components/scroll/scroll'
 |  |  import Scroll from '@/components/scroll/scroll'
 | 
											
												
													
														|  |  import {dataList,registerRole} from './api'
 |  |  import {dataList,registerRole} from './api'
 | 
											
												
													
														|  |  import {mapGetters} from "vuex";
 |  |  import {mapGetters} from "vuex";
 | 
											
										
											
												
													
														|  | @@ -103,7 +106,10 @@ export default {
 | 
											
												
													
														|  |          beCheckedOrgId:null,
 |  |          beCheckedOrgId:null,
 | 
											
												
													
														|  |          roldIds:[],
 |  |          roldIds:[],
 | 
											
												
													
														|  |          state:'1',
 |  |          state:'1',
 | 
											
												
													
														|  | 
 |  | +        pageNum:1,
 | 
											
												
													
														|  | 
 |  | +        pageSize:10,
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
												
													
														|  | 
 |  | +      total:0,
 | 
											
												
													
														|  |        rolesList:[],
 |  |        rolesList:[],
 | 
											
												
													
														|  |        prop:{
 |  |        prop:{
 | 
											
												
													
														|  |          label:'name',
 |  |          label:'name',
 | 
											
										
											
												
													
														|  | @@ -120,25 +126,35 @@ export default {
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    mounted() {
 |  |    mounted() {
 | 
											
												
													
														|  |      this.initData();
 |  |      this.initData();
 | 
											
												
													
														|  | 
 |  | +    this.query.checkOrgId = this.orgId;
 | 
											
												
													
														|  | 
 |  | +    this.getRoleList();
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    computed:{
 |  |    computed:{
 | 
											
												
													
														|  |      ...mapGetters(['orgId','dictionary']),
 |  |      ...mapGetters(['orgId','dictionary']),
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  | -  watch:{
 |  | 
 | 
											
												
													
														|  | -    'query.checkOrgId':{
 |  | 
 | 
											
												
													
														|  | -      handler(v){
 |  | 
 | 
											
												
													
														|  | -        this.getRoleList();
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | -  },
 |  | 
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  |      formatDate,
 |  |      formatDate,
 | 
											
												
													
														|  | 
 |  | +    changeOrgId(){
 | 
											
												
													
														|  | 
 |  | +      console.log(123,'2131')
 | 
											
												
													
														|  | 
 |  | +      this.query.roldIds = [];
 | 
											
												
													
														|  | 
 |  | +      this.getRoleList();
 | 
											
												
													
														|  | 
 |  | +      this.refreshData();
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    collapseChange(){
 | 
											
												
													
														|  | 
 |  | +      console.log('collapseChange')
 | 
											
												
													
														|  | 
 |  | +      this.$nextTick(()=>{
 | 
											
												
													
														|  | 
 |  | +        this.$refs.Scroll.refresh();
 | 
											
												
													
														|  | 
 |  | +      })
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |      changeList(item,type){
 |  |      changeList(item,type){
 | 
											
												
													
														|  |        this.$set(item,'active',type);
 |  |        this.$set(item,'active',type);
 | 
											
												
													
														|  | 
 |  | +      //this.$refs.Scroll.refresh();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      refreshData(){
 |  |      refreshData(){
 | 
											
												
													
														|  | 
 |  | +      console.log('sadad')
 | 
											
												
													
														|  | 
 |  | +      this.pullup = true;
 | 
											
												
													
														|  |        this.query.pageNum = 1;
 |  |        this.query.pageNum = 1;
 | 
											
												
													
														|  | -      this.pullup = false;
 |  | 
 | 
											
												
													
														|  | 
 |  | +      this.total = 0;
 | 
											
												
													
														|  |        this.dataList = [];
 |  |        this.dataList = [];
 | 
											
												
													
														|  |        this.getDataList();
 |  |        this.getDataList();
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
										
											
												
													
														|  | @@ -153,20 +169,43 @@ export default {
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      getDataList(){
 |  |      getDataList(){
 | 
											
												
													
														|  | 
 |  | +      if( this.dataList.length !== 0 && this.dataList?.length >= this.total) {
 | 
											
												
													
														|  | 
 |  | +        this.pullup = false;
 | 
											
												
													
														|  | 
 |  | +        this.$toast('已加载完毕');
 | 
											
												
													
														|  | 
 |  | +        return;
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  |        let data = {
 |  |        let data = {
 | 
											
												
													
														|  |          ...this.query
 |  |          ...this.query
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        if(!this.query.checkOrgId) return this.$toast('请选择机构');
 |  |        if(!this.query.checkOrgId) return this.$toast('请选择机构');
 | 
											
												
													
														|  |        dataList(data).then(res=>{
 |  |        dataList(data).then(res=>{
 | 
											
												
													
														|  | -        this.dataList = res.rows.map(v=>{
 |  | 
 | 
											
												
													
														|  | -          v.active = 1
 |  | 
 | 
											
												
													
														|  | -          return v
 |  | 
 | 
											
												
													
														|  | -        });
 |  | 
 | 
											
												
													
														|  | -        this.active = res.rows.map(v=>{
 |  | 
 | 
											
												
													
														|  | -          return v.planId
 |  | 
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        if(res.total === '0'){
 | 
											
												
													
														|  | 
 |  | +          this.pullup = false;
 | 
											
												
													
														|  | 
 |  | +          this.$toast('已加载完毕');
 | 
											
												
													
														|  | 
 |  | +          return
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        this.total = res.total;
 | 
											
												
													
														|  | 
 |  | +        if(this.dataList.length < res.total) {
 | 
											
												
													
														|  | 
 |  | +          //this.dataFn(res.row);
 | 
											
												
													
														|  | 
 |  | +          this.dataList = [...this.dataList,...res.rows];
 | 
											
												
													
														|  | 
 |  | +          this.$nextTick(()=>{
 | 
											
												
													
														|  | 
 |  | +            this.$refs.Scroll.loadMoreFinish()
 | 
											
												
													
														|  | 
 |  | +            //this.$refs.Scroll.refresh();
 | 
											
												
													
														|  | 
 |  | +          })
 | 
											
												
													
														|  | 
 |  | +          this.pullup = true;
 | 
											
												
													
														|  | 
 |  | +          this.query.pageNum++;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |        })
 |  |        })
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    dataFn(arr){
 | 
											
												
													
														|  | 
 |  | +      this.dataList = arr.map(v=>{
 | 
											
												
													
														|  | 
 |  | +        v.active = 1
 | 
											
												
													
														|  | 
 |  | +        return v
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +      this.active = arr.map(v=>{
 | 
											
												
													
														|  | 
 |  | +        return v.planId
 | 
											
												
													
														|  | 
 |  | +      })
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 |