| | |
| | | "moment": "^2.30.1", |
| | | "nprogress": "^0.2.0", |
| | | "pinia": "^2.0.23", |
| | | "pinia-plugin-persistedstate": "^3.2.1", |
| | | "query-string": "^8.0.3", |
| | | "sass": "^1.77.8", |
| | | "sortablejs": "^1.15.0", |
| | |
| | | import useUserStore from './modules/user'; |
| | | import usePinia from './modules/storeMsg'; |
| | | import useTabBarStore from './modules/tab-bar'; |
| | | import userModelState from './modules/shareModel'; |
| | | |
| | | import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' //引入持久化插件 |
| | | |
| | | const pinia = createPinia(); |
| | | |
| | | export { useAppStore, useUserStore,usePinia, useTabBarStore }; |
| | | pinia.use(piniaPluginPersistedstate) //将插件添加到 pinia 实例上 |
| | | |
| | | export { useAppStore, useUserStore,usePinia, useTabBarStore,userModelState }; |
| | | export default pinia; |
New file |
| | |
| | | import { defineStore } from 'pinia'; |
| | | |
| | | const userModelState = defineStore('shareModel', { |
| | | persist: true, |
| | | state: () => ({ |
| | | hrefUrl: '', |
| | | }), |
| | | |
| | | getters: { |
| | | getkbObj(state) { |
| | | return { ...state }; |
| | | }, |
| | | }, |
| | | |
| | | actions: { |
| | | |
| | | getHrefUrl(url: string) { |
| | | this.hrefUrl=url |
| | | }, |
| | | }, |
| | | }); |
| | | |
| | | export default userModelState ; |
| | |
| | | import { Modal, Message } from '@arco-design/web-vue'; |
| | | import message from '@arco-design/web-vue/es/message'; |
| | | import { resolveUnref } from '@vueuse/core'; |
| | | import { useUserStore } from '@/store'; |
| | | import { userModelState } from '@/store'; |
| | | |
| | | const userStore = useUserStore(); |
| | | const modelStore = userModelState(); |
| | | |
| | | const addPageModelVisible = defineModel('show'); |
| | | const loading = ref(false); |
| | |
| | | multiSelect: ['section one'], |
| | | treeSelect: '', |
| | | raptor: false, |
| | | addFomList: [], |
| | | addFomList: <any[]>[], |
| | | }); |
| | | const form_ref = ref(null); |
| | | const form_ref = ref(); |
| | | |
| | | const rules = { |
| | | model_type: [ |
| | |
| | | |
| | | const uploadAction = '/api/v1/llm/upload'; // 替换为你的上传API |
| | | const fileList = ref([]); |
| | | const imageUrls = ref([]); |
| | | const imageUrls = ref<any[]>([]); |
| | | const uploadUrl = ref([]); |
| | | const httpUrl = localStorage.getItem('httpUrl'); |
| | | const httpUrl = modelStore.hrefUrl; |
| | | |
| | | const updateFileList = (newFileList) => { |
| | | fileList.value = newFileList; |
| | |
| | | } from 'vue'; |
| | | import { addLlmFactory, getLlmDetail, editLlmFactory } from '@/api/model'; |
| | | import { Message } from '@arco-design/web-vue'; |
| | | import { userModelState } from '@/store'; |
| | | |
| | | const modelStore = userModelState(); |
| | | |
| | | const addTabVisible = defineModel('tabShow'); |
| | | |
| | | const httpUrl = localStorage.getItem('httpUrl'); |
| | | const httpUrl = modelStore.hrefUrl; |
| | | const loading = ref(false); |
| | | const props = defineProps({ |
| | | task_id: { |
| | |
| | | logo: '', |
| | | urlS: '', |
| | | }); |
| | | const formRef = ref(null); |
| | | const formRef = ref(); |
| | | |
| | | const rules = { |
| | | name: [ |
| | |
| | | deleteLlmFactory, |
| | | } from '@/api/model'; |
| | | import { Modal, Message } from '@arco-design/web-vue'; |
| | | import { useUserStore } from '@/store'; |
| | | import pdfImg from '@/assets/images//icon-chart.png'; |
| | | import { userModelState } from '@/store'; |
| | | |
| | | const userStore = useUserStore(); |
| | | import pdfImg from '@/assets/images/icon-chart.png'; |
| | | |
| | | const modelStore = userModelState(); |
| | | let count = 5; |
| | | const activeKey = ref(1); |
| | | const data = ref([ |
| | |
| | | tabKey.value = val; |
| | | }; |
| | | |
| | | const httpUrl = localStorage.getItem('httpUrl'); |
| | | const httpUrl = modelStore.hrefUrl; |
| | | const show = ref(false); |
| | | const tabShow = ref(false); |
| | | const title = ref('添加模式'); |
| | |
| | | title.value = '添加模型'; |
| | | editList.value.llm_factory = tabKey.value; |
| | | }; |
| | | const editList = ref({ llm_factory: '' }); |
| | | const editList = ref<any>({ llm_factory: '' }); |
| | | //增加模型子类 |
| | | const handleAddModel = () => { |
| | | modelType.value = 2; |
| | |
| | | } |
| | | if (key !== 'key') { |
| | | const res = await deleteLlmFactory(key); |
| | | if (res.code == 200) { |
| | | if ((res as any).code == 200) { |
| | | Reflect.deleteProperty(tabData.value, key); |
| | | queryModel(); |
| | | } |
| | |
| | | }; |
| | | |
| | | const visible = ref(false); |
| | | const formRef = ref(null); |
| | | const formRef = ref(); |
| | | |
| | | const form = reactive({ |
| | | size: 'medium', |
| | |
| | | } |
| | | .card_content { |
| | | .card_wrap_box_img { |
| | | min-height: 200px; |
| | | // min-height: 200px; |
| | | height: 200px; |
| | | width: 100%; |
| | | img { |
| | | max-height: 190px; |
| | | width: 100%; /* 或者其他固定宽度 */ |
| | | height: 100%; /* 或者其他固定高度 */ |
| | | object-fit: cover; /* 不会变形,但可能裁剪图片 */ |
| | | } |
| | | } |
| | | .card_wrap_box { |
| | |
| | | import { ValidatedError } from '@arco-design/web-vue/es/form/interface'; |
| | | import { useI18n } from 'vue-i18n'; |
| | | import { useStorage } from '@vueuse/core'; |
| | | import { useUserStore } from '@/store'; |
| | | import { useUserStore, userModelState } from '@/store'; |
| | | import useLoading from '@/hooks/loading'; |
| | | import type { LoginData } from '@/api/user'; |
| | | import { rsaPsw } from '@/utils/ras'; |
| | |
| | | const errorMessage = ref(''); |
| | | const { loading, setLoading } = useLoading(); |
| | | const userStore = useUserStore(); |
| | | const modelStore = userModelState(); |
| | | |
| | | const loginConfig = useStorage('login-config', { |
| | | rememberPassword: true, |
| | |
| | | |
| | | const url = window.location.origin; |
| | | localStorage.setItem('httpUrl', url); |
| | | userStore.getHreFurl(url); |
| | | debugger; |
| | | modelStore.getHrefUrl(url); |
| | | Message.success(t('登录成功')); |
| | | const { rememberPassword } = loginConfig.value; |
| | | const { email, password } = values; |