This commit is contained in:
helloDy
2024-03-20 08:48:02 +08:00
parent db2cbb64c9
commit 630e7a95b3
19 changed files with 327 additions and 132 deletions

View File

@@ -17,7 +17,7 @@
padding: 16px 16px 0;
border-radius: 8px;
">
<div class="blue-title">生产节拍时序图</div>
<!-- <div class="blue-title">生产节拍时序图</div> -->
<!-- <h1>设备状态时序图</h1> -->
<!-- 搜索工作栏 -->
<SearchBar
@@ -76,6 +76,7 @@
<script>
import LineChart from './components/lineChart.vue';
import moment from 'moment';
// import response from './response.json';
export default {
@@ -84,6 +85,7 @@ export default {
props: {},
data() {
return {
moment,
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
accumulators: new Map(),
searchBarFormConfig: [
@@ -94,6 +96,7 @@ export default {
selectOptions: [],
param: 'lineId',
onchange: true,
filterable: true
},
{
type: 'select',
@@ -101,11 +104,12 @@ export default {
placeholder: '请选择工段',
selectOptions: [],
param: 'sectionId',
filterable: true
},
// 时间段
{
type: 'datePicker',
label: '时间段',
label: '日期',
dateType: 'date', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd',
@@ -263,7 +267,11 @@ export default {
this.initProductline();
this.initWorksection();
this.initEquipment();
// this.getList();
let end = moment().format('YYYY-MM-DD 23:59:59')
let start = moment().format('YYYY-MM-DD 00:00:00')
this.searchBarFormConfig[2].defaultSelect = start
this.queryParams.recordTime = [start, end]
this.getList();
},
methods: {
handleSearchBarBtnClick({ btnName, ...payload }) {
@@ -293,8 +301,10 @@ export default {
},
handleSearchBarChanged({ param, value }) {
this.searchBarFormConfig[1].defaultSelect = null
if (!value) {
this.searchBarFormConfig[1].selectOptions = [];
// this.searchBarFormConfig[1].defaultSelect = null
return;
}
switch (param) {
@@ -486,7 +496,10 @@ export default {
const { code, data } = await this.$axios({
url: '/monitoring/equipment-monitor/quantity-series',
method: 'get',
params: this.queryParams,
params: {
equipmentId: this.queryParams.equipmentId,
recordTime: this.queryParams.recordTime
}
});
this.queryParams.equipmentId = null; // 清空一下

View File

@@ -17,7 +17,7 @@
padding: 16px 16px 0;
border-radius: 8px;
">
<div class="blue-title">生产节拍时序图</div>
<!-- <div class="blue-title">生产节拍时序图</div> -->
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@@ -119,6 +119,7 @@ export default {
selectOptions: [],
param: 'lineId',
onchange: true,
filterable: true
},
{
type: 'select',
@@ -126,6 +127,7 @@ export default {
placeholder: '请选择工段',
selectOptions: [],
param: 'sectionId',
filterable: true
},
// 时间段
{