Sfoglia il codice sorgente

已存储样本添加导出条件

jianglw 4 anni fa
parent
commit
4c63e0326a

+ 7 - 6
src/dashoo.cn/frontend_animal/src/pages/samples/stored/index.vue

@@ -265,7 +265,7 @@
         </el-form>
         <span slot="footer" class="dialog-footer">
           <el-button size="mini" @click="sampleExportVisible = false">取 消</el-button>
-          <el-button size="mini" type="primary" @click="exportsamples(ExportType)">导 出</el-button>
+          <el-button size="mini" type="primary" @click="exportsamples">导 出</el-button>
         </span>
       </el-dialog>
 
@@ -904,6 +904,7 @@
           }
           this.getSampleTypeList(this.multipleSelection)
           this.exportType = 'exportchosen'
+
           // if (this.ExportSampleTypeList.length <= 2) {
           //   _this.exportsamples(this.exportType)
           // } else {
@@ -974,7 +975,7 @@
           }
         }
       },
-      exportsamples (val) {
+      exportsamples () {
         let _this = this
         _this.exportloading = true
         // 显示列
@@ -988,8 +989,8 @@
           }
         }
         let params = {
-          currentPage: this.exportType == 'exportchosen' ? 0 : this.currentPage,
-          size: this.exportType == 'exportchosen' ? 0 : this.size,
+          currentPage: this.currentPage,
+          size: this.size,
           BarCode: this.BarCode,
           SampleCode: this.SampleCode,
           SampleType: this.SampleType,
@@ -1023,7 +1024,7 @@
           params = Object.assign(params, params3)
         }
         // 导出所选样本
-        if (val == 'exportchosen') {
+        if (_this.exportType == 'exportchosen') {
           for (var i = 0; i < _this.multipleSelection.length; i++) {
             if (i == _this.multipleSelection.length - 1) {
               id += _this.multipleSelection[i].Id
@@ -1037,7 +1038,7 @@
           params = Object.assign(params, paramsid)
         }
         // 导出当前页样本
-        if (val == 'exportpage') {
+        if (_this.exportType == 'exportpage') {
           for (var i = 0; i < _this.list.length; i++) {
             if (i == _this.list.length - 1) {
               id += _this.list[i].Id