移动端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

425 linhas
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 v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div>-->
  16. <!-- </div>-->
  17. <!-- </div>-->
  18. <div class="list_main">
  19. <van-list
  20. v-model="loading"
  21. :finished="finished"
  22. finished-text="没有更多了"
  23. @load="getList"
  24. >
  25. <!----1-->
  26. <div style="display: flex;flex-wrap: wrap;justify-content: space-between;">
  27. <div class="item" v-for="(item,index) in applicationList" :key="index" >
  28. <div class="info">
  29. <div class="title">
  30. <van-uploader v-model="item.openPic2" max-count="1" :show-upload="false" :deletable="false" multiple />
  31. </div>
  32. <!-- <div class="time">-->
  33. <!-- <div class="icon_time"></div>-->
  34. <!-- {{item.openNy}}-->
  35. <!-- </div>-->
  36. </div>
  37. <div class="operation">
  38. <!-- delete 删除 edit编辑 view查看 list榜单 -->
  39. <div class="opera_btn edit" @click="goEdit(item.id)" v-show="showBtn">
  40. <i class="icon "></i>
  41. </div>
  42. <div class="opera_btn delete" @click="goRemove(item.id,index)" v-show="showBtn">
  43. <i class="icon"></i>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </van-list>
  49. </div>
  50. <!-- <div class="bottom_tips">-->
  51. <!-- <span class="xs">已经到底啦</span>-->
  52. <!-- </div>-->
  53. </div>
  54. </template>
  55. <script>
  56. import { pictureList , pictureRemove } from "@/api/sunVillage_info/fixedAssets";
  57. import Cookies from "js-cookie";
  58. import request from '@/utils/request'
  59. export default {
  60. name: "certificateList",
  61. data() {
  62. return {
  63. applicationList:[],
  64. applicationListSecond:[],
  65. assetStatusOptions:[],
  66. auditStatus:[],
  67. loading: false,
  68. finished: false,
  69. show: false,
  70. showTab: false,
  71. fileList:[],
  72. listLength:'0',
  73. searchInput:'',
  74. queryParams:{
  75. pageNum:1,
  76. pageSize:10,
  77. orderByColumn:'openAt',
  78. isAsc:'desc',
  79. },
  80. uploadFiles1:[],
  81. projectId:'',
  82. projectIndex:'',
  83. showBtn:true,
  84. nowYear:new Date().getFullYear(),
  85. yearList:[]
  86. };
  87. },
  88. created() {
  89. this.queryParams.bookId = Cookies.get('bookId');
  90. this.queryParams.deptId = Cookies.get('deptId');
  91. if (this.$route.query.type == 'code'){
  92. this.showBtn = false;
  93. }
  94. for (let i = 0 ; i < 5 ; i++){
  95. this.yearList.push(this.nowYear-i);
  96. }
  97. },
  98. methods: {
  99. getList(){
  100. var _this = this;
  101. console.log(_this.queryParams)
  102. pictureList(_this.queryParams).then(response => {
  103. _this.listLength = response.total;
  104. response.rows.map(res=>{
  105. if (res.openPic !='' && res.openPic != null && res.openPic != undefined){
  106. res.openPic = res.openPic.split(',')
  107. res.openPic2 = [];
  108. res.openPic.map((rrr,i)=>{
  109. res.openPic2.push({url:'/api'+rrr})
  110. })
  111. }
  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_photo_add')
  168. },
  169. goDetail(id){
  170. this.$router.push({path:'/sunVillage_info/list_tourists_detail',query: {id:id,type:'tourists'}})
  171. },
  172. goEdit(id){
  173. this.$router.push({path:'/sunVillage_info/list_tourists_edit',query: {id:id,type:'finance'}})
  174. },
  175. goRanking(id,time){
  176. this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}})
  177. },
  178. goRemove(id,index){
  179. this.$dialog.alert({
  180. title: '提示',
  181. message: '确认删除?',
  182. showCancelButton:true,
  183. })
  184. .then(() => {
  185. pictureRemove(id).then(response => {
  186. this.$notify({ type: 'success', message: '删除成功' });
  187. this.applicationList.splice(index,1);
  188. });
  189. })
  190. .catch(() => {
  191. // on cancel
  192. });
  193. }
  194. },
  195. }
  196. </script>
  197. <style scoped lang="scss">
  198. /deep/ .van-uploader__preview{
  199. margin: 0;
  200. }
  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. margin-top: 15PX;
  291. .item{
  292. border-radius: 30px;
  293. background: #fff;
  294. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  295. padding:4%;
  296. margin-bottom: 20px;
  297. .info{
  298. flex:0 0 450px;
  299. .title{
  300. font-size: 32px;
  301. .icon_box{
  302. width: 34px;
  303. display: block;
  304. height: 30px;
  305. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  306. background-size: 100% 100%;
  307. margin-right: 10px;
  308. }
  309. .news_title{
  310. max-width:330px;
  311. overflow: hidden;
  312. white-space: nowrap;
  313. text-overflow: ellipsis;
  314. -o-text-overflow: ellipsis;
  315. }
  316. .tips_mark{
  317. width: 34px;
  318. height: 34px;
  319. background: #fa0c0c;
  320. border-radius: 8px;
  321. font-size: 24px;
  322. color: #fff;
  323. text-align: center;
  324. line-height: 34px;
  325. margin-left: 10px;
  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. flex: 1;
  346. display: flex;
  347. align-items: center;
  348. justify-content: space-around;
  349. text-align: right;
  350. margin-top: 5PX;
  351. .opera_btn{
  352. width: 52px;
  353. height: 52px;
  354. border-radius: 50%;
  355. display: flex;
  356. align-items: center;
  357. justify-content:center;
  358. &.delete{
  359. background:#df0707;
  360. .icon{
  361. width: 22px;
  362. height: 29px;
  363. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  364. background-size: 100% 100%;
  365. display: block;
  366. }
  367. }
  368. &.edit{
  369. background: #79cf13;
  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. .icon {
  381. width: 29px;
  382. height: 21px;
  383. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  384. background-size: 100% 100%;
  385. display: block;
  386. }
  387. }
  388. &.list{
  389. background: #79cf13;
  390. .icon {
  391. width: 29px;
  392. height: 21px;
  393. background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat;
  394. background-size: 100% 100%;
  395. display: block;
  396. }
  397. }
  398. }
  399. }
  400. }
  401. }
  402. .bottom_tips{
  403. font-size: 24px;
  404. color: #a7a6a6;
  405. text-align: center;
  406. margin-top: 32px;
  407. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  408. background-size: 260px 2px;
  409. .xs{
  410. padding:0 8px;
  411. background: #e9e9e9;
  412. }
  413. }
  414. }
  415. </style>