浏览代码

报表版本记录

FinalYu 2 年之前
父节点
当前提交
5c161d0da6
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 3 0
      chuanyi_client2/src/views/my_report/index.vue
  2. 4 0
      chuanyi_client2/src/views/report_template/index.vue

+ 3 - 0
chuanyi_client2/src/views/my_report/index.vue

@@ -273,6 +273,7 @@ export default {
       reportTemplateList: [],
       dataModelList: [],
       chooseReportTemplate: null,
+      chooseReportTemplateId: null,
       delFlag: 0,
       reportForm: {
         reportTemplate: null,
@@ -485,6 +486,7 @@ export default {
             }
             this.showMainView = true
             let luckyData = JSON.parse(res.data.templateData)
+            this.chooseReportTemplateId = res.data.id
             this.chooseReportTemplate = luckyData
             this.drawLuckyExcel(luckyData, () => {
               loading.close()
@@ -1216,6 +1218,7 @@ export default {
         this.withDateData(excelData)
         this.convertChart()
         let data = {
+          'tableTemplateId': this.chooseReportTemplateId,
           'reportTableName': value,
           'reportValueFormat': this.reportForm.reportValueFormat,
           'reportTableData': JSON.stringify(this.chooseReportTemplate)

+ 4 - 0
chuanyi_client2/src/views/report_template/index.vue

@@ -500,6 +500,7 @@ export default {
       commTemplateList: [],
       templateName: '',
       templateId: '',
+      templateVersion: '',
       reportTemplateItem: 'REPORT_TEMPLATE_ITEM',
       reportInterval: null,
       toolChart: [],
@@ -681,6 +682,7 @@ export default {
         }
         if (this.templateId) {
           data.id = this.templateId
+          data.version = this.templateVersion
           updateReportTemplate(data).then(res => {
             loading.close()
             let msg = res.data ? '修改成功!' : '修改失败!'
@@ -717,6 +719,7 @@ export default {
     /** 新建报表内容 */
     newReportTemplate(type) {
       this.templateId = null
+      this.templateVersion = null
       this.templateName = ''
       this.clearReportTemplate(type)
       // this.$emit('refreshReportTemplateData', true)
@@ -1488,6 +1491,7 @@ export default {
         luckysheet.destroy()
         this.templateName = res.data.templateName
         this.templateId = res.data.id
+        this.templateVersion = res.data.version
         let templateData = res.data.templateData
         let option = JSON.parse(JSON.stringify(this.luckysheetOption))
         option.data = JSON.parse(templateData).data