|
@@ -1,9 +1,46 @@
|
|
|
<template>
|
|
|
<div class="midd-page">
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="AED数据表" name="first">
|
|
|
+ <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="AED列表" name="first"> -->
|
|
|
+ <div class="header">
|
|
|
+ <div class="h_left">
|
|
|
+ <p class="current-doc">
|
|
|
+ 当前数据表: {{ firstForm.currentDocument }}
|
|
|
+ </p>
|
|
|
+ <div class="search-box">
|
|
|
+ <el-input
|
|
|
+ v-model="firstForm.searchQuery"
|
|
|
+ placeholder="请输入搜索内容"
|
|
|
+ class="custom-search-input"
|
|
|
+ clearable
|
|
|
+ @clear="handleSearchClear"
|
|
|
+ @keyup.enter.native="handleSearch"
|
|
|
+ >
|
|
|
+ <template #append>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="handleSearch"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="h_right">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="firstForm.currentPage"
|
|
|
+ :page-size="firstForm.pageSize"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :total="firstForm.total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
<el-table :data="firstTableData" style="width: 100%">
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
label="工作类型"
|
|
|
prop="workType"
|
|
|
:filters="firstForm.workTypeFilters"
|
|
@@ -23,10 +60,10 @@
|
|
|
</el-select>
|
|
|
<span v-else>{{ scope.row.workType }}</span>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column
|
|
|
label="项目"
|
|
|
- prop="project"
|
|
|
+ prop="name"
|
|
|
:filters="firstForm.projectFilters"
|
|
|
:filter-method="firstFilterProject"
|
|
|
filter-placement="bottom-end"
|
|
@@ -34,10 +71,10 @@
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-input
|
|
|
- v-model="scope.row.project"
|
|
|
+ v-model="scope.row.name"
|
|
|
v-if="scope.row.isEdit"
|
|
|
></el-input>
|
|
|
- <span v-else>{{ scope.row.project }}</span>
|
|
|
+ <span v-else>{{ scope.row.name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="说明" prop="description">
|
|
@@ -67,16 +104,16 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="模型生成1"
|
|
|
- prop="model1"
|
|
|
+ prop="generation_1"
|
|
|
class-name="model-gen-1"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-input
|
|
|
- v-model="scope.row.example"
|
|
|
+ v-model="scope.row.generation_1"
|
|
|
v-if="scope.row.isEdit"
|
|
|
></el-input>
|
|
|
<span v-else>
|
|
|
- {{ scope.row.model1 }}
|
|
|
+ {{ scope.row.generation_1 }}
|
|
|
<i
|
|
|
class="el-icon-refresh"
|
|
|
@click="openModel1Dialog(scope.row)"
|
|
@@ -87,16 +124,16 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="模型生成2"
|
|
|
- prop="model2"
|
|
|
+ prop="generation_2"
|
|
|
class-name="model-gen-2"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-input
|
|
|
- v-model="scope.row.model2"
|
|
|
+ v-model="scope.row.generation_2"
|
|
|
v-if="scope.row.isEdit"
|
|
|
></el-input>
|
|
|
<span v-else>
|
|
|
- {{ scope.row.model2 }}
|
|
|
+ {{ scope.row.generation_2 }}
|
|
|
<i
|
|
|
class="el-icon-refresh"
|
|
|
@click="openModel2Dialog(scope.row)"
|
|
@@ -130,7 +167,7 @@
|
|
|
>
|
|
|
<i class="el-icon-check"></i> 保存
|
|
|
</el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item
|
|
|
+ <!-- <el-dropdown-item
|
|
|
@click.native="firstHandleUpload(scope.$index, scope.row)"
|
|
|
>
|
|
|
<i class="el-icon-refresh"></i> 更新内容
|
|
@@ -152,8 +189,8 @@
|
|
|
style="margin-top: 20px"
|
|
|
>新增行</el-button
|
|
|
>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="SOTA数据表" name="second">
|
|
|
+ <!-- </el-tab-pane> -->
|
|
|
+ <!-- <el-tab-pane label="SOTA详情" name="second">
|
|
|
<el-table :data="secondTableData" style="width: 100%">
|
|
|
<el-table-column
|
|
|
label="Identifier"
|
|
@@ -207,11 +244,6 @@
|
|
|
></el-input>
|
|
|
<span v-else>
|
|
|
{{ scope.row.example }}
|
|
|
- <!-- <i
|
|
|
- class="el-icon-edit"
|
|
|
- @click="openExampleDialog(scope.row)"
|
|
|
- style="cursor: pointer; margin-left: 5px"
|
|
|
- ></i> -->
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -249,11 +281,6 @@
|
|
|
>
|
|
|
<i class="el-icon-check"></i> 保存
|
|
|
</el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item
|
|
|
- @click.native="secondHandleUpload(scope.$index, scope.row)"
|
|
|
- >
|
|
|
- <i class="el-icon-refresh"></i> 更新内容
|
|
|
- </el-dropdown-item> -->
|
|
|
<el-dropdown-item
|
|
|
@click.native="
|
|
|
secondHandleDelete(scope.$index, scope.row)
|
|
@@ -320,22 +347,6 @@
|
|
|
<span v-else>{{ scope.row.description }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="范例" prop="example">
|
|
|
- <template #default="scope">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.example"
|
|
|
- v-if="scope.row.isEdit"
|
|
|
- ></el-input>
|
|
|
- <span v-else>
|
|
|
- {{ scope.row.example }}
|
|
|
- <i
|
|
|
- class="el-icon-edit"
|
|
|
- @click="openExampleDialog(scope.row)"
|
|
|
- style="cursor: pointer; margin-left: 5px"
|
|
|
- ></i>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
<el-table-column label="操作" width="100">
|
|
|
<template #default="scope">
|
|
|
<el-dropdown trigger="click">
|
|
@@ -361,11 +372,6 @@
|
|
|
>
|
|
|
<i class="el-icon-check"></i> 保存
|
|
|
</el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item
|
|
|
- @click.native="thirdHandleUpload(scope.$index, scope.row)"
|
|
|
- >
|
|
|
- <i class="el-icon-refresh"></i> 更新内容
|
|
|
- </el-dropdown-item> -->
|
|
|
<el-dropdown-item
|
|
|
@click.native="thirdHandleDelete(scope.$index, scope.row)"
|
|
|
>
|
|
@@ -383,8 +389,8 @@
|
|
|
style="margin-top: 20px"
|
|
|
>新增行</el-button
|
|
|
>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ </el-tab-pane> -->
|
|
|
+ <!-- </el-tabs> -->
|
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible" title="编辑范例" width="30%">
|
|
|
<el-input v-model="currentExample" type="textarea" :rows="4"></el-input>
|
|
@@ -470,6 +476,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getDetail } from "@/api/knowledge";
|
|
|
export default {
|
|
|
name: "MiddPage",
|
|
|
data() {
|
|
@@ -477,7 +484,7 @@ export default {
|
|
|
activeName: "first",
|
|
|
firstForm: {
|
|
|
tableData: [
|
|
|
- {
|
|
|
+ /* {
|
|
|
workType: "复制",
|
|
|
project: "indication",
|
|
|
description:
|
|
@@ -512,7 +519,7 @@ export default {
|
|
|
model2:
|
|
|
"Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
|
|
|
isEdit: false,
|
|
|
- },
|
|
|
+ }, */
|
|
|
],
|
|
|
workTypeFilters: [
|
|
|
{ text: "类型1", value: "type1" },
|
|
@@ -532,8 +539,13 @@ export default {
|
|
|
prompt: "",
|
|
|
modelValue: "",
|
|
|
},
|
|
|
+ currentDocument: "AED数据表", // 当前文档名称
|
|
|
+ searchQuery: "", // 搜索关键词
|
|
|
+ currentPage: 1, // 当前页码
|
|
|
+ pageSize: 10, // 每页显示条数
|
|
|
+ total: 3, // 总条数
|
|
|
},
|
|
|
- secondForm: {
|
|
|
+ /* secondForm: {
|
|
|
tableData: [
|
|
|
{
|
|
|
workType: "SOTA-E1-01",
|
|
@@ -585,15 +597,6 @@ export default {
|
|
|
"white non-hispanic: n=247;african american:n=25;hispanic or latino: n=34",
|
|
|
isEdit: false,
|
|
|
},
|
|
|
- /* {
|
|
|
- workType: "总结和数据提取;",
|
|
|
- project: "Alternative device(treatment)",
|
|
|
- description:
|
|
|
- "Device name + model name如无,可写疗法(以评价的器械的替代疗法)",
|
|
|
- example:
|
|
|
- "Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
|
|
|
- isEdit: false,
|
|
|
- }, */
|
|
|
],
|
|
|
workTypeFilters: [
|
|
|
{ text: "类型1", value: "type1" },
|
|
@@ -605,7 +608,7 @@ export default {
|
|
|
workType: [],
|
|
|
project: [],
|
|
|
},
|
|
|
- },
|
|
|
+ }, */
|
|
|
|
|
|
dialogVisible: false,
|
|
|
currentExample: "",
|
|
@@ -623,7 +626,7 @@ export default {
|
|
|
);
|
|
|
});
|
|
|
},
|
|
|
- secondTableData() {
|
|
|
+ /* secondTableData() {
|
|
|
return this.secondForm.tableData.filter((data) => {
|
|
|
return (
|
|
|
(!this.secondForm.activeFilters.workType.length ||
|
|
@@ -642,14 +645,18 @@ export default {
|
|
|
this.thirdForm.activeFilters.project.includes(data.project))
|
|
|
);
|
|
|
});
|
|
|
- },
|
|
|
+ }, */
|
|
|
},
|
|
|
created() {
|
|
|
this.updateProjectFilters();
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.firstForm.currentDocument=this.$route.query.name
|
|
|
+ this.firstInit();
|
|
|
+ },
|
|
|
methods: {
|
|
|
/* SOTA汇总表(第三) */
|
|
|
- thirdHandleEdit(index, row) {
|
|
|
+ /* thirdHandleEdit(index, row) {
|
|
|
row.isEdit = true;
|
|
|
},
|
|
|
thirdHandleSave(index, row) {
|
|
@@ -685,9 +692,9 @@ export default {
|
|
|
text: project,
|
|
|
value: project,
|
|
|
}));
|
|
|
- },
|
|
|
+ }, */
|
|
|
/* SOTA数据表(第二) */
|
|
|
- secondHandleEdit(index, row) {
|
|
|
+ /* secondHandleEdit(index, row) {
|
|
|
row.isEdit = true;
|
|
|
},
|
|
|
secondHandleSave(index, row) {
|
|
@@ -723,7 +730,7 @@ export default {
|
|
|
text: project,
|
|
|
value: project,
|
|
|
}));
|
|
|
- },
|
|
|
+ }, */
|
|
|
/* AED数据表(第一) 操作事件*/
|
|
|
openExampleDialog(row) {
|
|
|
this.dialogVisible = true;
|
|
@@ -755,16 +762,16 @@ export default {
|
|
|
|
|
|
// 打开模型1对话框
|
|
|
openModel1Dialog(row) {
|
|
|
- this.firstForm.firstAiForm.application='app1'
|
|
|
- this.firstForm.firstAiForm.description=row.description
|
|
|
- this.firstForm.dialogVisible=true
|
|
|
+ this.firstForm.firstAiForm.application = "app1";
|
|
|
+ this.firstForm.firstAiForm.description = row.description;
|
|
|
+ this.firstForm.dialogVisible = true;
|
|
|
},
|
|
|
|
|
|
// 打开模型2对话框
|
|
|
openModel2Dialog(row) {
|
|
|
- this.firstForm.firstAiForm.application='app2'
|
|
|
- this.firstForm.firstAiForm.description=row.description
|
|
|
- this.firstForm.dialogVisible=true
|
|
|
+ this.firstForm.firstAiForm.application = "app2";
|
|
|
+ this.firstForm.firstAiForm.description = row.description;
|
|
|
+ this.firstForm.dialogVisible = true;
|
|
|
},
|
|
|
|
|
|
// 获取更新内容的方法(需要根据实际API进行修改)
|
|
@@ -838,7 +845,51 @@ export default {
|
|
|
value: project,
|
|
|
}));
|
|
|
},
|
|
|
+ /* 搜索逻辑 */
|
|
|
+ handleSearch() {
|
|
|
+ // 实现搜索逻辑
|
|
|
+ const query = this.firstForm.searchQuery.toLowerCase();
|
|
|
+ const filteredData = this.firstForm.tableData.filter((item) => {
|
|
|
+ return Object.values(item).some((value) =>
|
|
|
+ String(value).toLowerCase().includes(query)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ this.total = filteredData.length;
|
|
|
+ // 更新表格数据
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSearchClear() {
|
|
|
+ this.firstForm.searchQuery = "";
|
|
|
+ this.handleSearch();
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.firstForm.pageSize = val;
|
|
|
+ this.handleSearch();
|
|
|
+ },
|
|
|
+
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.firstForm.currentPage = val;
|
|
|
+ this.handleSearch();
|
|
|
+ },
|
|
|
+
|
|
|
handleClick() {},
|
|
|
+ /* 获取详细信息 */
|
|
|
+ async firstInit() {
|
|
|
+ const res = await getDetail({ id: this.$route.query.id });
|
|
|
+ console.log("详情数据:", res.data);
|
|
|
+
|
|
|
+ // Transform data into array of objects with name property
|
|
|
+ const processedData = Object.entries(res.data)
|
|
|
+ .filter(([key]) => !["id", "create_time", "update_time"].includes(key)) // Exclude non-field properties
|
|
|
+ .map(([key, value]) => ({
|
|
|
+ name: key,
|
|
|
+ isEdit:false,
|
|
|
+ ...value,
|
|
|
+ }));
|
|
|
+ console.log(processedData);
|
|
|
+ this.firstForm.tableData=processedData;
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
tableData: {
|
|
@@ -876,4 +927,54 @@ export default {
|
|
|
background-color: #f0e6ff !important;
|
|
|
color: #333333 !important; /* 深色文字确保可读性 */
|
|
|
}
|
|
|
+
|
|
|
+.header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin: 15px 0;
|
|
|
+}
|
|
|
+.h_left p {
|
|
|
+ margin-top: 0px;
|
|
|
+}
|
|
|
+.search-container {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.search-box {
|
|
|
+ width: 350px; /* 可以根据需要调整宽度 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 自定义输入框样式 */
|
|
|
+.custom-search-input :deep(.el-input__inner) {
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ border-right: none;
|
|
|
+ border-radius: 4px 0 0 4px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 自定义搜索按钮样式 */
|
|
|
+.custom-search-input :deep(.el-input-group__append) {
|
|
|
+ padding: 0;
|
|
|
+ border: none;
|
|
|
+ background-color: transparent;
|
|
|
+}
|
|
|
+
|
|
|
+.custom-search-input :deep(.el-input-group__append .el-button) {
|
|
|
+ height: 40px;
|
|
|
+ padding: 0 20px;
|
|
|
+ border-radius: 0 4px 4px 0;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* 悬停效果 */
|
|
|
+.custom-search-input :deep(.el-input__inner:hover) {
|
|
|
+ border-color: #dcdfe6;
|
|
|
+}
|
|
|
+
|
|
|
+.custom-search-input :deep(.el-input__inner:focus) {
|
|
|
+ border-color: #409eff;
|
|
|
+}
|
|
|
</style>
|