提交修复代码
This commit is contained in:
parent
2f017fa6dc
commit
edd4707e09
|
@ -16,6 +16,14 @@ export const listScalePublish = (query?: ScalePublishQuery): AxiosPromise<ScaleP
|
|||
});
|
||||
};
|
||||
|
||||
export const listPublish = (query?: ScalePublishQuery): AxiosPromise<ScalePublishVO[]> => {
|
||||
return request({
|
||||
url: '/scale/publish/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询量发布详细
|
||||
* @param batchNo
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar" />
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
||||
|
||||
|
@ -39,6 +40,7 @@
|
|||
<div class="avatar-container">
|
||||
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<span style="margin-right: 40px;">{{ nickName }}</span>
|
||||
<img :src="userStore.avatar" class="user-avatar" />
|
||||
<el-icon><caret-bottom /></el-icon>
|
||||
</div>
|
||||
|
@ -78,6 +80,8 @@ const settingsStore = useSettingsStore();
|
|||
const noticeStore = storeToRefs(useNoticeStore());
|
||||
const newNotice = ref(<number>0);
|
||||
|
||||
const nickName = userStore.nickname
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const userId = ref(userStore.userId);
|
||||
|
@ -149,7 +153,6 @@ watch(() => noticeStore.state.value.notices, (newVal, oldVal) => {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
:deep(.el-select .el-input__wrapper) {
|
||||
height: 30px;
|
||||
}
|
||||
|
@ -235,7 +238,9 @@ watch(() => noticeStore.state.value.notices, (newVal, oldVal) => {
|
|||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
|
||||
.user-avatar {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<img v-if="logo" :src="logoSrc || logo" class="sidebar-logo" />
|
||||
<h1 class="sidebar-title"
|
||||
:style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">
|
||||
{{ title }}-{{ nickName }}
|
||||
{{ title }}
|
||||
</h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
|
@ -26,8 +26,7 @@ import variables from '@/assets/styles/variables.module.scss'
|
|||
import logo from '@/assets/logo/logo.png'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import { ComponentInternalInstance } from "vue";
|
||||
import useUserStore from '@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
defineProps({
|
||||
|
@ -36,10 +35,6 @@ defineProps({
|
|||
}
|
||||
})
|
||||
|
||||
console.log('userStore', userStore);
|
||||
|
||||
|
||||
const nickName = userStore.nickname
|
||||
const title = ref('')
|
||||
const logoSrc = ref('')
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改预警记录对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="900px" append-to-body>
|
||||
<el-tabs v-model="activeName" class="demo-tabs">
|
||||
<!-- <el-tab-pane label="基本信息" name="first">
|
||||
<el-form ref="informationFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
|
@ -162,7 +162,7 @@
|
|||
<el-table-column prop="address" label="Address" />
|
||||
</el-table>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="预警干预记录" name="warn">
|
||||
<el-tab-pane label="动态普查记录" name="warn">
|
||||
<el-table :data="interveneList">
|
||||
<el-table-column prop="userName" label="测评人" />
|
||||
<el-table-column prop="sessionName" label="场次名称" />
|
||||
|
|
|
@ -4,10 +4,26 @@
|
|||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="search" v-show="showSearch">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
|
||||
<el-form-item label="场次名称" prop="batchNo">
|
||||
<el-select v-model="queryParams.batchNo" placeholder="请选择" style="width: 240px">
|
||||
<el-option v-for="item in publishList" :key="item.batchNo" :label="item.sessionName"
|
||||
:value="item.batchNo"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="测评人" prop="batchNo">
|
||||
<el-input v-model="queryParams.nickName" placeholder="请输入测评人" clearable style="width: 240px"
|
||||
@keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="interveneStatus">
|
||||
<el-select v-model="queryParams.interveneStatus" placeholder="请选择" style="width: 240px">
|
||||
<el-option v-for="item in statusOption" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="严重度" prop="situation">
|
||||
<el-select v-model="queryParams.situation" placeholder="请选择" style="width: 240px">
|
||||
<el-option v-for="dict in yzd" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="预警时间" prop="note">
|
||||
<el-date-picker clearable v-model="queryParams.warnTime" type="daterange" start-placeholder="开始时间"
|
||||
end-placeholder="结束时间" value-format="YYYY-MM-DD" />
|
||||
|
@ -22,21 +38,32 @@
|
|||
|
||||
<el-card shadow="never">
|
||||
<el-table v-loading="loading" :data="warnRecordList">
|
||||
<el-table-column label="场次名称" align="center" prop="sessionName" />
|
||||
<el-table-column label="场次名称" align="center" prop="sessionName" width="200" />
|
||||
<el-table-column label="测评人" align="center" prop="nickName" />
|
||||
<el-table-column label="预警时间" align="center" prop="warnTime" width="180">
|
||||
<el-table-column label="预警时间" align="center" prop="warnTime">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.warnTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补充说明" align="center" prop="note" />
|
||||
<el-table-column label="严重度" align="center" prop="situation">
|
||||
<template #default="scope">
|
||||
{{ handleSituation(scope.row.situation) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding" width="280">
|
||||
<el-table-column label="干预次数" align="center" prop="interveneNum" />
|
||||
<el-table-column label="状态" align="center" prop="interveneStatus">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.interveneStatus == 0" type="primary">无需干预</el-tag>
|
||||
<el-tag v-if="scope.row.interveneStatus == 1" type="danger">干预中</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补充说明" align="center" prop="note" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding" width="330">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="测评" placement="top">
|
||||
<el-button link type="primary" icon="Plus" @click="handlePublish(scope.row)"
|
||||
v-hasPermi="['evaluation:record:view']">测评</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="测评详情" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleRecord(scope.row)"
|
||||
v-hasPermi="['evaluation:record:view']">测评详情</el-button>
|
||||
|
@ -225,6 +252,46 @@
|
|||
<p v-html="des.evalPropose"></p>
|
||||
</el-card> -->
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="publishDialog.title" v-model="publishDialog.visible" :width="700" append-to-body>
|
||||
<el-form ref="publishFormRef" :model="publishForm" :rules="publishRules" label-width="120px">
|
||||
<el-form-item label="场次名称" prop="sessionName">
|
||||
<el-input v-model="publishForm.sessionName" placeholder="请输入量表名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否预约发布" prop="status">
|
||||
<el-radio-group v-model="publishForm.status">
|
||||
<el-radio value="1">是</el-radio>
|
||||
<el-radio value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="查看结果" prop="allowQueryResult">
|
||||
<el-radio-group v-model="publishForm.allowQueryResult">
|
||||
<el-radio value="1">允许</el-radio>
|
||||
<el-radio value="0">不允许</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始日期" prop="startTime">
|
||||
<el-date-picker v-model="publishForm.startTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择开始日期" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="截止日期" prop="expireTime">
|
||||
<el-date-picker v-model="publishForm.expireTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择截止日期" style="width: 100%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="量表" prop="scaleIds">
|
||||
<el-select multiple v-model="publishForm.scaleIds" placeholder="请选择量表" style="width: 100%">
|
||||
<el-option v-for="item in scaleOptions" :key="item.scaleId" :label="item.scaleName" :value="item.scaleId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitPublishForm">确 定</el-button>
|
||||
<el-button @click="cancelPublish">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -233,9 +300,13 @@ import { listWarnRecord, getEvaluationList } from '@/api/archive/warnRecord';
|
|||
import { WarnRecordVO, WarnRecordQuery, WarnRecordForm } from '@/api/archive/warnRecord/types';
|
||||
import { listStatistic } from '@/api/archive/information';
|
||||
import { addInterveneRecord, listInterveneTimes } from '@/api/archive/interveneRecord';
|
||||
import { findAll } from '@/api/scale/SysScale';
|
||||
import { listPublish, addScalePublish } from '@/api/scale/scalePublish';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { yzd } = toRefs<any>(proxy?.useDict('yzd'));
|
||||
|
||||
const warnRecordList = ref<WarnRecordVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
|
@ -250,11 +321,27 @@ const dialog = reactive<DialogOption>({
|
|||
title: ''
|
||||
});
|
||||
|
||||
const statusOption = ref([
|
||||
{
|
||||
value: 0,
|
||||
label: '无需干预',
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '干预中',
|
||||
}
|
||||
])
|
||||
|
||||
const recordDialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: '测评记录'
|
||||
});
|
||||
|
||||
const publishDialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: '量表个测发布'
|
||||
})
|
||||
|
||||
const listDialog = ref(false)
|
||||
const activeName = ref('static')
|
||||
|
||||
|
@ -280,7 +367,7 @@ const data = reactive<PageData<WarnRecordForm, WarnRecordQuery>>({
|
|||
warnTime: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
interveneStatus: 1,
|
||||
interveneStatus: undefined,
|
||||
nickName: undefined,
|
||||
params: {
|
||||
}
|
||||
|
@ -314,6 +401,12 @@ function handleSituation(situation: any) {
|
|||
}
|
||||
}
|
||||
|
||||
const publishList = ref([]);
|
||||
async function getPublishList() {
|
||||
const res = await listPublish()
|
||||
publishList.value = res.data
|
||||
}
|
||||
|
||||
/** 查询预警记录列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
|
@ -413,6 +506,42 @@ const handleRecord = async (row?: any) => {
|
|||
recordDialog.visible = true;
|
||||
}
|
||||
|
||||
const publishFormRef = ref()
|
||||
const publishForm = ref<any>({})
|
||||
const publishRules = ref({
|
||||
|
||||
})
|
||||
const scaleOptions = ref<any[]>([]);
|
||||
const getScaleOptions = async () => {
|
||||
const res = await findAll({ status: 1 });
|
||||
scaleOptions.value = res.data;
|
||||
}
|
||||
const handlePublish = async (row?: any) => {
|
||||
publishDialog.visible = true
|
||||
publishForm.value.userIds = [row.userId]
|
||||
publishForm.value.publishType = 0
|
||||
|
||||
getScaleOptions()
|
||||
}
|
||||
|
||||
const submitPublishForm = () => {
|
||||
publishFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
await addScalePublish(publishForm.value).finally(() => buttonLoading.value = false);
|
||||
proxy?.$modal.msgSuccess("发布成功");
|
||||
publishDialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const cancelPublish = () => {
|
||||
publishForm.value = {};
|
||||
publishFormRef.value?.resetFields();
|
||||
publishDialog.visible = false;
|
||||
}
|
||||
|
||||
async function getStaticList() {
|
||||
const res = await listStatistic(staticQuery.value);
|
||||
staticList.value = res.rows
|
||||
|
@ -449,7 +578,8 @@ function downloadFile(ossId) {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getPublishList()
|
||||
getList()
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -36,13 +36,12 @@
|
|||
'无须干预' : '干预中' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="补充说明" align="center" prop="note" />
|
||||
<el-table-column label="严重度" align="center" prop="situation">
|
||||
<template #default="scope">
|
||||
{{ handleSituation(scope.row.situation) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="补充说明" align="center" prop="note" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding" width="280">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="详情" placement="top">
|
||||
|
|
|
@ -119,6 +119,12 @@
|
|||
placeholder="请选择截止日期" style="width: 100%" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="量表" prop="scaleIds">
|
||||
<el-select multiple v-model="form.scaleIds" placeholder="请选择量表" style="width: 100%">
|
||||
<el-option v-for="item in scaleOptions" :key="item.scaleId" :label="item.scaleName" :value="item.scaleId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="publishType == 1" label="归属部门" prop="deptIds">
|
||||
<el-tree-select v-model="form.deptIds" :data="deptOptions"
|
||||
:props="{ value: 'id', label: 'label', children: 'children' }" node-key="id" placeholder="请选择归属部门" multiple
|
||||
|
@ -140,11 +146,6 @@
|
|||
<pagination v-show="userTotal > 0" :total="userTotal" v-model:page="userParams.pageNum"
|
||||
v-model:limit="userParams.pageSize" @pagination="getUserList" />
|
||||
|
||||
<el-form-item label="量表" prop="scaleIds">
|
||||
<el-select multiple v-model="form.scaleIds" placeholder="请选择量表" style="width: 100%">
|
||||
<el-option v-for="item in scaleOptions" :key="item.scaleId" :label="item.scaleName" :value="item.scaleId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
|
|
|
@ -28,6 +28,9 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
|||
host: '0.0.0.0',
|
||||
port: Number(env.VITE_APP_PORT),
|
||||
open: true,
|
||||
hmr: {
|
||||
overlay: false
|
||||
},
|
||||
proxy: {
|
||||
[env.VITE_APP_BASE_API]: {
|
||||
// target: 'http://192.168.123.32:8080',
|
||||
|
|
Loading…
Reference in New Issue