|
@@ -94,22 +94,12 @@ const getTemplateInfoListApi = async () => {
|
|
// 删除
|
|
// 删除
|
|
const delParams = reactive({
|
|
const delParams = reactive({
|
|
assessmentId: "",
|
|
assessmentId: "",
|
|
- objectAddVoList: [
|
|
|
|
- {
|
|
|
|
- assessmentObjectId: "",
|
|
|
|
- assessmentObjectName: ""
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ objectAddVoList: []
|
|
});
|
|
});
|
|
// 被考核对象
|
|
// 被考核对象
|
|
const addPersonParams = reactive({
|
|
const addPersonParams = reactive({
|
|
assessmentId: "",
|
|
assessmentId: "",
|
|
- objectAddVoList: [
|
|
|
|
- {
|
|
|
|
- assessmentObjectId: "",
|
|
|
|
- assessmentObjectName: ""
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ objectAddVoList: []
|
|
});
|
|
});
|
|
const aaa = ref();
|
|
const aaa = ref();
|
|
const delAssessmentObjectApi = async () => {
|
|
const delAssessmentObjectApi = async () => {
|
|
@@ -125,7 +115,7 @@ const delAssessmentObjectApi = async () => {
|
|
).then(async () => {
|
|
).then(async () => {
|
|
const { code, msg } = await delAssessmentObject(delParams);
|
|
const { code, msg } = await delAssessmentObject(delParams);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- getAssessmentQuotaDetailsApi();
|
|
|
|
|
|
+ getAssessmentObjectDetailsApi();
|
|
ElMessage.success("删除成功");
|
|
ElMessage.success("删除成功");
|
|
} else {
|
|
} else {
|
|
ElMessage.error(msg);
|
|
ElMessage.error(msg);
|
|
@@ -139,21 +129,26 @@ const delAssessmentObjectApi = async () => {
|
|
const changeSelection = val => {
|
|
const changeSelection = val => {
|
|
if (val) {
|
|
if (val) {
|
|
valSelection.value = true;
|
|
valSelection.value = true;
|
|
|
|
+ delParams.objectAddVoList = [];
|
|
|
|
+ console.log(val, "获取的批量选中的数据");
|
|
delParams.assessmentId = messageData.value.id;
|
|
delParams.assessmentId = messageData.value.id;
|
|
addPersonParams.assessmentId = messageData.value.id;
|
|
addPersonParams.assessmentId = messageData.value.id;
|
|
let assessmentObjectId;
|
|
let assessmentObjectId;
|
|
let assessmentObjectName;
|
|
let assessmentObjectName;
|
|
val.forEach((item, index) => {
|
|
val.forEach((item, index) => {
|
|
- delParams.objectAddVoList.forEach((item1, index1) => {
|
|
|
|
- if (index == index1) {
|
|
|
|
- assessmentObjectId = item.id;
|
|
|
|
- assessmentObjectName = item.realName;
|
|
|
|
- delParams.objectAddVoList.push({
|
|
|
|
- assessmentObjectId,
|
|
|
|
- assessmentObjectName
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ console.log(item, "循环过滤的数据");
|
|
|
|
+ const obj = {
|
|
|
|
+ assessmentObjectId: item.assessmentObjectId,
|
|
|
|
+ assessmentObjectName: item.assessmentObjectName
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ // delParams.objectAddVoList.forEach((item1, index1) => {
|
|
|
|
+ // if (index == index1) {
|
|
|
|
+ // assessmentObjectId = item.assessmentObjectId;
|
|
|
|
+ // assessmentObjectName = item.assessmentObjectName;
|
|
|
|
+ delParams.objectAddVoList.push(obj);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
};
|