123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <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>
- </div>
- </template>
- <script>
- //import CenterChart from '@/components/packageechart/center/centerChartRate'
- export default {
- data() {
- return {
- titleItem:[],
- ranking: {
- data: [],
- carousel: 'single',
- rowNum:4,
- valueFormatter ({ name,value }) {
- console.warn(arguments);
- if((name == '插件' && value<98) || (name == '组装' && value<99.2) || (name == '老化' && value<99) || (name == '包装' && value<98)) {
- return '<div style ="color:red">' + value + ' </div>';
- }else{
- return '<div style ="color:#18a158">' + value + ' </div>';
- }
- }
- },
- water: {
- data: [],//[24, 66],
- shape: 'roundRect',
- formatter: '{value}%',
- waveNum: 3,
- waveHeight:20
- },
- }
- },
- components: {
- // CenterChart
- },
- mounted () {
- this.drawTimingFn();
- },
- beforeDestroy () {
- clearInterval(this.timing)
- },
- methods: {
- drawTimingFn () {
- this.setData();
- this.timing = 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 = 'KeyStepRate!Total';
- //关键工序直通率
- 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 resultList = new Array();
- for (let index = 0; index < dataList.length; index++) {
- const element = dataList[index];
- let item = new Array();
- item.push("<span class='colorGrass'>"+element.makecode+"</span>");
- item.push("<span class='colorGrass'>"+element.stepcode+"</span>");
- item.push("<span class='colorGrass'>"+element.value+"</span>");
- resultList.push(item);
- }
- const scrollBoard = this.$refs['scroll-board'];
- //刷新数据
- scrollBoard.updateRows(resultList);
- },(result)=>{
- console.error(result)
- }
- );
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- $box-height: 420px;
- $box-width: 100%;
- #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: 100%;
- height: 70px;
- .dv-dig-flop {
- width: 170px;
- 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>
|