fix: BUG修改

This commit is contained in:
kun 2024-04-01 13:50:42 +08:00
parent 3642e32445
commit 59c6164142

View File

@ -122,7 +122,7 @@
width="420px" width="420px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="operation-style">
<div <div
v-if="!treeSelectData.projectName" v-if="!treeSelectData.projectName"
@click="configAccountFn(scope.row, 'yi')" @click="configAccountFn(scope.row, 'yi')"
@ -138,10 +138,6 @@
> >
<el-button size="small" type="primary">上传账号</el-button> <el-button size="small" type="primary">上传账号</el-button>
</div> </div>
<div @click="editGroup(scope.row)" class="operationText">
<i class="el-icon-s-operation"></i>
<span>调整组织</span>
</div>
<div @click="editAccountFn(scope.row)" class="operationText"> <div @click="editAccountFn(scope.row)" class="operationText">
<img <img
src="@/assets/images/icon-edit.png" src="@/assets/images/icon-edit.png"
@ -185,9 +181,9 @@
:label="'岗位职责'" :label="'岗位职责'"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column :label="$t('message.deviceManage.operation')"> <el-table-column :label="$t('message.deviceManage.operation')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="operation-style">
<div @click="editJobFn(scope.row)" class="operationText"> <div @click="editJobFn(scope.row)" class="operationText">
<img <img
src="@/assets/images/icon-edit.png" src="@/assets/images/icon-edit.png"
@ -241,6 +237,7 @@
</el-table-column> </el-table-column>
<el-table-column label="授权配置" align="center"> <el-table-column label="授权配置" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="operation-style">
<div <div
@click="relativeGroupFn(scope.row)" @click="relativeGroupFn(scope.row)"
class="operationText" class="operationText"
@ -261,6 +258,7 @@
/> />
<span>删除记录</span> <span>删除记录</span>
</div> </div>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -284,7 +282,6 @@
label="密码" label="密码"
align="center" align="center"
></el-table-column> ></el-table-column>
</el-table-column>
<el-table-column <el-table-column
prop="email" prop="email"
label="电子邮箱" label="电子邮箱"
@ -1142,7 +1139,7 @@
:check-on-click-node="false" :check-on-click-node="false"
show-checkbox show-checkbox
:props="defaultProps" :props="defaultProps"
node-key="itemId" node-key="sn"
ref="groupTree" ref="groupTree"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
@ -3090,7 +3087,12 @@ export default {
}, },
// keys // keys
getRelativeKeys(arr){ getRelativeKeys(arr){
let keysArr = arr; let keysArr = [];
arr.map(item => {
if(item.isProjectSn && !item.hasSubList){
keysArr.push(item.sn)
}
})
return keysArr; return keysArr;
}, },
// //
@ -3100,8 +3102,8 @@ export default {
}, },
transformGroup(){ transformGroup(){
let item = this.selectRowObj; let item = this.selectRowObj;
const checked = this.$refs.relativeTree.getCheckedNodes(); const checked = this.$refs.groupTree.getCheckedNodes();
const halfChecked = this.$refs.relativeTree.getHalfCheckedNodes(); const halfChecked = this.$refs.groupTree.getHalfCheckedNodes();
const checkedArr = this.transfrom(checked); const checkedArr = this.transfrom(checked);
const halfCheckedArr = this.transfrom(halfChecked); const halfCheckedArr = this.transfrom(halfChecked);
const concatArr = checkedArr.concat(halfCheckedArr); const concatArr = checkedArr.concat(halfCheckedArr);
@ -3116,7 +3118,7 @@ export default {
} }
}) })
this.$confirm( this.$confirm(
`账号{${item.account}}审批通过后将会发送【注册成功提醒】到注册人邮箱!`, `账号{${item.account}}将调整组织,确认继续?`,
this.$t("message.companyDiagram.Tips"), this.$t("message.companyDiagram.Tips"),
{ {
confirmButtonText: this.$t( confirmButtonText: this.$t(
@ -3126,11 +3128,11 @@ export default {
type: "warning", type: "warning",
} }
).then(() => { ).then(() => {
userAuditApi({ id: item.id, approvalProcess:2, companySns: [...companySnArr].join(','), projectSns: [...projectSnArr].join(',') }).then((res) => { updateUserManagerApi({ userId: item.userId, companySns: [...companySnArr].join(','), projectSns: [...projectSnArr].join(',') }).then((res) => {
if(res.success){ if(res.success){
this.$message.success("调整完成"); this.$message.success("调整完成");
this.editGroupDialog = false; this.editGroupDialog = false;
this.getUserAuditListApiFunc(); this.getUserManageListApi();
} }
}); });
}); });
@ -3214,6 +3216,7 @@ export default {
}, },
// //
async editGroup(row) { async editGroup(row) {
this.selectRowObj = row;
this.editGroupDialog = true; this.editGroupDialog = true;
// //
const res = await getSelectedGroupApi({ userId: row.userId }); const res = await getSelectedGroupApi({ userId: row.userId });
@ -3283,7 +3286,11 @@ export default {
} }
).then(() => { ).then(() => {
deleteSystemUserApi({ id: item.userId }).then((res) => { deleteSystemUserApi({ id: item.userId }).then((res) => {
if(this.tabActiveName == 'first'){
this.getAccountList(); this.getAccountList();
} else if(this.tabActiveName == 'four'){
this.getUserManageListApi();
}
this.$message.success( this.$message.success(
this.$t("message.companyDiagram.deleteSuccess") this.$t("message.companyDiagram.deleteSuccess")
); //! ); //!
@ -3815,6 +3822,9 @@ export default {
.operation-style{ .operation-style{
.flex(); .flex();
justify-content: center; justify-content: center;
.operationText:not(:last-child){
margin-right: 10px;
}
} }
.add { .add {
display: flex; display: flex;