zhuliu 1 年之前
父节点
当前提交
d41de8daa3

+ 1 - 0
src/views/analyse/custom/components/Tabs/Item.vue

@@ -68,6 +68,7 @@ export default {
       this.$emit('handleAdd3')
     },
     exportReport(){
+      // this.$emit('exportReport',true)
       this.$alert('敬请期待...', '提示', {
           confirmButtonText: '确定',
           callback: action => {

+ 108 - 0
src/views/analyse/custom/components/dialog/reportTemplate.vue

@@ -0,0 +1,108 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :visible.sync="dialogVisible"
+      width="500px"
+      :before-close="handleClose"
+      :append-to-body="true"
+      :close-on-click-modal="false"
+    >
+      <div style="height: calc(100vh - 350px)">
+        <el-container>
+            <el-header>
+                <div style="display:flex;width: 100%;justify-content: flex-end;">
+                    <el-button type="primary" size="small">自定义模板</el-button>
+                </div>
+            </el-header>
+          <el-main class="height_100" :loading="loading">
+            <el-table
+              class="copyTable"
+              :data="tableData"
+              style="width: 100%"
+              row-key="id"
+            >
+              <el-table-column prop="index" label="序号" width="100px">
+                <template slot-scope="scope">
+                  <div>
+                    {{ scope.$index+1 }}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="name" label="名称"> </el-table-column>
+            </el-table>
+          </el-main>
+          <el-footer class="pagination">
+            <el-pagination
+              background
+              layout="total, sizes, prev, pager, next, jumper"
+              :current-page.sync="queryParams.current"
+              :page-size.sync="queryParams.size"
+              @current-change="handleCurrentChange"
+              @size-change="changeSize"
+              :total="total"
+            >
+            </el-pagination>
+          </el-footer>
+        </el-container>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+        dialogVisible:false,
+        title:'报告模板',
+        tableData:[],
+        loading:false,
+        queryParams:{
+            current:1,
+            size:10
+        },
+        total:0,
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {},
+  methods: {
+    handleClose(){
+        this.dialogVisible = false
+    },
+    open(){
+        this.getList()
+        this.dialogVisible = true
+    },
+    getList(){
+        this.tableData = [
+            {
+                id:1,
+                name:'模板一'
+            },
+            {
+                id:2,
+                name:'模板二'
+            }
+        ]
+        this.total = 2
+    },
+    handleCurrentChange(val){
+        this.queryParams.current = val
+        this.getList()
+    },
+    changeSize(val){
+        this.queryParams.current = 1
+        this.queryParams.size = 10
+        this.getList()
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 12 - 2
src/views/analyse/custom/index.vue

@@ -2,7 +2,7 @@
   <div class="height_100 custom-analyse" v-if="showPage">
     <el-container>
       <el-aside width="350px">
-        <TabItem :active-item="activeItem" :treeList="treeList" @add="addNewChart" @edit="handleEdit" @delete="handleDelete" @select="handleSelect" @handleAdd3="handleAdd3"></TabItem>
+        <TabItem :active-item="activeItem" :treeList="treeList" @exportReport="exportReport" @add="addNewChart" @edit="handleEdit" @delete="handleDelete" @select="handleSelect" @handleAdd3="handleAdd3"></TabItem>
       </el-aside>
       <el-main>
         <el-header style="height:45px !important">
@@ -60,6 +60,8 @@
             </el-container>
             
     </el-drawer>
+
+    <reportTemplate ref="reportTemplate"></reportTemplate>
   </div>
 </template>
 
@@ -75,13 +77,18 @@ import Chart from "./components/Charts/index.vue";
 import TabItem from "./components/Tabs/Item";
 import TabData from "./components/Tabs/Data";
 import TabStyle from "./components/Tabs/Style";
+
+
+import reportTemplate from './components/dialog/reportTemplate.vue';
 export default {
   components: {
     addAnalyseGroup,
     Chart,
     TabItem,
     TabData,
-    TabStyle
+    TabStyle,
+
+    reportTemplate
   },
   mixins: [customPage],
   props: {},
@@ -137,6 +144,9 @@ export default {
     window.addEventListener('resize',this.refreshChart)
   },
   methods: {
+    exportReport(){
+      this.$refs.reportTemplate.open()
+    },
     async getPatentNum(){
       if(!this.searchPatentNum){
         this.patentNum = this.patentNums