From bf9400d4198094194439214b5e90036b2f040052 Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期四, 24 九月 2026 16:03:10 +0800
Subject: [PATCH] bug修复,用真实数据
---
src/modules/push/views/weight.vue | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 43 insertions(+), 1 deletions(-)
diff --git a/src/modules/push/views/weight.vue b/src/modules/push/views/weight.vue
index 2581a4e..06bc4b7 100644
--- a/src/modules/push/views/weight.vue
+++ b/src/modules/push/views/weight.vue
@@ -8,6 +8,9 @@
<!-- 鍒犻櫎鎸夐挳 -->
<cl-multi-delete-btn />
<cl-flex1 />
+ <cl-filter label="涓婁紶鏃堕棿">
+ <cl-date-picker type="daterange" />
+ </cl-filter>
<!-- 鏉′欢鎼滅储 -->
<cl-search ref="Search" />
</cl-row>
@@ -33,12 +36,15 @@
name: "push-weight",
});
+import { ref } from "vue";
import { useCrud, useTable, useUpsert, useSearch } from "@cool-vue/crud";
import { useCool } from "/@/cool";
import { useI18n } from "vue-i18n";
const { service } = useCool();
const { t } = useI18n();
+
+const garbageTypeOptions = ref<{ label: string; value: string }[]>([]);
// cl-upsert
const Upsert = useUpsert({
@@ -98,6 +104,7 @@
component: { name: "cl-date-text" },
},
{ label: t("鍨冨溇绫诲瀷"), prop: "garbageType", minWidth: 120 },
+ { label: t("鍨冨溇鍒嗙被"), prop: "garbageName", minWidth: 140 },
{
label: t("鍨冨溇閲嶉噺"),
prop: "weight",
@@ -129,7 +136,34 @@
});
// cl-search
-const Search = useSearch();
+const Search = useSearch({
+ items: [
+ {
+ prop: "deviceNo",
+ component: {
+ name: "el-input",
+ props: {
+ placeholder: t("鎼滅储璁惧鍙�"),
+ clearable: true,
+ },
+ style: { width: "150px" },
+ },
+ },
+ {
+ prop: "garbageType",
+ component: {
+ name: "el-select",
+ props: {
+ placeholder: t("鍨冨溇绫诲瀷"),
+ filterable: true,
+ clearable: true,
+ },
+ options: garbageTypeOptions,
+ style: { width: "180px" },
+ },
+ },
+ ],
+});
// cl-crud
const Crud = useCrud(
@@ -137,6 +171,14 @@
service: service.push.weight,
},
(app) => {
+ service.basicdata.wastetype.list({ status: 1 }).then((res) => {
+ garbageTypeOptions.value = (res || [])
+ .filter((item: any) => item.status === 1)
+ .map((item: any) => ({
+ label: item.name,
+ value: item.code,
+ }));
+ });
app.refresh();
},
);
--
Gitblit v1.9.1