|
|
@@ -0,0 +1,129 @@
|
|
|
+<template>
|
|
|
+ <div id="ddlist">
|
|
|
+ <div class="bg-color-black">
|
|
|
+ <div class="d-flex mt-2 pt-1 pl-2 pb-2 jc-center mb-2">
|
|
|
+ <span class="text mx-2 fw-b">产线计划未完成订单明细</span>
|
|
|
+ </div>
|
|
|
+ <div class="d-flex jc-center body-box">
|
|
|
+ <dv-scroll-board class="dv-scr-board" :config="config" ref="scroll-board" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ config: {
|
|
|
+ header:[],
|
|
|
+ data: [],
|
|
|
+ rowNum: 14, //表格行数
|
|
|
+ headerHeight: 35,
|
|
|
+ headerBGC: '#0f1325', //表头
|
|
|
+ oddRowBGC: '#0f1325', //奇数行
|
|
|
+ evenRowBGC: '#171c33', //偶数行
|
|
|
+ columnWidth: [],
|
|
|
+ align: [],
|
|
|
+ carousel: 'page',
|
|
|
+ hoverPause: true,
|
|
|
+ },
|
|
|
+ timing:null,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.refreshdata()
|
|
|
+ },
|
|
|
+ beforeDestroy () {
|
|
|
+ clearInterval(this.timing)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ refreshdata() {
|
|
|
+ this.getdata(); //获取-数据
|
|
|
+ this.timing = setInterval(() => {
|
|
|
+ this.getdata(); //获取--数据
|
|
|
+ }, 10000);
|
|
|
+ },
|
|
|
+ async getdata() {
|
|
|
+ //先清空数据
|
|
|
+ var caller1 = 'KB!PROCESS!DATA';
|
|
|
+ await this.$http.get("kanban/datalist.action?caller="+caller1+"&_noc=1&page=1&pageSize=100",{
|
|
|
+ params: {
|
|
|
+ condition:"1=1"
|
|
|
+ }
|
|
|
+ }).then((result)=>{
|
|
|
+ let columns = result.data.columns;
|
|
|
+ let headers = new Array();
|
|
|
+ let columnWidths = new Array();
|
|
|
+ let fieldnames = new Array();
|
|
|
+ let aligns = new Array();
|
|
|
+ for (let index = 0; index < columns.length; index++) {
|
|
|
+ const element = columns[index];
|
|
|
+ if(element.width>0) {
|
|
|
+ headers.push(element.text);
|
|
|
+ columnWidths.push(element.width);
|
|
|
+ fieldnames.push(element.dataIndex);
|
|
|
+ aligns.push('center');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.config.header = headers;
|
|
|
+ this.config.columnWidth = columnWidths;
|
|
|
+ this.config.align = aligns;
|
|
|
+ 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();
|
|
|
+ fieldnames.forEach(function (ele) {
|
|
|
+ // 遍历数组,对每个元素进行操作
|
|
|
+ item.push("<span>" + element[ele] + "</span>");
|
|
|
+ });
|
|
|
+ resultList.push(item);
|
|
|
+ }
|
|
|
+ this.config.data = resultList;
|
|
|
+ this.config = { ...this.config };
|
|
|
+ },(result)=>{
|
|
|
+ console.error(result)
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+$box-height: 950px;
|
|
|
+$box-width: 100%;
|
|
|
+#ddlist {
|
|
|
+ padding: 12px;
|
|
|
+ height: $box-height;
|
|
|
+ width: $box-width;
|
|
|
+ border-radius: 5px;
|
|
|
+ .bg-color-black {
|
|
|
+ height: $box-height - 25px;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ color: #c3cbde;
|
|
|
+ font-size: 33px;
|
|
|
+ }
|
|
|
+ .body-box {
|
|
|
+ border-radius: 10px;
|
|
|
+ overflow: hidden;
|
|
|
+ height: 915px;
|
|
|
+ ::v-deep .dv-scroll-board {
|
|
|
+ height: 885px;
|
|
|
+ .header{
|
|
|
+ font-size: 25px;
|
|
|
+ }
|
|
|
+ .rows {
|
|
|
+ .row-item {
|
|
|
+ font-size: 20px !important;
|
|
|
+ // color: #c3cbde !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|