perf: Optimize front-end code
This commit is contained in:
parent
3c46251eae
commit
7fcd8d4fce
@ -372,7 +372,7 @@ const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP']
|
|||||||
const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV']
|
const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV']
|
||||||
const videoExtensions: any = []
|
const videoExtensions: any = []
|
||||||
const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A']
|
const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A']
|
||||||
let otherExtensions = ref(['PPT', 'DOC'])
|
const otherExtensions = ref(['PPT', 'DOC'])
|
||||||
|
|
||||||
const getAcceptList = () => {
|
const getAcceptList = () => {
|
||||||
const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting
|
const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting
|
||||||
@ -554,7 +554,7 @@ const switchMicrophone = (status: boolean) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const TouchEnd = (bool?: Boolean) => {
|
const TouchEnd = (bool?: boolean) => {
|
||||||
if (bool) {
|
if (bool) {
|
||||||
stopRecording()
|
stopRecording()
|
||||||
recorderStatus.value = 'STOP'
|
recorderStatus.value = 'STOP'
|
||||||
|
|||||||
@ -99,7 +99,7 @@ const menus = ref([
|
|||||||
*/
|
*/
|
||||||
const clearSelectedText = () => {
|
const clearSelectedText = () => {
|
||||||
if (window.getSelection) {
|
if (window.getSelection) {
|
||||||
var selection = window.getSelection()
|
const selection = window.getSelection()
|
||||||
if (selection) {
|
if (selection) {
|
||||||
selection.removeAllRanges()
|
selection.removeAllRanges()
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -106,7 +106,7 @@ watch(
|
|||||||
|
|
||||||
function handleInputFieldList() {
|
function handleInputFieldList() {
|
||||||
dynamicsFormRefresh.value++
|
dynamicsFormRefresh.value++
|
||||||
let default_value: any = {}
|
const default_value: any = {}
|
||||||
props.application.work_flow?.nodes
|
props.application.work_flow?.nodes
|
||||||
?.filter((v: any) => v.id === 'base-node')
|
?.filter((v: any) => v.id === 'base-node')
|
||||||
.map((v: any) => {
|
.map((v: any) => {
|
||||||
@ -312,8 +312,8 @@ const validate = () => {
|
|||||||
}
|
}
|
||||||
const validate_query = () => {
|
const validate_query = () => {
|
||||||
// 浏览器query参数找到接口传参
|
// 浏览器query参数找到接口传参
|
||||||
let msg = []
|
const msg = []
|
||||||
for (let f of apiInputFieldList.value) {
|
for (const f of apiInputFieldList.value) {
|
||||||
if (f.required && !api_form_data_context.value[f.field]) {
|
if (f.required && !api_form_data_context.value[f.field]) {
|
||||||
msg.push(f.field)
|
msg.push(f.field)
|
||||||
}
|
}
|
||||||
@ -328,9 +328,9 @@ const validate_query = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const initRouteQueryValue = () => {
|
const initRouteQueryValue = () => {
|
||||||
for (let f of apiInputFieldList.value) {
|
for (const f of apiInputFieldList.value) {
|
||||||
if (!api_form_data_context.value[f.field]) {
|
if (!api_form_data_context.value[f.field]) {
|
||||||
let _value = getRouteQueryValue(f.field)
|
const _value = getRouteQueryValue(f.field)
|
||||||
if (_value != null) {
|
if (_value != null) {
|
||||||
api_form_data_context.value[f.field] = _value
|
api_form_data_context.value[f.field] = _value
|
||||||
}
|
}
|
||||||
|
|||||||
@ -277,7 +277,7 @@ function sendMessage(val: string, other_params_data?: any, chat?: chatType): Pro
|
|||||||
return userFormRef.value
|
return userFormRef.value
|
||||||
?.validate()
|
?.validate()
|
||||||
.then((ok) => {
|
.then((ok) => {
|
||||||
let userFormData = accessToken
|
const userFormData = accessToken
|
||||||
? JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
? JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
||||||
: {}
|
: {}
|
||||||
const newData = Object.keys(form_data.value).reduce((result: any, key: string) => {
|
const newData = Object.keys(form_data.value).reduce((result: any, key: string) => {
|
||||||
@ -640,7 +640,7 @@ const handleScroll = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (isUserInput.value && localStorage.getItem(`${accessToken}userForm`)) {
|
if (isUserInput.value && localStorage.getItem(`${accessToken}userForm`)) {
|
||||||
let userFormData = JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
const userFormData = JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
||||||
form_data.value = userFormData
|
form_data.value = userFormData
|
||||||
}
|
}
|
||||||
if (window.speechSynthesis) {
|
if (window.speechSynthesis) {
|
||||||
|
|||||||
@ -19,7 +19,11 @@ const emit = defineEmits(['click'])
|
|||||||
const back: any = router.options.history.state.back
|
const back: any = router.options.history.state.back
|
||||||
function jump() {
|
function jump() {
|
||||||
if (props.to === '-1') {
|
if (props.to === '-1') {
|
||||||
back ? router.push(back) : router.go(-1)
|
if (back) {
|
||||||
|
router.push(back)
|
||||||
|
} else {
|
||||||
|
router.go(-1)
|
||||||
|
}
|
||||||
} else if (props.to) {
|
} else if (props.to) {
|
||||||
router.push(props.to as RouteLocationRaw)
|
router.push(props.to as RouteLocationRaw)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -149,6 +149,8 @@ const resourceType = computed(() => {
|
|||||||
return 'model'
|
return 'model'
|
||||||
} else if (props.source === 'TOOL') {
|
} else if (props.source === 'TOOL') {
|
||||||
return 'tool'
|
return 'tool'
|
||||||
|
} else {
|
||||||
|
return 'application'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -44,8 +44,7 @@ function evalParseOption(option_json: any) {
|
|||||||
if (option_json.style) {
|
if (option_json.style) {
|
||||||
style.value = option_json.style
|
style.value = option_json.style
|
||||||
}
|
}
|
||||||
let option = {}
|
const option = {}
|
||||||
echarts
|
|
||||||
tmp.value = echarts
|
tmp.value = echarts
|
||||||
eval(option_json.option)
|
eval(option_json.option)
|
||||||
return option
|
return option
|
||||||
|
|||||||
@ -20,7 +20,7 @@ onMounted(() => {
|
|||||||
range.selectNode(htmlRef.value)
|
range.selectNode(htmlRef.value)
|
||||||
const scripts = htmlRef.value.getElementsByTagName('script')
|
const scripts = htmlRef.value.getElementsByTagName('script')
|
||||||
if (scripts) {
|
if (scripts) {
|
||||||
var documentFragment = range.createContextualFragment(
|
const documentFragment = range.createContextualFragment(
|
||||||
[...scripts]
|
[...scripts]
|
||||||
.map((item: HTMLElement) => {
|
.map((item: HTMLElement) => {
|
||||||
htmlRef.value?.removeChild(item)
|
htmlRef.value?.removeChild(item)
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
import { ref, computed, watch } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
defineOptions({ name: 'MdEditorMagnify' })
|
defineOptions({ name: 'MdEditorMagnify' })
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title: String
|
title: string
|
||||||
modelValue: any
|
modelValue: any
|
||||||
}>()
|
}>()
|
||||||
const emit = defineEmits(['update:modelValue', 'submitDialog'])
|
const emit = defineEmits(['update:modelValue', 'submitDialog'])
|
||||||
|
|||||||
@ -61,8 +61,8 @@ import useStore from '@/stores'
|
|||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
data?: {
|
data?: {
|
||||||
type: Object
|
type: object
|
||||||
default: () => {}
|
default: () => null
|
||||||
}
|
}
|
||||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||||
isApplication?: boolean,
|
isApplication?: boolean,
|
||||||
|
|||||||
@ -98,13 +98,12 @@ function settingApiKey(row: any) {
|
|||||||
|
|
||||||
function deleteApiKey(row: any) {
|
function deleteApiKey(row: any) {
|
||||||
MsgConfirm(
|
MsgConfirm(
|
||||||
// @ts-ignore
|
|
||||||
`${t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1')}: ${row.secret_key}?`,
|
`${t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1')}: ${row.secret_key}?`,
|
||||||
t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2'),
|
t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2'),
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
cancelButtonText: t('common.cancel'),
|
cancelButtonText: t('common.cancel'),
|
||||||
confirmButtonClass: 'color-danger',
|
confirmButtonClass: 'danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -104,7 +104,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
.putAccessToken(id as string, form.value, loading)
|
.putAccessToken(id as string, form.value, loading)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
// @ts-ignore
|
|
||||||
MsgSuccess(t('common.settingSuccess'))
|
MsgSuccess(t('common.settingSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -118,7 +118,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
.putAccessToken(id as string, obj, loading)
|
.putAccessToken(id as string, obj, loading)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
// @ts-ignore
|
|
||||||
MsgSuccess(t('common.settingSuccess'))
|
MsgSuccess(t('common.settingSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -113,7 +113,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
|
|
||||||
apiCall.then(() => {
|
apiCall.then(() => {
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
//@ts-ignore
|
|
||||||
MsgSuccess(t('common.settingSuccess'))
|
MsgSuccess(t('common.settingSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -68,7 +68,6 @@ const props = defineProps({
|
|||||||
const statisticsType = computed(() => [
|
const statisticsType = computed(() => [
|
||||||
{
|
{
|
||||||
id: 'customerCharts',
|
id: 'customerCharts',
|
||||||
// @ts-ignore
|
|
||||||
name: t('views.applicationOverview.monitor.charts.customerTotal'),
|
name: t('views.applicationOverview.monitor.charts.customerTotal'),
|
||||||
icon: 'app-user',
|
icon: 'app-user',
|
||||||
background: '#EBF1FF',
|
background: '#EBF1FF',
|
||||||
|
|||||||
@ -255,7 +255,6 @@ const shareUrl = computed(
|
|||||||
const dayOptions = [
|
const dayOptions = [
|
||||||
{
|
{
|
||||||
value: 7,
|
value: 7,
|
||||||
// @ts-ignore
|
|
||||||
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'),
|
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -373,7 +372,6 @@ function refreshAccessToken() {
|
|||||||
const obj = {
|
const obj = {
|
||||||
access_token_reset: true,
|
access_token_reset: true,
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
|
||||||
const str = t('views.applicationOverview.appInfo.refreshToken.refreshSuccess')
|
const str = t('views.applicationOverview.appInfo.refreshToken.refreshSuccess')
|
||||||
updateAccessToken(obj, str)
|
updateAccessToken(obj, str)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -603,7 +603,6 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
|||||||
//1、判断文件大小是否合法,文件限制不能大于 10 MB
|
//1、判断文件大小是否合法,文件限制不能大于 10 MB
|
||||||
const isLimit = file?.size / 1024 / 1024 < 10
|
const isLimit = file?.size / 1024 / 1024 < 10
|
||||||
if (!isLimit) {
|
if (!isLimit) {
|
||||||
// @ts-ignore
|
|
||||||
MsgError(t('common.EditAvatarDialog.fileSizeExceeded'))
|
MsgError(t('common.EditAvatarDialog.fileSizeExceeded'))
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
@ -675,7 +674,6 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
.putXpackAccessToken(id as string, fd, loading)
|
.putXpackAccessToken(id as string, fd, loading)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
// @ts-ignore
|
|
||||||
MsgSuccess(t('common.settingSuccess'))
|
MsgSuccess(t('common.settingSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -227,7 +227,6 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
.putAccessToken(id as string, obj, loading)
|
.putAccessToken(id as string, obj, loading)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
// @ts-ignore
|
|
||||||
MsgSuccess(t('common.settingSuccess'))
|
MsgSuccess(t('common.settingSuccess'))
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -218,7 +218,9 @@ function back() {
|
|||||||
saveApplication(true, true)
|
saveApplication(true, true)
|
||||||
})
|
})
|
||||||
.catch((action: Action) => {
|
.catch((action: Action) => {
|
||||||
action === 'cancel' && go()
|
if (action === 'cancel') {
|
||||||
|
go()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
go()
|
go()
|
||||||
@ -275,7 +277,11 @@ function openHistory() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeSave(bool: boolean) {
|
function changeSave(bool: boolean) {
|
||||||
bool ? initInterval() : closeInterval()
|
if (bool) {
|
||||||
|
initInterval()
|
||||||
|
} else {
|
||||||
|
closeInterval()
|
||||||
|
}
|
||||||
localStorage.setItem('workflowAutoSave', bool.toString())
|
localStorage.setItem('workflowAutoSave', bool.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -474,7 +474,6 @@ const permissionPrecise = computed(() => {
|
|||||||
return permissionMap['application'][apiType.value]
|
return permissionMap['application'][apiType.value]
|
||||||
})
|
})
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||||
data: '{data}',
|
data: '{data}',
|
||||||
question: '{question}',
|
question: '{question}',
|
||||||
|
|||||||
@ -60,7 +60,6 @@ import useStore from '@/stores'
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { common, user } = useStore()
|
const { common, user } = useStore()
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||||
data: '{data}',
|
data: '{data}',
|
||||||
question: '{question}',
|
question: '{question}',
|
||||||
@ -69,7 +68,7 @@ const applicationFormRef = ref()
|
|||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const dialogVisible = ref<boolean>(false)
|
const dialogVisible = ref<boolean>(false)
|
||||||
// @ts-ignore
|
|
||||||
const applicationForm = ref<ApplicationFormType>({
|
const applicationForm = ref<ApplicationFormType>({
|
||||||
name: '',
|
name: '',
|
||||||
desc: '',
|
desc: '',
|
||||||
|
|||||||
@ -109,7 +109,6 @@ const { user } = useStore()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const emit = defineEmits(['refresh'])
|
const emit = defineEmits(['refresh'])
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||||
data: '{data}',
|
data: '{data}',
|
||||||
question: '{question}',
|
question: '{question}',
|
||||||
|
|||||||
@ -205,7 +205,6 @@ const noReferencesformRef = ref()
|
|||||||
|
|
||||||
const defaultValue = {
|
const defaultValue = {
|
||||||
ai_questioning: '{question}',
|
ai_questioning: '{question}',
|
||||||
// @ts-ignore
|
|
||||||
designated_answer: t('views.application.dialog.designated_answer'),
|
designated_answer: t('views.application.dialog.designated_answer'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -259,7 +259,6 @@ const formRef = ref()
|
|||||||
const dayOptions = [
|
const dayOptions = [
|
||||||
{
|
{
|
||||||
value: 7,
|
value: 7,
|
||||||
// @ts-ignore
|
|
||||||
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'), // 使用 t 方法来国际化显示文本
|
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'), // 使用 t 方法来国际化显示文本
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
:before-close="close"
|
:before-close="close"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<template #header="{ close, titleId, titleClass }">
|
<template #header>
|
||||||
<el-breadcrumb separator=">">
|
<el-breadcrumb separator=">">
|
||||||
<el-breadcrumb-item>
|
<el-breadcrumb-item>
|
||||||
<span @click="toSelectProvider" class="select-provider">
|
<span @click="toSelectProvider" class="select-provider">
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
>
|
>
|
||||||
<template #header="{ close, titleId, titleClass }">
|
<template #header>
|
||||||
<el-breadcrumb separator=">">
|
<el-breadcrumb separator=">">
|
||||||
<el-breadcrumb-item
|
<el-breadcrumb-item
|
||||||
><span class="active-breadcrumb">{{
|
><span class="active-breadcrumb">{{
|
||||||
|
|||||||
@ -66,7 +66,7 @@ import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
|||||||
import permissionMap from '@/permission'
|
import permissionMap from '@/permission'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title: String
|
title: string
|
||||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|||||||
@ -64,9 +64,9 @@ import permissionMap from '@/permission'
|
|||||||
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
paragraphId: String
|
paragraphId: string
|
||||||
docId: String
|
docId: string
|
||||||
knowledgeId: String
|
knowledgeId: string
|
||||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
container=".paragraph-scollbar"
|
container=".paragraph-scollbar"
|
||||||
@click="handleClick"
|
@click="handleClick"
|
||||||
>
|
>
|
||||||
<template v-for="(item, index) in paragraphDetail" :key="item.id">
|
<template v-for="(item) in paragraphDetail" :key="item.id">
|
||||||
<el-anchor-link :href="`#m${item.id}`" :title="item.title" v-if="item.title">
|
<el-anchor-link :href="`#m${item.id}`" :title="item.title" v-if="item.title">
|
||||||
<span :title="item.title">
|
<span :title="item.title">
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
|
|||||||
@ -204,7 +204,9 @@ function associationClick(item: any) {
|
|||||||
function searchHandle() {
|
function searchHandle() {
|
||||||
paginationConfig.current_page = 1
|
paginationConfig.current_page = 1
|
||||||
paragraphList.value = []
|
paragraphList.value = []
|
||||||
currentDocument.value && getParagraphList(currentDocument.value)
|
if (currentDocument.value) {
|
||||||
|
getParagraphList(currentDocument.value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickDocumentHandle(item: any) {
|
function clickDocumentHandle(item: any) {
|
||||||
@ -222,7 +224,10 @@ function getDocument() {
|
|||||||
documentList.value = res.data
|
documentList.value = res.data
|
||||||
currentDocument.value =
|
currentDocument.value =
|
||||||
cloneDocumentList.value?.length > 0 ? cloneDocumentList.value[0].id : ''
|
cloneDocumentList.value?.length > 0 ? cloneDocumentList.value[0].id : ''
|
||||||
currentDocument.value && getParagraphList(currentDocument.value)
|
|
||||||
|
if (currentDocument.value) {
|
||||||
|
getParagraphList(currentDocument.value)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -363,7 +363,6 @@ function mapToUrlParams(map: any[]) {
|
|||||||
|
|
||||||
function deleteApplication(row: any) {
|
function deleteApplication(row: any) {
|
||||||
MsgConfirm(
|
MsgConfirm(
|
||||||
// @ts-ignore
|
|
||||||
`${t('views.application.delete.confirmTitle')}${row.name} ?`,
|
`${t('views.application.delete.confirmTitle')}${row.name} ?`,
|
||||||
t('views.application.delete.confirmMessage'),
|
t('views.application.delete.confirmMessage'),
|
||||||
{
|
{
|
||||||
|
|||||||
@ -367,7 +367,7 @@ const search_type_change = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getRequestParams() {
|
function getRequestParams() {
|
||||||
let obj: any = {
|
const obj: any = {
|
||||||
name: model_search_form.value.name,
|
name: model_search_form.value.name,
|
||||||
create_user: model_search_form.value.create_user,
|
create_user: model_search_form.value.create_user,
|
||||||
model_type: model_search_form.value.model_type,
|
model_type: model_search_form.value.model_type,
|
||||||
|
|||||||
@ -313,7 +313,6 @@ const rules = reactive<FormRules>({
|
|||||||
const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
||||||
const isLimit = file?.size / 1024 / 1024 < 10
|
const isLimit = file?.size / 1024 / 1024 < 10
|
||||||
if (!isLimit) {
|
if (!isLimit) {
|
||||||
// @ts-ignore
|
|
||||||
MsgError(t('theme.fileMessageError'))
|
MsgError(t('theme.fileMessageError'))
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog modal-class="authorized-workspace" v-model="centerDialogVisible" width="840">
|
<el-dialog modal-class="authorized-workspace" v-model="centerDialogVisible" width="840">
|
||||||
<template #header="{ titleId, titleClass }">
|
<template #header>
|
||||||
<h4 class="mb-8">{{ $t('views.shared.authorized_workspace') }}</h4>
|
<h4 class="mb-8">{{ $t('views.shared.authorized_workspace') }}</h4>
|
||||||
<el-text class="color-secondary lighter">{{ $t('views.shared.authorized_tip') }}</el-text>
|
<el-text class="color-secondary lighter">{{ $t('views.shared.authorized_tip') }}</el-text>
|
||||||
</template>
|
</template>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<el-radio value="BLACK_LIST">{{ $t('views.shared.BLACK_LIST') }}</el-radio>
|
<el-radio value="BLACK_LIST">{{ $t('views.shared.BLACK_LIST') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<p class="mb-8 lighter mt-16">{{ $t('views.shared.select_workspace') }}</p>
|
<p class="mb-8 lighter mt-16">{{ $t('views.shared.select_workspace') }}</p>
|
||||||
<div class="flex border" v-loading="loading" style="overflow: hidden;">
|
<div class="flex border" v-loading="loading" style="overflow: hidden">
|
||||||
<div class="border-r">
|
<div class="border-r">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar max-height="250" wrap-class="p-16 pt-0">
|
<el-scrollbar max-height="250" wrap-class="p-16 pt-0">
|
||||||
<template v-for="ele in checkedWorkspace">
|
<template v-for="(ele, index) in checkedWorkspace" :key="index">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<AppIcon iconName="app-workspace"></AppIcon>
|
<AppIcon iconName="app-workspace"></AppIcon>
|
||||||
@ -97,7 +97,6 @@
|
|||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import type { CheckboxValueType } from 'element-plus'
|
import type { CheckboxValueType } from 'element-plus'
|
||||||
import authorizationApi from '@/api/system-shared/authorization'
|
import authorizationApi from '@/api/system-shared/authorization'
|
||||||
import workspaceApi from '@/api/workspace/workspace'
|
|
||||||
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
|
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
|
||||||
|
|
||||||
const checkAll = ref(false)
|
const checkAll = ref(false)
|
||||||
@ -137,7 +136,7 @@ const open = async ({ id }: any, type = 'Knowledge') => {
|
|||||||
])
|
])
|
||||||
workspace.value = systemWorkspaceList.data as any
|
workspace.value = systemWorkspaceList.data as any
|
||||||
listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST'
|
listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST'
|
||||||
let workspace_id_list = (authList.data || {}).workspace_id_list || []
|
const workspace_id_list = (authList.data || {}).workspace_id_list || []
|
||||||
checkedWorkspace.value = workspace.value.filter((ele) => workspace_id_list.includes(ele.id))
|
checkedWorkspace.value = workspace.value.filter((ele) => workspace_id_list.includes(ele.id))
|
||||||
handleCheckedWorkspaceChange(checkedWorkspace.value)
|
handleCheckedWorkspaceChange(checkedWorkspace.value)
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<KnowledgeListContainer>
|
<KnowledgeListContainer>
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-breadcrumb separator-icon="ArrowRight">
|
<el-breadcrumb separator-icon="ArrowRight">
|
||||||
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
<el-breadcrumb-item>{{ $t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item>
|
<el-breadcrumb-item>
|
||||||
<h5 class="ml-4 color-text-primary">{{ t('views.knowledge.title') }}</h5>
|
<h5 class="ml-4 color-text-primary">{{ t('views.knowledge.title') }}</h5>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
@ -18,8 +18,6 @@ import { onMounted, ref, reactive, computed } from 'vue'
|
|||||||
|
|
||||||
import KnowledgeListContainer from '@/views/knowledge/component/KnowledgeListContainer.vue'
|
import KnowledgeListContainer from '@/views/knowledge/component/KnowledgeListContainer.vue'
|
||||||
|
|
||||||
import { t } from '@/locales'
|
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<ContentContainer>
|
<ContentContainer>
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-breadcrumb separator-icon="ArrowRight">
|
<el-breadcrumb separator-icon="ArrowRight">
|
||||||
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
<el-breadcrumb-item>{{ $t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item>
|
<el-breadcrumb-item>
|
||||||
<h5 class="ml-4 color-text-primary">{{ t('views.model.title') }}</h5>
|
<h5 class="ml-4 color-text-primary">{{ t('views.model.title') }}</h5>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, computed } from 'vue'
|
import { onMounted, ref, computed } from 'vue'
|
||||||
import { t } from '@/locales'
|
|
||||||
import modelListContainer from '@/views/model/index.vue'
|
import modelListContainer from '@/views/model/index.vue'
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
<el-breadcrumb separator-icon="ArrowRight">
|
<el-breadcrumb separator-icon="ArrowRight">
|
||||||
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
<el-breadcrumb-item>{{ $t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item>
|
<el-breadcrumb-item>
|
||||||
<h5 class="ml-4 color-text-primary">{{ t('views.tool.title') }}</h5>
|
<h5 class="ml-4 color-text-primary">{{ t('views.tool.title') }}</h5>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
@ -26,7 +26,6 @@ import { onMounted, ref, reactive, computed } from 'vue'
|
|||||||
|
|
||||||
import ToolListContainer from '@/views/tool/component/ToolListContainer.vue'
|
import ToolListContainer from '@/views/tool/component/ToolListContainer.vue'
|
||||||
|
|
||||||
import { t } from '@/locales'
|
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
|
|
||||||
const { tool } = useStore()
|
const { tool } = useStore()
|
||||||
|
|||||||
@ -281,7 +281,6 @@ const daterangeValue = ref('')
|
|||||||
const dayOptions = [
|
const dayOptions = [
|
||||||
{
|
{
|
||||||
value: 7,
|
value: 7,
|
||||||
// @ts-ignore
|
|
||||||
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'), // 使用 t 方法来国际化显示文本
|
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'), // 使用 t 方法来国际化显示文本
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -380,7 +379,7 @@ function handleSizeChange() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getRequestParams() {
|
function getRequestParams() {
|
||||||
let obj: any = {
|
const obj: any = {
|
||||||
start_time: daterange.value.start_time,
|
start_time: daterange.value.start_time,
|
||||||
end_time: daterange.value.end_time,
|
end_time: daterange.value.end_time,
|
||||||
}
|
}
|
||||||
@ -408,7 +407,7 @@ function getList() {
|
|||||||
|
|
||||||
function getMenuList() {
|
function getMenuList() {
|
||||||
return operateLog.getMenuList().then((res) => {
|
return operateLog.getMenuList().then((res) => {
|
||||||
let arr: any[] = res.data
|
const arr: any[] = res.data
|
||||||
arr
|
arr
|
||||||
.filter((item, index, self) => index === self.findIndex((i) => i['menu'] === item['menu']))
|
.filter((item, index, self) => index === self.findIndex((i) => i['menu'] === item['menu']))
|
||||||
.forEach((ele) => {
|
.forEach((ele) => {
|
||||||
|
|||||||
@ -106,7 +106,6 @@ const onChange = (file: any) => {
|
|||||||
//1、判断文件大小是否合法,文件限制不能大于10MB
|
//1、判断文件大小是否合法,文件限制不能大于10MB
|
||||||
const isLimit = file?.size / 1024 / 1024 < 10
|
const isLimit = file?.size / 1024 / 1024 < 10
|
||||||
if (!isLimit) {
|
if (!isLimit) {
|
||||||
// @ts-ignore
|
|
||||||
MsgError(t('common.EditAvatarDialog.fileSizeExceeded'))
|
MsgError(t('common.EditAvatarDialog.fileSizeExceeded'))
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user