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

480 regels
17 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 v-model="villageValue" title="请选择所在村" :options="hcAreaInfoOption" @close="hcAreaInfoClose" @finish="hcAreaInfoFinish" active-color="#1989fa" :field-names="hcAreaInfoFieldName"/>
  8. </van-popup>
  9. <div class="address" @click="bookVisbile = true">{{bookName}}</div>
  10. <van-popup v-model="bookVisbile" round position="bottom">
  11. <van-picker title="请选择账套" show-toolbar :columns="bookList" @confirm="onConfirmBook" @cancel="onCancelBook" value-key="bookName"/>
  12. </van-popup>
  13. </div>
  14. <van-popover v-model="showPopover" trigger="click" placement="bottom-end" @select="selectChange">
  15. <div style="width: 4rem;">
  16. <van-cell :title="item.text" @click="selectChange(item)" :border="false" :icon="item.icon" v-for="(item,index) in actions" :key="index" />
  17. </div>
  18. <template #reference>
  19. <div class="exit_btn">
  20. <i class="icon"></i>
  21. </div>
  22. </template>
  23. </van-popover>
  24. <!-- @click="logout"-->
  25. </div>
  26. <img src="../../../static/images/sunVillage_info/sunVillage_info_index_header.png" style="display:block;width:94%;margin:2vh auto 0;" alt="">
  27. <div class="index_info">
  28. <div class="nav_list" v-for="(item,idx) in menusList" :key="idx">
  29. <div class="nav_list_box">
  30. <van-cell :border="false" style="border-radius: 6px;">
  31. <template #title>
  32. <p style="font-weight: bold;font-size: 18px;display: inline-block">{{item.modleName}}</p>
  33. </template>
  34. </van-cell>
  35. <router-link
  36. v-for="(childrenItem,childrenIdx) in item.menus"
  37. :key="childrenItem.id"
  38. :to="{name:childrenItem.menuUrl,query:{typeX:childrenItem.urlPara}}"
  39. class="nav_item n_13"
  40. v-if="childrenItem.menuIcon!=null"
  41. :style="`background:url(${require('@/assets/images/sunVillage_info/' + childrenItem.menuIcon)}) no-repeat center top;background-size: 50%;`"
  42. >
  43. {{childrenItem.menuName}}
  44. </router-link>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="footer">
  49. {{configValue == ""?'技术支持:公司':configValue}}
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import { changeBook , listByDeptId , treeselectByUser , menus } from "@/api/sunVillage_info/fixedAssets";
  55. import { getInfo } from "@/api/login/index";
  56. import {changeDept} from "../../api/onlineHome/done";
  57. import Cookies from "js-cookie";
  58. import {logout} from "../../api/login";
  59. import { sysConfig } from "@/api/homesteadSurvey/index";
  60. import {removeToken} from "@/utils/auth";
  61. import { getConfigKey } from "@/api/system/config";
  62. export default {
  63. name: "certificateList",
  64. data() {
  65. return {
  66. showPopover: false,
  67. actions: [
  68. { text: '个人信息', icon: 'manager-o' , index: 0 },
  69. { text: '修改密码', icon: 'edit' , index: 1 },
  70. { text: '事项审批', icon: 'todo-list-o' , index: 2 },
  71. { text: '宅基地调查', icon: 'newspaper-o' , index: 3 },
  72. { text: '确权延包调查', icon: 'orders-o' , index: 4 },
  73. { text: '农业行政执法', icon: 'label-o' , index: 5 },
  74. { text: '生产托管', icon: 'notes-o' , index: 6 },
  75. { text: '产权交易', icon: 'home-o' , index: 7 },
  76. { text: '退出登录', icon: 'revoke' , index: 8 },
  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. ygcwList:[],
  103. zcsqList:[],
  104. cwxxList:[],
  105. menusList:[],
  106. configValue:''
  107. };
  108. },
  109. created() {
  110. getConfigKey("system.app.yinnongExclusive").then(response => {
  111. if(response.msg == "Y"){
  112. this.actions=[
  113. { text: '个人信息', icon: 'manager-o' , index: 0 },
  114. { text: '修改密码', icon: 'edit' , index: 1 },
  115. { text: '事项审批', icon: 'todo-list-o' , index: 2 },
  116. { text: '退出登录', icon: 'revoke' , index: 8 },
  117. ];
  118. }
  119. });
  120. getInfo().then(response => {
  121. this.bookName = response.user.bookName
  122. this.deptName = response.user.deptName
  123. Cookies.set("bookName", response.user.bookName, {
  124. expires: 30,
  125. });
  126. Cookies.set("deptName", response.user.deptName, {
  127. expires: 30,
  128. });
  129. Cookies.set("bookId", response.user.loginBookId, {
  130. expires: 30,
  131. });
  132. Cookies.set("deptId", response.user.loginDeptId, {
  133. expires: 30,
  134. });
  135. this.getBookList(response.user.loginDeptId);
  136. });
  137. treeselectByUser().then((res) => {
  138. if (res.code == 200) {
  139. this.hcAreaInfoOption = res.data;
  140. }
  141. });
  142. let query = {
  143. identityType:3
  144. }
  145. menus(query).then((res) => {
  146. if (res.code == 200) {
  147. this.menusList = res.data;
  148. // this.ygcwList = res.data[0].menus;
  149. // this.zcsqList = res.data[1].menus;
  150. // this.cwxxList = res.data[2].menus;
  151. }
  152. });
  153. this.$set(this.queryParams, "systemType", '4');
  154. let params={
  155. configKey: "system.company.name"}
  156. sysConfig(params).then((res) => {
  157. if (res.code == 200) {
  158. this.configValue = res.rows[0].configValue;
  159. }
  160. });
  161. },
  162. methods: {
  163. getPath(url){
  164. // '@/assets/images/sunVillage_info/index_block_13.png'
  165. return require( '@/assets/images/sunVillage_info/' + url );
  166. },
  167. //关闭选择地址弹窗
  168. hcAreaInfoClose() {
  169. this.villageVisbile = false;
  170. },
  171. hcAreaInfoFinish({ value, selectedOptions, tabIndex }) {
  172. // 切换部门
  173. let Depquery={"loginDeptID":value}
  174. changeDept(Depquery).then((response) => {
  175. if (response.code === 200) {
  176. this.$store.dispatch("GetInfo").then(() => {
  177. // this.$router.go(0);
  178. window.location.href = "/sunVillage_info/index";
  179. });
  180. }
  181. });
  182. this.villageVisbile = false;
  183. },
  184. getBookList(e){
  185. let params = {
  186. loginDeptID:e
  187. }
  188. listByDeptId(params).then((response) => {
  189. if (response.code == 200) {
  190. this.bookList = response.rows;
  191. }
  192. })
  193. },
  194. onConfirmBook(e){
  195. this.bookVisbile = false
  196. this.bookName = e.bookName
  197. let param={"loginBookId":e.id}
  198. changeBook(param).then((response) => {
  199. if (response.code === 200) {
  200. this.$store.dispatch("GetInfo").then(() => {
  201. // this.$router.go(0);
  202. window.location.href = "/sunVillage_info/index";
  203. });
  204. }
  205. });
  206. },
  207. onCancelBook(e){
  208. this.bookVisbile = false
  209. },
  210. logout(){
  211. logout().then(res => {
  212. removeToken();
  213. this.$router.push({path:"/sunVillage_info/index_code",query:{bookId:Cookies.get('bookId'),deptId:Cookies.get('deptId')}})
  214. })
  215. },
  216. selectChange(val){
  217. val.icon === 'manager-o' ? this.$router.push({path:"/sunVillage_info/user"}) :
  218. val.icon === 'edit' ? this.$router.push({path:"/sunVillage_info/passWord"}) :
  219. val.icon === 'todo-list-o' ? this.$router.push({path:"../yinnong/my"}) :
  220. val.icon === 'newspaper-o' ? this.$router.push({path:"../homesteadSurvey/index"}) :
  221. val.icon === 'orders-o' ? this.$router.push({path:"../contracted/index"}) :
  222. val.icon === 'label-o' ? this.$router.push({path:"../lawEnforcement/index_new"}) :
  223. val.icon === 'notes-o' ? this.$router.push({path:"../agriculturalTrusteeship/index"}) :
  224. val.icon === 'home-o' ? this.$router.push({path:"../index"}) :
  225. val.icon === 'revoke' ? this.logout() : '';
  226. }
  227. },
  228. }
  229. </script>
  230. <style scoped lang="scss">
  231. .home_wrapper{
  232. width: 100vw;
  233. min-height: 100vh;
  234. background: #F5F6F9 url('../../../static/images/sunVillage_info/page_bg.png') no-repeat top center;
  235. background-size: 100% auto;
  236. .head_main{
  237. position: relative;
  238. display: flex;
  239. align-items: self-start;
  240. justify-content: space-between;
  241. width: 94%;
  242. margin: 0 auto;
  243. padding: 2vh 0 0;
  244. .location{
  245. /*height: 42px;*/
  246. line-height: 42px;
  247. display: flex;
  248. flex-direction: column;
  249. align-items: self-start;
  250. .address{
  251. padding:0 18PX;
  252. background:rgba(255,255,255,0.75);
  253. border-radius: 42px;
  254. font-size: 28px;
  255. color: #3f3d56;
  256. margin-right: 12px;
  257. display: flex;
  258. align-items:center;
  259. margin-bottom: 10PX;
  260. .icon{
  261. display: block;
  262. width: 20px;
  263. height: 26px;
  264. background: url('../../../static/images/sunVillage_info/index_icon_1.png') no-repeat;
  265. background-size: 100% 100%;
  266. margin-right: 10PX;
  267. }
  268. }
  269. }
  270. /deep/ .van-popover__wrapper{
  271. }
  272. /deep/ .van-popover__action{
  273. width: 4rem;
  274. }
  275. .exit_btn{
  276. width: 61px;
  277. height: 61px;
  278. /*background: #3f3d56;*/
  279. border-radius: 50%;
  280. display: flex;
  281. align-items: center;
  282. justify-content: center;
  283. /*position: absolute;*/
  284. /*top: 64px;*/
  285. /*right: 36px;*/
  286. .icon{
  287. width: 100%;
  288. height: 100%;
  289. background: url('../../../static/images/sunVillage_info/login_head_h.png') no-repeat;
  290. background-size: 100% 100%;
  291. }
  292. }
  293. }
  294. .index_info{
  295. /*padding-top: 4.1vh;*/
  296. .title{
  297. width: 521px;
  298. height: 52px;
  299. background: url('../../assets/images/sunVillage_info/index_title.png') no-repeat;
  300. background-size: 100% 100%;
  301. margin:0 auto;
  302. }
  303. .nav_list{
  304. width: 94%;
  305. margin: 3vh auto 0;
  306. /*&:nth-child(2){*/
  307. /* margin-top: 6vh;*/
  308. /*}*/
  309. .van-cell{
  310. background: transparent;
  311. }
  312. .nav_list_box{
  313. display: flex;
  314. flex-flow: wrap;
  315. box-shadow: 0px 0px 18px rgba(63,68,75,0.2);
  316. /*padding: 0 0 20PX;*/
  317. border-radius: 15PX;
  318. overflow: hidden;
  319. background: #ffffff;
  320. }
  321. .nav_box{
  322. box-shadow: 0px 0px 18px rgba(63,68,75,0.2);
  323. margin-bottom: 40PX;
  324. border-radius: 15PX;
  325. overflow: hidden;
  326. /deep/ .van-grid-item__content{
  327. background: transparent;
  328. padding-top: 0;
  329. }
  330. }
  331. .nav_item{
  332. width: 25%;
  333. /*height: 180px;*/
  334. border-radius: 30px;
  335. font-size: 24px;
  336. color: #3f3d56;
  337. text-align: center;
  338. display: flex;
  339. align-items: center;
  340. justify-content: center;
  341. padding-top: 100px;
  342. &.n_1{
  343. background: url('../../assets/images/sunVillage_info/index_block_01.png') no-repeat center top;
  344. background-size: 50%;
  345. margin-bottom: 20PX;
  346. }
  347. &.n_2{
  348. background: url('../../assets/images/sunVillage_info/index_block_02.png') no-repeat center top;
  349. background-size: 50%;
  350. margin-bottom: 20PX;
  351. }
  352. &.n_3 {
  353. background: url('../../assets/images/sunVillage_info/index_block_03.png') no-repeat center top;
  354. background-size: 50%;
  355. margin-bottom: 20PX;
  356. }
  357. &.n_4 {
  358. background: url('../../assets/images/sunVillage_info/index_block_04.png') no-repeat center top;
  359. background-size: 50%;
  360. margin-bottom: 20PX;
  361. }
  362. &.n_5 {
  363. background: url('../../assets/images/sunVillage_info/index_block_05.png') no-repeat center top;
  364. background-size: 50%;
  365. margin-bottom: 20PX;
  366. }
  367. &.n_6 {
  368. background: url('../../assets/images/sunVillage_info/index_block_06.png') no-repeat center top;
  369. background-size: 50%;
  370. margin-bottom: 20PX;
  371. }
  372. &.n_7 {
  373. background: url('../../assets/images/sunVillage_info/index_block_07.png') no-repeat center top;
  374. background-size: 50%;
  375. margin-bottom: 20PX;
  376. }
  377. &.n_8 {
  378. background: url('../../assets/images/sunVillage_info/index_block_08.png') no-repeat center top;
  379. background-size: 50%;
  380. margin-bottom: 20PX;
  381. }
  382. &.n_9 {
  383. background: url('../../assets/images/sunVillage_info/index_block_09.png') no-repeat center top;
  384. background-size: 50%;
  385. margin-bottom: 20PX;
  386. }
  387. &.n_10 {
  388. background: url('../../assets/images/sunVillage_info/index_block_10.png') no-repeat center top;
  389. background-size: 50%;
  390. margin-bottom: 20PX;
  391. }
  392. &.n_11 {
  393. background: url('../../assets/images/sunVillage_info/index_block_11.png') no-repeat center top;
  394. background-size: 50%;
  395. margin-bottom: 20PX;
  396. }
  397. &.n_12 {
  398. background: url('../../assets/images/sunVillage_info/index_block_12.png') no-repeat center top;
  399. background-size: 50%;
  400. margin-bottom: 20PX;
  401. }
  402. &.n_13 {
  403. background-size: 50%;
  404. margin-bottom: 20PX;
  405. }
  406. &.n_14 {
  407. background: url('../../assets/images/sunVillage_info/index_block_14.png') no-repeat center top;
  408. background-size: 50%;
  409. margin-bottom: 20PX;
  410. }
  411. &.n_01 {
  412. background: url('../../assets/images/sunVillage_info/index_icon_01.png') no-repeat center top;
  413. background-size: 50%;
  414. margin-bottom: 20PX;
  415. }
  416. &.n_02 {
  417. background: url('../../assets/images/sunVillage_info/index_icon_02.png') no-repeat center top;
  418. background-size: 50%;
  419. margin-bottom: 20PX;
  420. }
  421. &.n_03 {
  422. background: url('../../assets/images/sunVillage_info/index_icon_03.png') no-repeat center top;
  423. background-size: 50%;
  424. margin-bottom: 20PX;
  425. }
  426. &.n_04 {
  427. background: url('../../assets/images/sunVillage_info/index_icon_04.png') no-repeat center top;
  428. background-size: 50%;
  429. margin-bottom: 20PX;
  430. }
  431. &.n_05 {
  432. background: url('../../assets/images/sunVillage_info/index_icon_05.png') no-repeat center top;
  433. background-size: 50%;
  434. margin-bottom: 20PX;
  435. }
  436. &.n_06 {
  437. background: url('../../assets/images/sunVillage_info/index_icon_06.png') no-repeat center top;
  438. background-size: 50%;
  439. margin-bottom: 20PX;
  440. }
  441. &.n_07 {
  442. background: url('../../assets/images/sunVillage_info/index_icon_07.png') no-repeat center top;
  443. background-size: 50%;
  444. margin-bottom: 20PX;
  445. }
  446. }
  447. .icon{
  448. padding: 15px;
  449. border-radius: 10px;
  450. box-sizing: border-box;
  451. width: 80px;
  452. height: 80px;
  453. text-align:center;
  454. }
  455. .icon img{
  456. width:50px;
  457. }
  458. }
  459. }
  460. .footer{
  461. width: 100%;
  462. font-size: 22px;
  463. color: #3f3d56;
  464. text-align: center;
  465. padding-top: 20px;
  466. padding-bottom: 25PX;
  467. }
  468. }
  469. </style>