323be8e584cd8fbf9ca9054b36946184aeda956a.svn-base 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24" >
  8. <a-form-item label="图表名称">
  9. <a-input v-model="queryParam.name" placeholder="请输入图表名称"/>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <a-form-item label="编码">
  14. <a-input v-model="queryParam.code" placeholder="请输入图表编码"/>
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  19. <a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
  20. <a-button type="primary" icon="reload" style="margin-left: 8px" @click="searchReset">重置</a-button>
  21. </span>
  22. </a-col>
  23. </a-row>
  24. </a-form>
  25. </div>
  26. <!-- 操作按钮区域 -->
  27. <div class="table-operator">
  28. <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
  29. <a-button type="primary" icon="download" @click="handleExportXls('在线图表')">导出</a-button>
  30. <a-upload name="file" :show-upload-list="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  31. <a-button type="primary" icon="import" >导入</a-button>
  32. </a-upload>
  33. <a-dropdown v-if="selectedRowKeys.length > 0">
  34. <a-menu slot="overlay">
  35. <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
  36. </a-menu>
  37. <a-button>批量操作<a-icon type="down" /></a-button>
  38. </a-dropdown>
  39. </div>
  40. <!-- table区域-begin -->
  41. <div>
  42. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  43. <i class="anticon anticon-info-circle ant-alert-icon" />
  44. 已选择
  45. <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
  46. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  47. </div>
  48. <a-table
  49. size="middle"
  50. bordered
  51. row-key="id"
  52. :columns="columns"
  53. :data-source="dataSource"
  54. :pagination="ipagination"
  55. :loading="loading"
  56. :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  57. @change="handleTableChange"
  58. >
  59. <template slot="action" slot-scope="text, record">
  60. <a @click="handleEdit(record)">编辑</a>
  61. <a-divider type="vertical" />
  62. <a-dropdown>
  63. <a class="ant-dropdown-link">更多<a-icon type="down" /></a>
  64. <a-menu slot="overlay">
  65. <a-menu-item>
  66. <a @click="goPageOnline(record.code)">功能测试</a>
  67. </a-menu-item>
  68. <a-menu-item>
  69. <a @click="handleOnlineUrlShow(record)">配置地址</a>
  70. </a-menu-item>
  71. <a-menu-item>
  72. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  73. <a>删除</a>
  74. </a-popconfirm>
  75. </a-menu-item>
  76. </a-menu>
  77. </a-dropdown>
  78. </template>
  79. </a-table>
  80. </div>
  81. <!-- 提示online报表链接 -->
  82. <config-url-modal :url="onlineUrl" ref="onlineUrl"></config-url-modal>
  83. <!-- 编辑弹窗区域 -->
  84. <onl-graphreport-head-modal ref="modalForm" @modalFormOk="modalFormOk"></onl-graphreport-head-modal>
  85. </a-card>
  86. </template>
  87. <script>
  88. // import { initDictOptions } from '@/components/dict/JDictSelectUtil'
  89. // import Clipboard from 'clipboard'
  90. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  91. import JEllipsis from '@/components/jeecg/JEllipsis'
  92. import OnlGraphreportHeadModal from './modal/OnlGraphreportHeadModal'
  93. import ConfigUrlModal from '@/components/custom/ConfigUrlModal'
  94. export default {
  95. name: 'OnlGraphreportHeadList',
  96. components: {
  97. JEllipsis,
  98. OnlGraphreportHeadModal,
  99. ConfigUrlModal
  100. },
  101. mixins: [JeecgListMixin],
  102. data() {
  103. // const ellipsis = (v, l = 40) => (`<j-ellipsis value={v} length={l}/>`)
  104. return {
  105. description: 'Online图表开发管理页面',
  106. // 表头
  107. columns: [
  108. {
  109. title: '#',
  110. dataIndex: '',
  111. key: 'rowIndex',
  112. width: 60,
  113. align: 'center',
  114. customRender: function(t, r, index) {
  115. return parseInt(index) + 1
  116. }
  117. },
  118. {
  119. title: '图表名称',
  120. align: 'center',
  121. dataIndex: 'name'
  122. },
  123. {
  124. title: '编码',
  125. align: 'center',
  126. dataIndex: 'code'
  127. },
  128. {
  129. title: '数据',
  130. align: 'center',
  131. dataIndex: 'cgrSql',
  132. ellipsis: true
  133. },
  134. {
  135. title: '分组字段',
  136. align: 'center',
  137. dataIndex: 'groupField'
  138. },
  139. {
  140. title: 'X轴字段',
  141. align: 'center',
  142. dataIndex: 'xaxisField'
  143. },
  144. {
  145. title: '操作',
  146. dataIndex: 'action',
  147. align: 'center',
  148. scopedSlots: { customRender: 'action' }
  149. }
  150. ],
  151. url: {
  152. list: '/diagram/diagramConfiguration/list',
  153. deleteBatch: '/diagram/diagramConfiguration/deleteBatch',
  154. delete: '/diagram/diagramConfiguration/delete',
  155. importExcelUrl: '/sys/fillRule/importExcel',
  156. exportXlsUrl: '/sys/fillRule/exportXls'
  157. },
  158. onlineUrlVisible: false, // 配置地址弹窗控制
  159. onlineUrl: ''
  160. }
  161. },
  162. methods: {
  163. goPageOnline(code) {
  164. this.$router.push({ path: '/online/cggraphreport/chart/' + code })
  165. },
  166. handleOnlineUrlShow(record) {
  167. this.onlineUrl = `/online/cggraphreport/chart/${record.code}`
  168. this.$refs.onlineUrl.onlineUrlVisible = true
  169. // this.onlineUrlVisible = true
  170. },
  171. importExcelUrl() {
  172. return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`
  173. }
  174. }
  175. }
  176. </script>
  177. <style scoped>
  178. @import '~@assets/less/common.less';
  179. </style>
  180. <style lang="less">
  181. </style>