From 366612bd8e8b88d02a98edf508f96d7add23ff9f Mon Sep 17 00:00:00 2001 From: pengwei <2071057782@qq.com> Date: 星期日, 27 四月 2025 16:03:38 +0800 Subject: [PATCH] 功能新增 --- 项目代码/伸缩杆/client/src/views/tts/AlarmReset/AlarmReset.vue | 135 ++++++++ 项目代码/伸缩杆/client/src/api/newapi/Parameters.js | 6 项目代码/可视化大屏/client/src/api/newapi/Maintenance.js | 2 项目代码/伸缩杆/client/src/views/tts/PickAndDrop/Manualcontrol.vue | 220 ++++++++++--- 项目代码/伸缩杆/client/src/router/viewGird.js | 40 -- 项目代码/client/src/views/tts/TheCurrentJob/Startjob.vue | 2 项目代码/伸缩杆/client/src/layout/index.vue | 11 项目代码/可视化大屏/client/src/views/Index.vue | 208 ++++++++++-- 项目代码/client/src/api/newapi/Putake.js | 5 项目代码/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue | 50 +++ 项目代码/伸缩杆/client/src/views/system/Sys_User.vue | 4 项目代码/伸缩杆/client/src/views/Index.vue | 40 -- 项目代码/伸缩杆/client/src/api/newapi/AlarmReset.js | 4 项目代码/伸缩杆/client/src/views/tts/Enteroverhaul/Enteroverhaul.vue | 100 ++++- 项目代码/可视化大屏/client/src/assets/imgs/下一个.png | 0 项目代码/伸缩杆/client/src/views/tts/PickAndDrop/PickAndDrop.vue | 107 ++++- 项目代码/可视化大屏/client/src/layout/index.vue | 13 17 files changed, 713 insertions(+), 234 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/api/newapi/Putake.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/api/newapi/Putake.js" index 7314231..69f7335 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/api/newapi/Putake.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/api/newapi/Putake.js" @@ -12,4 +12,7 @@ //鏁版嵁璁板綍 export const Add = (data) => http.post("api/Putake/Add", data); -//鏁版嵁璁板綍鏌ョ湅璇︽儏 \ No newline at end of file +//濂楃瓛寮�闂� +export const ChanegOpenDoor = (data) => http.post(`/api/Putake/OpenDoor?group=${data}`); +//濂楃瓛鍏抽棬 +export const ChanegCloseDoor = (data) => http.post(`/api/Putake/ClosedDoor?group=${data}`); \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" index ff362d2..a75c2b2 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" @@ -1047,7 +1047,7 @@ clearInterval(timer.value); // 鍒涘缓WebSocket杩炴帴 //"ws://127.0.0.1:9295/admin" - client.value = new WebSocket("ws://115.159.85.185:9098/"); + client.value = new WebSocket("ws://115.159.85.185:5173/"); client.value.onopen = function () { console.log("WebSocket 杩炴帴鎴愬姛"); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" index 8118f15..44ab94d 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" @@ -94,6 +94,20 @@ <el-button size="small" style="height: 2rem" @click="resetQuery" >閲嶇疆</el-button > + <el-button + @click="opendoor" + type="primary" + size="small" + style="margin-left: 0.98rem; height: 2rem" + >濂楃瓛鏌滃紑闂�</el-button + > + <el-button + @click="closeDoor" + type="primary" + size="small" + style="margin-left: 0.98rem; height: 2rem" + >濂楃瓛鏌滃叧闂�</el-button + > </div> <div class="btns"> <div style="display: flex; align-items: center"> @@ -713,6 +727,7 @@ GetPageDataNew, } from "@/api/newapi/Thecurrentjob"; import { GetSleeveandStep } from "@/api/newapi/Process"; +import { ChanegOpenDoor, ChanegCloseDoor } from "@/api/newapi/Putake"; import { GetUserInfo } from "@/api/user"; const router = useRouter(); @@ -871,8 +886,6 @@ userId: JSON.parse(localStorage.getItem("user")).id, group: isactive.value, }; - console.log(obj); - // GetPageDataNew(obj).then((res) => { // tableData.value = res.data; // pageTotal.value = res.data.length; @@ -974,6 +987,39 @@ }); }; +const opendoor = () => { + ChanegOpenDoor(isactive.value).then((res) => { + if (res.status == true) { + ElMessage({ + message: "寮�闂ㄦ垚鍔�", + type: "success", + }); + } else { + ElMessage({ + message: res.msg, + type: "error", + }); + } + }); + initData(); +}; +const closeDoor = () => { + ChanegCloseDoor(isactive.value).then((res) => { + if (res.status == true) { + ElMessage({ + message: "鍏抽棬鎴愬姛", + type: "success", + }); + } else { + ElMessage({ + message: res.msg, + type: "error", + }); + } + }); + initData(); +}; + //鏁版嵁鍒濆鍖� onMounted(() => { initData(); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/AlarmReset.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/AlarmReset.js" new file mode 100644 index 0000000..12ed599 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/AlarmReset.js" @@ -0,0 +1,4 @@ +import http from "../http"; + +//鐧诲綍璁板綍 +export const BecomeTrue = (data) => http.post(`/api/AlarmResetHsy/BecomeTrue`); \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/Parameters.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/Parameters.js" index 84331d6..b20b812 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/Parameters.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/api/newapi/Parameters.js" @@ -1,3 +1,7 @@ import http from "../http"; -export const AddData = (data) => http.post("/api/Parameters/AddData", data); \ No newline at end of file +export const AddData = (data) => http.post("/api/Parameters/AddData", data); +//鑷姩浼稿嚭缂╁洖 +export const AutoPickAndDrop = (data) => http.post(`/api/Parameters/automation?ExtendedState=${data.ExtendedState}`); +//鎵嬪姩浼稿嚭缂╁洖 +export const ManualOperation = (data) => http.post(`/api/Parameters/ManualOperation?position=${data.position}&ExtendedState=${data.ExtendedState}`); \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/layout/index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/layout/index.vue" index 90419ff..89385b9 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/layout/index.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/layout/index.vue" @@ -76,6 +76,17 @@ padding: 0 0.69rem 0 0; " > + <span + style=" + font-size: 1.25rem; + font-weight: bold; + color: #fff; + margin-right: 0.69rem; + cursor: pointer; + " + @click="router.push({ path: '/AlarmReset' })" + >鎶ヨ澶嶄綅</span + > <img v-if="!isFullscreen" style=" diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/router/viewGird.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/router/viewGird.js" index f517275..41eb6e9 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/router/viewGird.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/router/viewGird.js" @@ -70,36 +70,7 @@ name: "PDAAuth", component: () => import("@/views/system/PDAAuth.vue"), }, - // //宸ヨ壓涓績 - // { - // path: "/Craftcenter", - // name: "Craftcenter", - // component: () => import("@/views/tts/CraftCenter/Craftcenter.vue"), - // }, - // //浠诲姟绠$悊 - // { - // path: "/Taskmanagement", - // name: "Taskmanagement", - // component: () => import("@/views/tts/TaskManagement/Taskmanagement.vue"), - // }, - // //浠诲姟妯℃澘 - // { - // path: "/Tasktemplates", - // name: "Tasktemplates", - // component: () => import("@/views/tts/TaskManagement/Tasktemplates.vue"), - // }, - // //褰撳墠浣滀笟 - // { - // path: "/Thecurrentjob", - // name: "Thecurrentjob", - // component: () => import("@/views/tts/TheCurrentJob/Thecurrentjob.vue"), - // }, - // //寮�濮嬩綔涓� - // { - // path: "/Startjob", - // name: "Startjob", - // component: () => import("@/views/tts/TheCurrentJob/Startjob.vue"), - // }, + //鏁版嵁璁板綍 { path: "/Datalogging", @@ -142,13 +113,18 @@ name: "Enteroverhaul", component: () => import("@/views/tts/Enteroverhaul/Enteroverhaul.vue"), }, - // //鏁板瓧澶у睆 + // 鏁板瓧澶у睆 { path: "/LargeScreen", name: "LargeScreen", component: () => import("@/views/tts/LargeScreen/Largescreen.vue"), + }, + //鎶ヨ澶嶄綅 + { + path: "/AlarmReset", + name: "AlarmReset", + component: () => import("@/views/tts/AlarmReset/AlarmReset.vue"), } - ]; export default viewgird; \ No newline at end of file diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/Index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/Index.vue" index a315f72..3845297 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/Index.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/Index.vue" @@ -73,26 +73,6 @@ <img src="@/assets/index/icon/icon6.png" alt="" /> </div> </div> - <!-- <div - class="item" - style="background-color: #78909c" - @click="router.push('/Basicinformation')" - > - <span>鍩虹淇℃伅</span> - <div class="count"> - <img src="@/assets/index/icon/icon6.png" alt="" /> - </div> - </div> - <div - class="item" - style="background-color: #2200de" - @click="router.push('/Largescreen')" - > - <span>鏁板瓧澶у睆</span> - <div class="count"> - <img src="@/assets/index/icon/icon6.png" alt="" /> - </div> - </div> --> </div> </div> <div v-else class="mian_mobile"> @@ -139,26 +119,6 @@ <img src="@/assets/index/icon/icon3.png" alt="" /> </div> </div> - <!-- <div - class="item" - style="background-color: #78909c" - @click="router.push('/Basicinformation')" - > - <span>鍩虹淇℃伅</span> - <div class="count"> - <img src="@/assets/index/icon/icon6.png" alt="" /> - </div> - </div> - <div - class="item" - style="background-color: #2200de" - @click="router.push('/Largescreen')" - > - <span>鏁板瓧澶у睆</span> - <div class="count"> - <img src="@/assets/index/icon/icon6.png" alt="" /> - </div> - </div> --> </div> <div class="main_c"> <div diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/system/Sys_User.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/system/Sys_User.vue" index 2ce9daa..b8a9cf3 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/system/Sys_User.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/system/Sys_User.vue" @@ -404,7 +404,7 @@ import { GetPageDataApi, GetAddUserApi, - UpdateUserApi, + Upuserbase, DelApi, } from "@/api/user.js"; import { GetRoleInfo } from "@/api/role.js"; @@ -620,7 +620,7 @@ return ElMessage({ message: "涓ゆ瀵嗙爜涓嶄竴鑷�", type: "error" }); if (formUser.value.userId != undefined) { const formData = objToFormData(formUser.value); - UpdateUserApi(formData).then((res) => { + Upuserbase(formData).then((res) => { ElMessage({ message: res.message, type: "success" }); drawer.open = false; reset(); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/AlarmReset/AlarmReset.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/AlarmReset/AlarmReset.vue" new file mode 100644 index 0000000..a57dfc3 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/AlarmReset/AlarmReset.vue" @@ -0,0 +1,135 @@ +<template> + <div class="AlarmReset"> + <div style="width: 100%; text-align: center; font-size: 5rem; color: #fff"> + 鎶ヨ澶嶄綅 + </div> + <div style="margin-top: 3rem"> + <el-table :data="tableData" style="width: 100%" height="800"> + <el-table-column prop="Id" label="搴忓彿" /> + <el-table-column prop="AlarmContent" label="鎶ヨ鍐呭" /> + <el-table-column prop="ResetStatus" label="澶嶄綅鐘舵��" /> + <el-table-column prop="AlarmTime" label="鎶ヨ鏃堕棿"> + <template #default="scope"> + {{ formatTime(scope.row.AlarmTime) }} + </template> + </el-table-column> + <el-table-column prop="ResetTime" label="澶嶄綅鏃堕棿"> + <template #default="scope"> + {{ formatTime(scope.row.ResetTime) }} + </template> + </el-table-column> + </el-table> + </div> + <div + style=" + width: 100%; + display: flex; + justify-content: center; + margin-top: 2rem; + " + > + <el-pagination + size="large" + :page-size="10" + layout="prev, pager, next" + :total="total" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + class="mt-4" + background + /> + </div> + <div + style=" + width: 100%; + display: flex; + justify-content: center; + margin-top: 4rem; + " + > + <el-button + type="primary" + style="width: 10rem; height: 3rem" + @click="handleBecomeTrue" + >鎶ヨ澶嶄綅</el-button + > + </div> + </div> +</template> +<script setup> +import { ref, onMounted, onUnmounted } from "vue"; +import { ElMessage } from "element-plus"; +import { BecomeTrue } from "@/api/newapi/AlarmReset.js"; +import { formatTime } from "@/utils/index.js"; + +const timer = ref(null); +const client = ref(null); +const tableData = ref([]); +const pageSize = ref(10); // 姣忛〉鏄剧ず鐨勬潯鏁� +const currentPage = ref(0); // 褰撳墠椤电爜 +const total = ref(0); // 鎬绘潯鏁� +const createSocket = (url) => { + clearInterval(timer.value); + // 鍒涘缓WebSocket杩炴帴 + //"ws://127.0.0.1:9295/admin" + client.value = new WebSocket("ws://192.168.0.80:5173/"); + client.value.onopen = function () { + console.log("WebSocket 杩炴帴鎴愬姛"); + }; + client.value.onmessage = function (event) { + let data = JSON.parse(event.data); + tableData.value = data.Data.slice( + currentPage.value * pageSize.value, + (currentPage.value + 1) * pageSize.value + ); + total.value = data.Data.length; // 鏇存柊鎬绘潯鏁� + console.log("WebSocket 鎺ユ敹鍒版秷鎭�", tableData.value); + }; + client.value.onclose = function () { + console.log("WebSocket 杩炴帴鍏抽棴"); + timer.value = setTimeout(createSocket, 1000); + }; + + client.value.onerror = function () {}; +}; +const handleCurrentChange = (val) => { + currentPage.value = val - 1; // 鏇存柊褰撳墠椤电爜 +}; +//澶嶄綅鎸夐挳鏂规硶 +const handleBecomeTrue = (val) => { + BecomeTrue().then((res) => { + if (res.data.code == 0) { + ElMessage({ + message: "澶嶄綅鎴愬姛", + type: "success", + }); + } else { + ElMessage({ + message: "澶嶄綅澶辫触", + type: "error", + }); + } + }); +}; + +onMounted(() => { + createSocket(); +}); + +onUnmounted(() => { + clearInterval(timer.value); + if (client.value) { + client.value.close(); + } +}); +</script> +<style lang="scss" scoped> +.AlarmReset { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + background-color: rgba(0, 0, 0, 0.2); + box-sizing: border-box; +} +</style> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/Enteroverhaul/Enteroverhaul.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/Enteroverhaul/Enteroverhaul.vue" index 94377f3..d0d552f 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/Enteroverhaul/Enteroverhaul.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/Enteroverhaul/Enteroverhaul.vue" @@ -2,59 +2,107 @@ <div class="Enteroverhaul"> <div class="btns"> <el-button class="btn" type="primary" @click="startMaintenceTask"> - <div style=" + <div + style=" display: flex; flex-direction: column; align-items: center; justify-content: center; - "> - <img style="width: 4.75rem; height: 4.75rem" src="@/assets/Enteroverhaul/start.png" alt="" /> - <span style=" + " + > + <img + style="width: 4.75rem; height: 4.75rem" + src="@/assets/Enteroverhaul/start.png" + alt="" + /> + <span + style=" color: rgba(0, 239, 248, 1); font-size: 1.25rem; margin-top: 1.6rem; - ">寮�濮嬫淇�</span> + " + >寮�濮嬫淇�</span + > </div> </el-button> - <el-button class="btn" type="primary" style="margin-left: 6.81rem" @click="stopMaintenceTask"> - <div style=" + <el-button + class="btn" + type="primary" + style="margin-left: 6.81rem" + @click="stopMaintenceTask" + > + <div + style=" display: flex; flex-direction: column; align-items: center; justify-content: center; - "> - <img style="width: 4.75rem; height: 4.75rem" src="@/assets/Enteroverhaul/pause.png" alt="" /> - <span style=" + " + > + <img + style="width: 4.75rem; height: 4.75rem" + src="@/assets/Enteroverhaul/pause.png" + alt="" + /> + <span + style=" color: rgba(0, 239, 248, 1); font-size: 1.25rem; margin-top: 1.6rem; - ">缁撴潫妫�淇�</span> + " + >缁撴潫妫�淇�</span + > </div> </el-button> </div> <div v-if="isStart" class="content_box"> - <el-table empty-text="鏆傛棤鏁版嵁" :data="tableData" style="width: 100%" :header-cell-style="{ - height: '1.61rem', - color: '#1AC8FE', - background: '#0A5B91', - fontSize: '0.88rem', - }" :cell-style="{ - color: '#fff', - background: '#147BAF', - }"> + <el-table + empty-text="鏆傛棤鏁版嵁" + :data="tableData" + style="width: 100%" + :header-cell-style="{ + height: '1.61rem', + color: '#1AC8FE', + background: '#0A5B91', + fontSize: '0.88rem', + }" + :cell-style="{ + color: '#fff', + background: '#147BAF', + }" + > <el-table-column prop="userAccount" label="鐢ㄦ埛璐﹀彿" align="center" /> <el-table-column prop="modifier" label="淇敼浜�" /> <el-table-column prop="modifyDate" label="淇敼鏃堕棿" align="center" /> - <el-table-column prop="maintenanceStatus" label="妫�淇姸鎬�" align="center"> + <el-table-column + prop="maintenanceStatus" + label="妫�淇姸鎬�" + align="center" + > <template #default="scope"> <span v-if="scope.row.maintenanceStatus === 0">鏈紑濮�</span> <span v-else-if="scope.row.maintenanceStatus === 1">杩涜涓�</span> - <span v-else-if="scope.row.maintenanceStatus === 2">宸茬粨鏉�</span></template> + <span v-else-if="scope.row.maintenanceStatus === 2" + >宸茬粨鏉�</span + ></template + > </el-table-column> - <el-table-column prop="maintenanceDate" label="娲惧彂浠诲姟鏃堕棿" align="center" /> + <el-table-column + prop="maintenanceDate" + label="娲惧彂浠诲姟鏃堕棿" + align="center" + /> - <el-table-column prop="maintenancStartTime" label="寮�濮嬫淇椂闂�" align="center" /> - <el-table-column prop="maintenancEendTime" label="缁撴潫妫�淇椂闂�" align="center" /> + <el-table-column + prop="maintenancStartTime" + label="寮�濮嬫淇椂闂�" + align="center" + /> + <el-table-column + prop="maintenancEendTime" + label="缁撴潫妫�淇椂闂�" + align="center" + /> </el-table> </div> </div> @@ -133,4 +181,4 @@ margin-top: 5.19rem; } } -</style> \ No newline at end of file +</style> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue" index 6b6b30e..e9e9859 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/Manualcontrol.vue" @@ -1,25 +1,38 @@ <template> <div class="Manualcontrol"> <div class="button"> - <el-button @click="jumpRouter('/PickAndDrop')" class="btn" type="primary" size="small" - style="width: 27.52rem; height: 4.29rem; color: rgba(255, 255, 255, 1)"> - <span class="Aspan" style="font-size: 2.25rem; text-align: center">杩斿洖</span> + <el-button + @click="jumpRouter('/PickAndDrop')" + class="btn" + type="primary" + size="small" + style="width: 27.52rem; height: 4.29rem; color: rgba(255, 255, 255, 1)" + > + <span class="Aspan" style="font-size: 2.25rem; text-align: center" + >杩斿洖</span + > </el-button> </div> <div v-if="isMobile" class="content"> <div class="content_l"> <div class="model"> <div class="model_btn"> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('宸�', '浼稿嚭')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -30,20 +43,28 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span> </el-button> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('宸�', '缂╁洖')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -54,7 +75,9 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">缂╁洖</span> </el-button> @@ -78,16 +101,22 @@ <div class="content_r"> <div class="model"> <div class="model_btn"> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('鍙�', '浼稿嚭')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -98,20 +127,28 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span> </el-button> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('鍙�', '缂╁洖')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -122,12 +159,13 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">缂╁洖</span> </el-button> </div> - </div> <div class="operate"> <div class="item">浼稿埌浣�</div> @@ -149,16 +187,22 @@ <div class="content_l"> <div class="model"> <div class="model_btn"> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('宸�', '浼稿嚭')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -169,20 +213,28 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span> </el-button> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('宸�', '缂╁洖')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -193,12 +245,16 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">缂╁洖</span> </el-button> </div> - <div style="color:#fff;font-size:2rem;margin-left:20rem">宸︿晶浼哥缉鏉�</div> + <div style="color: #fff; font-size: 2rem; margin-left: 20rem"> + 宸︿晶浼哥缉鏉� + </div> </div> <div class="operate"> <div class="item">浼稿埌浣�</div> @@ -218,16 +274,22 @@ <div class="content_r"> <div class="model"> <div class="model_btn"> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('鍙�', '浼稿嚭')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -238,20 +300,28 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span> </el-button> - <el-button type="primary" size="small" style=" + <el-button + @click="handManualOperation('鍙�', '缂╁洖')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -262,12 +332,16 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">缂╁洖</span> </el-button> </div> - <div style="color:#fff;font-size:2rem;margin-left:20rem">鍙充晶浼哥缉鏉�</div> + <div style="color: #fff; font-size: 2rem; margin-left: 20rem"> + 鍙充晶浼哥缉鏉� + </div> </div> <div class="operate"> <div class="item">浼稿埌浣�</div> @@ -290,12 +364,40 @@ <script setup> import { ref, onMounted, nextTick } from "vue"; import { useRouter } from "vue-router"; +import { ElMessage } from "element-plus"; +import { ManualOperation } from "@/api/newapi/Parameters.js"; + const router = useRouter(); const isMobile = ref(false); const jumpRouter = (path) => { router.push(path); }; +const handManualOperation = async (position, ExtendedState) => { + try { + const res = await ManualOperation({ + position: position, + ExtendedState: ExtendedState, + }); + if (res.code === 0) { + ElMessage({ + message: `${position}渚�${ExtendedState}鎴愬姛`, + type: "success", + }); + } else { + ElMessage({ + message: `${position}渚�${ExtendedState}澶辫触`, + type: "error", + }); + } + } catch (error) { + ElMessage({ + message: "鎿嶄綔澶辫触", + type: "error", + }); + } + console.log(res); +}; onMounted(() => { // 鐩戝惉绐楀彛澶у皬鍙樺寲 window.addEventListener("resize", () => { @@ -452,10 +554,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -598,10 +702,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -747,10 +853,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -893,10 +1001,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -994,4 +1104,4 @@ } } } -</style> \ No newline at end of file +</style> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/PickAndDrop.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/PickAndDrop.vue" index 5337731..213802d 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/PickAndDrop.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/PickAndDrop/PickAndDrop.vue" @@ -2,16 +2,22 @@ <div class="PickAndDrop"> <div class="button"> <div class="button_l"> - <el-button type="primary" size="small" style=" + <el-button + @click="handleAutoPickAndDrop('浼稿嚭')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -22,20 +28,28 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">浼稿嚭</span> </el-button> - <el-button type="primary" size="small" style=" + <el-button + @click="handleAutoPickAndDrop('缂╁洖')" + type="primary" + size="small" + style=" width: 14.69rem; height: 5.06rem; color: rgba(64, 253, 240, 1); background-color: rgba(6, 229, 231, 0.3); border: none; border-top: 0.25rem solid rgba(6, 229, 231, 1); - "> + " + > <div class="btnicon"> - <span style=" + <span + style=" width: 1rem; height: 1rem; display: flex; @@ -46,18 +60,28 @@ color: rgb(0, 0, 0); font-size: 0.75rem; margin-left: 0.1rem; - ">i</span> + " + >i</span + > </div> <span style="font-size: 2.25rem; text-align: center">缂╁洖</span> </el-button> </div> <div class="button_r"> - <el-button @click="jumpRouter('/Manualcontrol')" class="btn" type="primary" size="small" style=" + <el-button + @click="jumpRouter('/Manualcontrol')" + class="btn" + type="primary" + size="small" + style=" width: 27.52rem; height: 4.29rem; color: rgba(255, 255, 255, 1); - "> - <span class="Aspan" style="font-size: 2.25rem; text-align: center">鎵嬪姩鎺у埗</span> + " + > + <span class="Aspan" style="font-size: 2.25rem; text-align: center" + >鎵嬪姩鎺у埗</span + > </el-button> </div> </div> @@ -138,13 +162,30 @@ <script setup> import { ref, onMounted, nextTick } from "vue"; import { useRouter } from "vue-router"; +import { ElMessage } from "element-plus"; +import { AutoPickAndDrop } from "@/api/newapi/Parameters.js"; + const router = useRouter(); const isMobile = ref(false); const jumpRouter = (path) => { router.push(path); }; - +const handleAutoPickAndDrop = async (val) => { + try { + const response = await AutoPickAndDrop({ + ExtendedState: val, + }); + if (response.code === 0) { + ElMessage.success(`${val}鎴愬姛`); + } else { + ElMessage.error(`${val}澶辫触`); + } + } catch (error) { + console.error(error); + ElMessage.error("鎿嶄綔澶辫触"); + } +}; onMounted(() => { // 鐩戝惉绐楀彛澶у皬鍙樺寲 window.addEventListener("resize", () => { @@ -305,10 +346,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -435,10 +478,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -569,10 +614,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -699,10 +746,12 @@ width: 8.75rem; height: 4.19rem; border-radius: 0.31rem; - background: linear-gradient(90deg, - rgba(0, 224, 255, 0.74) 0%, - rgba(0, 224, 255, 0.4) 60%, - rgba(235, 242, 243, 0.13) 100%); + background: linear-gradient( + 90deg, + rgba(0, 224, 255, 0.74) 0%, + rgba(0, 224, 255, 0.4) 60%, + rgba(235, 242, 243, 0.13) 100% + ); color: rgba(16, 16, 16, 1); color: rgb(255, 255, 255); font-size: 1.13rem; @@ -800,4 +849,4 @@ } } } -</style> \ No newline at end of file +</style> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/api/newapi/Maintenance.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/api/newapi/Maintenance.js" index dbda37f..fef3f97 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/api/newapi/Maintenance.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/api/newapi/Maintenance.js" @@ -7,3 +7,5 @@ //鍏佽鏁版嵁 export const RunOperation = (id, ispossible) => http.post(`/api/Maintenance/RunOperation?id=${id}&ispossible=${ispossible}`); export const ChangeTasState = (data) => http.post("/api/Maintenance/ChangeTasState", data); +// +export const UpstreamInspectionRoad = (data) => http.post("/api/AlarmResetHsy/UpstreamInspectionRoad", data); diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/assets/imgs/\344\270\213\344\270\200\344\270\252.png" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/assets/imgs/\344\270\213\344\270\200\344\270\252.png" new file mode 100644 index 0000000..22c4999 --- /dev/null +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/assets/imgs/\344\270\213\344\270\200\344\270\252.png" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/layout/index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/layout/index.vue" index 6e6e928..a9b2f81 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/layout/index.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/layout/index.vue" @@ -183,8 +183,8 @@ <router-view style=" - height: calc(100vh - 4.38rem - 1.61rem); - width: calc(100vw - 1.61rem); + height: calc(100vh - 4.38rem - 10rem); + width: calc(100vw - 10rem); " v-slot="{ Component }" > @@ -781,10 +781,11 @@ .main { width: 100%; flex: 1; - background-image: url("../assets/index/bg.png"); - background-repeat: no-repeat; - background-size: 100% 100%; - padding: 0.81rem 0.81rem; + // background-image: url("../assets/index/bg.png"); + // background-repeat: no-repeat; + // background-size: 100% 100%; + background: linear-gradient(to bottom, #0072c6, #2e6aa7); + padding: 5rem 5rem; box-sizing: border-box; } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/views/Index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/views/Index.vue" index d110129..d74fa24 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/views/Index.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\345\217\257\350\247\206\345\214\226\345\244\247\345\261\217/client/src/views/Index.vue" @@ -5,10 +5,12 @@ display: flex; justify-content: center; color: #fff; - font-size: 5rem; + font-size: 15rem; + letter-spacing: 5rem; + font-weight: bold; " > - 妫�涓�閬撴淇洃鎺� + 妫�13閬� </div> <div style=" @@ -21,53 +23,51 @@ margin-top: 3rem; " > - <span>鑲¢亾鐢垫簮鐘舵��</span> <div style=" - width: 8rem; - height: 8rem; - border-radius: 50% 50%; - margin-top: 2rem; + display: flex; + justify-content: center; + align-items: center; + width: 50%; + height: 3rem; + background-color: #95f204; + margin-top: 1rem; + border-radius: 1.5rem; " - :class="true ? 'shadow' : ''" - > - <img - style="width: 8rem; height: 8rem" - src="@/assets/TheCurrentJob/pouer.png" - alt="" - /> - </div> + ></div> </div> - <!-- <div + + <div style=" display: flex; flex-direction: column; justify-content: center; align-items: center; + height: 20rem; color: #fff; - font-size: 3rem; - + font-weight: bold; + margin-top: 5rem; + font-size: 10rem; " > - <span>绠$悊浜哄憳鐘舵��</span> - </div> --> + <span> CR400AF</span> + <span>G7237</span> + </div> + <div style=" display: flex; flex-direction: column; - justify-content: space-between; align-items: center; - margin-top: 10%; + margin-top: 6%; padding-bottom: 10%; - border: 0.15rem solid #fff; height: 70%; box-sizing: border-box; + border-radius: 2rem; + background-color: rgba(39, 136, 214, 0.5); + box-shadow: 0px 0px 1rem 0rem rgba(18, 150, 219, 0.5); " > - <span style="color: #fff; font-size: 3rem; margin-top: 2rem" - >妫�淇汉鍛樼姸鎬�</span - > - <div style=" display: flex; @@ -79,27 +79,115 @@ margin-top: 3rem; " > - <div style="color: #fff; font-size: 3rem; width: 90%"> - 姝e湪妫�淇汉鍛樻暟閲�: - <span style="font-size: 4rem">{{ totalCount }}</span - >浣� + <div style="display: flex; flex-direction: column; width: 100%"> + <div + style=" + height: 5rem; + font-size: 6rem; + font-weight: bold; + + display: flex; + align-items: center; + padding-left: 2rem; + box-sizing: border-box; + " + > + <img + style="width: 6rem; height: 6rem" + src="@/assets/imgs/涓嬩竴涓�.png" + alt="" + /> + <div + style=" + width: 30%; + text-align: justify; + text-justify: distribute-all-lines; + text-align-last: justify; + margin-left: 2rem; + color: #fff; + " + > + 鐧婚《浜烘暟 + </div> + </div> + <div + style=" + margin-left: 2rem; + display: flex; + justify-content: space-around; + align-items: center; + margin-top: 5rem; + " + > + <div + style=" + width: 40%; + font-size: 6rem; + color: #fff; + background-color: #058f66; + border-radius: 1.5rem; + padding: 0.5rem 1rem; + text-align: center; + " + > + 宸茬櫥璁� <span>2浜�</span> + </div> + <div + style=" + width: 40%; + font-size: 6rem; + color: #fff; + background-color: #d9001b; + border-radius: 1.5rem; + padding: 0.5rem 1rem; + text-align: center; + " + > + 宸茬櫥椤� <span>2浜�</span> + </div> + </div> + </div> + <div + style=" + color: #fff; + font-size: 5rem; + display: flex; + width: 90%; + justify-content: space-between; + align-items: center; + margin-top: 5rem; + " + > + <div style="color: #fff">妫�淇汉鍛樺垪琛�</div> + <div style="color: #fff"> + 姝e湪妫�淇汉鍛樻暟閲�: + <span style="font-size: 4rem">{{ totalCount }}</span + >浣� + </div> </div> <div style="width: 90%; margin-top: 2rem"> <el-table empty-text="鏆傛棤鏁版嵁" :data="tableData" style="width: 100%" + height="750" :header-cell-style="{ height: '1.61rem', - color: '#1AC8FE', - background: '#0A5B91', - fontSize: '0.88rem', + color: '#fff', + background: '#1860A8', + fontSize: '2rem', }" :cell-style="{ color: '#fff', - background: '#147BAF', + background: 'rgba(23, 87, 149, 0.9)', }" > + <el-table-column + prop="userTrueName" + label="搴忓彿" + align="center" + min-width="1%" + /> <el-table-column prop="userTrueName" label="濮撳悕" @@ -135,15 +223,38 @@ align="center" min-width="2%" /> + <el-table-column + prop="maintenanceDate" + label="涓婄嚎鏃堕棿" + align="center" + min-width="2%" + /> </el-table> + </div> + + <div + style=" + position: absolute; + bottom: 4%; + color: #fff; + font-weight: bold; + font-size: 3rem; + margin-top: 2rem; + " + > + {{ currentTime }} </div> </div> </div> </div> </template> <script setup> -import { onMounted, reactive, ref, toRef } from "vue"; -import { PersonnelMonitoring } from "@/api/newapi/Maintenance"; +import { onMounted, reactive, ref, toRef, onUnmounted } from "vue"; +import { + PersonnelMonitoring, + UpstreamInspectionRoad, +} from "@/api/newapi/Maintenance"; +import { formatTime } from "@/utils/index"; const tableData = ref([]); const pageTotal = ref(0); @@ -175,17 +286,36 @@ ).length; }); }; -onMounted(() => { +const currentTime = ref(""); +const timer = ref(null); +onMounted(async () => { + clearInterval(timer.value); initData(); + //鑾峰彇褰撳墠鏃堕棿 + const date = new Date(); + await UpstreamInspectionRoad(); + timer.value = setInterval(() => { + currentTime.value = formatTime(date, "yyyy-MM-dd hh:mm:ss"); + date.setSeconds(date.getSeconds() + 1); + }, 1000); +}); +onUnmounted(() => { + clearInterval(timer.value); }); </script> <style lang="scss" scoped> .Largescreen { display: flex; flex-direction: column; - background-color: rgba($color: #000000, $alpha: 0.2); + // background-color: rgba($color: #000000, $alpha: 0.2); .shadow { box-shadow: 0px 0px 1rem 0.5rem rgb(18, 150, 219); } } +:deep(.el-table__empty-block) { + background-color: rgba(23, 87, 149, 0.9); +} +:deep(.el-scrollbar__wrap) { + background-color: rgba(23, 87, 149, 0.9); +} </style> -- Gitblit v1.9.3