卫星通信服务平台

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 bindSNActive = bindSNActiveStore();
const emit = defineEmits(["reloadRecord"]);
const selectedUser = ref(""); const selectedUser = ref("");
const selectedSN = ref(""); const selectedSN = ref("");
const unbindUsers = ref([]); const unbindUsers = ref([]);
@@ -101,6 +103,7 @@ const resetCheckForm = () => {
}; };
const searchBindUser = () => { const searchBindUser = () => {
unbindUsers.value = [];
nextTick(() => { nextTick(() => {
$http.get($url.searchBindUser).then((res) => { $http.get($url.searchBindUser).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
@@ -109,7 +112,6 @@ const searchBindUser = () => {
userObj.value[element.account_name] = element.uid; userObj.value[element.account_name] = element.uid;
}); });
} else { } else {
unbindUsers.value = [];
resetCheckForm(); resetCheckForm();
// ElMessage.error("未查找到相关数据!"); // ElMessage.error("未查找到相关数据!");
} }
@@ -118,6 +120,7 @@ const searchBindUser = () => {
}; };
const searchBindSN = () => { const searchBindSN = () => {
unbindSN.value = [];
nextTick(() => { nextTick(() => {
$http.get($url.searchBindSN).then((res) => { $http.get($url.searchBindSN).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
@@ -125,7 +128,6 @@ const searchBindSN = () => {
unbindSN.value.push(element); unbindSN.value.push(element);
}); });
} else { } else {
unbindSN.value = [];
resetCheckForm(); resetCheckForm();
// ElMessage.error("未查找到相关数据!"); // ElMessage.error("未查找到相关数据!");
} }
@@ -133,6 +135,11 @@ const searchBindSN = () => {
}); });
}; };
const resetList = () => {
unbindUsers.value = [];
unbindSN.value = [];
};
const bindSN = () => { const bindSN = () => {
if (selectedUser.value === "" || selectedSN.value === "") { if (selectedUser.value === "" || selectedSN.value === "") {
ElMessage.warning("请选择用户和SN号!"); ElMessage.warning("请选择用户和SN号!");
@@ -151,8 +158,8 @@ const bindSN = () => {
message: "绑定成功!", message: "绑定成功!",
type: "success", type: "success",
}); });
unbindUsers.value = []; resetList();
unbindSN.value = []; emit("reloadRecord");
} else { } else {
ElMessage.error("绑定失败!"); ElMessage.error("绑定失败!");
} }

View File

@@ -185,6 +185,8 @@ import { hasNullOrEmptyPropertyWithTypeof } from "../../utils/hasNullOrEmptyProp
const bsideManagerActive = bsideManagerActiveStore(); const bsideManagerActive = bsideManagerActiveStore();
const emit = defineEmits(["reloadRecord"]);
const editSelectHold = { const editSelectHold = {
single: "编辑", single: "编辑",
label: "编辑信息" label: "编辑信息"
@@ -400,6 +402,9 @@ const requestOperate = () => {
type: "success", type: "success",
}); });
bsideManager(); bsideManager();
if (operate.value == "unBindingSN") {
emit("reloadRecord");
}
} else { } else {
ElMessage.error(`${operateType}失败!`); ElMessage.error(`${operateType}失败!`);
} }

View File

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

View File

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

View File

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