|  | @@ -0,0 +1,177 @@
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +  <DialogCom
 | 
	
		
			
				|  |  | +    title="选取演练范本"
 | 
	
		
			
				|  |  | +    :visible.sync="isShow"
 | 
	
		
			
				|  |  | +    class="g-dialog-select-safe-check"
 | 
	
		
			
				|  |  | +    :close-on-click-modal="false"
 | 
	
		
			
				|  |  | +    width="75%"
 | 
	
		
			
				|  |  | +    top="10vh"
 | 
	
		
			
				|  |  | +    append-to-body
 | 
	
		
			
				|  |  | +  >
 | 
	
		
			
				|  |  | +    <div class="el-dialog-div" style="margin-bottom:20px">
 | 
	
		
			
				|  |  | +      <g-search-table
 | 
	
		
			
				|  |  | +        ref="st"
 | 
	
		
			
				|  |  | +        url="/core/drillDictionaryBranch/list"
 | 
	
		
			
				|  |  | +        method="GET"
 | 
	
		
			
				|  |  | +        type="multiple"
 | 
	
		
			
				|  |  | +        :search-data="search"
 | 
	
		
			
				|  |  | +        :pageable="true"
 | 
	
		
			
				|  |  | +        :select="true"
 | 
	
		
			
				|  |  | +        :selectLimit="1"
 | 
	
		
			
				|  |  | +        :select-default="selectList"
 | 
	
		
			
				|  |  | +        :drag="false"
 | 
	
		
			
				|  |  | +        @select="onSelect"
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +        <!-- 搜索 -->
 | 
	
		
			
				|  |  | +        <template slot="searchs">
 | 
	
		
			
				|  |  | +          <el-form-item label="演练场景" prop="drillProjects">
 | 
	
		
			
				|  |  | +            <el-input
 | 
	
		
			
				|  |  | +              v-model="search.drillProjects"
 | 
	
		
			
				|  |  | +              placeholder="请输入关键字"
 | 
	
		
			
				|  |  | +              clearable
 | 
	
		
			
				|  |  | +            />
 | 
	
		
			
				|  |  | +          </el-form-item>
 | 
	
		
			
				|  |  | +          <!-- <el-form-item prop="title" label="编号">
 | 
	
		
			
				|  |  | +            <el-input v-model="search.id" placeholder="请输入编号"></el-input>
 | 
	
		
			
				|  |  | +          </el-form-item> -->
 | 
	
		
			
				|  |  | +                    <el-form-item label="演练项目" prop="drillType">
 | 
	
		
			
				|  |  | +                      <el-select v-model="search.drillType" placeholder="请选择演练项目" clearable>
 | 
	
		
			
				|  |  | +                        <el-option
 | 
	
		
			
				|  |  | +                          v-for="dict in dict.type.core_drill_type"
 | 
	
		
			
				|  |  | +                          :key="dict.value"
 | 
	
		
			
				|  |  | +                          :label="dict.label"
 | 
	
		
			
				|  |  | +                          :value="dict.value"
 | 
	
		
			
				|  |  | +                        />
 | 
	
		
			
				|  |  | +                      </el-select>
 | 
	
		
			
				|  |  | +                    </el-form-item>
 | 
	
		
			
				|  |  | +          <!--         <el-form-item label="演练项目" prop="drillCategory">
 | 
	
		
			
				|  |  | +                     <el-select v-model="search.drillCategory" placeholder="请选择演练项目" clearable>
 | 
	
		
			
				|  |  | +                       <el-option
 | 
	
		
			
				|  |  | +                         v-for="dict in dict.type.core_drill_category"
 | 
	
		
			
				|  |  | +                         :key="dict.value"
 | 
	
		
			
				|  |  | +                         :label="dict.label"
 | 
	
		
			
				|  |  | +                         :value="dict.value"
 | 
	
		
			
				|  |  | +                       />
 | 
	
		
			
				|  |  | +                     </el-select>
 | 
	
		
			
				|  |  | +                   </el-form-item>-->
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <!-- 表格 -->
 | 
	
		
			
				|  |  | +        <template slot="columns">
 | 
	
		
			
				|  |  | +          <!-- <el-table-column label="编号" align="center" prop="id"/> -->
 | 
	
		
			
				|  |  | +          <el-table-column prop="orgName" align="center" label="机构名称" width="180"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column label="演练项目" align="center" width="180" prop="drillType">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">
 | 
	
		
			
				|  |  | +              <dict-tag :options="dict.type.core_drill_type" :value="scope.row.drillType"/>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <!--     <el-table-column label="演练类型" scoped-slot="drillCategory" align="center" prop="drillCategory">
 | 
	
		
			
				|  |  | +                 <template slot-scope="scope">
 | 
	
		
			
				|  |  | +                   <dict-tag :options="dict.type.core_drill_category" :value="scope.row.drillCategory"/>
 | 
	
		
			
				|  |  | +                 </template>
 | 
	
		
			
				|  |  | +               </el-table-column>-->
 | 
	
		
			
				|  |  | +          <el-table-column label="演练场景"  align="center" width="180" :show-overflow-tooltip="true"
 | 
	
		
			
				|  |  | +                           prop="drillProjects">
 | 
	
		
			
				|  |  | +            <!-- <template slot-scope="scope">
 | 
	
		
			
				|  |  | +              <div class="ellipsis" :title="scope.row.drillProjects">{{ scope.row.drillProjects }}</div>
 | 
	
		
			
				|  |  | +            </template> -->
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            label="预设案由"
 | 
	
		
			
				|  |  | +            scoped-slot="defaultCause"
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +            :show-overflow-tooltip="true"
 | 
	
		
			
				|  |  | +            prop="defaultCause"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  | +        </template>
 | 
	
		
			
				|  |  | +      </g-search-table>
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <div slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  | +      <el-button type="primary" @click="onSubmit">确定</el-button>
 | 
	
		
			
				|  |  | +      <el-button @click="onHide">关闭</el-button>
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +  </DialogCom>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +import GSearchTable from "@/components/table/gx.search.table.vue";
 | 
	
		
			
				|  |  | +// import { ruleListForOrg } from "@/api/resumption/rule.js";
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  components: {GSearchTable},
 | 
	
		
			
				|  |  | +  dicts: ['core_drill_type', 'core_drill_category'],
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +      isShow: false,
 | 
	
		
			
				|  |  | +      selectList: [],
 | 
	
		
			
				|  |  | +      // ruleList: [],
 | 
	
		
			
				|  |  | +      search: {
 | 
	
		
			
				|  |  | +        id: null,
 | 
	
		
			
				|  |  | +        drillProjects: null,
 | 
	
		
			
				|  |  | +        drillType: null,
 | 
	
		
			
				|  |  | +        orgId: this.$store.getters.orgId,
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  computed: {},
 | 
	
		
			
				|  |  | +  watch: {
 | 
	
		
			
				|  |  | +    orgId(newval) {
 | 
	
		
			
				|  |  | +      console.log("orgId", newval);
 | 
	
		
			
				|  |  | +      this.search.orgId = newval;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  props: {
 | 
	
		
			
				|  |  | +    defaultSelect: {
 | 
	
		
			
				|  |  | +      type: Array
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    orgId: {},
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    show(type) {
 | 
	
		
			
				|  |  | +      console.log("show", type)
 | 
	
		
			
				|  |  | +      this.search = this.emptySearch();
 | 
	
		
			
				|  |  | +      if (type) {
 | 
	
		
			
				|  |  | +        this.search.drillType = type.toString();
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.isShow = true;
 | 
	
		
			
				|  |  | +      this.selectList = this.defaultSelect;
 | 
	
		
			
				|  |  | +      console.log("this.selectList", this.selectList)
 | 
	
		
			
				|  |  | +      /*if (type){
 | 
	
		
			
				|  |  | +        this.search.drillType = parseInt(type);
 | 
	
		
			
				|  |  | +        this.onSelect( this.search)
 | 
	
		
			
				|  |  | +      }*/
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onHide() {
 | 
	
		
			
				|  |  | +      this.isShow = false;
 | 
	
		
			
				|  |  | +      this.search = this.emptySearch();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onSelect(item) {
 | 
	
		
			
				|  |  | +      this.selectList = item;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onSubmit() {
 | 
	
		
			
				|  |  | +      let s = this.selectList
 | 
	
		
			
				|  |  | +      this.$emit("select", this.selectList);
 | 
	
		
			
				|  |  | +      this.onHide();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    emptySearch() {
 | 
	
		
			
				|  |  | +      return {
 | 
	
		
			
				|  |  | +        id: null,
 | 
	
		
			
				|  |  | +        drillType: null,
 | 
	
		
			
				|  |  | +        orgId: this.$store.getters.orgId,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getOne(type) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  mounted() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +<style lang="scss" scoped>
 | 
	
		
			
				|  |  | +.el-dialog-div {
 | 
	
		
			
				|  |  | +  overflow: auto;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +</style>
 |