|
@@ -62,7 +62,7 @@ const getModuleData = async () => {
|
|
|
})
|
|
})
|
|
|
state.modules = [
|
|
state.modules = [
|
|
|
{
|
|
{
|
|
|
- label: 'API模块列表',
|
|
|
|
|
|
|
+ label: '功能模块',
|
|
|
isLeaf: false,
|
|
isLeaf: false,
|
|
|
modId: -1,
|
|
modId: -1,
|
|
|
children,
|
|
children,
|
|
@@ -84,7 +84,9 @@ const onModuleAdd = () => {
|
|
|
|
|
|
|
|
// 模块编辑
|
|
// 模块编辑
|
|
|
const onModuleEdit = (data: { ModId: number }) => {
|
|
const onModuleEdit = (data: { ModId: number }) => {
|
|
|
|
|
+ window.console.log('----------------')
|
|
|
window.console.log(data)
|
|
window.console.log(data)
|
|
|
|
|
+ window.console.log('----------------')
|
|
|
const modId = data.ModId
|
|
const modId = data.ModId
|
|
|
ModuleRef.value.showEditModule(modId)
|
|
ModuleRef.value.showEditModule(modId)
|
|
|
}
|
|
}
|
|
@@ -126,6 +128,10 @@ const onApiAdd = () => {
|
|
|
apiRef.value.showAddApi(state.curModuleId)
|
|
apiRef.value.showAddApi(state.curModuleId)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const onApiTrans = () => {
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 编辑API
|
|
// 编辑API
|
|
|
const onApiEdit = (data: { apiId: number; modId: number }) => {
|
|
const onApiEdit = (data: { apiId: number; modId: number }) => {
|
|
|
const apiId = data.apiId
|
|
const apiId = data.apiId
|
|
@@ -234,10 +240,25 @@ async function onChangeStatus(row: { modId: number;apiId: number; status: number
|
|
|
<el-table ref="apiTableRef" v-loading="state.loading" class="list-table" :data="state.apiList" border stripe highlight-current-row height="100%">
|
|
<el-table ref="apiTableRef" v-loading="state.loading" class="list-table" :data="state.apiList" border stripe highlight-current-row height="100%">
|
|
|
<el-table-column type="index" label="序号" header-align="center" align="center" width="70" />
|
|
<el-table-column type="index" label="序号" header-align="center" align="center" width="70" />
|
|
|
|
|
|
|
|
- <el-table-column prop="apiTitle" label="名称" header-align="center" align="center" width="200" />
|
|
|
|
|
|
|
+ <el-table-column prop="apiTitle" label="名称" header-align="center" align="center" width="200">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span> {{ scope.row.apiTitle }} </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column prop="apiCode" label="代码" header-align="center" align="center" width="150" />
|
|
|
|
|
- <el-table-column prop="status" label="status" header-align="center" align="center" width="150">
|
|
|
|
|
|
|
+ <el-table-column prop="apiCode" label="代码" header-align="center" align="center" width="200">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span> {{ scope.row.apiCode }} </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column prop="apiDesc" label="说明" header-align="center" align="left">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span> {{ scope.row.apiDesc }} </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column prop="status" label="状态" header-align="center" align="center" width="100">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
v-model="scope.row.status"
|
|
v-model="scope.row.status"
|
|
@@ -252,16 +273,11 @@ async function onChangeStatus(row: { modId: number;apiId: number; status: number
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column prop="apiDesc" label="说明" header-align="center" align="left" />
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="操作" header-align="center" align="center" width="200">
|
|
|
|
|
|
|
+ <el-table-column label="操作" header-align="center" align="center" width="210">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button type="primary" size="small" plain @click="onApiEdit(scope.row)">
|
|
|
|
|
- 编辑
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button type="danger" size="small" plain @click="onApiDelete(scope.row)">
|
|
|
|
|
- 删除
|
|
|
|
|
- </el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" size="small" plain @click="onApiTrans(scope.row)">事务</el-button>
|
|
|
|
|
+ <el-button type="warning" size="small" plain @click="onApiEdit(scope.row)">编辑</el-button>
|
|
|
|
|
+ <el-button type="danger" size="small" plain @click="onApiDelete(scope.row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|