| src/views/fileManagement/borrow/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/fileManagement/document/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/fileManagement/return/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/fileManagement/borrow/index.vue
@@ -100,16 +100,14 @@ </el-col> <el-col :span="12"> <el-form-item label="借阅书籍:" prop="documentationId"> <!-- <el-select v-model="borrowForm.documentationId" placeholder="请选择借阅书籍" style="width: 100%" @change="handleScanContent"> <el-option v-for="item in documentList" :key="item.id" :label="item.docName || item.name" :value="item.id" /> </el-select> --> <div style="display: flex; gap: 10px;"> <el-select v-model="borrowForm.documentationId" placeholder="请选择借阅书籍" style="flex: 1;width: 100px;" @change="handleSelectChange"> <el-select v-if="borrowOperationType !== 'edit'" v-model="borrowForm.documentationId" placeholder="请选择借阅书籍" style="flex: 1;width: 100px;" @change="handleSelectChange" > <el-option v-for="item in documentList" :key="item.id" @@ -118,6 +116,13 @@ /> </el-select> <el-input v-else v-model="currentEditDocName" style="flex: 1;width: 100px;" disabled /> <el-input v-if="borrowOperationType !== 'edit'" v-model="scanContent" placeholder="扫码输入" style="width: 100px;" @@ -205,6 +210,7 @@ const selectedRows = ref([]); const documentList = ref([]); // 文档列表,用于借阅书籍选择 const scanContent = ref() // 扫码内容 const currentEditDocName = ref(''); // 编辑时存储的文档名称 // 分页相关 const pagination = reactive({ currentPage: 1, @@ -282,6 +288,7 @@ { name: "编辑", type: "text", disabled: (row) => row.borrowStatus === '归还', clickFun: (row) => { openBorrowDia('edit', row) }, @@ -428,11 +435,14 @@ if (type === "edit") { // 编辑模式,加载现有数据 Object.assign(borrowForm, data); // 存储文档名称用于显示 currentEditDocName.value = data.docName || ''; } else { // 新增模式,清空表单 Object.keys(borrowForm).forEach(key => { borrowForm[key] = ""; }); currentEditDocName.value = ''; // 清空编辑时的文档名称 // 设置默认状态 borrowForm.borrowStatus = "借阅"; // 设置当前日期为借阅日期 @@ -445,6 +455,7 @@ proxy.$refs.borrowFormRef.resetFields(); borrowDia.value = false; scanContent.value = ''; // 清空扫码内容 currentEditDocName.value = ''; // 清空编辑时的文档名称 }; // 提交借阅表单 src/views/fileManagement/document/index.vue
@@ -862,12 +862,14 @@ documentForm[key] = ""; }); documentForm.attachments = []; // 新增模式下也清空附件 // 设置默认值 - 使用字典数据的第一个选项作为默认值 // 设置默认值 - 文档状态默认设置为"正常" if (document_status.value && document_status.value.length > 0) { documentForm.docStatus = document_status.value[0].value; const normalStatus = document_status.value.find(item => item.label === '正常'); documentForm.docStatus = normalStatus ? normalStatus.value : document_status.value[0].value; } if (document_urgency.value && document_urgency.value.length > 0) { documentForm.urgencyLevel = document_urgency.value[0].value; const normalUrgency = document_urgency.value.find(item => item.label === '普通'); documentForm.urgencyLevel = normalUrgency ? normalUrgency.value : document_urgency.value[0].value; } } }; src/views/fileManagement/return/index.vue
@@ -103,16 +103,14 @@ <el-row :gutter="20"> <el-col :span="12"> <el-form-item label="文档:" prop="borrowId"> <!-- <el-select v-model="returnForm.borrowId" placeholder="请选择文档" style="flex: 1;" @change="handleDocumentChange"> <el-option v-for="item in documentList" :key="item.id" :label="item.docName || item.name" :value="item.id" /> </el-select> --> <div style="display: flex; gap: 10px;"> <el-select v-model="returnForm.borrowId" placeholder="请选择文档" style="width: 120px;" @change="handleDocumentChange"> <el-select v-if="returnOperationType !== 'edit'" v-model="returnForm.borrowId" placeholder="请选择文档" style="width: 120px;" @change="handleDocumentChange" > <el-option v-for="item in documentList" :key="item.id" @@ -121,6 +119,13 @@ /> </el-select> <el-input v-else v-model="currentEditDocName" style="width: 120px;" disabled /> <el-input v-if="returnOperationType !== 'edit'" v-model="scanContent" placeholder="扫码输入" style="flex: 1;" @@ -215,6 +220,7 @@ const documentList = ref([]); // 文档列表 const borrowInfoList = ref([]); // 借阅信息列表 const scanContent = ref(); // 扫码内容 const currentEditDocName = ref(''); // 编辑时存储的文档名称 // 分页相关 const pagination = reactive({ @@ -286,6 +292,7 @@ { name: "编辑", type: "text", disabled: (row) => row.borrowStatus === '归还', clickFun: (row) => { openReturnDia('edit', row) }, @@ -396,15 +403,14 @@ if (type === "edit") { // 编辑模式,加载现有数据 Object.assign(returnForm, data); // 编辑模式下,文档选择后自动填充借阅人和应归还日期 if (returnForm.borrowId) { handleDocumentChange(returnForm.borrowId); } // 存储文档名称用于显示 currentEditDocName.value = data.docName || ''; } else { // 新增模式,清空表单 Object.keys(returnForm).forEach(key => { returnForm[key] = ""; }); currentEditDocName.value = ''; // 清空编辑时的文档名称 // 设置默认状态 returnForm.borrowStatus = "归还"; // 设置当前日期为归还日期 @@ -418,6 +424,7 @@ returnDia.value = false; scanContent.value = ''; // 清空扫码内容 borrowInfoList.value = []; // 清空借阅信息列表 currentEditDocName.value = ''; // 清空编辑时的文档名称 }; // 提交归还表单