|
@@ -4,6 +4,12 @@ import { getTemplateInfoList } from "@/api/templateInfo";
|
|
import { userPageWhitOrganization } from "@/api/userSetting";
|
|
import { userPageWhitOrganization } from "@/api/userSetting";
|
|
import { getAssessmentPageList } from "@/api/manage";
|
|
import { getAssessmentPageList } from "@/api/manage";
|
|
import { postListTree } from "@/api/department";
|
|
import { postListTree } from "@/api/department";
|
|
|
|
+import {
|
|
|
|
+ getAssessmentList,
|
|
|
|
+ getModelListByAssessmentId,
|
|
|
|
+ getUserListObjectByModelId
|
|
|
|
+} from "@/api/draw";
|
|
|
|
+
|
|
const $emit = defineEmits(["handClick"]);
|
|
const $emit = defineEmits(["handClick"]);
|
|
|
|
|
|
const dataList = reactive({
|
|
const dataList = reactive({
|
|
@@ -19,35 +25,33 @@ const dataList = reactive({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
// 考核模板
|
|
// 考核模板
|
|
-const getTemplateInfoListApi = async () => {
|
|
|
|
- const { data, code } = await getTemplateInfoList({
|
|
|
|
- pageNumber: 1,
|
|
|
|
- pageSize: 1000
|
|
|
|
- });
|
|
|
|
|
|
+const getTemplateInfoListApi = async selectedItem => {
|
|
|
|
+ const { data, code } = await getModelListByAssessmentId(selectedItem);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- dataList.teplist = data.records;
|
|
|
|
|
|
+ dataList.teplist = data;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-getTemplateInfoListApi();
|
|
|
|
|
|
+// getTemplateInfoListApi();
|
|
// 员工
|
|
// 员工
|
|
-const userPageWhitOrganizationApi = async () => {
|
|
|
|
- const { data, code } = await userPageWhitOrganization({
|
|
|
|
- pageNumber: 1,
|
|
|
|
- pageSize: 1000
|
|
|
|
|
|
+const userPageWhitOrganizationApi = async selectedItem => {
|
|
|
|
+ const { data, code } = await getUserListObjectByModelId({
|
|
|
|
+ type: 1,
|
|
|
|
+ assessmentId: selectedItem.assessmentId,
|
|
|
|
+ modelId: selectedItem.assessmentModelId
|
|
});
|
|
});
|
|
|
|
+ console.log("1111", data);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- dataList.personList = data.records;
|
|
|
|
|
|
+ dataList.personList = data;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-userPageWhitOrganizationApi();
|
|
|
|
|
|
+// userPageWhitOrganizationApi();
|
|
// 考核活动
|
|
// 考核活动
|
|
const getAssessmentPageListApi = async () => {
|
|
const getAssessmentPageListApi = async () => {
|
|
- const { data, code } = await getAssessmentPageList({
|
|
|
|
- pageNumber: 1,
|
|
|
|
- pageSize: 1000
|
|
|
|
|
|
+ const { data, code } = await getAssessmentList({
|
|
|
|
+ type: 1
|
|
});
|
|
});
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- dataList.magList = data.records;
|
|
|
|
|
|
+ dataList.magList = data;
|
|
}
|
|
}
|
|
console.log("await", data);
|
|
console.log("await", data);
|
|
};
|
|
};
|
|
@@ -73,6 +77,7 @@ const handClickInit1 = value => {
|
|
if (value) {
|
|
if (value) {
|
|
const selectedItem = dataList.magList.find(item => item.id === value);
|
|
const selectedItem = dataList.magList.find(item => item.id === value);
|
|
init.assessmentName = selectedItem.name;
|
|
init.assessmentName = selectedItem.name;
|
|
|
|
+ getTemplateInfoListApi(selectedItem);
|
|
}
|
|
}
|
|
$emit("handClick", {
|
|
$emit("handClick", {
|
|
...dataList.params,
|
|
...dataList.params,
|
|
@@ -81,8 +86,11 @@ const handClickInit1 = value => {
|
|
};
|
|
};
|
|
const handClickInit2 = value => {
|
|
const handClickInit2 = value => {
|
|
if (value) {
|
|
if (value) {
|
|
- const selectedItem = dataList.teplist.find(item => item.id === value);
|
|
|
|
- init.assessmentModelName = selectedItem.tpName;
|
|
|
|
|
|
+ const selectedItem = dataList.teplist.find(
|
|
|
|
+ item => item.assessmentModelId === value
|
|
|
|
+ );
|
|
|
|
+ init.assessmentModelName = selectedItem.assessmentModelName;
|
|
|
|
+ userPageWhitOrganizationApi(selectedItem);
|
|
}
|
|
}
|
|
$emit("handClick", {
|
|
$emit("handClick", {
|
|
...dataList.params,
|
|
...dataList.params,
|
|
@@ -91,6 +99,10 @@ const handClickInit2 = value => {
|
|
};
|
|
};
|
|
const handClickInit3 = value => {
|
|
const handClickInit3 = value => {
|
|
if (value) {
|
|
if (value) {
|
|
|
|
+ const selectedItem = dataList.teplist.find(
|
|
|
|
+ item => item.assessmentObjectId === value
|
|
|
|
+ );
|
|
|
|
+ init.assessmentObjectName = selectedItem.assessmentObjectName;
|
|
init.deptName = value.deptName;
|
|
init.deptName = value.deptName;
|
|
}
|
|
}
|
|
$emit("handClick", {
|
|
$emit("handClick", {
|
|
@@ -134,15 +146,15 @@ const handClickInit3 = value => {
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in dataList.teplist"
|
|
v-for="item in dataList.teplist"
|
|
- :key="item.id"
|
|
|
|
- :label="item.tpName"
|
|
|
|
- :value="item.id"
|
|
|
|
|
|
+ :key="item.assessmentModelId"
|
|
|
|
+ :label="item.assessmentModelName"
|
|
|
|
+ :value="item.assessmentModelId"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="flex mr-2">
|
|
<div class="flex mr-2">
|
|
- <div class="text-sm leading-8 mr-3">科主任</div>
|
|
|
|
- <el-tree-select
|
|
|
|
|
|
+ <div class="text-sm leading-8 mr-3">科室</div>
|
|
|
|
+ <!-- <el-tree-select
|
|
v-model="dataList.params.deptCode"
|
|
v-model="dataList.params.deptCode"
|
|
:data="dataList.deptList"
|
|
:data="dataList.deptList"
|
|
check-strictly
|
|
check-strictly
|
|
@@ -155,7 +167,22 @@ const handClickInit3 = value => {
|
|
}"
|
|
}"
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
@change="handClickInit3"
|
|
@change="handClickInit3"
|
|
- />
|
|
|
|
|
|
+ /> -->
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="dataList.params.deptCode"
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ @change="handClickInit3"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in dataList.deptList"
|
|
|
|
+ :key="item.assessmentObjectId"
|
|
|
|
+ :label="item.assessmentObjectName"
|
|
|
|
+ :value="item.assessmentObjectId"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|