mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -20,6 +20,32 @@ const apiRouters = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/doc",
|
||||
meta: {
|
||||
title: "文档管理",
|
||||
icon: "ep:document",
|
||||
rank: 10
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/doc/setting",
|
||||
name: "DocSetting",
|
||||
meta: {
|
||||
title: "基础配置",
|
||||
roles: ["admin"]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/doc/list",
|
||||
name: "DocList",
|
||||
meta: {
|
||||
title: "文档列表",
|
||||
roles: ["admin"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/isv",
|
||||
meta: {
|
||||
@@ -44,35 +70,9 @@ const apiRouters = [
|
||||
roles: ["admin"]
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
,
|
||||
{
|
||||
path: "/doc",
|
||||
meta: {
|
||||
title: "文档管理",
|
||||
icon: "ep:document",
|
||||
rank: 10
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/doc/setting",
|
||||
name: "DocSetting",
|
||||
meta: {
|
||||
title: "基础配置",
|
||||
roles: ["admin"]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/doc/index",
|
||||
name: "DocList",
|
||||
meta: {
|
||||
title: "文档管理",
|
||||
roles: ["admin"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// ,
|
||||
// {
|
||||
// path: "/sys",
|
||||
|
59
sop-admin/sop-admin-frontend/src/views/doc/setting/index.ts
Normal file
59
sop-admin/sop-admin-frontend/src/views/doc/setting/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import { ref } from "vue";
|
||||
import type { PlusColumn, FieldValues } from "plus-pro-components";
|
||||
|
||||
export const state = ref<FieldValues>({
|
||||
status: "0",
|
||||
name: "",
|
||||
rate: 4,
|
||||
progress: 100,
|
||||
switch: true,
|
||||
time: new Date().toString(),
|
||||
endTime: [],
|
||||
img: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
|
||||
});
|
||||
|
||||
export const rules = {
|
||||
tornaServerAddr: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入名称"
|
||||
}
|
||||
],
|
||||
openProdUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入标签"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export const columns: PlusColumn[] = [
|
||||
{
|
||||
label: "Torna地址",
|
||||
prop: "tornaServerAddr",
|
||||
valueType: "copy",
|
||||
fieldProps: {
|
||||
placeholder: "Torna地址,到端口号,如:https://torna.xxx.com:7700"
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "开放平台线上环境地址",
|
||||
prop: "openProdUrl",
|
||||
valueType: "copy",
|
||||
fieldProps: {
|
||||
placeholder: "开放平台线上环境地址,如:https://open.xxx.com/api"
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "开放平台沙箱环境地址",
|
||||
prop: "openSandboxUrl",
|
||||
valueType: "copy",
|
||||
fieldProps: {
|
||||
placeholder: "开放平台沙箱环境地址, 如:https://open-sandbox.xxx.com/api"
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export const handleSubmit = (values: FieldValues) => {
|
||||
console.log(values, "Submit");
|
||||
};
|
16
sop-admin/sop-admin-frontend/src/views/doc/setting/index.vue
Normal file
16
sop-admin/sop-admin-frontend/src/views/doc/setting/index.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { state, rules, columns, handleSubmit } from "./index";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<PlusForm
|
||||
v-model="state"
|
||||
:columns="columns"
|
||||
:rules="rules"
|
||||
label-position="top"
|
||||
:has-reset="false"
|
||||
@submit="handleSubmit"
|
||||
/>
|
||||
</el-card>
|
||||
</template>
|
@@ -64,6 +64,7 @@ export const tableColumns: PlusColumn[] = [
|
||||
{
|
||||
label: "所属应用",
|
||||
prop: "application",
|
||||
minWidth: 150,
|
||||
tableColumnProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
@@ -71,6 +72,7 @@ export const tableColumns: PlusColumn[] = [
|
||||
{
|
||||
label: "接口名称",
|
||||
prop: "apiName",
|
||||
minWidth: 200,
|
||||
tableColumnProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
@@ -78,11 +80,12 @@ export const tableColumns: PlusColumn[] = [
|
||||
{
|
||||
label: "版本号",
|
||||
prop: "apiVersion",
|
||||
width: 80
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
label: "接口描述",
|
||||
prop: "description",
|
||||
minWidth: 100,
|
||||
tableColumnProps: {
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
|
Reference in New Issue
Block a user