yangfeng
2023-12-12 1519870c0e18171ced014a840e86a459dc6b00f1
src/views/dashboard/components/CraftDetailModal.vue
@@ -4,7 +4,7 @@
      <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">
@@ -13,7 +13,7 @@
            </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">
@@ -68,8 +68,8 @@
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>(), {
@@ -97,22 +97,23 @@
})
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>