diff --git a/src/components/features/bindSN.vue b/src/components/features/bindSN.vue
index 3e8a2c8..6574bfe 100644
--- a/src/components/features/bindSN.vue
+++ b/src/components/features/bindSN.vue
@@ -79,6 +79,8 @@ import bindSNActiveStore from "../../stores/bindSN";
const bindSNActive = bindSNActiveStore();
+const emit = defineEmits(["reloadRecord"]);
+
const selectedUser = ref("");
const selectedSN = ref("");
const unbindUsers = ref([]);
@@ -101,6 +103,7 @@ const resetCheckForm = () => {
};
const searchBindUser = () => {
+ unbindUsers.value = [];
nextTick(() => {
$http.get($url.searchBindUser).then((res) => {
if (res.data.code === 200) {
@@ -109,7 +112,6 @@ const searchBindUser = () => {
userObj.value[element.account_name] = element.uid;
});
} else {
- unbindUsers.value = [];
resetCheckForm();
// ElMessage.error("未查找到相关数据!");
}
@@ -118,6 +120,7 @@ const searchBindUser = () => {
};
const searchBindSN = () => {
+ unbindSN.value = [];
nextTick(() => {
$http.get($url.searchBindSN).then((res) => {
if (res.data.code === 200) {
@@ -125,7 +128,6 @@ const searchBindSN = () => {
unbindSN.value.push(element);
});
} else {
- unbindSN.value = [];
resetCheckForm();
// ElMessage.error("未查找到相关数据!");
}
@@ -133,6 +135,11 @@ const searchBindSN = () => {
});
};
+const resetList = () => {
+ unbindUsers.value = [];
+ unbindSN.value = [];
+};
+
const bindSN = () => {
if (selectedUser.value === "" || selectedSN.value === "") {
ElMessage.warning("请选择用户和SN号!");
@@ -151,8 +158,8 @@ const bindSN = () => {
message: "绑定成功!",
type: "success",
});
- unbindUsers.value = [];
- unbindSN.value = [];
+ resetList();
+ emit("reloadRecord");
} else {
ElMessage.error("绑定失败!");
}
diff --git a/src/components/features/bsideManager.vue b/src/components/features/bsideManager.vue
index 697e330..77bbbd5 100644
--- a/src/components/features/bsideManager.vue
+++ b/src/components/features/bsideManager.vue
@@ -185,6 +185,8 @@ import { hasNullOrEmptyPropertyWithTypeof } from "../../utils/hasNullOrEmptyProp
const bsideManagerActive = bsideManagerActiveStore();
+const emit = defineEmits(["reloadRecord"]);
+
const editSelectHold = {
single: "编辑",
label: "编辑信息"
@@ -400,6 +402,9 @@ const requestOperate = () => {
type: "success",
});
bsideManager();
+ if (operate.value == "unBindingSN") {
+ emit("reloadRecord");
+ }
} else {
ElMessage.error(`${operateType}失败!`);
}
diff --git a/src/components/features/historyMsg.vue b/src/components/features/historyMsg.vue
index c356d8d..7e38be0 100644
--- a/src/components/features/historyMsg.vue
+++ b/src/components/features/historyMsg.vue
@@ -86,7 +86,7 @@
plain
disabled
>
- {{ scope.row.original_msg.length/2 }}个字节
+ {{ scope.row.original_msg.slice(104, scope.row.original_msg.length).length / 2 }}个字节