移动端
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.
 
 

433 lines
13 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" @click="goAdd" v-show="showBtn"></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" v-show="showBtn">
  42. <!-- delete 删除 edit编辑 view查看 list榜单 -->
  43. <div class="opera_btn list" @click="goRanking(item.id,item.openNy)">
  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 { tempWorkerPublicList , tempWorkerOpenRemove } 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:'',
  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. console.log(_this.queryParams)
  112. tempWorkerPublicList(_this.queryParams).then(response => {
  113. _this.listLength = response.total;
  114. response.rows.map(res=>{
  115. _this.applicationList.push(res);
  116. })
  117. if(_this.applicationList.length >= response.total){
  118. _this.finished = true;
  119. return;
  120. }else{
  121. _this.loading = false;
  122. _this.queryParams.pageNum += 1 ;
  123. }
  124. });
  125. },
  126. tabClick(year){
  127. this.queryParams.year = year ;
  128. this.applicationList = [];
  129. this.getList();
  130. },
  131. tabShow(){
  132. this.showTab = !this.showTab;
  133. },
  134. /** 删除按钮操作 */
  135. handleDelete(row,index) {
  136. let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus;
  137. if (assetStatus === '2' || assetStatus === '3') {
  138. this.$notify({
  139. message: "不允许删除已出售或已报废的资产",
  140. type: "warning",
  141. });
  142. return;
  143. }
  144. let useType = row.useType;
  145. if(useType == 3) {
  146. this.$notify({
  147. message: "出租或出借的资产不允许删除",
  148. type: "warning",
  149. });
  150. return ;
  151. }
  152. const ids = row.id || this.ids;
  153. this.$dialog.alert(
  154. {
  155. message:'是否确认删除固定资产?',
  156. title:"警告",
  157. confirmButtonText: "确定",
  158. cancelButtonText: "取消",
  159. }
  160. )
  161. .then(function () {
  162. return delPermanent(ids);
  163. })
  164. .then(() => {
  165. this.applicationList.splice(index, 1);
  166. this.$notify({ type: 'success', message: '删除成功' });
  167. });
  168. },
  169. goAdd(){
  170. this.$router.push('/sunVillage_info/list_tourists_add')
  171. },
  172. goDetail(id){
  173. this.$router.push({path:'/sunVillage_info/list_tourists_detail',query: {id:id,type:'tourists'}})
  174. },
  175. goEdit(id){
  176. this.$router.push({path:'/sunVillage_info/list_tourists_edit',query: {id:id,type:'finance'}})
  177. },
  178. goRanking(id,time){
  179. this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}})
  180. },
  181. goRemove(id){
  182. this.$dialog.alert({
  183. title: '提示',
  184. message: '确认删除?',
  185. showCancelButton:true,
  186. })
  187. .then(() => {
  188. tempWorkerOpenRemove(id).then(response => {
  189. this.$notify({ type: 'success', message: '删除成功' });
  190. this.getList()
  191. });
  192. })
  193. .catch(() => {
  194. // on cancel
  195. });
  196. }
  197. },
  198. }
  199. </script>
  200. <style scoped lang="scss">
  201. .home_wrapper{
  202. background: #e9e9e9;
  203. min-height: 100vh;
  204. width: 100vw;
  205. .header_main{
  206. height: 116px;
  207. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  208. background-size: 100% 100%;
  209. position: fixed;
  210. top: 0;
  211. left: 0;
  212. width: 100%;
  213. font-size: 36px;
  214. line-height: 116px;
  215. text-align: center;
  216. color: #fff;
  217. position: relative;
  218. .return_btn{
  219. width: 24px;
  220. height: 43.2px;
  221. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  222. background-size: 20px 36px;
  223. position: absolute;
  224. left: 38px;
  225. top: 36px;
  226. }
  227. .add_btn{
  228. width: 56.4px;
  229. height: 40.8px;
  230. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  231. background-size: 47px 34px;
  232. position: absolute;
  233. right: 38px;
  234. top: 36px;
  235. }
  236. }
  237. .record_main{
  238. padding:30px 22px;
  239. .record_det{
  240. height: 38px;
  241. line-height: 38px;
  242. display: flex;
  243. justify-content:space-between;
  244. .year_l{
  245. font-size: 30px;
  246. display: flex;
  247. align-items: center;
  248. color: #858585;
  249. .unit{
  250. padding-left: 5px;
  251. }
  252. .icon{
  253. width: 23px;
  254. height: 12px;
  255. display: block;
  256. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  257. background-size: 100% 100%;
  258. margin-bottom: 4px;
  259. margin-right: 8px;
  260. &.zk {
  261. transform: rotate(0deg)
  262. }
  263. &.ss{
  264. transform: rotate(180deg)
  265. }
  266. }
  267. }
  268. .total_r{
  269. font-size: 26px;
  270. letter-spacing: 2px;
  271. }
  272. }
  273. .record_list{
  274. display: flex;
  275. flex-flow: wrap;
  276. margin-top: 12PX;
  277. .flex_block{
  278. font-size: 30px;
  279. color: #878787;
  280. padding-right: 30px;
  281. &.current{
  282. color: #4199fe;
  283. font-weight: bold;
  284. }
  285. }
  286. }
  287. }
  288. .list_main{
  289. padding:0 22px;
  290. .item{
  291. height: 140px;
  292. border-radius: 30px;
  293. background: #fff;
  294. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  295. padding:25px 32px;
  296. display: flex;
  297. margin-bottom: 20px;
  298. justify-content: space-between;
  299. .info{
  300. .title{
  301. display: flex;
  302. font-size: 32px;
  303. align-items: center;
  304. height: 58px;
  305. .icon_box{
  306. width: 34px;
  307. display: block;
  308. height: 30px;
  309. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  310. background-size: 100% 100%;
  311. margin-right: 10px;
  312. flex-shrink: 0;
  313. }
  314. .news_title{
  315. display: -webkit-box;
  316. -webkit-box-orient: vertical;
  317. -webkit-line-clamp: 1;
  318. word-break: break-all;
  319. overflow: hidden;
  320. }
  321. .tips_mark{
  322. width: 34px;
  323. height: 34px;
  324. background: #fa0c0c;
  325. border-radius: 8px;
  326. font-size: 24px;
  327. color: #fff;
  328. text-align: center;
  329. line-height: 34px;
  330. margin-left: 10px;
  331. flex-shrink: 0;
  332. }
  333. }
  334. .time{
  335. font-size: 24px;
  336. color: #858585;
  337. display: flex;
  338. align-items: center;
  339. height: 30px;
  340. margin-top: 6px;
  341. .icon_time{
  342. width: 25px;
  343. height: 25px;
  344. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  345. background-size: 100% 100%;
  346. margin-right: 10px;
  347. }
  348. }
  349. }
  350. .operation{
  351. display: flex;
  352. align-items: center;
  353. justify-content: right;
  354. text-align: right;
  355. .opera_btn{
  356. width: 52px;
  357. height: 52px;
  358. border-radius: 50%;
  359. display: flex;
  360. align-items: center;
  361. justify-content:center;
  362. &.delete{
  363. background:#df0707;
  364. margin-left: 10PX;
  365. .icon{
  366. width: 22px;
  367. height: 29px;
  368. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  369. background-size: 100% 100%;
  370. display: block;
  371. }
  372. }
  373. &.edit{
  374. background: #79cf13;
  375. margin-left: 10PX;
  376. .icon {
  377. width: 26px;
  378. height: 25px;
  379. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  380. background-size: 100% 100%;
  381. display: block;
  382. }
  383. }
  384. &.view{
  385. background: #3494ff;
  386. margin-left: 10PX;
  387. .icon {
  388. width: 29px;
  389. height: 21px;
  390. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  391. background-size: 100% 100%;
  392. display: block;
  393. }
  394. }
  395. &.list{
  396. background: #79cf13;
  397. margin-left: 10PX;
  398. .icon {
  399. width: 29px;
  400. height: 21px;
  401. background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat;
  402. background-size: 100% 100%;
  403. display: block;
  404. }
  405. }
  406. }
  407. }
  408. }
  409. }
  410. .bottom_tips{
  411. font-size: 24px;
  412. color: #a7a6a6;
  413. text-align: center;
  414. margin-top: 32px;
  415. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  416. background-size: 260px 2px;
  417. .xs{
  418. padding:0 8px;
  419. background: #e9e9e9;
  420. }
  421. }
  422. }
  423. </style>