From ec3daa05f122738f18d4474b9257e4cf794dc5cf Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期五, 06 三月 2026 10:36:01 +0800
Subject: [PATCH] 接口新增
---
项目代码/WCS/WIDESEAWCS_Client/src/views/Home.vue | 120 ++++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 85 insertions(+), 35 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue"
index 6c406ac..4cbfd75 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/Home.vue"
@@ -1,51 +1,101 @@
<template>
- <div class="title"></div>
- <el-container>
- <!-- <el-header>鏃ュ織</el-header> -->
- <el-main>
- <el-card v-for="(log, index) in logs" :key="index" class="log-card" :style="{ color: log.color }">
- <div :style="{ color: log.color }">{{ log.logEntry }}</div>
- <div :style="{ color: log.color }">{{ log.time }}</div>
- </el-card>
- </el-main>
- </el-container>
+ <div class="container">
+ <div class="input-group">
+ <span class="label">绔欏彴锛�</span>
+ <el-select v-model="value1" placeholder="璇烽�夋嫨" style="width: 40%;">
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ <div class="input-group" style="width:50%;">
+ <span class="label">鏉$爜锛�</span>
+ <el-input v-model="input2" placeholder="璇疯緭鍏ュ唴瀹�"></el-input>
+ </div>
+ <div class="input-group">
+ <el-button type="primary" style="width: 50%;" @click="setBorot()">鍐欏叆</el-button>
+ </div>
+
+ </div>
</template>
<script>
-import { ref, onMounted } from 'vue'
-import eventBus from "@/uitils/eventBus";
-
export default {
- setup() {
- const logs = ref([]);
- onMounted(() => {
- eventBus.on('Logs', eventData => {
- if (logs.value.length > 500) {
- logs.value = [];
- }
- const logEntry = "鏃ュ織淇℃伅锛�" + eventData.log
- const time = "鏃堕棿锛�" + eventData.time
- logs.value.unshift({ logEntry: logEntry, time: time, color: eventData.color });
-
- // logs.value.unshift(logEntry);
- });
- });
+ data() {
return {
- logs
+ options: [{
+ value: '1010',
+ label: '1010'
+ }, {
+ value: '2015',
+ label: '2015'
+ }, {
+ value: '2017',
+ label: '2017'
+ }, {
+ value: '2021',
+ label: '2021'
+ }],
+ value1: '',
+ input2: '',
+ }
+ },
+ methods: {
+ setBorot() {
+ if (this.value1 == "") {
+ this.$message.error("璇烽�夋嫨瑕佸啓鍏ョ殑绔欏彴");
+ }
+ if (this.input2 == "") {
+ this.$message.error("璇烽�夋嫨瑕佸啓鍏ョ殑鏉$爜");
+ }
+ this.$confirm("鏄惁纭畾闇�瑕佸璇ョ珯鍙板啓鍏ユ潯鐮佷俊鎭紒锛侊紒", "鎻愮ず", {
+ // iconClass:"el-icon-success",//el-icon-remove鑷畾涔夊浘鏍囨牱寮�
+ confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+ cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+ // cancelBtn:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+ showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+ type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+ }).then(() => {
+ var param = {
+ DelKeys: [this.value1,this.input2],
+ Extra: true
+ }
+ this.http
+ .post("api/Task/SetPlcPalletCode",param, "鏁版嵁澶勭悊涓�...")
+ .then((x) => {
+ if (x.status) {
+ this.$Message.success('鎴愬姛.');
+ this.refresh();
+ } else {
+ return this.$error(x.message);
+ }
+ });
+ })
}
}
}
</script>
<style scoped>
-.title {
- line-height: 70vh;
- text-align: center;
- font-size: 28px;
- color: orange;
+.container {
+ font-size: 22px;
+ margin-top: 20px;
+ width: 50%;
}
-.log-card {
- margin-bottom: 10px;
+.input-group {
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+}
+
+.label {
+ min-width: 60px;
+ /* 涓烘爣绛捐缃渶灏忓搴︿繚鎸佸榻� */
+ margin-right: 10px;
+}
+
+.el-input {
+ flex: 1;
+ /* 杈撳叆妗嗗崰鎹墿浣欑┖闂� */
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3