
<script lang="ts">
export default {
  name: 'printcode' // 打印二维码
};
</script>
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { ElMessage, ElMessageBox, FormRules,ElTable} from "element-plus";
import Page from '@/components/Pagination/page.vue';
import { querySchoolGradeList } from "@/api/regionmodule/schoolGrade";
import { querySchoolClassList } from "@/api/regionmodule/schoolClass";
import { queryExamineSchoolTree,queryExamineResultPage,queryRulesSchoolList,
  studentPersonQRCode,studentMultiplePersonQRCode,studentAllPersonQRCode,
  AllSchoolPersonQRCode,queryPlanStudentList,addExamineStudent,exportStudentQueueDataTemplate,
  delExamineResult,updateGradeClassExamineResult,addAllExamineStudent } from "@/api/planscreening";
import { downloadFile } from '@/utils/index'
import { publicTree } from '@/utils/validate';
import Viewfile from "@/views/component/Viewfile.vue";
import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore();
const url = userStore.webApiBaseUrl;
const props:any = defineProps({
  planInfo: {
    required: false,
    type: Object,
    default: {}
  }
})
const schoolName =ref("")
const queryInfo :any = ref({
  current:1,
  size:10,
  total:0
})
const exportText = ref("")
const tableData = ref([])
const multipleSelection = ref([])
const genderoptions:any = ref([{label:'男',value:'1'},{label:'女',value:'2'}])
const loading = ref(false)
// 左侧树
const treeloading = ref(false)
const defaultProps = { label: "name" }
//树形控件类型定义
interface Tree {
  [x: string]: any;
  label: string;
  children?: Tree[];
}
const vMove = {
  mounted(el: any) {
    el.onmousedown = function (e: any) {
      var init = e.clientX;
      var parent: any = document.getElementById("silderLeft");
      const initWidth: any = parent.offsetWidth;
      document.onmousemove = function (e) {
        var end = e.clientX;
        var newWidth = end - init + initWidth;
        parent.style.width = newWidth + "px";
      };
      document.onmouseup = function () {
        document.onmousemove = document.onmouseup = null;
      };
    };
  }
}
const treeLoading = ref(false)
const treeData:any = ref([])
function getTree(){
  if(props.planInfo.exam_type == '01'){
    let params = {
      planId: props.planInfo.id,
      orgId: props.planInfo.org_id,
      orgType: props.planInfo.org_type,
    };
    treeLoading.value = true
    queryExamineSchoolTree(params).then((res) => {
      treeData.value = publicTree(res.data,"")
      treeLoading.value = false
    }).catch(()=>{
      treeLoading.value = false
    });
  }else{
    //获取表格类型
    let params = {
      planId:props.planInfo.id
    }
    treeLoading.value = true
    queryRulesSchoolList(params).then((res) => {
      treeData.value = res.data;
      treeLoading.value = false
    }).catch(()=>{
      treeLoading.value = false
    });
  }
  
}
// 初始化
function init(){
  let params:any = {
    studentName:queryInfo.value.studentName,
    planId: props.planInfo.id,
    gradeId: queryInfo.value.gradeId,
    classId: queryInfo.value.classId,
    examType: props.planInfo.exam_type,
    examStatus: queryInfo.value.examStatus,
    current:queryInfo.value.current,
    size:queryInfo.value.size,
    custom3:queryInfo.value.custom3,
  };
 
  if(nodeData.value.org_type =='5'){
    params.schoolId =  nodeData.value.id
    params.regionId =  ""
  }else{
    params.regionId =  nodeData.value.id 
    params.schoolId =  ""
  }
  loading.value = true
  queryExamineResultPage(params).then((res) => {
    tableData.value = res.data.records;
    queryInfo.value.total = res.data.total
    loading.value = false
  }).catch(()=>{
    loading.value = false
  });
}
const nodeData:any = ref({})
const handleNodeClick = (data: Tree) => {
  queryInfo.value = {
    current:1,
    size:10,
    total:0,
    studentName:"",
    gender:"",
    custom3:""
  }
  nodeData.value = data
  if(data.org_type == "5"){
    parentId.value = data.id
    orgType.value = "5"
    schoolId.value = data.id
    schoolName.value = data.name
  }else{
    parentId.value = ""
    schoolId.value = ""
    schoolName.value = ""
  }

  gradeinData.value = []
  classData.value = []
  getGrade()
  init()
};
const ViewfileUrl = ref("")
const title= ref("")
const onprint= ref("no")
const filetype = ref("pdf")
const orgType:any = ref("")
const schoolId:any = ref("")
const parentId:any = ref("")
const isViewfile = ref(false)
function CloseView(){
  isViewfile.value = false
}
// 查看个人学生二维码信息
function exportStudentPerson(row:any){
  let params = {
    id: row.student_id,
    planId: row.plan_id,
  }
  loading.value = true
  studentPersonQRCode(params).then((response:any) => {
    loading.value = false
    downloadFile(response, row.student_name + '筛查告知书' , 'docx')
  }).catch(()=>{
    loading.value = false
  })
}
function studentMultiplePerson(row:any){
  let ids = [] as any[];
    multipleSelection.value.forEach((item: any) => {
      ids.push(item.student_id)
    })
  let params = {
    ids: ids.join(","),
    planId:props.planInfo.id
  }
  loading.value = true
  studentMultiplePersonQRCode(params).then((response:any) => {
    loading.value = false
    downloadFile(response, schoolName.value +'-多人筛查告知书' , 'docx')
  }).catch(()=>{
    loading.value = false
  })
}

function exportStudentQueueData(){
  let params = {
    planId:props.planInfo.id,
    schoolId:schoolId.value,
    gradeId:queryInfo.value.gradeId,
    classId:queryInfo.value.classId,
  }
  loading.value = true
  exportText.value = "正在生成队列，请耐心等待"
    exportStudentQueueDataTemplate(params).then((response:any) => {
      loading.value = false
      exportText.value = ''
      downloadFile(response, schoolName.value + '-队列清单' , 'xls')
    }).catch(()=>{
      exportText.value = ''
      loading.value = false
    })
}

//查看二维码
function printQRcode(){
  title.value="打印预览"
  onprint.value="no"
  filetype.value="pdf"
  let params = {
    orgType: orgType.value,
    parentId:parentId.value,
    studentName:queryInfo.value.studentName,
    examStatus:queryInfo.value.examStatus,
    planId:props.planInfo.id,
  }
  if(queryInfo.value.examStatus == undefined || queryInfo.value.examStatus == undefined){
    ViewfileUrl.value = url + '/vision_examine/examine-result/examineResultStudentQRCode?orgType=' + params.orgType +
  "&planId=" + params.planId + "&parentId=" + params.parentId + "&studentName=" + params.studentName
  }else{
    ViewfileUrl.value = url + '/vision_examine/examine-result/examineResultStudentQRCode?orgType=' + params.orgType +
  "&planId=" + params.planId + "&parentId=" + params.parentId + "&studentName=" + params.studentName + "&examStatus=" + params.examStatus
  }
  
  isViewfile.value = true
}



function exportQRcode(){
  let params = {
    orgType: orgType.value,
    parentId:parentId.value,
    studentName:queryInfo.value.studentName,
    gender:queryInfo.value.gender,
    planId:props.planInfo.id,
    schoolid:parentId.value,
    examStatus:queryInfo.value.examStatus
  }

  loading.value = true
  exportText.value = "正在导出，由于内容较大，请耐心等待"
  if(queryInfo.value.examStatus != "" &&queryInfo.value.examStatus != undefined && queryInfo.value.total<1000){ // 未检漏检
    studentAllPersonQRCode(params).then((response:any) => {
      loading.value = false
      exportText.value = ''
      downloadFile(response, schoolName.value + '-多人筛查告知书' , 'docx')
    }).catch(()=>{
      exportText.value = ''
      loading.value = false
    })
  } else if(orgType.value == "5" && queryInfo.value.studentName == ""  && queryInfo.value.gender == ""){
    AllSchoolPersonQRCode(params).then((response:any) => {
      loading.value = false
      exportText.value = ''
      downloadFile(response, schoolName.value + '-多人筛查告知书' , 'zip')
    }).catch(()=>{
      exportText.value = ''
      loading.value = false
    })
  }else{
    studentAllPersonQRCode(params).then((response:any) => {
      loading.value = false
      exportText.value = ''
      downloadFile(response, schoolName.value + '-多人筛查告知书' , 'docx')
    }).catch(()=>{
      exportText.value = ''
      loading.value = false
    })

  }




  // ViewfileUrl.value = url + '/vision_examine/examine-result/examineResultStudentQRCode?orgType=' + params.orgType +
  // "&planId=" + params.planId + "&parentId=" + params.parentId + "&studentName=" + params.studentName + "&gender=" + params.gender
  // isViewfile.value = true
}
// 选中打印二维码
function printSelectedQRcode(){
  title.value="打印预览"
  onprint.value="no"
  filetype.value="pdf"
  let ids = [] as any[];
    multipleSelection.value.forEach((item: any) => {
      ids.push(item.student_id)
    })
  ViewfileUrl.value = url + '/vision_examine/examine-result/downloadSelectedQRCode?parentId=' + parentId.value +
  "&planId=" + props.planInfo.id + 
  "&ids=" + ids
  isViewfile.value = true

}

function handleSelectionChange(val:any){
  multipleSelection.value = val
}


function resetdata(){
   queryInfo.value = {
    current:1,
    size:10,
    total:0,
    studentName:"",
    gender:"",
    custom3:""
  }
  init()
}
onMounted(() => {
   getTree()
   init()
});

const gradeinData:any = ref([])
const classData:any = ref([])

function getGrade(){
  let params:any = {}
  params.schoolId =  schoolId.value
  classData.value = []
  queryInfo.value.classId = ""
  querySchoolGradeList(params).then((res) => {
    gradeinData.value = res.data;
  }).catch(()=>{
  });
}
function getClass(id:any){
  let params = {
    gradeId: id
  }
  if(id != "" && id != null){
    orgType.value = "6"
    parentId.value = id
  }else{
    orgType.value = "5"
    parentId.value = schoolId.value
  }
  classData.value = []
  queryInfo.value.classId = ""
  if(id != null && id != '' ){
    querySchoolClassList(params).then((res) => {
      classData.value = res.data;
    }).catch(()=>{
    });
  }
  init()
}
function getQueryClass(id:any){
  if(id != ""&& id != null){
    orgType.value = "7"
    parentId.value = id
  }else {
    orgType.value = "6"
    parentId.value = queryInfo.value.gradeId
  }
  init()
}
const studentList = ref([])
const studentVisible = ref(false)
const studentload =ref(false)

const queryStudentInfo:any = ref({})
function addStudent(){
  studentVisible.value = true
  queryStudentInfo.value = {
    current:1,
    size:20,
    total:0,
    name:"",
    gender:""
  }
  studentInfo()
}
function searchInit(){
  queryStudentInfo.value.current = 1
  studentInfo()
}
const studentText = ref('')
function studentInfo(){
 
  let params = {
    planId: props.planInfo.id,
    name:queryStudentInfo.value.name,
    current:queryStudentInfo.value.current,
    size:queryStudentInfo.value.size,
  }
  studentText.value = '正在加载学生信息，请耐心等待...'
  studentload.value = true
  studentList.value = []
  queryPlanStudentList(params).then((res) => {
    studentList.value = res.data.records;
    queryStudentInfo.value.total = res.data.total
    studentload.value = false
  }).catch(()=>{
    studentload.value = false
  });
}
const studentSelection:any = ref([])
function studentSelectionChange(val:any){
  studentSelection.value = val
}

function confirm(){
  let ids = [] as any[];
  studentSelection.value.forEach((item: any) => {
    ids.push(item.id)
  })
  let params = {
    planId: props.planInfo.id,
    ids:ids.join(",")
  }
  studentText.value = '正在关联学生信息，请耐心等待...'
  studentload.value = true
  addExamineStudent(params).then((res:any) => {
    if(res.code == '0'){
      queryInfo.value.current= 1
      init()
      ElMessage({
        message: "添加成功",
        type: "success",
      });
    }else{
      ElMessage({
        message: "添加失败",
        type: "error",
      });
    }
    studentVisible.value = false
    studentload.value = false
  }).catch(()=>{
    studentload.value = false
  });
}

function confirmAll(){
  ElMessageBox.confirm('确定添加全部学生信息吗？', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(() => {
    let params = {
      planId: props.planInfo.id,
    }
    studentText.value = '正在关联学生信息，请耐心等待...'
    studentload.value = true
    addAllExamineStudent(params).then((res:any) => {
      if(res.code == '0'){
        queryInfo.value.current= 1
        init()
        ElMessage({
          message: "添加成功",
          type: "success",
        });
      }else{
        ElMessage({
          message: "添加失败",
          type: "error",
        });
      }
      studentVisible.value = false
      studentload.value = false
    }).catch(()=>{
      studentload.value = false
    });
  });
}

const studentForm:any = ref({})

function delStudent(row:any){

  ElMessageBox.confirm('确定删除' +row.student_name + '的视力筛查信息吗？', '提示', {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: 'warning'
    }).then(() => {

      delExamineResult({id:row.id}).then((res:any) => {
        if(res.code =='0'){
          ElMessage({
            message: "删除成功",
            type: "success",
          });
          init()
        }else{
          ElMessage({
            message: "删除失败",
            type: "error",
          });
        }
       
    }).catch(()=>{

    })
    });
}

const gradeinAdjustData:any =ref([])
const classAdjustData:any =ref([])
const studentAdjustVisible:any =ref(false)
function editStudent(row:any){

  studentForm.value ={
    id:row.id,
    studentName:row.student_name,
    gradeId:'',
    gradeCode:'',
    gradeName:'',
    classId:'',
    classCode:'',
    className:''
  }
  studentAdjustVisible.value= true
getAdjustGrade(row.school_id)
}


function getAdjustGrade(id){
  let params:any = {
    schoolId: id
  }


  studentForm.value.classId = ""
  studentForm.value.gradeId = ""
  gradeinAdjustData.value = []
  classAdjustData.value = []
  querySchoolGradeList(params).then((res) => {
    gradeinAdjustData.value = res.data;
  }).catch(()=>{
  });
}
function getAdjustClass(id:any){
  let params = {
    gradeId: id
  }
  for(let i = 0;i<gradeinAdjustData.value.length;i++){
    if(gradeinAdjustData.value[i].id == id){
      studentForm.value.gradeCode = gradeinAdjustData.value[i].code
      studentForm.value.gradeName = gradeinAdjustData.value[i].name
    }
  }


  classAdjustData.value = []
  studentForm.value.classId = ""
  querySchoolClassList(params).then((res) => {
    classAdjustData.value = res.data;
  }).catch(()=>{
  });
}
function getAdjustClassName(id){
  
  for(let i = 0;i<classAdjustData.value.length;i++){
    if(classAdjustData.value[i].id == id){
      studentForm.value.classCode = classAdjustData.value[i].code
      studentForm.value.className = classAdjustData.value[i].name
    }
  }
debugger
}

function handleClose(){
  studentAdjustVisible.value= false
}
function confirmClick(){
  if(studentForm.value.gradeId =='' || studentForm.value.gradeId == null){
    ElMessage({
      message: "请选择年级",
      type: "warning",
    });
    return
  }
  if(studentForm.value.classId =='' || studentForm.value.classId == null){
    ElMessage({
      message: "请选择班级",
      type: "warning",
    });
    return
  }
  updateGradeClassExamineResult(studentForm.value).then((res:any) => {
    if(res.code =='0'){
      studentAdjustVisible.value= false
      ElMessage({
        message: "调班成功",
        type: "success",
      });
      init()
    }else{
      ElMessage({
        message: "调班失败",
        type: "success",
      });
    }
   
  }).catch(()=>{
  });
}
</script>

<template>
    <div class="printcode-box">
        <aside id="silderLeft">
      <div class="lefttitle">
        <div class="line"></div>
        <div class="treetitle">数据列表</div>
      </div>
        <div>
          <el-tree v-loading="treeloading" ref="treeRef" node-key="id" :data="treeData" 
          default-expand-all
          :highlight-current="true" :props="defaultProps" :expand-on-click-node="false"
          @node-click="handleNodeClick" style="height: calc(100vh - 350px); overflow: auto">
        </el-tree>
        </div>
      <div class="moveBtn" v-move>
        <div class="moveBtn-line" v-move></div>
      </div>
    </aside>
      <div class="silderRight">
        <div class="searchinfo">
          <div>
            <el-input v-model="queryInfo.studentName" placeholder="学生姓名" style="width: 90px;" clearable />
            <el-select v-model="queryInfo.gradeId" @change="getClass"  class="ml-4" placeholder="选择年级"  clearable size="large"  style="width: 120px"
             :disabled="schoolId == ''">
              <el-option v-for="item in gradeinData" :key="item.id" :label="item.name" :value="item.id"/>
            </el-select>
            <el-select v-model="queryInfo.classId" @change="getQueryClass" class="ml-4" placeholder="选择班级" clearable size="large"  style="width: 120px"
             :disabled="queryInfo.gradeId==''|| queryInfo.gradeId==null">
              <el-option v-for="item in classData" :key="item.id" :label="item.name" :value="item.id"/>
            </el-select>
            <el-select v-model="queryInfo.examStatus" class="ml-4" placeholder="筛查状态" size="large" style="width: 120px" clearable @change="init">
              <el-option  :key="'00'" :label="'未检'" :value="'00'"/>
              <el-option  :key="'01'" :label="'已检'" :value="'01'"/>
              <el-option  :key="'02'" :label="'漏检'" :value="'02'"/>
            </el-select>
            <el-select v-model="queryInfo.custom3" class="ml-4" placeholder="是否新增学生" size="large" style="width: 140px" clearable @change="init">
              <el-option  :label="'是'" :value="'1'"/>
              <el-option  :label="'否'" :value="'2'"/>
            </el-select>
            <el-button type="primary" @click="init" style="margin-left:10px ;">搜索</el-button>
            <el-button @click="resetdata">重置</el-button>
            <el-button type="primary" @click="addStudent" style="margin-left:10px ;">添加学生</el-button>
            <el-button type="primary" @click="exportStudentQueueData" :disabled="schoolId==''" style="margin-left:10px ;">生成队列</el-button>
            <el-button type="primary" @click="printQRcode" :disabled="schoolId==''">
              <img src="@/assets/visionscreening/printallQR.png" style="padding-right: 5px;" alt="">打印全部
            </el-button>
            <el-button type="primary" :disabled="schoolId==''" @click="exportQRcode">
              导出全部
            </el-button>
            <el-button :disabled="multipleSelection.length <= 0" :type="multipleSelection.length > 0 ? 'primary' : ''" @click="printSelectedQRcode">
              <img v-if="multipleSelection.length == 0" src="@/assets/visionscreening/disabledprintQR.png" style="padding-right: 5px;" alt="">
              <img v-if="multipleSelection.length != 0" src="@/assets/visionscreening/printallQR.png" style="padding-right: 5px;" alt="">
              打印
            </el-button>
            <el-button @click="studentMultiplePerson" :disabled="multipleSelection.length <= 0" :type="multipleSelection.length > 0 ? 'primary' : ''">
             导出
            </el-button>
            
          </div>
        </div>
        <div v-loading="loading" :element-loading-text="exportText">
        <el-table ref="multipleTableRef" :data="tableData" border style="width: 100%; height:calc(100vh - 445px)" @selection-change="handleSelectionChange" :header-cell-style="{background:'rgb(250 250 250)',height:'50px'}">
          <el-table-column type="selection" width="55" />
          <!-- <el-table-column prop="student_code" label="学生代码" width="100" /> -->
          <el-table-column prop="student_name" label="学生姓名" width="120" />
          <el-table-column prop="gender" label="性别" width="80" align="center">
            <template #default="scope">
            <span v-if="scope.row.gender == '1'">男</span>
            <span v-if="scope.row.gender == '2'">女</span>
            </template>
          </el-table-column>
          <el-table-column prop="age" label="年龄" width="80" />
          <el-table-column prop="birth_date" label="出生日期" width="120" align="center"/>
          <el-table-column prop="nation" label="民族" width="80" align="center"/>
          <el-table-column prop="study_code" label="学籍号" width="190" align="center"/>
          <el-table-column prop="grade_name" label="所属年级" width="120"/>
          <el-table-column prop="class_name" label="所属班级" />
          <el-table-column prop="id_code" label="身份证" width="180" align="center"/>
          <el-table-column prop="address" label="操作" width="120" fixed="right" align="center">
          <template #default="scope">
            <div style="display: -webkit-flex;display: flex; justify-content: space-between;-webkit-justify-content: space-around; ">
              <img src="@/assets/visionscreening/spotcheck.png" title="修改"
               style="cursor: pointer;" alt="" @click="editStudent(scope.row)">
               <img src="@/assets/tableicon/u186.png" title="删除"
               style="cursor: pointer;" alt="" @click="delStudent(scope.row)">
               <img src="@/assets/visionscreening/exportts.png" title="导出"
               style="cursor: pointer;" alt="" @click="exportStudentPerson(scope.row)">
              <!-- <el-button type="primary" size="small" @click="exportStudentPerson(scope.row)">导出</el-button> -->
            </div>
            </template>
        </el-table-column>
        </el-table>
        <Page class="mt-[20px]" :total="queryInfo.total" v-model:size="queryInfo.size" v-model:current="queryInfo.current"
        @pagination="init" />
      </div>
    </div>
    <Viewfile v-if="isViewfile" :url="ViewfileUrl" :showTime="true" :title="title" :onprint="onprint" :type="filetype" :clientHeight="600" @update="CloseView"/>
    <el-dialog v-model="studentVisible" title="普检未关联学生信息列表" draggable width="1280">
      <div style="margin-bottom: 10px;display:flex ; justify-content: space-between;">
        <div>
          <el-input v-model="queryStudentInfo.name" placeholder="请输入学生姓名" style="width: 200px;" clearable />
          <el-button type="primary" @click="searchInit" style="margin-left:10px ;">搜索</el-button>
        </div>

        <div>
          <el-button type="primary" @click="confirmAll" style="margin-left:10px ;" :disabled="studentload">关联所有未关联学生</el-button>
          <el-button type="primary" @click="confirm" style="margin-left:10px ;" :disabled="studentload">确定关联</el-button>
        </div>
        
      </div>
      
      <el-table v-loading="studentload"  :element-loading-text="studentText"
      ref="multipleTableRefs" :data="studentList" border style="width: 100%; height:calc(100vh - 445px)" 
      @selection-change="studentSelectionChange" 
      :header-cell-style="{background:'rgb(250 250 250)',height:'50px'}">
          <el-table-column type="selection" width="55" />
          <!-- <el-table-column prop="student_code" label="学生代码" width="100" /> -->
          <el-table-column prop="name" label="学生姓名" width="100" />
          <el-table-column prop="gender" label="性别" width="60" align="center">
            <template #default="scope">
            <span v-if="scope.row.gender == '1'">男</span>
            <span v-if="scope.row.gender == '2'">女</span>
            </template>
          </el-table-column>
          <el-table-column prop="age" label="年龄" width="60" />
          <el-table-column prop="birth_date" label="出生日期" width="120" align="center"/>
          <el-table-column prop="study_code" label="学籍号" width="190" align="center"/>
          <el-table-column prop="school_name" label="所属学校" min-width="130"/>
          <el-table-column prop="grade_name" label="所属年级" width="130"/>
          <el-table-column prop="class_name" label="所属班级" width="120"/>
          <el-table-column prop="id_code" label="身份证" width="180" align="center"/>
        </el-table>
        <Page class="mt-[20px]" :total="queryStudentInfo.total" v-model:size="queryStudentInfo.size" v-model:current="queryStudentInfo.current"
        @pagination="studentInfo" />
    </el-dialog>
    <el-dialog v-model="studentAdjustVisible" title="调整班级" draggable width="600">
      <el-form ref="infoForm" :model="studentForm" label-width="100px">
        <el-form-item label="学生姓名">
          <span>{{ studentForm.studentName }}</span>
        </el-form-item>
        <el-form-item label="调整年级">
          <el-select v-model="studentForm.gradeId" class="!w-full" placeholder="请选择年级"
          @change="getAdjustClass">
            <el-option v-for="(i, index) in gradeinAdjustData" :key="i.id" :label="i.name"
              :value="i.id"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="调整班级">
          <el-select v-model="studentForm.classId" class="!w-full" placeholder="请选择班级"  @change="getAdjustClassName">
            <el-option v-for="(i, index) in classAdjustData" :key="i.id" :label="i.name"
              :value="i.id"></el-option>
          </el-select>
        </el-form-item>

      </el-form>
      <span class="dialog-footer">
        <el-button style="padding: 10px 15px" @click="handleClose">取 消</el-button>
        <el-button type="primary" style="padding: 10px 15px" @click="confirmClick">确定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<style scoped  lang="scss">
  .printcode-box{
    margin-top: 15px;
    height: 100%;
    display: -webkit-flex;
    display: flex;
    .box-search{
      display: flex;
      display: -webkit-flex;
      justify-content: space-between;
      margin-bottom: 20px;
    //   :deep(){
    //     .el-input{
    //         height:40px;
    //         line-height: 40px;
    //         width: 240px;
    //     }
    //     .el-button{
    //       height:40px; 
    //     }
    // }
    }
  }
  #silderLeft {
  width: 242px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 3px;
  position: relative;
  &:hover {
    .moveBtn {
      opacity: 1;
    }
  }
}
/* 拖动条 */
.moveBtn {
  height: 100%;
  width: 15px;
  padding: 0 6px;
  opacity: 0;
  position: absolute;
  right: -15px;
  top: 0;
}

.moveBtn-line {
  width: 100%;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  background-color: #60bfff;
}
.silderRight {
  flex: 1;
  position: relative;
  width: 100%;
  height: calc(100vh - 285px);
  overflow: auto;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 3px;
  padding: 20px;
  padding-bottom: 0px;
  margin-left: 15px;
  box-sizing: border-box;
}
.lefttitle {
  min-width: 130px;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
  font-weight: 700;
  font-style: normal;
  font-size: 16px;
  color: #1B1B1B;
  border-bottom: 1px var(--el-border-color) var(--el-border-style);
  margin-bottom: 10px;
  .line{
    border-width: 0px;
    width: 5px;
    height: 14px;
    margin-right: 7px;
    background: inherit;
    background-color: rgba(64, 158, 255, 1);
    border: none;
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
  }

}
:deep(.el-select--large .el-select__wrapper){
    min-height: 0px;
  }


// :deep(){
//    .el-input{
//     height: 40px;
//     line-height: 40px;
//    }
//    .el-button{
//     height:40px; 
//     margin-left: 10px;
//   }
//   .el-tree-node__content{
//     height: 40px;
//     padding-left: 12px !important;
//     color: #505050;
//    }
//    .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
//     color: #409eff;
//    }
//    .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content:hover{
//     color: #409eff;
//     background-color: #ecf5ff;
//    }
//   .el-tree-node__content:hover{
//     color: #409eff;
//     background-color: transparent;
//     // #ecf5ff
//   }
//   .el-tree-node__expand-icon{
//     color: #333333;
//   }
// }
.searchinfo{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.my-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  .icontext{
    font-size: 12px;
    color: #787878;
    width: 25px;
    text-align: center;
    cursor: pointer;
    img{
        padding-left: 4px;
    }
  }
  
}
.QRbox{
    height: calc(100vh - 200px);
    text-align: center;
}
</style>
