|
@@ -582,7 +582,6 @@ const multiple = ref(true);
|
|
|
const total = ref(0);
|
|
|
const dateRange = ref<[DateModelType, DateModelType]>(['', '']);
|
|
|
const Content = ref('');
|
|
|
-const deptOptions = ref<DeptVO[]>([]);
|
|
|
const initPassword = ref<string>('');
|
|
|
const postOptions = ref<PostVO[]>([]);
|
|
|
/*** 用户导入参数 */
|
|
@@ -725,7 +724,7 @@ const { queryParams, form2, rules } = toRefs<PageData<UserForm, UserQuery>>(data
|
|
|
const drillForm = reactive<DrillForm>({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- planId: 'YJYA0000000001'
|
|
|
+ planNum: 'YJYA0000000001'
|
|
|
});
|
|
|
//培训
|
|
|
const queryParams3 = reactive({
|
|
@@ -754,12 +753,6 @@ watchEffect(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
-/** 查询培训内容下拉树结构 */
|
|
|
-const getTreeSelect = async () => {
|
|
|
- const res = await api.deptTreeSelect();
|
|
|
- deptOptions.value = res.data;
|
|
|
-};
|
|
|
-
|
|
|
/** 查询培训列表 */
|
|
|
const getList3 = async () => {
|
|
|
loading3.value = true;
|
|
@@ -781,8 +774,8 @@ const getList2 = async () => {
|
|
|
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;
|
|
|
+ item.drillPicture = item.drillPicture[0]?.file_name_desc;
|
|
|
+ item.drillVideo = item.drillVideo[0]?.file_name_desc;
|
|
|
});
|
|
|
drillList.value = res.data;
|
|
|
total2.value = res.total;
|
|
@@ -874,15 +867,6 @@ function submitFileForm() {
|
|
|
uploadRef.value?.submit();
|
|
|
}
|
|
|
|
|
|
-/** 初始化培训内容数据 */
|
|
|
-const initTreeData = async () => {
|
|
|
- // 判断培训内容的数据是否存在,存在不获取,不存在则获取
|
|
|
- if (deptOptions.value === undefined) {
|
|
|
- const { data } = await treeselect();
|
|
|
- deptOptions.value = data;
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
/** 重置操作表单 */
|
|
|
const reset = () => {
|
|
|
form.value = { ...initFormData };
|
|
@@ -901,7 +885,6 @@ const handleUpdate = async (row?: UserForm) => {
|
|
|
//const { data } = await api.getUser(textId);
|
|
|
dialog.visible = true;
|
|
|
dialog.title = '修改培训记录';
|
|
|
- await initTreeData();
|
|
|
Object.assign(form.value, data.user);
|
|
|
};
|
|
|
|
|
@@ -940,6 +923,7 @@ const handleAdd = async () => {
|
|
|
dialog.visible = true;
|
|
|
dialog.title = '新增培训记录';
|
|
|
};
|
|
|
+
|
|
|
let detailData = ref({
|
|
|
file_list: []
|
|
|
});
|
|
@@ -950,7 +934,6 @@ onMounted(() => {
|
|
|
getPlanDetail(planId).then((res) => {
|
|
|
detailData.value = res.data;
|
|
|
});
|
|
|
- getTreeSelect(); // 初始化培训内容数据
|
|
|
getList2(); // 初始化列表数据
|
|
|
getList3(); // 初始化列表数据
|
|
|
proxy?.getConfigKey('sys.user.initPassword').then((response) => {
|