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

list_issues.vue 12 KiB

2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
2 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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"></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">新</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)">
  43. <i class="icon "></i>
  44. </div>
  45. <div class="opera_btn delete" @click="goRemove(item.id)">
  46. <i class="icon"></i>
  47. </div>
  48. <!-- <div class="opera_btn view">
  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. };
  90. },
  91. created() {
  92. this.houseGetDicts("asset_status").then((response) => {
  93. this.assetStatusOptions = response.data;
  94. });
  95. this.houseGetDicts("asset_type").then((response) => {
  96. this.assetTypeOptions = response.data;
  97. });
  98. this.houseGetDicts("use_type").then((response) => {
  99. this.useTypeOptions = response.data;
  100. });
  101. console.log(Cookies.get('bookId'))
  102. this.queryParams.bookId = Cookies.get('bookId');
  103. this.queryParams.deptId = Cookies.get('deptId');
  104. },
  105. methods: {
  106. getList(){
  107. var _this = this;
  108. setTimeout(() => {
  109. console.log(_this.queryParams)
  110. majorEventPublicList(_this.queryParams).then(response => {
  111. _this.listLength = response.total;
  112. _this.applicationList = response.rows;
  113. if(_this.applicationList.length >= response.total){
  114. _this.finished = true;
  115. return;
  116. }else{
  117. _this.loading = false;
  118. _this.queryParams.pageNum += 1 ;
  119. }
  120. });
  121. }, 1000);
  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_issues_add')
  168. },
  169. goDetail(id){
  170. this.$router.push({path:'/sunVillage_info/list_issues_detail',query: {id:id,type:'issues'}})
  171. },
  172. goEdit(id){
  173. this.$router.push({path:'/sunVillage_info/list_issues_edit',query: {id:id,type:'finance'}})
  174. },
  175. goRemove(id){
  176. this.$dialog.alert({
  177. title: '提示',
  178. message: '确认删除?',
  179. })
  180. .then(() => {
  181. majorEventOpenRemove(id).then(response => {
  182. this.$notify({ type: 'success', message: '删除成功' });
  183. this.getList()
  184. });
  185. })
  186. .catch(() => {
  187. // on cancel
  188. });
  189. }
  190. },
  191. }
  192. </script>
  193. <style scoped lang="scss">
  194. .home_wrapper{
  195. background: #e9e9e9;
  196. min-height: 100vh;
  197. width: 100vw;
  198. .header_main{
  199. height: 116px;
  200. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  201. background-size: 100% 100%;
  202. position: fixed;
  203. top: 0;
  204. left: 0;
  205. width: 100%;
  206. font-size: 36px;
  207. line-height: 116px;
  208. text-align: center;
  209. color: #fff;
  210. position: relative;
  211. .return_btn{
  212. width: 24px;
  213. height: 43.2px;
  214. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  215. background-size: 20px 36px;
  216. position: absolute;
  217. left: 38px;
  218. top: 36px;
  219. }
  220. .add_btn{
  221. width: 56.4px;
  222. height: 40.8px;
  223. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  224. background-size: 47px 34px;
  225. position: absolute;
  226. right: 38px;
  227. top: 36px;
  228. }
  229. }
  230. .record_main{
  231. padding:30px 22px;
  232. .record_det{
  233. height: 38px;
  234. line-height: 38px;
  235. display: flex;
  236. justify-content:space-between;
  237. .year_l{
  238. font-size: 30px;
  239. display: flex;
  240. align-items: center;
  241. color: #858585;
  242. .unit{
  243. padding-left: 5px;
  244. }
  245. .icon{
  246. width: 23px;
  247. height: 12px;
  248. display: block;
  249. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  250. background-size: 100% 100%;
  251. margin-bottom: 4px;
  252. margin-right: 8px;
  253. &.zk {
  254. transform: rotate(0deg)
  255. }
  256. &.ss{
  257. transform: rotate(180deg)
  258. }
  259. }
  260. }
  261. .total_r{
  262. font-size: 26px;
  263. letter-spacing: 2px;
  264. }
  265. }
  266. .record_list{
  267. display: flex;
  268. flex-flow: wrap;
  269. margin-top: 12PX;
  270. .flex_block{
  271. font-size: 30px;
  272. color: #878787;
  273. padding-right: 30px;
  274. &.current{
  275. color: #4199fe;
  276. font-weight: bold;
  277. }
  278. }
  279. }
  280. }
  281. .list_main{
  282. padding:0 22px;
  283. .item{
  284. height: 140px;
  285. border-radius: 30px;
  286. background: #fff;
  287. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  288. padding:25px 32px;
  289. display: flex;
  290. margin-bottom: 20px;
  291. .info{
  292. flex:0 0 510px;
  293. .title{
  294. display: flex;
  295. font-size: 32px;
  296. align-items: center;
  297. height: 58px;
  298. .icon_box{
  299. width: 34px;
  300. display: block;
  301. height: 30px;
  302. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  303. background-size: 100% 100%;
  304. margin-right: 10px;
  305. }
  306. .news_title{
  307. max-width:416px;
  308. overflow: hidden;
  309. white-space: nowrap;
  310. text-overflow: ellipsis;
  311. -o-text-overflow: ellipsis;
  312. }
  313. .tips_mark{
  314. width: 34px;
  315. height: 34px;
  316. background: #fa0c0c;
  317. border-radius: 8px;
  318. font-size: 24px;
  319. color: #fff;
  320. text-align: center;
  321. line-height: 34px;
  322. margin-left: 10px;
  323. }
  324. }
  325. .time{
  326. font-size: 24px;
  327. color: #858585;
  328. display: flex;
  329. align-items: center;
  330. height: 30px;
  331. margin-top: 6px;
  332. .icon_time{
  333. width: 25px;
  334. height: 25px;
  335. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  336. background-size: 100% 100%;
  337. margin-right: 10px;
  338. }
  339. }
  340. }
  341. .operation{
  342. flex: 1;
  343. display: flex;
  344. align-items: center;
  345. justify-content: flex-end;
  346. text-align: right;
  347. .opera_btn{
  348. width: 52px;
  349. height: 52px;
  350. border-radius: 50%;
  351. display: flex;
  352. align-items: center;
  353. justify-content:center;
  354. &.delete{
  355. background:#df0707;
  356. margin-left: 28px;
  357. .icon{
  358. width: 22px;
  359. height: 29px;
  360. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  361. background-size: 100% 100%;
  362. display: block;
  363. }
  364. }
  365. &.edit{
  366. background: #79cf13;
  367. .icon {
  368. width: 26px;
  369. height: 25px;
  370. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  371. background-size: 100% 100%;
  372. display: block;
  373. }
  374. }
  375. &.view{
  376. background: #3494ff;
  377. .icon {
  378. width: 29px;
  379. height: 21px;
  380. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  381. background-size: 100% 100%;
  382. display: block;
  383. }
  384. }
  385. }
  386. }
  387. }
  388. }
  389. .bottom_tips{
  390. font-size: 24px;
  391. color: #a7a6a6;
  392. text-align: center;
  393. margin-top: 32px;
  394. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  395. background-size: 260px 2px;
  396. .xs{
  397. padding:0 8px;
  398. background: #e9e9e9;
  399. }
  400. }
  401. }
  402. </style>