| | |
| | | import { ref, toRefs, watch } from 'vue' |
| | | import type { CraftModel } from '@/api/craftModel' |
| | | export interface CraftDetailModalProps { |
| | | craftModel?: CraftModel |
| | | activeArr: Array |
| | | craftModel: CraftModel |
| | | activeArr: string[] |
| | | modelValue: boolean |
| | | } |
| | | const props = withDefaults(defineProps<CraftDetailModalProps>(), { |
| | | craftModel: undefined, |
| | | modelValue: false |
| | | }) |
| | | const { craftModel, activeArr, modelValue } = toRefs(props) |
| | |
| | | }) |
| | | function getLoading() { |
| | | for (let i in activeArr.value) { |
| | | if (activeArr.value[i] == craftModel.value.number) { |
| | | if (activeArr.value[i] == craftModel?.value?.number) { |
| | | isUpdate.value = 2 |
| | | loading.value = true |
| | | return true |
| | |
| | | |
| | | function updateProcess() { |
| | | isUpdate.value = 2 |
| | | if (active.value) { |
| | | if (loading.value) { |
| | | return true |
| | | } |
| | | // 请求更新接口 获得数据之后isLoading.value=false; |
| | | emit('renew', craftModel.value, true) |
| | | emit('renew', craftModel?.value, true) |
| | | } |
| | | //TODO: 工艺详情弹窗 |
| | | </script> |