fix 部门管理 右键删除完 没有重新调接口

This commit is contained in:
赵霄
2023-09-11 18:22:15 +08:00
parent dae0c2c90c
commit ddaa858fc1
+59 -58
View File
@@ -21,7 +21,7 @@
<a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">{{ $t('depart.deselect') }}</a>
</div>
</a-alert>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" :placeholder="$t('depart.enterDepartmentName')"/>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" :placeholder="$t('depart.enterDepartmentName')" />
<!-- -->
<a-col :md="10" :sm="24">
<template>
@@ -39,7 +39,7 @@
:checkStrictly="checkStrictly"
:expandedKeys="iExpandedKeys"
:autoExpandParent="autoExpandParent"
@expand="onExpand"/>
@expand="onExpand" />
</span>
<!--新增右键点击事件,和增加添加和删除功能-->
<a-menu slot="overlay">
@@ -64,7 +64,8 @@
<a-menu-item key="6" @click="closeAll">{{ $t('mergeAll') }}</a-menu-item>
</a-menu>
<a-button>
{{ $t('treeOperation') }} <a-icon type="up" />
{{ $t('treeOperation') }}
<a-icon type="up" />
</a-button>
</a-dropdown>
</div>
@@ -72,7 +73,7 @@
</a-col>
<a-col :md="12" :sm="24">
<a-tabs defaultActiveKey="1">
<a-tab-pane :tab="$t('depart.essentialInformation')" key="1" >
<a-tab-pane :tab="$t('depart.essentialInformation')" key="1">
<a-card :bordered="false" v-if="selectedKeys.length>0">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departName" :label="$t('depart.organizationName')">
@@ -116,11 +117,11 @@
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('phoneNumber')">
<a-input :placeholder="$t('pleaseEnter') + $t('phoneNumber')" v-model="model.mobile" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('address')">
<a-input :placeholder="$t('pleaseEnter') + $t('address')" v-model="model.address"/>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('address')">
<a-input :placeholder="$t('pleaseEnter') + $t('address')" v-model="model.address" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('remarks')">
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" v-model="model.memo"/>
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')" v-model="model.memo" />
</a-form-model-item>
</a-form-model>
<div class="anty-form-btn">
@@ -128,14 +129,14 @@
<a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{ $t('preservation') }}</a-button>
</div>
</a-card>
<a-card v-else >
<a-card v-else>
<a-empty>
<span slot="description"> {{ $t('depart.selectDepartmentFirst') }} </span>
</a-empty>
</a-card>
</a-tab-pane>
<a-tab-pane :tab="$t('depart.departmentAuth')" key="2" forceRender>
<depart-auth-modal ref="departAuth"/>
<depart-auth-modal ref="departAuth" />
</a-tab-pane>
</a-tabs>
@@ -471,7 +472,7 @@ export default {
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('depart.deleteDepartmentData'),
onOk: function () {
onOk: () => {
deleteByDepartId({ id: that.rightClickSelectedKey }).then((resp) => {
if (resp.success) {
// 删除成功后,去除已选中中的数据
@@ -554,63 +555,63 @@ export default {
}
</script>
<style scoped>
.ant-card-body .table-operator {
margin: 15px;
}
.ant-card-body .table-operator {
margin: 15px;
}
.anty-form-btn {
width: 100%;
text-align: center;
}
.anty-form-btn {
width: 100%;
text-align: center;
}
.anty-form-btn button {
margin: 0 5px;
}
.anty-form-btn button {
margin: 0 5px;
}
.anty-node-layout .ant-layout-header {
padding-right: 0
}
.anty-node-layout .ant-layout-header {
padding-right: 0
}
.header {
padding: 0 8px;
}
.header {
padding: 0 8px;
}
.header button {
margin: 0 3px
}
.header button {
margin: 0 3px
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
#app .desktop {
height: auto !important;
}
#app .desktop {
height: auto !important;
}
/** Button按钮间距 */
.ant-btn {
margin-left: 3px
}
/** Button按钮间距 */
.ant-btn {
margin-left: 3px
}
.drawer-bootom-button {
/*position: absolute;*/
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: left;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.drawer-bootom-button {
/*position: absolute;*/
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: left;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>