fei
7 天以前 d529e4e9f3b00ce5ff0d9d65670e37e422ec660c
src/views/archiveManager/archiveMaterial/index.vue
@@ -1,5 +1,7 @@
<template>
    <div class="app-container">
      <div v-if="sho">
         <h2 class="title-border">添加案卷详细记录</h2>
 <el-form ref="form" :model="form" :rules="rules" label-width="100px">
@@ -234,7 +236,7 @@
        </div>
</div>
<div class="title-border"></div>
@@ -255,6 +257,7 @@
        </el-col>
        <el-col :span="1.5">
          <el-button
          v-if="sho"
            type="success"
            plain
            icon="el-icon-edit"
@@ -263,6 +266,17 @@
            @click="handleUpdate"
            v-hasPermi="['system:materials:edit']"
          >修改</el-button>
        </el-col>
           <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExportDir"
            v-hasPermi="['system:materials:list']"
          >导出卷内目录</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button
@@ -273,10 +287,11 @@
            @click="handleExport"
            v-hasPermi="['system:materials:list']"
          >导出</el-button>
          >导出电子文件目录</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button
          v-if="sho"
            type="danger"
            plain
            icon="el-icon-delete"
@@ -289,6 +304,7 @@
          <el-col :span="1.5">
          <el-button
          v-if="sho"
            type="success"
            plain
            icon="el-icon-edit"
@@ -345,7 +361,7 @@
              accept=".xlsx,.xls"
        >
          <el-button size="mini"   type="primary"
          <el-button size="mini"  v-if="sho" type="primary"
                     plain
                     icon="el-icon-top">导入</el-button>
@@ -356,7 +372,7 @@
      <el-table v-loading="loading" :data="materialsList" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="操作" align="center" width="160" class-name="small-padding ">
        <el-table-column v-if="sho" label="操作" align="center" width="160" class-name="small-padding ">
              <template slot-scope="scope">
                <el-button
                  size="mini"
@@ -393,8 +409,8 @@
        </el-table-column>
        <el-table-column label="页号" sortable align="center" prop="pageNumber"  />
        <el-table-column label="备注" align="center" prop="remarks" />
                <el-table-column label="页次" sortable align="center" prop="pageOrder"  />
            <!--          <el-table-column label="页次" sortable align="center" prop="pageOrder"  />
--->
        <el-table-column label="所处阶段" sortable align="center" width="180" prop="stage" />
        <el-table-column label="公开属性" sortable align="center" width="180" prop="publicity" />
        <el-table-column label="是否为附图及附件" align="center" prop="isAttachment" />
@@ -798,6 +814,8 @@
    name: "Materials",
    data() {
      return {
        //是否显示相关内容
        sho: true,
        totalPageCount: 0,
        // 记录元素初始位置和状态
  originalOffsetLeft: 0,
@@ -995,6 +1013,11 @@
      const recordId = this.$route.params && this.$route.params.recordId
      this.totalPageCount = this.$route.params && this.$route.params.pageCount
      this.sho = this.$route.params && this.$route.params.sho
      // 将字符串转换为布尔值
      this.sho = this.sho === true || this.sho === "true"
      //alert(this.totalPageCount)
      //alert(recordId)
      this.recordId = recordId;
@@ -1294,7 +1317,7 @@
      handleFileStyleChange(value) {
        // 当选择'其他材料'时,将页号设置为0
        if (value === '其他材料') {
          this.form.pageNumber = null;
          this.forms.pageNumber = null;
        }
      },
      // 处理材料类型变化(修改表单)
@@ -1475,6 +1498,7 @@
      },
      /** 提交按钮 */
      submitForms() {
        console.log(this.forms)
        this.$refs["forms"].validate(valid => {
          if (valid) {
            if (this.forms.materialId != null) {
@@ -1503,6 +1527,26 @@
          this.$modal.msgSuccess("删除成功")
        }).catch(() => {})
      },
           /** 导出按钮操作 - 支持导出选中行或全部数据 */
      handleExportDir() {
        // 判断是否有选中的行
        if (this.ids && this.ids.length > 0) {
          // 显示导出选中行的提示
          this.$message.info(`正在导出${this.ids.length}条选中的数据...`);
          // 导出选中的行数据
          this.download('system/materials/exportDir', {
            ids: this.ids.join(','),
         //   exportType: 'selected'
          }, `materiaDir_selected_${new Date().getTime()}.xls`)
        } else {
          // 显示导出全部数据的提示
          this.$message.info('正在导出符合当前查询条件的所有数据...');
          // 没有选中行时,导出当前查询条件的数据
          this.download('system/materials/exportDir', {
            ...this.queryParams
          }, `materiaDir_${new Date().getTime()}.xls`)
        }
      },
      /** 导出按钮操作 - 支持导出选中行或全部数据 */
      handleExport() {
        // 判断是否有选中的行
@@ -1513,14 +1557,14 @@
          this.download('system/materials/export', {
            ids: this.ids.join(','),
         //   exportType: 'selected'
          }, `materials_selected_${new Date().getTime()}.xlsx`)
          }, `materials_selected_${new Date().getTime()}.xls`)
        } else {
          // 显示导出全部数据的提示
          this.$message.info('正在导出符合当前查询条件的所有数据...');
          // 没有选中行时,导出当前查询条件的数据
          this.download('system/materials/export', {
            ...this.queryParams
          }, `materials_${new Date().getTime()}.xlsx`)
          }, `materials_${new Date().getTime()}.xls`)
        }
      },
@@ -1529,7 +1573,7 @@
    {
      this.download('/system/materials/model', {
      }, `materials_${new Date().getTime()}.xlsx`)
      }, `materials_${new Date().getTime()}.xls`)
    },
       /** 导入操作*/
    async handleImportData({file}){