Browse Source

fix: 分组逻辑调整

deploy-dev
xuziqiang 4 months ago
parent
commit
86e0b30e81
  1. 10
      hx-ai-intelligent/src/view/equipmentManage/group/editGroup.vue

10
hx-ai-intelligent/src/view/equipmentManage/group/editGroup.vue

@ -17,7 +17,7 @@
<template v-if="data.field === 'groupName'"> <template v-if="data.field === 'groupName'">
<div class="iconOP"> <div class="iconOP">
<EditOutlined v-if="inputDisabled" @click="editGroup" /> <EditOutlined v-if="inputDisabled" @click="editGroup" />
<CheckOutlined v-else @click="op" /> <CheckOutlined v-else @click="add" />
</div> </div>
</template> </template>
</template> </template>
@ -77,7 +77,11 @@
const op = () => { const op = () => {
inputDisabled.value = !inputDisabled.value; inputDisabled.value = !inputDisabled.value;
add(); };
const clearData = () => {
model.value = {};
selectedRowKeys.value = [];
}; };
const editGroup = () => { const editGroup = () => {
@ -97,6 +101,7 @@
http.post(group.saveComputeGroup, finalParams).then(() => { http.post(group.saveComputeGroup, finalParams).then(() => {
getTableData(); getTableData();
NsMessage.success('操作成功'); NsMessage.success('操作成功');
op();
}); });
}); });
}; };
@ -105,6 +110,7 @@
http.post(group.delComputeGroup, { id }).then(() => { http.post(group.delComputeGroup, { id }).then(() => {
getTableData(); getTableData();
NsMessage.success('操作成功'); NsMessage.success('操作成功');
clearData();
}); });
}; };
const rowSelectChange = (selected, selectedRows) => { const rowSelectChange = (selected, selectedRows) => {

Loading…
Cancel
Save