shopStore.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <!-- 静态 门店管理 -->
  3. <div class="shopstare">
  4. <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">门店管理</h2>
  5. <header id="header">
  6. <el-row type="flex">
  7. <el-col :span="4">
  8. <el-select v-model="value" placeholder="请选择">
  9. <el-option label="1区" value="11"></el-option>
  10. <el-option label="2区" value="22"></el-option>
  11. </el-select>
  12. </el-col>
  13. <el-col :span="4">
  14. <el-select v-model="value" placeholder="请选择">
  15. <el-option label="1舍" value="13"></el-option>
  16. <el-option label="2舍" value="24"></el-option>
  17. </el-select>
  18. </el-col>
  19. <el-col :span="4">
  20. <el-select v-model="value" placeholder="请选择">
  21. <el-option label="可用" value="15"></el-option>
  22. <el-option label="可用" value="26"></el-option>
  23. </el-select>
  24. </el-col>
  25. <el-col :span="4">
  26. <el-button type="primary">查找</el-button>
  27. </el-col>
  28. <el-col :span="4">
  29. <el-button type="primary">新增</el-button>
  30. </el-col>
  31. </el-row>
  32. </header>
  33. <section>
  34. <article class="table">
  35. <el-table
  36. ref="multipleTable"
  37. :data="tableData"
  38. tooltip-effect="dark"
  39. style="width: 100%"
  40. @selection-change="handleSelectionChange"
  41. >
  42. <el-table-column type="selection" width="55"></el-table-column>
  43. <el-table-column prop="id" label="门店名称" width="180"></el-table-column>
  44. <el-table-column prop="a" label="负责人"></el-table-column>
  45. <el-table-column prop="b" label="负责人电话"></el-table-column>
  46. <el-table-column prop="c" label="门店地址"></el-table-column>
  47. <el-table-column prop="d" label="备注"></el-table-column>
  48. <!-- <el-table-column label="操作" width="150">
  49. <template slot-scope="scope">
  50. <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
  51. <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
  52. <el-button slot="reference" type="text" size="small">删除</el-button>
  53. </el-popconfirm>
  54. </template>
  55. </el-table-column> -->
  56. </el-table>
  57. <div style="margin-top: 20px">
  58. <el-button @click="toggleSelection([tableData[1], tableData[2]])">切换第二、第三行的选中状态</el-button>
  59. <el-button @click="toggleSelection()">取消选择</el-button>
  60. <el-button @click="inStore">删除所选</el-button>
  61. </div>
  62. <el-row type="flex" justify="end">
  63. <el-col :span="8" class="pagination">
  64. <el-pagination
  65. @current-change="pageChange"
  66. background
  67. layout="prev, pager, next"
  68. :page-count="10"
  69. ></el-pagination>
  70. </el-col>
  71. </el-row>
  72. </article>
  73. </section>
  74. </div>
  75. </template>
  76. <script>
  77. const pageSize = 10
  78. const tableData = [
  79. {
  80. id: "金华一号店铺",
  81. a: "张小刚",
  82. b: "13865936595",
  83. d: "北京市海淀区西二旗",
  84. c: "暂无备注"
  85. },
  86. {
  87. id: "绍兴一号店铺",
  88. a: "张小刚",
  89. b: "13865936595",
  90. d: "北京市海淀区西二旗",
  91. c: "暂无备注"
  92. },
  93. {
  94. id: "绍兴一号店铺",
  95. a: "张小刚",
  96. b: "13865936595",
  97. d: "北京市海淀区西二旗",
  98. c: "暂无备注"
  99. },
  100. {
  101. id: "绍兴一号店铺",
  102. a: "张小刚",
  103. b: "13865936595",
  104. d: "北京市海淀区西二旗",
  105. c: "暂无备注"
  106. },
  107. {
  108. id: "嘉善县一号店铺",
  109. a: "张小刚",
  110. b: "13865936595",
  111. d: "北京市海淀区西二旗",
  112. c: "暂无备注"
  113. },
  114. {
  115. id: "XX一号店铺",
  116. a: "张小刚",
  117. b: "13865936595",
  118. d: "北京市海淀区西二旗",
  119. c: "暂无备注"
  120. },
  121. {
  122. id: "XX一号店铺",
  123. a: "张小刚",
  124. b: "13865936595",
  125. d: "北京市海淀区西二旗",
  126. c: "暂无备注"
  127. },
  128. {
  129. id: "XX一号店铺",
  130. a: "张小刚",
  131. b: "13865936595",
  132. d: "北京市海淀区西二旗",
  133. c: "暂无备注"
  134. },
  135. {
  136. id: "XX一号店铺",
  137. a: "张小刚",
  138. b: "13865936595",
  139. d: "北京市海淀区西二旗",
  140. c: "暂无备注"
  141. },
  142. {
  143. id: "XX一号店铺",
  144. a: "张小刚",
  145. b: "13865936595",
  146. d: "北京市海淀区西二旗",
  147. c: "暂无备注"
  148. },
  149. {
  150. id: "XX一号店铺",
  151. a: "张小刚",
  152. b: "13865936595",
  153. d: "北京市海淀区西二旗",
  154. c: "暂无备注"
  155. },
  156. ]
  157. export default {
  158. data() {
  159. return {
  160. value: "",
  161. multipleSelection: [],
  162. page: 1,
  163. tableData
  164. };
  165. },
  166. created() {},
  167. methods: {
  168. toggleSelection(rows) {
  169. if (rows) {
  170. rows.forEach(row => {
  171. this.$refs.multipleTable.toggleRowSelection(row);
  172. });
  173. } else {
  174. this.$refs.multipleTable.clearSelection();
  175. }
  176. },
  177. // 入待宰栏
  178. inStore() {},
  179. handleSelectionChange(val) {
  180. this.multipleSelection = val;
  181. },
  182. edit(row) {},
  183. del(row) {},
  184. pageChange(p) {
  185. console.log(p);
  186. }
  187. }
  188. };
  189. </script>
  190. <style lang="scss" scoped>
  191. #header {
  192. margin-bottom: 15px;
  193. }
  194. .table {
  195. .pagination {
  196. margin-top: 20px;
  197. }
  198. }
  199. </style>