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