灾害人员管理弹窗修改

This commit is contained in:
遥望-倪浩天 2024-07-17 16:43:02 +08:00
parent 1099c3322a
commit 7a5f8e39d1
1 changed files with 25 additions and 18 deletions

View File

@ -41,7 +41,7 @@
<el-tag type="info" v-if="scope.row.roleId == '1123598816738675203'">B2</el-tag> <el-tag type="info" v-if="scope.row.roleId == '1123598816738675203'">B2</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="left" label="Operations" min-width="120"> <!-- <el-table-column fixed="left" label="Operations" min-width="120">
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
@ -53,7 +53,7 @@
<el-icon><ele-Back /></el-icon> <el-icon><ele-Back /></el-icon>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>-->
</el-table> </el-table>
</el-card> </el-card>
</div> </div>
@ -187,24 +187,31 @@ const sendToLeft = (index,row) => {
}; };
const sendToRight = (index,row) => { const sendToRight = (index,row) => {
if (row.roleId == '1793193529859244033') { if (state.selectData.length>0){
if (chiefCount>0) { if (state.selectData.length==1){
ElMessage.error('Please select only one B1 user'); if (state.selectData[0].roleId==row.roleId){
return; state.tableData.data.splice(index, 1)
}else { state.tableData.data.splice(index,0,state.selectData[0])
chiefCount=chiefCount+1 state.selectData[0] =row
} }else {
}else { state.tableData.data.splice(index, 1)
if (adminCount>0) { state.selectData[state.selectData.length] =row
ElMessage.error('Please select only one B2 user'); }
return; }else if (state.selectData.length==2){
}else { if (state.selectData[0].roleId==row.roleId){
adminCount=adminCount+1 state.tableData.data.splice(index, 1)
state.tableData.data.splice(index,0,state.selectData[0])
state.selectData[0] =row
}else if (state.selectData[1].roleId==row.roleId){
state.tableData.data.splice(index, 1)
state.tableData.data.splice(index,0,state.selectData[1])
state.selectData[1] =row
}
} }
} else {
state.tableData.data.splice(index, 1)
state.selectData[state.selectData.length] =row
} }
dataIndex[dataIndex.length]=index
state.tableData.data.splice(index, 1)
state.selectData[state.selectData.length] =row
}; };
const selectRow = (row) => { const selectRow = (row) => {
state.selectData = row; state.selectData = row;