From bd08b30389140909ae7c27223dc1a33bad04da83 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 06 六月 2025 10:35:04 +0800 Subject: [PATCH] 1、实现数据加工程序确认表以及刀具清单打印功能(未联调后端数据) 2、终端故障报修页面开发完成并联调 3、调整终端首页样式 4、增加系统页面访问终端页面的岗位限制功能(登录用户必须为操作工) --- src/views/dnc/base/TerminalIndex.vue | 251 +++++++++++++++++++++++++++++++++---------------- 1 files changed, 168 insertions(+), 83 deletions(-) diff --git a/src/views/dnc/base/TerminalIndex.vue b/src/views/dnc/base/TerminalIndex.vue index 0289c4e..900da25 100644 --- a/src/views/dnc/base/TerminalIndex.vue +++ b/src/views/dnc/base/TerminalIndex.vue @@ -1,109 +1,194 @@ <template> - <div class="page-view-container"> + <div> + <div class="page-header"> + <div>鐜板満鎯呭喌涓婃姤骞冲彴</div> + <span class="username">娆㈣繋鎮紝{{nickname()}}</span> + </div> <slot name="function"/> - <div class="header-container">鐜板満鎯呭喌涓婃姤骞冲彴</div> <div class="content-container"> <a-row> - <a-col :span="8"> - <div class="button" @click="navigateTo('work','涓婄彮')">涓婄彮</div> - </a-col> - <a-col :span="8"> - <div class="button">涓嬬彮</div> - </a-col> - <a-col :span="8"> - <div class="button" @click="navigateTo('fault','璁惧鏁呴殰')">璁惧鏁呴殰</div> - </a-col> + <template v-for="(item,index) in buttonList"> + <a-col :span="6" v-if="index<4"> + <div :class="'button button'+(index+1)" @click="navigateTo(item)"> + <img :src="require(`@/assets/terminal/${item.routePath}.svg`)"/> + <div>{{item.label}}</div> + </div> + </a-col> + </template> </a-row> + <a-row> - <a-col :span="8"> - <div class="button" @click="navigateTo('close','鍋滄満涓婃姤')">鍋滄満涓婃姤</div> - </a-col> - <a-col :span="8"> - <div class="button" @click="navigateTo('spotCheck','鐐规')">鐐规</div> - </a-col> - <a-col :span="8"> - <div class="button">鍚堟牸鐜�</div> - </a-col> - </a-row> - <a-row> - <a-col :span="8"> - <div class="button">绋嬪簭鍛煎彨</div> - </a-col> - <a-col :span="8"> - <div class="button">寮�宸ュ畬宸�</div> - </a-col> - <a-col :span="8"> - <div class="button">绋嬪簭鍥炰紶</div> - </a-col> + <template v-for="(item,index) in buttonList"> + <a-col :span="6" v-if="index>=4"> + <div :class="'button button'+(index+1)" @click="navigateTo(item)"> + <img :src="require(`@/assets/terminal/${item.routePath}.svg`)"/> + <div>{{item.label}}</div> + </div> + </a-col> + </template> </a-row> </div> </div> </template> <script> + import { mapGetters } from 'vuex' + export default { name: 'TerminalIndex', + data() { + return { + buttonList: [ + { + label: '涓婁笅鐝�', + routePath: 'work', + isOpenNewPage: false + }, + { + label: '鏁呴殰鎶ヤ慨', + routePath: 'fault', + isOpenNewPage: false + }, + { + label: '鍋滄満涓婃姤', + routePath: 'close', + isOpenNewPage: false + }, + { + label: '鐐规', + routePath: 'spotCheck', + isOpenNewPage: true + }, + { + label: '鍚堟牸鐜�', + routePath: 'passRate', + isOpenNewPage: false + }, + { + label: '绋嬪簭鍛煎彨', + routePath: 'call', + isOpenNewPage: false + }, + { + label: '浜屼繚', + routePath: 'maintenance', + isOpenNewPage: true + }, + { + label: '涓変繚', + routePath: 'maintenance', + isOpenNewPage: true + } + ] + } + }, methods: { - navigateTo(url, projectTitle) { - this.$router.push('/terminal/' + url) - document.title = 'MDC鏅烘収杞﹂棿-' + projectTitle + ...mapGetters(['nickname']), + + navigateTo(record) { + if (!record.isOpenNewPage) this.$router.push('/terminal/' + record.routePath) + else { + window.open(this.$router.resolve('/flowable/workflow/FlowTodo').href, '_blank') + return + } + document.title = record.label + '-MDC鏅烘収杞﹂棿' } } } </script> <style scoped lang="less"> - .page-view-container { - background: linear-gradient(to bottom, #fff -15%, #000 55%,); + .page-header { + font-size: 2vw; + color: #000; + display: flex; + justify-content: space-between; + margin-bottom: 1vw; - .header-container { - font-size: 50px; - color: #eee; - text-align: center; - height: 15%; - display: flex; - justify-content: center; - align-items: flex-end; - -webkit-align-items: flex-end; - } - - .content-container { - flex: 1; - display: flex; - flex-direction: column; - padding: 3% 10%; - - .ant-row { - flex: 1; - - .ant-col { - height: 100%; - display: flex; - justify-content: center; - align-items: center; - - .button { - width: 250px; - height: 125px; - display: flex; - justify-content: center; - align-items: center; - background-color: #E3F2D9; - font-size: 45px; - border: 2px solid #33579D; - box-shadow: inset -5px 5px 12px rgba(0, 0, 0, 0.6); - cursor: pointer; - transition: all .1s ease-in-out; - - &:hover { - transform: scale(1.05); - } - } - } - /*display: flex;*/ - /*flex-direction: column;*/ - } + span { + font-size: 1.3vw; + color: #999; } } + .content-container { + flex: 1; + display: flex; + flex-direction: column; + padding: 3% 10%; + + .ant-row { + flex: 1; + + .ant-col { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + + .button { + width: 9.63vw; + height: 9.38vw; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 1.3vw; + color: #fff; + border-radius: 1vw; + cursor: pointer; + transition: all .1s ease-in-out; + + img { + width: 2.6vw; + margin-bottom: 0.8vw; + } + + &:hover { + transform: scale(1.05); + } + + &.button1 { + background: linear-gradient(top, #5ADEAD, #3BC3A6); + background: -webkit-linear-gradient(top, #5ADEAD, #3BC3A6); + } + + &.button2 { + background: linear-gradient(top, #76A9FA, #5B8CF3); + background: -webkit-linear-gradient(top, #76A9FA, #5B8CF3); + } + + &.button3 { + background: linear-gradient(top, #FAB976, #FB9557); + background: -webkit-linear-gradient(top, #FAB976, #FB9557); + } + + &.button4 { + background: linear-gradient(top, #5FC2F9, #45A4F4); + background: -webkit-linear-gradient(top, #5FC2F9, #45A4F4); + } + + &.button5 { + background: linear-gradient(top, #62F2EA, #55D6CE); + background: -webkit-linear-gradient(top, #62F2EA, #55D6CE); + } + + &.button6 { + background: linear-gradient(top, #91A0F5, #6D7CF7); + background: -webkit-linear-gradient(top, #91A0F5, #6D7CF7); + } + + &.button7 { + background: linear-gradient(top, #FF6A5A, #DB5A50); + background: -webkit-linear-gradient(top, #FF6A5A, #DB5A50); + } + + &.button8 { + background: linear-gradient(top, #FFF248, #EADE46); + background: -webkit-linear-gradient(top, #FFF248, #EADE46); + } + } + } + } + } </style> \ No newline at end of file -- Gitblit v1.9.3