From 7f7872b68ccfaa3de9d218683b3e83088f21e4d3 Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期五, 23 八月 2024 14:37:28 +0800
Subject: [PATCH] session doc
---
src/views/dmx/model/components/addTableName.vue | 62 ++++++++++++++++++++++++++----
1 files changed, 53 insertions(+), 9 deletions(-)
diff --git a/src/views/dmx/model/components/addTableName.vue b/src/views/dmx/model/components/addTableName.vue
index 3b7b9a9..e560d56 100644
--- a/src/views/dmx/model/components/addTableName.vue
+++ b/src/views/dmx/model/components/addTableName.vue
@@ -17,8 +17,21 @@
:style="{ width: '90%', margin: '0 auto' }"
layout="vertical"
>
- <a-form-item field="name" label="妯″瀷鍚嶇О">
- <a-input v-model="form.name" placeholder="璇疯緭鍏ユā鍨嬪悕绉�" />
+ <a-form-item field="name" label="妯″瀷妗嗘灦">
+ <!-- <a-input v-model="form.name" placeholder="璇疯緭鍏ユā鍨嬪悕绉�" /> -->
+ <a-select
+ v-model="form.name"
+ placeholder="璇烽�夋嫨妯″瀷妗嗘灦"
+ allow-create
+ allow-search
+ >
+ <a-option
+ v-for="(item, index) in modalList"
+ :value="item.name"
+ :label="item.name"
+ :disabled="item.added"
+ ></a-option>
+ </a-select>
</a-form-item>
<!-- <a-form-item field="apiKey" label="API-Key">
<a-input v-model="form.apiKey" placeholder="API-Key" />
@@ -30,16 +43,22 @@
<a-textarea
v-model="form.tags"
placeholder="璇疯緭鍏ユā鍨嬫弿杩�"
+ :max-length="50"
allow-clear
/>
</a-form-item>
- <a-form-item field="section" label="妯″瀷鍥剧墖">
- <a-space direction="vertical" :style="{ width: '100%' }">
+ <a-form-item field="logo" label="妯″瀷鍥剧墖">
+ <a-space
+ v-model="form.logo"
+ direction="vertical"
+ :style="{ width: '100%' }"
+ >
<Upload
:action="uploadAction"
:limit="1"
:url="form.urlS"
+ @handleRemove="deleteRemove"
@update:fileList="updateFileList"
@success="handleSuccess"
></Upload>
@@ -66,7 +85,13 @@
ref,
computed,
} from 'vue';
- import { addLlmFactory, getLlmDetail, editLlmFactory } from '@/api/model';
+ import {
+ getFactories,
+ addLlmFactory,
+ getLlmDetail,
+ editLlmFactory,
+ } from '@/api/model';
+
import { Message } from '@arco-design/web-vue';
import { userModelState } from '@/store';
@@ -107,13 +132,19 @@
name: [
{
required: true,
- message: '鍚嶇О涓嶅厑璁镐负绌�',
+ message: '妯″瀷妗嗘灦涓嶅厑璁镐负绌�',
},
],
- describe: [
+ tags: [
{
required: true,
message: '鎻忚堪涓嶅厑璁镐负绌�',
+ },
+ ],
+ logo: [
+ {
+ required: true,
+ message: '妯″瀷鍥剧墖涓嶈兘涓虹┖',
},
],
};
@@ -132,7 +163,7 @@
})
.then((resData) => {
if ((resData as any).code === 200) {
- emit('refresh-parent');
+ emit('refresh-parent',form.name);
addTabVisible.value = false;
}
})
@@ -147,7 +178,7 @@
})
.then((resData) => {
if ((resData as any).code === 200) {
- emit('refresh-parent');
+ emit('refresh-parent', form.name);
addTabVisible.value = false;
Message.success('娣诲姞鎴愬姛');
}
@@ -176,8 +207,15 @@
fileList.value = newFileList;
};
+ const deleteRemove = () => {
+ form.logo = '';
+ uploadUrl.value = [];
+ imageUrls.value = [];
+ };
+
const handleSuccess = (urls) => {
uploadUrl.value = urls;
+ form.logo = urls[0];
const urlsArr = urls.map((url) => {
return httpUrl + url;
@@ -194,6 +232,12 @@
});
formRef.value?.resetFields();
};
+ const modalList = ref([]);
+ const queryModel = async () => {
+ const res = await getFactories();
+ modalList.value = res.data;
+ };
+ queryModel();
watchEffect(() => {
if (props.nameList && props.title == '缂栬緫妯″瀷') {
--
Gitblit v1.8.0