|
|
@@ -47,10 +47,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="app" class="container">
|
|
|
+ <div class="info_box" style="top: 4.84rem; left: 1.4rem; color: #ffffff">
|
|
|
+ {{ warehouseNo }}
|
|
|
+ </div>
|
|
|
+ <div class="info_box" style="top: 6rem; left: 1.4rem; color: #85e0ff">
|
|
|
+ {{ warehouseName }}
|
|
|
+ </div>
|
|
|
<dv-scroll-board
|
|
|
ref="scrollBoard"
|
|
|
:config="config"
|
|
|
- style="width: 12.4rem; height: 8.1rem; left: 6.6rem; top: 1.8rem"
|
|
|
+ style="width: 12.4rem; height: 8rem; left: 6.6rem; top: 1.8rem"
|
|
|
/>
|
|
|
</div>
|
|
|
<script>
|
|
|
@@ -59,8 +65,10 @@
|
|
|
data() {
|
|
|
return {
|
|
|
start: 0,
|
|
|
- length: 10,
|
|
|
- warehouseId: 460335910903873,
|
|
|
+ length: 500,
|
|
|
+ warehouseNo: "",
|
|
|
+ warehouseId: null,
|
|
|
+ warehouseName: "",
|
|
|
header: [
|
|
|
'<span style="color:#85E0FF;font-size:0.24rem">模检具名称</span>',
|
|
|
'<span style="color:#85E0FF;font-size:0.24rem">模检具状态</span>',
|
|
|
@@ -70,57 +78,85 @@
|
|
|
'<span style="color:#85E0FF;font-size:0.24rem">是否需要保养</span>',
|
|
|
],
|
|
|
config: {},
|
|
|
- addList: [],
|
|
|
};
|
|
|
},
|
|
|
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ // 获取车间信息
|
|
|
+ getWarehouseInfo() {
|
|
|
+ const _self = this;
|
|
|
+ const url = "/api/WarehouseResource/queryByWarehouseId";
|
|
|
+ const params = [["warehouseId", _self.warehouseId]];
|
|
|
+ ajaxGet(url, params).then((success) => {
|
|
|
+ if (success.errorCode === 0) {
|
|
|
+ _self.warehouseNo = success.data.no;
|
|
|
+ _self.warehouseName = success.data.name;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取表格数据
|
|
|
+ getTableDatas() {
|
|
|
+ const _self = this;
|
|
|
+ const url =
|
|
|
+ "/api/BulletinBoardResource/queryBoardInventoryByWarehouse";
|
|
|
+ const params = [
|
|
|
+ ["start", _self.start],
|
|
|
+ ["length", _self.length],
|
|
|
+ ["warehouseId", _self.warehouseId],
|
|
|
+ ];
|
|
|
+ ajaxGet(url, params).then((success) => {
|
|
|
+ if (success.errorCode === 0) {
|
|
|
+ if (success.datas && success.datas.length > 0) {
|
|
|
+ const configData = success.datas.map((item) => [
|
|
|
+ item.name,
|
|
|
+ item.inventoryStatus,
|
|
|
+ item.no,
|
|
|
+ item.useDate,
|
|
|
+ item.useCount,
|
|
|
+ item.needMaintain == true ? "是" : "否",
|
|
|
+ ]);
|
|
|
+ // 配置轮播表属性
|
|
|
+ _self.config = {
|
|
|
+ header: _self.header,
|
|
|
+ headerHeight: 60,
|
|
|
+ rowNum: 10,
|
|
|
+ waitTime: 8000,
|
|
|
+ carousel: "page",
|
|
|
+ hoverPause: false,
|
|
|
+ data: configData,
|
|
|
+ headerBGC: "#112f6e",
|
|
|
+ oddRowBGC: "#06105a",
|
|
|
+ evenRowBGC: "#19225e",
|
|
|
+ align: [
|
|
|
+ "center",
|
|
|
+ "center",
|
|
|
+ "center",
|
|
|
+ "center",
|
|
|
+ "center",
|
|
|
+ "center",
|
|
|
+ ],
|
|
|
+ columnWidth: [260, 160, 350, 200, 180, 200],
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
|
|
|
mounted() {
|
|
|
const _self = this;
|
|
|
- const url =
|
|
|
- "/api/BulletinBoardResource/queryBoardInventoryByWarehouse";
|
|
|
- const params = [
|
|
|
- ["warehouseId", _self.warehouseId],
|
|
|
- ["start", _self.start],
|
|
|
- ["length", _self.length],
|
|
|
- ];
|
|
|
- ajaxGet(url, params).then((success) => {
|
|
|
- if (success.errorCode === 0) {
|
|
|
- if (success.datas && success.datas.length > 0) {
|
|
|
- const configData = success.datas.map((item) => [
|
|
|
- item.name,
|
|
|
- item.inventoryStatus,
|
|
|
- item.no,
|
|
|
- item.useDate,
|
|
|
- item.useCount,
|
|
|
- item.needMaintain == true ? "是" : "否",
|
|
|
- ]);
|
|
|
- _self.config = {
|
|
|
- header: _self.header,
|
|
|
- headerHeight: 60,
|
|
|
- rowNum: 10,
|
|
|
- hoverPause: false,
|
|
|
- data: configData,
|
|
|
- headerBGC: "#112f6e",
|
|
|
- oddRowBGC: "#06105a",
|
|
|
- evenRowBGC: "#19225e",
|
|
|
- align: [
|
|
|
- "center",
|
|
|
- "center",
|
|
|
- "center",
|
|
|
- "center",
|
|
|
- "center",
|
|
|
- "center",
|
|
|
- ],
|
|
|
- columnWidth: [220, 200, 220, 200, 200, 200],
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ this.warehouseId = getQueryString("warehouseId");
|
|
|
+ _self.getTableDatas();
|
|
|
+ _self.getWarehouseInfo();
|
|
|
+ _self.timer = setInterval(() => {
|
|
|
+ _self.getTableDatas();
|
|
|
+ _self.getWarehouseInfo();
|
|
|
+ }, 6000 * 10 * 6);
|
|
|
},
|
|
|
beforeUnmount() {
|
|
|
const _self = this;
|
|
|
+ clearInterval(_self.timer);
|
|
|
+ _self.timer = null;
|
|
|
},
|
|
|
});
|
|
|
</script>
|