|
@@ -30,24 +30,20 @@
|
|
<EditPen />
|
|
<EditPen />
|
|
</el-icon>
|
|
</el-icon>
|
|
</span>
|
|
</span>
|
|
- <ElInput
|
|
|
|
- v-model="row.filesTitle"
|
|
|
|
- placeholder="请输入文件名"
|
|
|
|
- focus
|
|
|
|
- v-else
|
|
|
|
- style="width: 300px"
|
|
|
|
- >
|
|
|
|
- <template v-slot:suffix>
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- plain
|
|
|
|
- @click="updateFileTitle(row)"
|
|
|
|
- class="input-inner-btn"
|
|
|
|
- >
|
|
|
|
- 确定
|
|
|
|
- </el-button>
|
|
|
|
- </template>
|
|
|
|
- </ElInput>
|
|
|
|
|
|
+ <template v-else>
|
|
|
|
+ <ElInput
|
|
|
|
+ v-model="row.filesTitle"
|
|
|
|
+ placeholder="请输入文件名"
|
|
|
|
+ focus
|
|
|
|
+ style="width: 280px"
|
|
|
|
+ >
|
|
|
|
+ <template #append>
|
|
|
|
+ <el-button type="primary" plain @click="updateFileTitle(row)">
|
|
|
|
+ 确定
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </ElInput>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="创建时间" prop="createTime"></el-table-column>
|
|
<el-table-column label="创建时间" prop="createTime"></el-table-column>
|
|
<el-table-column label="操作" v-slot:default="{ row }: { row: CaseFile }">
|
|
<el-table-column label="操作" v-slot:default="{ row }: { row: CaseFile }">
|
|
@@ -83,7 +79,7 @@ import {
|
|
} from "@/store/caseFile";
|
|
} from "@/store/caseFile";
|
|
import { getCaseInfo, updateCaseInfo } from "@/store/case";
|
|
import { getCaseInfo, updateCaseInfo } from "@/store/case";
|
|
import { appConstant } from "@/app";
|
|
import { appConstant } from "@/app";
|
|
-import { ElIcon, ElInput } from "element-plus";
|
|
|
|
|
|
+import { ElIcon, ElInput, ElMessage } from "element-plus";
|
|
|
|
|
|
const caseId = computed(() => {
|
|
const caseId = computed(() => {
|
|
const caseId = router.currentRoute.value.params.caseId;
|
|
const caseId = router.currentRoute.value.params.caseId;
|
|
@@ -95,6 +91,9 @@ const caseId = computed(() => {
|
|
const inputCaseTitles = ref<CaseFile[]>([]);
|
|
const inputCaseTitles = ref<CaseFile[]>([]);
|
|
|
|
|
|
const updateFileTitle = async (caseFile: CaseFile) => {
|
|
const updateFileTitle = async (caseFile: CaseFile) => {
|
|
|
|
+ if (!caseFile.filesTitle.trim()) {
|
|
|
|
+ return ElMessage.error("卷宗标题不能为空!");
|
|
|
|
+ }
|
|
await updateCaseInfo(caseFile);
|
|
await updateCaseInfo(caseFile);
|
|
inputCaseTitles.value = inputCaseTitles.value.filter((item) => item !== caseFile);
|
|
inputCaseTitles.value = inputCaseTitles.value.filter((item) => item !== caseFile);
|
|
};
|
|
};
|
|
@@ -139,7 +138,7 @@ onMounted(async () => {
|
|
types.value = await getCaseFileTypes();
|
|
types.value = await getCaseFileTypes();
|
|
currentTypeId.value = types.value[0].filesTypeId;
|
|
currentTypeId.value = types.value[0].filesTypeId;
|
|
|
|
|
|
- title.value = "卷宗管理 | " + (await getCaseInfo(caseId.value!)).caseTitle;
|
|
|
|
|
|
+ title.value = (await getCaseInfo(caseId.value!)).caseTitle + " | 卷宗管理";
|
|
desc.value = "";
|
|
desc.value = "";
|
|
});
|
|
});
|
|
|
|
|