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