移动端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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