新增跳转逻辑判断

This commit is contained in:
a0049873 2022-06-14 11:49:37 +08:00
parent f64f44172e
commit 0f1a9d56e0
2 changed files with 24 additions and 6 deletions

View File

@ -118,6 +118,7 @@
</template> </template>
<script setup> <script setup>
import { gongZuoZhuangTai } from '@/api/home.js' import { gongZuoZhuangTai } from '@/api/home.js'
import { message } from 'ant-design-vue'
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
@ -167,10 +168,18 @@
const handleOk = (e) => { const handleOk = (e) => {
let snum = ref({}) let snum = ref({})
if (abilityToTypeFunctionData.value == '组件服务') { if (abilityToTypeFunctionData.value == '组件服务') {
if (!componentTypeValue.value || componentTypeValue.value == '') {
message.error('请选择组件类型!')
return
} else if (componentTypeValue.value !== '智能算法') {
message.error('功能开发中!')
return
} else {
snum.value = { snum.value = {
abilityToType: abilityToTypeFunctionData.value, abilityToType: abilityToTypeFunctionData.value,
componentTypeValue: componentTypeValue.value, componentTypeValue: componentTypeValue.value,
} }
}
} else { } else {
snum.value = { snum.value = {
abilityToType: abilityToTypeFunctionData.value, abilityToType: abilityToTypeFunctionData.value,

View File

@ -229,6 +229,7 @@
<script setup> <script setup>
import { onMounted, reactive, ref } from 'vue' import { onMounted, reactive, ref } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue'
// , reactive // , reactive
import { wodepage, undercarriage } from '@/api/personalCenter' import { wodepage, undercarriage } from '@/api/personalCenter'
import { getUserInfo } from '@/api/user' import { getUserInfo } from '@/api/user'
@ -280,10 +281,18 @@
const handleOk = (e) => { const handleOk = (e) => {
let snum = ref({}) let snum = ref({})
if (abilityToTypeFunctionData.value == '组件服务') { if (abilityToTypeFunctionData.value == '组件服务') {
if (!componentTypeValue.value || componentTypeValue.value == '') {
message.error('请选择组件类型!')
return
} else if (componentTypeValue.value !== '智能算法') {
message.error('功能开发中!')
return
} else {
snum.value = { snum.value = {
abilityToType: abilityToTypeFunctionData.value, abilityToType: abilityToTypeFunctionData.value,
componentTypeValue: componentTypeValue.value, componentTypeValue: componentTypeValue.value,
} }
}
} else { } else {
snum.value = { snum.value = {
abilityToType: abilityToTypeFunctionData.value, abilityToType: abilityToTypeFunctionData.value,