From ba8aa925e7901381ceb394adb53eca8723d1c4c5 Mon Sep 17 00:00:00 2001
From: leiqunqing <zhengqifeng@hnkhzn.com>
Date: 星期一, 19 一月 2026 11:05:49 +0800
Subject: [PATCH] 完善工位界面
---
代码管理/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue | 238 ++++++++++++----------------------------------------------
1 files changed, 51 insertions(+), 187 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue"
index 4cab5db..d7aaa15 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue"
@@ -15,37 +15,30 @@
<script>
import extend from "@/extension/basicinfo/scanStation.js";
-import { ref, defineComponent } from "vue";
+import { ref, defineComponent, onMounted } from "vue";
+import axios from "axios";
export default defineComponent({
setup() {
+ // 鍏ㄥ眬涓嬫媺鏁版嵁婧愬彉閲� - 鎵�鏈変笅鎷夋鍏辩敤锛屼竴澶勮祴鍊硷紝涓夊澶嶇敤
+ const stationEndProductList = ref([]);
+
const table = ref({
key: "id",
footer: "Foots",
cnName: "鎵弿宸ヤ綅",
name: "scanStation",
- url: "/scanStation/",
- sortName: "createDate",
+ url: "/scanStation/",
+ sortName: "createDate",
});
const editFormFields = ref({
id: "",
- stationCode: "",
+ stationCode: "",
stationName: "",
stationEndProduct: "",
- stationComponentQty: "",
- stationComponent1: "",
- stationComponent2: "",
- stationComponent3: "",
- stationComponent4: "",
- stationComponent5: "",
- stationComponent6: "",
- stationComponent7: "",
- stationComponent8: "",
- stationComponent9: "",
- stationComponent10: "",
});
-
+
const editFormOptions = ref([
[
{
@@ -53,116 +46,38 @@
field: "stationCode",
type: "input",
width: 200,
- require: true
+ require: true,
},
+ ],
+ [
{
title: "绔欏彴鍚嶇О",
field: "stationName",
type: "input",
width: 200,
- require: true
+ require: true,
},
+ ],
+ [
{
title: "绔欏彴鎴愬搧",
field: "stationEndProduct",
- type: "input",
+ type: "select",
+ data: stationEndProductList, // 缁戝畾鍏ㄥ眬鎺ュ彛鏁版嵁
width: 200,
- require: false
- }
+ require: false,
+ },
],
[
- {
- title: "闆朵欢鏁伴噺",
- field: "stationComponentQty",
- type: "input",
- width: 200,
- require: true
- },
- {
- title: "闆朵欢1",
- field: "stationComponent1",
- type: "input",
- width: 200,
- require: false
- },
- {
- title: "闆朵欢2",
- field: "stationComponent2",
- type: "input",
- width: 200,
- require: false
- }
- ],
- [
- {
- title: "闆朵欢3",
- field: "stationComponent3",
- type: "input",
- width: 200,
- require: false
- },
- {
- title: "闆朵欢4",
- field: "stationComponent4",
- type: "input",
- width: 200,
- require: false
- },
- {
- title: "闆朵欢5",
- field: "stationComponent5",
- type: "input",
- width: 200,
- require: false
- }
- ],
- [
- {
- title: "闆朵欢6",
- field: "stationComponent6",
- type: "input",
- width: 200,
- require: false
- },
- {
- title: "闆朵欢7",
- field: "stationComponent7",
- type: "input",
- width: 200,
- require: false
- },
- {
- title: "闆朵欢8",
- field: "stationComponent8",
- type: "input",
- width: 200,
- require: false
- }
- ],
- [
- {
- title: "闆朵欢9",
- field: "stationComponent9",
- type: "input",
- width: 200,
- require: false
- },
- {
- title: "闆朵欢10",
- field: "stationComponent10",
- type: "input",
- width: 200,
- require: false
- },
{
title: "涓婚敭ID",
field: "id",
type: "input",
width: 100,
hidden: true,
- readonly: true
- }
- ]
+ readonly: true,
+ },
+ ],
]);
const searchFormFields = ref({
@@ -177,7 +92,12 @@
[
{ title: "绔欏彴缂栧彿", field: "stationCode", type: "like" },
{ title: "绔欏彴鍚嶇О", field: "stationName", type: "like" },
- { title: "绔欏彴鎴愬搧", field: "stationEndProduct", type: "like" },
+ {
+ title: "绔欏彴鎴愬搧",
+ field: "stationEndProduct",
+ type: "select-search",
+ data: stationEndProductList, // 缁戝畾鍏ㄥ眬鎺ュ彛鏁版嵁
+ },
],
[
{ title: "鍒涘缓浜�", field: "creater", type: "like" },
@@ -213,84 +133,12 @@
{
field: "stationEndProduct",
title: "绔欏彴鎴愬搧",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponentQty",
- title: "闆朵欢鏁伴噺",
- type: "int",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent1",
- title: "闆朵欢1",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent2",
- title: "闆朵欢2",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent3",
- title: "闆朵欢3",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent4",
- title: "闆朵欢4",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent5",
- title: "闆朵欢5",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent6",
- title: "闆朵欢6",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent7",
- title: "闆朵欢7",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent8",
- title: "闆朵欢8",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent9",
- title: "闆朵欢9",
- type: "string",
- width: 200,
- align: "left",
- },
- {
- field: "stationComponent10",
- title: "闆朵欢10",
- type: "string",
+ type: "select",
+ bind: {
+ key: "value",
+ data: stationEndProductList, // 缁戝畾鍏ㄥ眬鎺ュ彛鏁版嵁
+ },
+ link: true,
width: 200,
align: "left",
},
@@ -332,6 +180,22 @@
key: "",
});
+ const getStationEndProductData = async () => {
+ try {
+ const res = await axios.get("/api/formula/getEndProductList");
+ stationEndProductList.value = (res.data?.data || []).map(
+ (item) => item || { key: "", value: "", disabled: false }
+ );
+ } catch (error) {
+ stationEndProductList.value = [];
+ console.error("鑾峰彇绔欏彴鎴愬搧鏁版嵁澶辫触锛�", error);
+ }
+ };
+
+ onMounted(() => {
+ getStationEndProductData();
+ });
+
return {
table,
extend,
@@ -344,4 +208,4 @@
};
},
});
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3