移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

431 lines
14 KiB

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