|
|
@@ -1,7 +1,7 @@
|
|
|
-<script lang="ts" setup name="DBTypeIndex">
|
|
|
+<script lang="ts" setup name="DbTypeIndex">
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-import DBType from './components/DBType.vue'
|
|
|
-import { deleteDBTypeById, getDBTypeByList } from '@/api/daas/dbTypeApi'
|
|
|
+import DbType from './components/DbType.vue'
|
|
|
+import { deleteDbTypeById, getDbTypeByList } from '@/api/daas/dbTypeApi'
|
|
|
|
|
|
const state = reactive({
|
|
|
loading: false,
|
|
|
@@ -19,7 +19,7 @@ const appCatRef = ref()
|
|
|
|
|
|
const getDataList = async () => {
|
|
|
state.loading = true
|
|
|
- const { data } = await getDBTypeByList({})
|
|
|
+ const { data } = await getDbTypeByList({})
|
|
|
state.dataList = data
|
|
|
state.loading = false
|
|
|
}
|
|
|
@@ -28,20 +28,18 @@ onMounted(() => {
|
|
|
getDataList()
|
|
|
})
|
|
|
|
|
|
-function onCreate() {}
|
|
|
-
|
|
|
-function onDBTypeAdd() {
|
|
|
+function onDbTypeAdd() {
|
|
|
appCatRef.value.showAddModel()
|
|
|
}
|
|
|
|
|
|
-function onDBTypeEdit(row: any) {
|
|
|
+function onDbTypeEdit(row: any) {
|
|
|
const appCatId = row.appCatId
|
|
|
appCatRef.value.showEditModel(appCatId)
|
|
|
}
|
|
|
|
|
|
-function onDBTypeDel(row: any) {
|
|
|
+function onDbTypeDel(row: any) {
|
|
|
ElMessageBox.confirm(`确认删除「${row.dbTypeTitle}」吗?`, '确认信息').then(async () => {
|
|
|
- await deleteDBTypeById(row.appCatId)
|
|
|
+ await deleteDbTypeById(row.dbTypeId)
|
|
|
await getDataList()
|
|
|
ElMessage.success({
|
|
|
message: '删除成功',
|
|
|
@@ -61,7 +59,7 @@ function onDBTypeDel(row: any) {
|
|
|
</template>
|
|
|
|
|
|
<el-button-group>
|
|
|
- <el-button type="primary" size="large" plain @click="onDBTypeAdd">
|
|
|
+ <el-button type="primary" size="large" plain @click="onDbTypeAdd">
|
|
|
<template #icon>
|
|
|
<el-icon>
|
|
|
<svg-icon name="ep:plus" />
|
|
|
@@ -76,23 +74,23 @@ function onDBTypeDel(row: any) {
|
|
|
<el-table v-loading="state.loading" class="list-table" :data="state.dataList" border stripe highlight-current-row height="100%">
|
|
|
<el-table-column type="index" label="序号" width="60" header-align="center" align="center" />
|
|
|
|
|
|
- <el-table-column prop="appCatTitle" label="名称" header-align="center" align="center" width="200" />
|
|
|
+ <el-table-column prop="dbTypeTitle" label="名称" header-align="center" align="center" width="200" />
|
|
|
|
|
|
- <el-table-column prop="appCatDesc" label="说明" />
|
|
|
+ <el-table-column prop="dbTypeDesc" label="说明" />
|
|
|
|
|
|
<el-table-column label="操作" width="250" align="center" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <el-button type="primary" size="small" plain @click="onDBTypeEdit(scope.row)">
|
|
|
+ <el-button type="primary" size="small" plain @click="onDbTypeEdit(scope.row)">
|
|
|
编辑
|
|
|
</el-button>
|
|
|
- <el-button v-if="!scope.row.isFixed" type="danger" size="small" plain @click="onDBTypeDel(scope.row)">
|
|
|
+ <el-button v-if="!scope.row.isFixed" type="danger" size="small" plain @click="onDbTypeDel(scope.row)">
|
|
|
删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</page-main>
|
|
|
- <DBType ref="appCatRef" @success="getDataList" />
|
|
|
+ <DbType ref="appCatRef" @success="getDataList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|