浏览代码

修改报表设计

lry 1 年之前
父节点
当前提交
9dce313892

+ 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">
                 <slot v-if="(item.type == null || item.type == '' || item.type == undefined) && !item.formatter">
                     {{ scope.row[item.propName] }}
                     {{ scope.row[item.propName] }}
                 </slot>
                 </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">
                 <slot v-if="(item.type == null || item.type == '' || item.type == undefined) && item.formatter">
                     {{ item.formatter(scope.row) }}
                     {{ item.formatter(scope.row) }}
                 </slot>
                 </slot>

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

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

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

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

+ 34 - 24
industry-admin/src/views/report/tableTemplate/index.vue

@@ -6,20 +6,21 @@
             :default-percent='leftpercent'
             :default-percent='leftpercent'
             split="vertical">
             split="vertical">
             <template slot="paneL">
             <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> -->
                       <!-- <span style="font-size: 15px;">{{ node.label }}</span> -->
                                 <svg-icon v-if="data.id == -1" icon-class="reports" />
                                 <svg-icon v-if="data.id == -1" icon-class="reports" />
                                 <template v-else>
                                 <template v-else>
@@ -41,13 +42,14 @@
                                          accept=".xlsx" style="display: none;"></input>
                                          accept=".xlsx" style="display: none;"></input>
                                 </span>
                                 </span>
                     </span>
                     </span>
-              </el-tree>
+                </el-tree>
+              </el-scrollbar>
               <span style="position: absolute; right: 10px;top:300px">
               <span style="position: absolute; right: 10px;top:300px">
                 <el-button type="text" size="mini" title="" @click="splitClickEvent" :icon="iconstr"></el-button>
                 <el-button type="text" size="mini" title="" @click="splitClickEvent" :icon="iconstr"></el-button>
               </span>
               </span>
             </template>
             </template>
             <template slot="paneR">
             <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>
                       :style="{ 'height': '90vh', 'width': '100%', 'border': 'none', 'display': 'block' }"></iframe>
 
 
             </template>
             </template>
@@ -90,7 +92,6 @@ export default {
         const task = setInterval(() => {
         const task = setInterval(() => {
             loading.close()
             loading.close()
         }, 200);
         }, 200);
-        this.pollingReportData()
     },
     },
     components: {
     components: {
         CommonTable
         CommonTable
@@ -170,8 +171,11 @@ export default {
     },
     },
     methods: {
     methods: {
 
 
-      load() {
-            console.log(this.reportId)
+      load(e) {
+            //console.log(this.reportId)
+        if(e==-1){
+          return;
+        }
             const _this = this
             const _this = this
       const files = localStorage.getItem('IMPORT_FILES_JSON')
       const files = localStorage.getItem('IMPORT_FILES_JSON')
             _this.sendMsg({
             _this.sendMsg({
@@ -189,6 +193,9 @@ export default {
                 const json = event.data
                 const json = event.data
                 if (json.cmd === 'close') {
                 if (json.cmd === 'close') {
                     //_this.$router.go(-1)
                     //_this.$router.go(-1)
+                }else if(json.cmd==='newsave'){
+                  console.log('newsave')
+                  _this.getAllTableTemplate()
                 }
                 }
             })
             })
         },
         },
@@ -213,7 +220,7 @@ export default {
                     this.reportId = res.data.tableTemplateList[0].id
                     this.reportId = res.data.tableTemplateList[0].id
                     this.type = ''
                     this.type = ''
                 }
                 }
-                this.load()
+                this.load(this.reportId)
             })
             })
         },
         },
         /** 报表名称点击事件 */
         /** 报表名称点击事件 */
@@ -225,12 +232,12 @@ export default {
           //checkReportChangeStatus()
           //checkReportChangeStatus()
             this.reportId=data.id
             this.reportId=data.id
             this.type = ''
             this.type = ''
-            this.load()
+            this.load(this.reportId)
         },
         },
         addReportEvent(){
         addReportEvent(){
           this.reportId=0
           this.reportId=0
           this.type = ''
           this.type = ''
-          this.load()
+          this.load(this.reportId)
         },
         },
         splitClickEvent(){
         splitClickEvent(){
           this.hideLeft = !this.hideLeft;
           this.hideLeft = !this.hideLeft;
@@ -352,7 +359,7 @@ export default {
           this.closeMenu();
           this.closeMenu();
           this.reportId = this.chooseReportData.id;
           this.reportId = this.chooseReportData.id;
           this.type = 'export';
           this.type = 'export';
-          this.load();
+          this.load(this.reportId);
         },
         },
         /** 新增报表设计 */
         /** 新增报表设计 */
         addTableTemplateEvent() {
         addTableTemplateEvent() {
@@ -439,7 +446,7 @@ export default {
                                 // })
                                 // })
                               _this.reportId = 0
                               _this.reportId = 0
                               _this.type = 'import'
                               _this.type = 'import'
-                              _this.load()
+                              _this.load(_this.reportId)
                                 document.getElementsByClassName('import-file-node')[0].value = ''
                                 document.getElementsByClassName('import-file-node')[0].value = ''
                             })
                             })
                         }
                         }
@@ -467,6 +474,9 @@ export default {
 .sy-content{
 .sy-content{
   //background: #646464 !important;
   //background: #646464 !important;
 }
 }
+.tree-scroll {
+  height: 90vh;
+}
 .contextmenu {
 .contextmenu {
     margin: 0;
     margin: 0;
     background: #fff;
     background: #fff;

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

@@ -153,6 +153,18 @@
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <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"
             key="userType"
             label="类型"
             label="类型"
             align="left"
             align="left"