|  | @@ -3,11 +3,10 @@
 | 
	
		
			
				|  |  |      title="选择检查要点"
 | 
	
		
			
				|  |  |      :visible.sync="isShow"
 | 
	
		
			
				|  |  |      class="g-dialog-select-safe-check"
 | 
	
		
			
				|  |  | -    :close-on-click-modal="false"
 | 
	
		
			
				|  |  | -    destroy-on-close
 | 
	
		
			
				|  |  |      width="55%"
 | 
	
		
			
				|  |  |      top="10vh"
 | 
	
		
			
				|  |  |      append-to-body
 | 
	
		
			
				|  |  | +    @close="closed"
 | 
	
		
			
				|  |  |    >
 | 
	
		
			
				|  |  |      <div class="el-dialog-div">
 | 
	
		
			
				|  |  |        <g-search-table
 | 
	
	
		
			
				|  | @@ -92,6 +91,7 @@ export default {
 | 
	
		
			
				|  |  |        selectList: [],
 | 
	
		
			
				|  |  |        ruleList: [],
 | 
	
		
			
				|  |  |        search: this.emptySearch(),
 | 
	
		
			
				|  |  | +      prevOrgType: null,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {},
 | 
	
	
		
			
				|  | @@ -109,29 +109,38 @@ export default {
 | 
	
		
			
				|  |  |      // defaultSelect:{
 | 
	
		
			
				|  |  |      //   type:Array
 | 
	
		
			
				|  |  |      // },
 | 
	
		
			
				|  |  | -    orgType:{
 | 
	
		
			
				|  |  | -      type:[String,Number]
 | 
	
		
			
				|  |  | +    orgType: {
 | 
	
		
			
				|  |  | +      type: [String, Number],
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    show(defaultSelect) {
 | 
	
		
			
				|  |  | -      this.search = this.emptySearch();
 | 
	
		
			
				|  |  | +    show(defaultSelect) {      
 | 
	
		
			
				|  |  |        this.isShow = true;
 | 
	
		
			
				|  |  |        if (defaultSelect && defaultSelect.map) {
 | 
	
		
			
				|  |  |          this.selectList = defaultSelect.map((s) => ({ id: s }));
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      ruleListForOrg({ orgType: this.orgType }).then((r) => {
 | 
	
		
			
				|  |  | -        this.ruleList = r.data;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        if (r.data && r.data.length > 0) {
 | 
	
		
			
				|  |  | -          this.search.ruleId = r.data[0].id;
 | 
	
		
			
				|  |  | +      if (this.prevOrgType == this.orgType) {
 | 
	
		
			
				|  |  | +        this.search.itemName=null;
 | 
	
		
			
				|  |  | +        if (this.search.ruleId) {
 | 
	
		
			
				|  |  | +          this.$refs.st.search();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        this.search = this.emptySearch();
 | 
	
		
			
				|  |  | +        ruleListForOrg({ orgType: this.orgType }).then((r) => {
 | 
	
		
			
				|  |  | +          this.ruleList = r.data;
 | 
	
		
			
				|  |  | +          this.prevOrgType = this.orgType;
 | 
	
		
			
				|  |  | +          if (r.data && r.data.length > 0) {
 | 
	
		
			
				|  |  | +            this.search.ruleId = r.data[0].id;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onHide() {
 | 
	
		
			
				|  |  |        this.isShow = false;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    closed() {
 | 
	
		
			
				|  |  | +      this.$refs.st.dataList=[];
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      onSelect(item) {
 | 
	
		
			
				|  |  |        this.selectList = item;
 | 
	
		
			
				|  |  |      },
 |