|
@@ -23,7 +23,32 @@
|
|
{{ $index + 1 }}
|
|
{{ $index + 1 }}
|
|
</div>
|
|
</div>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="名称" prop="filesTitle"></el-table-column>
|
|
|
|
|
|
+ <el-table-column label="名称" v-slot:default="{ row }: { row: CaseFile }">
|
|
|
|
+ <span v-if="!inputCaseTitles.includes(row)">
|
|
|
|
+ {{ row.filesTitle }}
|
|
|
|
+ <el-icon class="edit-title" @click="inputCaseTitles.push(row)">
|
|
|
|
+ <EditPen />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </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>
|
|
|
|
+ </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 }">
|
|
<span class="oper-span" @click="query(row)"> 查看 </span>
|
|
<span class="oper-span" @click="query(row)"> 查看 </span>
|
|
@@ -45,8 +70,9 @@ import comHead from "@/components/head/index.vue";
|
|
import { confirm } from "@/helper/message";
|
|
import { confirm } from "@/helper/message";
|
|
import { RouteName, router } from "@/router";
|
|
import { RouteName, router } from "@/router";
|
|
import { FileDrawType, BoardTypeDesc } from "@/constant/caseFile";
|
|
import { FileDrawType, BoardTypeDesc } from "@/constant/caseFile";
|
|
-import { computed, onMounted, ref, watchEffect } from "vue";
|
|
|
|
|
|
+import { computed, onMounted, onUnmounted, ref, watchEffect } from "vue";
|
|
import { addCaseFile } from "./quisk";
|
|
import { addCaseFile } from "./quisk";
|
|
|
|
+import { title, desc } from "@/store/system";
|
|
import {
|
|
import {
|
|
CaseFile,
|
|
CaseFile,
|
|
CaseFileType,
|
|
CaseFileType,
|
|
@@ -55,6 +81,9 @@ import {
|
|
delCaseFile,
|
|
delCaseFile,
|
|
BoardType,
|
|
BoardType,
|
|
} from "@/store/caseFile";
|
|
} from "@/store/caseFile";
|
|
|
|
+import { getCaseInfo, updateCaseInfo } from "@/store/case";
|
|
|
|
+import { appConstant } from "@/app";
|
|
|
|
+import { ElIcon, ElInput } from "element-plus";
|
|
|
|
|
|
const caseId = computed(() => {
|
|
const caseId = computed(() => {
|
|
const caseId = router.currentRoute.value.params.caseId;
|
|
const caseId = router.currentRoute.value.params.caseId;
|
|
@@ -63,6 +92,13 @@ const caseId = computed(() => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+const inputCaseTitles = ref<CaseFile[]>([]);
|
|
|
|
+
|
|
|
|
+const updateFileTitle = async (caseFile: CaseFile) => {
|
|
|
|
+ await updateCaseInfo(caseFile);
|
|
|
|
+ inputCaseTitles.value = inputCaseTitles.value.filter((item) => item !== caseFile);
|
|
|
|
+};
|
|
|
|
+
|
|
const currentTypeId = ref<number>();
|
|
const currentTypeId = ref<number>();
|
|
const types = ref<CaseFileType[]>([]);
|
|
const types = ref<CaseFileType[]>([]);
|
|
const options = computed(() =>
|
|
const options = computed(() =>
|
|
@@ -101,7 +137,21 @@ const gotoDraw = (type: BoardType, id: number) => {
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
types.value = await getCaseFileTypes();
|
|
types.value = await getCaseFileTypes();
|
|
- console.log(types.value);
|
|
|
|
currentTypeId.value = types.value[0].filesTypeId;
|
|
currentTypeId.value = types.value[0].filesTypeId;
|
|
|
|
+
|
|
|
|
+ title.value = "卷宗管理 | " + (await getCaseInfo(caseId.value!)).caseTitle;
|
|
|
|
+ desc.value = "";
|
|
});
|
|
});
|
|
-</script>
|
|
|
|
|
|
+
|
|
|
|
+onUnmounted(() => {
|
|
|
|
+ title.value = appConstant.title;
|
|
|
|
+ desc.value = appConstant.desc;
|
|
|
|
+});
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+.edit-title {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+}
|
|
|
|
+</style>
|