| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="类别号" prop="categoryNumber"> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="6"> |
| | | <el-select |
| | | v-model="queryParams.categoryType" |
| | | placeholder="选择类别类型" |
| | | clearable |
| | | @change="handleQuery" |
| | | > |
| | | <el-option |
| | | v-for="item in recordTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-select |
| | | v-model="queryParams.categoryZone" |
| | | placeholder="选择地区" |
| | | clearable |
| | | @change="handleQuery" |
| | | > |
| | | <el-option |
| | | v-for="item in zoneTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-input |
| | | v-model="queryParams.categoryYear" |
| | | placeholder="年份" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-input |
| | | v-model="queryParams.categorySeq" |
| | | placeholder="开始序号" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-input |
| | | v-model="queryParams.categorySeqEnd" |
| | | placeholder="结束序号" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label="案卷题名" prop="caseTitle"> |
| | | <el-input |
| | | v-model="queryParams.caseTitle" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="扫描加工公司" prop="scanningCompany"> |
| | | <el-input |
| | | <el-select |
| | | v-model="queryParams.scanningCompany" |
| | | placeholder="请输入扫描加工公司" |
| | | placeholder="请选择扫描加工公司" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | @change="handleQuery" |
| | | > |
| | | <el-option |
| | | v-for="item in projectCompanyOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="档案管(室)号" prop="archiveRoomNumber"> |
| | | <el-input |
| | |
| | | icon="el-icon-edit" |
| | | @click="handleInfo(scope.row)" |
| | | v-hasPermi="['system:records:edit']" |
| | | >案卷详细信息</el-button> |
| | | >编辑卷内目录</el-button> |
| | | |
| | | <el-button |
| | | size="mini" |
| | |
| | | <!-- <el-table-column label="${comment}" align="center" prop="id" /> --> |
| | | <el-table-column label="档案号" align="center" prop="recordId" /> |
| | | <el-table-column label="发文号" align="center" prop="inquiryNumber" /> |
| | | <el-table-column label="项目名称" align="center" prop="everyProjectName" /> |
| | | |
| | | <el-table-column label="案卷题名" align="center" prop="caseTitle" show-overflow-tooltip /> |
| | | |
| | | <el-table-column label="案卷题名" align="center" prop="caseTitle" /> |
| | | <el-table-column label="公开属性" align="center" prop="publicAttribute" /> |
| | | <el-table-column label="编制单位" align="center" prop="preparationUnit" /> |
| | | <el-table-column label="编制日期" align="center" prop="preparationDate" width="180"> |
| | |
| | | <el-table-column label="缩微号" align="center" prop="microfilmNumber" /> |
| | | <el-table-column label="备注" align="center" prop="remarks" /> |
| | | <el-table-column label="历史相关发文号" align="center" prop="historicalReferenceNumber" /> |
| | | |
| | | <el-table-column label="项目名称" align="center" prop="everyProjectName" /> |
| | | </el-table> |
| | | |
| | | <pagination |
| | |
| | | <div class="option-group"> |
| | | <label class="option-label"> |
| | | <input type="checkbox" v-model="excelOptions.includeQrCode"> |
| | | <span>包含二维码</span> |
| | | <span>包含条形码</span> |
| | | </label> |
| | | </div> |
| | | |
| | |
| | | <div class="option-group"> |
| | | <div class="option-label">选择注解:</div> |
| | | <div class="annotation-options"> |
| | | <label v-for="i in 5" :key="i" class="annotation-checkbox"> |
| | | <input type="checkbox" v-model="excelOptions.selectedAnnotations" :value="i"> |
| | | <span>注解{{ i }}</span> |
| | | </label> |
| | | <label v-for="(annotation, index) in excelOptions.selectedAnnotations" :key="index" class="signature-checkbox"> |
| | | <input type="checkbox" v-model="excelOptions.subselectedAnnotations" :value="index"> |
| | | <span>{{ annotation }} |
| | | </span> |
| | | </label> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="option-label">签名栏设置:</div> |
| | | <div class="signature-options"> |
| | | <div class="signature-checkboxes"> |
| | | <label v-for="i in 3" :key="i" class="signature-checkbox"> |
| | | <input type="checkbox" v-model="excelOptions.selectedSignatures" :value="i"> |
| | | <span>签名栏{{ i }}</span> |
| | | <label v-for="(signature, index) in excelOptions.selectedSignatures" :key="index" class="signature-checkbox"> |
| | | <input type="checkbox" v-model="excelOptions.subselectedSignatures" :value="index"> |
| | | <span>{{ signature }}</span> |
| | | </label> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <!-- <p v-if="excelOptions.selectedSignatures.length === 0" class="option-tip">请选择至少一个签名栏</p> --> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 优化的Excel预览组件 --> |
| | | <div class="excel-preview-wrapper" v-if="excelDialogVisible"> |
| | | <el-dialog class="excel-preview-wrapper" :visible.sync="showExcelPreview" :modal="false" width="80%" :show-close="true" @click="closeExcelPreviewDialog"> |
| | | <div @click.stop> |
| | | <!-- 主要预览组件 --> |
| | | <vue-office-excel |
| | | v-if="currentExcelUrl" |
| | |
| | | <button class="excel-dialog-btn download-btn" @click="handleDownloadClick">下载Excel文件</button> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | <div class="excel-dialog-footer"> |
| | | <button class="excel-dialog-btn preview-btn" @click="handlePreviewClick">预览</button> |
| | | <button class="excel-dialog-btn print-btn" @click="handlePrintClick">打印</button> |
| | |
| | | <el-input v-model="form.projectNumber" placeholder="请输入项目编号" /> |
| | | </el-form-item> |
| | | <el-form-item label="扫描加工公司" prop="scanningCompany"> |
| | | <el-input v-model="form.scanningCompany" placeholder="请输入扫描加工公司" /> |
| | | <el-select v-model="form.scanningCompany" placeholder="请选择扫描加工公司"> |
| | | <el-option |
| | | v-for="item in projectCompanyOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="档案管(室)号" prop="archiveRoomNumber"> |
| | | <el-input v-model="form.archiveRoomNumber" placeholder="请输入档案管(室)号" /> |
| | |
| | | name: "Records", |
| | | data() { |
| | | return { |
| | | showExcelPreview: false, |
| | | excel: 'http://localhost:8080/profile/upload/12.xls', //设置文档网络地址,可以是相对地址 |
| | | |
| | | open_check: false, |
| | |
| | | maxId: 0, |
| | | // 项目名称选项 |
| | | projectOptions: [], |
| | | // 项目管理公司选项 |
| | | projectCompanyOptions: [], |
| | | // 档案类型选项 |
| | | recordTypeOptions: [], |
| | | //地区类型 |
| | |
| | | pageSize: 10, |
| | | recordId: null, |
| | | inquiryNumber: null, |
| | | categoryType: null, // 类别类型 |
| | | categoryZone: null, // 类别地区 |
| | | categoryYear: null, // 类别年份 |
| | | categorySeq: null, // 开始序号 |
| | | categorySeqEnd: null, // 结束序号 |
| | | everyProjectName: null, |
| | | caseTitle: null, |
| | | publicAttribute: null, |
| | |
| | | // Excel选项配置 |
| | | excelOptions: { |
| | | includeQrCode: false, // 是否包含二维码 |
| | | selectedAnnotations: [], // 选中的注解列表 |
| | | selectedAnnotations: ["本清单由档案形成部门完成", |
| | | "文件类型必须录入,包括结论材料、过程材料、申请材料,其他材料", |
| | | "公开属性必须录入,主动公开、依申请公开、免予公开", |
| | | "保管期限:30年或永久", |
| | | "页号按照正式录入页码为准"], // 选中的注解列表 |
| | | includeSignature: false, // 是否包含签名栏 |
| | | selectedSignatures: ['业务科室移交人:', '审批科移交人:', '档案整理公司:'], // 选中的签名栏列表 |
| | | subselectedSignatures: [], |
| | | subselectedAnnotations: [], |
| | | signaturePosition: 'bottom' // 签名栏位置:top/bottom |
| | | }, |
| | | // 表单参数 |
| | |
| | | this.getRecordTypes() |
| | | this.getZoneOptions() |
| | | this.fetchProjectOptions() |
| | | this.fetchProjectCompanyOptions() |
| | | this.getList() |
| | | }, |
| | | watch: { |
| | |
| | | console.log("1111111333333",response.data) |
| | | this.zoneTypeOptions = response.data.data.map(item => ({ |
| | | value: item.nnumber, |
| | | label: item.name |
| | | label: item.nnumber |
| | | })) |
| | | } catch (error) { |
| | | console.error('获取项目名称列表失败:', error) |
| | |
| | | console.error('获取项目名称列表失败:', error) |
| | | } |
| | | }, |
| | | |
| | | async fetchProjectCompanyOptions() { |
| | | try { |
| | | const response = await listAllProjectName() |
| | | console.log("项目管理公司数据:", response) |
| | | // 从项目数据中提取管理公司信息 |
| | | const companies = [...new Set(response.data.data.map(item => item.companyName).filter(Boolean))] |
| | | console.log("项目管理公司数据:", companies) |
| | | |
| | | this.projectCompanyOptions = companies.map(company => ({ |
| | | value: company, |
| | | label: company |
| | | })) |
| | | } catch (error) { |
| | | console.error('获取项目管理公司列表失败:', error) |
| | | } |
| | | }, |
| | | /** 获取档案类型列表 */ |
| | | getRecordTypes() { |
| | | return new Promise((resolve) => { |
| | | listAllCategory().then(response => { |
| | | this.recordTypeOptions = response.data.map(item => ({ |
| | | value: item.numb, |
| | | label: item.nname |
| | | label: item.numb |
| | | })) |
| | | resolve() |
| | | }) |
| | |
| | | this.loading = true |
| | | console.log(this.queryParams) |
| | | console.log("--------------") |
| | | listRecords(this.queryParams).then(response => { |
| | | // 创建queryParams的副本,避免直接修改原对象 |
| | | const queryParams = { ...this.queryParams } |
| | | |
| | | // 处理类别号搜索 |
| | | if ((queryParams.categoryType || queryParams.categoryZone || queryParams.categoryYear) && (queryParams.categorySeq || queryParams.categorySeqEnd)) { |
| | | // 构建基础部分(前三个字段保持一致) |
| | | const baseParts = [] |
| | | if (queryParams.categoryType) baseParts.push(queryParams.categoryType) |
| | | if (queryParams.categoryZone) baseParts.push(queryParams.categoryZone) |
| | | if (queryParams.categoryYear) baseParts.push(queryParams.categoryYear) |
| | | const baseCategory = baseParts.join('-') |
| | | |
| | | // 构建开始类别号 |
| | | if (queryParams.categorySeq) { |
| | | queryParams.categoryNumberStart = baseCategory + '-' + queryParams.categorySeq |
| | | } |
| | | |
| | | // 构建结束类别号 |
| | | if (queryParams.categorySeqEnd) { |
| | | queryParams.categoryNumberEnd = baseCategory + '-' + queryParams.categorySeqEnd |
| | | } else if (queryParams.categorySeq) { |
| | | // 如果没有结束序号,则结束类别号与开始类别号相同 |
| | | queryParams.categoryNumberEnd = queryParams.categoryNumberStart |
| | | } |
| | | console.log(queryParams) |
| | | console.log("9999999999999999999") |
| | | // 删除单独的字段,避免重复搜索 |
| | | delete queryParams.categoryType |
| | | delete queryParams.categoryZone |
| | | delete queryParams.categoryYear |
| | | delete queryParams.categorySeq |
| | | delete queryParams.categorySeqEnd |
| | | } |
| | | |
| | | listRecords(queryParams).then(response => { |
| | | |
| | | console.log(response) |
| | | this.recordsList = response.data.data |
| | |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm") |
| | | // 确保类别号相关字段被完全重置 |
| | | this.queryParams.categoryType = null |
| | | this.queryParams.categoryZone = null |
| | | this.queryParams.categoryYear = null |
| | | this.queryParams.categorySeq = null |
| | | this.queryParams.categorySeqEnd = null |
| | | this.handleQuery() |
| | | }, |
| | | // 多选框选中数据 |
| | |
| | | // |
| | | handleSubmit(row) |
| | | { |
| | | // alert(row.id) |
| | | //alert(row.id) |
| | | var id = row.id |
| | | updateStatusById(id).then(response=>{ |
| | | var status = '录入完成' |
| | | updateStatusById(status, id).then(response=>{ |
| | | this.$modal.msgSuccess("提交成功") |
| | | this.getList() |
| | | }) |
| | |
| | | handleAuthUser: function(row) { |
| | | const roleId = 2 |
| | | var archiveRecordsId = row.recordId |
| | | alert(roleId) |
| | | |
| | | this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId) |
| | | }, |
| | | /** 删除按钮操作 */ |
| | |
| | | /** 查看并打印Excel文件 */ |
| | | viewAndPrintExcel(row) { |
| | | const id = row.id || this.ids; |
| | | // alert(id) |
| | | this.recordId = id; |
| | | this.$modal.loading('正在获取Excel文件,请稍候...'); |
| | | |
| | | // 从后端获取Excel文件 |
| | |
| | | /** 关闭Excel弹窗并清理资源 */ |
| | | closeExcelDialog() { |
| | | this.excelDialogVisible = false; |
| | | // alert(this.excelDialogVisible) |
| | | if (this.excelPreviewTimeout) { |
| | | clearTimeout(this.excelPreviewTimeout); |
| | | this.excelPreviewTimeout = null; |
| | |
| | | } |
| | | this.currentExcelBlob = null; |
| | | }, |
| | | closeExcelPreviewDialog() |
| | | { |
| | | |
| | | this.showExcelPreview = false; |
| | | }, |
| | | /** 处理预览按钮点击 */ |
| | | handlePreviewClick() { |
| | | this.excelLoading = true; |
| | | this.showExcelPreview = true; |
| | | this.excelRenderError = ''; |
| | | var id = this.recordId ; |
| | | this.$modal.loading('正在获取Excel文件,请稍候...'); |
| | | |
| | | // 从后端获取Excel文件 |
| | | this.getExcelFile(id).then(blob => { |
| | | this.$modal.closeLoading(); |
| | | // 保存文件信息并显示静态弹窗 |
| | | this.currentExcelUrl = URL.createObjectURL(blob); |
| | | this.currentExcelBlob = blob; |
| | | this.currentExcelId = id; |
| | | this.excelDialogVisible = true; |
| | | this.excelLoading = false; |
| | | }).catch(error => { |
| | | this.$modal.closeLoading(); |
| | | console.error('获取Excel文件失败:', error); |
| | | this.$modal.msgError('获取Excel文件失败,请稍后重试'); |
| | | }); |
| | | // 重置vue-office-excel组件 |
| | | if (this.currentExcelUrl) { |
| | | const tempUrl = this.currentExcelUrl; |
| | |
| | | // 构建文件名,包含选项信息 |
| | | let filename = `record_${this.currentExcelId}`; |
| | | if (includeQrCode) filename += '_qr'; |
| | | if (selectedAnnotations.length > 0) { |
| | | filename += `_anno${selectedAnnotations.join('')}`; |
| | | } |
| | | // if (selectedAnnotations.length > 0) { |
| | | // filename += `_anno${selectedAnnotations.join('')}`; |
| | | // } |
| | | filename += `_${new Date().getTime()}.xlsx`; |
| | | |
| | | link.download = filename; |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 清理Excel预览相关资源 */ |
| | | /** 清理Excel预览相关资源并关闭对话框 */ |
| | | cleanupExcelPreview(iframe, url) { |
| | | setTimeout(() => { |
| | | if (iframe && iframe.parentNode) { |
| | |
| | | URL.revokeObjectURL(url); |
| | | } |
| | | this.excelRenderError = ''; |
| | | this.showExcelPreview = false; // 关闭预览对话框 |
| | | }, 1000); |
| | | }, |
| | | |
| | | /** 从后端获取Excel文件 */ |
| | | getExcelFile(id) { |
| | | var includeQrCode = this.excelOptions.includeQrCode; |
| | | var urls = `${process.env.VUE_APP_BASE_API}/system/records/recordFileList`+"/"+includeQrCode; |
| | | |
| | | |
| | | if(this.excelOptions.subselectedSignatures.length!=0) |
| | | { |
| | | var selectedSignatures = this.excelOptions.subselectedSignatures |
| | | urls = urls +'/'+ selectedSignatures |
| | | } |
| | | if(this.excelOptions.subselectedAnnotations.length!=0) |
| | | { |
| | | var selectedAnnotations = this.excelOptions.subselectedAnnotations |
| | | urls = urls+"/"+selectedAnnotations |
| | | } |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | // 首先尝试使用axios(项目已有的HTTP客户端) |
| | | try { |
| | | // 获取用户选择的注解 |
| | | const { selectedAnnotations } = this.excelOptions; |
| | | |
| | | // 构建参数,包含注解内容 |
| | | const params = { |
| | | recordId: id, |
| | | |
| | | }; |
| | | |
| | | axios({ |
| | | method: 'Post', |
| | | url: `${process.env.VUE_APP_BASE_API}/system/records/model`, |
| | | params: { id: id }, |
| | | url: urls, |
| | | params: params, |
| | | responseType: 'blob', |
| | | headers: { 'Authorization': 'Bearer ' + getToken() } |
| | | }).then(response => { |
| | |
| | | fallbackGetExcelFile(id, resolve, reject) { |
| | | try { |
| | | const xhr = new XMLHttpRequest(); |
| | | |
| | | // 构建查询参数,包含注解内容 |
| | | const queryParams = new URLSearchParams({ |
| | | id: id, |
| | | annotation1: "本清单由档案形成部门完成", |
| | | annotation2: "文件类型必须录入,包括结论材料、过程材料、申请材料,其他材料", |
| | | annotation3: "公开属性必须录入,主动公开、依申请公开、免予公开", |
| | | annotation4: "保管期限:30年或永久", |
| | | annotation5: "页号按照正式录入页码为准" |
| | | }).toString(); |
| | | |
| | | // 尝试不同的API路径,以适应可能的后端实现 |
| | | const apiUrls = [ |
| | | `${process.env.VUE_APP_BASE_API}/system/records/model?id=${id}`, |
| | | `${process.env.VUE_APP_BASE_API}/system/records/model?${queryParams}`, |
| | | `${process.env.VUE_APP_BASE_API}/system/records/model` |
| | | ]; |
| | | |