| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <h2 class="title-border">添加案卷详细记录</h2> |
| | | |
| | | <div v-if="sho"> |
| | | <h2 class="title-border">添加案卷详细记录 {当前录入了{{total}}条}</h2> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | |
| | | <el-row> |
| | |
| | | <el-form-item label="责任者" prop="creator"> |
| | | <div class="title-search-wrapper"> |
| | | <el-input |
| | | type="textarea" |
| | | rows="1" |
| | | v-model="form.creator" |
| | | placeholder="请输入责任者" |
| | | @input="handleCreatorInput" |
| | |
| | | <el-form-item label="文件题名" prop="title"> |
| | | <div class="title-search-wrapper"> |
| | | <el-input |
| | | type="textarea" |
| | | rows="1" |
| | | v-model="form.title" |
| | | placeholder="请输入文件题名" |
| | | @input="handleTitleInput" |
| | |
| | | |
| | | </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" |
| | |
| | | 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:export']" |
| | | |
| | | >导出卷内目录</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:materials:list']" |
| | | v-hasPermi="['system:materials:export']" |
| | | |
| | | >导出</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" |
| | |
| | | </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" /> |
| | |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-form-item label="责任者" prop="creator"> |
| | | <el-input v-model="forms.creator" placeholder="请输入责任者" /> |
| | | <el-input type="textarea" rows="1" v-model="forms.creator" placeholder="请输入责任者" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-form-item label="文件题名" prop="title"> |
| | | <el-input v-model="forms.title" placeholder="请输入文件题名" /> |
| | | <el-input type="textarea" rows="1" v-model="forms.title" placeholder="请输入文件题名" /> |
| | | </el-form-item> |
| | | <el-form-item label="日期" prop="date"> |
| | | <el-input v-model="forms.date" placeholder="请输入日期 (格式:yyyy-mm-dd)" style="width: 200px;" /> |
| | |
| | | name: "Materials", |
| | | data() { |
| | | return { |
| | | //是否显示相关内容 |
| | | sho: true, |
| | | totalPageCount: 0, |
| | | // 记录元素初始位置和状态 |
| | | originalOffsetLeft: 0, |
| | |
| | | titleSearchTimer: null, // 防抖定时器 |
| | | creatorSuggestions: [], // 匹配的责任人建议列表 |
| | | showCreatorSuggestions: false, // 是否显示责任人建议框 |
| | | creatorSearchTimer: null, // 责任人查询防抖定时器 |
| | | creatorSearchTimer: null, // persona查询防抖定时器 |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | titles: "", |
| | |
| | | { required: true, message: "页号不能为空", trigger: "blur" }, |
| | | { type: 'number', message: '页号必须为数字类型', trigger: ['blur', 'change'] }, |
| | | { pattern: /^[1-9]\d*$/, message: '请输入大于0的正整数', trigger: 'blur' }, |
| | | { validator: (rule, value, callback) => { |
| | | if (this.totalPageCount > 0 && value > this.totalPageCount) { |
| | | callback(new Error(`页号不能超过总页数${this.totalPageCount}`)); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, trigger: ['blur', 'change'] |
| | | }, |
| | | // { max: 85, message: "最大长度为85个字符", trigger: "blur" } |
| | | ], |
| | | stage: [ |
| | |
| | | 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; |
| | |
| | | /** 查询【请填写功能名称】列表 */ |
| | | getList() { |
| | | this.loading = true |
| | | |
| | | // 处理档案号搜索逻辑,包括范围搜索 |
| | | const queryParams = { ...this.queryParams } |
| | | |
| | | // 检查是否包含范围搜索符号 |
| | | if (queryParams.fileNumber && queryParams.fileNumber.includes('~')) { |
| | | const rangeParts = queryParams.fileNumber.split('~') |
| | | if (rangeParts.length === 2) { |
| | | // 解析范围搜索参数 |
| | | // 保留原始fileNumber用于其他处理 |
| | | queryParams.fileNumberStart = rangeParts[0].trim() |
| | | queryParams.fileNumberEnd = rangeParts[1].trim() |
| | | } |
| | | } |
| | | |
| | | listMaterials(queryParams).then(response => { |
| | | listMaterials(this.queryParams).then(response => { |
| | | console.log(response) |
| | | // 过滤掉visible为0的记录 |
| | | this.materialsList = response.data.data.filter(item => item.visible !== 0) |
| | |
| | | this.showCreatorSuggestions = false; |
| | | }, |
| | | |
| | | // 处理材料类型变化(新增表单) |
| | | // 处理材料类型变化 |
| | | handleFileStyleChange(value) { |
| | | // 当选择'其他材料'时,将页号设置为0 |
| | | // 当选择'其他材料'时,清空页码字段 |
| | | if (value === '其他材料') { |
| | | this.form.pageNumber = null; |
| | | } |
| | |
| | | |
| | | // 保存成功后,光标跳回文件编号输入框 |
| | | this.$nextTick(() => { |
| | | this.$refs.documentNumberInput.focus(); |
| | | this.$refs.documentNumberInput.select(); |
| | | }); |
| | | this.getList() |
| | | }) |
| | | } |
| | | else |
| | | { |
| | | this.$message.error('请填写所有必填字段'); |
| | | }) |
| | | } |
| | | else |
| | | { |
| | | this.$message.error('请填写所有必填字段'); |
| | | |
| | | } |
| | | }) |
| | |
| | | if (this.forms.materialId != null) { |
| | | updateMaterials(this.forms).then(response => { |
| | | this.$modal.msgSuccess("修改成功") |
| | | // 修改成功后,光标跳回文件编号输入框 |
| | | this.$nextTick(() => { |
| | | this.$refs.documentNumberInput.focus(); |
| | | }); |
| | | |
| | | this.open = false |
| | | this.getList() |
| | | }) |
| | |
| | | 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}){ |
| | |
| | | background-color: #fff; |
| | | } |
| | | </style> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |