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

321 rivejä
11 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="head_main">
  4. <div class="location">
  5. <div class="address" @click="villageVisbile = true"><i class="icon"></i>{{deptName}}</div>
  6. <van-popup v-model="villageVisbile" round position="bottom">
  7. <van-cascader
  8. v-model="villageValue"
  9. title="请选择所在村"
  10. :options="hcAreaInfoOption"
  11. @close="hcAreaInfoClose"
  12. @finish="hcAreaInfoFinish"
  13. active-color="#1989fa"
  14. :field-names="hcAreaInfoFieldName"
  15. />
  16. </van-popup>
  17. <div class="address" @click="bookVisbile = true">{{bookName}}</div>
  18. <van-popup v-model="bookVisbile" round position="bottom">
  19. <van-picker
  20. title="请选择账套"
  21. show-toolbar
  22. :columns="bookList"
  23. @confirm="onConfirmBook"
  24. @cancel="onCancelBook"
  25. value-key="bookName"
  26. />
  27. </van-popup>
  28. </div>
  29. <van-popover
  30. v-model="showPopover"
  31. trigger="click"
  32. :actions="actions"
  33. placement="bottom-end"
  34. @select="selectChange"
  35. >
  36. <template #reference>
  37. <div class="exit_btn">
  38. <i class="icon"></i>
  39. </div>
  40. </template>
  41. </van-popover>
  42. <!-- @click="logout"-->
  43. </div>
  44. <div class="index_info">
  45. <div class="title"></div>
  46. <div class="nav_list">
  47. <router-link :to="{name:'sunVillageInfoListFinance'}" class="nav_item n_1">财务公开榜</router-link>
  48. <router-link :to="{name:'sunVillageInfoListTourists'}" class="nav_item n_2">零工公开榜</router-link>
  49. <router-link :to="{name:'sunVillageInfoListRegister'}" class="nav_item n_6">零工登记</router-link>
  50. <router-link :to="{name:'sunVillageInfoListIssues'}" class="nav_item n_3">重大事项</router-link>
  51. <router-link :to="{name:'sunVillageInfoFixedAssets'}" class="nav_item n_4">固定资产</router-link>
  52. <router-link :to="{name:'sunVillageInfoInformation'}" class="nav_item n_5">合同登记</router-link>
  53. <router-link :to="{name:'sunVillageInfoListBalanceRanking'}" class="nav_item n_7">科目余额</router-link>
  54. </div>
  55. </div>
  56. <div class="footer">
  57. 技术支持:北京农燊高科信息技术有限公司
  58. </div>
  59. </div>
  60. </template>
  61. <script>
  62. import { changeBook , listByDeptId , treeselectByUser } from "@/api/sunVillage_info/fixedAssets";
  63. import { getInfo } from "@/api/login/index";
  64. import {changeDept} from "../../api/onlineHome/done";
  65. import {bookListByDeptId} from "../../api/homestead";
  66. import Cookies from "js-cookie";
  67. import {logout} from "../../api/login";
  68. export default {
  69. name: "certificateList",
  70. data() {
  71. return {
  72. showPopover: false,
  73. actions: [
  74. { text: '个人信息', icon: 'manager-o' , index: 0 },
  75. { text: '修改密码', icon: 'edit' , index: 1 },
  76. { text: '退出登录', icon: 'revoke' , index: 2 },
  77. ],
  78. deptIdOptions:[],
  79. villageVisbile:false,
  80. showBookList:false,
  81. deptName:'',
  82. //选中的值
  83. villageValue: "",
  84. //省市区区级list
  85. hcAreaInfoOption: [],
  86. hcAreaInfoFieldName: {
  87. text: "label",
  88. value: "value",
  89. children: "children",
  90. },
  91. bookName:'',
  92. queryParams: {
  93. pageNum: 1,
  94. pageSize: 100,
  95. },
  96. //账套列表
  97. bookVisbile:false,
  98. bookList:[],
  99. bookName:"",
  100. bookId:"",
  101. book:"",
  102. };
  103. },
  104. created() {
  105. getInfo().then(response => {
  106. this.bookName = response.user.bookName
  107. this.deptName = response.user.deptName
  108. Cookies.set("bookName", response.user.bookName, {
  109. expires: 30,
  110. });
  111. Cookies.set("deptName", response.user.deptName, {
  112. expires: 30,
  113. });
  114. Cookies.set("bookId", response.user.loginBookId, {
  115. expires: 30,
  116. });
  117. Cookies.set("deptId", response.user.loginDeptId, {
  118. expires: 30,
  119. });
  120. this.getBookList(response.user.loginDeptId);
  121. });
  122. treeselectByUser().then((res) => {
  123. if (res.code == 200) {
  124. this.hcAreaInfoOption = res.data;
  125. }
  126. });
  127. this.$set(this.queryParams, "systemType", '4');
  128. },
  129. methods: {
  130. //关闭选择地址弹窗
  131. hcAreaInfoClose() {
  132. this.villageVisbile = false;
  133. },
  134. hcAreaInfoFinish({ value, selectedOptions, tabIndex }) {
  135. // 切换部门
  136. let Depquery={"loginDeptID":value}
  137. changeDept(Depquery).then((response) => {
  138. if (response.code === 200) {
  139. this.$store.dispatch("GetInfo").then(() => {
  140. // this.$router.go(0);
  141. window.location.href = "/sunVillage_info/index";
  142. });
  143. }
  144. });
  145. this.villageVisbile = false;
  146. },
  147. getBookList(e){
  148. let params = {
  149. loginDeptID:e
  150. }
  151. listByDeptId(params).then((response) => {
  152. if (response.code == 200) {
  153. this.bookList = response.rows;
  154. }
  155. })
  156. },
  157. onConfirmBook(e){
  158. this.bookVisbile = false
  159. this.bookName = e.bookName
  160. let param={"loginBookId":e.id}
  161. changeBook(param).then((response) => {
  162. if (response.code === 200) {
  163. this.$store.dispatch("GetInfo").then(() => {
  164. // this.$router.go(0);
  165. window.location.href = "/sunVillage_info/index";
  166. });
  167. }
  168. });
  169. },
  170. onCancelBook(e){
  171. this.bookVisbile = false
  172. },
  173. logout(){
  174. logout().then(res => {
  175. this.$router.push({path:"/sunVillage_info/index_code",query:{bookId:Cookies.get('bookId'),deptId:Cookies.get('deptId')}})
  176. })
  177. },
  178. selectChange(val){
  179. console.log(val)
  180. val.index == 0 ? this.$router.push({path:"/sunVillage_info/user"}) : val.index == 1 ? this.$router.push({path:"/sunVillage_info/passWord"}) : val.index == 2 ? this.logout() : '';
  181. }
  182. },
  183. }
  184. </script>
  185. <style scoped lang="scss">
  186. .home_wrapper{
  187. background: #f1f2f2;
  188. width: 100vw;
  189. min-height: 100vh;
  190. .head_main{
  191. height: 340px;
  192. background: url('../../assets/images/sunVillage_info/index_head.png') no-repeat;
  193. background-size: 100% 100%;
  194. position: relative;
  195. .location{
  196. height: 42px;
  197. line-height: 42px;
  198. position: absolute;
  199. left: 38px;
  200. top: 72px;
  201. display: flex;
  202. .address{
  203. padding:0 18px;
  204. background:rgba(255,255,255,0.75);
  205. border-radius: 42px;
  206. font-size: 28px;
  207. color: #3f3d56;
  208. margin-right: 12px;
  209. display: flex;
  210. align-items:center;
  211. .icon{
  212. display: block;
  213. width: 20px;
  214. height: 26px;
  215. background: url('../../assets/images/sunVillage_info/index_icon_1.png') no-repeat;
  216. background-size: 100% 100%;
  217. margin-right: 10px;
  218. }
  219. }
  220. }
  221. /deep/ .van-popover__wrapper{
  222. position: absolute;
  223. top: 64px;
  224. right: 36px;
  225. }
  226. .exit_btn{
  227. width: 61px;
  228. height: 61px;
  229. /*background: #3f3d56;*/
  230. border-radius: 50%;
  231. display: flex;
  232. align-items: center;
  233. justify-content: center;
  234. /*position: absolute;*/
  235. /*top: 64px;*/
  236. /*right: 36px;*/
  237. .icon{
  238. width: 100%;
  239. height: 100%;
  240. background: url('../../assets/images/sunVillage_info/login_head_h.png') no-repeat;
  241. background-size: 100% 100%;
  242. }
  243. }
  244. }
  245. .index_info{
  246. padding-top: 4.1vh;
  247. .title{
  248. width: 521px;
  249. height: 52px;
  250. background: url('../../assets/images/sunVillage_info/index_title.png') no-repeat;
  251. background-size: 100% 100%;
  252. margin:0 auto;
  253. }
  254. .nav_list{
  255. margin-top: 6vh;
  256. padding:0 38px;
  257. display: flex;
  258. flex-flow: wrap;
  259. .nav_item{
  260. flex:0 0 200px;
  261. height: 249px;
  262. margin-right: 34px;
  263. margin-bottom: 35px;
  264. box-shadow: 6px 0px 18px rgba(63,68,75,0.2);
  265. border-radius: 30px;
  266. font-size: 30px;
  267. color: #fff;
  268. text-align: center;
  269. display: flex;
  270. align-items: center;
  271. justify-content: center;
  272. padding-top: 120px;
  273. &:nth-child(3n){
  274. margin-right: 0;
  275. }
  276. &.n_1{
  277. background: url('../../assets/images/sunVillage_info/index_block_1.png') no-repeat;
  278. background-size: 100% 100%;
  279. }
  280. &.n_2{
  281. background: url('../../assets/images/sunVillage_info/index_block_2.png') no-repeat;
  282. background-size: 100% 100%;
  283. }
  284. &.n_3 {
  285. background: url('../../assets/images/sunVillage_info/index_block_3.png') no-repeat;
  286. background-size: 100% 100%;
  287. }
  288. &.n_4 {
  289. background: url('../../assets/images/sunVillage_info/index_block_4.png') no-repeat;
  290. background-size: 100% 100%;
  291. }
  292. &.n_5 {
  293. background: url('../../assets/images/sunVillage_info/index_block_5.png') no-repeat;
  294. background-size: 100% 100%;
  295. }
  296. &.n_6 {
  297. background: url('../../assets/images/sunVillage_info/index_block_6.png') no-repeat;
  298. background-size: 100% 100%;
  299. }
  300. &.n_7 {
  301. background: url('../../assets/images/sunVillage_info/index_block_7.png') no-repeat;
  302. background-size: 100% 100%;
  303. }
  304. }
  305. }
  306. }
  307. .footer{
  308. position: absolute;
  309. bottom: 5.5vh;
  310. width: 100%;
  311. font-size: 22px;
  312. color: #3f3d56;
  313. text-align: center;
  314. }
  315. }
  316. </style>