移动端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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