|
@@ -149,16 +149,16 @@
|
|
|
class="fullscreen-image"
|
|
|
alt="放大的图片"/>
|
|
|
</el-dialog>
|
|
|
- <EditDialog :mapType="mapType" :mapState="mapState" ref="editDialogRef" />
|
|
|
+ <EditDialog v-if="mapIsExist" :mapType="mapType" :mapState="mapState" ref="editDialogRef" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="admin/product/bom">
|
|
|
-import {ref, reactive, onMounted, onBeforeMount, computed, defineAsyncComponent} from 'vue'
|
|
|
+import {ref, reactive, onMounted, onBeforeMount, defineAsyncComponent} from 'vue'
|
|
|
import { ComponentTypeApi } from '/@/api/admin/productionManagement/ComponentType'
|
|
|
// import dayjs from 'dayjs'
|
|
|
import eventBus from '/@/utils/mitt'
|
|
|
-import { isImage } from '/@/utils/test'
|
|
|
+// import { isImage } from '/@/utils/test'
|
|
|
import {FileGetPageOutput} from "/@/api/admin/data-contracts";
|
|
|
import {PageInputFileGetPageDto} from "/@/api/admin/productionManagement/ComopnentDto";
|
|
|
import {ComponentGetPageDto} from "/@/api/admin/productionManagement/ComponentTypeDto";
|
|
@@ -206,6 +206,8 @@ const getImg = (url) => {
|
|
|
|
|
|
const editDialogRef = ref()
|
|
|
|
|
|
+const mapIsExist = ref(false)
|
|
|
+
|
|
|
/**部件类型map*/
|
|
|
const mapType = ref(new Map)
|
|
|
|
|
@@ -308,10 +310,11 @@ const initLocalState = async () => {
|
|
|
},new Map());
|
|
|
}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- initLocalType()
|
|
|
- initLocalState()
|
|
|
- onQuery()
|
|
|
+onMounted(async () => {
|
|
|
+ await initLocalType()
|
|
|
+ await initLocalState()
|
|
|
+ await onQuery()
|
|
|
+ mapIsExist.value = true
|
|
|
eventBus.off('refreshView')
|
|
|
eventBus.on('refreshView', async () => {
|
|
|
await onQuery()
|