人脸识别与大模型问答

This commit is contained in:
jiang 2024-10-17 17:06:36 +08:00
parent 6b78e995bb
commit ef3f33d33b
5 changed files with 49 additions and 25 deletions

View File

@ -15,7 +15,7 @@ import router from './router'
import directive from './directive' // directive
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
import debounce from './directives/debounce';
import './assets/icons' // icon
@ -45,8 +45,10 @@ import DictData from '@/components/DictData'
import LargeScreen from '@/components/LargeScreen'
//大屏头部
import debounce from './directives/debounce';
// 全局方法挂载
Vue.directive('debounce', debounce);
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime

View File

@ -57,10 +57,18 @@
:data="menuList"
row-key="categoryId"
:default-expand-all="isExpandAll"
:row-class-name="tableRowClassName"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column prop="categoryName" label="样本类别" :show-overflow-tooltip="true"
min-width="160"></el-table-column>
<el-table-column prop="categoryName" label="样本类别" :show-overflow-tooltip="true"
min-width="160">
<template #default="{ row, $index }">
<!-- 自定义显示方式增加缩进 -->
<span :style="{ paddingLeft:'10px' }">
{{ row.categoryName }}
</span>
</template>
</el-table-column>
<el-table-column prop="enabled" align="center" label="是否启用" min-width="60">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.enabled"/>
@ -111,10 +119,10 @@
v-model="form.parentId"
:options="menuOptions"
:normalizer="normalizer"
:show-count="true"
:searchable="false"
:clearable="false"
placeholder="选择上级菜单"
/>
>
</treeselect>
</el-form-item>
</el-col>
<el-col :span="24">
@ -142,15 +150,12 @@
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="description">
<span slot="label">
样本状态
</span>
<el-form-item label="样本描述" prop="description">
<el-input
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入内容"
v-model="form.description"></el-input>
v-model="form.description" :maxlength="200"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -218,6 +223,10 @@ export default {
this.getList();
},
methods: {
tableRowClassName({ row, rowIndex }) {
//
return `table-row-level-${row._level}`;
},
/** 查询菜单列表 */
getList() {
this.loading = true;

View File

@ -129,7 +129,7 @@
type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入内容"
v-model="form.description" maxlength="200"></el-input>
v-model="form.description" :maxlength="200"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -152,8 +152,8 @@
/>
</el-select>
</el-row>
<el-tabs v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="图片上传" name="first">
<el-tabs v-model="activeName" type="border-card" style="background-color: transparent;border: none" @tab-click="tabClick">
<el-tab-pane label="图片上传" name="first" style="background-color: transparent">
<el-row style="margin-bottom: 20px">
<el-col :span="22">
<el-upload style="width: 70%"

View File

@ -54,7 +54,7 @@
<el-table-column label="模型文件" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-show="scope.row.modelAddress" size="mini" type="text"
@click="downloadFile('https://largesrevice.oss-cn-beijing.aliyuncs.com/'+scope.row.modelAddress,'')">
@click="downloadFile('https://largesrevice.oss-cn-beijing.aliyuncs.com/'+(scope.row.modelAddress ? scope.row.modelAddress.split(':')[1] : ''),'')">
下载
</el-button>
</template>
@ -62,7 +62,7 @@
<el-table-column label="使用手册" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-show="scope.row.userGuide" size="mini" type="text"
@click="downloadFile('https://largesrevice.oss-cn-beijing.aliyuncs.com/'+scope.row.userGuide,'')">
@click="downloadFile('https://largesrevice.oss-cn-beijing.aliyuncs.com/'+(scope.row.userGuide ? scope.row.userGuide.split(':')[1] : ''),'')">
下载
</el-button>
<!-- <el-button size="mini" type="text" @click="downloadFile('https://largesrevice.oss-cn-beijing.aliyuncs.com/'+scope.row.userGuide,'')">查看</el-button>-->
@ -86,7 +86,7 @@
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="模型名称" prop="modelName" maxlength="50">
<el-input v-model="form.modelName" placeholder="请输入公告标题"/>
<el-input v-model="form.modelName" placeholder="请输入模型名称"/>
</el-form-item>
<el-form-item label="版本号" prop="modelVersion" maxlength="20">
<el-input v-model="form.modelVersion" placeholder="请输入模型版本号"/>
@ -125,7 +125,7 @@
</el-form-item>
<el-form-item label="模型文件" prop="fileModelList">
<el-col :span="22">
<el-upload v-show="fileModelList.length===0" style="width: 70%"
<el-upload v-show="fileModelList.length===0 && !form.modelAddress" style="width: 70%"
action="#"
multiple
:limit="1"
@ -140,10 +140,10 @@
<el-button type="primary">选择模型文件</el-button>
</el-row>
</el-upload>
<span style="color: #fff;font-size: 18px" v-show="fileModelList.length>0">{{
fileModelList.length > 0 ? fileModelList[0].name : ''
<span style="color: #fff;font-size: 18px" v-show="fileModelList.length>0 || form.modelAddress">{{
fileModelList.length > 0 ? fileModelList[0].name : (form.modelAddress ? form.modelAddress.split(":")[0] : '')
}}
<i style="margin-left: 10px;cursor:pointer;" @click="fileModelList=[];">
<i style="margin-left: 10px;cursor:pointer;" @click="fileModelList=[];form.modelAddress=''">
×
</i>
</span>
@ -151,7 +151,7 @@
</el-form-item>
<el-form-item label="使用手册" prop="fileUserManualList">
<el-col :span="20">
<el-upload v-show="fileUserManualList.length===0"
<el-upload v-show="fileUserManualList.length===0 && !form.userGuide"
action="#"
:auto-upload="false"
:show-file-list="false"
@ -164,10 +164,10 @@
>
<el-button type="primary">选择操作手册</el-button>
</el-upload>
<span style="color: #fff;font-size: 18px" v-show="fileUserManualList.length>0">{{
fileUserManualList.length > 0 ? fileUserManualList[0].name : ''
<span style="color: #fff;font-size: 18px" v-show="fileUserManualList.length>0 || form.userGuide">{{
fileUserManualList.length > 0 ? fileUserManualList[0].name : (form.userGuide ? form.userGuide.split(":")[0] : '')
}}
<i style="margin-left: 10px;cursor:pointer;" @click="fileUserManualList=[];">
<i style="margin-left: 10px;cursor:pointer;" @click="fileUserManualList=[];form.userGuide=''">
×
</i>
</span>
@ -368,6 +368,9 @@ export default {
formData.append(key, this.form[key]);
}
}
formData.delete("modelFile")
formData.delete("userGuideFile")
console.log(formData);
Object.values(this.fileModelList).forEach((item) => {
formData.append("modelFile", item.raw)
})

View File

@ -426,5 +426,15 @@ export default {
}
}
}
.el-menu-demo:hover{
background-color: black;
color: #FFFFFF;
}
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
background-color: black;
}
}
</style>