refactor: application add show_exec
This commit is contained in:
parent
8ab4456ec3
commit
66d4b6c81a
@ -26,6 +26,7 @@ class ApplicationAccessToken(AppModelMixin):
|
|||||||
base_field=models.CharField(max_length=128, blank=True)
|
base_field=models.CharField(max_length=128, blank=True)
|
||||||
, default=list)
|
, default=list)
|
||||||
show_source = models.BooleanField(default=False, verbose_name="是否显示知识来源")
|
show_source = models.BooleanField(default=False, verbose_name="是否显示知识来源")
|
||||||
|
show_exec = models.BooleanField(default=False, verbose_name="是否显示执行详情")
|
||||||
|
|
||||||
language = models.CharField(max_length=10, verbose_name="语言", default=None, null=True)
|
language = models.CharField(max_length=10, verbose_name="语言", default=None, null=True)
|
||||||
|
|
||||||
|
|||||||
@ -24,11 +24,15 @@
|
|||||||
<el-space direction="vertical" alignment="start">
|
<el-space direction="vertical" alignment="start">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="form.show_source"
|
v-model="form.show_source"
|
||||||
:label="
|
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.showSourceLabel')"
|
||||||
isWorkFlow(detail.type)
|
/>
|
||||||
? $t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail')
|
</el-space>
|
||||||
: $t('views.applicationOverview.appInfo.SettingDisplayDialog.showSourceLabel')
|
</el-form-item>
|
||||||
"
|
<el-form-item>
|
||||||
|
<el-space direction="vertical" alignment="start">
|
||||||
|
<el-checkbox
|
||||||
|
v-model="form.show_exec"
|
||||||
|
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail')"
|
||||||
/>
|
/>
|
||||||
</el-space>
|
</el-space>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -48,9 +52,9 @@ import { ref, watch } from 'vue'
|
|||||||
import {useRoute} from 'vue-router'
|
import {useRoute} from 'vue-router'
|
||||||
import type {FormInstance, FormRules, UploadFiles} from 'element-plus'
|
import type {FormInstance, FormRules, UploadFiles} from 'element-plus'
|
||||||
import applicationApi from '@/api/application/application'
|
import applicationApi from '@/api/application/application'
|
||||||
import { isWorkFlow } from '@/utils/application'
|
|
||||||
import {MsgSuccess, MsgError} from '@/utils/message'
|
import {MsgSuccess, MsgError} from '@/utils/message'
|
||||||
import {getBrowserLang, langList, t} from '@/locales'
|
import {getBrowserLang, langList, t} from '@/locales'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const {
|
const {
|
||||||
params: {id}
|
params: {id}
|
||||||
@ -61,6 +65,7 @@ const emit = defineEmits(['refresh'])
|
|||||||
const displayFormRef = ref()
|
const displayFormRef = ref()
|
||||||
const form = ref<any>({
|
const form = ref<any>({
|
||||||
show_source: false,
|
show_source: false,
|
||||||
|
show_exec: false,
|
||||||
language: ''
|
language: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -73,6 +78,7 @@ watch(dialogVisible, (bool) => {
|
|||||||
if (!bool) {
|
if (!bool) {
|
||||||
form.value = {
|
form.value = {
|
||||||
show_source: false,
|
show_source: false,
|
||||||
|
show_exec: false,
|
||||||
language: ''
|
language: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,6 +86,7 @@ watch(dialogVisible, (bool) => {
|
|||||||
const open = (data: any, content: any) => {
|
const open = (data: any, content: any) => {
|
||||||
detail.value = content
|
detail.value = content
|
||||||
form.value.show_source = data.show_source
|
form.value.show_source = data.show_source
|
||||||
|
form.value.show_exec = data.show_exec
|
||||||
form.value.language = data.language
|
form.value.language = data.language
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -370,11 +370,11 @@
|
|||||||
<el-space direction="vertical" alignment="start" :size="2">
|
<el-space direction="vertical" alignment="start" :size="2">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="xpackForm.show_source"
|
v-model="xpackForm.show_source"
|
||||||
:label="
|
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.showSourceLabel')"
|
||||||
isWorkFlow(detail.type)
|
/>
|
||||||
? $t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail')
|
<el-checkbox
|
||||||
: $t('views.applicationOverview.appInfo.SettingDisplayDialog.showSourceLabel')
|
v-model="xpackForm.show_exec"
|
||||||
"
|
:label="$t('views.applicationOverview.appInfo.SettingDisplayDialog.showExecutionDetail')"
|
||||||
/>
|
/>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="xpackForm.show_history"
|
v-model="xpackForm.show_history"
|
||||||
@ -416,7 +416,6 @@
|
|||||||
import {computed, ref, watch} from 'vue'
|
import {computed, ref, watch} from 'vue'
|
||||||
import {useRoute} from 'vue-router'
|
import {useRoute} from 'vue-router'
|
||||||
import type {FormInstance, FormRules, UploadFiles} from 'element-plus'
|
import type {FormInstance, FormRules, UploadFiles} from 'element-plus'
|
||||||
import { isWorkFlow } from '@/utils/application'
|
|
||||||
import {isAppIcon} from '@/utils/common'
|
import {isAppIcon} from '@/utils/common'
|
||||||
import applicationXpackApi from '@/api/application/application-xpack'
|
import applicationXpackApi from '@/api/application/application-xpack'
|
||||||
import {MsgSuccess, MsgError} from '@/utils/message'
|
import {MsgSuccess, MsgError} from '@/utils/message'
|
||||||
@ -435,6 +434,7 @@ const emit = defineEmits(['refresh'])
|
|||||||
|
|
||||||
const defaultSetting = {
|
const defaultSetting = {
|
||||||
show_source: false,
|
show_source: false,
|
||||||
|
show_exec: false,
|
||||||
language: '',
|
language: '',
|
||||||
show_history: true,
|
show_history: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
@ -463,6 +463,7 @@ const displayFormRef = ref()
|
|||||||
|
|
||||||
const xpackForm = ref<any>({
|
const xpackForm = ref<any>({
|
||||||
show_source: false,
|
show_source: false,
|
||||||
|
show_exec: false,
|
||||||
language: '',
|
language: '',
|
||||||
show_history: false,
|
show_history: false,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
@ -531,6 +532,7 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
|||||||
const open = (data: any, content: any) => {
|
const open = (data: any, content: any) => {
|
||||||
detail.value = content
|
detail.value = content
|
||||||
xpackForm.value.show_source = data.show_source
|
xpackForm.value.show_source = data.show_source
|
||||||
|
xpackForm.value.show_exec = data.show_exec
|
||||||
xpackForm.value.show_history = data.show_history
|
xpackForm.value.show_history = data.show_history
|
||||||
xpackForm.value.language = data.language
|
xpackForm.value.language = data.language
|
||||||
xpackForm.value.draggable = data.draggable
|
xpackForm.value.draggable = data.draggable
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user