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

432 linhas
13 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. {{showBtn?'其他':'合同'}}公开
  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 class="item" v-for="(item,index) in applicationList" :key="index" >
  27. <div class="info" @click="goDetail(item.id)">
  28. <div class="title">
  29. <i class="icon_box"></i>
  30. <p class="news_title">{{item.deptName}}{{item.otherType}}</p>
  31. <p class="tips_mark" v-if="index==0">新</p>
  32. </div>
  33. <div class="time">
  34. <div class="icon_time"></div>
  35. {{item.openAt}}
  36. </div>
  37. </div>
  38. <div class="operation">
  39. <!-- delete 删除 edit编辑 view查看 list榜单 -->
  40. <div class="opera_btn edit" @click="goEdit(item.id)" v-show="showBtn">
  41. <i class="icon "></i>
  42. </div>
  43. <div class="opera_btn delete" @click="goRemove(item.id,index)" v-show="showBtn">
  44. <i class="icon"></i>
  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 { otherPublicList , otherRemove } 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. otherGkTypeOptions:[],
  67. auditStatus:[],
  68. loading: false,
  69. finished: false,
  70. show: false,
  71. showTab: false,
  72. fileList:[],
  73. listLength:'0',
  74. searchInput:'',
  75. queryParams:{
  76. pageNum:1,
  77. pageSize:10,
  78. orderByColumn:'createTime',
  79. isAsc:'desc',
  80. translate_dict:1,
  81. otherType:''
  82. },
  83. uploadFiles1:[],
  84. projectId:'',
  85. projectIndex:'',
  86. showBtn:true,
  87. nowYear:new Date().getFullYear(),
  88. yearList:[]
  89. };
  90. },
  91. created() {
  92. this.houseGetDicts("picture_type").then((response) => {
  93. this.pictureTypeOptions = response.data;
  94. });
  95. this.houseGetDicts("other_gk_type").then((response) => {
  96. this.otherGkTypeOptions = response.data;
  97. });
  98. this.queryParams.bookId = Cookies.get('bookId');
  99. this.queryParams.deptId = Cookies.get('deptId');
  100. if (this.$route.query.type == 'code'){
  101. this.queryParams.otherType = 1;
  102. this.showBtn = false;
  103. }
  104. },
  105. methods: {
  106. getList(){
  107. var _this = this;
  108. console.log(_this.queryParams)
  109. otherPublicList(_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_contract_add')
  169. },
  170. goDetail(id){
  171. this.$router.push({path:'/sunVillage_info/list_contract_detail',query: {id:id,type:'tourists'}})
  172. },
  173. goEdit(id){
  174. this.$router.push({path:'/sunVillage_info/list_contract_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. otherRemove(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. .info{
  298. flex:0 0 450px;
  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. }
  312. .news_title{
  313. max-width:330px;
  314. overflow: hidden;
  315. white-space: nowrap;
  316. text-overflow: ellipsis;
  317. -o-text-overflow: ellipsis;
  318. }
  319. .tips_mark{
  320. width: 34px;
  321. height: 34px;
  322. background: #fa0c0c;
  323. border-radius: 8px;
  324. font-size: 24px;
  325. color: #fff;
  326. text-align: center;
  327. line-height: 34px;
  328. margin-left: 10px;
  329. }
  330. }
  331. .time{
  332. font-size: 24px;
  333. color: #858585;
  334. display: flex;
  335. align-items: center;
  336. height: 30px;
  337. margin-top: 6px;
  338. .icon_time{
  339. width: 25px;
  340. height: 25px;
  341. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  342. background-size: 100% 100%;
  343. margin-right: 10px;
  344. }
  345. }
  346. }
  347. .operation{
  348. flex: 1;
  349. display: flex;
  350. align-items: center;
  351. justify-content: right;
  352. text-align: right;
  353. .opera_btn{
  354. width: 52px;
  355. height: 52px;
  356. border-radius: 50%;
  357. display: flex;
  358. align-items: center;
  359. justify-content:center;
  360. &.delete{
  361. background:#df0707;
  362. margin-left: 10PX;
  363. .icon{
  364. width: 22px;
  365. height: 29px;
  366. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  367. background-size: 100% 100%;
  368. display: block;
  369. }
  370. }
  371. &.edit{
  372. background: #79cf13;
  373. margin-left: 10PX;
  374. .icon {
  375. width: 26px;
  376. height: 25px;
  377. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  378. background-size: 100% 100%;
  379. display: block;
  380. }
  381. }
  382. &.view{
  383. background: #3494ff;
  384. margin-left: 10PX;
  385. .icon {
  386. width: 29px;
  387. height: 21px;
  388. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  389. background-size: 100% 100%;
  390. display: block;
  391. }
  392. }
  393. &.list{
  394. background: #79cf13;
  395. .icon {
  396. width: 29px;
  397. height: 21px;
  398. background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat;
  399. background-size: 100% 100%;
  400. display: block;
  401. }
  402. }
  403. }
  404. }
  405. }
  406. }
  407. .bottom_tips{
  408. font-size: 24px;
  409. color: #a7a6a6;
  410. text-align: center;
  411. margin-top: 32px;
  412. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  413. background-size: 260px 2px;
  414. .xs{
  415. padding:0 8px;
  416. background: #e9e9e9;
  417. }
  418. }
  419. }
  420. </style>