问题修复
This commit is contained in:
parent
a623790cdd
commit
74a1734ab7
|
@ -48,14 +48,15 @@
|
|||
<el-row justify="start">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
||||
<el-form-item label="量表" prop="scaleId">
|
||||
<el-select v-model="queryParams.scaleId" placeholder="请选择量表" style="width: 240px" @keyup.enter="handleQuery">
|
||||
<el-select v-model="queryParams.scaleId" placeholder="请选择量表" style="width: 240px" @keyup.enter="handleQuery"
|
||||
@change="handleScaleChange">
|
||||
<el-option v-for="item in scaleList" :key="item.scaleId" :label="item.scaleName" :value="item.scaleId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="deptId">
|
||||
<el-tree-select v-model="queryParams.deptId" :data="deptOptions" style="width: 240px"
|
||||
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="请选择归属部门"
|
||||
check-strictly />
|
||||
check-strictly @node-click="handleDeptClick" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
|
@ -72,8 +73,8 @@
|
|||
<el-table-column prop="deptName" label="班级" />
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status <= 0 ? 'danger' : 'success'">{{ scope.row.status <= 0 ? '未测' :
|
||||
'已测' }}</el-tag>
|
||||
<el-tag :type="scope.row.status <= 0 ? 'danger' : 'success'">{{ scope.row.status <= 0 ? '未测' : '已测'
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -107,6 +108,9 @@ const batchNo = props.batchNo
|
|||
const sessionName = props.sessionName
|
||||
const scaleList = ref<any[]>([])
|
||||
|
||||
const currentScaleName = ref('')
|
||||
const currentDeptName = ref('')
|
||||
|
||||
const total = ref(10)
|
||||
const completeTableData = ref<any[]>([])
|
||||
|
||||
|
@ -127,6 +131,8 @@ const getTreeSelect = async () => {
|
|||
|
||||
if (res.data && res.data.length > 0) {
|
||||
queryParams.value.deptId = res.data[0].id;
|
||||
|
||||
currentDeptName.value = res.data[0].label
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,10 +149,10 @@ async function getScalePublishList() {
|
|||
|
||||
if (scaleIds.length) {
|
||||
queryParams.value.scaleId = scaleIds[0]
|
||||
currentScaleName.value = scaleNames[0]
|
||||
|
||||
getList()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
|
@ -167,12 +173,19 @@ async function getList() {
|
|||
total.value = res.total
|
||||
}
|
||||
|
||||
function exportUncomplete() {
|
||||
console.log(batchNo, sessionName);
|
||||
function handleScaleChange(val: any) {
|
||||
const current = scaleList.value.find(item => item.scaleId === val)
|
||||
currentScaleName.value = current.scaleName
|
||||
}
|
||||
|
||||
function handleDeptClick(dept: any) {
|
||||
currentDeptName.value = dept.label
|
||||
}
|
||||
|
||||
function exportUncomplete() {
|
||||
proxy?.download('scale/publish/evaluation/undone/export', {
|
||||
batchNo, sessionName
|
||||
}, `${sessionName}.xlsx`)
|
||||
}, `${sessionName}-${currentScaleName.value}-${currentDeptName.value}.xlsx`)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -139,8 +139,12 @@
|
|||
{{ handleSituation(scope.row.situation) }}
|
||||
</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" width="200">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看测评结果" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleResult(scope.row)"
|
||||
v-hasPermi="['evaluation:conclusion:list']">查看测评结果</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="导出" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleExport(scope.row)"
|
||||
v-hasPermi="['evaluation:record:export']">导出</el-button>
|
||||
|
@ -166,19 +170,24 @@
|
|||
</el-table>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<el-dialog title="记录详情" v-model="dialogResult" width="900px" append-to-body>
|
||||
<el-card v-for="des in currentResult">
|
||||
<el-descriptions title="测评详情" :column="1">
|
||||
<el-descriptions-item label="总分:">{{ des.score }}</el-descriptions-item>
|
||||
<el-descriptions-item label="测评项:">{{ des.factorName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="测评结果:">{{ des.evalDesc }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<p v-html="des.evalPropose"></p>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="WarnRecord" lang="ts">
|
||||
import { listArchive, listStatistic } from '@/api/archive/information';
|
||||
import { getEvaluationList } from '@/api/archive/warnRecord';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
|
@ -322,6 +331,14 @@ const submitForm = () => {
|
|||
});
|
||||
}
|
||||
|
||||
const dialogResult = ref(false)
|
||||
const currentResult = ref([])
|
||||
async function handleResult(row: any) {
|
||||
dialogResult.value = true
|
||||
const result = await getEvaluationList({ recordId: row.recordId, status: 1 })
|
||||
currentResult.value = result.data
|
||||
}
|
||||
|
||||
function handleExport(row: any) {
|
||||
proxy?.download('scale/evaluation/record/export', {
|
||||
scaleId: row.scaleId,
|
||||
|
|
|
@ -140,13 +140,6 @@
|
|||
</el-table>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<el-table-column label="状态" align="center" prop="interveneStatus" width="180">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.interveneStatus === 0 ? 'success' : 'danger'">{{ scope.row.interveneStatus === 0 ?
|
||||
'无须干预' : '干预中' }}</el-tag>
|
||||
'无须干预' : '干预中' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补充说明" align="center" prop="note" />
|
||||
|
@ -63,10 +63,10 @@
|
|||
|
||||
<!-- 添加或修改预警记录对话框 -->
|
||||
<el-dialog title="记录详情" v-model="dialogDesc" width="900px" append-to-body>
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane :label="item.scaleName" :name="item.scaleId" v-for="item in resultList" :key="item.recordId">
|
||||
<el-tabs v-model="activeTab" @tab-change="handleTabChange">
|
||||
<el-tab-pane :label="item.scaleName" :name="item.recordId" v-for="item in resultList" :key="item.recordId">
|
||||
<el-card v-for="des in currentResult">
|
||||
<el-descriptions title="测评详情">
|
||||
<el-descriptions title="测评详情" :column="1">
|
||||
<el-descriptions-item label="总分:">{{ des.score }}</el-descriptions-item>
|
||||
<el-descriptions-item label="测评项:">{{ des.factorName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="测评结果:">{{ des.evalDesc }}</el-descriptions-item>
|
||||
|
@ -243,12 +243,18 @@ async function handleDesc(row: any) {
|
|||
const res = await getEvaluationRecordList(_warnId);
|
||||
resultList.value = res.data
|
||||
if (res.data.length > 0) {
|
||||
const result = await getEvaluationList({ recordId: res.data[0].recordId })
|
||||
activeTab.value = res.data[0].scaleId
|
||||
const result = await getEvaluationList({ recordId: res.data[0].recordId, status:1 })
|
||||
activeTab.value = res.data[0].recordId
|
||||
currentResult.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
const handleTabChange = async (recordId: any) => {
|
||||
activeTab.value = recordId
|
||||
const result = await getEvaluationList({ recordId, status: 1 })
|
||||
currentResult.value = result.data
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
warnRecordFormRef.value?.validate(async (valid: boolean) => {
|
||||
|
|
Loading…
Reference in New Issue