Browse Source

Merge branch 'master' of ssh://www.yixzm.cn:22022/Dim5-ideal/bj-maritime-dcds

Luka 5 days ago
parent
commit
4d64199396

+ 22 - 22
frontend/package.json

@@ -15,48 +15,48 @@
         "@vueup/vue-quill": "1.1.0",
         "@vueuse/core": "9.5.0",
         "@wangeditor/editor-for-vue": "^5.1.12",
-        "@zeronejs/utils": "^1.4.0",
+        "@zeronejs/utils": "^1.4.2",
         "axios": "0.27.2",
         "crypto-js": "^4.2.0",
-        "dayjs": "^1.11.11",
+        "dayjs": "^1.11.18",
         "echarts": "5.4.0",
-        "element-china-area-data": "^6.0.2",
+        "element-china-area-data": "^6.1.0",
         "element-plus": "2.2.27",
         "file-saver": "2.0.5",
         "fuse.js": "6.6.2",
-        "jodit": "^4.0.18",
+        "jodit": "^4.6.2",
         "js-cookie": "3.0.1",
         "jsencrypt": "3.3.1",
         "lodash": "^4.17.21",
         "nprogress": "0.2.0",
         "pinia": "2.0.22",
-        "terser": "^5.30.0",
-        "tinymce": "^6.8.3",
+        "terser": "^5.43.1",
+        "tinymce": "^6.8.6",
         "vue": "3.2.45",
         "vue-cropper": "1.0.3",
         "vue-router": "4.1.4"
     },
     "devDependencies": {
         "@types/crypto-js": "^4.2.2",
-        "@types/file-saver": "^2.0.5",
-        "@types/js-cookie": "^3.0.2",
-        "@types/node": "^18.7.15",
-        "@types/nprogress": "^0.2.0",
-        "@typescript-eslint/eslint-plugin": "^5.36.2",
-        "@typescript-eslint/parser": "^5.36.2",
+        "@types/file-saver": "^2.0.7",
+        "@types/js-cookie": "^3.0.6",
+        "@types/node": "^18.19.123",
+        "@types/nprogress": "^0.2.3",
+        "@typescript-eslint/eslint-plugin": "^5.62.0",
+        "@typescript-eslint/parser": "^5.62.0",
         "@vitejs/plugin-vue": "3.1.0",
-        "autoprefixer": "^10.4.8",
-        "eslint": "^8.23.0",
-        "eslint-config-prettier": "^8.5.0",
-        "eslint-plugin-vue": "^9.4.0",
-        "postcss": "^8.4.16",
+        "autoprefixer": "^10.4.21",
+        "eslint": "^8.57.1",
+        "eslint-config-prettier": "^8.10.2",
+        "eslint-plugin-vue": "^9.33.0",
+        "postcss": "^8.5.6",
         "sass": "1.56.1",
-        "tailwindcss": "^3.1.8",
-        "ts-node": "^10.9.1",
-        "tsconfig-paths": "^4.1.0",
-        "typescript": "^4.8.2",
+        "tailwindcss": "^3.4.17",
+        "ts-node": "^10.9.2",
+        "tsconfig-paths": "^4.2.0",
+        "typescript": "^4.9.5",
         "unplugin-auto-import": "0.11.4",
-        "unplugin-vue-components": "^0.22.4",
+        "unplugin-vue-components": "^0.22.12",
         "vite": "3.2.3",
         "vite-plugin-compression": "^0.5.1",
         "vite-plugin-svg-icons": "2.0.1",

+ 202 - 330
frontend/src/components/components/pageContent.vue

@@ -1,131 +1,106 @@
 <template>
-    <div class="contenBox">
-        <div class="table-action flex-b">
-            <div class="customList">{{ contentConfig.header.title ? contentConfig.header.title : '' }}</div>
-            <div class="btns">
-                <slot name="button"></slot>
-            </div>
-        </div>
-        <el-table :data="pageList" style="width: 100%; max-height: 55vh; overflow: auto"
-            @selection-change="handleSelectionChange" ref="multipleTableRef" v-bind="props.contentConfig?.tableProps"
-            :row-key="getRowKeys" v-loading="loading">
-            <template v-for="item in contentConfig.propsList">
-                <!-- 序号 -->
-                <el-table-column :fixed="item.fixed" v-if="item.type === 'index'" type="index" :key="item.prop" center>
-                </el-table-column>
-                <!-- 选择 -->
-                <el-table-column :fixed="item.fixed" type="selection" width="55" align="center" :key="item.prop"
-                    v-if="item.type === 'selection'" :reserve-selection="true" />
-                <!-- 操作类 -->
-                <el-table-column :key="item" :fixed="item.fixed" align="center" v-bind="item"
-                    v-else-if="item.type === 'handler'">
-                    <template #default="scope">
-                        <slot :name="item.slotName" v-bind="scope"></slot>
-                    </template>
-                </el-table-column>
+	<div class="contenBox">
+		<div class="table-action flex-b">
+			<div class="customList">{{ contentConfig.header.title ? contentConfig.header.title : '' }}</div>
+			<div class="btns">
+				<slot name="button"></slot>
+			</div>
+		</div>
+		<el-table
+			:data="pageList"
+			style="width: 100%; max-height: 55vh; overflow: auto"
+			@selection-change="handleSelectionChange"
+			ref="multipleTableRef"
+			v-bind="props.contentConfig?.tableProps"
+			:row-key="getRowKeys"
+			v-loading="loading"
+		>
+			<template v-for="item in contentConfig.propsList">
+				<!-- 序号 -->
+				<el-table-column
+					:fixed="item.fixed"
+					v-if="item.type === 'index'"
+					type="index"
+					:key="item.prop"
+					center
+				>
+				</el-table-column>
+				<!-- 选择 -->
+				<el-table-column
+					:fixed="item.fixed"
+					type="selection"
+					width="55"
+					align="center"
+					:key="item.prop"
+					v-if="item.type === 'selection'"
+					:reserve-selection="true"
+				/>
+				<!-- 操作类 -->
+				<el-table-column
+					:key="item"
+					:fixed="item.fixed"
+					align="center"
+					v-bind="item"
+					v-else-if="item.type === 'handler'"
+				>
+					<template #default="scope">
+						<slot :name="item.slotName" v-bind="scope"></slot>
+					</template>
+				</el-table-column>
 
-                <!-- 自定义类 -->
-                <el-table-column show-overflow-tooltip :fixed="item.fixed" :key="item.label"
-                    v-else-if="item.type === 'custom'" :label="item.label" :width="item.width" :prop="item.prop"
-                    :sortable="item.sortable || false" :column-key="item.prop">
-                    <template #default="scope">
-                        <slot :name="item.slotName" v-bind="scope"></slot>
-                    </template>
-                </el-table-column>
-                <!-- 时间类 -->
-                <el-table-column show-overflow-tooltip :fixed="item.fixed" :key="item.label"
-                    v-else-if="item.type === 'time'" align="center" :label="item.label" :width="item.width">
-                    <template #default="scope">
-                        {{ parseTime(scope.row[item.prop]) }}
-                    </template>
-                </el-table-column>
-                <!-- 普通渲染类 -->
-                <el-table-column :fixed="item.fixed" show-overflow-tooltip v-else-if="item.type === 'normal'"
-                    :key="item.label" v-bind="item" :prop="item.prop" :sortable="item.sortable || false"
-                    :column-key="item.prop" />
-                <!-- 倒序类 -->
-                <el-table-column :fixed="item.fixed" show-overflow-tooltip v-else-if="item.type === 'sortable'"
-                    :key="item.label" sortable v-bind="item" />
-            </template>
-        </el-table>
-        <div class="flex-b">
-            <div v-if="contentConfig.moneyTotal">
-                <div class="flex" v-if="contentConfig.moneyTotalType === false">
-                    <div class="footSlotStyle mr10">小计:</div>
-                    <div class="footSlotStyle mr20" v-if="!contentConfig.customSubtotal">
-                        数量 {{ subNumber || 0 }}
-                        张
-                    </div>
-                    <div class="footSlotStyle mr20" v-else>数量 {{ subtotalNum || 0 }}</div>
-                    <slot name="subtotalSlot"></slot>
-                </div>
-                <div v-else class="flex">
-                    <div class="footSlotStyle mr10">小计:</div>
-                    <div class="footSlotStyle mr20" v-if="!contentConfig.customSubtotal">
-                        费用金额 {{ subtotal || 0 }}元
-                    </div>
-                    <div class="footSlotStyle mr20" v-else>费用金额 {{ subtotalNum || 0 }}元</div>
-                    <slot name="subtotalSlot"></slot>
-                </div>
-                <div v-if="contentConfig.moneyTotalType === false" class="flex">
-                    <div class="footSlotStyle mr10">总计:</div>
-                    <div class="footSlotStyle mr20">数量 {{ resDate.moneyTotal || 0 }} 张</div>
-                    <slot name="totalSlot"></slot>
-                </div>
-                <div v-else class="flex">
-                    <div class="footSlotStyle mr10">总计:</div>
-                    <div class="footSlotStyle mr20">费用金额 {{ resDate.moneyTotal || 0 }} 元</div>
-                    <slot name="totalSlot"></slot>
-                </div>
-            </div>
-            <div v-else-if="contentConfig.energyMonery">
-                <div class="flex">
-                    <div class="footSlotStyle mr10">小计:</div>
-                    <div class="footSlotStyle mr20 energyClass">
-                        <div class="itemName">电:{{ electricity || 0 }}</div>
-                        <div class="itemName">水:{{ water || 0 }}</div>
-                        <div class="itemName">气:{{ gas || 0 }}</div>
-                    </div>
-                    <slot name="subtotalSlot"></slot>
-                </div>
-                <div class="flex">
-                    <div class="footSlotStyle mr10">总计:</div>
-                    <div class="footSlotStyle mr20 energyClass">
-                        <div class="itemName">电:{{ electricityTotalPrice || 0 }}</div>
-                        <div class="itemName">水:{{ waterTotalPrice || 0 }}</div>
-                        <div class="itemName">气:{{ gasTotalPrice || 0 }}</div>
-                    </div>
-                    <slot name="totalSlot"></slot>
-                </div>
-            </div>
-            <!-- 其他/能耗费用计算 -->
-            <div style="width: 60%;" v-else-if="contentConfig.energyConsumption">
-                <div class="flex" v-if="contentConfig.energyConsumptionType === false">
-                    <div class="footSlotStyle mr10">能耗总量:</div>
-                    <div class="footSlotStyle mr20 energyClass">
-                        <div class="itemName" v-for="(item, index) in rowDate.value" :key="index">{{ item.energyName
-                        }}:{{
-                                item.dosage || 0 }}
-                        </div>
-
-                    </div>
-                </div>
-                <div class="flex" v-else>
-                    <div class="footSlotStyle mr10">能耗总量:</div>
-                    <div class="footSlotStyle mr20 energyClass">
-                        <div class="itemName">电:{{ electricityDosage || 0 }}</div>
-                        <div class="itemName">水:{{ waterDosage || 0 }}</div>
-                        <div class="itemName">气:{{ gasDosage || 0 }}</div>
-                    </div>
-                </div>
-            </div>
-            <div class="flex" v-else></div>
-            <el-pagination class="mt10" v-model:current-page="systemStore.pageInfo.pageNum"
-                v-model:page-size="systemStore.pageInfo.pageSize" :page-sizes="sizes" :small="false" :disabled="false"
-                :background="true" layout="total, sizes, prev, pager, next, jumper" :total="pageTotalCount"
-                @size-change="onPageSizeChange" @current-change="onPageChange" />
-        </div>
-    </div>
+				<!-- 自定义类 -->
+				<el-table-column
+					show-overflow-tooltip
+					:fixed="item.fixed"
+					:key="item.label"
+					v-else-if="item.type === 'custom'"
+					:label="item.label"
+					:width="item.width"
+					:prop="item.prop"
+					:sortable="item.sortable || false"
+					:column-key="item.prop"
+				>
+					<template #default="scope">
+						<slot :name="item.slotName" v-bind="scope"></slot>
+					</template>
+				</el-table-column>
+				<!-- 时间类 -->
+				<el-table-column
+					show-overflow-tooltip
+					:fixed="item.fixed"
+					:key="item.label"
+					v-else-if="item.type === 'time'"
+					align="center"
+					:label="item.label"
+					:width="item.width"
+				>
+					<template #default="scope">
+						{{ parseTime(scope.row[item.prop]) }}
+					</template>
+				</el-table-column>
+				<!-- 普通渲染类 -->
+				<el-table-column
+					:fixed="item.fixed"
+					show-overflow-tooltip
+					v-else-if="item.type === 'normal'"
+					:key="item.label"
+					v-bind="item"
+					:prop="item.prop"
+					:sortable="item.sortable || false"
+					:column-key="item.prop"
+				/>
+				<!-- 倒序类 -->
+				<el-table-column
+					:fixed="item.fixed"
+					show-overflow-tooltip
+					v-else-if="item.type === 'sortable'"
+					:key="item.label"
+					sortable
+					v-bind="item"
+				/>
+			</template>
+		</el-table>
+	</div>
 </template>
 
 <script setup lang="ts" name="content">
@@ -134,85 +109,70 @@ import { parseTime } from '@/utils/ruoyi';
 import useUserStore from '@/store/modules/user';
 const userStore = useUserStore().userInfo.userName === 'admin' ? '' : useUserStore().userInfo.userId;
 import { ref, watch } from 'vue';
-// import { ElTable } from 'element-plus';
-import { useSharedValueStore } from './sharedValueStore';
-
 const props = withDefaults(
-    defineProps<{
-        contentConfig: {
-            pageName: string;
-            status: string;
-            createUser: string;
-            oneself: number;
-            header: {
-                title: string;
-            };
-            tableProps: any;
-            propsList: any[];
-            pageListParams?: {};
-            moneyTotal?: boolean;
-            energyConsumption?: boolean;
-            energyConsumptionType?: boolean;
-            energyMonery?: boolean;
-            moneyTotalType?: boolean;
-            customSubtotal?: boolean;
-        };
-        sizes?: number[];
-        showSummary?: boolean;
-        summaryMethod?: () => any;
-        subtotalNum?: number;
-    }>(),
-    {
-        sizes: [10, 50, 100, 300, 500],
-        customSubtotal: false,
-    }
+	defineProps<{
+		contentConfig: {
+			pageName: string;
+			status: string;
+			createUser: string;
+			oneself: number;
+			header: {
+				title: string;
+			};
+			tableProps: any;
+			propsList: any[];
+			pageListParams?: {};
+			moneyTotal?: boolean;
+			energyConsumption?: boolean;
+			energyConsumptionType?: boolean;
+			energyMonery?: boolean;
+			moneyTotalType?: boolean;
+			customSubtotal?: boolean;
+		};
+		sizes?: number[];
+		showSummary?: boolean;
+		summaryMethod?: () => any;
+		subtotalNum?: number;
+	}>(),
+	{
+		sizes: [10, 50, 100, 300, 500],
+		customSubtotal: false,
+	}
 );
 const emit = defineEmits(['handleSelect', 'pageChanged']);
 const loading = ref(true);
 
 // 请求数据
 const systemStore = useSystemStore();
-// const pageNum = ref(1);
-// const pageSize = ref(10);
-
-const sharedValueStore = useSharedValueStore();
-const sharedValue = computed(() => sharedValueStore.sharedValue);
 
 // 获取列表
 async function fetchPageListData(queryInfo: any = {}) {
-    loading.value = true;
-    // const pageNumber = pageNum.value;
-    // const pageSizeValue = pageSize.value;
-    // 2.发生网络请求
-    await systemStore
-        .getPageListDataAction(props.contentConfig.pageName, {
-            pageNum: systemStore.pageInfo.pageNum,
-            pageSize: systemStore.pageInfo.pageSize,
-            userId: userStore,
-            status: props.contentConfig.status,
-            createUser: props.contentConfig.createUser,
-            oneself: props.contentConfig.oneself,
-            ...queryInfo,
-            ...props.contentConfig.pageListParams,
-        })
-        .then(res => {
-            loading.value = false;
-        });
+	loading.value = true;
+	await systemStore
+		.getPageListDataAction(props.contentConfig.pageName, {
+			pageNum: systemStore.pageInfo.pageNum,
+			pageSize: systemStore.pageInfo.pageSize,
+			userId: userStore,
+			status: props.contentConfig.status,
+			createUser: props.contentConfig.createUser,
+			oneself: props.contentConfig.oneself,
+			...queryInfo,
+			...props.contentConfig.pageListParams,
+		})
+		.then(res => {
+			loading.value = false;
+		});
 }
 
 fetchPageListData();
 systemStore.$onAction(arg => {
-    if (arg.name === 'newPageDataAction' || arg.name === 'deletePageDataAction') {
-        // pageNum.value = 1;
-        // pageSize.value = 10;
-        systemStore.pageInfo.pageNum = 1;
-        systemStore.pageInfo.pageSize = 50;
-    }
+	if (arg.name === 'newPageDataAction' || arg.name === 'deletePageDataAction') {
+		systemStore.pageInfo.pageNum = 1;
+		systemStore.pageInfo.pageSize = 50;
+	}
 });
 
-// 2.展示数据
 const { pageList, pageTotalCount, resDate } = storeToRefs(systemStore);
-// 监听列表数据变化清空选择器
 const multipleTableRef = ref();
 let subtotal = ref(0 as any);
 let subNumber = ref(0 as any);
@@ -225,182 +185,94 @@ const electricityTotalPrice = ref();
 const gasTotalPrice = ref();
 const waterTotalPrice = ref();
 watch(
-    () => resDate,
-    (newValue: any) => {
-        if (props.contentConfig?.energyConsumption === true) {
-            if (props.contentConfig?.energyConsumptionType === false) {
-                rowDate.value = newValue._object.resDate.otherEnergyList
-            } else {
-                electricityDosage.value = newValue._object.resDate.electricityDosage
-                gasDosage.value = newValue._object.resDate.gasDosage
-                waterDosage.value = newValue._object.resDate.waterDosage
-            }
-        } if (props.contentConfig?.energyMonery === true) {
-            electricityTotalPrice.value = newValue._object.resDate.electricityDosage
-            gasTotalPrice.value = newValue._object.resDate.gasDosage
-            waterTotalPrice.value = newValue._object.resDate.waterDosage
-        }
-
-    },
-    { deep: true }
+	() => resDate,
+	(newValue: any) => {
+		if (props.contentConfig?.energyConsumption === true) {
+			if (props.contentConfig?.energyConsumptionType === false) {
+				rowDate.value = newValue._object.resDate.otherEnergyList;
+			} else {
+				electricityDosage.value = newValue._object.resDate.electricityDosage;
+				gasDosage.value = newValue._object.resDate.gasDosage;
+				waterDosage.value = newValue._object.resDate.waterDosage;
+			}
+		}
+		if (props.contentConfig?.energyMonery === true) {
+			electricityTotalPrice.value = newValue._object.resDate.electricityDosage;
+			gasTotalPrice.value = newValue._object.resDate.gasDosage;
+			waterTotalPrice.value = newValue._object.resDate.waterDosage;
+		}
+	},
+	{ deep: true }
 );
 watch(
-    () => pageList,
-    (newValue: any) => {
-        if (clearFlag.value) {
-            multipleTableRef.value!.clearSelection();
-            subtotal.value = 0;
-            subNumber.value = 0;
-        }
-        // 控制是否清空所选项
-        clearFlag.value = true;
-        // pageList.value.forEach((item: any) => {
-        //     subtotal.value += item.moneyTotal;
-        // });
-        // subtotal.value = Number(subtotal.value.toFixed(2)).toFixed(2);
-    },
-    { deep: true }
+	() => pageList,
+	(newValue: any) => {
+		if (clearFlag.value) {
+			multipleTableRef.value!.clearSelection();
+			subtotal.value = 0;
+			subNumber.value = 0;
+		}
+		clearFlag.value = true;
+	},
+	{ deep: true }
 );
 // 处理选中状态
 const selectedItems = ref([] as any);
 
 const getRowKeys = row => {
-    return row.checkId;
-};
-
-const echoWay = async () => {
-    await pageList.value.forEach((row: any) => {
-        if (selectedItems.value!.indexOf(row.checkId) >= 0) {
-            multipleTableRef.value!.toggleRowSelection(row, true);
-        }
-    });
-    // console.log(selectedItems.value);
+	return row.checkId;
 };
 
 // 清空多选
 function clearSelection() {
-    if (pageList) {
-        multipleTableRef.value!.clearSelection();
-    }
+	if (pageList) {
+		multipleTableRef.value!.clearSelection();
+	}
 }
-const water = ref();
-const electricity = ref();
-const gas = ref();
 // 多选框切换
 function handleSelectionChange(e: any) {
-    emit('handleSelect', e);
-    if (props.contentConfig.energyMonery) {
-        water.value = 0;
-        electricity.value = 0;
-        gas.value = 0;
-        e.forEach(item => {
-            if (item.energyType == '水') {
-                let waters = item.moneyTotal * 100; // 将金额转换为分;
-                water.value += waters;
-            } else if (item.energyType == '电') {
-                let electricitys = item.moneyTotal * 100; // 将金额转换为分;
-                electricity.value += electricitys;
-            } else if (item.energyType == '气') {
-                let gase = item.moneyTotal * 100; // 将金额转换为分;
-                gas.value += gase;
-            }
-        });
-        water.value = (water.value / 100).toFixed(2);
-        electricity.value = (electricity.value / 100).toFixed(2);
-        gas.value = (gas.value / 100).toFixed(2);
-        console.log('zheshi', water.value, electricity.value, gas.value);
-
-    } else {
-        subtotal.value = 0;
-        subNumber.value = 0;
-        selectedItems.value = [];
-        e.forEach(item => {
-            subNumber.value += item.moneyTotal;
-            let moneyTotalInCents = item.moneyTotal * 100; // 将金额转换为分
-            subtotal.value += moneyTotalInCents;
-            selectedItems.value.push(item.checkId);
-        });
-        subtotal.value = (subtotal.value / 100).toFixed(2);
-        // selectedItems.value = e.map(item => {
-        //     console.log(item.moneyTotal);
-        //     subtotal.value += item.moneyTotal;
-        //     return item.checkId;
-        // });
-        // console.log(subtotal.value);
-    }
-
+	emit('handleSelect', e);
 }
 
-// 页码变化
-async function onPageSizeChange(size: number) {
-    // 每页条数改变函数
-    // pageSize.value = size;
-    // pageNum.value = 1;
-    systemStore.pageInfo.pageSize = size;
-    systemStore.pageInfo.pageNum = 1;
-    // 控制是否清空所选项
-    clearFlag.value = false;
-    await fetchPageListData();
-    // 恢复选中状态
-    // await echoWay();
-}
-async function onPageChange(current: number) {
-    // 页码改变函数
-    systemStore.pageInfo.pageNum = current;
-    systemStore.pageInfo.pageNum = current;
-    // 控制是否清空所选项
-    clearFlag.value = false;
-    await fetchPageListData();
-    // 恢复选中状态
-    // await echoWay();
-}
-watch(
-    () => sharedValueStore.pageNum,
-    (newVal, oldVal) => {
-        // pageNum.value = 1;
-        systemStore.pageInfo.pageNum = 1;
-    },
-    { deep: true }
-);
 // 暴露函数
 defineExpose({
-    clearSelection,
-    fetchPageListData,
+	clearSelection,
+	fetchPageListData,
 });
 </script>
 
 <style scoped lang="scss">
 .contenBox {
-    padding: 15px 20px 20px 20px;
-    margin-top: 20px;
-    background-color: #fff;
+	padding: 15px 20px 20px 20px;
+	margin-top: 20px;
+	background-color: #fff;
 
-    .table-action {
-        margin-bottom: 15px;
+	.table-action {
+		margin-bottom: 15px;
 
-        button {
-            margin-right: 10px;
-        }
-    }
+		button {
+			margin-right: 10px;
+		}
+	}
 
-    .ivu-table-header thead tr th {
-        background-color: #f0f9fe;
-    }
+	.ivu-table-header thead tr th {
+		background-color: #f0f9fe;
+	}
 }
 
 .customList {
-    color: #606266;
-    font-weight: 700;
+	color: #606266;
+	font-weight: 700;
 }
 
 .itemName {
-    margin: 0 10px 5px 10px;
+	margin: 0 10px 5px 10px;
 }
 
 .energyClass {
-    display: flex;
-    align-items: center;
-    flex-wrap: wrap;
-    flex: 1;
+	display: flex;
+	align-items: center;
+	flex-wrap: wrap;
+	flex: 1;
 }
 </style>

+ 160 - 191
frontend/src/components/components/pageSearch.vue

@@ -1,54 +1,66 @@
 <template>
-    <div class="search">
-        <!-- 1.1.表单输入 -->
-        <el-form :model="searchForm" ref="formRef"
-            :label-width="searchConfig.labelWidth ? searchConfig.labelWidth : 100" size="large">
-            <el-row :gutter="16">
-                <template v-for="item in searchConfig.formItems" :key="item.prop">
-                    <el-col :span="8">
-                        <el-form-item :label="item.label" :prop="item.prop">
-                            <template v-if="item.type === 'input'">
-                                <el-input v-model="searchForm[item.prop]" :placeholder="item.placeholder" />
-                            </template>
-                            <template v-if="item.type === 'select'">
-                                <el-select v-model="searchForm[item.prop]" :placeholder="item.placeholder"
-                                    :disabled="item.disabled">
-                                    <template v-for="i in item.options" :key="i.label">
-                                        <!-- <el-option
-                                            v-if="i.hasPermi !== ''"
-                                            v-hasPermi="[i.hasPermi]"
-                                            :label="i.label"
-                                            :value="i.value"
-                                        />
-                                        <el-option v-else :label="i.label" :value="i.value" /> -->
-                                        <el-option :label="i.label" :value="i.value" />
-                                    </template>
-                                </el-select>
-                            </template>
-                            <template v-if="item.type === 'date-picker'">
-                                <el-date-picker type="daterange" range-separator="-" start-placeholder="开始时间"
-                                    end-placeholder="结束时间" v-model="searchForm[item.prop]"
-                                    @change="onDatePickerChange" />
-                            </template>
-                            <template v-if="item.type === 'date-month'">
-                                <el-date-picker v-model="searchForm[item.prop]" type="monthrange" range-separator="-"
-                                    :disabled-date="disabledDate" placeholder="请选择费用周期" start-placeholder="开始时间"
-                                    end-placeholder="结束时间" @change="getMonthDate($event, item.prop)" />
-                            </template>
-                        </el-form-item>
-                    </el-col>
-                </template>
-                <!-- 1.2.搜索按钮  -->
-                <el-col :span="spanLength" class="flex-b">
-                    <div></div>
-                    <div class="btns">
-                        <el-button size="default" @click="handleResetClick">重置</el-button>
-                        <el-button size="default" type="primary" @click="handleQueryClick">搜索</el-button>
-                    </div>
-                </el-col>
-            </el-row>
-        </el-form>
-    </div>
+	<div class="search">
+		<!-- 1.1.表单输入 -->
+		<el-form
+			:model="searchForm"
+			ref="formRef"
+			:label-width="searchConfig.labelWidth ? searchConfig.labelWidth : 100"
+			size="large"
+		>
+			<el-row :gutter="16">
+				<template v-for="item in searchConfig.formItems" :key="item.prop">
+					<el-col :span="8">
+						<el-form-item :label="item.label" :prop="item.prop">
+							<template v-if="item.type === 'input'">
+								<el-input v-model="searchForm[item.prop]" :placeholder="item.placeholder" />
+							</template>
+							<template v-if="item.type === 'select'">
+								<el-select
+									v-model="searchForm[item.prop]"
+									:placeholder="item.placeholder"
+									:disabled="item.disabled"
+								>
+									<template v-for="i in item.options" :key="i.label">
+										<el-option :label="i.label" :value="i.value" />
+									</template>
+								</el-select>
+							</template>
+							<template v-if="item.type === 'date-picker'">
+								<el-date-picker
+									type="daterange"
+									range-separator="-"
+									start-placeholder="开始时间"
+									end-placeholder="结束时间"
+									v-model="searchForm[item.prop]"
+									@change="onDatePickerChange"
+								/>
+							</template>
+							<template v-if="item.type === 'date-month'">
+								<el-date-picker
+									v-model="searchForm[item.prop]"
+									type="monthrange"
+									range-separator="-"
+									:disabled-date="disabledDate"
+									placeholder="请选择费用周期"
+									start-placeholder="开始时间"
+									end-placeholder="结束时间"
+									@change="getMonthDate($event, item.prop)"
+								/>
+							</template>
+						</el-form-item>
+					</el-col>
+				</template>
+				<!-- 1.2.搜索按钮  -->
+				<el-col :span="spanLength" class="flex-b">
+					<div></div>
+					<div class="btns">
+						<el-button size="default" @click="handleResetClick">重置</el-button>
+						<el-button size="default" type="primary" @click="handleQueryClick">搜索</el-button>
+					</div>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
 </template>
 
 <script setup lang="ts" name="page-search">
@@ -57,21 +69,21 @@ import { reactive, ref } from 'vue';
 import useSystemStore from '@/store/main';
 import useUserStore from '@/store/modules/user';
 import { parseTime } from '@/utils/ruoyi';
-import dayjs from "dayjs";
+import dayjs from 'dayjs';
 import { useSharedValueStore } from './sharedValueStore';
 
 const userStore = useUserStore().userInfo.userName === 'admin' ? '' : useUserStore().userInfo.userId;
 
 interface IProps {
-    searchConfig: {
-        pageName: string;
-        status: string;
-        createUser: string;
-        oneself: number;
-        formItems: any[];
-        labelWidth?: number;
-        pageListParams?: {};
-    };
+	searchConfig: {
+		pageName: string;
+		status: string;
+		createUser: string;
+		oneself: number;
+		formItems: any[];
+		labelWidth?: number;
+		pageListParams?: {};
+	};
 }
 const props = defineProps<IProps>();
 const emit = defineEmits(['datePickerChange', 'handleSure']);
@@ -80,7 +92,7 @@ const systemStore = useSystemStore();
 const sharedValueStore = useSharedValueStore();
 const { searchObj } = storeToRefs(systemStore);
 function updateValue(newVal: any) {
-    sharedValueStore.updateSharedValue(newVal);
+	sharedValueStore.updateSharedValue(newVal);
 }
 const pageNumValue = computed(() => sharedValueStore.pageNum);
 const pageSizeValue = computed(() => sharedValueStore.pageSize);
@@ -88,172 +100,129 @@ const pageNum = systemStore.pageInfo.pageNum;
 const pageSize = systemStore.pageInfo.pageSize;
 const energyDates = ref([]);
 // 禁用早于当前月份的选项
-const disabledDate = (date) => {
-    // 获取当前时间的年月
-    const current = new Date();
-    const currentYear = current.getFullYear();
-    const currentMonth = current.getMonth(); // 月份范围 0-11
-
-    // 传入的日期(月份选择器会传入该月的第一天,如 2023-10-01)
-    const year = date.getFullYear();
-    const month = date.getMonth();
-
-    // 判断逻辑:年份小于当前年,或同年且月份小于当前月
-    return year > currentYear || (year === currentYear && month >= currentMonth);
+const disabledDate = date => {
+	// 获取当前时间的年月
+	const current = new Date();
+	const currentYear = current.getFullYear();
+	const currentMonth = current.getMonth(); // 月份范围 0-11
+
+	// 传入的日期(月份选择器会传入该月的第一天,如 2023-10-01)
+	const year = date.getFullYear();
+	const month = date.getMonth();
+
+	// 判断逻辑:年份小于当前年,或同年且月份小于当前月
+	return year > currentYear || (year === currentYear && month >= currentMonth);
 };
 // 获取列表
 function fetchPageListData(queryInfo: any = {}) {
-
-    systemStore.pageInfo.pageNum = 1;
-    // 2.发生网络请求
-    systemStore.getPageListDataAction(props.searchConfig.pageName, {
-        pageNum: 1,
-        pageSize: pageSize,
-        userId: userStore,
-        status: props.searchConfig.status,
-        createUser: props.searchConfig.createUser,
-        oneself: props.searchConfig.oneself,
-        ...queryInfo,
-        ...props.searchConfig.pageListParams,
-    });
+	systemStore.pageInfo.pageNum = 1;
+	// 2.发生网络请求
+	systemStore.getPageListDataAction(props.searchConfig.pageName, {
+		pageNum: 1,
+		pageSize: pageSize,
+		userId: userStore,
+		status: props.searchConfig.status,
+		createUser: props.searchConfig.createUser,
+		oneself: props.searchConfig.oneself,
+		...queryInfo,
+		...props.searchConfig.pageListParams,
+	});
 }
 
 // 1.创建表单的数据
 const initialForm: any = {};
 for (const item of props.searchConfig.formItems) {
-    initialForm[item['prop']] = item['initialValue'] ?? '';
-    // if (item['prop'] === 'energyDates') {
-    //     // 1. 获取当前日期对象
-    //     const currentDate = new Date();
-    //     const lastMonthDate = new Date(
-    //         currentDate.getFullYear(),
-    //         currentDate.getMonth(), 0  // 将日期设置为0,自动跳转到上个月的最后一天
-    //     );
-    //     const year = lastMonthDate.getFullYear();
-    //     const month = String(lastMonthDate.getMonth() + 1).padStart(2, "0");
-    //     let monthDate = year + '-' + month
-    //     initialForm.energyDates = [monthDate, monthDate]
-    // }
+	initialForm[item['prop']] = item['initialValue'] ?? '';
 }
 let searchForm = reactive(initialForm);
 
 if (props.searchConfig.status !== '') {
-    // eslint-disable-next-line vue/no-setup-props-destructure
-    for (const item of props.searchConfig.formItems) {
-        if (item['prop'] === 'status') {
-            // eslint-disable-next-line vue/no-setup-props-destructure
-            searchForm[item['prop']] = props.searchConfig.status;
-        }
-    }
+	for (const item of props.searchConfig.formItems) {
+		if (item['prop'] === 'status') {
+			searchForm[item['prop']] = props.searchConfig.status;
+		}
+	}
 }
 
 // 2.监听按钮的点击
 const formRef = ref<InstanceType<typeof ElForm>>();
 function handleResetClick() {
-    // props.searchConfig.formItems.forEach(item => {
-    //     // console.log(initialForm,'这是啥');
-
-    //     initialForm[item['prop']] = '';
-    // });
-    // searchForm={};
-    formRef.value?.resetFields();
-    fetchPageListData();
-    sharedValueStore.upDatePageNum(2);
+	formRef.value?.resetFields();
+	fetchPageListData();
+	sharedValueStore.upDatePageNum(2);
 }
 
 function parseTimeWithCheck(value) {
-    // 如果已经是期望的格式(8 位数字),则直接返回
-    if (/^\d{8}$/.test(value)) {
-        return value;
-    }
-    return parseTime(value)?.slice(0, 10).replaceAll('-', '');
+	// 如果已经是期望的格式(8 位数字),则直接返回
+	if (/^\d{8}$/.test(value)) {
+		return value;
+	}
+	return parseTime(value)?.slice(0, 10).replaceAll('-', '');
 }
 async function handleQueryClick() {
-    updateValue(searchForm);
-    props.searchConfig.formItems.forEach(item => {
-        if (item.type === 'date-picker' && searchForm[item.prop]) {
-            searchForm[item.prop][0] = parseTimeWithCheck(searchForm[item.prop][0]);
-            searchForm[item.prop][1] = parseTimeWithCheck(searchForm[item.prop][1]);
-        }
-    });
-    props.searchConfig.formItems.forEach(item => {
-        if (item.type === 'date-month' && searchForm[item.prop]) {
-            // let dates: any = [];
-            // energyDates.value.map((m: any) => {
-            searchForm[item.prop][0] = dayjs(searchForm[item.prop][0]).format('YYYY-MM');
-            searchForm[item.prop][1] = dayjs(searchForm[item.prop][1]).format('YYYY-MM');
-            // dates.push(m)
-            // })
-            // searchForm[item.prop] = dates.join('/');
-        }
-    });
-    await fetchPageListData(searchForm);
-    searchObj.value = searchForm;
-    sharedValueStore.upDatePageNum(2);
-    emit('handleSure');
+	updateValue(searchForm);
+	props.searchConfig.formItems.forEach(item => {
+		if (item.type === 'date-picker' && searchForm[item.prop]) {
+			searchForm[item.prop][0] = parseTimeWithCheck(searchForm[item.prop][0]);
+			searchForm[item.prop][1] = parseTimeWithCheck(searchForm[item.prop][1]);
+		}
+	});
+	props.searchConfig.formItems.forEach(item => {
+		if (item.type === 'date-month' && searchForm[item.prop]) {
+			searchForm[item.prop][0] = dayjs(searchForm[item.prop][0]).format('YYYY-MM');
+			searchForm[item.prop][1] = dayjs(searchForm[item.prop][1]).format('YYYY-MM');
+		}
+	});
+	await fetchPageListData(searchForm);
+	searchObj.value = searchForm;
+	sharedValueStore.upDatePageNum(2);
+	emit('handleSure');
 }
 
 const spanLength = computed(() => {
-    const length = ref(0);
-    if (props.searchConfig.formItems.length % 3 === 0) {
-        length.value = 24;
-    } else if (props.searchConfig.formItems.length % 3 === 1) {
-        length.value = 16;
-    } else if (props.searchConfig.formItems.length % 3 === 2) {
-        length.value = 8;
-    }
-    return length.value;
+	const length = ref(0);
+	if (props.searchConfig.formItems.length % 3 === 0) {
+		length.value = 24;
+	} else if (props.searchConfig.formItems.length % 3 === 1) {
+		length.value = 16;
+	} else if (props.searchConfig.formItems.length % 3 === 2) {
+		length.value = 8;
+	}
+	return length.value;
 });
 
 const onDatePickerChange = (date: any) => {
-    emit('datePickerChange', date);
-};
-const getMonthDate = (ent: any, prop: any) => {
-    // let dates: any = [];
-    // ent.map((m: any) => {
-    //     m = dayjs(m).format('YYYY-MM');
-    //     dates.push(m)
-    // })
-    // let date = dates.join('/');
-    // if (prop == 'energyDate') {
-    //     searchForm.energyDate = date;
-    // }
-    // console.log(ent, prop, searchForm.energyDate, 'xxx');
-
-    // emit('datePickerChange', date);
+	emit('datePickerChange', date);
 };
+const getMonthDate = (ent: any, prop: any) => {};
 defineExpose({
-    searchForm,
-    fetchPageListData,
-    handleResetClick,
-    handleQueryClick,
+	searchForm,
+	fetchPageListData,
+	handleResetClick,
+	handleQueryClick,
 });
 </script>
 
 <style scoped lang="scss">
 .search {
-    background-color: #fff;
-    // margin-top: 20px;
-    padding-bottom: 20px;
-    border-radius: 5px;
-
-    .el-form-item {
-        padding: 15px 20px;
-        margin-bottom: 0;
-    }
-
-    .el-select--large {
-        width: 22vw;
-    }
+	background-color: #fff;
+	// margin-top: 20px;
+	padding-bottom: 20px;
+	border-radius: 5px;
+
+	.el-form-item {
+		padding: 15px 20px;
+		margin-bottom: 0;
+	}
+
+	.el-select--large {
+		width: 22vw;
+	}
 }
 
 .btns {
-    margin-top: 19px;
-    text-align: right;
-    padding-right: 20px !important;
+	margin-top: 19px;
+	text-align: right;
+	padding-right: 20px !important;
 }
-
-// .el-button {
-//     width:88px;
-//     height: 32px;
-// }</style>
+</style>