From fe631515b71782a10a750874f6d4582fe027cd22 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 09:32:49 +0800
Subject: [PATCH] 公司-所有的表格添加斑马纹
---
src/views/tool/gen/editTable.vue | 74 ++++++++++++++++++------------------
1 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/src/views/tool/gen/editTable.vue b/src/views/tool/gen/editTable.vue
index da9bc4a..59aa03d 100644
--- a/src/views/tool/gen/editTable.vue
+++ b/src/views/tool/gen/editTable.vue
@@ -5,7 +5,7 @@
<basic-info-form ref="basicInfo" :info="info" />
</el-tab-pane>
<el-tab-pane label="瀛楁淇℃伅" name="columnInfo">
- <el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight">
+ <el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight" stripe>
<el-table-column label="搴忓彿" type="index" min-width="5%"/>
<el-table-column
label="瀛楁鍒楀悕"
@@ -127,74 +127,74 @@
</template>
<script setup name="GenEdit">
-import { getGenTable, updateGenTable } from "@/api/tool/gen";
-import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
-import basicInfoForm from "./basicInfoForm";
-import genInfoForm from "./genInfoForm";
+import { getGenTable, updateGenTable } from "@/api/tool/gen"
+import { optionselect as getDictOptionselect } from "@/api/system/dict/type"
+import basicInfoForm from "./basicInfoForm"
+import genInfoForm from "./genInfoForm"
-const route = useRoute();
-const { proxy } = getCurrentInstance();
+const route = useRoute()
+const { proxy } = getCurrentInstance()
-const activeName = ref("columnInfo");
-const tableHeight = ref(document.documentElement.scrollHeight - 245 + "px");
-const tables = ref([]);
-const columns = ref([]);
-const dictOptions = ref([]);
-const info = ref({});
+const activeName = ref("columnInfo")
+const tableHeight = ref(document.documentElement.scrollHeight - 245 + "px")
+const tables = ref([])
+const columns = ref([])
+const dictOptions = ref([])
+const info = ref({})
/** 鎻愪氦鎸夐挳 */
function submitForm() {
- const basicForm = proxy.$refs.basicInfo.$refs.basicInfoForm;
- const genForm = proxy.$refs.genInfo.$refs.genInfoForm;
+ const basicForm = proxy.$refs.basicInfo.$refs.basicInfoForm
+ const genForm = proxy.$refs.genInfo.$refs.genInfoForm
Promise.all([basicForm, genForm].map(getFormPromise)).then(res => {
- const validateResult = res.every(item => !!item);
+ const validateResult = res.every(item => !!item)
if (validateResult) {
- const genTable = Object.assign({}, info.value);
- genTable.columns = columns.value;
+ const genTable = Object.assign({}, info.value)
+ genTable.columns = columns.value
genTable.params = {
treeCode: info.value.treeCode,
treeName: info.value.treeName,
treeParentCode: info.value.treeParentCode,
parentMenuId: info.value.parentMenuId
- };
+ }
updateGenTable(genTable).then(res => {
- proxy.$modal.msgSuccess(res.msg);
+ proxy.$modal.msgSuccess(res.msg)
if (res.code === 200) {
- close();
+ close()
}
- });
+ })
} else {
- proxy.$modal.msgError("琛ㄥ崟鏍¢獙鏈�氳繃锛岃閲嶆柊妫�鏌ユ彁浜ゅ唴瀹�");
+ proxy.$modal.msgError("琛ㄥ崟鏍¢獙鏈�氳繃锛岃閲嶆柊妫�鏌ユ彁浜ゅ唴瀹�")
}
- });
+ })
}
function getFormPromise(form) {
return new Promise(resolve => {
form.validate(res => {
- resolve(res);
- });
- });
+ resolve(res)
+ })
+ })
}
function close() {
- const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: route.query.pageNum } };
- proxy.$tab.closeOpenPage(obj);
+ const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: route.query.pageNum } }
+ proxy.$tab.closeOpenPage(obj)
}
(() => {
- const tableId = route.params && route.params.tableId;
+ const tableId = route.params && route.params.tableId
if (tableId) {
// 鑾峰彇琛ㄨ缁嗕俊鎭�
getGenTable(tableId).then(res => {
- columns.value = res.data.rows;
- info.value = res.data.info;
- tables.value = res.data.tables;
- });
+ columns.value = res.data.rows
+ info.value = res.data.info
+ tables.value = res.data.tables
+ })
/** 鏌ヨ瀛楀吀涓嬫媺鍒楄〃 */
getDictOptionselect().then(response => {
- dictOptions.value = response.data;
- });
+ dictOptions.value = response.data
+ })
}
-})();
+})()
</script>
--
Gitblit v1.9.3