fix: bug#10787、10786
This commit is contained in:
parent
a8478617cd
commit
5600e49b87
|
@ -1,8 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<ConfigProvider :locale='zhCN'>
|
<ConfigProvider :locale='zhCN'>
|
||||||
<keep-alive>
|
<!-- <router-view v-slot="{ Component }">-->
|
||||||
<router-view />
|
<!-- <keep-alive>-->
|
||||||
</keep-alive>
|
<!-- <component :is="Component" />-->
|
||||||
|
<!-- </keep-alive>-->
|
||||||
|
<!-- </router-view>-->
|
||||||
|
<router-view />
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class='actions-branches-item'>
|
<div class='manual actions-branches-item'>
|
||||||
<j-form-item
|
<j-form-item
|
||||||
:rules="actionRules"
|
:rules="actionRules"
|
||||||
:name="['branches', 0, 'then']"
|
:name="['branches', 0, 'then']"
|
||||||
|
@ -32,6 +32,21 @@ const actionRules = [{
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang='less'>
|
||||||
|
@minWidth: 75%;
|
||||||
|
|
||||||
|
.manual {
|
||||||
|
&.actions-branches-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (min-width: 1600px) {
|
||||||
|
.manual {
|
||||||
|
&.actions-branches-item {
|
||||||
|
width: @minWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -53,9 +53,9 @@ const cancel = () => {
|
||||||
emit("cancel")
|
emit("cancel")
|
||||||
}
|
}
|
||||||
|
|
||||||
watchEffect(() => {
|
// watchEffect(() => {
|
||||||
addModel.timer = props.value
|
// addModel.timer = props.value
|
||||||
})
|
// })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class='timer'>
|
<div class='timer'>
|
||||||
<j-form-item
|
<j-form-item
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
name="timer"
|
:name="['trigger', 'timer']"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<TitleComponent data='触发规则' style='font-size: 14px;' />
|
<TitleComponent data='触发规则' style='font-size: 14px;' />
|
||||||
|
@ -49,6 +49,7 @@ const visible = ref(false)
|
||||||
|
|
||||||
const rules = [{
|
const rules = [{
|
||||||
validator(_: any, v: any) {
|
validator(_: any, v: any) {
|
||||||
|
console.log(v)
|
||||||
if (!v) {
|
if (!v) {
|
||||||
return Promise.reject(new Error('请配置定时触发规则'));
|
return Promise.reject(new Error('请配置定时触发规则'));
|
||||||
}
|
}
|
||||||
|
@ -85,5 +86,21 @@ const save = (_data: OperationTimer, options: Record<string, any>) => {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang='less'>
|
||||||
|
@minWidth: 75%;
|
||||||
|
|
||||||
|
.timer {
|
||||||
|
.actions-branches-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (min-width: 1600px) {
|
||||||
|
.timer {
|
||||||
|
.actions-branches-item {
|
||||||
|
width: @minWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -59,7 +59,9 @@ const allActive = computed(() => {
|
||||||
watch(() => props.type, () => {
|
watch(() => props.type, () => {
|
||||||
const isMonth = props.type === 'month'
|
const isMonth = props.type === 'month'
|
||||||
const day = isMonth ? 31 : 7
|
const day = isMonth ? 31 : 7
|
||||||
change(0)
|
if (!props.value.length) {
|
||||||
|
change(0)
|
||||||
|
}
|
||||||
timeOptions.value = new Array(day)
|
timeOptions.value = new Array(day)
|
||||||
.fill(1)
|
.fill(1)
|
||||||
.map((_, index) => {
|
.map((_, index) => {
|
||||||
|
|
|
@ -57,15 +57,17 @@ const classNames = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleClick = (type: string) => {
|
const handleClick = (type: string) => {
|
||||||
emit('update:modelValue', type)
|
if (!props.disabled) {
|
||||||
|
emit('update:modelValue', type)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='less'>
|
<style scoped lang='less'>
|
||||||
// @import 'ant-design-vue/es/style/themes/default.less';
|
|
||||||
|
|
||||||
.scene-trigger-way-warp {display: flex;
|
.scene-trigger-way-warp {
|
||||||
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 16px 24px;
|
gap: 16px 24px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -115,5 +117,16 @@ const handleClick = (type: string) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
color: rgba(#000, .8);
|
||||||
|
.way-item-image {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trigger-way-item {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -300,7 +300,7 @@ const getActions = (
|
||||||
];
|
];
|
||||||
if (data.triggerType === 'manual') {
|
if (data.triggerType === 'manual') {
|
||||||
const _item: ActionsType = {
|
const _item: ActionsType = {
|
||||||
key: 'trigger',
|
key: 'tigger',
|
||||||
text: '手动触发',
|
text: '手动触发',
|
||||||
disabled: data.state?.value === 'disable',
|
disabled: data.state?.value === 'disable',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|
|
@ -92,8 +92,8 @@ export default defineConfig(({ mode}) => {
|
||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
// target: 'http://192.168.33.22:8800',
|
// target: 'http://192.168.33.22:8800',
|
||||||
// target: 'http://192.168.32.244:8881',
|
// target: 'http://192.168.32.244:8881',
|
||||||
// target: 'http://120.77.179.54:8844', // 120测试
|
target: 'http://120.77.179.54:8844', // 120测试
|
||||||
target: 'http://192.168.33.46:8844', // 本地开发环境
|
// target: 'http://192.168.33.46:8844', // 本地开发环境
|
||||||
ws: 'ws://192.168.33.46:8844',
|
ws: 'ws://192.168.33.46:8844',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, '')
|
rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
|
Loading…
Reference in New Issue