Browse Source

1、数据源配置取消排序、弹窗按钮样式调整。
2、历史报表添加刷新功能(停用)

lhy 1 year ago
parent
commit
08a0f91567

+ 5 - 1
industry-admin/src/views/report/reportTable/reportDetail.vue

@@ -66,6 +66,8 @@ export default
         return {
             reportId: this.$route.query.id,
             reportTableName:this.$route.query.reportname,
+            isRefresh: this.$route.query.isRefresh,
+            refreshTime: this.$route.query.refreshTime,
             type:'',
             reportInterval:3,
             iframeSrc: process.env.VUE_APP_BASE_API + '/reportSheet/report-history.html',
@@ -82,7 +84,9 @@ export default
                     token: getToken(),
                     url: process.env.VUE_APP_BASE_API,
                     reportId: this.reportId,
-                    type:this.type
+                    type:this.type,
+                    isRefresh: this.isRefresh,
+                    refreshTime: this.refreshTime
                 }
             })
             window.addEventListener('message', function (event) {

+ 6 - 1
industry-admin/src/views/report/runConfig/index.vue

@@ -246,7 +246,12 @@ export default {
         reportNameClick(data) {
             this.$router.push({
                 path: '/reportTable/reportDetail'
-                , query: { id: data.id,reportname:data.reportTableName}
+                , query: {
+                  id: data.id,
+                  reportname:data.reportTableName,
+                  isRefresh: false,
+                  refreshTime: 10000
+                }
             })
         },
         /** 运行记录 */

+ 9 - 9
industry-admin/src/views/source/dataSource/index.vue

@@ -11,15 +11,15 @@
     <el-table :data="tableData" stripe border header-row-class-name="headBackground">
 <!--      <el-table-column type="selection" width="55" align="left" />-->
       <!-- <el-table-column type="index" label="序号" width="60" fixed align="center" /> -->
-      <el-table-column align="left" sortable label="数据源" prop="dataSourceName" />
-      <el-table-column align="left" sortable label="通讯协议" prop="dataSourceTypeName" />
-      <el-table-column align="left" sortable label="IP地址" prop="ipAddress" />
-      <el-table-column align="left" sortable label="端口" prop="ipPort">
+      <el-table-column align="left" label="数据源" prop="dataSourceName" />
+      <el-table-column align="left" label="通讯协议" prop="dataSourceTypeName" />
+      <el-table-column align="left" label="IP地址" prop="ipAddress" />
+      <el-table-column align="left" label="端口" prop="ipPort">
         <template slot-scope="scope">
           <span style="margin-left: 10px">{{ scope.row.ipPort !="" ? scope.row.ipPort  : "-"}}</span>
         </template>
       </el-table-column>>
-      <el-table-column align="left" label="备注" sortable prop="dataSourceDescribe" width="180" /><el-table-column label="操作"
+      <el-table-column align="left" label="备注" prop="dataSourceDescribe" width="180" /><el-table-column label="操作"
         align="left" width="300">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="editConnServer(scope.row)">修改</el-button>
@@ -69,12 +69,12 @@
                 </el-tag>
               </el-form-item>
             </el-form>
-            <div slot='footer' style="text-align: right">
-              <el-button type="primary" size="mini" @click='winSave'>保存</el-button>
-              <el-button @click='winClose' size="mini">取消</el-button>
-            </div>
           </div>
         </div>
+        <div slot='footer' style="text-align: right">
+          <el-button type="primary" size="mini" @click="winSave">确定</el-button>
+          <el-button size="mini" @click="winClose">取消</el-button>
+        </div>
       </el-dialog>
 
       <!-- 数据源连接基础配置弹出层 -->

+ 12 - 0
industry-system/industry-da/src/main/resources/static/reportSheet/js/report-history.js

@@ -35,6 +35,7 @@ layui.use(['_$', 'rightMenu'], function() {
 	}
 })
 
+let refreshIntervalId = null
 window.onload = function() {
 	window.addEventListener('message', function(e) {
 		const json = e.data;
@@ -44,6 +45,14 @@ window.onload = function() {
 			setTimeout(() => {
 				indexFn.initPage(json.data)
 			}, 500)
+			if(json.data.isRefresh){
+				if(!json.data.refreshTime){
+					json.data.refreshTime = 1000
+				}
+				refreshIntervalId = setInterval(() => {
+					indexFn.initPage(json.data)
+				}, json.data.refreshTime)
+			}
 		} else if (json.cmd == 'show') {
 			indexFn.initPage(json.data)
 		} else if(json.cmd=='print'){
@@ -52,6 +61,9 @@ window.onload = function() {
 	})
 }
 window.onbeforeunload = function() {
+	if(refreshIntervalId){
+		clearInterval(refreshIntervalId)
+	}
 	window.removeEventListener('message', function(e) {
 		console.log(e)
 	});