移动端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

statistical_report.vue 7.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 统计填报
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="add_btn" @click="goAdd"></div>
  7. </div>
  8. <div class="list_main">
  9. <van-list
  10. v-model="loading"
  11. :finished="finished"
  12. finished-text="没有更多了"
  13. @load="getList"
  14. >
  15. <!--1-->
  16. <van-swipe-cell right-width="150" class="item" v-for="(item,index) in applicationList" :key="index">
  17. <div class="item_box" @click="$router.push({name:'sunVillageInfoStatisticalReportEdit',query:{id:item.id}})">
  18. <div class="head_block">
  19. <i class="icon"></i>
  20. <div class="title">{{item.templateName}}</div>
  21. </div>
  22. <div class="order_block">
  23. <div class="flex_block">
  24. <i class="icon icon_1"></i>
  25. <div class="text">{{item.time}}</div>
  26. </div>
  27. <div class="flex_block" v-if="item.applyUserName">
  28. <i class="icon icon_2"></i>
  29. <div class="text">{{item.applyUserName}}</div>
  30. </div>
  31. <div class="flex_block" v-if="item.processKey">
  32. <i class="icon icon_2"></i>
  33. <div class="text">{{item.processKey}}</div>
  34. </div>
  35. </div>
  36. </div>
  37. <template #right>
  38. <div style="background-color: #ee0a24;height: 100%" @click="handleDelete(item,index)" >删除</div>
  39. <router-link :to="{name:'sunVillageInfoStatisticalReportEdit',query:{id:item.id}}" style="background-color: #07c160">修改</router-link>
  40. </template>
  41. </van-swipe-cell>
  42. </van-list>
  43. </div>
  44. </div>
  45. </template>
  46. <script>
  47. import { statisticsList ,delStatisticsRemove} from "@/api/sunVillage_info/fixedAssets";
  48. export default {
  49. name: "statisticalReport",
  50. data() {
  51. return {
  52. loading: false,
  53. finished: false,
  54. applicationList:[],
  55. queryParams:{
  56. pageNum:1,
  57. pageSize:10,
  58. // orderByColumn:'createTime',
  59. // isAsc:'desc',
  60. },
  61. };
  62. },
  63. created() {
  64. },
  65. methods: {
  66. getList(){
  67. statisticsList(this.queryParams).then((response)=>{
  68. if(response.code == 200){
  69. for (var i = 0; i < response.rows.length; i++) {
  70. this.applicationList.push(response.rows[i]);
  71. }
  72. if(this.applicationList.length >= response.total){
  73. this.finished = true;
  74. return;
  75. }else{
  76. this.loading = false;
  77. this.queryParams.pageNum += 1 ;
  78. }
  79. }
  80. })
  81. },
  82. /** 删除按钮操作 */
  83. handleDelete(row,index) {
  84. const ids = row.id || this.ids;
  85. this.$dialog.alert(
  86. {
  87. message:'是否确认删除填报信息?',
  88. title:"警告",
  89. showCancelButton:true,
  90. confirmButtonText: "确定",
  91. cancelButtonText: "取消",
  92. }
  93. )
  94. .then(function () {
  95. return delStatisticsRemove(ids)
  96. })
  97. .then(() => {
  98. this.applicationList.splice(index, 1);
  99. this.$notify({ type: 'success', message: '删除成功' });
  100. })
  101. },
  102. goAdd(){
  103. this.$router.push('/sunVillage_info/statistical_report_edit')
  104. },
  105. },
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. .home_wrapper{
  110. background: #e9e9e9;
  111. min-height: 100vh;
  112. width: 100vw;
  113. .header_main {
  114. height: 116px;
  115. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  116. background-size: 100% 100%;
  117. position: fixed;
  118. top: 0;
  119. left: 0;
  120. width: 100%;
  121. font-size: 36px;
  122. line-height: 116px;
  123. text-align: center;
  124. color: #fff;
  125. position: relative;
  126. .return_btn {
  127. width: 24px;
  128. height: 43.2px;
  129. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  130. background-size: 20px 36px;
  131. position: absolute;
  132. left: 38px;
  133. top: 36px;
  134. }
  135. .add_btn {
  136. width: 56.4px;
  137. height: 40.8px;
  138. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  139. background-size: 47px 34px;
  140. position: absolute;
  141. right: 38px;
  142. top: 36px;
  143. }
  144. }
  145. .list_main{
  146. padding:26px 22px 0;
  147. .item{
  148. height: 162px;
  149. border-radius: 30px;
  150. background: #fff;
  151. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  152. margin-bottom: 20px;
  153. .item_box{
  154. padding:25px 32px;
  155. }
  156. .head_block{
  157. height: 62px;
  158. display: flex;
  159. align-items: center;
  160. width: 100%;
  161. .icon{
  162. width: 34px;
  163. height: 30px;
  164. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_4.png') no-repeat;
  165. background-size: 100% 100%;
  166. display: block;
  167. margin-right: 12px;
  168. }
  169. .title{
  170. flex:1;
  171. font-size: 32px;
  172. color: #252525;
  173. overflow: hidden;
  174. text-overflow: ellipsis;
  175. white-space: nowrap;
  176. padding-right: 20px;
  177. }
  178. }
  179. .order_block{
  180. display: flex;
  181. height: 52px;
  182. padding-top: 12px;
  183. font-size: 24px;
  184. color: #858585;
  185. align-items: center;
  186. padding-bottom: 10px;
  187. .flex_block{
  188. display: flex;
  189. align-items: center;
  190. justify-content: center;
  191. margin-right: 28px;
  192. height: 42px;
  193. .icon{
  194. width: 25px;
  195. height: 25px;
  196. margin-top: 3px;
  197. margin-right: 8px;
  198. &.icon_1{
  199. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_3.png') no-repeat;
  200. background-size: 100% 100%;
  201. }
  202. &.icon_2{
  203. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_5.png') no-repeat;
  204. background-size: 100% 100%;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }
  211. /deep/ .van-swipe-cell__right{
  212. display: flex;
  213. align-items: center;
  214. width: 150PX;
  215. margin-left: 5PX;
  216. a,div{
  217. margin: 0;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. color: #ffffff;
  222. font-size: 14PX;
  223. height: 100%;
  224. flex: 1;
  225. }
  226. }
  227. }
  228. </style>