|
@@ -180,7 +180,7 @@
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
- <right-toolbar v-model:showSearch="showSearch" :columns="columns0" :search="true" @query-table="getList"></right-toolbar>
|
|
|
|
|
|
+ <right-toolbar v-model:showSearch="showSearch" :columns="columns0" :search="true" @query-table="getList2"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
<drill :id="dialog3.id" v-model="dialog3.visible" @getlist="getList2" />
|
|
<drill :id="dialog3.id" v-model="dialog3.visible" @getlist="getList2" />
|
|
</template>
|
|
</template>
|
|
@@ -253,13 +253,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
- <pagination
|
|
|
|
- v-show="total2 > 0"
|
|
|
|
- v-model:page="drillForm.pageNum"
|
|
|
|
- v-model:limit="drillForm.pageSize"
|
|
|
|
- :total="total2"
|
|
|
|
- @pagination="getList2"
|
|
|
|
- />
|
|
|
|
|
|
+ <pagination v-show="total2 > 0" v-model:page="drillForm.page" v-model:limit="drillForm.pageSize" :total="total2" @pagination="getList2" />
|
|
</el-card>
|
|
</el-card>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :lg="30" :xs="24">
|
|
<el-col :lg="30" :xs="24">
|
|
@@ -321,10 +315,10 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<pagination
|
|
<pagination
|
|
- v-show="total > 0"
|
|
|
|
|
|
+ v-show="total4 > 0"
|
|
v-model:page="queryParams.pageNum"
|
|
v-model:page="queryParams.pageNum"
|
|
v-model:limit="queryParams.pageSize"
|
|
v-model:limit="queryParams.pageSize"
|
|
- :total="total"
|
|
|
|
|
|
+ :total="total4"
|
|
@pagination="getListResponse"
|
|
@pagination="getListResponse"
|
|
/>
|
|
/>
|
|
</el-card>
|
|
</el-card>
|
|
@@ -509,7 +503,7 @@
|
|
|
|
|
|
<script setup name="User" lang="ts">
|
|
<script setup name="User" lang="ts">
|
|
import api from '@/api/system/user';
|
|
import api from '@/api/system/user';
|
|
-import { UserForm, UserQuery, UserVO, PlanVO, DrillVO, PlanForm } from '@/api/system/user/types';
|
|
|
|
|
|
+import { UserForm, UserQuery, UserVO, PlanVO, DrillVO, ResponseVO, PlanForm } from '@/api/system/user/types';
|
|
import { DeptVO } from '@/api/system/dept/types';
|
|
import { DeptVO } from '@/api/system/dept/types';
|
|
import { RoleVO } from '@/api/system/role/types';
|
|
import { RoleVO } from '@/api/system/role/types';
|
|
import { PostQuery, PostVO } from '@/api/system/post/types';
|
|
import { PostQuery, PostVO } from '@/api/system/post/types';
|
|
@@ -521,8 +515,9 @@ import type { TabsPaneContext } from 'element-plus';
|
|
import { ArrowLeft } from '@element-plus/icons-vue';
|
|
import { ArrowLeft } from '@element-plus/icons-vue';
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
import { reactive } from 'vue';
|
|
import { reactive } from 'vue';
|
|
-import { getDrillList, getPlanDetail, getResponseDetail, getTrainingList } from "@/api/riskPrevention/planManage";
|
|
|
|
|
|
+import { getDrillList, getPlanDetail, getResponseDetail, getTrainingList } from '@/api/riskPrevention/planManage';
|
|
import drill from './drill.vue';
|
|
import drill from './drill.vue';
|
|
|
|
+import { fetchReportDetail } from "@/api/kenowledge";
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
const goBack = () => {
|
|
const goBack = () => {
|
|
@@ -576,7 +571,6 @@ const loading4 = ref(false);
|
|
const loading3 = ref(false);
|
|
const loading3 = ref(false);
|
|
const total4 = ref(0);
|
|
const total4 = ref(0);
|
|
const total3 = ref(0);
|
|
const total3 = ref(0);
|
|
-const planList = ref<PlanVO[]>();
|
|
|
|
const drillList = ref<DrillVO[]>();
|
|
const drillList = ref<DrillVO[]>();
|
|
const loading2 = ref(false);
|
|
const loading2 = ref(false);
|
|
const total2 = ref(0);
|
|
const total2 = ref(0);
|
|
@@ -589,10 +583,8 @@ const multiple = ref(true);
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
const dateRange = ref<[DateModelType, DateModelType]>(['', '']);
|
|
const dateRange = ref<[DateModelType, DateModelType]>(['', '']);
|
|
const Content = ref('');
|
|
const Content = ref('');
|
|
-const deptOptions = ref<DeptVO[]>([]);
|
|
|
|
const initPassword = ref<string>('');
|
|
const initPassword = ref<string>('');
|
|
const postOptions = ref<PostVO[]>([]);
|
|
const postOptions = ref<PostVO[]>([]);
|
|
-const roleOptions = ref<RoleVO[]>([]);
|
|
|
|
/*** 用户导入参数 */
|
|
/*** 用户导入参数 */
|
|
const upload = reactive<ImportOption>({
|
|
const upload = reactive<ImportOption>({
|
|
// 是否显示弹出层(用户导入)
|
|
// 是否显示弹出层(用户导入)
|
|
@@ -728,33 +720,25 @@ const initData: PageData<UserForm, UserQuery> = {
|
|
};
|
|
};
|
|
const data = reactive<PageData<UserForm, UserQuery>>(initData);
|
|
const data = reactive<PageData<UserForm, UserQuery>>(initData);
|
|
|
|
|
|
|
|
+
|
|
const { queryParams, form2, rules } = toRefs<PageData<UserForm, UserQuery>>(data);
|
|
const { queryParams, form2, rules } = toRefs<PageData<UserForm, UserQuery>>(data);
|
|
-const drillForm = reactive({
|
|
|
|
- page: 1,
|
|
|
|
|
|
+//演练
|
|
|
|
+const drillForm = reactive<DrillForm>({
|
|
|
|
+ pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- planNum: ''
|
|
|
|
|
|
+ planNum: 'YJYA0000000001'
|
|
});
|
|
});
|
|
|
|
+//培训
|
|
const queryParams3 = reactive({
|
|
const queryParams3 = reactive({
|
|
page: 1,
|
|
page: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- planNum: ''
|
|
|
|
|
|
+ planNum: 'YJYA0000000001'
|
|
});
|
|
});
|
|
|
|
+//响应
|
|
const responseParams = reactive({
|
|
const responseParams = reactive({
|
|
- page: 1,
|
|
|
|
|
|
+ pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- planNum: ''
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
-const form = reactive<DrillVO>({
|
|
|
|
- drillId: '',
|
|
|
|
- drillName: '',
|
|
|
|
- drillUnit: '',
|
|
|
|
- year: '',
|
|
|
|
- drillTime: '',
|
|
|
|
- drillAddress: '',
|
|
|
|
- drillProject: '',
|
|
|
|
- drillVideo: '',
|
|
|
|
- drillPicture: ''
|
|
|
|
|
|
+ planId: 'YJYA0000000001'
|
|
});
|
|
});
|
|
|
|
|
|
/** 通过条件过滤节点 */
|
|
/** 通过条件过滤节点 */
|
|
@@ -772,44 +756,34 @@ watchEffect(
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
-/** 查询培训内容下拉树结构 */
|
|
|
|
-const getTreeSelect = async () => {
|
|
|
|
- const res = await api.deptTreeSelect();
|
|
|
|
- deptOptions.value = res.data;
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
/** 查询培训列表 */
|
|
/** 查询培训列表 */
|
|
-const getList = async () => {
|
|
|
|
- loading.value = true;
|
|
|
|
- const res = await api.listUser(proxy?.addDateRange(queryParams.value, dateRange.value));
|
|
|
|
- loading.value = false;
|
|
|
|
- userList.value = res.rows;
|
|
|
|
- total.value = res.total;
|
|
|
|
|
|
+const getList3 = async () => {
|
|
|
|
+ loading3.value = true;
|
|
|
|
+ const res = await getTrainingList(queryParams3);
|
|
|
|
+ loading3.value = false;
|
|
|
|
+ userList.value = res.data;
|
|
|
|
+ total3.value = res.total;
|
|
};
|
|
};
|
|
/** 查询演练列表 */
|
|
/** 查询演练列表 */
|
|
|
|
+/*const getList2 = async () => {
|
|
|
|
+ loading2.value = true;
|
|
|
|
+ const res = await api.listDrill(proxy?.addDateRange(drillForm.value, dateRange.value));
|
|
|
|
+ loading2.value = false;
|
|
|
|
+ drillList.value = res.rows;
|
|
|
|
+ total2.value = res.total;
|
|
|
|
+};*/
|
|
const getList2 = async () => {
|
|
const getList2 = async () => {
|
|
loading2.value = true;
|
|
loading2.value = true;
|
|
const res = await getDrillList(drillForm);
|
|
const res = await getDrillList(drillForm);
|
|
loading2.value = false;
|
|
loading2.value = false;
|
|
res.data.forEach((item) => {
|
|
res.data.forEach((item) => {
|
|
- item.drillPicture = item.drillPicture[0].file_name_desc;
|
|
|
|
- item.drillVideo = item.drillVideo[0].file_name_desc;
|
|
|
|
|
|
+ item.drillPicture = item.drillPicture[0]?.file_name_desc;
|
|
|
|
+ item.drillVideo = item.drillVideo[0]?.file_name_desc;
|
|
});
|
|
});
|
|
drillList.value = res.data;
|
|
drillList.value = res.data;
|
|
total2.value = res.total;
|
|
total2.value = res.total;
|
|
};
|
|
};
|
|
-/** 查询培训列表 */
|
|
|
|
-const getList3 = async () => {
|
|
|
|
- loading3.value = true;
|
|
|
|
- const res = await getTrainingList(queryParams3);
|
|
|
|
- loading3.value = false;
|
|
|
|
- // res.data.forEach(item => {
|
|
|
|
- // item.drillPicture = item.drillPicture[0].file_name_desc
|
|
|
|
- // item.drillVideo = item.drillVideo[0].file_name_desc
|
|
|
|
- // })
|
|
|
|
- userList.value = res.data;
|
|
|
|
- total3.value = res.total;
|
|
|
|
-};
|
|
|
|
|
|
+
|
|
/** 查询响应列表 */
|
|
/** 查询响应列表 */
|
|
/**const getListResponse = async () => {
|
|
/**const getListResponse = async () => {
|
|
loading4.value = true;
|
|
loading4.value = true;
|
|
@@ -835,7 +809,7 @@ const handleDelete = async (row?: UserVO) => {
|
|
const [err] = await to(proxy?.$modal.confirm('是否确认删除记录编号为"' + textIds + '"的数据项?') as any);
|
|
const [err] = await to(proxy?.$modal.confirm('是否确认删除记录编号为"' + textIds + '"的数据项?') as any);
|
|
if (!err) {
|
|
if (!err) {
|
|
await api.delUser(textIds);
|
|
await api.delUser(textIds);
|
|
- await getList();
|
|
|
|
|
|
+ await getList3();
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -888,7 +862,7 @@ const handleFileSuccess = (response: any, file: UploadFile) => {
|
|
ElMessageBox.alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', {
|
|
ElMessageBox.alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', {
|
|
dangerouslyUseHTMLString: true
|
|
dangerouslyUseHTMLString: true
|
|
});
|
|
});
|
|
- getList();
|
|
|
|
|
|
+ getList3();
|
|
};
|
|
};
|
|
|
|
|
|
/** 提交上传文件 */
|
|
/** 提交上传文件 */
|
|
@@ -896,15 +870,6 @@ function submitFileForm() {
|
|
uploadRef.value?.submit();
|
|
uploadRef.value?.submit();
|
|
}
|
|
}
|
|
|
|
|
|
-/** 初始化培训内容数据 */
|
|
|
|
-const initTreeData = async () => {
|
|
|
|
- // 判断培训内容的数据是否存在,存在不获取,不存在则获取
|
|
|
|
- if (deptOptions.value === undefined) {
|
|
|
|
- const { data } = await treeselect();
|
|
|
|
- deptOptions.value = data;
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
/** 重置操作表单 */
|
|
/** 重置操作表单 */
|
|
const reset = () => {
|
|
const reset = () => {
|
|
form.value = { ...initFormData };
|
|
form.value = { ...initFormData };
|
|
@@ -923,7 +888,6 @@ const handleUpdate = async (row?: UserForm) => {
|
|
//const { data } = await api.getUser(textId);
|
|
//const { data } = await api.getUser(textId);
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
dialog.title = '修改培训记录';
|
|
dialog.title = '修改培训记录';
|
|
- await initTreeData();
|
|
|
|
Object.assign(form.value, data.user);
|
|
Object.assign(form.value, data.user);
|
|
};
|
|
};
|
|
|
|
|
|
@@ -934,7 +898,7 @@ const submitForm = () => {
|
|
form.value.textId ? await api.updateUser(form.value) : await api.addUser(form.value);
|
|
form.value.textId ? await api.updateUser(form.value) : await api.addUser(form.value);
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
dialog.visible = false;
|
|
dialog.visible = false;
|
|
- await getList();
|
|
|
|
|
|
+ await getList3();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -962,9 +926,16 @@ const handleAdd = async () => {
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
dialog.title = '新增培训记录';
|
|
dialog.title = '新增培训记录';
|
|
};
|
|
};
|
|
|
|
+
|
|
let detailData = ref({
|
|
let detailData = ref({
|
|
- file_list: []
|
|
|
|
|
|
+ planId: '',
|
|
|
|
+ planName: '',
|
|
|
|
+ planType: '',
|
|
|
|
+ publish_date: '',
|
|
|
|
+ organUnit: '',
|
|
|
|
+ document: '',
|
|
});
|
|
});
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
const planId = route.query.planId;
|
|
const planId = route.query.planId;
|
|
drillForm.planNum = planId;
|
|
drillForm.planNum = planId;
|
|
@@ -972,8 +943,6 @@ onMounted(() => {
|
|
getPlanDetail(planId).then((res) => {
|
|
getPlanDetail(planId).then((res) => {
|
|
detailData.value = res.data;
|
|
detailData.value = res.data;
|
|
});
|
|
});
|
|
- getTreeSelect(); // 初始化培训内容数据
|
|
|
|
- getList(); // 初始化列表数据
|
|
|
|
getList2(); // 初始化列表数据
|
|
getList2(); // 初始化列表数据
|
|
getList3(); // 初始化列表数据
|
|
getList3(); // 初始化列表数据
|
|
proxy?.getConfigKey('sys.user.initPassword').then((response) => {
|
|
proxy?.getConfigKey('sys.user.initPassword').then((response) => {
|
|
@@ -1023,7 +992,7 @@ const drillDelete = async (row?: DrillVO) => {
|
|
const [err] = await to(proxy?.$modal.confirm('是否确认删除记录编号为"' + drillIds + '"的数据项?') as any);
|
|
const [err] = await to(proxy?.$modal.confirm('是否确认删除记录编号为"' + drillIds + '"的数据项?') as any);
|
|
if (!err) {
|
|
if (!err) {
|
|
await api.delPlan(drillIds);
|
|
await api.delPlan(drillIds);
|
|
- await getList();
|
|
|
|
|
|
+ await getList3();
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
}
|
|
}
|
|
};
|
|
};
|