| | |
| | | <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"> |
| | | |
| | |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | <div class="title-border"></div> |
| | | |
| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | v-if="sho" |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | |
| | | @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 |
| | |
| | | @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" |
| | |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | v-if="sho" |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | |
| | | 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> |
| | | |
| | |
| | | |
| | | <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" |
| | |
| | | </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" /> |
| | |
| | | name: "Materials", |
| | | data() { |
| | | return { |
| | | //是否显示相关内容 |
| | | sho: true, |
| | | totalPageCount: 0, |
| | | // 记录元素初始位置和状态 |
| | | originalOffsetLeft: 0, |
| | |
| | | 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; |
| | |
| | | handleFileStyleChange(value) { |
| | | // 当选择'其他材料'时,将页号设置为0 |
| | | if (value === '其他材料') { |
| | | this.form.pageNumber = null; |
| | | this.forms.pageNumber = null; |
| | | } |
| | | }, |
| | | // 处理材料类型变化(修改表单) |
| | |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForms() { |
| | | console.log(this.forms) |
| | | this.$refs["forms"].validate(valid => { |
| | | if (valid) { |
| | | if (this.forms.materialId != null) { |
| | |
| | | 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() { |
| | | // 判断是否有选中的行 |
| | |
| | | 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`) |
| | | } |
| | | }, |
| | | |
| | |
| | | { |
| | | this.download('/system/materials/model', { |
| | | |
| | | }, `materials_${new Date().getTime()}.xlsx`) |
| | | }, `materials_${new Date().getTime()}.xls`) |
| | | }, |
| | | /** 导入操作*/ |
| | | async handleImportData({file}){ |