fix: bug#10787、10786

This commit is contained in:
xieyonghong 2023-03-23 09:31:29 +08:00
parent a8478617cd
commit 5600e49b87
8 changed files with 67 additions and 17 deletions

View File

@ -1,8 +1,11 @@
<template>
<ConfigProvider :locale='zhCN'>
<keep-alive>
<!-- <router-view v-slot="{ Component }">-->
<!-- <keep-alive>-->
<!-- <component :is="Component" />-->
<!-- </keep-alive>-->
<!-- </router-view>-->
<router-view />
</keep-alive>
</ConfigProvider>
</template>

View File

@ -1,5 +1,5 @@
<template>
<div class='actions-branches-item'>
<div class='manual actions-branches-item'>
<j-form-item
:rules="actionRules"
:name="['branches', 0, 'then']"
@ -32,6 +32,21 @@ const actionRules = [{
</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>

View File

@ -53,9 +53,9 @@ const cancel = () => {
emit("cancel")
}
watchEffect(() => {
addModel.timer = props.value
})
// watchEffect(() => {
// addModel.timer = props.value
// })
</script>

View File

@ -2,7 +2,7 @@
<div class='timer'>
<j-form-item
:rules="rules"
name="timer"
:name="['trigger', 'timer']"
>
<template #label>
<TitleComponent data='触发规则' style='font-size: 14px;' />
@ -49,6 +49,7 @@ const visible = ref(false)
const rules = [{
validator(_: any, v: any) {
console.log(v)
if (!v) {
return Promise.reject(new Error('请配置定时触发规则'));
}
@ -85,5 +86,21 @@ const save = (_data: OperationTimer, options: Record<string, any>) => {
}
</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>

View File

@ -59,7 +59,9 @@ const allActive = computed(() => {
watch(() => props.type, () => {
const isMonth = props.type === 'month'
const day = isMonth ? 31 : 7
if (!props.value.length) {
change(0)
}
timeOptions.value = new Array(day)
.fill(1)
.map((_, index) => {

View File

@ -57,15 +57,17 @@ const classNames = computed(() => {
})
const handleClick = (type: string) => {
if (!props.disabled) {
emit('update:modelValue', type)
}
}
</script>
<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;
gap: 16px 24px;
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>

View File

@ -300,7 +300,7 @@ const getActions = (
];
if (data.triggerType === 'manual') {
const _item: ActionsType = {
key: 'trigger',
key: 'tigger',
text: '手动触发',
disabled: data.state?.value === 'disable',
tooltip: {

View File

@ -92,8 +92,8 @@ export default defineConfig(({ mode}) => {
[env.VITE_APP_BASE_API]: {
// target: 'http://192.168.33.22:8800',
// target: 'http://192.168.32.244:8881',
// target: 'http://120.77.179.54:8844', // 120测试
target: 'http://192.168.33.46:8844', // 本地开发环境
target: 'http://120.77.179.54:8844', // 120测试
// target: 'http://192.168.33.46:8844', // 本地开发环境
ws: 'ws://192.168.33.46:8844',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')