|
|
@@ -128,6 +128,14 @@
|
|
|
>
|
|
|
{{ $t("lang.OrganizationEditPanel.save") }}
|
|
|
</a-button>
|
|
|
+ <a-button
|
|
|
+ v-if="!isCreate"
|
|
|
+ danger
|
|
|
+ style="margin-left: 8px"
|
|
|
+ @click="hiddenDepartment(organization)"
|
|
|
+ >
|
|
|
+ 隐藏部门
|
|
|
+ </a-button>
|
|
|
</template>
|
|
|
</a-drawer>
|
|
|
<a-drawer
|
|
|
@@ -305,6 +313,28 @@ const createOrganization = () => {
|
|
|
organization.value.parentName = null;
|
|
|
};
|
|
|
|
|
|
+// 隐藏部门
|
|
|
+const hiddenDepartment = info => {
|
|
|
+ $.ajax({
|
|
|
+ url: Common.getApiURL('organizationResource/concealOrganization'),
|
|
|
+ type: 'post',
|
|
|
+ beforeSend: function (request) {
|
|
|
+ Common.addTokenToRequest(request);
|
|
|
+ },
|
|
|
+ data: JSON.stringify(info),
|
|
|
+ contentType: 'application/json; charset=utf-8',
|
|
|
+ processData: false,
|
|
|
+ success: function (data) {
|
|
|
+ editVisible.value = false;
|
|
|
+ message.success(`${info.name}隐藏成功。`);
|
|
|
+ refreshData();
|
|
|
+ },
|
|
|
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
+ Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
// 创建按钮
|
|
|
const createNew = organization => {
|
|
|
organization.clientId = id.value;
|
|
|
@@ -496,7 +526,7 @@ const fetchUserList = (search, loading) => {
|
|
|
|
|
|
// 上级部门change事件
|
|
|
const parentOrganizationValueChanged = (value, label) => {
|
|
|
- if(!value && label.length == 0){
|
|
|
+ if (!value && label.length == 0) {
|
|
|
organization.value.parentId = null;
|
|
|
organization.value.parentName = null;
|
|
|
return;
|