#
Junjie
4 天以前 3c1f809e9fd8b8a95493eb144fa386868dcaa539
#
3个文件已修改
109 ■■■■■ 已修改文件
src/main/webapp/components/DevpCard.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/components/WatchCrnCard.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/components/WatchRgvCard.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/components/DevpCard.js
@@ -17,8 +17,9 @@
                <div style="margin-bottom: 10px;"><el-button @click="controlCommand()" size="mini">下发</el-button></div>
            </div>
        </div>
        <el-collapse v-model="activeNames">
          <el-collapse-item v-for="(item) in stationList" :name="item.stationId">
        <div style="max-height: 55vh; overflow:auto;">
          <el-collapse v-model="activeNames" accordion>
            <el-collapse-item v-for="(item) in displayStationList" :name="item.stationId">
            <template slot="title">
                <div style="width: 100%;display: flex;">
                   <div style="width: 50%;">{{ item.stationId }}站</div>
@@ -45,6 +46,19 @@
          </el-collapse-item>
        </el-collapse>
    </div>
        <div style="display:flex; justify-content:flex-end; margin-top:8px;">
          <el-pagination
            small
            @current-change="handlePageChange"
            @size-change="handleSizeChange"
            :current-page="currentPage"
            :page-size="pageSize"
            :page-sizes="[10,20,50,100]"
            layout="total, prev, pager, next"
            :total="stationList.length">
          </el-pagination>
        </div>
    </div>
    `,
  props: ["param"],
  data() {
@@ -58,12 +72,21 @@
        taskNo: "",
        targetStationId: "",
      },
      pageSize: 25,
      currentPage: 1,
    };
  },
  created() {
    setInterval(() => {
      this.getDevpStateInfo();
    }, 1000);
  },
  computed: {
    displayStationList() {
      const start = (this.currentPage - 1) * this.pageSize;
      const end = start + this.pageSize;
      return this.stationList.slice(start, end);
    }
  },
  watch: {
    param: {
@@ -78,6 +101,13 @@
    },
  },
  methods: {
    handlePageChange(page) {
      this.currentPage = page;
    },
    handleSizeChange(size) {
      this.pageSize = size;
      this.currentPage = 1;
    },
    getDevpStateInfo() {
      let that = this;
      $.ajax({
@@ -101,6 +131,7 @@
                }
              });
              that.stationList = tmp;
              that.currentPage = 1;
            }
          }
        },
src/main/webapp/components/WatchCrnCard.js
@@ -19,8 +19,9 @@
                <div style="margin-bottom: 10px;"><el-button @click="controlCommandTaskComplete()" size="mini">任务完成</el-button></div>
            </div>
        </div>
        <el-collapse v-model="activeNames">
          <el-collapse-item v-for="(item) in crnList" :name="item.crnNo">
        <div style="max-height: 55vh; overflow:auto;">
          <el-collapse v-model="activeNames" accordion>
            <el-collapse-item v-for="(item) in displayCrnList" :name="item.crnNo">
            <template slot="title">
                <div style="width: 100%;display: flex;">
                   <div style="width: 50%;">{{ item.crnNo }}号堆垛机</div>
@@ -58,6 +59,18 @@
          </el-collapse-item>
        </el-collapse>
    </div>
        <div style="display:flex; justify-content:flex-end; margin-top:8px;">
          <el-pagination
            @current-change="handlePageChange"
            @size-change="handleSizeChange"
            :current-page="currentPage"
            :page-size="pageSize"
            :page-sizes="[10,20,50,100]"
            layout="total, prev, pager, next"
            :total="crnList.length">
          </el-pagination>
        </div>
    </div>
    `,
  props: ["param"],
  data() {
@@ -71,6 +84,8 @@
        sourceLocNo: "",
        targetLocNo: "",
      },
      pageSize: 25,
      currentPage: 1,
    };
  },
  created() {
@@ -78,11 +93,20 @@
      this.getCrnStateInfo();
    }, 1000);
  },
  computed: {
    displayCrnList() {
      const start = (this.currentPage - 1) * this.pageSize;
      const end = start + this.pageSize;
      return this.crnList.slice(start, end);
    }
  },
  watch: {
    param: {
      handler(newVal, oldVal) {
        if (newVal.crnNo != 0) {
          this.activeNames = newVal.crnNo;
          const idx = this.crnList.findIndex(i => i.crnNo == newVal.crnNo);
          if (idx >= 0) { this.currentPage = Math.floor(idx / this.pageSize) + 1; }
        }
      },
      deep: true, // 深度监听嵌套属性
@@ -90,6 +114,13 @@
    },
  },
  methods: {
    handlePageChange(page) {
      this.currentPage = page;
    },
    handleSizeChange(size) {
      this.pageSize = size;
      this.currentPage = 1;
    },
    getCrnStateInfo() {
      let that = this;
      $.ajax({
@@ -113,6 +144,7 @@
                }
              });
              that.crnList = tmp;
              that.currentPage = 1;
            }
          }
        },
src/main/webapp/components/WatchRgvCard.js
@@ -22,8 +22,9 @@
                <div style="margin-bottom: 10px;"><el-button @click="controlCommandTaskComplete()" size="mini">任务完成</el-button></div>
            </div>
        </div>
        <el-collapse v-model="activeNames">
          <el-collapse-item v-for="(item) in rgvList" :name="item.rgvNo">
        <div style="max-height: 55vh; overflow:auto;">
          <el-collapse v-model="activeNames" accordion>
            <el-collapse-item v-for="(item) in displayRgvList" :name="item.rgvNo">
            <template slot="title">
                <div style="width: 100%;display: flex;">
                   <div style="width: 50%;">{{ item.rgvNo }}号RGV</div>
@@ -48,6 +49,18 @@
          </el-collapse-item>
        </el-collapse>
    </div>
        <div style="display:flex; justify-content:flex-end; margin-top:8px;">
          <el-pagination
            @current-change="handlePageChange"
            @size-change="handleSizeChange"
            :current-page="currentPage"
            :page-size="pageSize"
            :page-sizes="[10,20,50,100]"
            layout="total, prev, pager, next"
            :total="rgvList.length">
          </el-pagination>
        </div>
    </div>
    `,
  props: ["param"],
  data() {
@@ -60,7 +73,9 @@
        rgvNo: "",
        sourcePos: "",
        targetPos: ""
      }
      },
      pageSize: 25,
      currentPage: 1,
    };
  },
  created() {
@@ -68,11 +83,20 @@
      this.getRgvStateInfo();
    }, 1000);
  },
  computed: {
    displayRgvList() {
      const start = (this.currentPage - 1) * this.pageSize;
      const end = start + this.pageSize;
      return this.rgvList.slice(start, end);
    }
  },
  watch: {
    param: {
      handler(newVal) {
        if (newVal && newVal.rgvNo != 0) {
          this.activeNames = newVal.rgvNo;
          const idx = this.rgvList.findIndex(i => i.rgvNo == newVal.rgvNo);
          if (idx >= 0) { this.currentPage = Math.floor(idx / this.pageSize) + 1; }
        }
      },
      deep: true,
@@ -80,6 +104,13 @@
    },
  },
  methods: {
    handlePageChange(page) {
      this.currentPage = page;
    },
    handleSizeChange(size) {
      this.pageSize = size;
      this.currentPage = 1;
    },
    getRgvStateInfo() {
      let that = this;
      $.ajax({
@@ -101,6 +132,7 @@
                }
              });
              that.rgvList = tmp;
              that.currentPage = 1;
            }
          }
        },