| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <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-board class="dv-scr-board" :config="config" ref="scroll-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 {
- config: {
- header: ['工单号','工序', '当前小时数量'],
- data: [
- ],
- rowNum: 7, //表格行数
- headerHeight: 35,
- headerBGC: '#0f1325', //表头
- oddRowBGC: '#0f1325', //奇数行
- evenRowBGC: '#171c33', //偶数行
- columnWidth: [130,120,110],
- align: ['center']
- },
- timing : null,
- }
- },
- 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!ZZ';
- var caller = 'CurrentHour!ZZ';
- if (sessionStorage.getItem('li_code') == '所有'){
- caller = 'ZZ!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 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)
- }
- );
- //饼图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>
|