移动端
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

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