新增用户技能管理功能
- 在技能 API 中新增 `getUserSkillDetail` 和 `updateUserSkill` 函数,支持获取用户技能详情和更新用户技能。 - 更新技能列表页面,优化搜索栏和技能表格展示,提升用户体验。 - 修改文件上传提示,明确支持的文件格式和要求。
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
</template>
|
||||
|
||||
<!-- 新建模型弹窗 -->
|
||||
<EditModule ref="editModuleRef" @refresh="handleRefresh" />
|
||||
<EditModule ref="editModuleRef" :model-types="modelTypes" :is-super-admin="isSuperAdmin" @refresh="handleRefresh" />
|
||||
|
||||
<!-- 内置模型 API Key 输入弹窗 -->
|
||||
<el-dialog v-model="apiKeyDialogVisible" title="配置内置模型" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
@@ -92,7 +92,7 @@
|
||||
import { ref, reactive, watch, onMounted } from 'vue';
|
||||
import { ElMessage, type FormInstance, type FormRules } from 'element-plus';
|
||||
import { Search, CircleCheck } from '@element-plus/icons-vue';
|
||||
import { getModelModuleList, addModelModule } from '/@/api/digitalHuman/modelConfig/modelModule';
|
||||
import { getModelModuleList, addModelModule, getModelTypeList, normalizeModelTypeOptions } from '/@/api/digitalHuman/modelConfig/modelModule';
|
||||
import { checkIsSuperAdmin } from '/@/api/system/user/index';
|
||||
import { getApiErrorMessage } from '/@/utils/request';
|
||||
import EditModule from '/@/views/digitalHuman/modelConfig/modelModule/component/editModule.vue';
|
||||
@@ -150,7 +150,8 @@ const modelList = ref<ModelItem[]>([]);
|
||||
const loading = ref(false);
|
||||
const selectedModel = ref<ModelItem | null>(null);
|
||||
const editModuleRef = ref();
|
||||
const isSuperAdmin = ref(false); // 是否为管理员
|
||||
const isSuperAdmin = ref(false); // 鏄惁涓虹鐞嗗憳
|
||||
const modelTypes = ref<Array<{ id: number | string; label: string }>>([]); // 妯″瀷绫诲瀷鍒楄〃
|
||||
|
||||
// 内置模型 API Key 配置
|
||||
const apiKeyDialogVisible = ref(false);
|
||||
@@ -275,6 +276,7 @@ const handleCreatePrivateModel = async () => {
|
||||
form: systemModel.form || {},
|
||||
requestMapping: systemModel.requestMapping || {},
|
||||
responseMapping: systemModel.responseMapping || {},
|
||||
responseBody: systemModel.responseBody || {}, // 杩斿洖涓讳綋瀛楁
|
||||
maxConcurrency: systemModel.maxConcurrency || 10,
|
||||
queueLimit: systemModel.queueLimit || 100,
|
||||
timeoutSeconds: systemModel.timeoutSeconds || 30,
|
||||
@@ -283,6 +285,7 @@ const handleCreatePrivateModel = async () => {
|
||||
retryQueueMaxSeconds: systemModel.retryQueueMaxSeconds || 60,
|
||||
autoCleanSeconds: systemModel.autoCleanSeconds || 300,
|
||||
remark: systemModel.remark || '',
|
||||
tokenMapping: systemModel.tokenMapping || '', // Token鏄犲皠瀛楁
|
||||
};
|
||||
|
||||
const res: any = await addModelModule(createParams);
|
||||
@@ -334,8 +337,20 @@ const handleClose = () => {
|
||||
systemModelToClone.value = null;
|
||||
};
|
||||
|
||||
// 鍔犺浇妯″瀷绫诲瀷鍒楄〃
|
||||
const loadModelTypes = async () => {
|
||||
try {
|
||||
const res: any = await getModelTypeList();
|
||||
if (res.code === 0) {
|
||||
modelTypes.value = normalizeModelTypeOptions(res);
|
||||
}
|
||||
} catch {
|
||||
// 鎺ュ彛閿欒鐢?request 鍏ㄥ眬鎻愮ず鍚庣 message
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
checkAdminStatus();
|
||||
loadModelTypes();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user