From 8eebd3b823c2e477f949b7f06b6e972ec09327df Mon Sep 17 00:00:00 2001 From: Mr.Zhang <710666463@qq.com> Date: 星期二, 22 八月 2023 14:27:22 +0800 Subject: [PATCH] 工序 接口调试 --- screen_standard/src/components/AppLayout.vue | 46 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 36 insertions(+), 10 deletions(-) diff --git a/screen_standard/src/components/AppLayout.vue b/screen_standard/src/components/AppLayout.vue index bcf8abb..ad01b2c 100644 --- a/screen_standard/src/components/AppLayout.vue +++ b/screen_standard/src/components/AppLayout.vue @@ -2,7 +2,7 @@ <div class="content"> <div class="header"> <div class="header-item" style="font-size: 20px;"> - <el-dropdown trigger="click"> + <el-dropdown trigger="click" v-if="route.name=='home'"> <div class="eare-title"> {{ tempCom.name}} <div class="right-icon"> @@ -15,8 +15,10 @@ </el-dropdown-menu> </template> </el-dropdown> - + + <img v-else src="@/assets/img/btn_back@2x.png" style="width: 108px;height: 34px; margin-top: 14px;" @click="router.go(-1)"> </div> + <div class="title">DM浜戝伐鍘傝溅闂村ぇ灞�</div> <div class="header-item right"> @@ -30,7 +32,6 @@ <!-- <img src="@/assets/img/title_line@2x.png" class="right-line" alt=""> --> </div> </div> - <!-- 'background': `url(${getAssets(item.bgImg)})`, --> <div class="num-list"> <div v-for="(item, index) in layoutList" @@ -41,9 +42,8 @@ <img :src="getAssets(item.logo)" alt=""> <div class="item-right"> <div class="item-title">{{ item.name }}</div> - <div class="num-value">1</div> + <div class="num-value">{{ countList[index] }}</div> </div> - </div> </div> <RouterView /> @@ -54,10 +54,12 @@ <script setup> import { getAssets } from '@/utils' import { getDepartmentList } from '@/utils/apis.js' -import { reactive, toRefs, ref, onMounted } from 'vue'; +import { reactive, toRefs, onMounted, computed } from 'vue'; import { useCounterStore } from '@/stores/counter.js' -import { RouterView } from 'vue-router' +import { RouterView, useRoute, useRouter } from 'vue-router' const enterprise = useCounterStore() +const route = useRoute() +const router = useRouter() const layoutList = [ { bgImg: 'bg_zhixingzhong@2x.png', name: '鎵ц涓鍒掓暟(涓�)', logo: 'ic_zhixingzhong@2x.png' }, { bgImg: 'bg_yanqijihua@2x.png', name: '寤舵湡璁″垝鏁�(涓�)', logo: 'ic_yanqijihua@2x.png' }, @@ -65,6 +67,21 @@ { bgImg: 'bg_jinrishebei@2x.png', name: '浠婃棩鐢熶骇璁惧(鍙�)', logo: 'ic_jinrishebei@2x.png' }, { bgImg: 'bg_jinribuliang@2x.png', name: '浠婃棩涓嶈壇鍝佺巼(%)', logo: 'ic_jinribuliang@2x.png' }, ] +const ingNum = computed(() => { + return enterprise.ingNum +}) +const delayNum = computed(() => { + return enterprise.delayNum +}) +const prouserNum = computed(() => { + return enterprise.prouserNum +}) +const deviceNum = computed(() => { + return enterprise.deviceNum +}) +const unqualifiedRate = computed(() => { + return enterprise.unqualifiedRate +}) const data = reactive({ tempCom: { name: '璞嗙背绉戞妧' }, @@ -74,13 +91,21 @@ date: '', day: '' }, - comList: [] + comList: [], + countList: [ + ingNum||0, + delayNum||0, + prouserNum||0, + deviceNum||0, + unqualifiedRate||0 + ] }) -let { tempCom, isFull, tempDate, comList } = toRefs(data) + + +let { tempCom, isFull, tempDate, comList, countList } = toRefs(data) const selectCom = (item, index) => { - console.log(item); data.tempCom = item enterprise.setDepartId(data.tempCom.id) } @@ -114,6 +139,7 @@ } onMounted(() => { + console.log(route.name); getDepartmentList(enterprise.companyId) .then(res => { data.comList = res -- Gitblit v1.9.3