|
@@ -4,8 +4,8 @@
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
<el-card shadow="hover">
|
|
<el-card shadow="hover">
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
- <el-form-item label="模板类型" prop="gender">
|
|
|
|
- <el-select v-model="queryParams.gender" placeholder="请选择" clearable>
|
|
|
|
|
|
+ <el-form-item label="模板类型" prop="type">
|
|
|
|
+ <el-select v-model="queryParams.type" placeholder="请选择" clearable>
|
|
<el-option v-for="dict in scale_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
<el-option v-for="dict in scale_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -43,23 +43,26 @@
|
|
<el-table v-loading="loading" border :data="screeningAssessmentConfigList" >
|
|
<el-table v-loading="loading" border :data="screeningAssessmentConfigList" >
|
|
<!-- <el-table-column type="selection" width="55" align="center" /> @selection-change="handleSelectionChange" -->
|
|
<!-- <el-table-column type="selection" width="55" align="center" /> @selection-change="handleSelectionChange" -->
|
|
<el-table-column label="模板名称" align="center" prop="name" />
|
|
<el-table-column label="模板名称" align="center" prop="name" />
|
|
- <el-table-column label="模板类型" align="center" prop="type" />
|
|
|
|
- <el-table-column label="模板类型" align="center" prop="type" />
|
|
|
|
- <el-table-column label="创建人" align="center" prop="createBy" />
|
|
|
|
- <el-table-column label="状态" align="center" prop="status" />
|
|
|
|
|
|
+ <el-table-column label="模板类型" align="center" prop="typeName" />
|
|
|
|
+ <el-table-column label="创建人" align="center" prop="createByName" />
|
|
|
|
+ <el-table-column label="状态" align="center" width="100">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-tooltip content="预览" placement="top">
|
|
|
|
- <el-button link type="primary" icon="View" @click="handleUpdate(scope.row)">预览</el-button>
|
|
|
|
- </el-tooltip>
|
|
|
|
|
|
+ <!-- <el-tooltip content="预览" placement="top">
|
|
|
|
+ <el-button link type="primary" icon="View" @click="handleView(scope.row)">预览</el-button>
|
|
|
|
+ </el-tooltip> -->
|
|
<el-tooltip content="编辑" placement="top">
|
|
<el-tooltip content="编辑" placement="top">
|
|
- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:screeningAssessmentConfig:edit']">编辑</el-button>
|
|
|
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(false,scope.row)" v-hasPermi="['system:screeningAssessmentConfig:edit']">编辑</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip content="删除" placement="top">
|
|
<el-tooltip content="删除" placement="top">
|
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:screeningAssessmentConfig:remove']">删除</el-button>
|
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:screeningAssessmentConfig:remove']">删除</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
<el-tooltip content="修改结论" placement="top">
|
|
<el-tooltip content="修改结论" placement="top">
|
|
- <el-button link type="primary" icon="Edit" @click="handleDelete(scope.row)">修改结论</el-button>
|
|
|
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleReviseConclusion(scope.row)">修改结论</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -97,11 +100,11 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="ScreeningAssessmentConfig" lang="ts">
|
|
<script setup name="ScreeningAssessmentConfig" lang="ts">
|
|
-import { listScreeningAssessmentConfig, getScreeningAssessmentConfig, delScreeningAssessmentConfig, addScreeningAssessmentConfig, updateScreeningAssessmentConfig } from '@/api/system/screeningAssessmentConfig';
|
|
|
|
|
|
+import { listScreeningAssessmentConfig,changeConfigStatus, getScreeningAssessmentConfig, delScreeningAssessmentConfig, addScreeningAssessmentConfig, updateScreeningAssessmentConfig } from '@/api/system/screeningAssessmentConfig';
|
|
import { ScreeningAssessmentConfigVO, ScreeningAssessmentConfigQuery, ScreeningAssessmentConfigForm } from '@/api/system/screeningAssessmentConfig/types';
|
|
import { ScreeningAssessmentConfigVO, ScreeningAssessmentConfigQuery, ScreeningAssessmentConfigForm } from '@/api/system/screeningAssessmentConfig/types';
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
-const {scale_type } = toRefs<any>(proxy?.useDict('scale_type'));
|
|
|
|
|
|
+const {scale_type} = toRefs<any>(proxy?.useDict('scale_type'));
|
|
|
|
|
|
const screeningAssessmentConfigList = ref<ScreeningAssessmentConfigVO[]>([]);
|
|
const screeningAssessmentConfigList = ref<ScreeningAssessmentConfigVO[]>([]);
|
|
const buttonLoading = ref(false);
|
|
const buttonLoading = ref(false);
|
|
@@ -224,6 +227,20 @@ const handleUpdate = async (disabled:boolean,row?: ScreeningAssessmentConfigVO)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/** 修改结论 */
|
|
|
|
+const handleReviseConclusion = async (row?: ScreeningAssessmentConfigVO) => {
|
|
|
|
+ const _configId = row?.configId || ids.value[0]
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** 预览 */
|
|
|
|
+const handleView = async (row?: ScreeningAssessmentConfigVO) => {
|
|
|
|
+ const _configId = row?.configId || ids.value[0]
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
const submitForm = () => {
|
|
const submitForm = () => {
|
|
screeningAssessmentConfigFormRef.value?.validate(async (valid: boolean) => {
|
|
screeningAssessmentConfigFormRef.value?.validate(async (valid: boolean) => {
|
|
@@ -244,18 +261,24 @@ const submitForm = () => {
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
const handleDelete = async (row?: ScreeningAssessmentConfigVO) => {
|
|
const handleDelete = async (row?: ScreeningAssessmentConfigVO) => {
|
|
const _configIds = row?.configId || ids.value;
|
|
const _configIds = row?.configId || ids.value;
|
|
- await proxy?.$modal.confirm('是否确认删除筛查/评估配置编号为"' + _configIds + '"的数据项?').finally(() => loading.value = false);
|
|
|
|
|
|
+ await proxy?.$modal.confirm('是否确认删除模版名称为"' + row.name + '"的数据项?').finally(() => loading.value = false);
|
|
await delScreeningAssessmentConfig(_configIds);
|
|
await delScreeningAssessmentConfig(_configIds);
|
|
proxy?.$modal.msgSuccess("删除成功");
|
|
proxy?.$modal.msgSuccess("删除成功");
|
|
await getList();
|
|
await getList();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
-/** 导出按钮操作 */
|
|
|
|
-const handleExport = () => {
|
|
|
|
- proxy?.download('system/screeningAssessmentConfig/export', {
|
|
|
|
- ...queryParams.value
|
|
|
|
- }, `screeningAssessmentConfig_${new Date().getTime()}.xlsx`)
|
|
|
|
-}
|
|
|
|
|
|
+
|
|
|
|
+const handleStatusChange = async (row: ScreeningAssessmentConfigVO) => {
|
|
|
|
+ const text = row.status === '0' ? '启用' : '停用';
|
|
|
|
+ try {
|
|
|
|
+ await proxy?.$modal.confirm('确认要"' + text + '""' + row.name + '"模版名称吗?');
|
|
|
|
+ await changeConfigStatus(row.configId, row.status);
|
|
|
|
+ proxy?.$modal.msgSuccess(text + '成功');
|
|
|
|
+ } catch {
|
|
|
|
+ row.status = row.status === '0' ? '1' : '0';
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getList();
|
|
getList();
|