From 13f102240d9c0c9d5a133fb093551f2e08d7c55c Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 19 一月 2024 16:47:41 +0800
Subject: [PATCH] ie不支持es6的问题,安装插件,配置
---
src/views/dashboard/components/InputOutMaterialInfo.vue | 57 +++++++++++++++++++++++++++------------------------------
1 files changed, 27 insertions(+), 30 deletions(-)
diff --git a/src/views/dashboard/components/InputOutMaterialInfo.vue b/src/views/dashboard/components/InputOutMaterialInfo.vue
index fa0766c..35e858a 100644
--- a/src/views/dashboard/components/InputOutMaterialInfo.vue
+++ b/src/views/dashboard/components/InputOutMaterialInfo.vue
@@ -4,57 +4,55 @@
<div class="card-t-t card_drop">
<el-popover :width="200" placement="top-start" trigger="click">
<template #reference>
- {{ item.materialId }}
+ {{ material.materialId }}
</template>
- {{ item.materialId }}
+ {{ material.materialId }}
</el-popover>
</div>
<div class="card-t-b">
- 璁惧12
- <el-icon class="right-arrow">
- <Right />
- </el-icon>
- 璁惧13
+ <!-- TODO: 鎺ュ彛缂哄け鏁版嵁, 寰呮坊鍔�-->
+ <!-- 璁惧12-->
+ <!-- <el-icon class="right-arrow">-->
+ <!-- <Right />-->
+ <!-- </el-icon>-->
+ <!-- 璁惧13-->
</div>
</div>
<div class="card-b">
<div class="card_drop card-b-l">
<el-popover :width="200" placement="top-start" trigger="click">
<template #reference>
- {{ item.materialName }}
+ {{ material.materialName }}
</template>
- {{ item.materialName }}
+ {{ material.materialName }}
</el-popover>
</div>
<div class="card-b-r">
- <el-popover v-if="item.date" popper-class="card-info" :width="110" placement="top" trigger="click">
- <template #reference> {{ item.amount }} {{ item.unit }} </template>
- 棰勮{{ item.date }}鍒嗛挓閫佽揪
+ <el-popover v-if="material.date" popper-class="card-info" :width="110" placement="top" trigger="click">
+ <template #reference> {{ material.amount }} {{ material.unit }} </template>
+ 棰勮{{ material.date }}鍒嗛挓閫佽揪
</el-popover>
- <div v-else>{{ item.amount }} {{ item.unit }}</div>
+ <div v-else>{{ material.amount }} {{ material.unit }}</div>
</div>
</div>
</div>
- <MaterialDetails v-model="showModal"></MaterialDetails>
</template>
<script setup lang="ts">
-import type { inputMaterial } from '@/api/task'
-import MaterialDetails from '@/views/dashboard/components/MaterialDetails.vue'
-import { Right } from '@element-plus/icons-vue'
-import { ref, toRefs } from 'vue'
+import type { Material } from '@/api/task'
+import { toRefs } from 'vue'
export interface InputOutMaterialInfoProps {
- item: inputMaterial
- background?: string
+ material: Material
+ // TODO: 鎺ュ彛杩樹笉鏀寔, 棰勭暀
+ type?: '宸查�佽揪' | '杩愯緭涓�'
}
-const props = withDefaults(defineProps<InputOutMaterialInfoProps>(), {
- background: '#ffcc00'
-})
-const { item, background } = toRefs(props)
-const showModal = ref(false)
-
+const props = defineProps<InputOutMaterialInfoProps>()
+const { material } = toRefs(props)
+const emits = defineEmits<{
+ detailClick: [material: Material]
+}>()
function materialInfoClick() {
- showModal.value = true
+ emits('detailClick', material.value)
}
</script>
@@ -93,8 +91,7 @@
font-size: 12px;
color: #333;
padding: 3px 5px;
- // background: $status-done;
- background-color: v-bind(background);
+ background: $status-done;
text-align: left;
.card-t-t {
width: 100%;
@@ -126,7 +123,7 @@
background: red !important;
font-size: 12px;
color: #fff;
- border: 0px;
+ border: 0;
border-radius: 10px;
// height:20px!important;
line-height: 8px !important;
--
Gitblit v1.8.0