| | |
| | | :multiple="multiple" |
| | | :check-strictly="checkStrictly" |
| | | :show-checkbox="multiple" |
| | | :placeholder="placeholder" |
| | | :clearable="clearable" |
| | | default-expand-all |
| | | @change="onChange" |
| | | @check="onCheckChange" |
| | |
| | | checkStrictly: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: '请选择单位' |
| | | }, |
| | | clearable: Boolean |
| | | }); |
| | | |
| | | const emit = defineEmits(['update:modelValue', 'change']); |
| | |
| | | "键": "Key", |
| | | "选择部门": "Select Department", |
| | | "请选择部门": "Please Select Department", |
| | | "按单位筛选": "Filter by Unit", |
| | | "请选择单位": "Please Select Unit", |
| | | "转移到新部门,是否继续?": "Transfer to a new department. Continue?", |
| | | "转移成功": "Transfer Successful", |
| | | "组织架构": "Organization Structure", |
| | |
| | | "部门转移": "部门转移", |
| | | "选择部门": "选择部门", |
| | | "请选择部门": "请选择部门", |
| | | "按单位筛选": "按单位筛选", |
| | | "请选择单位": "请选择单位", |
| | | "转移到新部门,是否继续?": "转移到新部门,是否继续?", |
| | | "转移成功": "转移成功", |
| | | "组织架构": "组织架构", |
| | |
| | | "登录": "登錄", |
| | | "选择部门": "選擇部門", |
| | | "请选择部门": "請選擇部門", |
| | | "按单位筛选": "按單位篩選", |
| | | "请选择单位": "請選擇單位", |
| | | "转移到新部门,是否继续?": "轉移到新部門,是否繼續?", |
| | | "转移成功": "轉移成功", |
| | | "组织架构": "組織架構", |
| | |
| | | "键": "Key", |
| | | "选择部门": "Select Department", |
| | | "请选择部门": "Please Select Department", |
| | | "按单位筛选": "Filter by Unit", |
| | | "请选择单位": "Please Select Unit", |
| | | "转移到新部门,是否继续?": "Transfer to a new department. Continue?", |
| | | "转移成功": "Transfer Successful", |
| | | "组织架构": "Organization Structure", |
| | |
| | | ], |
| | | }); |
| | | |
| | | // cl-search |
| | | const Search = useSearch(); |
| | | // cl-search:归属单位改为部门树 |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId" || items[i].prop === "departmentName") { |
| | | items.splice(i, 1); |
| | | } |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const Search = useSearch({ |
| | | plugins: [deptSearch], |
| | | }); |
| | | |
| | | // cl-crud |
| | | const Crud = useCrud( |
| | |
| | | ], |
| | | }); |
| | | |
| | | // cl-search |
| | | const Search = useSearch(); |
| | | // cl-search:所属单位改为部门树,去掉原来的文本框 |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId") items.splice(i, 1); |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const Search = useSearch({ |
| | | plugins: [deptSearch], |
| | | }); |
| | | |
| | | // cl-crud |
| | | const Crud = useCrud( |
| | |
| | | const Search = useSearch({ |
| | | items: [ |
| | | { |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }, |
| | | { |
| | | label: "站点类型", |
| | | prop: "siteType", |
| | | value: "压缩站", |
| | |
| | | ], |
| | | }); |
| | | |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId") items.splice(i, 1); |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // cl-search |
| | | const Search = useSearch(); |
| | | const Search = useSearch({ |
| | | plugins: [deptSearch], |
| | | }); |
| | | |
| | | // cl-crud |
| | | const Crud = useCrud( |
| | |
| | | ] |
| | | }); |
| | | |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId") items.splice(i, 1); |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // cl-search |
| | | const Search = useSearch(); |
| | | const Search = useSearch({ |
| | | plugins: [deptSearch], |
| | | }); |
| | | |
| | | // cl-crud |
| | | const Crud = useCrud( |
| | |
| | | "站点名称":"站点名称", |
| | | "所属部门":"所属部门", |
| | | "总重量":"总重量", |
| | | "sw60重量":"sw60重量", |
| | | "sw61重量":"sw61重量", |
| | | "sw62重量":"sw62重量", |
| | | "sw63重量":"sw63重量", |
| | | "sw64重量":"sw64重量", |
| | | "sw60重量":"有害垃圾重量", |
| | | "sw61重量":"湿垃圾重量", |
| | | "sw62重量":"可回收物重量", |
| | | "sw63重量":"大件垃圾重量", |
| | | "sw64重量":"干垃圾重量", |
| | | "总称重次数":"总称重次数", |
| | | "sw60次数":"sw60次数", |
| | | "sw61次数":"sw61次数", |
| | | "sw62次数":"sw62次数", |
| | | "sw63次数":"sw63次数", |
| | | "sw64次数":"sw64次数", |
| | | "sw60次数":"有害垃圾次数", |
| | | "sw61次数":"湿垃圾次数", |
| | | "sw62次数":"可回收物次数", |
| | | "sw63次数":"大件垃圾次数", |
| | | "sw64次数":"干垃圾次数", |
| | | "总碳排量":"总碳排量(kgCO₂e/kg)", |
| | | "sw60碳排量":"sw60碳排量", |
| | | "sw61碳排量":"sw61碳排量", |
| | | "sw62碳排量":"sw62碳排量", |
| | | "sw63碳排量":"sw63碳排量", |
| | | "sw64碳排量":"sw64碳排量", |
| | | "sw60碳排量":"有害垃圾碳排量", |
| | | "sw61碳排量":"湿垃圾碳排量", |
| | | "sw62碳排量":"可回收物碳排量", |
| | | "sw63碳排量":"大件垃圾碳排量", |
| | | "sw64碳排量":"干垃圾碳排量", |
| | | "sw62估算销售额":"sw62估算销售额", |
| | | "INIT":"INIT", |
| | | "RUNNING":"RUNNING", |
| | |
| | | // cl-search |
| | | function hideDateSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | const index = items?.findIndex(e => e.prop === "date") ?? -1; |
| | | if (index >= 0) items?.splice(index, 1); |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "date" || items[i].prop === "departmentId" || items[i].prop === "keyWord") { |
| | | items.splice(i, 1); |
| | | } |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const Search = useSearch({ |
| | |
| | | if (index >= 0) items?.splice(index, 1); |
| | | } |
| | | |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string; component?: any }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId") items.splice(i, 1); |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const Search = useSearch({ |
| | | plugins: [hideDateSearch] |
| | | plugins: [hideDateSearch, deptSearch] |
| | | }); |
| | | |
| | | // cl-crud |
| | |
| | | ] |
| | | }); |
| | | |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId") items.splice(i, 1); |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // cl-search |
| | | const Search = useSearch(); |
| | | const Search = useSearch({ |
| | | plugins: [deptSearch], |
| | | }); |
| | | |
| | | // cl-crud |
| | | const Crud = useCrud( |
| | |
| | | sortable: "custom" |
| | | }, |
| | | { label: t('平均行驶车速'), prop: "avgSpeed", minWidth: 140, sortable: "custom" }, |
| | | { |
| | | /*{ |
| | | label: t('超速告警次数'), |
| | | prop: "overspeedCount", |
| | | minWidth: 140, |
| | |
| | | prop: "offHoursMoveCount", |
| | | minWidth: 140, |
| | | sortable: "custom" |
| | | }, |
| | | },*/ |
| | | { |
| | | label: t('创建时间'), |
| | | prop: "createTime", |
| | |
| | | if (index >= 0) items?.splice(index, 1); |
| | | } |
| | | |
| | | function deptSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "departmentId") items.splice(i, 1); |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const Search = useSearch({ |
| | | plugins: [hideDateSearch] |
| | | plugins: [hideDateSearch, deptSearch] |
| | | }); |
| | | |
| | | // cl-crud |
| | |
| | | <div class="table__head"> |
| | | <span>车牌</span> |
| | | <span>里程km</span> |
| | | <span>怠速分</span> |
| | | <span>行驶时长</span> |
| | | <span>超速</span> |
| | | <span>状态</span> |
| | | </div> |