From 61dedbff9e9965eda9c91be5cc0e64f0db7db22e Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期一, 06 十一月 2023 17:46:30 +0800
Subject: [PATCH] feat: 过长文本截断,调整日期组件防止换行

---
 src/views/dashboard/components/ProcessInfo.vue |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/src/views/dashboard/components/ProcessInfo.vue b/src/views/dashboard/components/ProcessInfo.vue
index 39bc74d..95ba326 100644
--- a/src/views/dashboard/components/ProcessInfo.vue
+++ b/src/views/dashboard/components/ProcessInfo.vue
@@ -3,26 +3,39 @@
     <div class="item-l-bng">
       <img src="~@/assets/images/process-model.png" />
     </div>
-    <div class="item-r">
-      <div class="item-r-t font_weight">{{ process.number }}</div>
-      <div class="item-r-b">{{ process.product }}</div>
-      <div class="item-r-b">{{ process.procedure }}</div>
+    <div class="item-r" @click="onDetailClick">
+      <div class="item-r-t font_weight">{{ craftModel.number }}</div>
+      <div class="item-r-b">浜у搧: {{ craftModel.product }}</div>
+      <div class="item-r-b">宸ヨ壓: {{ craftModel.procedure }}</div>
     </div>
-    <div v-if="process.isUpdate" class="tip-r">
+    <div v-if="craftModel.isUpdate" class="tip-r">
       <img src="~@/assets/images/process-tip.png" />
     </div>
-    <div v-if="process.isUpdate" class="tip-current">褰撳墠浣跨敤</div>
+    <div v-if="craftModel.isUpdate" class="tip-current">褰撳墠浣跨敤</div>
     <div class="btn">
-      <el-button type="primary" class="color_organge"> 鏇存柊宸ヨ壓 </el-button>
+      <el-button type="primary" @click="onUpdateClick"> 鏇存柊宸ヨ壓 </el-button>
     </div>
   </div>
 </template>
 <script setup lang="ts">
 import { toRefs } from 'vue'
+import type { CraftModel } from '@/api/craftModel'
 const props = defineProps<{
-  process: { product: '浜у搧鍚嶇О'; number: '111'; procedure: '宸ヨ壓鍚嶇О'; isUpdate: true }
+  craftModel: CraftModel
 }>()
-const { process } = toRefs(props)
+const { craftModel } = toRefs(props)
+
+const emit = defineEmits<{
+  update: [craftModel: CraftModel]
+  detail: [craftModel: CraftModel]
+}>()
+
+function onDetailClick() {
+  emit('detail', craftModel.value)
+}
+function onUpdateClick() {
+  emit('update', craftModel.value)
+}
 </script>
 
 <style scoped lang="scss">
@@ -38,7 +51,7 @@
   padding: 23px 10px 10px;
   background: $status-done;
   border-radius: 8px;
-  float: left;
+  //float: left;
   overflow: hidden;
   font-size: 15px;
   position: relative;

--
Gitblit v1.8.0