| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <template>
- <div id="center">
- <!-- <div class="up">
- <div
- class="bg-color-black item"
- v-for="item in titleItem"
- :key="item.title"
- >
- <p class="ml-3 colorBlue fw-b fs-xl">{{ item.title }}</p>
- <div>
- <dv-digital-flop
- class="dv-dig-flop ml-1 mt-2 pl-3"
- :config="item.number"
- />
- </div>
- </div>
- </div>-->
- <div class="down">
- <div class="ranking bg-color-black">
- <span>
- <icon name="chart-pie" class="text-icon"></icon>
- </span>
- <span class="fs-xl text mx-2 mb-1 pl-3">关键工序直通率</span>
- <dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking" ref="scroll-ranking-board"/>
- </div>
- <!-- <div class="percent">
- <div class="item bg-color-black">
- <span>首检合格率</span>
- <CenterChart
- :id="rate[0].id"
- :tips="rate[0].tips"
- :colorObj="rate[0].colorData"
- />
- </div>
- <div class="item bg-color-black">
- <span>巡检合格率</span>
- <CenterChart
- :id="rate[1].id"
- :tips="rate[1].tips"
- :colorObj="rate[1].colorData"
- />
- </div>
- <div class="water">
- <dv-water-level-pond class="dv-wa-le-po" :config="water" />
- </div>
- </div>-->
- </div>
- </div>
- </template>
- <script>
- //import CenterChart from '@/components/packageechart/center/centerChartRate'
- export default {
- data() {
- return {
- titleItem:[],
- ranking: {
- data: [],
- carousel: 'single',
- //unit: '人'
- },
- water: {
- data: [],//[24, 66],
- shape: 'roundRect',
- formatter: '{value}%',
- waveNum: 3,
- waveHeight:20
- },
- // 通过率和达标率的组件复用数据
- rate: [
- {
- id: 'centerRate1',
- tips: 60,
- colorData: {
- textStyle: '#3fc0fb',
- series: {
- color: ['#00bcd44a', 'transparent'],
- dataColor: {
- normal: '#03a9f4',
- shadowColor: '#97e2f5'
- }
- }
- }
- },
- {
- id: 'centerRate2',
- tips: 40,
- colorData: {
- textStyle: '#67e0e3',
- series: {
- color: ['#faf3a378', 'transparent'],
- dataColor: {
- normal: '#ff9800',
- shadowColor: '#fcebad'
- }
- }
- }
- }
- ]
- }
- },
- components: {
- // CenterChart
- },
- mounted () {
- this.drawTimingFn();
- },
- methods: {
- drawTimingFn () {
- this.setData();
- setInterval(() => {
- this.setData(); //获取-数据
- }, 30000);
- },
- async setData () {
- // 首检任务数,完成数,合格数,巡检任务数,完成数,巡检合格数 name value
- /* await this.$http.get("kanban/datalist.action?caller=CheckData&_noc=1&page=1&pageSize=100",{
- params: {
- condition: "1=1",
- }
- }).then((result)=>{
- let dataList = JSON.parse(result.data.data);
- let titleitems = new Array();
- for (let index = 0; index < dataList.length; index++) {
- const element = dataList[index];
- titleitems.push({
- title: element.name,
- number: {
- number: [element.value],
- toFixed: 1,
- textAlign: 'left',
- content: '{nt}',
- style: {
- fontSize: 26
- }
- }
- });
- }
- this.titleItem = titleitems;
- },(result)=>{
- console.error(result)
- }
- );*/
- var caller = 'DPL!KeyStepRate';
- if (sessionStorage.getItem('li_code') == '所有'){
- caller = 'DPL!KeyStepRate!ALL';
- }
- //关键工序直通率
- await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
- params: {
- condition: "1=1",
- }
- }).then((result)=>{
- let dataList = JSON.parse(result.data.data);
- let datas = new Array();
- for (let index = 0; index < dataList.length; index++) {
- const element = dataList[index];
- datas.push({
- name:element.name ,
- value:element.value,
- });
- }
- this.ranking.data = datas;
- this.ranking = { ...this.ranking };
- /*两种刷新方式
- const scrollBoard = this.$refs['scroll-ranking-board'];
- scrollBoard.updateRows(datas);
- this.ranking = { data: datas }
- */
- },(result)=>{
- console.error(result)
- }
- );
- //饼图pie,首检合格率,巡检合格率
- /* await this.$http.get("kanban/datalist.action?caller=PieCheckRate&_noc=1&page=1&pageSize=100&condition=1=1")
- .then((result)=>{
- let dataList = JSON.parse(result.data.data);
- this.rate[0].tips = dataList[0].firstcheckrate;
- this.rate[0].tips = dataList[0].xcheckrate;
- },(result)=>{
- console.error(result)
- }
- );*/
- //水波图,首检合格率,巡检合格率
- /* await this.$http.get("kanban/datalist.action?caller=WaterCheckRate&_noc=1&page=1&pageSize=100&condition=1=1")
- .then((result)=>{
- let dataList = JSON.parse(result.data.data);
- let waterdatas = new Array();
- waterdatas.push(dataList[0].firstcheckrate);
- waterdatas.push(dataList[0].xcheckrate);
- this.water = { data: waterdatas }
- },(result)=>{
- console.error(result)
- }
- );*/
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- $box-height: 420px;
- #center {
- display: flex;
- flex-direction: column;
- .up {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-around;
- .item {
- border-radius: 6px;
- padding-top: 8px;
- margin-top: 8px;
- width: 32%;
- height: 70px;
- .dv-dig-flop {
- width: 150px;
- height: 30px;
- }
- }
- }
- .down {
- padding: 6px 4px;
- padding-bottom: 0;
- width: 100%;
- display: flex;
- height: $box-height;
- justify-content: space-between;
- .bg-color-black {
- border-radius: 5px;
- height: $box-height - 15px;
- }
- .ranking {
- padding: 10px;
- width: 100%;
- .dv-scr-rank-board {
- height: 370px;
- }
- }
- .percent {
- width: 40%;
- display: flex;
- flex-wrap: wrap;
- .item {
- width: 50%;
- height: 120px;
- span {
- margin-top: 8px;
- font-size: 14px;
- display: flex;
- justify-content: center;
- }
- }
- .water {
- width: 100%;
- .dv-wa-le-po {
- height: 120px;
- }
- }
- }
- }
- }
- </style>
|