diff --git a/src/views/responseManagement/responding/component/selectUserNew.vue b/src/views/responseManagement/responding/component/selectUserNew.vue
index 919c1b1..fd55d89 100644
--- a/src/views/responseManagement/responding/component/selectUserNew.vue
+++ b/src/views/responseManagement/responding/component/selectUserNew.vue
@@ -41,7 +41,7 @@
B2
-
+
@@ -187,24 +187,31 @@ const sendToLeft = (index,row) => {
};
const sendToRight = (index,row) => {
- if (row.roleId == '1793193529859244033') {
- if (chiefCount>0) {
- ElMessage.error('Please select only one B1 user');
- return;
- }else {
- chiefCount=chiefCount+1
- }
- }else {
- if (adminCount>0) {
- ElMessage.error('Please select only one B2 user');
- return;
- }else {
- adminCount=adminCount+1
+ if (state.selectData.length>0){
+ if (state.selectData.length==1){
+ if (state.selectData[0].roleId==row.roleId){
+ state.tableData.data.splice(index, 1)
+ state.tableData.data.splice(index,0,state.selectData[0])
+ state.selectData[0] =row
+ }else {
+ state.tableData.data.splice(index, 1)
+ state.selectData[state.selectData.length] =row
+ }
+ }else if (state.selectData.length==2){
+ if (state.selectData[0].roleId==row.roleId){
+ 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) => {
state.selectData = row;