|
@@ -36,16 +36,17 @@ const getTemplateInfoListApi = async selectedItem => {
|
|
|
};
|
|
|
getTemplateInfoListApi();
|
|
|
// 员工
|
|
|
-const userPageWhitOrganizationApi = async () => {
|
|
|
- const { data, code } = await userPageWhitOrganization({
|
|
|
- pageNumber: 1,
|
|
|
- pageSize: 1000
|
|
|
+const userPageWhitOrganizationApi = async selectedItem => {
|
|
|
+ const { data, code } = await getUserListObjectByModelId({
|
|
|
+ modelId: selectedItem.assessmentModelId,
|
|
|
+ assessmentId: selectedItem.assessmentId,
|
|
|
+ type: 0
|
|
|
});
|
|
|
if (code === 200) {
|
|
|
- dataList.personList = data.records;
|
|
|
+ dataList.personList = data;
|
|
|
}
|
|
|
};
|
|
|
-userPageWhitOrganizationApi();
|
|
|
+// userPageWhitOrganizationApi();
|
|
|
// 考核活动
|
|
|
const getAssessmentPageListApi = async () => {
|
|
|
const { data, code } = await getAssessmentList({
|
|
@@ -57,14 +58,17 @@ const getAssessmentPageListApi = async () => {
|
|
|
};
|
|
|
getAssessmentPageListApi();
|
|
|
// 部门
|
|
|
-const postListTreeApi = async () => {
|
|
|
- const { data, code } = await postListTree();
|
|
|
+const postListTreeApi = async selectedItem => {
|
|
|
+ const { data, code } = await getUserListObjectByModelId({
|
|
|
+ modelId: selectedItem.assessmentModelId,
|
|
|
+ type: 1,
|
|
|
+ assessmentId: selectedItem.assessmentId
|
|
|
+ });
|
|
|
if (code === 200) {
|
|
|
dataList.deptList = data;
|
|
|
}
|
|
|
- console.log("await", data);
|
|
|
};
|
|
|
-postListTreeApi();
|
|
|
+// postListTreeApi();
|
|
|
// -----------------------------------
|
|
|
const init = reactive({
|
|
|
assessmentName: "",
|
|
@@ -90,6 +94,8 @@ const handClickInit2 = value => {
|
|
|
item => item.assessmentModelId === value
|
|
|
);
|
|
|
init.assessmentModelName = selectedItem.assessmentModelName;
|
|
|
+ userPageWhitOrganizationApi(selectedItem);
|
|
|
+ postListTreeApi(selectedItem);
|
|
|
}
|
|
|
$emit("handClick", {
|
|
|
...dataList.params,
|
|
@@ -98,7 +104,11 @@ const handClickInit2 = value => {
|
|
|
};
|
|
|
const handClickInit3 = value => {
|
|
|
if (value) {
|
|
|
- init.deptName = value.deptName;
|
|
|
+ const selectedItem = dataList.personList.find(
|
|
|
+ item => item.assessmentObjectId === value
|
|
|
+ );
|
|
|
+ init.deptName = selectedItem.assessmentObjectName;
|
|
|
+ // init.deptName = value.deptName;
|
|
|
}
|
|
|
$emit("handClick", {
|
|
|
...dataList.params,
|
|
@@ -108,10 +118,9 @@ const handClickInit3 = value => {
|
|
|
const handClickInit4 = value => {
|
|
|
if (value) {
|
|
|
const selectedItem = dataList.personList.find(
|
|
|
- item => item.userCode === value
|
|
|
+ item => item.assessmentObjectId === value
|
|
|
);
|
|
|
- console.log("selectedItem", selectedItem);
|
|
|
- init.assessmentObjectName = selectedItem.realName;
|
|
|
+ init.assessmentObjectName = selectedItem.assessmentObjectName;
|
|
|
}
|
|
|
$emit("handClick", {
|
|
|
...dataList.params,
|
|
@@ -162,7 +171,22 @@ const handClickInit4 = value => {
|
|
|
</div>
|
|
|
<div class="flex mr-2">
|
|
|
<div class="text-sm leading-8 mr-3">科室</div>
|
|
|
- <el-tree-select
|
|
|
+ <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>
|
|
|
+ <!-- <el-tree-select
|
|
|
v-model="dataList.params.deptCode"
|
|
|
:data="dataList.deptList"
|
|
|
check-strictly
|
|
@@ -175,7 +199,7 @@ const handClickInit4 = value => {
|
|
|
}"
|
|
|
style="width: 200px"
|
|
|
@node-click="handClickInit3"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
<div class="flex mr-2">
|
|
|
<div class="text-sm leading-8 mr-3">员工</div>
|
|
@@ -189,9 +213,9 @@ const handClickInit4 = value => {
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in dataList.personList"
|
|
|
- :key="item.userCode"
|
|
|
- :label="item.realName"
|
|
|
- :value="item.userCode"
|
|
|
+ :key="item.assessmentObjectId"
|
|
|
+ :label="item.assessmentObjectName"
|
|
|
+ :value="item.assessmentObjectId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</div>
|