|
@@ -7,12 +7,9 @@
|
|
|
<el-button type="primary" icon="ArrowLeft" @click="goBack">返回上一级</el-button>
|
|
|
</el-form-item>
|
|
|
<el-row :span="24" :gutter="10">
|
|
|
- <el-col :span="18" label="预案名称">
|
|
|
+ <el-col :span="20" label="预案名称">
|
|
|
<h2 key="planName" style="font-weight: bolder">{{ detailData.planName }}</h2>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button v-has-permi="['system:plan:add']" type="primary" plain icon="Plus" @click="planAdd()">新增</el-button>
|
|
|
- </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button v-has-permi="['system:plan:add']" type="success" plain icon="Edit" @click="planUpdate()"> 编辑 </el-button>
|
|
|
</el-col>
|
|
@@ -26,7 +23,9 @@
|
|
|
<div style="white-space: nowrap">
|
|
|
<el-text :lg="15" class="mx-1">附件</el-text>
|
|
|
<el-text :lg="15" class="mx-2" type="primary">
|
|
|
- <a v-if="detailData.file_list && detailData.file_list[0]" :href="detailData.file_list[0].file_url">{{ detailData.file_list[0].file_name_desc }}</a>
|
|
|
+ <a v-if="detailData.file_list && detailData.file_list[0]" :href="detailData.file_list[0].file_url">{{
|
|
|
+ detailData.file_list[0].file_name_desc
|
|
|
+ }}</a>
|
|
|
</el-text>
|
|
|
</div>
|
|
|
<el-card style="margin-top: 10px" shadow="hover">
|
|
@@ -267,7 +266,7 @@
|
|
|
<!-- 响应记录 -->
|
|
|
<h3>响应记录</h3>
|
|
|
<el-card shadow="hover">
|
|
|
- <el-table v-loading="loading" @selection-change="handleSelectionChangeResponse">
|
|
|
+ <el-table v-loading="loading4" @selection-change="handleSelectionChangeResponse">
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
<el-table-column v-if="columns1[0].visible" key="eventId" label="事件编号" align="center" prop="eventId" />
|
|
|
<el-table-column
|
|
@@ -510,7 +509,7 @@
|
|
|
|
|
|
<script setup name="User" lang="ts">
|
|
|
import api from '@/api/system/user';
|
|
|
-import { UserForm, UserQuery, UserVO, PlanVO, DrillVO, PlanForm } from "@/api/system/user/types";
|
|
|
+import { UserForm, UserQuery, UserVO, PlanVO, DrillVO, PlanForm } from '@/api/system/user/types';
|
|
|
import { DeptVO } from '@/api/system/dept/types';
|
|
|
import { RoleVO } from '@/api/system/role/types';
|
|
|
import { PostQuery, PostVO } from '@/api/system/post/types';
|
|
@@ -521,9 +520,9 @@ import { optionselect } from '@/api/system/post';
|
|
|
import type { TabsPaneContext } from 'element-plus';
|
|
|
import { ArrowLeft } from '@element-plus/icons-vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
-import { reactive } from "vue";
|
|
|
-import { getDrillList, getPlanDetail, getTrainingList } from '@/api/riskPrevention/planManage';
|
|
|
-
|
|
|
+import { reactive } from 'vue';
|
|
|
+import { getDrillList, getPlanDetail, getResponseDetail, getTrainingList } from "@/api/riskPrevention/planManage";
|
|
|
+import drill from './drill.vue';
|
|
|
const router = useRouter();
|
|
|
|
|
|
const goBack = () => {
|
|
@@ -573,7 +572,9 @@ const route = useRoute();
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
|
|
|
const userList = ref<UserVO[]>();
|
|
|
+const loading4 = ref(false);
|
|
|
const loading3 = ref(false);
|
|
|
+const total4 = ref(0);
|
|
|
const total3 = ref(0);
|
|
|
const planList = ref<PlanVO[]>();
|
|
|
const drillList = ref<DrillVO[]>();
|
|
@@ -669,7 +670,7 @@ const initFormData: UserForm = {
|
|
|
};
|
|
|
|
|
|
const initData: PageData<UserForm, UserQuery> = {
|
|
|
- form: { ...initFormData },
|
|
|
+ form2: { ...initFormData },
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -738,6 +739,11 @@ const queryParams3 = reactive({
|
|
|
pageSize: 10,
|
|
|
planNum: ''
|
|
|
});
|
|
|
+const responseParams = reactive({
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ planNum: ''
|
|
|
+});
|
|
|
|
|
|
const form = reactive<DrillVO>({
|
|
|
drillId: '',
|
|
@@ -785,10 +791,10 @@ const getList2 = async () => {
|
|
|
loading2.value = true;
|
|
|
const res = await getDrillList(drillForm);
|
|
|
loading2.value = false;
|
|
|
- res.data.forEach(item => {
|
|
|
- item.drillPicture = item.drillPicture[0].file_name_desc
|
|
|
- item.drillVideo = item.drillVideo[0].file_name_desc
|
|
|
- })
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ item.drillPicture = item.drillPicture[0].file_name_desc;
|
|
|
+ item.drillVideo = item.drillVideo[0].file_name_desc;
|
|
|
+ });
|
|
|
drillList.value = res.data;
|
|
|
total2.value = res.total;
|
|
|
};
|
|
@@ -805,12 +811,23 @@ const getList3 = async () => {
|
|
|
total3.value = res.total;
|
|
|
};
|
|
|
/** 查询响应列表 */
|
|
|
-const getListResponse = async () => {
|
|
|
- loading.value = true;
|
|
|
+/**const getListResponse = async () => {
|
|
|
+ loading4.value = true;
|
|
|
const res = await api.listResponse(proxy?.addDateRange(queryParams.value, dateRange.value));
|
|
|
- loading.value = false;
|
|
|
+ loading4.value = false;
|
|
|
responseList.value = res.rows;
|
|
|
total.value = res.total;
|
|
|
+};*/
|
|
|
+const getListResponse = async () => {
|
|
|
+ loading4.value = true;
|
|
|
+ const res = await getResponseDetail(responseParams);
|
|
|
+ loading4.value = false;
|
|
|
+ // res.data.forEach(item => {
|
|
|
+ // item.drillPicture = item.drillPicture[0].file_name_desc
|
|
|
+ // item.drillVideo = item.drillVideo[0].file_name_desc
|
|
|
+ // })
|
|
|
+ responseList.value = res.data;
|
|
|
+ total4.value = res.total;
|
|
|
};
|
|
|
/** 删除按钮操作 */
|
|
|
const handleDelete = async (row?: UserVO) => {
|
|
@@ -902,8 +919,8 @@ const cancel = () => {
|
|
|
/** 修改按钮操作 */
|
|
|
const handleUpdate = async (row?: UserForm) => {
|
|
|
reset();
|
|
|
- const textId = row?.textId || ids.value[0];
|
|
|
- const { data } = await api.getUser(textId);
|
|
|
+ //const textId = row?.textId || ids.value[0];
|
|
|
+ //const { data } = await api.getUser(textId);
|
|
|
dialog.visible = true;
|
|
|
dialog.title = '修改培训记录';
|
|
|
await initTreeData();
|
|
@@ -941,20 +958,20 @@ const resetForm = () => {
|
|
|
/** 新增按钮操作 */
|
|
|
const handleAdd = async () => {
|
|
|
reset();
|
|
|
- const { data } = await api.getUser();
|
|
|
+ //const { data } = await api.getUser();
|
|
|
dialog.visible = true;
|
|
|
dialog.title = '新增培训记录';
|
|
|
};
|
|
|
-let detailData =ref({
|
|
|
+let detailData = ref({
|
|
|
file_list: []
|
|
|
-})
|
|
|
+});
|
|
|
onMounted(() => {
|
|
|
- const planId = route.query.planId
|
|
|
- drillForm.planNum = planId
|
|
|
- queryParams3.planNum = planId
|
|
|
- getPlanDetail(planId).then(res => {
|
|
|
- detailData.value = res.data
|
|
|
- })
|
|
|
+ const planId = route.query.planId;
|
|
|
+ drillForm.planNum = planId;
|
|
|
+ queryParams3.planNum = planId;
|
|
|
+ getPlanDetail(planId).then((res) => {
|
|
|
+ detailData.value = res.data;
|
|
|
+ });
|
|
|
getTreeSelect(); // 初始化培训内容数据
|
|
|
getList(); // 初始化列表数据
|
|
|
getList2(); // 初始化列表数据
|
|
@@ -969,11 +986,11 @@ async function handleDeptChange(value: number | string) {
|
|
|
postOptions.value = response.data;
|
|
|
}
|
|
|
|
|
|
-/** 新增预案按钮操作 */
|
|
|
+/** 新增预案按钮操作
|
|
|
const planAdd = () => {
|
|
|
dialog0.visible = true;
|
|
|
dialog0.id = '';
|
|
|
-};
|
|
|
+};*/
|
|
|
/** 修改预案按钮操作 */
|
|
|
const planUpdate = (row) => {
|
|
|
dialog1.visible = true;
|