Blame view

backend/form/src/main/resources/template/codegen/entityManager.querySqldef.vue.ftl 1.95 KB
8ea9c133   陈威   初始化提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<#assign baseUrl><#noparse>${</#noparse>${cfg.system}<#noparse>}</#noparse><#if package.ModuleName??>/${package.ModuleName}</#if>/${table.entityPath}/v1</#assign>
<template>
  <div class="data-preview-wrap">
    <el-row class="top-title__row">
      <h3 class="top-title">{{ queryView.name ? queryView.name : '' }}</h3>
    </el-row>
  	${cfg.queryViewTemplate}
  </div>
</template>
<script>
import api from "@/api/${table.entityName}.js";
import dynamic_view_mixin from 'hotent-ui/src/mixins/querySqlPreview.js'
export default {
  mixins: [dynamic_view_mixin],
  data() {
    return {
      rows: [],
      queryView: ${cfg.queryViewInfo}
    };
  },
  methods: {
    getQuerySqlViewByPagination(param, cb) {
      api
        .loadData(param.pagination||{})
        .then(resp => {
          let response = resp.data || resp
          this.rows = response.rows
          this.pagination = {
            page: response.page,
            pageSize: response.pageSize,
            total: response.total
          }
          this.$loading().close()
        })
        .finally(() => cb && cb())
    }
  }
};
</script>

<style lang="scss" scoped>
  >>> th.todo-header-row {
    background-color: #fafafa;
    font-size: 13px;
  }

  >>> tr.todo-row {
    font-size: 13px;
  }

  .el-container {
    background-color: #fff;
  }

  .top-title__row {
    margin-bottom: 10px;
    .top-title {
      font-size: 14px;
      border-bottom: 1px solid #ccc;
      margin: 17px 0 0 0;
      padding: 0 0 12px 20px;
    }
  }

  .el-header {
    border-bottom: 1.5px solid #ededed;
  }

  .i {
    margin-right: 4px;
  }

  .todo-subject {
    cursor: pointer;
  }

  .todo-subject:hover {
  }

  >>> .el-dialog__body {
    padding: 15px 10px;
  }

  >>> .el-checkbox {
    margin-left: 15px;
  }

  >>> .el-radio {
    margin-left: 15px;
  }

  >>> .el-button {
    margin-left: 0px;
  }
  .loaded-fail__div {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #f56c6c;
  }
</style>