|
@@ -9,6 +9,7 @@ import {
|
|
getModelListByAssessmentId,
|
|
getModelListByAssessmentId,
|
|
getUserListObjectByModelId
|
|
getUserListObjectByModelId
|
|
} from "@/api/draw";
|
|
} from "@/api/draw";
|
|
|
|
+import { useRouter, useRoute } from "vue-router";
|
|
|
|
|
|
const $emit = defineEmits(["handClick"]);
|
|
const $emit = defineEmits(["handClick"]);
|
|
|
|
|
|
@@ -24,6 +25,7 @@ const dataList = reactive({
|
|
assessmentObjectId: ""
|
|
assessmentObjectId: ""
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
// 考核模板
|
|
// 考核模板
|
|
const getTemplateInfoListApi = async selectedItem => {
|
|
const getTemplateInfoListApi = async selectedItem => {
|
|
const { data, code } = await getModelListByAssessmentId(selectedItem);
|
|
const { data, code } = await getModelListByAssessmentId(selectedItem);
|
|
@@ -39,23 +41,12 @@ const userPageWhitOrganizationApi = async selectedItem => {
|
|
assessmentId: selectedItem.assessmentId,
|
|
assessmentId: selectedItem.assessmentId,
|
|
modelId: selectedItem.assessmentModelId
|
|
modelId: selectedItem.assessmentModelId
|
|
});
|
|
});
|
|
- console.log("1111", data);
|
|
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
dataList.personList = data;
|
|
dataList.personList = data;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// userPageWhitOrganizationApi();
|
|
// userPageWhitOrganizationApi();
|
|
-// 考核活动
|
|
|
|
-const getAssessmentPageListApi = async () => {
|
|
|
|
- const { data, code } = await getAssessmentList({
|
|
|
|
- type: 1
|
|
|
|
- });
|
|
|
|
- if (code === 200) {
|
|
|
|
- dataList.magList = data;
|
|
|
|
- }
|
|
|
|
- console.log("await", data);
|
|
|
|
-};
|
|
|
|
-getAssessmentPageListApi();
|
|
|
|
|
|
+
|
|
// 部门
|
|
// 部门
|
|
const postListTreeApi = async () => {
|
|
const postListTreeApi = async () => {
|
|
const { data, code } = await postListTree();
|
|
const { data, code } = await postListTree();
|
|
@@ -97,6 +88,7 @@ const handClickInit2 = value => {
|
|
...init
|
|
...init
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+
|
|
const handClickInit3 = value => {
|
|
const handClickInit3 = value => {
|
|
if (value) {
|
|
if (value) {
|
|
const selectedItem = dataList.teplist.find(
|
|
const selectedItem = dataList.teplist.find(
|
|
@@ -111,6 +103,67 @@ const handClickInit3 = value => {
|
|
...init
|
|
...init
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const route = useRoute();
|
|
|
|
+const getSearchFrom = () => {
|
|
|
|
+ route
|
|
|
|
+ ? console.log(route.query, "获取的路由信息")
|
|
|
|
+ : console.log("获得的路由信息为空", route);
|
|
|
|
+ if (Object.keys(route.query).length > 0) {
|
|
|
|
+ const {
|
|
|
|
+ assessmentId,
|
|
|
|
+ assessmentModelId,
|
|
|
|
+ assessmentObjectId,
|
|
|
|
+ assessmentName,
|
|
|
|
+ assessmentModelName,
|
|
|
|
+ assessmentObjectName
|
|
|
|
+ } = route.query;
|
|
|
|
+ const obj = ["assessmentId", "assessmentModelId", "assessmentObjectId"];
|
|
|
|
+ const initObj = [
|
|
|
|
+ "assessmentName",
|
|
|
|
+ "assessmentModelName",
|
|
|
|
+ "assessmentObjectName"
|
|
|
|
+ ];
|
|
|
|
+ obj.map(item => {
|
|
|
|
+ dataList.params[item] = route.query[item];
|
|
|
|
+ });
|
|
|
|
+ initObj.map(item => {
|
|
|
|
+ init[item] = route.query[item];
|
|
|
|
+ });
|
|
|
|
+ // dataList.params.assessmentId = assessmentId
|
|
|
|
+ // dataList.params.assessmentModelId = assessmentModelId
|
|
|
|
+ // dataList.params.assessmentObjectId = assessmentObjectId
|
|
|
|
+ // init.assessmentName = assessmentName;
|
|
|
|
+ // init.assessmentModelName = assessmentModelName
|
|
|
|
+ // init.assessmentObjectName = assessmentObjectName
|
|
|
|
+ const selectedItem = dataList.magList.find(
|
|
|
|
+ item => item.id === assessmentId
|
|
|
|
+ );
|
|
|
|
+ getTemplateInfoListApi(selectedItem);
|
|
|
|
+ const selectedItems = dataList.teplist.find(
|
|
|
|
+ item => item.assessmentModelId === dataList.params.assessmentModelId
|
|
|
|
+ );
|
|
|
|
+ userPageWhitOrganizationApi(selectedItems);
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ $emit("handClick", {
|
|
|
|
+ ...dataList.params,
|
|
|
|
+ ...init
|
|
|
|
+ });
|
|
|
|
+ }, 100);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// 考核活动
|
|
|
|
+const getAssessmentPageListApi = async () => {
|
|
|
|
+ const { data, code } = await getAssessmentList({
|
|
|
|
+ type: 1
|
|
|
|
+ });
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ dataList.magList = data;
|
|
|
|
+ getSearchFrom();
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+getAssessmentPageListApi();
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|