From 32ed00c714be5bfdc188ac863f07c50fd155dd4c Mon Sep 17 00:00:00 2001 From: wanglin <1061700827@qq.com> Date: Thu, 13 Jul 2023 16:40:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=A6=96=E9=A1=B5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/views/Home.vue | 227 +++++++++++------- .../src/views/staff/perform/stat/list.vue | 4 +- 2 files changed, 143 insertions(+), 88 deletions(-) diff --git a/attendance-performance-manager-ui/admin/src/views/Home.vue b/attendance-performance-manager-ui/admin/src/views/Home.vue index e44f78f5..423ba742 100644 --- a/attendance-performance-manager-ui/admin/src/views/Home.vue +++ b/attendance-performance-manager-ui/admin/src/views/Home.vue @@ -5,17 +5,17 @@ <el-col :span="6" :xs="12"> <el-card> <div class="data_left"> - <div class="title">浠婃棩鏁版嵁娲炲療</div> + <div class="title" style="margin-bottom:40px">浠婃棩鏁版嵁娲炲療</div> <div class="cell1"> <div class="title">浜轰簨鏁版嵁</div> <div class="datas flex flex-align-center flex-pack-justify flex_warp"> <div class="item"> <div>鎬讳汉鏁�</div> - <div>999</div> + <div>{{homeStat.totalPersonNum}}</div> </div> <div class="item"> <div>閮ㄩ棬浜烘暟</div> - <div>20</div> + <div>{{homeStat.totalDeptNum}}</div> </div> </div> </div> @@ -24,15 +24,27 @@ <div class="datas flex flex-align-center flex-pack-justify flex_warp"> <div class="item"> <div>鎵撳崱浜烘暟</div> - <div>999</div> + <div>{{homeStat.attendPersonNum}}</div> </div> <div class="item"> <div>鍑哄嫟鐜�</div> - <div>20</div> + <div>{{homeStat.attendRadio}}%</div> </div> <div class="item"> <div>璇峰亣浜烘暟</div> - <div>20</div> + <div>{{homeStat.levealPersonNum}}</div> + </div> + <div class="item"> + <div>杩熷埌浜烘暟</div> + <div>{{homeStat.latePersonNum}}</div> + </div> + <div class="item"> + <div>鏃╅€€浜烘暟</div> + <div>{{homeStat.leftEarlyPersonNum}}</div> + </div> + <div class="item"> + <div>缂哄崱浜烘暟</div> + <div>{{homeStat.missCardPersonNum}}</div> </div> </div> </div> @@ -48,11 +60,12 @@ 鍒涙柊鎬т笌鎶€鏈€х殑閲嶈鏀拺浠ュ強鏁堣兘鎬т笌鍙戝睍鎬х殑涓嶆噲杩芥眰 </div> <div class="selectBars flex flex-align-center flex-pack-justify flex_warp"> - <div class="Bar_item" v-for="(item,index) in barList" :key="index" @click="tabChildren(item.barName)"> + <div class="Bar_item" v-for="(item, index) in barList" :key="index" + @click="tabChildren(item.barName)"> <div class="icon"> <img :src="item.icon"> </div> - <div class="barnam">{{item.barName}}</div> + <div class="barnam">{{ item.barName }}</div> <div class="des" v-html="item.desc"></div> </div> </div> @@ -73,178 +86,220 @@ export default { return this.mapMenu(this.userData.barList) } }, - data(){ - return{ - barList:[ + data() { + return { + // 鏁版嵁娲炲療 + homeStat:{ + totalPersonNum:0,//鎬讳汉鏁� + totalDeptNum:0,//閮ㄩ棬鏁� + attendPersonNum:0,//鑰冨嫟浜烘暟 + attendRadio:0,//鍑哄嫟鐜� + levealPersonNum:0,//璇峰亣浜烘暟 + latePersonNum:0,//杩熷埌浜烘暟 + leftEarlyPersonNum:0,//鏃╅€€浜烘暟 + missCardPersonNum:0,//缂哄崱浜烘暟 + }, + barList: [ { - icon:require('@/assets/images/u148.png'), - barName:'鏅鸿兘浜轰簨', - desc:'鎻愪緵鍖呮嫭缁勭粐绠$悊銆佽亴浣嶇鐞嗐€佷汉浜嬬鐞嗐€佷汉浜�<br>缁熻鎶ヨ〃绛夌浉鍏冲姛鑳�', - navList:[] + icon: require('@/assets/images/u148.png'), + barName: '鏅鸿兘浜轰簨', + desc: '鎻愪緵鍖呮嫭缁勭粐绠$悊銆佽亴浣嶇鐞嗐€佷汉浜嬬鐞嗐€佷汉浜�<br>缁熻鎶ヨ〃绛夌浉鍏冲姛鑳�', + navList: [] }, { - icon:require('@/assets/images/u153.png'), - barName:'鑰冨嫟鎵撳崱', - desc:'鎻愪緵鍖呮嫭缁勭粐绠$悊銆佽亴浣嶇鐞嗐€佷汉浜嬬鐞嗐€佷汉浜�<br>缁熻鎶ヨ〃绛夌浉鍏冲姛鑳�', - navList:[] + icon: require('@/assets/images/u153.png'), + barName: '鑰冨嫟鎵撳崱', + desc: '鎻愪緵鍖呮嫭缁勭粐绠$悊銆佽亴浣嶇鐞嗐€佷汉浜嬬鐞嗐€佷汉浜�<br>缁熻鎶ヨ〃绛夌浉鍏冲姛鑳�', + navList: [] }, { - icon:require('@/assets/images/u158.png'), - barName:'缁╂晥绠$悊', - desc:'鏍规嵁閮ㄩ棬/涓汉鎵挎媴鐨勭洰鏍囧拰浠诲姟瀹屾垚鎯呭喌浠ュ強宸ヤ綔<br>璇勪环缁撴灉銆佸姞鍑忓垎绾疄鐜拌€冩牳缁撴灉鑷姩鐢熸垚銆�', - navList:[] + icon: require('@/assets/images/u158.png'), + barName: '缁╂晥绠$悊', + desc: '鏍规嵁閮ㄩ棬/涓汉鎵挎媴鐨勭洰鏍囧拰浠诲姟瀹屾垚鎯呭喌浠ュ強宸ヤ綔<br>璇勪环缁撴灉銆佸姞鍑忓垎绾疄鐜拌€冩牳缁撴灉鑷姩鐢熸垚銆�', + navList: [] }, { - icon:require('@/assets/images/u167.png'), - barName:'OA瀹℃壒', - desc:'鏃犵焊鍖栧鎵规祦绋嬶紝杞绘澗瀹屾垚鎵撳崱璇峰亣銆佺Щ鍔ㄥ鎵圭瓑<br>鎿嶄綔锛屽鎵硅祫鏂欐煡鎵炬柟渚�', - navList:[] + icon: require('@/assets/images/u167.png'), + barName: 'OA瀹℃壒', + desc: '鏃犵焊鍖栧鎵规祦绋嬶紝杞绘澗瀹屾垚鎵撳崱璇峰亣銆佺Щ鍔ㄥ鎵圭瓑<br>鎿嶄綔锛屽鎵硅祫鏂欐煡鎵炬柟渚�', + navList: [] }, { - icon:require('@/assets/images/u172.png'), - barName:'鏁版嵁鍒嗘瀽', - desc:'瀹屾暣鍥㈤槦缁忚惀鐘舵€佺殑鏁板瓧鍖栵紝浜鸿储鐗╀簨鏁版嵁鍒嗘瀽<br>灞曠ず锛屼负绠$悊鎻愪緵鏅鸿兘鍐崇瓥渚濇嵁', - navList:[] + icon: require('@/assets/images/u172.png'), + barName: '鏁版嵁鍒嗘瀽', + desc: '瀹屾暣鍥㈤槦缁忚惀鐘舵€佺殑鏁板瓧鍖栵紝浜鸿储鐗╀簨鏁版嵁鍒嗘瀽<br>灞曠ず锛屼负绠$悊鎻愪緵鏅鸿兘鍐崇瓥渚濇嵁', + navList: [] }, { - icon:require('@/assets/images/u177.png'), - barName:'绯荤粺璁剧疆', - desc:'鎻愪緵鍖呮嫭RBAC鐢ㄦ埛-瑙掕壊-鏉冮檺绠$悊銆佺増鏈鐞嗐€�<br>鎿嶄綔鍙婄櫥褰曟棩蹇楃鐞嗙瓑鍔熻兘', - navList:[] + icon: require('@/assets/images/u177.png'), + barName: '绯荤粺璁剧疆', + desc: '鎻愪緵鍖呮嫭RBAC鐢ㄦ埛-瑙掕壊-鏉冮檺绠$悊銆佺増鏈鐞嗐€�<br>鎿嶄綔鍙婄櫥褰曟棩蹇楃鐞嗙瓑鍔熻兘', + navList: [] } ] } }, - created(){ - this.$store.commit('setHeadBar',[]) - this.$store.commit("setCurrentParentName",'') - this.$store.commit('setCurrentThirdArr',[]) - this.$store.commit('setCurrentSecondPath','') - this.$store.commit('setThirdPath','') + created() { + this.$store.commit('setHeadBar', []) + this.$store.commit("setCurrentParentName", '') + this.$store.commit('setCurrentThirdArr', []) + this.$store.commit('setCurrentSecondPath', '') + this.$store.commit('setThirdPath', '') + this.homeNum() }, - methods:{ + methods: { - tabChildren(name){ - console.log("name:"+name) - this.$store.commit("setCurrentParentName",name)//瀛樺偍閫夋嫨璺敱 + tabChildren(name) { + console.log("name:" + name) + this.$store.commit("setCurrentParentName", name)//瀛樺偍閫夋嫨璺敱 let result = this.menu.find(item => item.name === name) - this.$store.commit('setHeadBar',result) + this.$store.commit('setHeadBar', result) - console.log("result:",result) + console.log("result:", result) // 璺敱璺宠浆 - if(result.children.length>0){ - this.$store.commit('setCurrentThirdArr',result.children[0].children) - this.$store.commit('setCurrentSecondPath',result.children[0].path) - this.$store.commit('setThirdPath',result.children[0].path) - this.$router.push({path:result.children[0].path}) - }else{ + if (result.children.length > 0) { + this.$store.commit('setCurrentThirdArr', result.children[0].children) + this.$store.commit('setCurrentSecondPath', result.children[0].path) + this.$store.commit('setThirdPath', result.children[0].path) + this.$router.push({ path: result.children[0].path }) + } else { this.$message.error('鏆傛湭瀹屾垚娣诲姞'); } }, - mapMenu(arr){ - if(arr.length === 0) return [] - let result = arr.map(item => { - const url = item.url - ? item.url - : item.childList[0] - ? item.childList[0].url || "" - : ""; + mapMenu(arr) { + if (arr.length === 0) return [] + let result = arr.map(item => { + const url = item.url + ? item.url + : item.childList[0] + ? item.childList[0].url || "" + : ""; return { name: item.name, path: url, id: item.id, icon: item.imgPath, - children:item.childList.length === 0? []:this.mapMenu(item.childList) + children: item.childList.length === 0 ? [] : this.mapMenu(item.childList) } - }) - return result + }) + return result }, + // 鏌ヨ缁熻鏁版嵁 + homeNum() { + this.$post("/login/index").then((res) => { + const { code, data } = res + if (code == 1) { + this.homeStat = Object.assign({},this.homeStat,data.homeStat) + console.log(data,"####") + } + }); + } } } </script> <style scoped lang="less"> -.page-home{ +.page-home { width: 100%; min-width: 1400px; height: 100vh; box-sizing: border-box; // padding: 2% 5%; background-color: #f3f2f2; - .data_left{ - .cell1{ + + .data_left { + padding: 50px 20px 0 20px; + + .cell1 { font-size: 16px; - .title{ + + .title { color: #409EFF; margin-bottom: 20px; } - .item{ + + .item { text-align: left; width: 50%; margin-bottom: 20px; } - .item div:first-child{ + + .item div:first-child { color: gray; margin-bottom: 20px; } + border-bottom: 1px solid rgb(245, 245, 245); padding: 10px 0; } - .cell1:last-child{ - border:none + + .cell1:last-child { + border: none } } + // 鏁版嵁鏍囬 - .data_left>.title,.data_right>.title{ + .data_left>.title, + .data_right>.title { text-align: center; font-size: 22px; font-weight: bold; } - .right_card{ + + .right_card { background-image: url('~@/assets/images/u162.svg'); background-repeat: no-repeat; background-size: 100% auto; background-position: bottom; } + // 瀵艰埅鏍� - .data_right{ - .textWord{ + .data_right { + padding-top: 40px; + .textWord { text-align: center; margin-top: 30px; font-size: 16px; line-height: 1.5em; } } - .selectBars{ + + .selectBars { padding: 0 20px; } - .Bar_item{ + + .Bar_item { width: 30%; margin-top: 50px; border-radius: 10px; padding: 20px 0; text-align: center; - background: linear-gradient(90deg, rgba(187, 193, 255,0.3), rgb(235, 235, 235)); + background: linear-gradient(90deg, rgba(187, 193, 255, 0.3), rgb(235, 235, 235)); cursor: pointer; - .icon img{ + + .icon img { width: 40px; height: 40px; } - .barnam{ + + .barnam { font-size: 18px; margin-top: 10px; } - .des{ + + .des { font-size: 14px; color: #666; margin-top: 15px; } } } -::v-deep .el-row,::v-deep .el-col{ + +::v-deep .el-row, +::v-deep .el-col { height: 100%; } -::v-deep .el-card{ + +::v-deep .el-card { height: 100%; -} -</style> +}</style> diff --git a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue index 2acc8aef..54802614 100644 --- a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue +++ b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue @@ -143,7 +143,7 @@ + 鍒涘缓鐩爣</el-button > </div> - <div class="mid_content"> + <div class="mid_content" style="height: auto;"> <div class="goal_box" v-for="(val, i) in dataList" :key="i"> <div class="goal_title"> <img src="../../../../assets/images/u17641.svg" alt="" /> @@ -556,7 +556,7 @@ export default { },//鐪嬫澘鏌ヨ鏉′欢 query:{ page:1, - size:8, + size:-1, assessmentScope:1//鑰冩牳鑼冨洿(1.閮ㄩ棬,2.涓汉) },//鐩爣绠$悊鏌ヨ鏉′欢 StatQuery:{ -- 2.24.3