| | |
| | | <div class="mc-action-row"> |
| | | <button type="button" class="mc-btn" @click="controlCommand">下发</button> |
| | | <button type="button" class="mc-btn mc-btn-soft" @click="resetCommand">复位</button> |
| | | <button v-if="showFakeTraceEntry" type="button" class="mc-btn mc-btn-ghost" @click="openFakeTracePage">仿真轨迹</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | targetStationId: "" |
| | | }, |
| | | barcodePreviewCache: {}, |
| | | showFakeTraceEntry: false, |
| | | pageSize: this.readOnly ? 24 : 12, |
| | | currentPage: 1, |
| | | timer: null |
| | |
| | | }, |
| | | created: function () { |
| | | MonitorCardKit.ensureStyles(); |
| | | this.loadFakeProcessStatus(); |
| | | if (this.autoRefresh) { |
| | | this.timer = setInterval(this.getDevpStateInfo, 1000); |
| | | } |
| | |
| | | this.afterDataRefresh(); |
| | | } |
| | | }, |
| | | loadFakeProcessStatus: function () { |
| | | if (this.readOnly || !window.$ || typeof baseUrl === "undefined") { |
| | | this.showFakeTraceEntry = false; |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/openapi/getFakeSystemRunStatus", |
| | | method: "get", |
| | | success: function (res) { |
| | | var data = res && res.data ? res.data : null; |
| | | this.showFakeTraceEntry = !!(data && data.isFake); |
| | | }.bind(this), |
| | | error: function () { |
| | | this.showFakeTraceEntry = false; |
| | | }.bind(this) |
| | | }); |
| | | }, |
| | | openControl: function () { |
| | | this.showControl = !this.showControl; |
| | | }, |
| | | openFakeTracePage: function () { |
| | | if (!this.showFakeTraceEntry) { |
| | | return; |
| | | } |
| | | window.open(baseUrl + "/views/watch/fakeTrace.html", "_blank"); |
| | | }, |
| | | buildDetailEntries: function (item) { |
| | | return [ |
| | | { label: "编号", value: this.orDash(item.stationId) }, |