|
|
@@ -98,7 +98,7 @@
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { onMounted, inject,ref } from 'vue';
|
|
|
+import { onMounted, inject,ref,watch } from 'vue';
|
|
|
|
|
|
import { useRoute,useRouter } from 'vue-router';
|
|
|
|
|
|
@@ -202,6 +202,9 @@ const GetReviewAccountList = async ()=>{
|
|
|
]
|
|
|
}).flat()
|
|
|
|
|
|
+ //初次赋值,要检查 上一次生成账号是否按男女生成
|
|
|
+ ChangeHeaderShowItem(evaluationManageData.isGenerateAccountByGender)
|
|
|
+
|
|
|
// 表行赋值
|
|
|
Object.values(gradeMsg)?.map(grade=>{
|
|
|
let gradeId = grade.evaluationGradeId
|
|
|
@@ -225,9 +228,9 @@ const GetReviewAccountList = async ()=>{
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-// 打开/关闭 按男女生成
|
|
|
-const GenerateAccountByGenderOrNot = (val)=>{
|
|
|
- if(val){
|
|
|
+// 切换评价账号的表头展示项 _ 根据 是否按男女生成 来判断
|
|
|
+const ChangeHeaderShowItem = (isGenerateByGender:Boolean)=>{
|
|
|
+ if(isGenerateByGender){
|
|
|
// 打开
|
|
|
tableColumns.value = tableColumns.value.map(item=>{
|
|
|
if(item?.name.startsWith('num_')){
|
|
|
@@ -237,7 +240,6 @@ const GenerateAccountByGenderOrNot = (val)=>{
|
|
|
}
|
|
|
return item
|
|
|
})
|
|
|
-
|
|
|
}else{
|
|
|
// 关闭
|
|
|
tableColumns.value = tableColumns.value.map(item=>{
|
|
|
@@ -251,6 +253,9 @@ const GenerateAccountByGenderOrNot = (val)=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+watch(()=>evaluationManageData.isGenerateAccountByGender,(val)=>{
|
|
|
+ ChangeHeaderShowItem(val)
|
|
|
+})
|
|
|
|
|
|
// 2. 批量编辑弹窗操作
|
|
|
const batchEditFormVisible = ref(false)
|
|
|
@@ -430,7 +435,7 @@ onMounted(async ()=>{
|
|
|
let objMsg = JSON.parse(reviewAccountMsg || '{}')
|
|
|
originReviewAccount.value = objMsg.originReviewAccount
|
|
|
batchEditGradeList.value = objMsg.batchEditGradeList
|
|
|
- tableColumns.value = objMsg.tableColumns
|
|
|
+ tableColumns.value = objMsg.tableColumns
|
|
|
tableData.value = objMsg.tableData
|
|
|
sessionStorage.removeItem('reviewAccountMsg') //获取完后清空数据
|
|
|
}else{
|