卫星通信服务平台

This commit is contained in:
2026-04-08 17:41:34 +08:00
parent 25dd1e88ba
commit 8c4ddf340d
5 changed files with 29 additions and 10 deletions

View File

@@ -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("绑定失败!");
}

View File

@@ -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}失败!`);
}

View File

@@ -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 }}个字节
</el-button>
<el-text
truncated
@@ -97,14 +97,14 @@
"
style="font-size: 1rem"
>
{{ scope.row.original_msg ? scope.row.original_msg : "解析错误" }}
{{ scope.row.original_msg ? scope.row.original_msg.slice(104, scope.row.original_msg.length) : "解析错误" }}
</el-text>
<el-button
style="font-size: 1rem; font-weight: bold"
size="small"
type="primary"
plain
@click="showAll(scope.row.original_msg)"
@click="showAll(scope.row.original_msg.slice(104, scope.row.original_msg.length))"
>
展示全部内容
</el-button>

View File

@@ -108,13 +108,13 @@
<SNManager ref="snManagerRef" />
</div>
<div v-show="subActiveIndex === '2'">
<BsideManager ref="bsideManagerRef" />
<BsideManager ref="bsideManagerRef" @reloadRecord="reloadRecord" />
</div>
<div v-show="subActiveIndex === '3'">
<Record ref="recordRef" />
</div>
<div v-show="subActiveIndex === '4'">
<BindSN ref="bindSNRef" />
<BindSN ref="bindSNRef" @reloadRecord="reloadRecord" />
</div>
</div>
</el-card>
@@ -141,6 +141,8 @@ import shortMsgActiveStore from "../../stores/shortMsg";
const historyMsgActive = historyMsgActiveStore();
const shortMsgActive = shortMsgActiveStore();
const emit = defineEmits(["getMsg"]);
const activeIndex = ref("1");
const subActiveIndex = ref("1");
const indexStyle = "background-color: rgb(241 245 249);";
@@ -172,6 +174,11 @@ const historyMsg = () => {
historyMsgRef.value.historyMsg();
};
const reloadRecord = () => {
recordRef.value.getRecord();
emit("getMsg");
};
defineExpose({ manager, color, message, created_at, historyMsg });
watch(activeIndex, (value) => {

View File

@@ -9,7 +9,7 @@
/>
</el-header>
<el-main>
<Main ref="mainRef" />
<Main ref="mainRef" @getMsg="getMsg" />
</el-main>
<el-footer class="flex" style="background-color: #f2f2f9">
<Footer />