|
@@ -1,23 +1,77 @@
|
|
|
<template>
|
|
|
<h1>DocumentAI</h1>
|
|
|
+
|
|
|
+ <h3>构建版本号</h3>
|
|
|
+ <p class="italic">{{ build_tag }}</p>
|
|
|
+
|
|
|
+
|
|
|
+ <h3>模型信息</h3>
|
|
|
+ <p>模型个数:{{ model_num }}</p>
|
|
|
+ <el-table :data="model_data" style="width: 100%">
|
|
|
+ <el-table-column prop="key" label="Key" width="auto" />
|
|
|
+ <el-table-column prop="type" label="Type" width="auto" />
|
|
|
+ <el-table-column prop="subtype" label="Subtype" width="auto" />
|
|
|
+ <el-table-column prop="format" label="Format" width="auto" />
|
|
|
+ <el-table-column prop="version" label="Version" width="auto" />
|
|
|
+ </el-table>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { openWindow } from "@/utils/openWindow";
|
|
|
-</script>
|
|
|
+import { onMounted, ref } from "vue";
|
|
|
+import { GetBuildTag, GetModelInfo } from '../../../api/api'
|
|
|
+import { storeToRefs } from 'pinia'
|
|
|
+import { useVersionStore } from '../../../store/Version';
|
|
|
|
|
|
-<style scoped lang="less">
|
|
|
-img {
|
|
|
- width: 100%;
|
|
|
- height: 200px;
|
|
|
- background-position: center center;
|
|
|
-}
|
|
|
+const vr = useVersionStore();
|
|
|
+const { build_tag, model_info } = storeToRefs(vr);
|
|
|
|
|
|
-.blue {
|
|
|
- background-color: #479AC7;
|
|
|
-}
|
|
|
+let model_num = ref(0)
|
|
|
+let model_data: any = ref([])
|
|
|
|
|
|
-.white_text {
|
|
|
- color: white;
|
|
|
+onMounted(async () => {
|
|
|
+ if (build_tag.value == "") {
|
|
|
+ GetBuildTag("/v1/buildTag").then(res => {
|
|
|
+ build_tag.value = res;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (model_info.value == "") {
|
|
|
+ GetModelInfo("/v1/modelInfo").then(res => {
|
|
|
+ model_info.value = res;
|
|
|
+ const model = JSON.parse(model_info.value)
|
|
|
+ model_num.value = model['model_num']
|
|
|
+ console.log(model['model_num'])
|
|
|
+ console.log(model['model_keys'])
|
|
|
+ const model_array = model['model_keys']
|
|
|
+ for (let i = 0; i < model_array.length; i++) {
|
|
|
+ model_data.value.push({
|
|
|
+ key: model_array[i]['model_key'],
|
|
|
+ type: model_array[i]['model_type'],
|
|
|
+ subtype: model_array[i]['model_sub_type'],
|
|
|
+ format: model_array[i]['model_format'],
|
|
|
+ version: model_array[i]['model_version'],
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const model = JSON.parse(model_info.value)
|
|
|
+ model_num.value = model['model_num']
|
|
|
+ console.log(model['model_num'])
|
|
|
+ console.log(model['model_keys'])
|
|
|
+ const model_array = model['model_keys']
|
|
|
+ for (let i = 0; i < model_array.length; i++) {
|
|
|
+ model_data.value.push({
|
|
|
+ key: model_array[i]['model_key'],
|
|
|
+ type: model_array[i]['model_type'],
|
|
|
+ subtype: model_array[i]['model_sub_type'],
|
|
|
+ format: model_array[i]['model_format'],
|
|
|
+ version: model_array[i]['model_version'],
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="less">
|
|
|
+.italic {
|
|
|
+ font-style: italic;
|
|
|
}
|
|
|
</style>
|