update dep

This commit is contained in:
2023-07-05 15:08:01 +08:00
parent e63228dd54
commit 5c3b2d619d
3 changed files with 244 additions and 163 deletions

View File

@ -188,3 +188,30 @@ export const initStatusDict = [
elTagType: "success",
},
];
export const docFlagDict = [
{
label: "关",
value: "0",
elTagType: "warning",
},
{
label: "开",
value: "1",
elTagType: "success",
}
];
export const excelFlagDict = [
{
label: "关",
value: "0",
elTagType: "warning",
}
,
{
label: "开",
value: "1",
elTagType: "success",
}
];

View File

@ -59,7 +59,28 @@
<el-input v-model="info.functionName" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="文档">
<el-switch
v-model="info.docFlag"
active-value="1"
inactive-value="0"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="Excel导出">
<el-switch
v-model="info.excelFlag"
active-value="1"
inactive-value="0"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item>
<template #label>
@ -86,8 +107,12 @@
value-key="menuId"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>

View File

@ -118,6 +118,31 @@
prop="packageName"
:show-overflow-tooltip="true"
/>
<!-- docFlag -->
<el-table-column
label="文档"
align="center"
prop="docFlag"
>
<template #default="{row}">
<dict-tag
:value="row.docFlag"
:options="docFlagDict"
></dict-tag>
</template>
</el-table-column>
<el-table-column
label="导出Excel"
align="center"
prop="excelFlag"
>
<template #default="{row}">
<dict-tag
:value="row.excelFlag"
:options="excelFlagDict"
></dict-tag>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
@ -209,20 +234,22 @@
</el-tab-pane>
</el-tabs>
</el-dialog>
<import-table ref="importRef" @ok="handleQuery" />
<import-table ref="importRef" @ok="handleQuery"/>
</div>
</template>
<script setup name="Gen" lang="jsx">
import { delTable, listTable, previewTable, syncTable } from "@/api/tool/gen";
import {delTable, listTable, previewTable, syncTable} from "@/api/tool/gen";
import router from "@/router";
import importTable from "./importTable";
import { ElMessageBox } from "element-plus";
import { ref } from "vue";
import {ElMessageBox} from "element-plus";
import {ref} from "vue";
import useSettingsStore from "@/store/modules/settings";
import DictTag from "@/components/DictTag/index.vue";
import {docFlagDict, excelFlagDict} from "@/constant/dict";
const route = useRoute();
const { proxy } = getCurrentInstance();
const {proxy} = getCurrentInstance();
const tableList = ref([]);
const loading = ref(true);
@ -249,7 +276,7 @@ const data = reactive({
},
});
const { queryParams, preview } = toRefs(data);
const {queryParams, preview} = toRefs(data);
onActivated(() => {
const time = route.query.t;
@ -319,7 +346,8 @@ function handlesyncTable(row) {
.then(() => {
proxy.$modal.msgSuccess("同步成功");
})
.catch(() => {});
.catch(() => {
});
}
/** 打开导入表弹窗 */
@ -364,7 +392,7 @@ function handleEditTable(row) {
const tableId = row.tableId || ids.value[0];
router.push({
path: "/tool/gen-edit/index/" + tableId,
query: { pageNum: queryParams.value.pageNum },
query: {pageNum: queryParams.value.pageNum},
});
}
@ -380,7 +408,8 @@ function handleDelete(row) {
getList();
proxy.$modal.msgSuccess("删除成功");
})
.catch(() => {});
.catch(() => {
});
}
getList();