zhoupeng 1 年之前
父節點
當前提交
88fed81697

+ 281 - 0
industry-admin/src/views/source/dataQuery/chooseItem.vue

@@ -0,0 +1,281 @@
+<template>
+    <el-dialog :title="title" width="60%" custom-class="dialog-addItem" top="5vh" center :before-close="dialogClose"
+        :visible.sync="visible" @open="handleOpen" @close="handleClose">
+        <template>
+            <el-select v-model="selectedGroup" @change="groupChange" collapse-tags placeholder="请选择">
+                <el-option v-for="group in groupList" :key="group.id" :label="group.groupName" :value="group.id">
+                </el-option>
+            </el-select>
+        </template>
+        <!-- <el-divider content-position="left"></el-divider> -->
+        <el-row>
+            <el-col :span="10">
+                <el-divider content-position="left">数据项</el-divider>
+                <div class="cy-line">
+                    <el-checkbox v-model="isSelectAllGroupItem" @change="selectAllGroupItem"
+                        style="margin-left: 10px">全选</el-checkbox>
+                    <div style="height: 60vh; overflow: auto">
+                        <p-virtual-check ref="groupItem" :data-sources="groupItemList"
+                            @check-change-all="checkChangeAllGroupItem" @check-change="checkChangeGroupItem">
+                        </p-virtual-check>
+                    </div>
+                </div>
+            </el-col>
+            <el-col :span="4">
+                <div class="btn-group">
+                    <el-row>
+                        <el-button size="mini" @click="addBtnEvent">添加&nbsp;&gt;&gt;</el-button>
+                    </el-row>
+                    <el-row>
+                        <el-button size="mini" @click="removeBtnEvent">&lt;&lt;&nbsp;移除</el-button>
+                    </el-row>
+                    <el-row>
+                        <el-button size="mini" @click="removeAllBtnEvent">全部移除</el-button>
+                    </el-row>
+                </div>
+            </el-col>
+            <el-col :span="10">
+                <el-divider content-position="left">已选择数据项({{ selectedItemList.length }})</el-divider>
+                <div class="cy-line">
+                    <el-checkbox v-model="isSelectAllSelectedItem" @change="selectAllSelectedItem"
+                        style="margin-left: 10px">全选</el-checkbox>
+                    <div style="height: 60vh; overflow: auto">
+                        <p-virtual-check ref="selectedItem" :data-sources="selectedItemList"
+                            @check-change-all="checkChangeAllSelectedItem" @check-change="checkChangeSelectedItem">
+                        </p-virtual-check>
+                    </div>
+                </div>
+            </el-col>
+        </el-row>
+        <div style="width: 100%; text-align: center;margin-bottom: 5px;">
+            <el-button type="primary" @click="addItemEvent">确定</el-button>
+            <el-button @click="dialogClose">取消</el-button>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import PVirtualCheck from "@/components/PVirtualCheck/index.vue";
+
+import { getAllItemGroup, getItemGroupById } from '@/api/source/itemGroup'
+export default {
+    components: {
+        'p-virtual-check': PVirtualCheck
+    },
+    data() {
+        return {
+            title: '选择数据项',
+            visible: false,
+            deviceLedgerId: null,
+            //数据组下拉框
+            groupList: [],
+            selectedGroup: null,
+            //数据组数据项
+            isSelectAllGroupItem: false,
+            groupItemList: [],
+            //已选择的数据项
+            isSelectAllSelectedItem: false,
+            selectedItemList: [],
+            currentChooseItemList: []
+        }
+    },
+    methods: {
+        /** 关闭弹出层 */
+        dialogClose() {
+            this.visible = false
+        },
+        /** 弹窗打开事件 */
+        handleOpen() {
+            this.getAllItemGroup()
+        },
+        /** 弹窗关闭事件 */
+        handleClose() {
+            this.groupList = []
+            this.selectedGroup = null
+            this.isSelectAllGroupItem = false
+            this.groupItemList = []
+            this.isSelectAllSelectedItem = false
+            this.selectedItemList = []
+        },
+        /** 获取所有数据组信息 */
+        getAllItemGroup() {
+            let params = { page: 1, limit: 9999 }
+            getAllItemGroup(params).then(res => {
+                this.groupList = res.data.itemGroupList
+            })
+        },
+        /** 数据组选择框改变事件 */
+        groupChange(val) {
+            this.isSelectAllGroupItem = false
+            getItemGroupById(val).then(res => {
+                let arr = []
+                for (let i = 0; i < res.data.itemList.length; i++) {
+                    let temp = res.data.itemList[i];
+                    temp.label = res.data.itemList[i].itemReadName
+                    temp.value = res.data.itemList[i].id
+                    arr.push(temp)
+                }
+                this.groupItemList = arr
+            })
+        },
+        /** 数据组数据项是否全选事件 */
+        selectAllGroupItem(val) {
+            this.$refs.groupItem.checkedAll(val);
+        },
+        /** 是否全部选中,数据组数据项 */
+        checkChangeAllGroupItem(flag) {
+            this.isSelectAllGroupItem = flag;
+        },
+        /** 选中数据项的数据 */
+        checkChangeGroupItem(datas) {
+            this.currentChooseItemList = []
+            if (!datas || datas.length == 0) {
+                return;
+            }
+            datas.forEach((data) => {
+                if (data.checked) {
+                    this.currentChooseItemList.push(data);
+                }
+            });
+        },
+        /** 已选择的数据项是否全选事件 */
+        selectAllSelectedItem(val) {
+            this.$refs.selectedItem.checkedAll(val);
+        },
+        /** 是否全部选中,已经选择的数据项监听 */
+        checkChangeAllSelectedItem(flag) {
+            this.selectAllSelectedItem = flag
+        },
+        /** 选中已经选择的数据项的数据 */
+        checkChangeSelectedItem(datas) {
+            this.selectedItemList = datas
+        },
+        /** 将左侧的数据添加到右侧 */
+        addBtnEvent() {
+            let currentChooseItemListF = []
+            if (this.currentChooseItemList.length == 0) {
+                this.$message({
+                    message: '请选择数据项!',
+                    type: 'warning'
+                });
+                return;
+            }
+            for (let i = 0; i < this.currentChooseItemList.length; i++) {
+                let temp = {
+                    checked: false,
+                    describe: this.currentChooseItemList[i].describe,
+                    id: this.currentChooseItemList[i].id,
+                    itemGroupId: this.currentChooseItemList[i].itemGroupId,
+                    itemName: this.currentChooseItemList[i].itemName,
+                    itemReadName: this.currentChooseItemList[i].itemReadName,
+                    label: this.currentChooseItemList[i].label,
+                    value: this.currentChooseItemList[i].value
+                }
+                currentChooseItemListF.push(temp);
+            }
+            //去重
+            let arr = JSON.parse(JSON.stringify(this.selectedItemList));
+            if (arr.length == 0) {
+                arr = currentChooseItemListF;
+            } else {
+                let status = false;
+                for (let i in currentChooseItemListF) {
+                    let flag = false;
+                    for (let j in arr) {
+                        let tValue = arr[j].value
+                        if (currentChooseItemListF[i].value == tValue) {
+                            flag = true;
+                            if (!status) {
+                                status = true;
+                            }
+                            break;
+                        }
+                    }
+                    if (!flag) {
+                        arr.push(currentChooseItemListF[i]);
+                    }
+                }
+                if (status) {
+                    this.$message({
+                        message: '请注意,选择的数据项中含有重复的项',
+                        type: 'warning'
+                    });
+                }
+            }
+            this.selectAllGroupItem(false);
+            this.$nextTick(() => {
+                this.selectedItemList = arr;
+                this.isSelectAllGroupItem = false;
+                this.isSelectAllSelectedItem = false;
+                this.currentChooseItemList = [];
+            });
+        },
+        /** 移除右侧选中的数据 */
+        removeBtnEvent() {
+            let temp = this.selectedItemList;
+            if (!temp || temp.length == 0) {
+                return;
+            }
+            for (let i = temp.length - 1; i >= 0; i--) {
+                if (temp[i].checked) {
+                    this.selectedItemList.splice(i, 1);
+                }
+            }
+            // 重置选择
+            this.isSelectAllSelectedItem = false;
+            this.selectAllSelectedItem(false);
+        },
+        /** 移除右侧全部数据 */
+        removeAllBtnEvent() {
+            if (this.selectedItemList.length == 0) {
+                return;
+            }
+            this.isSelectAllSelectedItem = false;
+            this.selectedItemList = [];
+        },
+        /** 添加数据项事件 */
+        addItemEvent() {
+            if (this.selectedItemList.length == 0) {
+                this.$message({
+                    message: '请选择数据项!',
+                    type: 'warning'
+                });
+                return;
+            }
+            this.$emit('receiveCheckedData', this.selectedItemList)
+            this.dialogClose()
+        }
+    }
+}
+</script>
+
+<style rel="stylesheet/scss" lang="scss" scoped>
+.dialog-addItem {
+    height: 80vh;
+
+    .el-dialog__body {
+        height: 70vh;
+        overflow: hidden;
+    }
+}
+
+.cy-line {
+    border: 1px solid #b8b4b4;
+}
+
+/* .btn-group {
+    height: 100%;
+    text-align: center;
+    display: flex;
+    align-content: center;
+    justify-content: center;
+    align-items: center;
+
+} */
+
+.btn-group {
+    width: 100%;
+    height: calc(100% - 20px);
+    padding: 100% 30%;
+}
+</style>

+ 212 - 110
industry-admin/src/views/source/dataQuery/index.vue

@@ -3,42 +3,87 @@
         <el-row>
             <el-col>
                 <!-- 搜索信息 -->
-                <el-form ref="chartForm" :model="chartForm" size="small" :inline="true" label-width="80px">
-                    <el-form-item label="数据组" prop="itemGroupId">
-                        <el-select clearable v-model="chartForm.itemGroupId" placeholder="请选择数据组">
-                            <el-option v-for="itemGroup in itemGroupList" :key="itemGroup.id" :label="itemGroup.groupName"
-                                :value="itemGroup.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="数据项" prop="itemList">
-                        <el-input v-model="chartForm.itemList" disabled placeholder="请选择数据项" maxlength="10">
-                            <el-button type="primary" slot="append" icon="el-icon-search"
-                                @click="chooseItemEvent">选择</el-button>
-                        </el-input>
-                    </el-form-item>
-                    <el-form-item label="开始时间" prop="startTime">
-                        <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="chartForm.startTime" type="datetime"
-                            placeholder="选择日期">
-                        </el-date-picker>
-                    </el-form-item>
-                    <el-form-item label="结束时间" prop="endTime">
-                        <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="chartForm.endTime" type="datetime"
-                            placeholder="选择日期">
-                        </el-date-picker>
-                    </el-form-item>
-                    <el-form-item>
-                        <el-button type="primary" plain icon="el-icon-search" size="mini" @click="queryData">查询</el-button>
-                        <el-button ref="btn" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-                        <el-button type="primary" plain icon="el-icon-folder-opened" size="mini"
-                            @click="exportData">导出</el-button>
-                    </el-form-item>
+                <el-form ref="chartForm" :model="chartForm" :rules="chartFormRules" size="small" :inline="true">
+                    <el-row>
+                        <el-col :span="4" :xs="8" :sm="6" :md="4" :lg="3" :xl="4">
+                            <el-form-item prop="trendType">
+                                <el-radio-group v-model="chartForm.trendType">
+                                    <el-radio :label="0">实时趋势</el-radio>
+                                    <el-radio :label="1">历史趋势</el-radio>
+                                </el-radio-group>
+                            </el-form-item>
+                        </el-col>
+                        <el-col v-if="chartForm.trendType == 0" :span="4">
+                            <el-form-item label="更新频率" prop="frequencyValue">
+                                <el-input v-model="chartForm.frequencyValue"></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col v-if="chartForm.trendType == 0" :span="1" :xl="2">
+                            <el-form-item prop="frequencyType">
+                                <el-select v-model="chartForm.frequencyType">
+                                    <el-option v-for="timeType in timeTypeList" :key="timeType.value"
+                                        :label="timeType.label" :value="timeType.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col v-if="chartForm.trendType == 0" :span="4">
+                            <el-form-item label="时间长度" prop="timeValue">
+                                <el-input v-model="chartForm.timeValue"></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col v-if="chartForm.trendType == 0" :span="2">
+                            <el-form-item prop="timeType">
+                                <el-select v-model="chartForm.timeType">
+                                    <el-option v-for="timeType in timeTypeList" :key="timeType.value"
+                                        :label="timeType.label" :value="timeType.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col v-if="chartForm.trendType == 1" :span="6">
+                            <el-form-item label="开始时间" prop="startTime">
+                                <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="chartForm.startTime"
+                                    type="datetime" placeholder="选择日期">
+                                </el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                        <el-col v-if="chartForm.trendType == 1" :span="6">
+                            <el-form-item label="结束时间" prop="endTime">
+                                <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="chartForm.endTime"
+                                    type="datetime" placeholder="选择日期">
+                                </el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-form-item label="数据项" prop="itemListTitile">
+                            <el-input :title="chartForm.itemListTitile" v-model="chartForm.itemListTitile" disabled
+                                placeholder="请选择数据项" maxlength="10">
+                                <el-button type="primary" slot="append" icon="el-icon-search"
+                                    @click="chooseItemEvent">选择</el-button>
+                            </el-input>
+                        </el-form-item>
+                        <el-form-item label="小数位" prop="decimalPlaces">
+                            <el-input v-model="chartForm.decimalPlaces"></el-input>
+                        </el-form-item>
+                        <el-form-item label="量程" prop="range">
+                            <el-input v-model="chartForm.range"></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button type="primary" plain icon="el-icon-search" size="mini"
+                                @click="queryData">查询</el-button>
+                            <el-button ref="btn" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+                            <el-button type="primary" plain icon="el-icon-folder-opened" size="mini"
+                                @click="exportData">导出</el-button>
+                        </el-form-item>
+                    </el-row>
                 </el-form>
             </el-col>
         </el-row>
 
-        <!-- 数据项表格 -->
-        <ItemTable ref="itemTable" @receiveCheckedData="receiveCheckedData"></ItemTable>
+        <!-- 添加数据项 -->
+        <ChooseItem ref="chooseItem" @receiveCheckedData="receiveCheckedData"></ChooseItem>
         <!-- 统计图 -->
         <div class="lineChartContant" v-on:mouseover="mouseOver()" v-on:mouseout="mouseOut()">
             <div id="lineChart" class="lineChart" />
@@ -47,18 +92,18 @@
 </template>
 
 <script>
+import { showLoading } from '@/utils/cqcy'
 import { parseTime } from "@/utils/index";
-import { getAllItemGroup, getItemListValue } from '@/api/source/itemGroup'
-import ItemTable from './itemTable.vue'
+import ChooseItem from './chooseItem.vue'
+import { getItemListValue } from '@/api/source/itemGroup'
 import qs from 'qs'
 import echarts from 'echarts'
 
 export default {
     created() {
-        this.getAllItemGroup()
     },
     components: {
-        ItemTable
+        ChooseItem
     },
     data() {
         return {
@@ -67,12 +112,57 @@ export default {
             state: null,
             count: 0,
             itemGroupList: [],
+            trendTypeList: [
+                { label: '实时趋势', value: 0 },
+                { label: '历史趋势', value: 1 }
+            ],
+            timeTypeList: [
+                { label: '秒', value: 0 },
+                { label: '分', value: 1 },
+                { label: '时', value: 2 },
+                { label: '天', value: 3 }
+            ],
+            itemList: [],
             chartForm: {
-                itemGroupId: null,
+                itemListTitile: '',
                 idList: [],
+                decimalPlaces: 0,
+                trendType: 0,
+                range: null,
+                frequencyValue: 1,
+                frequencyType: 0,
+                timeValue: 60,
+                timeType: 0,
                 startTime: null,
                 endTime: null
             },
+            chartFormRules: {
+
+                frequencyValue: [
+                    { required: true, message: '更新频率值不能为空', trigger: 'blur' }
+                ],
+                frequencyType: [
+                    { required: true, message: '更新频率类型不能为空', trigger: 'blur' }
+                ],
+                timeValue: [
+                    { required: true, message: '时间值不能为空', trigger: 'blur' }
+                ],
+                timeType: [
+                    { required: true, message: '时间类型不能为空', trigger: 'blur' }
+                ],
+                startTime: [
+                    { required: true, message: '开始时间不能为空', trigger: 'blur' }
+                ],
+                endTime: [
+                    { required: true, message: '结束时间不能为空', trigger: 'blur' }
+                ],
+                decimalPlaces: [
+
+                ],
+                range: [
+
+                ],
+            },
             chooseStartTime: null,
             chooseEndTime: null,
             //charts
@@ -99,16 +189,7 @@ export default {
                     label: {
                         backgroundColor: '#777'
                     },
-                },
-                // formatter: function (params, ticket, callback) {
-                //     let b = '<div style="display:inline;">'
-                //     for (let a of params) {
-                //         b += '<div><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + a.color + ';"></span><span>'
-                //             + a.seriesName + ': ' + a.data + '</span></div>'
-                //     }
-                //     b += '</div>'
-                //     return b;
-                // }
+                }
             },
             //列标题
             legend: {
@@ -145,7 +226,7 @@ export default {
                 boundaryGap: false,
                 axisLine: {
                     lineStyle: {
-                        color: '#57617B'
+                        color: '#FFFFFF'
                     }
                 },
                 data: []
@@ -159,7 +240,7 @@ export default {
                 },
                 axisLine: {
                     lineStyle: {
-                        color: '#57617B'
+                        color: '#FFFFFF'
                     }
                 },
                 axisLabel: {
@@ -181,37 +262,25 @@ export default {
     methods: {
         /** 接受传过来的数据 */
         receiveCheckedData(data) {
+            this.itemList = data
             let arr = []
-            for (let a of data) {
+            let b = ''
+            for (let i in data) {
+                const a = data[i]
                 arr.push(a.id)
+                if (i == data.length - 1) {
+                    b += a.itemGroupId + "." + a.itemReadName
+                } else {
+                    b += a.itemGroupId + "." + a.itemReadName + ","
+                }
             }
             this.chartForm.idList = arr
-        },
-        /** 获取所有数据组 */
-        getAllItemGroup() {
-            let queryParams = { page: 1, limit: 999 }
-            getAllItemGroup(queryParams).then(res => {
-                if (!res || !res.data) {
-                    this.$message({
-                        message: '数据查询失败!',
-                        type: 'warning'
-                    })
-                    return
-                }
-                this.itemGroupList = res.data.itemGroupList
-            })
+            this.chartForm.itemListTitile = b
         },
         /** 选择数据项事件 */
         chooseItemEvent() {
-            if (!this.chartForm.itemGroupId) {
-                this.$message({
-                    message: '请选择数据组',
-                    type: 'warning'
-                })
-                return
-            }
-            this.$refs.itemTable.visible = true
-            this.$refs.itemTable.itemGroupId = this.chartForm.itemGroupId
+            this.$refs.chooseItem.selectedItemList = this.itemList
+            this.$refs.chooseItem.visible = true
         },
         /** 查询数据 */
         queryData() {
@@ -219,13 +288,6 @@ export default {
             clearInterval(this.timer)
             this.timer = null
             this.chart = null
-            if (!this.chartForm.itemGroupId) {
-                this.$message({
-                    message: '请选择数据组',
-                    type: 'warning'
-                })
-                return
-            }
             if (this.chartForm.idList.length == 0) {
                 this.$message({
                     message: '请选择数据项',
@@ -233,40 +295,52 @@ export default {
                 })
                 return
             }
-            if (this.chartForm.startTime) {
-                //如果开始时间和结束时间都有,则展示死数据
-                if (this.chartForm.endTime) {
-                    this.chooseStartTime = this.chartForm.startTime
-                    this.chooseEndTime = this.chartForm.endTime
-                    this.state = false
-                    this.initChart()
-                } else {
-                    //如果只有开始时间,则展示固定长度时间线的数据
-                    let currentTime = new Date().getTime()
-                    this.count = currentTime - new Date(this.chartForm.startTime).getTime()
-                    this.chooseStartTime = this.chartForm.startTime
-                    this.chooseEndTime = parseTime(currentTime)
-                    this.state = true
-                    this.initChart()
-                    this.startTimer()
+            //如果为实时趋势
+            if (this.chartForm.trendType == 0) {
+                if (!this.chartForm.frequencyValue) {
+                    this.$message({
+                        message: '频率不能为空',
+                        type: 'warning'
+                    })
+                    return
                 }
-            } else {
-                if (this.chartForm.endTime) {
+                if (!this.chartForm.timeValue) {
                     this.$message({
-                        message: '不能只选择结束时间',
+                        message: '时间长度不能为空',
+                        type: 'warning'
+                    })
+                    return
+                }
+
+                let currentTime = new Date().getTime()
+                this.count = this.timeCalculation(this.chartForm.timeValue, this.chartForm.timeType)
+                this.chooseStartTime = parseTime(new Date(currentTime - this.count))
+                this.chooseEndTime = parseTime(currentTime)
+                //添加监听事件
+                this.state = true
+                //初始化统计图
+                this.initChart()
+                //如果为历史趋势
+            } else if (this.chartForm.trendType == 1) {
+                if (!this.chartForm.startTime) {
+                    this.$message({
+                        message: '请选择开始时间',
+                        type: 'warning'
+                    })
+                    return
+                }
+                if (!this.chartForm.endTime) {
+                    this.$message({
+                        message: '请选择结束时间',
                         type: 'warning'
                     })
                     return
-                } else {
-                    //如果开始时间和结束时间都没有,则从当前时刻开始,往前推一分钟
-                    this.count = 60 * 60 * 1000
-                    let currentTime = new Date().getTime()
-                    this.chooseEndTime = parseTime(currentTime)
-                    this.chooseStartTime = parseTime(new Date(currentTime - this.count))
-                    this.state = true
-                    this.initChart()
-                    this.startTimer()
                 }
+                this.chooseStartTime = this.chartForm.startTime
+                this.chooseEndTime = this.chartForm.endTime
+                //展示死统计图,且不添加监听事件
+                this.state = false
+                this.initChart()
             }
         },
         /** 重置 */
@@ -295,6 +369,7 @@ export default {
         },
         /** 初始化统计图,如果state为true,则是动态,否则是静态 */
         initChart() {
+            const loading = showLoading(this, "加载中,请稍候···")
             this.getItemListValue((res) => {
                 let data = res.data
                 this.chart = echarts.init(document.getElementById('lineChart'))
@@ -319,6 +394,16 @@ export default {
                     }
                     seriesData.push(b)
                 }
+                // let decimalPlaces = this.chartForm.decimalPlaces
+                this.tooltip.formatter = function (params, ticket, callback) {
+                    let b = '<div style="display:inline;">'
+                    for (let a of params) {
+                        b += '<div><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + a.color + ';"></span><span style="color:' + a.color + '">'
+                            + a.seriesName + ': ' + a.data + '</span></div>'
+                    }
+                    b += '</div>'
+                    return b
+                }
                 this.legend.data = legendData
                 this.xAxis.data = data[0].dataTimeList
                 this.series = seriesData
@@ -333,6 +418,11 @@ export default {
                     yAxis: this.yAxis,
                     series: this.series
                 })
+                if (this.state) {
+                    //启动定时器,轮训更新统计图
+                    this.startTimer()
+                }
+                loading.close()
             })
         },
         /** 鼠标移入事件 */
@@ -358,7 +448,19 @@ export default {
                 this.chooseStartTime = this.chooseEndTime
                 this.chooseEndTime = parseTime(new Date())
                 this.updateChartData()
-            }, 1000)
+            }, this.timeCalculation(this.chartForm.frequencyValue, this.chartForm.frequencyType))
+        },
+        /** 选择时间类型之后得到时间搓 */
+        timeCalculation(value, type) {
+            if (type == 0) {
+                return value * 1000
+            } else if (type == 1) {
+                return value * 60 * 1000
+            } else if (type == 2) {
+                return value * 60 * 60 * 1000
+            } else if (type == 3) {
+                return value * 60 * 60 * 24 * 1000
+            }
         },
         /** 更新统计图数据 */
         updateChartData() {
@@ -405,7 +507,7 @@ export default {
 <style rel="stylesheet/scss" lang="scss" scoped>
 .lineChartContant {
     width: 180vh;
-    height: 80vh;
+    height: 75vh;
 
     .lineChart {
         width: 100%;

+ 2 - 2
industry-admin/src/views/source/itemGroup/itemChooseTree.vue

@@ -183,7 +183,7 @@ export default {
         },
         /** 弹窗打开事件 */
         handleOpen() {
-            const loading = showLoading(this, "加载中,请稍候···");
+            const loading = showLoading(this, "加载中,请稍候···")
             this.isSelectAllItem = false
             this.getNextAllItem(this.dataSourceId, this.treeItemName, (data) => {
                 //加载树
@@ -211,7 +211,7 @@ export default {
                 this.chooseItemDataListByTree = arr
                 //获取数据源的驱动数据项信息
                 this.getDriverItemBySouceId(this.dataSourceId)
-                loading.close();
+                loading.close()
             })
         },
         /** 弹窗关闭事件 */

+ 2 - 1
industry-system/cqcy-ei-influxdb/src/main/resources/flux/StoreMapper.xml

@@ -12,6 +12,7 @@
                 })
             )
             |> to(bucket: #{targetBucket})
+            |> count()
     </select>
 
     <!--查询源表是否含有历史数据-->
@@ -22,4 +23,4 @@
             |> count()
     </select>
 
-</mapper>
+</mapper>

+ 0 - 18
industry-system/industry-da/src/main/java/com/example/opc_da/task/ScheduledTask.java

@@ -11,24 +11,6 @@ import org.springframework.stereotype.Component;
 public class ScheduledTask {
 
     /**
-     * 每10分钟更新一次附属属性
-     */
-//    @Async("threadPoolTaskExecutor")
-//    @Scheduled(cron = "0 0/10 * * * ?")
-    public void updateAttachAttribute() {
-
-    }
-
-    /**
-     * 每一小时强制组装一次数据,防止某些组异常,大量数据存于临时表
-     */
-    @Async("threadPoolTaskExecutor")
-    @Scheduled(cron = "0 0 0/1 * * ?")
-    public void packageBasicData() {
-
-    }
-
-    /**
      * 每天删除,一个月前的文件,且文件不能与数据库匹配的文件
      */
     @Async("threadPoolTaskExecutor")

文件差異過大導致無法顯示
+ 1 - 1
industry-system/industry-da/src/main/resources/static/page/index.html


文件差異過大導致無法顯示
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/app.46f0ab1d.js


文件差異過大導致無法顯示
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/app.c2d64349.js


文件差異過大導致無法顯示
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-02461e1e.d080c417.js


文件差異過大導致無法顯示
+ 0 - 0
industry-system/industry-da/src/main/resources/static/page/static/js/chunk-ff8d401c.a291e9d4.js


部分文件因文件數量過多而無法顯示