From 0fb4504f1ac305f6ec2f61395fd59ea422333a5e Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期一, 06 十一月 2023 16:46:01 +0800 Subject: [PATCH] feat: 调整logo,标题 --- /dev/null | 115 -------------------------------------- src/views/dashboard/components/TaskControl.vue | 14 ++-- index.html | 2 public/favicon.ico | 0 4 files changed, 8 insertions(+), 123 deletions(-) diff --git a/index.html b/index.html index 39aff6e..28e6a80 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8" /> <link rel="icon" href="/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>鐪嬫澘</title> + <title>鏅鸿兘宸ヤ綔鍙�</title> </head> <body> <div id="app"></div> diff --git a/public/favicon.ico b/public/favicon.ico index df36fcf..765befd 100644 --- a/public/favicon.ico +++ b/public/favicon.ico Binary files differ diff --git a/src/views/dashboard/components/CraftInfo.vue b/src/views/dashboard/components/CraftInfo.vue deleted file mode 100644 index 6fd8472..0000000 --- a/src/views/dashboard/components/CraftInfo.vue +++ /dev/null @@ -1,115 +0,0 @@ -<template> - <div class="craft-info"> - <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.name }}</div> - <div class="item-r-b">{{ process.name }}</div> - </div> - <div class="tip-r"> - <img src="~@/assets/images/process-tip.png" alt="" /> - </div> - <div class="tip-current">褰撳墠浣跨敤</div> - <div class="btn"> - <el-button type="primary"> 鏇存柊宸ヨ壓</el-button> - </div> - </div> -</template> -<script setup lang="ts"> -// 宸ヨ壓淇℃伅 -import { toRefs } from 'vue' - -export interface ProcessInfoProps { - process: process -} - -const props = defineProps<ProcessInfoProps>() -const { process } = toRefs(props) -</script> - -<style scoped lang="scss"> -$status-running: #f76c0f; -$status-done: #2c5dbb82; -.font_weight { - font-weight: 600; -} -.craft-info { - width: calc(50% - 35px); - height: 110px; - padding: 23px 10px 10px; - background: $status-done; - border-radius: 8px; - float: left; - overflow: hidden; - font-size: 15px; - position: relative; - margin-bottom: 30px; - - &:nth-of-type(odd) { - margin-right: 30px; - } - - .item-l-bng { - width: 40px; - float: left; - margin-right: 20px; - - img { - width: 100%; - } - } - - .item-r { - width: calc(100% - 60px); - float: left; - line-height: 25px; - color: #fff; - font-size: 16px; - cursor: pointer; - - .item-r-t { - font-size: 16px; - } - - .item-r-b { - font-size: 14px; - } - } - - .tip-r { - position: absolute; - top: 5px; - right: 15px; - width: 20px; - - img { - width: 100%; - } - } - - .tip-current { - background: green; - color: #fff; - position: absolute; - top: 0px; - left: 70px; - width: auto; - padding: 2px 15px; - font-size: 12px; - border-radius: 0px 0px 6px 6px; - } - - .btn { - width: 100px; - position: absolute; - right: 0px; - bottom: 10px; - .el-button--primary { - background: $status-running; - border: 0 !important; - } - } -} -</style> diff --git a/src/views/dashboard/components/TaskControl.vue b/src/views/dashboard/components/TaskControl.vue index 47b9945..3d22b64 100644 --- a/src/views/dashboard/components/TaskControl.vue +++ b/src/views/dashboard/components/TaskControl.vue @@ -42,11 +42,7 @@ </template> </div> </div> - <TaskControlModal - v-model="showTaskControlModal" - :task="task" - @produce-start="emit('shouldReload', task)" - ></TaskControlModal> + <TaskControlModal v-model="showTaskControlModal" :task="task" @produce-start="onProduceStart"></TaskControlModal> </template> <script setup lang="ts"> import type { Task } from '@/api/task' @@ -80,14 +76,14 @@ * 瀹屾垚浠诲姟 */ function finishTaskProduce() { - if (task?.value?.Procedure?.ID) { + if (task?.value && task.value?.Procedure?.ID) { finishTask({ id: task!.value.Procedure.ID }).then( (res) => { ElMessage({ message: '鎿嶄綔鎴愬姛锛�', type: 'success' }) - emit('shouldReload', task.value) + emit('shouldReload', task.value as Task) }, (err) => { console.error(err) @@ -105,6 +101,10 @@ } } +function onProduceStart() { + emit('shouldReload', task!.value as Task) +} + /** * 鏍煎紡鍖栨椂闂存埑 * @param timestamp 鍚庣杩旂殑10浣嶆椂闂存埑 -- Gitblit v1.8.0