|
@@ -1,9 +1,82 @@
|
|
|
<template>
|
|
|
+
|
|
|
<!-- <el-input v-model="input" placeholder="请输入内容"></el-input> -->
|
|
|
+<div class="line">
|
|
|
+<div class="search-box-area" id="searchBox">
|
|
|
+
|
|
|
+ <div class="search-item">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParam.work_local"
|
|
|
+ placeholder="工作位置"
|
|
|
+ class="filter-item form-search-input fl"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in work_local_options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="search-item">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParam.parts"
|
|
|
+ placeholder="所属部件"
|
|
|
+ class="filter-item form-search-input fl"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in parts_options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="search-item">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParam.bolt_style"
|
|
|
+ placeholder="螺栓样式"
|
|
|
+ class="filter-item form-search-input fl"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in bolt_style_options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParam.bolt_type"
|
|
|
+ placeholder="螺栓型号"
|
|
|
+ class="filter-item form-search-input fl"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option v-for="item in bolt_type_options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+<div class="search-box-area" id="searchBox">
|
|
|
+ <div class="search-item">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParam.time"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="起始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
<base-line
|
|
|
:options="lineOptions"
|
|
|
:width="width"
|
|
|
/>
|
|
|
+</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -25,7 +98,21 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- // 总增长趋势数据
|
|
|
+ //搜索
|
|
|
+ queryParam:{
|
|
|
+ work_local:'',
|
|
|
+ parts:'',
|
|
|
+ bolt_style:'',
|
|
|
+ bolt_type:'',
|
|
|
+ time:'',
|
|
|
+ },
|
|
|
+ legend:[],
|
|
|
+ //查询参数
|
|
|
+ work_local_options:[],
|
|
|
+ parts:[],
|
|
|
+ bolt_style:[],
|
|
|
+ bolt_type_options:[],
|
|
|
+ // 根据不同类型统计
|
|
|
lineData: [],
|
|
|
lineDataX: [],
|
|
|
lineOptions: {},
|
|
@@ -45,11 +132,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getData()
|
|
|
+ this.getData();
|
|
|
+ this.$http.get("wind/getWindOptions").then((response) => {
|
|
|
+ this.wind_options = response.data;
|
|
|
+ });
|
|
|
+ this.$http.get("get_mainten_option?type="+"2").then((response) => {
|
|
|
+ this.work_local_options = response.data;
|
|
|
+ });
|
|
|
+ this.$http.get("get_mainten_option?type="+"1").then((response) => {
|
|
|
+ this.parts_options = response.data;
|
|
|
+ });
|
|
|
+ this.$http.get("get_mainten_option?type="+"3").then((response) => {
|
|
|
+ this.bolt_style_options = response.data;
|
|
|
+ });
|
|
|
+ this.$http.get("get_mainten_option?type="+"4").then((response) => {
|
|
|
+ this.bolt_type_options = response.data;
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
getData() {
|
|
|
this.lineDataX=['2020-05-06','2020-05-06 09:49:01','2020-05-06 09:49:02','2020-05-06 09:49:03','2020-05-07','2020-05-08','2020-05-09','2020-05-10','2020-05-11','2020-05-12']
|
|
|
+ this.legend=['SWT-4.0-146','SWT-2.38-101','SWT-6.0-154','SG-8.0-167'];
|
|
|
this.seriesData=[
|
|
|
{
|
|
|
name: 'SWT-4.0-146',
|
|
@@ -127,6 +231,10 @@ export default {
|
|
|
magicType: {type: ['line', 'bar']},
|
|
|
}
|
|
|
}, */
|
|
|
+ legend: {
|
|
|
+ show:true,
|
|
|
+ data: this.legend
|
|
|
+ },
|
|
|
xAxis: {
|
|
|
type: "category",
|
|
|
data: this.lineDataX,
|
|
@@ -151,5 +259,20 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-
|
|
|
+ .line {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .search-box-area {
|
|
|
+ width: 100%;
|
|
|
+ height: 44px;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .search-item {
|
|
|
+ width: 20%;
|
|
|
+ height: 44px;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
</style>
|