This commit is contained in:
sjl
2025-03-11 18:58:39 +08:00
3 changed files with 12 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ export default class SocketService {
// let token = '4E6EF539AAF119D82AC4C2BC84FBA21F'; // let token = '4E6EF539AAF119D82AC4C2BC84FBA21F';
const url = 'ws://192.168.1.124:7777/hello?name=cdf' const url = 'ws://127.0.0.1:7777/hello?name=cdf'
this.ws = new WebSocket(url); this.ws = new WebSocket(url);
// 连接成功的事件 // 连接成功的事件
this.ws.onopen = () => { this.ws.onopen = () => {

View File

@@ -454,7 +454,7 @@ const startLoading = async () => {
ElMessage.success({message:'启动中...',duration:5000}) ElMessage.success({message:'启动中...',duration:5000})
// 启动加载逻辑 // 启动加载逻辑
controlContent.value.userPageId = 'cdf' controlContent.value.userPageId = 'cdf'
//controlContent.value.scriptId = '9ff96807cf8c7524587982ed8baa8b57' controlContent.value.scriptId = props.formControl.scriptId
controlContent.value.scriptIndex = childActiveIndex.value controlContent.value.scriptIndex = childActiveIndex.value
controlContent.value.sourceId = props.formControl.sourceId controlContent.value.sourceId = props.formControl.sourceId
setTimeout(async () => { setTimeout(async () => {
@@ -466,7 +466,7 @@ const startLoading = async () => {
const stopLoading = async () => { const stopLoading = async () => {
// 启动加载逻辑 // 启动加载逻辑
controlContent.value.userPageId = 'cdf' controlContent.value.userPageId = 'cdf'
//controlContent.value.scriptId = '9ff96807cf8c7524587982ed8baa8b57' controlContent.value.scriptId = props.formControl.scriptId
controlContent.value.scriptIndex = childActiveIndex.value controlContent.value.scriptIndex = childActiveIndex.value
controlContent.value.sourceId = props.formControl.sourceId controlContent.value.sourceId = props.formControl.sourceId
await closeSimulateTest(controlContent.value) await closeSimulateTest(controlContent.value)
@@ -480,10 +480,11 @@ const startTimeCount = () => {
// Loading效果展示 // Loading效果展示
showLoading.value = true showLoading.value = true
hour.value = 0
minute.value = 0
second.value = 0
if (!timer) { if (!timer) {
hour.value = 0
minute.value = 0
second.value = 0
timeCount.value = 0
timer = setInterval(() => { timer = setInterval(() => {
timeCount.value = timeCount.value + 1 timeCount.value = timeCount.value + 1
secondToTime(timeCount.value) secondToTime(timeCount.value)
@@ -501,6 +502,7 @@ const secondToTime = (secd: number) => {
const stopTimeCount = () => { const stopTimeCount = () => {
if (timer) { if (timer) {
clearInterval(timer) clearInterval(timer)
timer = null
} }
//Loading效果关闭 //Loading效果关闭
showLoading.value = false showLoading.value = false

View File

@@ -238,6 +238,10 @@ watch(webMsgSend, function (newValue, oldValue) {
switch (newValue.operateCode) { switch (newValue.operateCode) {
case "Source": case "Source":
ElMessage.error('源连接失败!') ElMessage.error('源连接失败!')
connectDisabeld.value = false
startDisabeld.value = true
pauseDisabled.value = true
break;
} }
break; break;
case 'server_error': case 'server_error':