9e2eb9ad2f97085e1b13409835c44d5aa487a329.svn-base 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <div class="app-container">
  3. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  4. <el-tab-pane label="集团名称" name="first">
  5. <div class="search">
  6. <el-input v-model="table.getdataListParm.parammaps.assetCode" placeholder="驾驶员名称" style="width: 180px;" class="filter-item" clearable />
  7. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  8. </div>
  9. <div class="table">
  10. <el-table
  11. :key="table.tableKey"
  12. v-loading="table.listLoading"
  13. element-loading-text="给我一点时间"
  14. :data="table.list"
  15. border
  16. fit
  17. highlight-current-row
  18. style="width: 100%;"
  19. :row-style="rowStyle"
  20. :cell-style="cellStyle"
  21. class="elTable table-fixed"
  22. >
  23. <el-table-column label="序号" align="center" type="index" width="50px">
  24. <template slot-scope="scope">
  25. <span>{{ scope.$index + (table.pageNum-1) * table.pageSize + 1 }}</span>
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="集团ID" min-width="130px" align="center">
  29. <template slot-scope="scope">
  30. <span>{{ scope.row.brandName }}</span>
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="集团名称" min-width="130px" align="center">
  34. <template slot-scope="scope">
  35. <span>{{ scope.row.brandName }}</span>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="联系人" min-width="130px" align="center">
  39. <template slot-scope="scope">
  40. <span>{{ scope.row.brandName }}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="联系方式" min-width="130px" align="center">
  44. <template slot-scope="scope">
  45. <span>{{ scope.row.brandName }}</span>
  46. </template>
  47. </el-table-column>
  48. </el-table>
  49. <pagination v-show="table.total>0" :total="table.total" :page.sync="table.getdataListParm.offset" :limit.sync="table.getdataListParm.pagecount" @pagination="getList" />
  50. </div>
  51. </el-tab-pane>
  52. <el-tab-pane label="牧场管理" name="second">
  53. <div class="search">
  54. <el-input v-model="table.getdataListParm.parammaps.assetCode" placeholder="驾驶员名称" style="width: 180px;" class="filter-item" clearable />
  55. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  56. </div>
  57. <div class="table">
  58. <el-table
  59. :key="table2.tableKey"
  60. v-loading="table2.listLoading"
  61. element-loading-text="给我一点时间"
  62. :data="table2.list"
  63. border
  64. fit
  65. highlight-current-row
  66. style="width: 100%;"
  67. :row-style="rowStyle"
  68. :cell-style="cellStyle"
  69. class="elTable table-fixed"
  70. >
  71. <el-table-column label="序号" align="center" type="index" width="50px">
  72. <template slot-scope="scope">
  73. <span>{{ scope.$index + (table2.pageNum-1) * table2.pageSize + 1 }}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="集团ID" min-width="130px" align="center">
  77. <template slot-scope="scope">
  78. <span>{{ scope.row.brandName }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="牧场ID" min-width="130px" align="center">
  82. <template slot-scope="scope">
  83. <span>{{ scope.row.brandName }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="牧场名称" min-width="130px" align="center">
  87. <template slot-scope="scope">
  88. <span>{{ scope.row.brandName }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="牧场名称" min-width="130px" align="center">
  92. <template slot-scope="scope">
  93. <span>{{ scope.row.brandName }}</span>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. <pagination v-show="table2.total>0" :total="table2.total" :page.sync="table2.getdataListParm.offset" :limit.sync="table2.getdataListParm.pagecount" @pagination="getList2" />
  98. </div>
  99. </el-tab-pane>
  100. </el-tabs>
  101. </div>
  102. </template>
  103. <script>
  104. import { GetDataByName } from '@/api/common'
  105. import Pagination from '@/components/Pagination'
  106. export default {
  107. name: 'GroupInformation',
  108. components: { Pagination },
  109. data() {
  110. return {
  111. activeName: 'first',
  112. table: {
  113. getdataListParm: {
  114. name: 'getAssetList',
  115. page: 1,
  116. offset: 1,
  117. pagecount: 10,
  118. returntype: 'Map',
  119. parammaps: {
  120. enable: ''
  121. }
  122. },
  123. tableKey: 0,
  124. list: [],
  125. total: 0,
  126. listLoading: true
  127. },
  128. table2: {
  129. getdataListParm: {
  130. name: 'getAssetList',
  131. page: 1,
  132. offset: 1,
  133. pagecount: 10,
  134. returntype: 'Map',
  135. parammaps: {
  136. enable: ''
  137. }
  138. },
  139. tableKey: 0,
  140. list: [],
  141. total: 0,
  142. listLoading: true
  143. },
  144. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  145. cellStyle: { padding: 0 + 'px' }
  146. }
  147. },
  148. created() {
  149. this.getList()
  150. this.activeName = 'first'
  151. },
  152. methods: {
  153. handleTabClick(val) {
  154. if (val.activeName === 'first') {
  155. this.getList()
  156. } else if (val.activeName === 'first') {
  157. this.getList2()
  158. }
  159. },
  160. getList() {
  161. this.table.listLoading = true
  162. GetDataByName(this.table.getdataListParm).then(response => {
  163. console.log('集团信息table数据', response.data.list)
  164. if (response.data.list !== null) {
  165. this.table.list = response.data.list
  166. this.table.pageNum = response.data.pageNum
  167. this.table.pageSize = response.data.pageSize
  168. this.table.total = response.data.total
  169. } else {
  170. this.table.list = []
  171. }
  172. setTimeout(() => {
  173. this.table.listLoading = false
  174. }, 100)
  175. })
  176. },
  177. handleSearch() {
  178. console.log('点击了集团信息查询')
  179. this.getList()
  180. },
  181. getList2() {
  182. this.table2.listLoading = true
  183. GetDataByName(this.table2.getdataListParm).then(response => {
  184. console.log('牧场管理table数据', response.data.list)
  185. if (response.data.list !== null) {
  186. this.table2.list = response.data.list
  187. this.table2.pageNum = response.data.pageNum
  188. this.table2.pageSize = response.data.pageSize
  189. this.table2.total = response.data.total
  190. } else {
  191. this.table2.list = []
  192. }
  193. setTimeout(() => {
  194. this.table2.listLoading = false
  195. }, 100)
  196. })
  197. },
  198. handleSearch() {
  199. console.log('点击了牧场管理查询')
  200. this.getList()
  201. }
  202. }
  203. }
  204. </script>
  205. <style lang="scss" scoped>
  206. .table{margin-top:10px;}
  207. </style>