waterElectricityPriceSetting.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <el-row class="el-row-container" v-loading="loading">
  3. <el-col
  4. :span="24"
  5. style="padding: 16px; height: 100%"
  6. >
  7. <el-card style="height: 100%; overflow-y: auto">
  8. <el-col :span="24" class="elrow-main__col-top">
  9. <div>
  10. <el-select
  11. placeholder="行政区域(全国)"
  12. >
  13. </el-select>
  14. <el-select
  15. style="margin:0 20px"
  16. placeholder="全部"
  17. >
  18. </el-select>
  19. <el-button
  20. type="primary"
  21. size="small"
  22. @click="handleSearch"
  23. >查询</el-button
  24. >
  25. </div>
  26. <!-- <div class="top-left">
  27. <el-button
  28. type="primary"
  29. size="small"
  30. @click="addAssociation"
  31. >新增
  32. </el-button
  33. ></div> -->
  34. </el-col>
  35. <el-col :span="24" class="elrow-main__col-bottom">
  36. <img v-if="imgUrl" :src="imgUrl" />
  37. <b-table
  38. ref="tableRef"
  39. :args="{ 'highlight-current-row': true }"
  40. :data="loadData"
  41. :columns="columns"
  42. isShowIndex
  43. :showPagination="loadData.length"
  44. >
  45. <template #styleImg="scope">
  46. <el-image
  47. :src="scope.row.imgPreview"
  48. :preview-src-list="[scope.row.imgPreview]"
  49. slot="error"
  50. class="image-slot"
  51. style="width: 100px; height: 50px"
  52. >
  53. <div slot="error" class="image-slot"></div>
  54. </el-image>
  55. </template>
  56. <template #codeNo="scope">
  57. <el-link
  58. type="primary"
  59. :underline="false"
  60. @click="goDetail(scope.row)"
  61. >{{ scope.row.traceCodeApplyConcat }}</el-link
  62. >
  63. </template>
  64. <template #useNumber="scope">
  65. {{ scope.row.useNumber + '/' + scope.row.totalNumber }}
  66. </template>
  67. <template #finishGoodName="scope">
  68. {{ scope.row.finishGoodName&&scope.row.finishgoodNo?scope.row.finishGoodName + '-' + scope.row.finishgoodNo:'' }}
  69. </template>
  70. <template #operate="scope">
  71. <el-link
  72. size="small"
  73. :underline="false"
  74. type="primary"
  75. style="margin-right: 10px"
  76. @click="editAssociation(scope.row)"
  77. >修改</el-link
  78. >
  79. <el-link
  80. size="small"
  81. :underline="false"
  82. type="danger"
  83. style="margin-right: 10px"
  84. @click="download(scope.row)"
  85. >删除</el-link
  86. >
  87. </template>
  88. </b-table>
  89. </el-col>
  90. </el-card>
  91. </el-col>
  92. <set-annual-water-right :visible.sync="associationManageShow"/>
  93. </el-row>
  94. </template>
  95. <script>
  96. import BTable from '@/components/Table/index.vue';
  97. import { assign, omit } from 'lodash-es';
  98. import setAnnualWaterRight from './components/setAnnualWaterRight.vue'
  99. export default {
  100. name: 'waterElectricityPriceSetting',
  101. components: { BTable,setAnnualWaterRight },
  102. data() {
  103. return {
  104. dateValue:"",
  105. imgUrl: '',
  106. baseImageUrl: process.env.VUE_APP_BASE_RESOURCE_PREFIX,
  107. form: {
  108. productName: ''
  109. },
  110. loading: false,
  111. associationManageShow: false,
  112. columns: [
  113. {
  114. label: '行政区',
  115. prop: 'person',
  116. customRender: '',
  117. align: 'center'
  118. },
  119. {
  120. label: '是否阶梯水价',
  121. prop: 'area',
  122. customRender: '',
  123. align: 'center'
  124. },
  125. {
  126. label: '水价名称',
  127. prop: 'name',
  128. customRender: '',
  129. align: 'center'
  130. },
  131. {
  132. label: '水量(吨)',
  133. prop: 'phone',
  134. customRender: '',
  135. align: 'center'
  136. },{
  137. label: '水价(元/吨)',
  138. prop: 'phone',
  139. customRender: '',
  140. align: 'center'
  141. },{
  142. label: '是否阶梯电价',
  143. prop: 'phone',
  144. customRender: '',
  145. align: 'center'
  146. },{
  147. label: '电价名称',
  148. prop: 'phone',
  149. customRender: '',
  150. align: 'center'
  151. },{
  152. label: '电量(度)',
  153. prop: 'phone',
  154. customRender: '',
  155. align: 'center'
  156. },{
  157. label: '电价(元/度)',
  158. prop: 'phone',
  159. customRender: '',
  160. align: 'center'
  161. },
  162. {
  163. label: '操作',
  164. customRender: 'operate',
  165. align: 'center'
  166. }
  167. ]
  168. };
  169. },
  170. created() {},
  171. methods: {
  172. editAssociation() {
  173. this.associationManageShow = true
  174. },
  175. loadData(parameter) {
  176. const queryform = this.form;
  177. const payload = omit(assign({}, parameter, queryform, {orderByColumn:'tarcecodeapplyCreateddate',isAsc:'desc'}), []);
  178. return this.getTableData(payload);
  179. },
  180. getTableData(payload) {
  181. return Promise.resolve({
  182. data: [{
  183. person:"王大虎",
  184. area: '2016-05-02',
  185. name: '王小虎',
  186. phone: 1588888888,
  187. address: '上海市普陀区金沙江路 1518 弄'
  188. }, {
  189. person:"王大虎",
  190. area: '2016-05-04',
  191. name: '王小虎',
  192. phone: 1588888888,
  193. address: '上海市普陀区金沙江路 1517 弄'
  194. }, {
  195. person:"王大虎",
  196. area: '2016-05-01',
  197. name: '王小虎',
  198. phone: 1588888888,
  199. address: '上海市普陀区金沙江路 1519 弄'
  200. }, {
  201. person:"王大虎",
  202. area: '2016-05-03',
  203. name: '王小虎',
  204. phone: 1588888888,
  205. address: '上海市普陀区金沙江路 1516 弄'
  206. }]
  207. })
  208. },
  209. handleSearch() {
  210. this.$refs.tableRef.refresh(true);
  211. },
  212. goDetail(row) {
  213. this.$refs.sourceCodeDetail.open(row.tarcecodeapplyBatchno)
  214. },
  215. download(row) {
  216. }
  217. }
  218. };
  219. </script>
  220. <style lang="scss" scoped>
  221. .el-row-container{
  222. height: 100%;
  223. }
  224. .elrow-main__col-top {
  225. display: flex;
  226. align-items: center;
  227. justify-content: space-between;
  228. margin-bottom: 15px;
  229. .top-left {
  230. height: 100%;
  231. display: flex;
  232. align-items: center;
  233. i {
  234. background-color: #40d5ec;
  235. height: 45%;
  236. width: 5px;
  237. margin-right: 5px;
  238. }
  239. }
  240. }
  241. </style>