From ef6e153937dba1b652ca2fbcea4e87102a8670e3 Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123456 <zxx19900626> Date: 星期日, 24 四月 2022 14:39:48 +0800 Subject: [PATCH] 人事人才check框 --- src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue | 303 ++++++++++++++++++++++++++----------------------- 1 files changed, 161 insertions(+), 142 deletions(-) diff --git a/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue b/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue index 9a90757..c70fd0c 100644 --- a/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue +++ b/src/pages/show/personnelTalents/personnelTalentsChild/PersonnelTalents_UnitPersonnel.vue @@ -2,7 +2,7 @@ <div class="PersonnelTalents_unitPersonnel--warp"> <div class="PT_unitPersonnel--table"> <el-table - :max-height="640" + :max-height="tableHeight" :data="tableData" stripe border @@ -36,21 +36,23 @@ <el-table-column label="鍏ㄧ渷鎺掍綅" prop="quanshengpaiming2"></el-table-column> </el-table-column> </el-table> - <!-- 鍗曢�夋 --> - <div class="PT_unitPersonnel--echart-box"> - <div class="PT_navEchart--title"> - <el-radio-group v-model="checkedCategory"> - <el-radio v-for="categoryItem in careGory" :label="categoryItem" :key="categoryItem">{{ categoryItem }} - </el-radio> - </el-radio-group> - </div> - <div class="PT_unitPersonnel--Echarts"></div> - </div> </div> + <!-- 鍗曢�夋 --> + <div class="PT_unitPersonnel--echart-box"> + <div class="PT_navEchart--title"> + <el-radio-group v-model="checkedCategory"> + <el-radio v-for="categoryItem in careGory" :label="categoryItem" :key="categoryItem">{{ categoryItem }} + </el-radio> + </el-radio-group> + </div> + <div class="PT_unitPersonnel--Echarts"></div> + </div> + </div> </template> <script> + import nowSize from "../../../../libs/nowSize"; const CARE_GORY = ['浜嬩笟鍗曚綅', '鍦ㄨ亴浜哄憳', '骞翠汉鍧囨敹鍏�'] @@ -139,7 +141,8 @@ }, ], checkedCategory: '浜嬩笟鍗曚綅', - careGory: CARE_GORY + careGory: CARE_GORY, + tableHeight: window.innerHeight - nowSize(1000) } }, mounted() { @@ -167,122 +170,131 @@ } }, Init_echarts() { - const option = { - color: ['#FF5151', '#51FF5D', '#FFD151'], - title: { - text: '鍘嗗勾鍏ㄥ競灞呮皯浜哄潎鍙敮閰嶆敹鍏ュ垎鏋愬浘', - left: 'center', - top: '5%', - textStyle: { - color: '#FFFFFF', - fontSize: nowSize(30) - } - }, - itemStyle: { - normal: { - lineStyle: { - width: 3, //鎶樼嚎瀹藉害 - } - } - }, - tooltip: { - trigger: 'axis' - }, - legend: { - right: '2%', - top: 'center', - orient: 'vertical', - itemWidth: nowSize(30), - itemHeight: nowSize(4), - itemGap: nowSize(80), - textStyle: { - color: '#FFFFFF', - fontSize: nowSize(24), - } - }, - grid: { - left: '22%', - top: '25%', - right: '25%', - bottom: '2%', - containLabel: true - }, - xAxis: { - name: '鍗曚綅锛氬勾', - nameTextStyle: { - color: '#FFFFFF', - fontSize: nowSize(24) - }, - nameGap: nowSize(92),// 鍧愭爣杞村悕绉颁笌杞寸嚎涔嬮棿鐨勮窛绂汇�� - type: 'category', - boundaryGap: false,// 鍧愭爣杞翠袱绔暀鐧� - data: ['2017骞�', '2018骞�', '2019骞�', '2020骞�', '2021骞�'], - axisLabel: { - show: true, - textStyle: { - color: '#fff', - fontSize: nowSize(24) - }, - }, - axisLine: { - lineStyle: { - color: '#999999', - width: 1, //杩欓噷鏄潗鏍囪酱鐨勫搴�,鍙互鍘绘帀 - type: 'solid' - } - }, - splitLine: { - show: false - } - }, - yAxis: { - name: '鍗曚綅锛氬勾', - nameTextStyle: { - color: '#FFFFFF', - fontSize: nowSize(24) - }, - nameGap: nowSize(30),// 鍧愭爣杞村悕绉颁笌杞寸嚎涔嬮棿鐨勮窛绂汇�� - type: 'value', - axisLabel: { - show: true, - textStyle: { - color: '#fff', - fontSize: nowSize(24) - }, - }, - axisLine: { - lineStyle: { - color: '#999999', - width: 1, //杩欓噷鏄潗鏍囪酱鐨勫搴�,鍙互鍘绘帀 - type: "solid" - } - }, - splitLine: { - show: false - }, - }, - series: [ - { - name: '灞呮皯浜哄潎鍙敮閰嶆敹鍏�', - type: 'line', - data: [120, 132, 101, 134, 90, 230] - }, - { - name: '鍩庨晣灞呮皯', - type: 'line', - data: [220, 182, 191, 234, 290, 330] - }, - { - name: '鍐滄潙灞呮皯', - type: 'line', - data: [150, 232, 201, 154, 190, 330] - } - ] - }; const myChart = this.$echarts.init(document.querySelector('.PT_unitPersonnel--Echarts')); + const option = { + color: ['#FF5151', '#51FF5D', '#FFD151'], + title: { + text: '鍘嗗勾鍏ㄥ競灞呮皯浜哄潎鍙敮閰嶆敹鍏ュ垎鏋愬浘', + left: 'center', + top: '5%', + textStyle: { + color: '#FFFFFF', + fontSize: nowSize(30) + } + }, + itemStyle: { + normal: { + lineStyle: { + width: 3, //鎶樼嚎瀹藉害 + } + } + }, + tooltip: { + trigger: 'axis' + }, + legend: { + right: '2%', + top: 'center', + orient: 'vertical', + itemWidth: nowSize(30), + itemHeight: nowSize(4), + itemGap: nowSize(80), + textStyle: { + color: '#FFFFFF', + fontSize: nowSize(24), + } + }, + grid: { + left: '2%', + top: '25%', + right: '18%', + bottom: '0', + containLabel: true + }, + xAxis: { + name: '鍗曚綅锛氬勾', + nameTextStyle: { + color: '#FFFFFF', + fontSize: nowSize(24) + }, + nameGap: nowSize(92),// 鍧愭爣杞村悕绉颁笌杞寸嚎涔嬮棿鐨勮窛绂汇�� + type: 'category', + boundaryGap: false,// 鍧愭爣杞翠袱绔暀鐧� + data: ['2017骞�', '2018骞�', '2019骞�', '2020骞�', '2021骞�'], + axisLabel: { + show: true, + textStyle: { + color: '#fff', + fontSize: nowSize(24) + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + width: 1, //杩欓噷鏄潗鏍囪酱鐨勫搴�,鍙互鍘绘帀 + type: 'solid' + } + }, + splitLine: { + show: false + } + }, + yAxis: { + name: '鍗曚綅锛氬勾', + nameTextStyle: { + color: '#FFFFFF', + fontSize: nowSize(24) + }, + nameGap: nowSize(30),// 鍧愭爣杞村悕绉颁笌杞寸嚎涔嬮棿鐨勮窛绂汇�� + type: 'value', + axisLabel: { + show: true, + textStyle: { + color: '#fff', + fontSize: nowSize(24) + }, + }, + axisLine: { + lineStyle: { + color: '#999999', + width: 1, //杩欓噷鏄潗鏍囪酱鐨勫搴�,鍙互鍘绘帀 + type: "solid" + } + }, + splitLine: { + show: false + }, + }, + series: [ + { + name: '灞呮皯浜哄潎鍙敮閰嶆敹鍏�', + type: 'line', + data: [120, 132, 101, 134, 90, 230] + }, + { + name: '鍩庨晣灞呮皯', + type: 'line', + data: [220, 182, 191, 234, 290, 330] + }, + { + name: '鍐滄潙灞呮皯', + type: 'line', + data: [150, 232, 201, 154, 190, 330] + } + ] + }; option && myChart.setOption(option) + }, + getHeight() { + this.tableHeight = window.innerHeight - nowSize(900) } - } + }, + created() { + window.addEventListener('resize',this.getHeight) + }, + destroy() { + window.addEventListener('resize',this.getHeight) + } } </script> <style lang="scss"> @@ -345,6 +357,7 @@ border-bottom: 1px solid #8E8E8E; } } + .PT_navEchart--title { .el-radio { width: 1.171875rem; @@ -356,7 +369,7 @@ } .el-radio__input { - margin-bottom: 5px; + margin-bottom: 0.01953125rem; &.is-checked { .el-radio__inner { @@ -373,13 +386,13 @@ } .el-radio__inner { - width: 40px; - height: 40px; - margin-right: 17px; + width: 0.15625rem; + height: 0.15625rem; + margin-right: 0.06640625rem; background: transparent; border-radius: 1%; box-sizing: content-box; - + border: 0.0078125rem /* 2/256 */ solid #DCDFE6; &::after { content: ''; width: 0; @@ -396,30 +409,36 @@ .PersonnelTalents_unitPersonnel--warp { width: 100%; height: 100%; + .PT_unitPersonnel--table { width: 100%; - height: 100%; } - .PT_unitPersonnel--Echarts { + + .PT_unitPersonnel--echart-box { width: 100%; - height:100%; - //height: 600px; - display: inline-block; - } - .PT_unitPersonnel--echart-box{ - width: 100%; - margin-top: 0.234375rem /* 60/256 */; - height: calc(100% - 640Px - 0.254375rem /* 60/256 */); + margin-top: 0.234375rem /* 60/256 */ + ; + height: calc(100% - 2.5rem /* 640/256 */ - 0.254375rem /* 60/256 */ + ); position: relative; + .PT_navEchart--title { - width: 1.171875rem; + width: 1px; display: inline-block; position: absolute; - left: 100px; + left: 0.390625rem; top: 50%; transform: translateY(-50%); } + + .PT_unitPersonnel--Echarts { + width: 85%; + height: 100%; + position: absolute; + left: 1.2890625rem; + display: inline-block; + } } } -- Gitblit v1.9.1