reportConfig.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <div class="container">
  3. <div class="header">
  4. <el-form label-width="120px">
  5. <div style="display: flex; padding:10px;">
  6. <el-form-item :model="form.templateList" label="报表模板名称:">
  7. <el-input ref="search" v-model="input" suffix-icon="el-icon-search" placeholder="请输入"></el-input>
  8. </el-form-item>
  9. <el-form-item :model="form.templateForm" label="报表模板格式:">
  10. <el-select placeholder="全部">
  11. <el-option label=""></el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item :model="form.reportType" label="报告类型:">
  15. <el-select placeholder="报告">
  16. <el-option label=""></el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-button style="padding: 5px;width: 80px;margin-left: 160px;margin-right: 20px;">重置</el-button>
  20. <el-button style="padding: 5px;width: 80px; background-color: #409EFF;color: #FFF;">查询</el-button>
  21. </div>
  22. </el-form>
  23. </div>
  24. <div class="content">
  25. <div>
  26. <p class="info">模板列表</p>
  27. <el-button class="new_button">添加模板</el-button>
  28. </div>
  29. <el-table ref="multipleTable" border :data="tableData" tooltip-effect="dark"
  30. :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" style="width: 100%"
  31. @selection-change="handleSelectionChange">
  32. <el-table-column type="selection" width="50">
  33. </el-table-column>
  34. <el-table-column prop="templateName" label="模板名称">
  35. </el-table-column>
  36. <el-table-column prop="templateForm" label="模板格式">
  37. </el-table-column>
  38. <el-table-column prop="createUser" label="创建用户">
  39. </el-table-column>
  40. <el-table-column prop="createTime" label="创建时间">
  41. </el-table-column>
  42. <el-table-column prop="alterTime" label="修改时间">
  43. </el-table-column>
  44. <el-table-column prop="operation" label="操作">
  45. <template slot-scope="scope">
  46. <el-button v-show="scope.row.templateName == null ? false : true" size="mini"
  47. type="text">查看</el-button>
  48. <el-button v-show="scope.row.templateName == null ? false : true" size="mini"
  49. type="text">编辑</el-button>
  50. <el-button v-show="scope.row.templateName == null ? false : true" size="mini"
  51. type="text">删除</el-button>
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. </div>
  56. <div class="bottom">
  57. <div>
  58. <checkbox class="checkbox" :total="total"></checkbox>
  59. <el-button class="check-cancel" size="mini" type="text" @click="cancleChecked">取消</el-button>
  60. </div>
  61. <div class="bottom_button" v-show="show">
  62. <el-button class="delete" type="text">批量删除</el-button>
  63. <el-button class="disabled" type="text">批量激活</el-button>
  64. <el-button class="export" type="text">导出数据</el-button>
  65. </div>
  66. <page class="page"></page>
  67. </div>
  68. </div>
  69. </template>
  70. <script>
  71. import checkbox from '@/components/Checkbox/index'
  72. import page from '@/components/pagination/index'
  73. export default {
  74. components: { checkbox, page },
  75. data() {
  76. return {
  77. total: 0,
  78. input: '',
  79. show: true,
  80. form: {
  81. },
  82. tableData: [
  83. {
  84. templateName: '模板1',
  85. templateForm: 'txt',
  86. createUser: 'test',
  87. createTime: '2023-01-01 00:00',
  88. alterTime: '2023-01-01 00:00',
  89. },
  90. {
  91. templateName: '模板1',
  92. templateForm: 'txt',
  93. createUser: 'test',
  94. createTime: '2023-01-01 00:00',
  95. alterTime: '2023-01-01 00:00',
  96. },
  97. {
  98. templateName: '模板1',
  99. templateForm: 'txt',
  100. createUser: 'test',
  101. createTime: '2023-01-01 00:00',
  102. alterTime: '2023-01-01 00:00',
  103. },
  104. ],
  105. defaultProps: {
  106. children: 'children',
  107. label: 'label'
  108. }
  109. }
  110. },
  111. watch: {
  112. filterText(val) {
  113. this.$refs.search.filter(val);
  114. }
  115. },
  116. methods: {
  117. filterNode(value, data) {
  118. if (!value) return true;
  119. return data.label.indexOf(value) !== -1;
  120. }
  121. }
  122. }
  123. </script>
  124. <style lang="less" scoped>
  125. .container {
  126. position: absolute;
  127. left: 218px;
  128. top: 150px;
  129. right: 16px;
  130. bottom: 20px;
  131. line-height: 20px;
  132. background-color: rgba(255, 255, 255, 1);
  133. color: rgba(16, 16, 16, 1);
  134. font-size: 14px;
  135. text-align: center;
  136. //box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.15);
  137. .header {
  138. margin: 2.5%;
  139. height: 60px;
  140. background-color: rgb(221, 220, 219);
  141. .el-form-item {
  142. margin-bottom:0 !important;
  143. margin-right: 60px !important;
  144. /deep/.el-form-item {
  145. margin-right: 50px;
  146. margin-bottom: 0;
  147. }
  148. /deep/.el-form-item__content {
  149. margin-left: 120px;
  150. }
  151. }
  152. }
  153. .content {
  154. width: 95%;
  155. position: absolute;
  156. margin-left: 2.5%;
  157. margin-right: 2.5%;
  158. .info {
  159. text-align: left;
  160. padding: 10px;
  161. font-size: 25px;
  162. }
  163. .new_button {
  164. padding: 5px;
  165. width: 80px;
  166. position: relative;
  167. left: 760px;
  168. background-color: #409EFF;
  169. color: #FFF;
  170. }
  171. .el-table {
  172. margin-top: 10px;
  173. }
  174. .el-select {
  175. width: 80px;
  176. margin-right: 20px;
  177. }
  178. }
  179. .bottom {
  180. position: absolute;
  181. top: 700px;
  182. left: 50px;
  183. height: 50px;
  184. width: 95%;
  185. line-height: 20px;
  186. background-color: rgba(255, 255, 255, 1);
  187. text-align: center;
  188. .checkbox {
  189. position: absolute;
  190. left: 29px;
  191. top: 15px;
  192. font-size: 14px;
  193. }
  194. .check-cancel {
  195. position: absolute;
  196. // line-height: 20px;
  197. font-size: 14px;
  198. text-align: center;
  199. left: 140px;
  200. top: 10px;
  201. }
  202. .bottom_button {
  203. position: absolute;
  204. left: 200px;
  205. margin-top: 15px;
  206. .delete {
  207. font-size: 14px;
  208. text-align: center;
  209. padding: 1px;
  210. }
  211. .disabled {
  212. font-size: 14px;
  213. text-align: center;
  214. padding: 1px;
  215. }
  216. .export {
  217. font-size: 14px;
  218. text-align: center;
  219. padding: 1px;
  220. }
  221. }
  222. }
  223. }
  224. </style>