wangting
2023-08-08 c8cdec5a84e86c35fbe7d18ca8eefbe5cbf11ba7
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -1,5 +1,6 @@
<template>
<el-dialog :visible.sync="dialogPush" append-to-body  :close-on-click-modal="false"  @close="escHandler" title="导出" style="width: 1550px; margin: auto">
  <el-dialog :close-on-click-modal="false" :visible.sync="dialogPush" append-to-body style="width: 1550px; margin: auto" title="导出"
             @close="escHandler">
  <div style="margin-bottom: 20px;">
    <div>
      <span>导出方式:</span>
@@ -8,23 +9,24 @@
        <el-radio :label="1">全部</el-radio>
        <el-radio :label="2">页码</el-radio>
      </el-radio-group>
      <span v-if="radio === 2" style="margin-left: 20px;"><el-input style="width: 150px" v-model="pageExport"></el-input> (输入页码或者页面范围,如:1-10))</span>
        <span v-if="radio === 2" style="margin-left: 20px;"><el-input v-model="pageExport"
                                                                      style="width: 150px"></el-input> (输入页码或者页面范围,如:1-10))</span>
    </div>
  </div>
  <div style="text-align: center">
  <el-transfer
    style="text-align: left; display: inline-block;height: 400px"
    filterable
    :filter-method="filterMethod"
    filter-placeholder="关键词搜索"
    v-model="value"
        :data="data"
        :filter-method="filterMethod"
    :titles="['未选属性', '已选属性']"
    :data="data">
        filter-placeholder="关键词搜索"
        filterable
        style="text-align: left; display: inline-block;height: 400px">
  </el-transfer>
  </div>
  <div style="display: flex;justify-content: flex-end;">
    <el-button size="small" plain type="success" @click="handleExcel">确定</el-button>
    <el-button size="small" plain @click="escHandler">取消</el-button>
      <el-button plain size="small" type="success" @click="handleExcel">确定</el-button>
      <el-button plain size="small" @click="escHandler">取消</el-button>
  </div>
</el-dialog>
</template>
@@ -32,6 +34,7 @@
<script>
import {exportCode,FindData} from '@/api/GetItem'
import func from "@/util/func";
export default {
name: "MasterTransfer",
  props:['visible','tableHeadData','codeClassifyOid','tableData','selectRow','templateOid','limit'],
@@ -113,9 +116,7 @@
      }
    }
  },
  computed:{
  },
  computed: {},
  mounted() {
  },
  methods:{
@@ -151,7 +152,11 @@
                .forEach((prop, index) => {
                  this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
                });
              exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArrTwo,limit:-1}).then(res=>{
            exportCode({
              codeClassifyOid: this.codeClassifyOid,
              'conditionMap[oid]': this.ids, ...this.exportArrTwo,
              limit: -1
            }).then(res => {
                // console.log('res',res)
                if(res){
                  func.downloadFileByBlobHandler(res);
@@ -160,7 +165,10 @@
              })
            }else {
              exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArr}).then(res=>{
            exportCode({
              codeClassifyOid: this.codeClassifyOid,
              'conditionMap[oid]': this.ids, ...this.exportArr
            }).then(res => {
                // console.log('res',res)
                if(res){
                  func.downloadFileByBlobHandler(res);
@@ -218,7 +226,12 @@
            }
          }
          if(this.value >=1 ){
            exportCode({ codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: this.limit, page: start, endPage: end }).then((res) => {
          exportCode({
            codeClassifyOid: this.codeClassifyOid, ...this.exportArr,
            limit: this.limit,
            page: start,
            endPage: end
          }).then((res) => {
              // console.log('res',res)
              if (res) {
                func.downloadFileByBlobHandler(res);
@@ -230,7 +243,12 @@
              .forEach((prop, index) => {
                this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
              });
            exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArrTwo,limit:this.limit,page: start, endPage: end}).then(res=>{
          exportCode({
            codeClassifyOid: this.codeClassifyOid, ...this.exportArrTwo,
            limit: this.limit,
            page: start,
            endPage: end
          }).then(res => {
              // console.log('res',res)
              if(res){
                func.downloadFileByBlobHandler(res);
@@ -244,6 +262,6 @@
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
</style>