wangrong
8 天以前 72ceaa81f556c6519c97b2391871ba84729a9a6c
大部分页面增加按单位部门筛选的功能
16个文件已修改
273 ■■■■■ 已修改文件
src/modules/base/components/dept/select.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/base/locales/en.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/base/locales/zh-cn.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/base/locales/zh-tw.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/base/pages/login/en.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/basicdata/views/iot.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/basicdata/views/sorter.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/push/views/compressionweight.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/push/views/siteweight.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/push/views/vehiclegps.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/locales/zh-cn.json 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/views/dailydepartment.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/views/dailysite.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/views/dailysorter.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/views/dailyvehicle.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/report/views/screen/operation.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/base/components/dept/select.vue
@@ -12,6 +12,8 @@
            :multiple="multiple"
            :check-strictly="checkStrictly"
            :show-checkbox="multiple"
            :placeholder="placeholder"
            :clearable="clearable"
            default-expand-all
            @change="onChange"
            @check="onCheckChange"
@@ -35,7 +37,12 @@
    checkStrictly: {
        type: Boolean,
        default: true
    }
    },
    placeholder: {
        type: String,
        default: '请选择单位'
    },
    clearable: Boolean
});
const emit = defineEmits(['update:modelValue', 'change']);
src/modules/base/locales/en.json
@@ -102,6 +102,8 @@
  "键": "Key",
  "选择部门": "Select Department",
  "请选择部门": "Please Select Department",
  "按单位筛选": "Filter by Unit",
  "请选择单位": "Please Select Unit",
  "转移到新部门,是否继续?": "Transfer to a new department. Continue?",
  "转移成功": "Transfer Successful",
  "组织架构": "Organization Structure",
src/modules/base/locales/zh-cn.json
@@ -61,6 +61,8 @@
  "部门转移": "部门转移",
  "选择部门": "选择部门",
  "请选择部门": "请选择部门",
  "按单位筛选": "按单位筛选",
  "请选择单位": "请选择单位",
  "转移到新部门,是否继续?": "转移到新部门,是否继续?",
  "转移成功": "转移成功",
  "组织架构": "组织架构",
src/modules/base/locales/zh-tw.json
@@ -122,6 +122,8 @@
  "登录": "登錄",
  "选择部门": "選擇部門",
  "请选择部门": "請選擇部門",
  "按单位筛选": "按單位篩選",
  "请选择单位": "請選擇單位",
  "转移到新部门,是否继续?": "轉移到新部門,是否繼續?",
  "转移成功": "轉移成功",
  "组织架构": "組織架構",
src/modules/base/pages/login/en.json
@@ -102,6 +102,8 @@
  "键": "Key",
  "选择部门": "Select Department",
  "请选择部门": "Please Select Department",
  "按单位筛选": "Filter by Unit",
  "请选择单位": "Please Select Unit",
  "转移到新部门,是否继续?": "Transfer to a new department. Continue?",
  "转移成功": "Transfer Successful",
  "组织架构": "Organization Structure",
src/modules/basicdata/views/iot.vue
@@ -278,8 +278,34 @@
    ],
});
// 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(
src/modules/basicdata/views/sorter.vue
@@ -258,8 +258,32 @@
    ],
});
// 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(
src/modules/push/views/compressionweight.vue
@@ -197,6 +197,20 @@
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: "压缩站",
src/modules/push/views/siteweight.vue
@@ -186,8 +186,32 @@
    ],
});
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(
src/modules/push/views/vehiclegps.vue
@@ -201,8 +201,32 @@
    ]
});
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(
src/modules/report/locales/zh-cn.json
@@ -17,23 +17,23 @@
"站点名称":"站点名称",
"所属部门":"所属部门",
"总重量":"总重量",
"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",
src/modules/report/views/dailydepartment.vue
@@ -509,8 +509,26 @@
// 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({
src/modules/report/views/dailysite.vue
@@ -517,8 +517,30 @@
    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
src/modules/report/views/dailysorter.vue
@@ -170,8 +170,32 @@
    ]
});
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(
src/modules/report/views/dailyvehicle.vue
@@ -208,7 +208,7 @@
            sortable: "custom"
        },
        { label: t('平均行驶车速'), prop: "avgSpeed", minWidth: 140, sortable: "custom" },
        {
        /*{
            label: t('超速告警次数'),
            prop: "overspeedCount",
            minWidth: 140,
@@ -243,7 +243,7 @@
            prop: "offHoursMoveCount",
            minWidth: 140,
            sortable: "custom"
        },
        },*/
        {
            label: t('创建时间'),
            prop: "createTime",
@@ -271,8 +271,30 @@
    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
src/modules/report/views/screen/operation.vue
@@ -73,7 +73,7 @@
                            <div class="table__head">
                                <span>车牌</span>
                                <span>里程km</span>
                                <span>怠速分</span>
                                <span>行驶时长</span>
                                <span>超速</span>
                                <span>状态</span>
                            </div>