From 09c5667700fb6da21d29c41e51fa5482a4b40bc9 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 24 十月 2025 11:22:22 +0800
Subject: [PATCH] 新公司部署相关配置修改
---
src/views/basicInformation/index.vue | 1125 +++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 753 insertions(+), 372 deletions(-)
diff --git a/src/views/basicInformation/index.vue b/src/views/basicInformation/index.vue
index 9a35c6a..040ef69 100644
--- a/src/views/basicInformation/index.vue
+++ b/src/views/basicInformation/index.vue
@@ -1,39 +1,18 @@
<template>
<div class="app-container">
- <el-form :inline="true" :model="queryParams" class="search-form">
- <el-form-item label="鎼滅储">
- <el-input
- v-model="queryParams.searchText"
- placeholder="璇疯緭鍏ュ叧閿瘝"
- clearable
- />
- </el-form-item>
- <el-form-item label="渚涘簲鍟嗗悕绉�">
- <el-input
- v-model="queryParams.supplierName"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- <el-form-item label="缁熶竴浜鸿瘑鍒彿">
- <el-input
- v-model="queryParams.identifyNumber"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- <el-form-item label="缁忚惀鍦板潃">
- <el-input
- v-model="queryParams.address"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="handleQuery">鏌ヨ</el-button>
- <el-button @click="resetQuery">閲嶇疆</el-button>
- </el-form-item>
- </el-form>
+ <el-form :inline="true" :model="queryParams" class="search-form">
+ <el-form-item v-if="shouldShowSearch" label="鎼滅储">
+ <el-input
+ v-model="queryParams.searchAll"
+ :placeholder="searchPlaceholder"
+ clearable
+ />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="search">鏌ヨ</el-button>
+ <el-button @click="resetQuery">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
<el-card>
<!-- 鏍囩椤� -->
<el-tabs
@@ -51,67 +30,117 @@
<!-- 鎿嶄綔鎸夐挳鍖� -->
<el-row :gutter="24" class="table-toolbar">
- <el-button type="primary" :icon="Plus" @click="handleAdd"
- >鏂板缓</el-button
+ <el-button :icon="Plus" type="primary" @click="handleAdd"
+ >{{activeTab == 'supplier' ? '娉ㄥ唽' : '鏂板缓'}}</el-button
>
- <el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
- <el-button type="info" :icon="Download" @click="handleExport">瀵煎嚭</el-button>
- </el-row>
+ <el-button :icon="Delete" type="danger" @click="handleDelete"
+ >鍒犻櫎</el-button
+ >
+ <el-button
+ v-show="canExport"
+ :icon="Download"
+ type="info"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ </el-row>
<!-- 琛ㄦ牸缁勪欢 -->
<div>
<data-table
- :loading="loading"
- :table-data="tableData"
- :columns="columns"
- @selection-change="handleSelectionChange"
- @edit="handleEdit"
- @delete="handleDeleteSuccess"
- :show-selection="true"
:border="true"
- :maxHeight="480"
- />
+ :columns="columns"
+ :loading="loading"
+ style="width: 100%; height: calc(100vh - 29em)"
+ :show-selection="true"
+ :table-data="tableData"
+ @edit="handleEdit"
+ @viewRow="handleView"
+ @selection-change="handleSelectionChange"
+ :operations="['edit', 'viewRow']"
+ :operationsWidth="200"
+ >
+ <!-- 瀛楁鍚嶇О鍒楃殑鑷畾涔夋彃妲� - 鏄剧ず涓烘爣绛� -->
+ <template
+ v-if="tabName === 'coalQualityMaintenance'"
+ #fieldIds="{ row }"
+ >
+ <template
+ v-if="
+ typeof row.fieldIds === 'string' && row.fieldIds.includes(',')
+ "
+ >
+ <el-tag
+ v-for="(field, index) in row.fieldIds.split(',')"
+ :key="index"
+ size="small"
+ style="margin-right: 4px; margin-bottom: 2px"
+ type="primary"
+ >
+ {{ getFieldDisplayName(field.trim()) }}
+ </el-tag>
+ </template>
+ <template v-else>
+ <el-tag size="small" type="primary">
+ {{ getFieldDisplayName(row.fieldIds) || "--" }}
+ </el-tag>
+ </template>
+ </template>
+ </data-table>
</div>
<pagination
- v-if="total>0"
- :page-num="pageNum"
- :page-size="pageSize"
- :total="total"
- @pagination="handleQuery"
+ v-if="total > 0"
:layout="'total, prev, pager, next, jumper'"
+ :limit="pageSizes"
+ :page="pageNum"
+ :total="total"
+ @pagination="handPagination"
/>
<Supplier
v-if="tabName === 'supplier'"
+ v-model:copyForm="copyForm"
v-model:supplierDialogFormVisible="dialogFormVisible"
+ :addOrEdit="addOrEdit"
:form="form"
:title="title"
- @submit="handleSubmit"
@beforeClose="handleBeforeClose"
+ @submit="handleSubmit"
@update:dialogFormVisible="handleDialogFormVisible"
- :addOrEdit="addOrEdit"
/>
<Customer
v-if="tabName === 'customer'"
+ v-model:copyForm="copyForm"
v-model:customerDialogFormVisible="dialogFormVisible"
+ :addOrEdit="addOrEdit"
:form="form"
:title="title"
- @submit="handleSubmit"
- :addOrEdit="addOrEdit"
@beforeClose="handleBeforeClose"
+ @submit="handleSubmit"
/>
<Coal
v-if="tabName === 'coal'"
v-model:coalDialogFormVisible="dialogFormVisible"
+ v-model:copyForm="copyForm"
+ :addOrEdit="addOrEdit"
:form="form"
:title="title"
- :addOrEdit="addOrEdit"
@submit="handleSubmit"
/>
<coalQualityMaintenance
v-if="tabName === 'coalQualityMaintenance'"
v-model:coalQualityMaintenanceDialogFormVisible="dialogFormVisible"
+ v-model:copyForm="copyForm"
+ :addOrEdit="addOrEdit"
:form="form"
:title="title"
+ @submit="handleSubmit"
+ />
+ <coalMeiZhiZiDuanWeiHu
+ v-if="tabName === 'coalMeiZhiZiDuanWeiHu'"
+ v-model:coalMaintenanceFieldDialogVisible="dialogFormVisible"
+ v-model:copyForm="copyForm"
:addOrEdit="addOrEdit"
+ :form="form"
+ :title="title"
@submit="handleSubmit"
/>
</el-card>
@@ -119,393 +148,734 @@
</template>
<script setup>
-import { ref, reactive, onMounted } from "vue";
+import {
+ computed,
+ getCurrentInstance,
+ onMounted,
+ reactive,
+ ref,
+ nextTick,
+} from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
-import { Plus, Edit, Delete, Download } from "@element-plus/icons-vue";
+import { Delete, Download, Plus } from "@element-plus/icons-vue";
+
+// ===== 缁勪欢瀵煎叆 =====
import DataTable from "@/components/Table/ETable.vue";
import Pagination from "@/components/Pagination";
import Supplier from "./mould/supplier.vue";
import Customer from "./mould/customer.vue";
import Coal from "./mould/coal.vue";
import coalQualityMaintenance from "./mould/coalQualityMaintenance.vue";
-const { proxy } = getCurrentInstance()
-// 寮圭獥
-const coalQualityMaintenanceDialogFormVisible = ref(false);
-const customerDialogFormVisible = ref(false);
-const coalDialogFormVisible = ref(false);
-const supplierDialogFormVisible = ref(false);
+import coalMeiZhiZiDuanWeiHu from "./mould/coalMeiZhiZiDuanWeiHu.vue";
+
+// ===== API 鏈嶅姟瀵煎叆 =====
+import { delSupply, getSupply } from "@/api/basicInformation/supplier.js";
+import { delCoalInfo, getCoalInfo } from "@/api/basicInformation/coal.js";
+import { testUserList } from "@/api/tool/publicInterface.js";
+import { getAreaOptions } from "@/api/system/area.js";
+import {
+ delCustomer,
+ getCustomerList,
+} from "@/api/basicInformation/customer.js";
+import {
+ coalField,
+ deleteCoalField,
+} from "@/api/basicInformation/coalFieldMaintenance.js";
+import {
+ getCoalFieldList,
+ getCoalPlanList,
+ delCoalPlan,
+} from "@/api/basicInformation/coalQualityMaintenance";
+import { useDelete } from "@/hooks/useDelete.js";
+const { proxy } = getCurrentInstance();
+
+// ===== 鍝嶅簲寮忕姸鎬佺鐞� =====
const dialogFormVisible = ref(false);
const form = ref({});
const title = ref("");
const copyForm = ref({});
-// 褰撳墠鏍囩
+const addOrEdit = ref("add");
+
+// 鏁版嵁缂撳瓨鏄犲皠
+const userList = ref([]);
+const userMap = ref({}); // 鐢ㄦ埛ID -> 鐢ㄦ埛鍚嶆槧灏勮〃
+const addressMap = ref({}); // 鍦板潃ID -> 鍦板潃淇℃伅鏄犲皠琛�
+const coalFieldList = ref([]); // 鐓よ川瀛楁鍒楄〃
+
+// 椤甸潰鐘舵�佹帶鍒�
const tabName = ref("supplier");
-// 鐘舵�佸彉閲�
const loading = ref(false);
-const total = ref(0);
-const pageNum = ref(1);
-const pageSize = ref(10);
const activeTab = ref("supplier");
+
+// 鍒嗛〉鐘舵�佺鐞�
+const pageNum = ref(1);
+const pageSizes = ref(10);
+const total = ref(0);
+
+// 琛ㄦ牸鐘舵�佺鐞�
const selectedRows = ref([]);
-// 鏌ヨ鍙傛暟
-const queryParams = reactive({
- searchText: "",
- supplierName: "",
- identifyNumber: "",
- address: "",
-});
-onMounted(() => {
- handleTabClick({ props: { name: "supplier" } });
-});
+const tableData = ref([]);
const columns = ref();
-// 鏍囩椤垫暟鎹�
+
+// 鏌ヨ鍙傛暟
+const queryParams = reactive({});
+
+// 鍦板潃閫夋嫨鏁版嵁
+const addressSelectOptions = ref([]);
+
+// ===== 閰嶇疆甯搁噺 =====
+
+// 鏍囩椤甸厤缃�
const tabs = reactive([
{ name: "supplier", label: "渚涘簲鍟嗕俊鎭�" },
{ name: "customer", label: "瀹㈡埛淇℃伅" },
{ name: "coal", label: "鐓ょ淇℃伅" },
- { name: "coalQualityMaintenance", label: "鐓よ川缁存姢" },
+ { name: "coalQualityMaintenance", label: "鐓よ川鏂规" },
+ { name: "coalMeiZhiZiDuanWeiHu", label: "鐓よ川瀛楁" },
]);
-// 鏄惁缂栬緫
-const addOrEdit = ref("add");
-// 琛ㄦ牸鏁版嵁
-const tableData = ref([]);
-// 鏂规硶瀹氫箟
-const handleQuery = () => {
- loading.value = true;
- setTimeout(() => {
- loading.value = false;
- }, 500);
+
+// ===== 宸ュ叿鍑芥暟 =====
+
+/**
+ * 鑾峰彇鍦板潃閫夋嫨鏁版嵁骞舵瀯寤烘槧灏勮〃
+ * @description 寮傛鑾峰彇鍦板潃鏁版嵁锛屾瀯寤哄揩閫熸煡鎵剧殑鏄犲皠琛�
+ */
+const fetchAreaOptions = async () => {
+ try {
+ addressSelectOptions.value = [];
+ const res = await getAreaOptions();
+ if (res.code === 200) {
+ addressSelectOptions.value = res.data;
+ buildAddressMap(res.data);
+ }
+ } catch (error) {
+ console.error("鑾峰彇鍦板潃閫夐」澶辫触:", error);
+ }
};
-// supplier 渚涘簲鍟嗘暟鎹�
+
+/**
+ * 鏋勫缓鍦板潃鏄犲皠琛�
+ * @param {Array} areaData - 鍦板潃鏁版嵁
+ * @description 閫掑綊鏋勫缓鍦板潃鏄犲皠琛紝鏀寔澶氱骇鍦板潃鏌ユ壘
+ */
+const buildAddressMap = (areaData) => {
+ const buildMap = (list, pathList = []) => {
+ list.forEach((item) => {
+ const currentPath = [...pathList, item.label];
+ addressMap.value[item.id] = {
+ name: item.label,
+ fullPath: currentPath.join(" / "),
+ };
+ if (item.children && item.children.length > 0) {
+ buildMap(item.children, currentPath);
+ }
+ });
+ };
+ buildMap(areaData);
+};
+
+/**
+ * 鏍煎紡鍖栧湴鍧�鏁扮粍涓烘樉绀哄瓧绗︿覆
+ * @param {Array} addressIds - 鍦板潃ID鏁扮粍
+ * @returns {string} 鏍煎紡鍖栧悗鐨勫湴鍧�瀛楃涓�
+ * @description 灏嗗湴鍧�ID鏁扮粍杞崲涓哄彲璇荤殑鍦板潃瀛楃涓�
+ */
+const formatAddressArray = (addressIds) => {
+ if (
+ !addressMap.value ||
+ Object.keys(addressMap.value).length === 0 ||
+ !addressIds ||
+ !Array.isArray(addressIds) ||
+ addressIds.length === 0 ||
+ addressIds.every((id) => !id)
+ ) {
+ return "--";
+ }
+
+ const addressNames = addressIds.map(
+ (id) => addressMap.value[id]?.name || "--"
+ );
+
+ if (addressNames.every((name) => name === "--")) {
+ return "--";
+ }
+
+ return addressNames.filter((name) => name !== "--").join(" / ");
+};
+
+/**
+ * 鑾峰彇鐢ㄦ埛鍒楄〃鏁版嵁骞舵瀯寤烘槧灏勮〃
+ * @description 鑾峰彇鐢ㄦ埛鏁版嵁骞舵瀯寤篒D鍒扮敤鎴峰悕鐨勬槧灏勫叧绯�
+ */
+const getUserList = async () => {
+ try {
+ const res = await testUserList();
+ console.log("鑾峰彇鐢ㄦ埛鍒楄〃鏁版嵁:", res);
+ console.log("userMap:", userMap.value);
+ if (res && res.data) {
+ userList.value = res.data;
+ userList.value.forEach((user) => {
+ userMap.value[user.userId] = user.nickName;
+ });
+ }
+ } catch (error) {
+ console.error("鑾峰彇鐢ㄦ埛鍒楄〃澶辫触:", error);
+ }
+};
+
+/**
+ * 鑾峰彇鐓よ川瀛楁鏁版嵁
+ * @description 鑾峰彇鐓よ川瀛楁鍒楄〃锛岀敤浜庡瓧娈靛悕绉板尮閰�
+ */
+const coalFieldData = async () => {
+ try {
+ const { data, code } = await getCoalFieldList();
+ if (code === 200) {
+ coalFieldList.value = data;
+ }
+ } catch (error) {
+ console.error("鑾峰彇鐓よ川瀛楁鏁版嵁澶辫触:", error);
+ }
+};
+
+/**
+ * 鏍规嵁瀛楁ID鑾峰彇瀛楁鏄剧ず鍚嶇О
+ * @param {string|number} fieldId - 瀛楁ID
+ * @returns {string} 瀛楁鏄剧ず鍚嶇О
+ * @description 閫氳繃瀛楁ID鍖归厤瀵瑰簲鐨勫瓧娈靛悕绉�
+ */
+const getFieldDisplayName = (fieldId) => {
+ if (!fieldId) return "--";
+
+ const numId = parseInt(fieldId);
+ const matchedField = coalFieldList.value.find((item) => item.id === numId);
+
+ return matchedField ? matchedField.fieldName : numId;
+};
+
+/**
+ * 褰撳墠鏍囩椤垫槸鍚︽敮鎸佸鍑哄姛鑳�
+ */
+const canExport = computed(() => {
+ return ["supplier", "customer"].includes(tabName.value);
+});
+
+/**
+ * 鎼滅储妗嗗崰浣嶇鏂囨湰
+ */
+const searchPlaceholder = computed(() => {
+ const placeholderMap = {
+ supplier: "渚涘簲鍟�/缁熶竴璇嗗埆鐮�/璇︾粏鍦板潃",
+ customer: "渚涘簲鍟�/缁熶竴璇嗗埆鐮�/璇︾粏鍦板潃",
+ coal: "璇疯緭鍏ョ叅绉嶄俊鎭�",
+ coalQualityMaintenance: "璇疯緭鍏ョ叅璐ㄦ柟妗堜俊鎭�",
+ coalMeiZhiZiDuanWeiHu: "璇疯緭鍏ョ叅璐ㄥ瓧娈典俊鎭�",
+ };
+ return placeholderMap[tabName.value] || "璇疯緭鍏ユ悳绱俊鎭�";
+});
+
+/**
+ * 鏄惁鏄剧ず鎼滅储妗�
+ */
+const shouldShowSearch = computed(() => {
+ return [
+ "supplier",
+ "customer",
+ "coal",
+ "coalQualityMaintenance",
+ "coalMeiZhiZiDuanWeiHu",
+ ].includes(tabName.value);
+});
+
+/**
+ * 褰撳墠閫変腑琛屾暟閲�
+ */
+const selectedCount = computed(() => selectedRows.value.length);
+
+// ===== 琛ㄦ牸鍒楅厤缃� =====
+
+/**
+ * 渚涘簲鍟嗚〃鏍煎垪閰嶇疆
+ */
const supplierColumns = ref([
- { prop: "supplierName", label: "渚涘簲鍟嗗悕绉�", minWidth: 200 },
- { prop: "identifyNumber", label: "缁熶竴浜鸿瘑鍒彿", minWidth: 120 },
- { prop: "address", label: "缁忚惀鍦板潃", minWidth: 150 },
- { prop: "detailedaddress", label: "璇︾粏鍦板潃", minWidth: 150 },
- { prop: "bank", label: "寮�鎴疯", minWidth: 120 },
- { prop: "bankAccount", label: "閾惰璐﹀彿", minWidth: 150 },
- { prop: "contacts", label: "鑱旂郴浜�", minWidth: 100 },
- { prop: "contactAddress", label: "鑱旂郴鍦板潃", minWidth: 150 },
- { prop: "maintainer", label: "缁存姢浜�", minWidth: 100 },
- { prop: "maintainDate", label: "缁存姢鏃ユ湡", minWidth: 100 },
+ { prop: "supplierName", label: "渚涘簲鍟嗗悕绉�", minWidth: 100 },
+ { prop: "taxpayerId", label: "缁熶竴浜鸿瘑鍒彿", minWidth: 170 },
+ {
+ prop: "bids",
+ label: "缁忚惀鍦板潃",
+ minWidth: 150,
+ showOverflowTooltip: true,
+ formatter: (row) => {
+ const addressIds = [row.bprovinceId, row.bcityId, row.bdistrictId];
+ return formatAddressArray(addressIds);
+ },
+ },
+ { prop: "businessAddress", label: "缁忚惀璇︾粏鍦板潃", minWidth: 150 },
+ { prop: "bankAccount", label: "寮�鎴疯", minWidth: 120 },
+ { prop: "contactPerson", label: "鑱旂郴浜�", minWidth: 100 },
+ {
+ prop: "cids",
+ label: "鑱旂郴浜哄湴鍧�",
+ minWidth: 150,
+ showOverflowTooltip: true,
+ formatter: (row) => {
+ const addressIds = [row.cprovinceId, row.ccityId, row.cdistrictId];
+ return formatAddressArray(addressIds);
+ },
+ },
+ { prop: "contactAddress", label: "鑱旂郴浜鸿缁嗗湴鍧�", minWidth: 120 },
]);
-// customer 瀹㈡埛鏁版嵁
+
+/**
+ * 瀹㈡埛琛ㄦ牸鍒楅厤缃�
+ */
const customerColumns = ref([
- { prop: "customerName", label: "瀹㈡埛鍚嶇О", minWidth: 200 },
- { prop: "identifyNumber", label: "缁熶竴浜鸿瘑鍒彿", minWidth: 120 },
- { prop: "address", label: "缁忚惀鍦板潃", minWidth: 150 },
- { prop: "detailedaddress", label: "璇︾粏鍦板潃", minWidth: 150 },
- { prop: "bank", label: "寮�鎴疯", minWidth: 120 },
+ { prop: "customerName", label: "瀹㈡埛鍚嶇О", minWidth: 100 },
+ { prop: "taxpayerId", label: "缁熶竴浜鸿瘑鍒彿", minWidth: 120 },
+ {
+ prop: "bids",
+ label: "缁忚惀鍦板潃",
+ minWidth: 150,
+ showOverflowTooltip: true,
+ formatter: (row) => {
+ const addressIds = [
+ row.businessProvinceId,
+ row.businessCityId,
+ row.businessDistrictId,
+ ];
+ return formatAddressArray(addressIds);
+ },
+ },
+ { prop: "businessAddress", label: "璇︾粏鍦板潃", minWidth: 150 },
+ { prop: "bankName", label: "寮�鎴疯", minWidth: 120 },
{ prop: "bankAccount", label: "閾惰璐﹀彿", minWidth: 150 },
- { prop: "contacts", label: "鑱旂郴浜�", minWidth: 100 },
- { prop: "contactAddress", label: "鑱旂郴鍦板潃", minWidth: 150 },
- { prop: "maintainer", label: "缁存姢浜�", minWidth: 100 },
- { prop: "maintainDate", label: "缁存姢鏃ユ湡", minWidth: 100 },
+ { prop: "contactPerson", label: "鑱旂郴浜�", minWidth: 100 },
+ { prop: "contactPhone", label: "鑱旂郴浜虹數璇�", minWidth: 100 },
+ {
+ prop: "cids",
+ label: "鑱旂郴浜哄湴鍧�",
+ minWidth: 150,
+ showOverflowTooltip: true,
+ formatter: (row) => {
+ const addressIds = [row.provinceId, row.cityId, row.districtId];
+ return formatAddressArray(addressIds);
+ },
+ },
+ { prop: "contactAddress", label: "鑱旂郴浜鸿缁嗗湴鍧�", minWidth: 150 },
+ { prop: "updateTime", label: "缁存姢鏃ユ湡", minWidth: 100 },
]);
-// coal 鐓ょ鏁版嵁
+
+/**
+ * 鐓ょ琛ㄦ牸鍒楅厤缃�
+ */
const coalColumns = ref([
- { prop: "coalName", label: "鐓ょ鍚嶇О", minWidth: 200 },
- { prop: "maintainer", label: "缁存姢浜�", minWidth: 120 },
+ { prop: "coal", label: "鐓ょ鍚嶇О", minWidth: 200 },
+ {
+ prop: "maintainerId",
+ label: "缁存姢浜�",
+ minWidth: 120,
+ formatter: (row, column, cellValue) => {
+ if (!userMap.value || Object.keys(userMap.value).length === 0) {
+ return "--";
+ }
+ if (cellValue === null || cellValue === undefined || cellValue === "") {
+ return "--";
+ }
+ return userMap.value[cellValue] || "--";
+ },
+ },
{ prop: "maintenanceDate", label: "缁存姢鏃ユ湡", minWidth: 150 },
]);
-// coalQualityMaintenance 鐓よ川缁存姢鏁版嵁
+
+/**
+ * 鐓よ川鏂规琛ㄦ牸鍒楅厤缃�
+ */
const coalQualityMaintenanceColumns = ref([
- { prop: "supplierName", label: "鍏ㄦ按(<)", minWidth: 200 },
- { prop: "identifyNumber", label: "姘村垎鏋�(<)", minWidth: 120 },
- { prop: "address", label: "鐏板垎", minWidth: 150 },
- { prop: "bank", label: "鎸ュ彂(>)", minWidth: 100 },
- { prop: "bankAccount", label: "纭�(<)", minWidth: 100 },
- { prop: "contacts", label: "鍥哄畾纰�", minWidth: 100 },
- { prop: "contactAddress", label: "楂樹綅鍙戠儹閲�", minWidth: 100 },
- { prop: "maintainer", label: "浣庝綅鍙戠儹閲�", minWidth: 100 },
+ { prop: "plan", label: "鐓よ川鏂规", minWidth: 100 },
+ {
+ prop: "fieldIds",
+ label: "鐓よ川瀛楁",
+ minWidth: 200,
+ showOverflowTooltip: true,
+ slot: true,
+ formatter: (row, column, cellValue) => {
+ if (Array.isArray(cellValue)) {
+ return cellValue.map((item) => item);
+ }
+ return cellValue || "--";
+ },
+ },
+ { prop: "schemeDesc", label: "鐓よ川鎻忚堪", minWidth: 100 },
]);
-// 鏍囩椤电偣鍑�
+
+/**
+ * 鐓よ川瀛楁琛ㄦ牸鍒楅厤缃�
+ */
+const coalMeiZhiZiDuanWeiHuColumns = ref([
+ { prop: "fieldName", label: "鐓よ川瀛楁", minWidth: 200 },
+ { prop: "fieldDescription", label: "鐓よ川鎻忚堪", minWidth: 200 },
+]);
+// ===== 浜嬩欢澶勭悊鍑芥暟 =====
+
+/**
+ * 鏍囩椤靛垏鎹簨浠跺鐞�
+ * @param {Object} tab - 鏍囩椤靛璞�
+ * @description 澶勭悊鏍囩椤靛垏鎹紝閲嶇疆琛ㄥ崟鍜岀姸鎬侊紝鍔犺浇瀵瑰簲鏁版嵁
+ */
const handleTabClick = (tab) => {
+ // 閲嶇疆琛ㄥ崟鍜岀姸鎬�
form.value = {};
- getList();
addOrEdit.value = "add";
loading.value = true;
tabName.value = tab.props.name;
tableData.value = [];
- getList();
- switch (tabName.value) {
- case "supplier":
+ pageNum.value = 1;
+ pageSizes.value = 10;
+ total.value = 0;
+ queryParams.searchAll = "";
+ // 鏍规嵁鏍囩椤电被鍨嬭缃搴旂殑鍒楅厤缃�
+ const tabConfig = {
+ supplier: () => {
columns.value = supplierColumns.value;
- dialogFormVisible.value = supplierDialogFormVisible.value;
- break;
- case "customer":
+ getList();
+ },
+ customer: () => {
columns.value = customerColumns.value;
- dialogFormVisible.value = customerDialogFormVisible.value;
- break;
- case "coal":
+ getList();
+ },
+ coal: () => {
columns.value = coalColumns.value;
- dialogFormVisible.value = coalDialogFormVisible.value;
- break;
- case "coalQualityMaintenance":
+ getList();
+ },
+ coalQualityMaintenance: () => {
columns.value = coalQualityMaintenanceColumns.value;
- dialogFormVisible.value = coalQualityMaintenanceDialogFormVisible.value;
- break;
+ getList();
+ coalFieldData(); // 鍔犺浇鐓よ川瀛楁鏁版嵁
+ },
+ coalMeiZhiZiDuanWeiHu: () => {
+ columns.value = coalMeiZhiZiDuanWeiHuColumns.value;
+ getList();
+ },
+ };
+
+ // 鎵ц瀵瑰簲鐨勯厤缃嚱鏁�
+ const configFn = tabConfig[tabName.value];
+ if (configFn) {
+ configFn();
}
- setTimeout(() => {
- loading.value = false;
- }, 500);
};
-// 閲嶇疆鏌ヨ
+
+/**
+ * 閲嶇疆鏌ヨ鏉′欢
+ * @description 閲嶇疆鏌ヨ鍙傛暟骞堕噸鏂板姞杞芥暟鎹�
+ */
const resetQuery = () => {
Object.keys(queryParams).forEach((key) => {
- if (key !== "pageNum" && key !== "pageSize") {
+ if (key !== "pageNum" && key !== "pageSizes") {
queryParams[key] = "";
}
});
- handleQuery();
+ getList();
};
-// 鏂板
+
+/**
+ * 鎼滅储鍔熻兘
+ * @description 閲嶇疆椤电爜骞舵墽琛屾悳绱�
+ */
+const search = () => {
+ pageNum.value = 1;
+ getList();
+};
+
+/**
+ * 鏂板鎸夐挳鐐瑰嚮澶勭悊
+ */
const handleAdd = () => {
addOrEdit.value = "add";
handleAddEdit(tabName.value);
};
-// 鏂板缂栬緫
-const handleAddEdit = (tabName) => {
- addOrEdit.value == "add" ? title.value = "鏂板" : title.value = "缂栬緫";
- if (tabName === "supplier") {
- dialogFormVisible.value = true;
- title.value = title.value + "渚涘簲鍟嗕俊鎭�";
- openDialog();
- } else if (tabName === "customer") {
- dialogFormVisible.value = true;
- title.value = title.value + "瀹㈡埛淇℃伅";
- openDialog();
- } else if (tabName === "coal") {
- dialogFormVisible.value = true;
- title.value = title.value + "鐓ょ淇℃伅";
- openDialog();
- } else if (tabName === "coalQualityMaintenance") {
- dialogFormVisible.value = true;
- title.value = title.value + "鐓よ川缁存姢";
- openDialog();
- }
+
+/**
+ * 鏂板/缂栬緫寮圭獥澶勭悊
+ * @param {string} currentTabName - 褰撳墠鏍囩椤靛悕绉�
+ * @description 鏍规嵁鏍囩椤电被鍨嬭缃脊绐楁爣棰樺苟鎵撳紑寮圭獥
+ */
+const handleAddEdit = (currentTabName) => {
+ const actionText =
+ addOrEdit.value === "add"
+ ? "鏂板"
+ : addOrEdit.value === "edit"
+ ? "缂栬緫"
+ : "鏌ョ湅";
+
+ const tabTitleMap = {
+ supplier: "渚涘簲鍟嗕俊鎭�",
+ customer: "瀹㈡埛淇℃伅",
+ coal: "鐓ょ淇℃伅",
+ coalQualityMaintenance: "鐓よ川鏂规缁存姢",
+ coalMeiZhiZiDuanWeiHu: "鐓よ川瀛楁缁存姢",
+ };
+
+ title.value = `${actionText}${tabTitleMap[currentTabName] || ""}`;
+ openDialog();
};
-// 鎵撳紑寮圭獥
+
+/**
+ * 鎵撳紑寮圭獥
+ * @description 鏍规嵁缂栬緫鐘舵�佸喅瀹氭槸鍚﹀鍒惰〃鍗曟暟鎹�
+ */
const openDialog = () => {
- if (addOrEdit.value === "edit") {
+ if (addOrEdit.value === "edit" || addOrEdit.value === "viewRow") {
copyForm.value = JSON.parse(JSON.stringify(form.value));
- dialogFormVisible.value = true;
- return;
+ } else {
+ form.value = {};
}
- form.value = {};
dialogFormVisible.value = true;
};
-// 鎻愪氦琛ㄥ崟
-const handleSubmit = () => {
- // 鎷垮埌鎻愪氦鏁版嵁
- dialogFormVisible.value = false;
- if (addOrEdit.value === "add") {
- ElMessage.success("鏂板鎴愬姛锛�" + copyForm.value.supplierName);
- } else {
- ElMessage.success("缂栬緫鎴愬姛锛�" + copyForm.value.supplierName);
- }
+
+/**
+ * 鍒嗛〉澶勭悊
+ * @param {Object} val - 鍒嗛〉鍙傛暟瀵硅薄
+ */
+const handPagination = (val) => {
+ pageNum.value = val.page;
+ pageSizes.value = val.limit;
getList();
};
+
+/**
+ * 琛ㄥ崟鎻愪氦澶勭悊
+ * @param {Object} val - 鎻愪氦缁撴灉瀵硅薄
+ */
+const handleSubmit = async (val) => {
+ if (val.result.code !== 200) {
+ ElMessage.error("鎿嶄綔澶辫触锛�" + val.result.msg);
+ return;
+ }
+ ElMessage.success(val.title + val.result.msg);
+ dialogFormVisible.value = false;
+ getList();
+};
+
+/**
+ * 寮圭獥鏄剧ず鐘舵�佸鐞�
+ * @param {boolean} value - 鏄剧ず鐘舵��
+ */
const handleDialogFormVisible = (value) => {
dialogFormVisible.value = value;
};
-// 閫夋嫨琛�
+
+/**
+ * 琛ㄦ牸琛岄�夋嫨澶勭悊
+ * @param {Array} selection - 閫変腑鐨勮鏁版嵁
+ */
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
};
-// 缂栬緫
+/**
+ * 缂栬緫鎸夐挳鐐瑰嚮澶勭悊
+ * @param {Object} row - 琛屾暟鎹�
+ * @description 澶勭悊缂栬緫鎿嶄綔锛屾瀯寤哄湴鍧�鏁扮粍骞舵墦寮�缂栬緫寮圭獥
+ */
const handleEdit = (row) => {
- form.value = JSON.parse(JSON.stringify(row));
- addOrEdit.value = "edit";
- handleAddEdit(tabName.value);
-};
-// 鎵归噺鍒犻櫎
-const handleDelete = () => {
- if (selectedRows.value.length === 0) {
- ElMessage.warning("璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁");
- return;
+ form.value = JSON.parse(JSON.stringify(row));
+
+ // 鏋勫缓渚涘簲鍟嗕笟鍔″湴鍧�鏁扮粍
+ if (form.value.bprovinceId && form.value.bdistrictId && form.value.bcityId) {
+ form.value.bids = [row.bprovinceId, row.bcityId, row.bdistrictId];
}
- ElMessageBox.confirm("纭畾鍒犻櫎閫変腑鐨勬暟鎹悧锛�", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- ElMessage.success("鍒犻櫎鎴愬姛锛屽叡鍒犻櫎" + selectedRows.value.length + "鏉℃暟鎹�");
- selectedRows.value.forEach((row) => {
- tableData.value = tableData.value.filter(
- (item) => item !== row
- );
- });
- total.value = tableData.value.length;
- // 娓呯┖閫変腑琛�
- selectedRows.value = [];
- }).catch(() => {
- ElMessage.info("宸插彇娑堝垹闄ゆ搷浣�");
- });
-}
-// 琛ㄦ牸鍒犻櫎
-const handleDeleteSuccess = (row) => {
- ElMessage.success("鍒犻櫎鎴愬姛锛�" + row.supplierName);
+
+ // 鏋勫缓渚涘簲鍟嗚仈绯诲湴鍧�鏁扮粍
+ if (form.value.cprovinceId && form.value.cdistrictId && form.value.ccityId) {
+ form.value.cids = [row.cprovinceId, row.ccityId, row.cdistrictId];
+ }
+
+ // 鏋勫缓瀹㈡埛涓氬姟鍦板潃鏁扮粍
+ if (
+ form.value.businessCityId &&
+ form.value.businessDistrictId &&
+ form.value.businessProvinceId
+ ) {
+ form.value.bids = [
+ row.businessProvinceId,
+ row.businessCityId,
+ row.businessDistrictId,
+ ];
+ }
+
+ // 鏋勫缓瀹㈡埛鑱旂郴鍦板潃鏁扮粍
+ if (form.value.cityId && form.value.districtId && form.value.provinceId) {
+ form.value.cids = [row.provinceId, row.cityId, row.districtId];
+ }
+
+ addOrEdit.value = "edit";
+ handleAddEdit(tabName.value);
};
-// 鍏抽棴寮圭獥
+
+
+/**
+ * 鎵归噺鍒犻櫎澶勭悊
+ * @description 鎵归噺鍒犻櫎閫変腑鐨勮褰�
+ */
+ const deleteApiMap = {
+ supplier: delSupply,
+ coal: delCoalInfo,
+ coalQualityMaintenance: delCoalPlan,
+ customer: delCustomer,
+ coalMeiZhiZiDuanWeiHu: deleteCoalField,
+ };
+const {handleDeleteBatch :handleDelete} = useDelete({
+ deleteApi: () => deleteApiMap[tabName.value],
+ selectedRows: selectedRows,
+ getList: () => getList,
+ tableData: tableData,
+ total: total,
+ confirmText: "纭鍒犻櫎閫変腑鐨勬暟鎹悧锛�",
+ successText: "鍒犻櫎鎴愬姛",
+})
+
+/**
+ * 鍏抽棴寮圭獥澶勭悊
+ */
const handleBeforeClose = () => {
dialogFormVisible.value = false;
form.value = {};
};
-const handleExport = (row) => {
- proxy.download("system/post/export", {
- ...queryParams.value
- }, `post_${new Date().getTime()}.xlsx`)
- ElMessage.success("瀵煎嚭鏁版嵁锛�" + row.supplierName);
-};
-const getList = () => {
- loading.value = true;
- setTimeout(() => {
- // 鏆傛椂寮曞叆娴嬭瘯鏁版嵁
- tableData.value = [
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "123412123123123111",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- contactsPhone: "19345678901",
- },
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "123412123123123111",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- contactsPhone: "19345678901",
- },
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "123412123123123111",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- contactsPhone: "19345678901",
- },
- {
- supplierName: "浜ら�氶摱琛岃偂浠芥湁闄愬叕鍙�",
- identifyNumber: "042-26881314",
- address: "姹熻タ鐪�",
- bank: "骞冲畨閾惰",
- bankAccount: "123456789012345678",
- contacts: "鍛ㄧ櫧鐜�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鍛ㄧ櫧鐜�",
- maintainDate: "2022-08-29",
- },
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "019-65851198",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- },
- {
- supplierName: "浜ら�氶摱琛岃偂浠芥湁闄愬叕鍙�",
- identifyNumber: "042-26881314",
- address: "姹熻タ鐪�",
- bank: "骞冲畨閾惰",
- bankAccount: "123456789012345678",
- contacts: "鍛ㄧ櫧鐜�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鍛ㄧ櫧鐜�",
- maintainDate: "2022-08-29",
- },
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "019-65851198",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- },
- {
- supplierName: "浜ら�氶摱琛岃偂浠芥湁闄愬叕鍙�",
- identifyNumber: "042-26881314",
- address: "姹熻タ鐪�",
- bank: "骞冲畨閾惰",
- bankAccount: "123456789012345678",
- contacts: "鍛ㄧ櫧鐜�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鍛ㄧ櫧鐜�",
- maintainDate: "2022-08-29",
- },
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "019-65851198",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- },
- {
- supplierName: "浜ら�氶摱琛岃偂浠芥湁闄愬叕鍙�",
- identifyNumber: "042-26881314",
- address: "姹熻タ鐪�",
- bank: "骞冲畨閾惰",
- bankAccount: "123456789012345678",
- contacts: "鍛ㄧ櫧鐜�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鍛ㄧ櫧鐜�",
- maintainDate: "2022-08-29",
- },
- {
- supplierName: "涓浗鍐堕噾绉戝伐鑲′唤鏈夐檺鍏徃",
- identifyNumber: "019-65851198",
- address: "灞辫タ鐪�",
- bank: "浜ら�氶摱琛�",
- bankAccount: "901234567890123456",
- contacts: "鏉庨洩鑺�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鏉庨洩鑺�",
- maintainDate: "2022-09-26",
- },
- {
- supplierName: "浜ら�氶摱琛岃偂浠芥湁闄愬叕鍙�",
- identifyNumber: "042-26881314",
- address: "姹熻タ鐪�",
- bank: "骞冲畨閾惰",
- bankAccount: "123456789012345678",
- contacts: "鍛ㄧ櫧鐜�",
- contactAddress: "XX鐪乆X甯俋X鍖篨X璺�",
- maintainer: "鍛ㄧ櫧鐜�",
- maintainDate: "2022-08-29",
- },
- ];
- total.value = tableData.value.length;
- loading.value = false;
- }, 500);
+/**
+ * 瀵煎嚭鍔熻兘澶勭悊
+ */
+const handleExport = () => {
+ const exportConfig = {
+ supplier: { api: "/supply/export", name: "渚涘簲鍟嗕俊鎭�" },
+ customer: { api: "/customer/export", name: "瀹㈡埛淇℃伅" },
+ coal: { api: "/supply/export", name: "鐓ょ淇℃伅" },
+ coalQualityMaintenance: { api: "/supply/export", name: "鐓よ川缁存姢淇℃伅" },
+ };
+
+ const config = exportConfig[tabName.value];
+ if (config) {
+ exportData(config.api, config.name);
+ }
};
-getList();
+
+/**
+ * 瀵煎嚭鏁版嵁
+ * @param {string} api - 瀵煎嚭鎺ュ彛璺緞
+ * @param {string} name - 瀵煎嚭鏂囦欢鍚嶅墠缂�
+ */
+const exportData = (api, name) => {
+ proxy.download(
+ api,
+ { ...queryParams },
+ `${name}${new Date().getTime()}.xlsx`
+ );
+ ElMessage.success("瀵煎嚭鏁版嵁锛�" + name);
+};
+// ===== 鏁版嵁鑾峰彇鍑芥暟 =====
+
+/**
+ * 鏍规嵁褰撳墠鏍囩椤甸�夋嫨瀵瑰簲鐨凙PI鎺ュ彛
+ * @returns {Promise} API璋冪敤Promise
+ * @description 缁熶竴鐨勬帴鍙i�夋嫨鍑芥暟锛屾牴鎹爣绛鹃〉绫诲瀷璋冪敤瀵瑰簲鐨凙PI
+ */
+const selectInterface = () => {
+ const apiParams = {
+ current: pageNum.value,
+ pageSize: pageSizes.value,
+ searchAll: queryParams.searchAll,
+ };
+
+ const apiMap = {
+ supplier: () => getSupply(apiParams),
+ customer: () => getCustomerList(apiParams),
+ coal: () => getCoalInfo(apiParams),
+ coalQualityMaintenance: () => getCoalPlanList(apiParams),
+ coalMeiZhiZiDuanWeiHu: () => coalField(apiParams),
+ };
+
+ const apiFunction = apiMap[tabName.value];
+ return apiFunction
+ ? apiFunction()
+ : Promise.reject(new Error("鏈壘鍒板搴旂殑API鎺ュ彛"));
+};
+
+/**
+ * 鑾峰彇鍒楄〃鏁版嵁
+ * @description 缁熶竴鐨勬暟鎹幏鍙栧嚱鏁帮紝澶勭悊鍔犺浇鐘舵�佸拰閿欒澶勭悊
+ */
+const getList = async () => {
+ try {
+ loading.value = true;
+ const { data, code } = await selectInterface();
+
+ if (code !== 200) {
+ ElMessage.error("鑾峰彇鏁版嵁澶辫触锛�" + (data?.msg || "鏈煡閿欒"));
+ return;
+ }
+
+ tableData.value = data.records || [];
+ total.value = data.total || 0;
+ } catch (error) {
+ console.error("鑾峰彇鍒楄〃鏁版嵁澶辫触:", error);
+ ElMessage.error("鑾峰彇鏁版嵁澶辫触锛岃绋嶅悗鍐嶈瘯");
+ } finally {
+ loading.value = false;
+ }
+};
+
+const handleView = (row) => {
+ form.value = JSON.parse(JSON.stringify(row));
+ // 鏋勫缓渚涘簲鍟嗕笟鍔″湴鍧�鏁扮粍
+ if (form.value.bprovinceId && form.value.bdistrictId && form.value.bcityId) {
+ form.value.bids = [row.bprovinceId, row.bcityId, row.bdistrictId];
+ }
+
+ // 鏋勫缓渚涘簲鍟嗚仈绯诲湴鍧�鏁扮粍
+ if (form.value.cprovinceId && form.value.cdistrictId && form.value.ccityId) {
+ form.value.cids = [row.cprovinceId, row.ccityId, row.cdistrictId];
+ }
+
+ // 鏋勫缓瀹㈡埛涓氬姟鍦板潃鏁扮粍
+ if (
+ form.value.businessCityId &&
+ form.value.businessDistrictId &&
+ form.value.businessProvinceId
+ ) {
+ form.value.bids = [
+ row.businessProvinceId,
+ row.businessCityId,
+ row.businessDistrictId,
+ ];
+ }
+
+ // 鏋勫缓瀹㈡埛鑱旂郴鍦板潃鏁扮粍
+ if (form.value.cityId && form.value.districtId && form.value.provinceId) {
+ form.value.cids = [row.provinceId, row.cityId, row.districtId];
+ }
+ addOrEdit.value = "viewRow";
+ handleAddEdit(tabName.value);
+};
+
+
+// ===== 鐢熷懡鍛ㄦ湡閽╁瓙 =====
+
+/**
+ * 缁勪欢鎸傝浇鍚庣殑鍒濆鍖栨搷浣�
+ */
+onMounted(async () => {
+ try {
+ // 骞惰鎵ц鍒濆鍖栨搷浣�
+ await Promise.all([
+ handleTabClick({ props: { name: "supplier" } }),
+ fetchAreaOptions(),
+ getUserList(),
+ ]);
+ } catch (error) {
+ console.error("缁勪欢鍒濆鍖栧け璐�:", error);
+ ElMessage.error("椤甸潰鍒濆鍖栧け璐ワ紝璇峰埛鏂伴噸璇�");
+ }
+});
</script>
<style scoped>
@@ -515,10 +885,14 @@
width: 50%;
}
}
+
@media screen and (min-width: 1200px) {
.search-form :deep(.el-form-item) {
width: 16%;
}
+}
+.app-container{
+ padding: 18px !important;
}
.table-toolbar {
margin-bottom: 20px;
@@ -526,26 +900,33 @@
flex-wrap: wrap;
gap: 10px;
}
+
/* 鍝嶅簲寮忚〃鏍� */
@media screen and (max-width: 768px) {
.table-toolbar {
flex-direction: column;
}
+
.table-toolbar .el-button {
width: 100%;
}
}
+
/* 琛ㄦ牸宸ュ叿鏍� */
-.table-toolbar, .table-toolbar > * {
+.table-toolbar,
+.table-toolbar > * {
margin: 0 0 0 0 !important;
}
-.table-toolbar{
+
+.table-toolbar {
margin-bottom: 20px !important;
}
+
.el-form--inline .el-form-item {
margin-right: 25px;
}
-.main-container{
+
+.main-container {
background: red !important;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3