移动端
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

423 Zeilen
14 KiB

  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" v-show="showBtn" @click="goAdd"></div>
  7. </div>
  8. <div class="record_main">
  9. <div class="record_det">
  10. <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.year == '' ? '全部': queryParams.year}}<span class="unit">{{queryParams.year == '' ? '': '年'}}</span></div>
  11. <div class="total_r">共{{listLength}}条公告</div>
  12. </div>
  13. <div class="record_list" v-if="showTab">
  14. <div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div>
  15. <div :class="{'flex_block':true , 'current':queryParams.year == '2022'}" @click="tabClick('2022')">2022</div>
  16. <div :class="{'flex_block':true , 'current':queryParams.year == '2021'}" @click="tabClick('2021')">2021</div>
  17. <div :class="{'flex_block':true , 'current':queryParams.year == '2020'}" @click="tabClick('2020')">2020</div>
  18. </div>
  19. </div>
  20. <div class="list_main">
  21. <van-list
  22. v-model="loading"
  23. :finished="finished"
  24. finished-text="没有更多了"
  25. @load="getList"
  26. >
  27. <!----1-->
  28. <div class="item" v-for="(item,index) in applicationList" :key="index">
  29. <div class="info" @click="goDetail(item.id)">
  30. <div class="title">
  31. <i class="icon_box"></i>
  32. <p class="news_title">{{item.openName}}</p>
  33. <p class="tips_mark" v-if="index==0">新</p>
  34. </div>
  35. <div class="time">
  36. <div class="icon_time"></div>
  37. {{item.openNy}}
  38. </div>
  39. </div>
  40. <div class="operation">
  41. <!-- delete 删除 edit编辑 view查看 -->
  42. <div class="opera_btn list" @click="goRanking(item.id,item.openNy)">
  43. <i class="icon "></i>
  44. </div>
  45. <div class="opera_btn edit" @click="goEdit(item.id)" v-show="showBtn">
  46. <i class="icon "></i>
  47. </div>
  48. <div class="opera_btn delete" @click="goRemove(item.id)" v-show="showBtn">
  49. <i class="icon"></i>
  50. </div>
  51. <div class="opera_btn view" @click="goDetail(item.id)" v-show="!showBtn">
  52. <i class="icon "></i>
  53. </div>
  54. </div>
  55. </div>
  56. </van-list>
  57. </div>
  58. <!-- <div class="bottom_tips">-->
  59. <!-- <span class="xs">已经到底啦</span>-->
  60. <!-- </div>-->
  61. </div>
  62. </template>
  63. <script>
  64. import { financePublicList,openRemove } from "@/api/sunVillage_info/fixedAssets";
  65. import Cookies from "js-cookie";
  66. import request from '@/utils/request'
  67. export default {
  68. name: "certificateList",
  69. data() {
  70. return {
  71. applicationList:[],
  72. applicationListSecond:[],
  73. assetStatusOptions:[],
  74. auditStatus:[],
  75. loading: false,
  76. finished: false,
  77. show: false,
  78. showTab: false,
  79. fileList:[],
  80. listLength:'0',
  81. searchInput:'',
  82. queryParams:{
  83. pageNum:1,
  84. pageSize:10,
  85. orderByColumn:'createTime',
  86. isAsc:'desc',
  87. year:'',
  88. },
  89. uploadFiles1:[],
  90. projectId:'',
  91. projectIndex:'',
  92. showBtn:true,
  93. };
  94. },
  95. created() {
  96. this.queryParams.bookId = Cookies.get('bookId');
  97. this.queryParams.deptId = Cookies.get('deptId');
  98. if (this.$route.query.type == 'code'){
  99. this.showBtn = false;
  100. }
  101. },
  102. methods: {
  103. getList(){
  104. var _this = this;
  105. financePublicList(_this.queryParams).then(response => {
  106. _this.listLength = response.total;
  107. response.rows.map(res=>{
  108. _this.applicationList.push(res);
  109. })
  110. if(_this.applicationList.length >= response.total){
  111. _this.finished = true;
  112. return;
  113. }else{
  114. _this.loading = false;
  115. _this.queryParams.pageNum += 1 ;
  116. }
  117. });
  118. },
  119. tabClick(year){
  120. this.queryParams.year = year ;
  121. this.applicationList = [];
  122. this.getList();
  123. },
  124. tabShow(){
  125. this.showTab = !this.showTab;
  126. },
  127. /** 删除按钮操作 */
  128. handleDelete(row,index) {
  129. let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus;
  130. if (assetStatus === '2' || assetStatus === '3') {
  131. this.$notify({
  132. message: "不允许删除已出售或已报废的资产",
  133. type: "warning",
  134. });
  135. return;
  136. }
  137. let useType = row.useType;
  138. if(useType == 3) {
  139. this.$notify({
  140. message: "出租或出借的资产不允许删除",
  141. type: "warning",
  142. });
  143. return ;
  144. }
  145. const ids = row.id || this.ids;
  146. this.$dialog.alert(
  147. {
  148. message:'是否确认删除固定资产?',
  149. title:"警告",
  150. confirmButtonText: "确定",
  151. cancelButtonText: "取消",
  152. }
  153. )
  154. .then(function () {
  155. return delPermanent(ids);
  156. })
  157. .then(() => {
  158. this.applicationList.splice(index, 1);
  159. this.$notify({ type: 'success', message: '删除成功' });
  160. });
  161. },
  162. goAdd(){
  163. this.$router.push('/sunVillage_info/list_finance_add')
  164. },
  165. goDetail(id){
  166. this.$router.push({path:'/sunVillage_info/list_finance_detail',query: {id:id,type:'finance'}})
  167. },
  168. goRanking(id,time){
  169. this.$router.push({path:'/sunVillage_info/list_finance_ranking',query: {id:id,time:time}})
  170. },
  171. goEdit(id){
  172. this.$router.push({path:'/sunVillage_info/list_finance_edit',query: {id:id,type:'finance'}})
  173. },
  174. goRemove(id){
  175. this.$dialog.alert({
  176. title: '提示',
  177. message: '确认删除?',
  178. showCancelButton:true,
  179. })
  180. .then(() => {
  181. openRemove(id).then(response => {
  182. this.$notify({ type: 'success', message: '删除成功' });
  183. this.getList()
  184. });
  185. })
  186. .catch(() => {
  187. // on cancel
  188. });
  189. }
  190. },
  191. }
  192. </script>
  193. <style scoped lang="scss">
  194. .home_wrapper{
  195. background: #e9e9e9;
  196. min-height: 100vh;
  197. width: 100vw;
  198. .header_main{
  199. height: 116px;
  200. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  201. background-size: 100% 100%;
  202. position: fixed;
  203. top: 0;
  204. left: 0;
  205. width: 100%;
  206. font-size: 36px;
  207. line-height: 116px;
  208. text-align: center;
  209. color: #fff;
  210. position: relative;
  211. .return_btn{
  212. width: 24px;
  213. height: 43.2px;
  214. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  215. background-size: 20px 36px;
  216. position: absolute;
  217. left: 38px;
  218. top: 36px;
  219. }
  220. .add_btn{
  221. width: 56.4px;
  222. height: 40.8px;
  223. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  224. background-size: 47px 34px;
  225. position: absolute;
  226. right: 38px;
  227. top: 36px;
  228. }
  229. }
  230. .record_main{
  231. padding:30px 22px;
  232. .record_det{
  233. height: 38px;
  234. line-height: 38px;
  235. display: flex;
  236. justify-content:space-between;
  237. .year_l{
  238. font-size: 30px;
  239. display: flex;
  240. align-items: center;
  241. color: #858585;
  242. .unit{
  243. padding-left: 5px;
  244. }
  245. .icon{
  246. width: 23px;
  247. height: 12px;
  248. display: block;
  249. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  250. background-size: 100% 100%;
  251. margin-bottom: 4px;
  252. margin-right: 8px;
  253. &.zk {
  254. transform: rotate(0deg)
  255. }
  256. &.ss{
  257. transform: rotate(180deg)
  258. }
  259. }
  260. }
  261. .total_r{
  262. font-size: 26px;
  263. letter-spacing: 2px;
  264. }
  265. }
  266. .record_list{
  267. display: flex;
  268. flex-flow: wrap;
  269. margin-top: 12PX;
  270. .flex_block{
  271. font-size: 30px;
  272. color: #878787;
  273. padding-right: 30px;
  274. &.current{
  275. color: #4199fe;
  276. font-weight: bold;
  277. }
  278. }
  279. }
  280. }
  281. .list_main{
  282. padding:0 22px;
  283. .item{
  284. height: 140px;
  285. border-radius: 30px;
  286. background: #fff;
  287. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  288. padding:25px 32px;
  289. display: flex;
  290. margin-bottom: 20px;
  291. .info{
  292. flex:0 0 450px;
  293. .title{
  294. display: flex;
  295. font-size: 32px;
  296. align-items: center;
  297. height: 58px;
  298. .icon_box{
  299. width: 34px;
  300. display: block;
  301. height: 30px;
  302. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  303. background-size: 100% 100%;
  304. margin-right: 10px;
  305. }
  306. .news_title{
  307. max-width:416px;
  308. overflow: hidden;
  309. white-space: nowrap;
  310. text-overflow: ellipsis;
  311. -o-text-overflow: ellipsis;
  312. }
  313. .tips_mark{
  314. width: 34px;
  315. height: 34px;
  316. background: #fa0c0c;
  317. border-radius: 8px;
  318. font-size: 24px;
  319. color: #fff;
  320. text-align: center;
  321. line-height: 34px;
  322. margin-left: 10px;
  323. }
  324. }
  325. .time{
  326. font-size: 24px;
  327. color: #858585;
  328. display: flex;
  329. align-items: center;
  330. height: 30px;
  331. margin-top: 6px;
  332. .icon_time{
  333. width: 25px;
  334. height: 25px;
  335. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  336. background-size: 100% 100%;
  337. margin-right: 10px;
  338. }
  339. }
  340. }
  341. .operation{
  342. flex: 1;
  343. display: flex;
  344. align-items: center;
  345. justify-content: right;
  346. text-align: right;
  347. .opera_btn{
  348. width: 52px;
  349. height: 52px;
  350. border-radius: 50%;
  351. display: flex;
  352. align-items: center;
  353. justify-content:center;
  354. &.delete{
  355. background:#df0707;
  356. margin-left: 10PX;
  357. .icon{
  358. width: 22px;
  359. height: 29px;
  360. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  361. background-size: 100% 100%;
  362. display: block;
  363. }
  364. }
  365. &.edit{
  366. background: #79cf13;
  367. margin-left: 10PX;
  368. .icon {
  369. width: 26px;
  370. height: 25px;
  371. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  372. background-size: 100% 100%;
  373. display: block;
  374. }
  375. }
  376. &.view{
  377. background: #3494ff;
  378. margin-left: 10PX;
  379. .icon {
  380. width: 29px;
  381. height: 21px;
  382. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  383. background-size: 100% 100%;
  384. display: block;
  385. }
  386. }
  387. &.list{
  388. background: #79cf13;
  389. .icon {
  390. width: 29px;
  391. height: 21px;
  392. background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat;
  393. background-size: 100% 100%;
  394. display: block;
  395. }
  396. }
  397. }
  398. }
  399. }
  400. }
  401. .bottom_tips{
  402. font-size: 24px;
  403. color: #a7a6a6;
  404. text-align: center;
  405. margin-top: 32px;
  406. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  407. background-size: 260px 2px;
  408. .xs{
  409. padding:0 8px;
  410. background: #e9e9e9;
  411. }
  412. }
  413. }
  414. </style>