| | |
| | | <template #title>工艺详情 </template> |
| | | <div v-if="craftModel" class="modal-content"> |
| | | <el-scrollbar always class="scroller"> |
| | | <div :class="!craftModel?.isUpdate ? 'modal-t margin_bottom_20' : 'modal-t modal-t-two'"> |
| | | <div :class="craftModel?.isUpdate ? 'modal-t margin_bottom_20' : 'modal-t modal-t-two'"> |
| | | <div class="modal-t-l"> |
| | | <div class="modal-t-l-t">{{ craftModel?.procedure }}</div> |
| | | <div class="modal-t-l-b"> |
| | |
| | | </div> |
| | | <div class="modal-t-r">工艺编号:{{ craftModel?.number }}</div> |
| | | </div> |
| | | <div v-if="!craftModel?.isUpdate" class="modal-b"> |
| | | <div v-if="craftModel?.isUpdate" class="modal-b"> |
| | | <div class="modal-b-t">更新设置</div> |
| | | <template v-if="isUpdate == 1"> |
| | | <div class="modal-b-m"> |
| | |
| | | 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>(), { |
| | |
| | | }) |
| | | 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 |
| | | } |
| | | } |
| | | isUpdate.value = 1 |
| | | loading.value = false |
| | | } |
| | | |
| | | 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> |