移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

434 行
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.deptName}}{{item.pictureType}}</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)">
  44. <i class="icon "></i>
  45. </div>
  46. <div class="opera_btn delete" @click="goRemove(item.id,index)">
  47. <i class="icon"></i>
  48. </div>
  49. </div>
  50. </div>
  51. </van-list>
  52. </div>
  53. <!-- <div class="bottom_tips">-->
  54. <!-- <span class="xs">已经到底啦</span>-->
  55. <!-- </div>-->
  56. </div>
  57. </template>
  58. <script>
  59. import { pictureList , pictureRemove } from "@/api/sunVillage_info/fixedAssets";
  60. import Cookies from "js-cookie";
  61. import request from '@/utils/request'
  62. export default {
  63. name: "certificateList",
  64. data() {
  65. return {
  66. applicationList:[],
  67. applicationListSecond:[],
  68. assetStatusOptions:[],
  69. auditStatus:[],
  70. loading: false,
  71. finished: false,
  72. show: false,
  73. showTab: false,
  74. fileList:[],
  75. listLength:'0',
  76. searchInput:'',
  77. queryParams:{
  78. pageNum:1,
  79. pageSize:10,
  80. orderByColumn:'openAt',
  81. isAsc:'desc',
  82. translate_dict:1
  83. },
  84. uploadFiles1:[],
  85. projectId:'',
  86. projectIndex:'',
  87. showBtn:true,
  88. nowYear:new Date().getFullYear(),
  89. yearList:[]
  90. };
  91. },
  92. created() {
  93. this.houseGetDicts("picture_type").then((response) => {
  94. this.pictureTypeOptions = response.data;
  95. });
  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. pictureList(_this.queryParams).then(response => {
  110. _this.listLength = response.total;
  111. response.rows.map(res=>{
  112. // res.pictureType = this.selectDictLabel(this.pictureTypeOptions, res.pictureType);
  113. _this.applicationList.push(res);
  114. })
  115. if(_this.applicationList.length >= response.total){
  116. _this.finished = true;
  117. return;
  118. }else{
  119. _this.loading = false;
  120. _this.queryParams.pageNum += 1 ;
  121. }
  122. });
  123. },
  124. tabClick(year){
  125. this.queryParams.year = year ;
  126. this.applicationList = [];
  127. this.getList();
  128. },
  129. tabShow(){
  130. this.showTab = !this.showTab;
  131. },
  132. /** 删除按钮操作 */
  133. handleDelete(row,index) {
  134. let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus;
  135. if (assetStatus === '2' || assetStatus === '3') {
  136. this.$notify({
  137. message: "不允许删除已出售或已报废的资产",
  138. type: "warning",
  139. });
  140. return;
  141. }
  142. let useType = row.useType;
  143. if(useType == 3) {
  144. this.$notify({
  145. message: "出租或出借的资产不允许删除",
  146. type: "warning",
  147. });
  148. return ;
  149. }
  150. const ids = row.id || this.ids;
  151. this.$dialog.alert(
  152. {
  153. message:'是否确认删除固定资产?',
  154. title:"警告",
  155. confirmButtonText: "确定",
  156. cancelButtonText: "取消",
  157. }
  158. )
  159. .then(function () {
  160. return delPermanent(ids);
  161. })
  162. .then(() => {
  163. this.applicationList.splice(index, 1);
  164. this.$notify({ type: 'success', message: '删除成功' });
  165. });
  166. },
  167. goAdd(){
  168. this.$router.push('/sunVillage_info/list_photo_add')
  169. },
  170. goDetail(id){
  171. this.$router.push({path:'/sunVillage_info/list_photo_detail',query: {id:id,type:'tourists',showBtn:this.showBtn}})
  172. },
  173. goEdit(id){
  174. this.$router.push({path:'/sunVillage_info/list_photo_edit',query: {id:id,type:'finance'}})
  175. },
  176. goRanking(id,time){
  177. this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}})
  178. },
  179. goRemove(id,index){
  180. this.$dialog.alert({
  181. title: '提示',
  182. message: '确认删除?',
  183. showCancelButton:true,
  184. })
  185. .then(() => {
  186. pictureRemove(id).then(response => {
  187. this.$notify({ type: 'success', message: '删除成功' });
  188. this.applicationList.splice(index,1);
  189. });
  190. })
  191. .catch(() => {
  192. // on cancel
  193. });
  194. }
  195. },
  196. }
  197. </script>
  198. <style scoped lang="scss">
  199. .home_wrapper{
  200. background: #e9e9e9;
  201. min-height: 100vh;
  202. width: 100vw;
  203. .header_main{
  204. height: 116px;
  205. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  206. background-size: 100% 100%;
  207. position: fixed;
  208. top: 0;
  209. left: 0;
  210. width: 100%;
  211. font-size: 36px;
  212. line-height: 116px;
  213. text-align: center;
  214. color: #fff;
  215. position: relative;
  216. .return_btn{
  217. width: 24px;
  218. height: 43.2px;
  219. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  220. background-size: 20px 36px;
  221. position: absolute;
  222. left: 38px;
  223. top: 36px;
  224. }
  225. .add_btn{
  226. width: 56.4px;
  227. height: 40.8px;
  228. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  229. background-size: 47px 34px;
  230. position: absolute;
  231. right: 38px;
  232. top: 36px;
  233. }
  234. }
  235. .record_main{
  236. padding:30px 22px;
  237. .record_det{
  238. height: 38px;
  239. line-height: 38px;
  240. display: flex;
  241. justify-content:space-between;
  242. .year_l{
  243. font-size: 30px;
  244. display: flex;
  245. align-items: center;
  246. color: #858585;
  247. .unit{
  248. padding-left: 5px;
  249. }
  250. .icon{
  251. width: 23px;
  252. height: 12px;
  253. display: block;
  254. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  255. background-size: 100% 100%;
  256. margin-bottom: 4px;
  257. margin-right: 8px;
  258. &.zk {
  259. transform: rotate(0deg)
  260. }
  261. &.ss{
  262. transform: rotate(180deg)
  263. }
  264. }
  265. }
  266. .total_r{
  267. font-size: 26px;
  268. letter-spacing: 2px;
  269. }
  270. }
  271. .record_list{
  272. display: flex;
  273. flex-flow: wrap;
  274. margin-top: 12PX;
  275. .flex_block{
  276. font-size: 30px;
  277. color: #878787;
  278. padding-right: 30px;
  279. &.current{
  280. color: #4199fe;
  281. font-weight: bold;
  282. }
  283. }
  284. }
  285. }
  286. .list_main{
  287. padding:0 22px;
  288. margin-top: 15PX;
  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>