|
|
@@ -143,7 +143,7 @@
|
|
143
|
143
|
<el-form-item label="时间:">
|
|
144
|
144
|
<el-date-picker
|
|
145
|
145
|
size="mini"
|
|
146
|
|
- v-model="formTime.time"
|
|
|
146
|
+ v-model="formTime.dataTime"
|
|
147
|
147
|
type="date"
|
|
148
|
148
|
placeholder="请选择">
|
|
149
|
149
|
</el-date-picker>
|
|
|
@@ -153,6 +153,7 @@
|
|
153
|
153
|
size="mini"
|
|
154
|
154
|
type="primary"
|
|
155
|
155
|
icon="el-icon-search"
|
|
|
156
|
+ @click="getRun()"
|
|
156
|
157
|
>查询</el-button
|
|
157
|
158
|
>
|
|
158
|
159
|
</el-form-item>
|
|
|
@@ -162,7 +163,7 @@
|
|
162
|
163
|
size="mini"
|
|
163
|
164
|
type="primary"
|
|
164
|
165
|
icon="el-icon-refresh-left"
|
|
165
|
|
- @click="formTime.time = ''"
|
|
|
166
|
+ @click="formTime.dataTime = '';getRun()"
|
|
166
|
167
|
>重置</el-button
|
|
167
|
168
|
>
|
|
168
|
169
|
</el-form-item>
|
|
|
@@ -187,9 +188,9 @@
|
|
187
|
188
|
:index="indexMethod"
|
|
188
|
189
|
show-overflow-tooltip
|
|
189
|
190
|
></el-table-column>
|
|
190
|
|
- <!-- <el-table-column prop="device" label="检测时间" align="center">
|
|
|
191
|
+ <el-table-column prop="dataTime" label="检测时间" width="200" align="center">
|
|
191
|
192
|
</el-table-column>
|
|
192
|
|
- <el-table-column prop="device" label="设备编号" align="center">
|
|
|
193
|
+ <!-- <el-table-column prop="device" label="设备编号" align="center">
|
|
193
|
194
|
</el-table-column>
|
|
194
|
195
|
<el-table-column prop="tempValue" label="温度(℃)" align="center">
|
|
195
|
196
|
</el-table-column>
|
|
|
@@ -216,21 +217,21 @@
|
|
216
|
217
|
>
|
|
217
|
218
|
</el-table-column> -->
|
|
218
|
219
|
|
|
219
|
|
- <el-table-column prop="scanNum" label="最高温度(℃)" align="center">
|
|
|
220
|
+ <el-table-column prop="maxValue" label="最高温度(℃)" align="center">
|
|
220
|
221
|
</el-table-column>
|
|
221
|
222
|
|
|
222
|
|
- <el-table-column prop="scanNum" label="最低温度(℃)" align="center">
|
|
|
223
|
+ <el-table-column prop="minValue" label="最低温度(℃)" align="center">
|
|
223
|
224
|
</el-table-column>
|
|
224
|
|
- <el-table-column prop="scanNum" label="平均温度(℃)" align="center">
|
|
|
225
|
+ <el-table-column prop="avgValue" label="平均温度(℃)" align="center">
|
|
225
|
226
|
</el-table-column>
|
|
226
|
|
- <el-table-column prop="scanNum" label="最高湿度(%RH)" align="center">
|
|
|
227
|
+ <el-table-column prop="maxWet" label="最高湿度(%RH)" align="center">
|
|
227
|
228
|
</el-table-column>
|
|
228
|
229
|
|
|
229
|
|
- <el-table-column prop="scanNum" label="最低湿度(%RH)" align="center">
|
|
|
230
|
+ <el-table-column prop="minWet" label="最低湿度(%RH)" align="center">
|
|
230
|
231
|
</el-table-column>
|
|
231
|
|
- <el-table-column prop="scanNum" label="平均湿度(%RH)" align="center">
|
|
|
232
|
+ <el-table-column prop="avgWet" label="平均湿度(%RH)" align="center">
|
|
232
|
233
|
</el-table-column>
|
|
233
|
|
- <el-table-column prop="scanNum" label="平均露点温度(℃)" align="center">
|
|
|
234
|
+ <el-table-column prop="avgDew" label="平均露点温度(℃)" align="center">
|
|
234
|
235
|
</el-table-column>
|
|
235
|
236
|
<el-table-column label="操作" width="140" align="center">
|
|
236
|
237
|
<template slot-scope="scope">
|
|
|
@@ -243,6 +244,16 @@
|
|
243
|
244
|
</template>
|
|
244
|
245
|
</el-table-column>
|
|
245
|
246
|
</el-table>
|
|
|
247
|
+ <el-pagination
|
|
|
248
|
+ @size-change="handleSizeChange2"
|
|
|
249
|
+ @current-change="handleCurrentChange2"
|
|
|
250
|
+ :current-page="1"
|
|
|
251
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
252
|
+ :page-size="pagination2.pageSize"
|
|
|
253
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
254
|
+ :total="pagination2.total"
|
|
|
255
|
+ >
|
|
|
256
|
+ </el-pagination>
|
|
246
|
257
|
</el-tab-pane>
|
|
247
|
258
|
|
|
248
|
259
|
<el-tab-pane label="报警记录" name="fourth"></el-tab-pane>
|
|
|
@@ -264,14 +275,14 @@
|
|
264
|
275
|
<el-form-item label="设备名称:">
|
|
265
|
276
|
<el-select
|
|
266
|
277
|
size="mini"
|
|
267
|
|
- v-model="formInline.eqName"
|
|
|
278
|
+ v-model="formInline.eqCode"
|
|
268
|
279
|
placeholder="请选择"
|
|
269
|
280
|
>
|
|
270
|
281
|
<el-option
|
|
271
|
|
- v-for="item in productData"
|
|
|
282
|
+ v-for="item in productData1"
|
|
272
|
283
|
:key="item.id"
|
|
273
|
284
|
:label="item.eqName"
|
|
274
|
|
- :value="item.eqName"
|
|
|
285
|
+ :value="item.eqCode"
|
|
275
|
286
|
>
|
|
276
|
287
|
</el-option>
|
|
277
|
288
|
</el-select>
|
|
|
@@ -298,8 +309,9 @@
|
|
298
|
309
|
|
|
299
|
310
|
<el-table
|
|
300
|
311
|
ref="multipleTable"
|
|
301
|
|
- :data="productData"
|
|
|
312
|
+ :data="productData1"
|
|
302
|
313
|
border
|
|
|
314
|
+ @selection-change="handleSelectionChange"
|
|
303
|
315
|
style="width: 100%"
|
|
304
|
316
|
>
|
|
305
|
317
|
<el-table-column
|
|
|
@@ -521,8 +533,9 @@ export default {
|
|
521
|
533
|
info:{},
|
|
522
|
534
|
dialogTableVisible:false,
|
|
523
|
535
|
formInline:{},
|
|
524
|
|
- formTime:{time:''},
|
|
|
536
|
+ formTime:{dataTime:''},
|
|
525
|
537
|
productData:[{}],
|
|
|
538
|
+ productData1:[{}],
|
|
526
|
539
|
activeName: "first",
|
|
527
|
540
|
checkInfo: [
|
|
528
|
541
|
{
|
|
|
@@ -585,6 +598,7 @@ export default {
|
|
585
|
598
|
val1: [""],
|
|
586
|
599
|
},
|
|
587
|
600
|
],
|
|
|
601
|
+ deviceInfoList:[],
|
|
588
|
602
|
//分页
|
|
589
|
603
|
pagination: {
|
|
590
|
604
|
// 每页显示的条数
|
|
|
@@ -603,14 +617,52 @@ export default {
|
|
603
|
617
|
// 总数
|
|
604
|
618
|
total: 20,
|
|
605
|
619
|
},
|
|
|
620
|
+ //运行数据分页
|
|
|
621
|
+ pagination2: {
|
|
|
622
|
+ // 每页显示的条数
|
|
|
623
|
+ pageSize: 10,
|
|
|
624
|
+ // 当前页
|
|
|
625
|
+ curPage: 1,
|
|
|
626
|
+ // 总数
|
|
|
627
|
+ total: 20,
|
|
|
628
|
+ },
|
|
606
|
629
|
};
|
|
607
|
630
|
},
|
|
608
|
631
|
created(){
|
|
609
|
632
|
this.getBasic()
|
|
610
|
|
- this.getList()
|
|
611
|
633
|
|
|
612
|
634
|
},
|
|
613
|
635
|
methods: {
|
|
|
636
|
+ //添加关联
|
|
|
637
|
+ sure(){
|
|
|
638
|
+ let data={
|
|
|
639
|
+ deviceInfoList:this.deviceInfoList,
|
|
|
640
|
+ proCode:this.info.proCode
|
|
|
641
|
+ }
|
|
|
642
|
+ api.addAssociationsProduct(data)
|
|
|
643
|
+ .then((res) => {
|
|
|
644
|
+ if (res.code == 200) {
|
|
|
645
|
+ this.dialogTableVisible = false;
|
|
|
646
|
+ this.getList()
|
|
|
647
|
+ this.$message({
|
|
|
648
|
+ type: "success",
|
|
|
649
|
+ message: "关联成功",
|
|
|
650
|
+ });
|
|
|
651
|
+ }else{
|
|
|
652
|
+ this.$message({
|
|
|
653
|
+ type: "error",
|
|
|
654
|
+ message: res.msg,
|
|
|
655
|
+ });
|
|
|
656
|
+ }
|
|
|
657
|
+ })
|
|
|
658
|
+ .catch((err) => {
|
|
|
659
|
+ console.log(err);
|
|
|
660
|
+ });
|
|
|
661
|
+ },
|
|
|
662
|
+ handleSelectionChange(val) {
|
|
|
663
|
+ console.log(val);
|
|
|
664
|
+ this.deviceInfoList = val;
|
|
|
665
|
+ },
|
|
614
|
666
|
//检测开始
|
|
615
|
667
|
checkStart() {
|
|
616
|
668
|
this.$confirm("确认发送温湿度检测请求?", "检测操作提示", {
|
|
|
@@ -618,10 +670,32 @@ export default {
|
|
618
|
670
|
cancelButtonText: "取消",
|
|
619
|
671
|
type: "warning",
|
|
620
|
672
|
}).then(() => {
|
|
621
|
|
- this.$message({
|
|
622
|
|
- type: "success",
|
|
623
|
|
- message: "发送成功",
|
|
|
673
|
+ console.log(this.info);
|
|
|
674
|
+ let data={
|
|
|
675
|
+ orgCode: this.info.orgCode,
|
|
|
676
|
+ labelCode: this.runData[0].labelCode,
|
|
|
677
|
+ // eqCode: this.info.eqCode,
|
|
|
678
|
+ proCategoryCode: this.info.proCategoryCode
|
|
|
679
|
+ }
|
|
|
680
|
+ api.ordersSend(data)
|
|
|
681
|
+ .then((res) => {
|
|
|
682
|
+ if (res.code == 200) {
|
|
|
683
|
+ this.getRun();
|
|
|
684
|
+ this.$message({
|
|
|
685
|
+ type: "success",
|
|
|
686
|
+ message: "发送成功",
|
|
|
687
|
+ });
|
|
|
688
|
+ }else{
|
|
|
689
|
+ this.$message({
|
|
|
690
|
+ type: "error",
|
|
|
691
|
+ message: res.msg,
|
|
|
692
|
+ });
|
|
|
693
|
+ }
|
|
|
694
|
+ })
|
|
|
695
|
+ .catch((err) => {
|
|
|
696
|
+ console.log(err);
|
|
624
|
697
|
});
|
|
|
698
|
+
|
|
625
|
699
|
});
|
|
626
|
700
|
},
|
|
627
|
701
|
// 查看检测信息
|
|
|
@@ -629,16 +703,69 @@ export default {
|
|
629
|
703
|
console.log(12);
|
|
630
|
704
|
this.$set(this, "checkDialog", true);
|
|
631
|
705
|
this.checkDialog = true;
|
|
|
706
|
+ this.checkInfo=[
|
|
|
707
|
+ {
|
|
|
708
|
+ name: "检测时间",
|
|
|
709
|
+ val: [row.dataTime],
|
|
|
710
|
+ },
|
|
|
711
|
+ {
|
|
|
712
|
+ name: "最高温度(℃)",
|
|
|
713
|
+ val: [row.maxValue],
|
|
|
714
|
+ name1: "最低温度(℃)",
|
|
|
715
|
+ val1: [row.minValue],
|
|
|
716
|
+ name2: "平均温度(℃)",
|
|
|
717
|
+ val2: [row.avgValue],
|
|
|
718
|
+ },
|
|
|
719
|
+ {
|
|
|
720
|
+ name: "最高湿度(%RH)",
|
|
|
721
|
+ val: [row.maxWet],
|
|
|
722
|
+ name1: "最低湿度(%RH)",
|
|
|
723
|
+ val1: [row.minWet],
|
|
|
724
|
+ name2: "平均湿度(%RH)",
|
|
|
725
|
+ val2: [row.avgWet],
|
|
|
726
|
+ },
|
|
|
727
|
+ {
|
|
|
728
|
+ name: "最高露点温度(℃)",
|
|
|
729
|
+ val: [row.maxDew],
|
|
|
730
|
+ name1: "最低露点温度(℃)",
|
|
|
731
|
+ val1: [row.minDew],
|
|
|
732
|
+ name2: "平均露点温度(℃)",
|
|
|
733
|
+ val2: [row.avgDew],
|
|
|
734
|
+ },
|
|
|
735
|
+ ]
|
|
|
736
|
+ api.runDataDetail(row.id)
|
|
|
737
|
+ .then((res) => {
|
|
|
738
|
+ if (res.code == 200) {
|
|
|
739
|
+ let data=res.data
|
|
|
740
|
+ this.checkInfo1=[]
|
|
|
741
|
+ data.forEach(item=>{
|
|
|
742
|
+ this.checkInfo1.push(
|
|
|
743
|
+ {
|
|
|
744
|
+ title:item.sign,
|
|
|
745
|
+ name: "温度(℃)",
|
|
|
746
|
+ val: [item.tempValue],
|
|
|
747
|
+ name1: "湿度(%RH)",
|
|
|
748
|
+ val1: [item.wetValue],
|
|
|
749
|
+ name2: "露点温度(℃)",
|
|
|
750
|
+ val2: [item.dewValue],
|
|
|
751
|
+ }
|
|
|
752
|
+ )
|
|
|
753
|
+ })
|
|
|
754
|
+ }
|
|
|
755
|
+ })
|
|
|
756
|
+ .catch((err) => {
|
|
|
757
|
+ console.log(err);
|
|
|
758
|
+ });
|
|
632
|
759
|
},
|
|
633
|
760
|
search() {
|
|
634
|
|
- this.getList()
|
|
|
761
|
+ this.getList1()
|
|
635
|
762
|
|
|
636
|
763
|
},
|
|
637
|
764
|
reset() {
|
|
638
|
|
- this.pagination.curPage=1;
|
|
639
|
|
- this.pagination.pageSize=10;
|
|
|
765
|
+ this.pagination1.curPage=1;
|
|
|
766
|
+ this.pagination1.pageSize=10;
|
|
640
|
767
|
this.formInline={}
|
|
641
|
|
- this.getList()
|
|
|
768
|
+ this.getList1()
|
|
642
|
769
|
},
|
|
643
|
770
|
closeAddSb() {
|
|
644
|
771
|
this.formInline = {};
|
|
|
@@ -649,10 +776,11 @@ export default {
|
|
649
|
776
|
},
|
|
650
|
777
|
//获取列表数据
|
|
651
|
778
|
getList() {
|
|
652
|
|
- var condition = this.formInline;
|
|
653
|
|
- condition = JSON.stringify(condition);
|
|
|
779
|
+ let condition = {};
|
|
654
|
780
|
condition.org_code=localStorage.getItem("orgCode");
|
|
655
|
|
- var data = {
|
|
|
781
|
+ condition.proCode=this.info.proCode;
|
|
|
782
|
+ condition = JSON.stringify(condition);
|
|
|
783
|
+ let data = {
|
|
656
|
784
|
pageIndex: this.pagination.curPage,
|
|
657
|
785
|
pageSize: this.pagination.pageSize,
|
|
658
|
786
|
condition: condition,
|
|
|
@@ -660,6 +788,7 @@ export default {
|
|
660
|
788
|
api.equipmentList(data)
|
|
661
|
789
|
.then((res) => {
|
|
662
|
790
|
if (res.code == 200) {
|
|
|
791
|
+ console.log(res.data,11);
|
|
663
|
792
|
this.productData = res.data.records;
|
|
664
|
793
|
this.pagination.pageSize = res.data.size;
|
|
665
|
794
|
this.pagination.total = res.data.total;
|
|
|
@@ -669,6 +798,29 @@ export default {
|
|
669
|
798
|
console.log(err);
|
|
670
|
799
|
});
|
|
671
|
800
|
},
|
|
|
801
|
+ //获取列表数据
|
|
|
802
|
+ getList1() {
|
|
|
803
|
+ let condition = this.formInline;
|
|
|
804
|
+ condition.org_code=localStorage.getItem("orgCode");
|
|
|
805
|
+ condition = JSON.stringify(condition);
|
|
|
806
|
+ let data = {
|
|
|
807
|
+ pageIndex: this.pagination.curPage,
|
|
|
808
|
+ pageSize: this.pagination.pageSize,
|
|
|
809
|
+ condition: condition,
|
|
|
810
|
+ };
|
|
|
811
|
+ api.equipmentList(data)
|
|
|
812
|
+ .then((res) => {
|
|
|
813
|
+ if (res.code == 200) {
|
|
|
814
|
+ console.log(res.data,11);
|
|
|
815
|
+ this.productData1 = res.data.records;
|
|
|
816
|
+ this.pagination1.pageSize = res.data.size;
|
|
|
817
|
+ this.pagination1.total = res.data.total;
|
|
|
818
|
+ }
|
|
|
819
|
+ })
|
|
|
820
|
+ .catch((err) => {
|
|
|
821
|
+ console.log(err);
|
|
|
822
|
+ });
|
|
|
823
|
+ },
|
|
672
|
824
|
edit(){
|
|
673
|
825
|
this.$refs.addDialog.dialogFormVisible=true
|
|
674
|
826
|
this.$refs.addDialog.getInfo(this.info)
|
|
|
@@ -719,9 +871,23 @@ export default {
|
|
719
|
871
|
cancelButtonText: '取消',
|
|
720
|
872
|
type: 'warning'
|
|
721
|
873
|
}).then(() => {
|
|
722
|
|
- this.$message({
|
|
723
|
|
- type: 'success',
|
|
724
|
|
- message: '取消关联成功'
|
|
|
874
|
+ api.disassociateProduct(row.id)
|
|
|
875
|
+ .then((res) => {
|
|
|
876
|
+ if (res.code == 200) {
|
|
|
877
|
+ this.getList()
|
|
|
878
|
+ this.$message({
|
|
|
879
|
+ type: "success",
|
|
|
880
|
+ message: "取消成功",
|
|
|
881
|
+ });
|
|
|
882
|
+ }else{
|
|
|
883
|
+ this.$message({
|
|
|
884
|
+ type: "error",
|
|
|
885
|
+ message: res.msg,
|
|
|
886
|
+ });
|
|
|
887
|
+ }
|
|
|
888
|
+ })
|
|
|
889
|
+ .catch((err) => {
|
|
|
890
|
+ console.log(err);
|
|
725
|
891
|
});
|
|
726
|
892
|
})
|
|
727
|
893
|
},
|
|
|
@@ -733,19 +899,39 @@ export default {
|
|
733
|
899
|
if(v.name=='fourth'){
|
|
734
|
900
|
this.$router.push({ path: "alarmRecord" })
|
|
735
|
901
|
}else if(v.name=='second'){
|
|
736
|
|
- api
|
|
737
|
|
- .runData()
|
|
|
902
|
+ this.getRun()
|
|
|
903
|
+ }else if(v.name=='third'){
|
|
|
904
|
+ this.getList()
|
|
|
905
|
+ this.getList1()
|
|
|
906
|
+ }
|
|
|
907
|
+ },
|
|
|
908
|
+ //获取历史定时任务数据
|
|
|
909
|
+ getRun(){
|
|
|
910
|
+ var condition = this.formTime;
|
|
|
911
|
+ condition.proCode = this.info.proCode;
|
|
|
912
|
+ condition.orgCode = this.info.orgCode;
|
|
|
913
|
+ condition = JSON.stringify(condition);
|
|
|
914
|
+ var data = {
|
|
|
915
|
+ pageIndex: this.pagination2.curPage,
|
|
|
916
|
+ pageSize: this.pagination2.pageSize,
|
|
|
917
|
+ condition: condition,
|
|
|
918
|
+ };
|
|
|
919
|
+ api
|
|
|
920
|
+ .runData(data)
|
|
738
|
921
|
.then((res) => {
|
|
739
|
922
|
if (res.code == 200) {
|
|
740
|
|
- this.runData=res.data.records
|
|
|
923
|
+ this.runData=res.data.records;
|
|
|
924
|
+ this.runData.forEach(item=>{
|
|
|
925
|
+ item.points=JSON.parse(item.points)
|
|
|
926
|
+ })
|
|
|
927
|
+ this.pagination2.pageSize = res.data.size;
|
|
|
928
|
+ this.pagination2.total = res.data.total;
|
|
741
|
929
|
}
|
|
742
|
930
|
})
|
|
743
|
931
|
.catch((err) => {
|
|
744
|
932
|
console.log(err);
|
|
745
|
933
|
});
|
|
746
|
|
- }
|
|
747
|
934
|
},
|
|
748
|
|
-
|
|
749
|
935
|
//表格序号
|
|
750
|
936
|
indexMethod(index) {
|
|
751
|
937
|
return (
|
|
|
@@ -772,6 +958,16 @@ export default {
|
|
772
|
958
|
this.pagination1.curPage = val;
|
|
773
|
959
|
this.getList();
|
|
774
|
960
|
},
|
|
|
961
|
+ // 每页条数改变
|
|
|
962
|
+ handleSizeChange2(val) {
|
|
|
963
|
+ this.pagination2.pageSize = val;
|
|
|
964
|
+ this.getRun();
|
|
|
965
|
+ },
|
|
|
966
|
+ // 当前页改变
|
|
|
967
|
+ handleCurrentChange2(val) {
|
|
|
968
|
+ this.pagination2.curPage = val;
|
|
|
969
|
+ this.getRun();
|
|
|
970
|
+ },
|
|
775
|
971
|
},
|
|
776
|
972
|
mounted() {},
|
|
777
|
973
|
};
|