From 73a728c441cf444d5c4d3813d7a8a5df2c01499a Mon Sep 17 00:00:00 2001 From: wxw <Administrator@DESKTOP-5BIMHQ3> Date: 星期四, 12 九月 2024 09:30:27 +0800 Subject: [PATCH] 工作台增加演示模式开关 --- Web/src/views/device/deviceInfo/index.vue | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Web/src/views/device/deviceInfo/index.vue b/Web/src/views/device/deviceInfo/index.vue index 9101e17..dc5861a 100644 --- a/Web/src/views/device/deviceInfo/index.vue +++ b/Web/src/views/device/deviceInfo/index.vue @@ -16,6 +16,10 @@ <el-switch v-model="state.boRefresh" active-text="" inactive-text="鑷埛鏂�" @change="handleSwitchChange('boRefresh', $event)"></el-switch> </el-card> + <el-card class="box-card" shadow="hover" style="margin-top: 3px;"> + <el-switch v-model="state.boDemo" active-text="" inactive-text="婕旂ず妯″紡" + @change="handleSwitchChange('boDemo', $event)"></el-switch> + </el-card> </el-collapse-item> <el-collapse-item title="鍫嗗灈鏈�" name="2"> @@ -37,9 +41,12 @@ </el-col> <el-col :span="21"> <div class="card-page"> - <el-button type="primary" :plain="floorStates.isPlain1" @click="floorTogglePlain(1)">涓�灞傚钩闈�</el-button> - <el-button type="primary" :plain="floorStates.isPlain2" @click="floorTogglePlain(2)">浜屽眰骞抽潰</el-button> - <el-button type="primary" :plain="floorStates.isPlain3" @click="floorTogglePlain(3)">涓夊眰骞抽潰</el-button> + <el-button type="primary" :plain="floorStates.isPlain1" + @click="floorTogglePlain(1)">涓�灞傚钩闈�</el-button> + <el-button type="primary" :plain="floorStates.isPlain2" + @click="floorTogglePlain(2)">浜屽眰骞抽潰</el-button> + <el-button type="primary" :plain="floorStates.isPlain3" + @click="floorTogglePlain(3)">涓夊眰骞抽潰</el-button> </div> <div style="margin: 40px; height: 50%;"> <div class="grid-container-line"> @@ -148,7 +155,9 @@ }); }); const handleSwitchChange = (field: string, value: boolean) => { - signalR.invoke('UpdateService', state.value); + const param = { [field]: value }; + debugger; + signalR.invoke('UpdateService', param); }; // 鏇存柊杈撻�佺嚎鏁版嵁鐨勯�氱敤鍑芥暟 -- Gitblit v1.8.0