|
@@ -2,13 +2,14 @@
|
|
|
<div class="midd-page">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="AED数据表" name="first">
|
|
|
- <el-table :data="filteredTableData" style="width: 100%">
|
|
|
+ <el-table :data="firstTableData" style="width: 100%">
|
|
|
<el-table-column
|
|
|
label="工作类型"
|
|
|
prop="workType"
|
|
|
- :filters="workTypeFilters"
|
|
|
- :filter-method="filterWorkType"
|
|
|
+ :filters="firstForm.workTypeFilters"
|
|
|
+ :filter-method="firstFilterWorkType"
|
|
|
filter-placement="bottom-end"
|
|
|
+ width="140"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-select
|
|
@@ -26,9 +27,10 @@
|
|
|
<el-table-column
|
|
|
label="项目"
|
|
|
prop="project"
|
|
|
- :filters="projectFilters"
|
|
|
- :filter-method="filterProject"
|
|
|
+ :filters="firstForm.projectFilters"
|
|
|
+ :filter-method="firstFilterProject"
|
|
|
filter-placement="bottom-end"
|
|
|
+ width="140"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-input
|
|
@@ -63,40 +65,325 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
+ <el-table-column
|
|
|
+ label="模型生成1"
|
|
|
+ prop="model1"
|
|
|
+ class-name="model-gen-1"
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- @click="handleEdit(scope.$index, scope.row)"
|
|
|
- v-if="!scope.row.isEdit"
|
|
|
- >
|
|
|
- 编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="success"
|
|
|
- @click="handleSave(scope.$index, scope.row)"
|
|
|
- v-else
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.example"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>
|
|
|
+ {{ scope.row.model1 }}
|
|
|
+ <i
|
|
|
+ class="el-icon-refresh"
|
|
|
+ @click="openModel1Dialog(scope.row)"
|
|
|
+ style="cursor: pointer; margin-left: 5px"
|
|
|
+ ></i>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="模型生成2"
|
|
|
+ prop="model2"
|
|
|
+ class-name="model-gen-2"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.model2"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>
|
|
|
+ {{ scope.row.model2 }}
|
|
|
+ <i
|
|
|
+ class="el-icon-refresh"
|
|
|
+ @click="openModel2Dialog(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">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ circle
|
|
|
+ class="operation-button"
|
|
|
+ style="font-size: 15px; margin-left: 10px"
|
|
|
+ icon="el-icon-more"
|
|
|
+ ></el-button>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="firstHandleEdit(scope.$index, scope.row)"
|
|
|
+ v-if="!scope.row.isEdit"
|
|
|
+ >
|
|
|
+ <i class="el-icon-edit"></i> 编辑
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="firstHandleSave(scope.$index, scope.row)"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ >
|
|
|
+ <i class="el-icon-check"></i> 保存
|
|
|
+ </el-dropdown-item>
|
|
|
+ <!-- <el-dropdown-item
|
|
|
+ @click.native="firstHandleUpload(scope.$index, scope.row)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-refresh"></i> 更新内容
|
|
|
+ </el-dropdown-item> -->
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="firstHandleDelete(scope.$index, scope.row)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-delete"></i> 删除
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="firstHandleAdd"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ >新增行</el-button
|
|
|
+ >
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="SOTA数据表" name="second">
|
|
|
+ <el-table :data="secondTableData" style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ label="Identifier"
|
|
|
+ prop="workType"
|
|
|
+ :filters="secondForm.workTypeFilters"
|
|
|
+ :filter-method="secondFilterWorkType"
|
|
|
+ filter-placement="bottom-end"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.workType"
|
|
|
+ placeholder="请选择"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
>
|
|
|
- 保存
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="danger"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
+ <el-option label="类型1" value="type1"></el-option>
|
|
|
+ <el-option label="类型2" value="type2"></el-option>
|
|
|
+ <el-option label="类型3" value="type3"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ scope.row.workType }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="Device"
|
|
|
+ prop="project"
|
|
|
+ :filters="secondForm.projectFilters"
|
|
|
+ :filter-method="secondFilterProject"
|
|
|
+ filter-placement="bottom-end"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.project"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ scope.row.project }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="Outcomes" prop="description">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.description"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ scope.row.description }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="Unit for analysis" 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="Mean" prop="description">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.description"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ scope.row.description }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-dropdown trigger="click">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ circle
|
|
|
+ class="operation-button"
|
|
|
+ style="font-size: 15px; margin-left: 10px"
|
|
|
+ icon="el-icon-more"
|
|
|
+ ></el-button>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="secondHandleEdit(scope.$index, scope.row)"
|
|
|
+ v-if="!scope.row.isEdit"
|
|
|
+ >
|
|
|
+ <i class="el-icon-edit"></i> 编辑
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="secondHandleSave(scope.$index, scope.row)"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ >
|
|
|
+ <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)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <i class="el-icon-delete"></i> 删除
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="secondHandleAdd"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ >新增行</el-button
|
|
|
+ >
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="SOTA汇总表" name="third">
|
|
|
+ <el-table :data="thirdTableData" style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ label="Summary"
|
|
|
+ prop="workType"
|
|
|
+ :filters="thirdForm.workTypeFilters"
|
|
|
+ :filter-method="thirdFilterWorkType"
|
|
|
+ filter-placement="bottom-end"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.workType"
|
|
|
+ placeholder="请选择"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
>
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
+ <el-option label="类型1" value="type1"></el-option>
|
|
|
+ <el-option label="类型2" value="type2"></el-option>
|
|
|
+ <el-option label="类型3" value="type3"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ scope.row.workType }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="EqMD"
|
|
|
+ prop="project"
|
|
|
+ :filters="thirdForm.projectFilters"
|
|
|
+ :filter-method="thirdFilterProject"
|
|
|
+ filter-placement="bottom-end"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.project"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ scope.row.project }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="Pain:VAS" prop="description">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.description"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ ></el-input>
|
|
|
+ <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">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ circle
|
|
|
+ class="operation-button"
|
|
|
+ style="font-size: 15px; margin-left: 10px"
|
|
|
+ icon="el-icon-more"
|
|
|
+ ></el-button>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="thirdHandleEdit(scope.$index, scope.row)"
|
|
|
+ v-if="!scope.row.isEdit"
|
|
|
+ >
|
|
|
+ <i class="el-icon-edit"></i> 编辑
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ @click.native="thirdHandleSave(scope.$index, scope.row)"
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
+ >
|
|
|
+ <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)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-delete"></i> 删除
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button type="primary" @click="handleAdd" style="margin-top: 20px"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="thirdHandleAdd"
|
|
|
+ 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="third"></el-tab-pane>
|
|
|
- <el-tab-pane label="SOTA汇总表" name="fourth"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
<el-dialog :visible.sync="dialogVisible" title="编辑范例" width="30%">
|
|
@@ -108,6 +395,77 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="firstForm.dialogVisible"
|
|
|
+ title="内容更新"
|
|
|
+ width="40%"
|
|
|
+ >
|
|
|
+ <!-- 应用选择 -->
|
|
|
+ <el-form :model="firstForm.firstAiForm" label-width="120px">
|
|
|
+ <el-form-item label="应用">
|
|
|
+ <el-select
|
|
|
+ v-model="firstForm.firstAiForm.application"
|
|
|
+ placeholder="请选择应用"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option label="应用1" value="app1"></el-option>
|
|
|
+ <el-option label="应用2" value="app2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 字数限制 -->
|
|
|
+ <el-form-item label="MAX-token数">
|
|
|
+ <el-input-number
|
|
|
+ v-model="firstForm.firstAiForm.wordCount"
|
|
|
+ :min="1"
|
|
|
+ :max="1000"
|
|
|
+ placeholder="请输入字数限制"
|
|
|
+ >
|
|
|
+ </el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 说明 -->
|
|
|
+ <el-form-item label="说明">
|
|
|
+ <el-input
|
|
|
+ v-model="firstForm.firstAiForm.description"
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入说明"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 提示词 -->
|
|
|
+ <el-form-item label="提示词">
|
|
|
+ <el-input
|
|
|
+ v-model="firstForm.firstAiForm.prompt"
|
|
|
+ type="textarea"
|
|
|
+ :rows="3"
|
|
|
+ placeholder="请输入提示词"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- 生成的内容 -->
|
|
|
+ <el-form-item label="生成内容">
|
|
|
+ <el-input
|
|
|
+ v-model="firstForm.firstAiForm.modelValue"
|
|
|
+ type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ readonly
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="generateContent">生成内容</el-button>
|
|
|
+ <el-button @click="firstForm.dialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="firstSaveExample">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -117,57 +475,171 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: "first",
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- workType: "复制",
|
|
|
- project: "indication",
|
|
|
- description:
|
|
|
- "器械在文献中使用的适应症,按照器械分析,也需要添加器械使用部位以区分",
|
|
|
- example: "t1d: n=191;",
|
|
|
- isEdit: false,
|
|
|
+ firstForm: {
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ workType: "复制",
|
|
|
+ project: "indication",
|
|
|
+ description:
|
|
|
+ "器械在文献中使用的适应症,按照器械分析,也需要添加器械使用部位以区分",
|
|
|
+ example: "t1d: n=191;",
|
|
|
+ model1: "t1d: n=191;",
|
|
|
+ model2: "t1d: n=191;",
|
|
|
+ isEdit: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ workType: "总结",
|
|
|
+ project: "Study Design/ Method",
|
|
|
+ description:
|
|
|
+ "患者/试验者的人种,国家地区,以查阅是否存在数据上人种差异",
|
|
|
+ example:
|
|
|
+ "white non-hispanic: n=247;african american:n=25;hispanic or latino: n=34",
|
|
|
+ model1:
|
|
|
+ "white non-hispanic: n=247;african american:n=25;hispanic or latino: n=34",
|
|
|
+ model2:
|
|
|
+ "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的替代疗法)",
|
|
|
+ model1:
|
|
|
+ "Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
|
|
|
+ model2:
|
|
|
+ "Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
|
|
|
+ isEdit: false,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ workTypeFilters: [
|
|
|
+ { text: "类型1", value: "type1" },
|
|
|
+ { text: "类型2", value: "type2" },
|
|
|
+ { text: "类型3", value: "type3" },
|
|
|
+ ],
|
|
|
+ projectFilters: [],
|
|
|
+ activeFilters: {
|
|
|
+ workType: [],
|
|
|
+ project: [],
|
|
|
},
|
|
|
- {
|
|
|
- workType: "总结",
|
|
|
- project: "Study Design/ Method",
|
|
|
- description:
|
|
|
- "患者/试验者的人种,国家地区,以查阅是否存在数据上人种差异",
|
|
|
- example:
|
|
|
- "white non-hispanic: n=247;african american:n=25;hispanic or latino: n=34",
|
|
|
- isEdit: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ firstAiForm: {
|
|
|
+ application: "",
|
|
|
+ wordCount: 100,
|
|
|
+ description: "",
|
|
|
+ prompt: "",
|
|
|
+ modelValue: "",
|
|
|
},
|
|
|
- {
|
|
|
- workType: "总结和数据提取;",
|
|
|
- project: "Alternative device(treatment)",
|
|
|
- description:
|
|
|
- "Device name + model name如无,可写疗法(以评价的器械的替代疗法)",
|
|
|
- example:
|
|
|
- "Capillary blood by BMG;Venous blood by YSI(此处为CGM的替代疗法)",
|
|
|
- isEdit: false,
|
|
|
+ },
|
|
|
+ secondForm: {
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ workType: "SOTA-E1-01",
|
|
|
+ project: "Ultrasounic knife",
|
|
|
+ description: "Pain: VAS (day3)",
|
|
|
+ example: "37",
|
|
|
+ isEdit: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ workType: "SOTA-E1-02",
|
|
|
+ project: "EqMD",
|
|
|
+ description: "Quality of life: xx scale (week 2)",
|
|
|
+ example: "66",
|
|
|
+ isEdit: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ workType: "SOTA-E1-03",
|
|
|
+ project: "EqMD",
|
|
|
+ description: "Pain: VAS (day7)",
|
|
|
+ example: "35",
|
|
|
+ isEdit: false,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ workTypeFilters: [
|
|
|
+ { text: "类型1", value: "type1" },
|
|
|
+ { text: "类型2", value: "type2" },
|
|
|
+ { text: "类型3", value: "type3" },
|
|
|
+ ],
|
|
|
+ projectFilters: [],
|
|
|
+ activeFilters: {
|
|
|
+ workType: [],
|
|
|
+ project: [],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ thirdForm: {
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ workType: "SOTA-E1-01",
|
|
|
+ project: "EqMD",
|
|
|
+ description: "Pain: VAS (day3)",
|
|
|
+ example: "t1d: n=191;",
|
|
|
+ isEdit: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ workType: "SOTA-E1-02",
|
|
|
+ project: "EqMD",
|
|
|
+ description: "Pain: VAS (day3)",
|
|
|
+ example:
|
|
|
+ "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" },
|
|
|
+ { text: "类型2", value: "type2" },
|
|
|
+ { text: "类型3", value: "type3" },
|
|
|
+ ],
|
|
|
+ projectFilters: [],
|
|
|
+ activeFilters: {
|
|
|
+ workType: [],
|
|
|
+ project: [],
|
|
|
},
|
|
|
- ],
|
|
|
- workTypeFilters: [
|
|
|
- { text: "类型1", value: "type1" },
|
|
|
- { text: "类型2", value: "type2" },
|
|
|
- { text: "类型3", value: "type3" },
|
|
|
- ],
|
|
|
- projectFilters: [],
|
|
|
- activeFilters: {
|
|
|
- workType: [],
|
|
|
- project: [],
|
|
|
},
|
|
|
+
|
|
|
dialogVisible: false,
|
|
|
currentExample: "",
|
|
|
currentRow: null,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- filteredTableData() {
|
|
|
- return this.tableData.filter((data) => {
|
|
|
+ firstTableData() {
|
|
|
+ return this.firstForm.tableData.filter((data) => {
|
|
|
+ return (
|
|
|
+ (!this.firstForm.activeFilters.workType.length ||
|
|
|
+ this.firstForm.activeFilters.workType.includes(data.workType)) &&
|
|
|
+ (!this.firstForm.activeFilters.project.length ||
|
|
|
+ this.firstForm.activeFilters.project.includes(data.project))
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
+ secondTableData() {
|
|
|
+ return this.secondForm.tableData.filter((data) => {
|
|
|
return (
|
|
|
- (!this.activeFilters.workType.length ||
|
|
|
- this.activeFilters.workType.includes(data.workType)) &&
|
|
|
- (!this.activeFilters.project.length ||
|
|
|
- this.activeFilters.project.includes(data.project))
|
|
|
+ (!this.secondForm.activeFilters.workType.length ||
|
|
|
+ this.secondForm.activeFilters.workType.includes(data.workType)) &&
|
|
|
+ (!this.secondForm.activeFilters.project.length ||
|
|
|
+ this.secondForm.activeFilters.project.includes(data.project))
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
+ thirdTableData() {
|
|
|
+ return this.thirdForm.tableData.filter((data) => {
|
|
|
+ return (
|
|
|
+ (!this.thirdForm.activeFilters.workType.length ||
|
|
|
+ this.thirdForm.activeFilters.workType.includes(data.workType)) &&
|
|
|
+ (!this.thirdForm.activeFilters.project.length ||
|
|
|
+ this.thirdForm.activeFilters.project.includes(data.project))
|
|
|
);
|
|
|
});
|
|
|
},
|
|
@@ -176,8 +648,84 @@ export default {
|
|
|
this.updateProjectFilters();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /* SOTA汇总表(第三) */
|
|
|
+ thirdHandleEdit(index, row) {
|
|
|
+ row.isEdit = true;
|
|
|
+ },
|
|
|
+ thirdHandleSave(index, row) {
|
|
|
+ row.isEdit = false;
|
|
|
+ this.updateProjectFilters();
|
|
|
+ // 在这里可以添加保存到后端的逻辑
|
|
|
+ },
|
|
|
+ thirdHandleDelete(index, row) {
|
|
|
+ this.thirdForm.tableData.splice(index, 1);
|
|
|
+ this.updateProjectFilters();
|
|
|
+ // 在这里可以添加从后端删除的逻辑
|
|
|
+ },
|
|
|
+ thirdHandleAdd() {
|
|
|
+ this.thirdForm.tableData.push({
|
|
|
+ workType: "",
|
|
|
+ project: "",
|
|
|
+ description: "",
|
|
|
+ example: "",
|
|
|
+ isEdit: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ thirdFilterWorkType(value, row) {
|
|
|
+ return row.workType === value;
|
|
|
+ },
|
|
|
+ thirdFilterProject(value, row) {
|
|
|
+ return row.project === value;
|
|
|
+ },
|
|
|
+ updateProjectFilters() {
|
|
|
+ const projects = [
|
|
|
+ ...new Set(this.thirdForm.tableData.map((item) => item.project)),
|
|
|
+ ];
|
|
|
+ this.projectFilters = projects.map((project) => ({
|
|
|
+ text: project,
|
|
|
+ value: project,
|
|
|
+ }));
|
|
|
+ },
|
|
|
+ /* SOTA数据表(第二) */
|
|
|
+ secondHandleEdit(index, row) {
|
|
|
+ row.isEdit = true;
|
|
|
+ },
|
|
|
+ secondHandleSave(index, row) {
|
|
|
+ row.isEdit = false;
|
|
|
+ this.updateProjectFilters();
|
|
|
+ // 在这里可以添加保存到后端的逻辑
|
|
|
+ },
|
|
|
+ secondHandleDelete(index, row) {
|
|
|
+ this.secondForm.tableData.splice(index, 1);
|
|
|
+ this.updateProjectFilters();
|
|
|
+ // 在这里可以添加从后端删除的逻辑
|
|
|
+ },
|
|
|
+ secondHandleAdd() {
|
|
|
+ this.secondForm.tableData.push({
|
|
|
+ workType: "",
|
|
|
+ project: "",
|
|
|
+ description: "",
|
|
|
+ example: "",
|
|
|
+ isEdit: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ secondFilterWorkType(value, row) {
|
|
|
+ return row.workType === value;
|
|
|
+ },
|
|
|
+ secondFilterProject(value, row) {
|
|
|
+ return row.project === value;
|
|
|
+ },
|
|
|
+ updateProjectFilters() {
|
|
|
+ const projects = [
|
|
|
+ ...new Set(this.secondForm.tableData.map((item) => item.project)),
|
|
|
+ ];
|
|
|
+ this.projectFilters = projects.map((project) => ({
|
|
|
+ text: project,
|
|
|
+ value: project,
|
|
|
+ }));
|
|
|
+ },
|
|
|
+ /* AED数据表(第一) 操作事件*/
|
|
|
openExampleDialog(row) {
|
|
|
- console.log(112);
|
|
|
this.dialogVisible = true;
|
|
|
this.currentExample = row.example;
|
|
|
this.currentRow = row;
|
|
@@ -188,21 +736,86 @@ export default {
|
|
|
}
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
- handleEdit(index, row) {
|
|
|
+ /* 生成内容 */
|
|
|
+ // 更新内容处理方法
|
|
|
+ firstHandleUpload(index, row) {
|
|
|
+ // 这里假设你有一个获取更新内容的API
|
|
|
+ const updatedContent = this.getUpdatedContent(row);
|
|
|
+
|
|
|
+ // 更新两个模型的内容
|
|
|
+ this.$set(row, "model1", updatedContent.model1);
|
|
|
+ this.$set(row, "model2", updatedContent.model2);
|
|
|
+
|
|
|
+ // 可以添加提示
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "内容已更新",
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 打开模型1对话框
|
|
|
+ openModel1Dialog(row) {
|
|
|
+ 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
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取更新内容的方法(需要根据实际API进行修改)
|
|
|
+ getUpdatedContent(row) {
|
|
|
+ // 这里应该调用实际的API
|
|
|
+ return {
|
|
|
+ model1: "更新后的模型1内容",
|
|
|
+ model2: "更新后的模型2内容",
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async generateContent() {
|
|
|
+ try {
|
|
|
+ // 这里替换为实际的API调用
|
|
|
+ const response = await this.yourApiCall({
|
|
|
+ application: this.firstForm.firstAiForm.application,
|
|
|
+ wordCount: this.firstForm.firstAiForm.wordCount,
|
|
|
+ description: this.firstForm.firstAiForm.description,
|
|
|
+ prompt: this.firstForm.firstAiForm.prompt,
|
|
|
+ });
|
|
|
+
|
|
|
+ // 将获取的内容更新到modelValue
|
|
|
+ this.firstForm.firstAiForm.modelValue = response.data;
|
|
|
+
|
|
|
+ // 注意这里不关闭弹窗
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error("生成内容失败");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /* 内容更新确定 */
|
|
|
+ firstSaveExample() {
|
|
|
+ this.firstForm.dialogVisible = false;
|
|
|
+ },
|
|
|
+ firstHandleUpload(index, row) {
|
|
|
+ this.firstForm.dialogVisible = true;
|
|
|
+ },
|
|
|
+ firstHandleEdit(index, row) {
|
|
|
+ console.log(index);
|
|
|
row.isEdit = true;
|
|
|
},
|
|
|
- handleSave(index, row) {
|
|
|
+ firstHandleSave(index, row) {
|
|
|
row.isEdit = false;
|
|
|
this.updateProjectFilters();
|
|
|
// 在这里可以添加保存到后端的逻辑
|
|
|
},
|
|
|
- handleDelete(index, row) {
|
|
|
- this.tableData.splice(index, 1);
|
|
|
+ firstHandleDelete(index, row) {
|
|
|
+ this.firstForm.tableData.splice(index, 1);
|
|
|
this.updateProjectFilters();
|
|
|
// 在这里可以添加从后端删除的逻辑
|
|
|
},
|
|
|
- handleAdd() {
|
|
|
- this.tableData.push({
|
|
|
+ firstHandleAdd() {
|
|
|
+ this.firstForm.tableData.push({
|
|
|
workType: "",
|
|
|
project: "",
|
|
|
description: "",
|
|
@@ -210,19 +823,22 @@ export default {
|
|
|
isEdit: true,
|
|
|
});
|
|
|
},
|
|
|
- filterWorkType(value, row) {
|
|
|
+ firstFilterWorkType(value, row) {
|
|
|
return row.workType === value;
|
|
|
},
|
|
|
- filterProject(value, row) {
|
|
|
+ firstFilterProject(value, row) {
|
|
|
return row.project === value;
|
|
|
},
|
|
|
updateProjectFilters() {
|
|
|
- const projects = [...new Set(this.tableData.map((item) => item.project))];
|
|
|
+ const projects = [
|
|
|
+ ...new Set(this.firstForm.tableData.map((item) => item.project)),
|
|
|
+ ];
|
|
|
this.projectFilters = projects.map((project) => ({
|
|
|
text: project,
|
|
|
value: project,
|
|
|
}));
|
|
|
},
|
|
|
+ handleClick() {},
|
|
|
},
|
|
|
watch: {
|
|
|
tableData: {
|
|
@@ -243,4 +859,21 @@ export default {
|
|
|
font-size: 14px;
|
|
|
color: #409eff;
|
|
|
}
|
|
|
+/* 浅蓝色背景 */
|
|
|
+::v-deep .model-gen-1 {
|
|
|
+ background-color: #e6f3ff !important;
|
|
|
+}
|
|
|
+::v-deep .model-gen-1.el-table__cell {
|
|
|
+ background-color: #e6f3ff !important;
|
|
|
+ color: #333333 !important; /* 深色文字确保可读性 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅紫色背景 */
|
|
|
+::v-deep .model-gen-2 {
|
|
|
+ background-color: #f0e6ff !important;
|
|
|
+}
|
|
|
+::v-deep .model-gen-2.el-table__cell {
|
|
|
+ background-color: #f0e6ff !important;
|
|
|
+ color: #333333 !important; /* 深色文字确保可读性 */
|
|
|
+}
|
|
|
</style>
|