fix: bug#10837
This commit is contained in:
parent
7f9cf53dd0
commit
6549c98605
|
@ -63,6 +63,7 @@ import { flattenDeep, isArray } from 'lodash-es'
|
|||
import { provide } from 'vue'
|
||||
import { randomString } from '@/utils/utils'
|
||||
import { getParams, EventEmitter, EventSubscribeKeys } from '@/views/rule-engine/Scene/Save/util'
|
||||
import { handleParamsData } from '@/views/rule-engine/Scene/Save/components/Terms/util'
|
||||
|
||||
const sceneStore = useSceneStore()
|
||||
const { data: formModel } = storeToRefs(sceneStore)
|
||||
|
@ -119,7 +120,7 @@ const columnRequest = () => {
|
|||
action: props.actionName
|
||||
}
|
||||
getParams(param, formModel.value).then(res => {
|
||||
columnOptions.value = res
|
||||
columnOptions.value = handleParamsData(res, 'id')
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
v-model:value='myValue'
|
||||
class='manual-time-picker'
|
||||
:format='myFormat'
|
||||
:valueFormat='myFormat'
|
||||
:getPopupContainer='getPopupContainer'
|
||||
popupClassName='manual-time-picker-popup'
|
||||
@change='change'
|
||||
|
@ -16,6 +17,7 @@
|
|||
class='manual-time-picker'
|
||||
v-model:value='myValue'
|
||||
:format='myFormat'
|
||||
:valueFormat='myFormat'
|
||||
:getPopupContainer='getPopupContainer'
|
||||
popupClassName='manual-time-picker-popup'
|
||||
@change='change'
|
||||
|
@ -48,15 +50,17 @@ const props = defineProps({
|
|||
|
||||
const emit = defineEmits<Emit>()
|
||||
const myFormat = props.format || ( props.type === 'time' ? 'HH:mm:ss' : 'YYYY-MM-DD HH:mm:ss')
|
||||
const myValue = ref<Dayjs>(dayjs(props.value || new Date(), myFormat))
|
||||
// const myValue = ref<Dayjs>(dayjs(props.value || new Date(), myFormat))
|
||||
const myValue = ref<string>(props.value || dayjs(new Date()).format(myFormat))
|
||||
|
||||
const getPopupContainer = (trigger: HTMLElement) => {
|
||||
return trigger?.parentNode || document.body
|
||||
}
|
||||
|
||||
const change = (e: Dayjs) => {
|
||||
emit('update:value', e.format(myFormat))
|
||||
emit('change', e.format(myFormat))
|
||||
const change = (e: string) => {
|
||||
myValue.value = e
|
||||
emit('update:value', e)
|
||||
emit('change', e)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -161,9 +161,8 @@ const metricsCacheOption = ref<any[]>([]) // 缓存指标值
|
|||
|
||||
const handOptionByColumn = (option: any) => {
|
||||
if (option) {
|
||||
console.log(option)
|
||||
termTypeOptions.value = option.termTypes || []
|
||||
metricsCacheOption.value = option.metrics.map((item: any) => ({...item, label: item.name})) || []
|
||||
metricsCacheOption.value = option.metrics?.map((item: any) => ({...item, label: item.name})) || []
|
||||
tabsOptions.value.length = 1
|
||||
tabsOptions.value[0].component = option.dataType
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import { handleParamsData } from './components/Terms/util'
|
|||
import { useSceneStore } from 'store/scene'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import type { FormModelType } from '@/views/rule-engine/Scene/typings'
|
||||
import { isArray } from 'lodash-es'
|
||||
|
||||
interface Params {
|
||||
branch: number
|
||||
|
|
Loading…
Reference in New Issue