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

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