| | |
| | | map5[2]=ui->radioButton_15; |
| | | |
| | | |
| | | map<int,QRadioButton *> warningMap; |
| | | warningMap[0]=ui->radioButton_16; |
| | | warningMap[1]=ui->radioButton_17; |
| | | warningMap[2]=ui->radioButton_18; |
| | | |
| | | map<int,QRadioButton *> versionMap; |
| | | versionMap[0]=ui->radioButton_19; |
| | | versionMap[1]=ui->radioButton_20; |
| | | versionMap[2]=ui->radioButton_21; |
| | | |
| | | map<int,QRadioButton *> superManager; |
| | | // 1涓鸿秴绾х鐞嗗憳 |
| | | superManager[0]=ui->radioButton_23; |
| | | superManager[1]=ui->radioButton_22; |
| | | |
| | | btnList.push_back(map1); |
| | | btnList.push_back(map2); |
| | | btnList.push_back(map3); |
| | | btnList.push_back(map4); |
| | | btnList.push_back(map5); |
| | | btnList.push_back(warningMap); |
| | | btnList.push_back(versionMap); |
| | | btnList.push_back(superManager); |
| | | |
| | | } |
| | | |
| | |
| | | int PermissonDialog::findBoxCheck(map<int, QRadioButton *> map) |
| | | { |
| | | for(int i =0;i<map.size();i++){ |
| | | if(btnList[0][i]->isChecked()){ |
| | | if(map[i]->isChecked()){ |
| | | return i; |
| | | } |
| | | } |
| | |
| | | btnList[2][res.getMapMark()]->setChecked(true); |
| | | btnList[3][res.getDevManage()]->setChecked(true); |
| | | btnList[4][res.getProductPlan()]->setChecked(true); |
| | | |
| | | btnList[5][res.getWarninManage()]->setChecked(true); |
| | | |
| | | btnList[6][res.getVersionManage()]->setChecked(true); |
| | | |
| | | btnList[7][res.getAdmin()]->setChecked(true); |
| | | |
| | | curRes = res; |
| | | |
| | |
| | | param.setMapMark(findBoxCheck(btnList[2])); |
| | | param.setDevManage(findBoxCheck(btnList[3])); |
| | | param.setProductPlan(findBoxCheck(btnList[4])); |
| | | param.setWarninManage(findBoxCheck(btnList[5])); |
| | | param.setVersionManage(findBoxCheck(btnList[6])); |
| | | param.setAdmin(findBoxCheck(btnList[7])); |
| | | |
| | | param.setRoleId(curRes.getRoleId()); |
| | | param.setId(curRes.getId()); |
| | | client->updatePmsByParam(param); |
| | | |
| | | } |