Selaa lähdekoodia

Merge branch 'master' of http://116.63.33.55/git/industry-data-platform into master

lhy 1 vuosi sitten
vanhempi
commit
658fa57857

+ 6 - 0
industry-admin/src/components/CommonTable/index.vue

@@ -13,6 +13,12 @@
                 <slot v-if="(item.type == null || item.type == '' || item.type == undefined) && !item.formatter">
                     {{ scope.row[item.propName] }}
                 </slot>
+                <slot v-if="(item.type == 'img') && item.formatter">
+                  <img v-if="item.formatter(scope.row).imgtype==0" src='@/assets/images/time.png' height="16" width="16" style="margin-bottom: -3px;margin-right: 10px" />
+                  <img v-else-if="item.formatter(scope.row).imgtype==1" src='@/assets/images/change.png' height="16" width="16" style="margin-bottom: -3px;margin-right: 10px" />
+                  <img v-else="item.formatter(scope.row).imgtype==2" src='@/assets/images/cond.png' height="16" width="16" style="margin-bottom: -3px;margin-right: 10px" />
+                  <span>{{ item.formatter(scope.row).text }}</span>
+                </slot>
                 <slot v-if="(item.type == null || item.type == '' || item.type == undefined) && item.formatter">
                     {{ item.formatter(scope.row) }}
                 </slot>

+ 6 - 8
industry-admin/src/views/report/reportTablePolicy/index.vue

@@ -74,19 +74,17 @@ export default {
                 {
                     propName: "readMode",
                     labelName: "记录模式",
-                    type: "html",
+                    type: "img",
                     formatter: (row, column, cellValue, index) => {
-                      let result = ''
+                      let result = {}
                         if (row.readMode == 0) {
-                            return '<span>按周期读取</span>' //'按周期读取'
+                            result.text = '按周期读取'
                         } else if (row.readMode == 1) {
-                            result = '按值改变读取'
+                            result.text = '按值改变'
                         } else if (row.readMode == 2) {
-                            result = '按条件读取'
+                            result.text = '按条件读取'
                         }
-                        //let html = '<span class="el-tag el-tag--light">'
-                        //html += result
-                        //html += '</span>'
+                        result.imgtype = row.readMode
                         return result
                     },
                     align: "left",

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

@@ -125,7 +125,7 @@ export default {
                         }
                     },
                     align: "left",
-                    width: '200'
+                    width: '100'
                 },
               {
                 propName: "shareGroup",

+ 35 - 26
industry-admin/src/views/report/tableTemplate/index.vue

@@ -6,20 +6,21 @@
             :default-percent='leftpercent'
             split="vertical">
             <template slot="paneL">
-
-              <el-tree :data="treeData"
-                       :props="defaultProps"
-                       node-key="id"
-                       default-expand-all
-                       v-if="hideLeft==1"
-                       :expand-on-click-node="false"
-                       @node-contextmenu="rightReportNodeEvent"
-                       @node-click="templateNameClick" class="lefttree1">
-                <!--       <span class="custom-tree-node" slot-scope="{ node, data }">
-                           <i class="el-icon-folder" style="color: #DFBA49; margin-right: 5px;"></i>
-                          <span style="font-size: 15px;">{{ node.label }}</span>
-                      </span> -->
-                <span class="custom-tree-node" slot-scope="{ node, data }">
+              <el-scrollbar class="tree-scroll">
+                <el-tree :data="treeData"
+                         :props="defaultProps"
+                         node-key="id"
+                         default-expand-all
+                         highlight-current
+                         v-if="hideLeft==1"
+                         :expand-on-click-node="false"
+                         @node-contextmenu="rightReportNodeEvent"
+                         @node-click="templateNameClick" class="lefttree">
+                  <!--       <span class="custom-tree-node" slot-scope="{ node, data }">
+                             <i class="el-icon-folder" style="color: #DFBA49; margin-right: 5px;"></i>
+                            <span style="font-size: 15px;">{{ node.label }}</span>
+                        </span> -->
+                  <span class="custom-tree-node" slot-scope="{ node, data }">
                       <!-- <span style="font-size: 15px;">{{ node.label }}</span> -->
                                 <svg-icon v-if="data.id == -1" icon-class="reports" />
                                 <template v-else>
@@ -41,13 +42,14 @@
                                          accept=".xlsx" style="display: none;"></input>
                                 </span>
                     </span>
-              </el-tree>
+                </el-tree>
+              </el-scrollbar>
               <span style="position: absolute; right: 10px;top:300px">
                 <el-button type="text" size="mini" title="" @click="splitClickEvent" :icon="iconstr"></el-button>
               </span>
             </template>
             <template slot="paneR">
-              <iframe @load="load" id="myIframe" :src="iframeSrc"
+              <iframe @load="load(-1)" id="myIframe" :src="iframeSrc"
                       :style="{ 'height': '90vh', 'width': '100%', 'border': 'none', 'display': 'block' }"></iframe>
 
             </template>
@@ -89,9 +91,7 @@ export default {
         const loading = showLoading(this, '加载中,请稍候···')
         const task = setInterval(() => {
             loading.close()
-        }, 200);
-        //this.pollingReportData()
-    },
+        }, 200);    },
     components: {
         CommonTable
     },
@@ -170,8 +170,11 @@ export default {
     },
     methods: {
 
-      load() {
-            console.log(this.reportId)
+      load(e) {
+            //console.log(this.reportId)
+        if(e==-1){
+          return;
+        }
             const _this = this
       const files = localStorage.getItem('IMPORT_FILES_JSON')
             _this.sendMsg({
@@ -189,6 +192,9 @@ export default {
                 const json = event.data
                 if (json.cmd === 'close') {
                     //_this.$router.go(-1)
+                }else if(json.cmd==='newsave'){
+                  console.log('newsave')
+                  _this.getAllTableTemplate()
                 }
             })
         },
@@ -213,7 +219,7 @@ export default {
                     this.reportId = res.data.tableTemplateList[0].id
                     this.type = ''
                 }
-                this.load()
+                this.load(this.reportId)
             })
         },
         /** 报表名称点击事件 */
@@ -225,12 +231,12 @@ export default {
           //checkReportChangeStatus()
             this.reportId=data.id
             this.type = ''
-            this.load()
+            this.load(this.reportId)
         },
         addReportEvent(){
           this.reportId=0
           this.type = ''
-          this.load()
+          this.load(this.reportId)
         },
         splitClickEvent(){
           this.hideLeft = !this.hideLeft;
@@ -352,7 +358,7 @@ export default {
           this.closeMenu();
           this.reportId = this.chooseReportData.id;
           this.type = 'export';
-          this.load();
+          this.load(this.reportId);
         },
         /** 新增报表设计 */
         addTableTemplateEvent() {
@@ -439,7 +445,7 @@ export default {
                                 // })
                               _this.reportId = 0
                               _this.type = 'import'
-                              _this.load()
+                              _this.load(_this.reportId)
                                 document.getElementsByClassName('import-file-node')[0].value = ''
                             })
                         }
@@ -467,6 +473,9 @@ export default {
 .sy-content{
   //background: #646464 !important;
 }
+.tree-scroll {
+  height: 90vh;
+}
 .contextmenu {
     margin: 0;
     background: #fff;

+ 12 - 0
industry-admin/src/views/system/user/index.vue

@@ -153,6 +153,18 @@
             </template>
           </el-table-column>
           <el-table-column
+            key="state"
+            label="状态"
+            align="left"
+            prop="state"
+            :show-overflow-tooltip="true"
+          >
+            <template slot-scope="scope">
+              <span>{{ convertUserStatus(scope.row.state) }}</span>
+              <img src="@/assets/images/time.png" height="100" />
+            </template>
+          </el-table-column>
+          <el-table-column
             key="userType"
             label="类型"
             align="left"

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

@@ -95,7 +95,7 @@ const indexFn = {
 				sheetFormulaBar: false,
 				allowCopy:false,
 				allowUpdate:false,
-				readonly:true,
+				allowEdit:false,
 				cellRightClickConfig: {
 					copy: false, // 复制
 					copyAs: false, // 复制为

+ 8 - 4
industry-system/industry-da/src/main/resources/static/reportSheet/js/src/model/right-menu.js

@@ -44,6 +44,9 @@ layui.define(['layer', 'util', 'jquery', 'form', 'sheetTypew', 'chartRightw', 'i
 				layui.api.addTableTemplate(params).then(json => {
 					if (json.code == 200) {
 						layer.msg('保存报表成功!', {icon: 1})
+						window.parent.postMessage({
+							cmd: 'newsave'
+						}, '*')
 					} else {
 						layer.msg(json.msg, {icon: 2})
 					}
@@ -240,12 +243,13 @@ layui.define(['layer', 'util', 'jquery', 'form', 'sheetTypew', 'chartRightw', 'i
 		callback()
 	}
 	
-	const view = [{
+	const view = [
+		/*{
 		clazz: 'img0',
 		img: 'img/svg/report_saveas.svg',
 		txt: '另存为',
 		event: 'saveas'
-	}, {
+	}, */{
 		clazz: 'img0',
 		img: 'img/svg/report_save.svg',
 		txt: '保存',
@@ -260,12 +264,12 @@ layui.define(['layer', 'util', 'jquery', 'form', 'sheetTypew', 'chartRightw', 'i
 		img: 'img/svg/report_reset.svg',
 		txt: '重置',
 		event: 'reset'
-	}, {
+	}, /*{
 		clazz: 'img1',
 		img: 'img/svg/report_cancel.svg',
 		txt: '关闭',
 		event: 'close'
-	}, {
+	},*/ {
 		hr: true
 	}, {
 		clazz: 'img2',

+ 0 - 1
industry-system/industry-da/src/main/resources/static/reportSheet/js/src/model/sheet-util.js

@@ -70,7 +70,6 @@ layui.define(function(exports) {
 			if (sheetConfig && sheetConfig.data) {
 				option.data = sheetConfig.data
 			}
-			console.log(option)
 			option.hook = {
 				cellEditBefore: function(range) {
 					const cell = luckysheet.getCellValue((range[0].row)[0], (range[0].column)[0], {type: 'v'})

+ 1 - 1
industry-system/industry-da/src/main/resources/static/reportSheet/js/util/constants.js

@@ -350,7 +350,7 @@ const sheetOption = {
 		sort: false, // 排序选区
 		filter: false, // 筛选选区
 		chart: false, // 图表生成
-		image: false, // 插入图片
+		image: true, // 插入图片
 		link: false, // 插入链接
 		data: false, // 数据验证
 		cellFormat: false // 设置单元格格式