HelpCenterList.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div class="tab-background float-e-margins">
  3. <div class="tab-header">
  4. <p>帮助列表</p>
  5. </div>
  6. <div class="wrapper wrapper-content animated fadeInRight">
  7. <div class="row">
  8. <div class="col-sm-12">
  9. <div class="float-e-margins">
  10. <div id="center">
  11. <pagination
  12. v-if="refresh"
  13. :url="'./help/helpCenters'"
  14. :titles="titles"
  15. :paramNames="paramNames"
  16. :dicts="dicts"
  17. :otherParam="otherParam"
  18. @handleSearchResult="handleSearchResult"
  19. ref="pagination">
  20. <template slot="searchBtnBefore">
  21. <!--
  22. <span class="title title-text">部门名称:</span>
  23. <input @click="officeClick" type="text" readonly="readonly" v-model="officeName" placeholder="点击选择部门">
  24. -->
  25. </template>
  26. <template slot="opera">
  27. <button @click="create" class="layui-btn layui-btn-icon layui-btn-primary"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;&nbsp;创建</button>
  28. </template>
  29. <template slot="main">
  30. <table class="footable table table-stripped">
  31. <thead>
  32. <tr>
  33. <th width="5%" style="text-align:center;">序号</th>
  34. <th style="text-align:center;">关联表id</th>
  35. <th style="text-align:center;">菜单名称</th>
  36. <th style="text-align:center;">语言</th>
  37. <th style="text-align:center;">菜单类型</th>
  38. <th style="text-align:center;">菜单查询url</th>
  39. <th style="text-align:center;">创建人</th>
  40. <th style="text-align:center;">创建时间</th>
  41. <th style="text-align:center;">修改人</th>
  42. <th style="text-align:center;">修改时间</th>
  43. <th style="text-align:center;">备用选项1</th>
  44. <th style="text-align:center;">备用选项2</th>
  45. <th style="text-align:center;">备用选项3</th>
  46. <th style="text-align:center;">更新时间</th>
  47. <th style="text-align:center;">操作</th>
  48. </tr>
  49. </thead>
  50. <tbody id="meetingTbody" class="footable_table">
  51. <template v-for="(item, index) in page.list">
  52. <tr
  53. :class="{'footable-even': index % 2 === 0,'footable-odd': index % 2 !== 0}"
  54. style="display: table-row;"
  55. :key="item.id">
  56. <td width="5%" style="text-align:center;">{{ (page.pageNo - 1) * page.pageSize + index + 1 }}</td>
  57. <td style="text-align:center;">{{ item.associationId }}</td>
  58. <td style="text-align:center;">{{ item.menuName }}</td>
  59. <td style="text-align:center;">{{ item.language }}</td>
  60. <td style="text-align:center;">{{ item.modelType }}</td>
  61. <td style="text-align:center;">{{ item.modelGetUrl }}</td>
  62. <td style="text-align:center;">{{ item.createBy }}</td>
  63. <td style="text-align:center;">{{ item.createDate }}</td>
  64. <td style="text-align:center;">{{ item.updateBy }}</td>
  65. <td style="text-align:center;">{{ item.updateDate }}</td>
  66. <td style="text-align:center;">{{ item.replaceable1 }}</td>
  67. <td style="text-align:center;">{{ item.replaceable2 }}</td>
  68. <td style="text-align:center;">{{ item.replaceable3 }}</td>
  69. <td style="text-align:center;">{{ item.updateDate | moment }}</td>
  70. <td style="text-align:center;">
  71. <a @click="edit(item, true)" style="margin-right:10px"><i class="fa fa-wrench" style="font-size: 10px;color: #23b7e5;margin-right:5px;"></i>修改</a>
  72. <a @click="del(item)" class="delete_a"><i class="fa fa-cut" style="font-size: 10px;color: #23b7e5;margin-right:5px;"></i>删除</a>
  73. </td>
  74. </tr>
  75. </template>
  76. </tbody>
  77. <tfoot>
  78. </tfoot>
  79. </table>
  80. </template>
  81. </pagination>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </template>
  89. <script>
  90. import { getDicts } from '@/api/dict';
  91. import { del } from '@/api/help/helpCenter'
  92. import Base from "@/views/base/Base"
  93. export default {
  94. name: 'HelpCenterList',
  95. extends: Base,
  96. data () {
  97. return {
  98. titles: [],
  99. dicts: [],
  100. paramNames: [],
  101. otherParam: {
  102. },
  103. refresh: true,
  104. page: {
  105. },
  106. }
  107. },
  108. computed: {
  109. //
  110. //linkageTypeMap: function() {
  111. // return this.dicts[0].array2Obj('value', 'label');
  112. //}
  113. //
  114. },
  115. mounted () {
  116. this.initData();
  117. },
  118. methods: {
  119. initData: function() {
  120. getDicts('').then(result => {
  121. //
  122. //var linkageTypes = result.data[0];
  123. //linkageTypes.unshift({
  124. // label: "全部",
  125. // selected: 1,
  126. // value: ""
  127. //});
  128. //this.dicts.push(linkageTypes);
  129. //
  130. });
  131. },
  132. handleSearchResult: function(data){
  133. this.page = data.page || {};
  134. this.page['list'] = data.helpCenters || [];
  135. },
  136. create: function() {
  137. this.$parent.closeTabByName('HelpCenterForm');
  138. this.$parent.clickMenu({
  139. "checked": false,
  140. "icon": "fa-legal",
  141. "id": "helpCenter",
  142. "name": "HelpCenterForm",
  143. "parentId": "4",
  144. "text": "XX创建",
  145. "children": [
  146. ]
  147. }, 3);
  148. },
  149. edit: function(helpCenter) {
  150. this.$parent.closeTabByName('HelpCenterForm');
  151. this.$parent.clickMenu({
  152. "checked": false,
  153. "icon": "fa-legal",
  154. "id": "helpCenter",
  155. "name": "HelpCenterForm",
  156. "parentId": "4",
  157. "text": "XX信息更新",
  158. "children": [
  159. ]
  160. }, 3, {
  161. id: helpCenter.id,
  162. });
  163. },
  164. del: function(helpCenter) {
  165. confirm('确定删除该记录吗?', () => {
  166. del(helpCenter.id).then(result => {
  167. alert("删除成功");
  168. this.$refs.pagination.refresh();
  169. });
  170. });
  171. }
  172. }
  173. }
  174. </script>
  175. <style scoped>
  176. </style>