|
|
@@ -0,0 +1,181 @@
|
|
|
+<template>
|
|
|
+ <div id="left2-1">
|
|
|
+ <swiper class="listdata swiper" :options="swiperOption" ref="mySwiper">
|
|
|
+ <swiper-slide class="listdata" v-for="i in sreencount" :key="i"> <!--:key="item.dl_id"-->
|
|
|
+ <div class="item " v-for="item in devicedata.slice(16*(i-1), 16*i)" :key="item.sp_id"> <!--:key="item.dl_id"-->
|
|
|
+ <div class="bg-color-black" >
|
|
|
+ <div v-if="item.sp_id>0">
|
|
|
+ <div style=" color: #29dd70; font-size: 22px;" class="mg-t20"> {{item.v_type}} {{ item.v_code }} </div>
|
|
|
+ <div class="fs-md mg-t10 ">岗位:{{ item.sc_name }} </div>
|
|
|
+ <div class="fs-md mg-t10 ">工单:{{ item.v_makecode }} </div>
|
|
|
+ <div class="fs-md mg-t10 ">项目号:{{ item.v_itemcode }} </div>
|
|
|
+ <div class="fs-md mg-t10 ">产出数:{{ item.v_outqty }} </div>
|
|
|
+ <!-- <div class ="circled">
|
|
|
+ <div class ="circleitem" style="padding-top: 10px;">
|
|
|
+ <div class="fs-xs">工单数:{{ item.ma_qty }} </div>
|
|
|
+ <div class="fs-xs">完成数:{{ item.outqty }}</div>
|
|
|
+ </div>
|
|
|
+ <div class ="circleitem" >
|
|
|
+ <CircleChart :tips="item.rate" :id="item.id"/>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
+ </div>
|
|
|
+ <div v-else="" class="nodataitem">
|
|
|
+ <!-- <span class=" display: block;"> 无数据</span>-->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </swiper-slide>
|
|
|
+ <div class="swiper-pagination" slot="pagination"></div>
|
|
|
+ </swiper>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+/*import CircleChart from '@/components/cxchart/bottom';*/
|
|
|
+import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
|
|
+import 'swiper/dist/css/swiper.css';
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ devicedata:[],
|
|
|
+ swiperOption: {
|
|
|
+ direction: 'vertical',
|
|
|
+ slidesPerView: 1,
|
|
|
+ spaceBetween: 0,
|
|
|
+ autoplay:7000,
|
|
|
+ autoplayDisableOnInteraction:false,
|
|
|
+ pagination: '.swiper-pagination',
|
|
|
+ paginationClickable: true,
|
|
|
+ //loop: true,
|
|
|
+ },
|
|
|
+ sreencount :1,
|
|
|
+ timing :null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ //CircleChart,
|
|
|
+ swiper,
|
|
|
+ swiperSlide
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.drawTimingFn();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ mySwiper () {
|
|
|
+ return this.$ref.mySwiper.swiper
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeDestroy () {
|
|
|
+ clearInterval(this.timing)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ drawTimingFn () {
|
|
|
+ this.setData();
|
|
|
+ this.timing = setInterval(() => {
|
|
|
+ this.setData(); //获取--数据
|
|
|
+ }, 30000);
|
|
|
+ },
|
|
|
+ async setData () {
|
|
|
+ // this.devicedata =[];
|
|
|
+ await this.$http.get("kanban/datalist.action?caller=KB!SourcePassedData&_noc=1&page=1&pageSize=100",{
|
|
|
+ params: {
|
|
|
+ condition: "shop='"+this.$store.getters.shop+"'",
|
|
|
+ }
|
|
|
+ }).then((result)=>{
|
|
|
+ let pageSize = 16;
|
|
|
+ let dataList = JSON.parse(result.data.data);
|
|
|
+ this.devicedata=dataList;
|
|
|
+ if(null != this.devicedata) {
|
|
|
+ let len = this.devicedata.length;
|
|
|
+ let cn = Math.ceil(len / pageSize);
|
|
|
+ this.sreencount =cn;
|
|
|
+ let minuscn = cn*pageSize-len;
|
|
|
+ if(minuscn>0){
|
|
|
+ let arr = new Array();
|
|
|
+ for(let i = 1; i<= minuscn; i++) {
|
|
|
+ let ar1 = [{"sp_id":-1*i}];
|
|
|
+ arr.push(ar1);
|
|
|
+ }
|
|
|
+ this.devicedata = this.devicedata.concat(arr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },(result)=>{
|
|
|
+ console.error(result)
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+$box-height: 955px;
|
|
|
+#left2-1 {
|
|
|
+ height: $box-height;
|
|
|
+ .listdata{
|
|
|
+ //width: 1888px;
|
|
|
+ height: $box-height;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-around;
|
|
|
+ .item {
|
|
|
+ border-radius: 6px;
|
|
|
+ padding: 4px 1px 0px 4px;
|
|
|
+ margin-top: 4px;
|
|
|
+ width: 24.2%;
|
|
|
+ height: 200px;
|
|
|
+ .inlineshow{
|
|
|
+ white-space:nowrap;/*强制单行显示*/
|
|
|
+ text-overflow:ellipsis;/*超出部分省略号表示*/
|
|
|
+ overflow:hidden;/*超出部分隐藏*/
|
|
|
+ }
|
|
|
+ .bg-color-black {
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 2px 2px 0px 8px;
|
|
|
+ height: 200px - 5px;
|
|
|
+ // font-family: Arial;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .mg-t10 {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .mg-t20 {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .nodataitem{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center; /* 水平居中 */
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .circled{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-around;
|
|
|
+ .circleitem {
|
|
|
+ /* border-radius: 6px;
|
|
|
+ padding-top: 8px;
|
|
|
+ margin-top: 4px;*/
|
|
|
+ width: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .swiper-pagination {
|
|
|
+ //height: 10px;
|
|
|
+ ::v-deep .swiper-pagination-bullet{
|
|
|
+ width: 15px; /* 设置宽度 */
|
|
|
+ height: 15px
|
|
|
+ }
|
|
|
+ ::v-deep .swiper-pagination-bullet{
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ }
|
|
|
+ ::v-deep .swiper-pagination-bullet-active{
|
|
|
+ background-color: #007aff;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|