| | |
| | | }, |
| | | screenHeight: "", |
| | | loginType: 1, //登录类型 1账号密码 2 一键登录 |
| | | isAgreement: true |
| | | isAgreement: true, |
| | | pageType: "" |
| | | } |
| | | }, |
| | | |
| | | onLoad(option) { |
| | | console.log(option); |
| | | if (option.type) { |
| | | //type 1 安全隐患 2 矛盾纠纷 3 护学打卡 |
| | | //type 1 安全隐患 2 矛盾纠纷 3 护学打卡 4校园安保 |
| | | |
| | | uni.setStorageSync("pageType", option.type); |
| | | } |
| | | if (option.code) { |
| | | uni.setStorageSync("houseCode", option.code); |
| | | } |
| | | |
| | | |
| | |
| | | .then(data => { |
| | | uni.setStorageSync("phoneNmber", this.form.phone) |
| | | // this.getUserInfo(data); |
| | | this.$u.func.login(data) |
| | | this.$u.func.login(data, this.pageType) |
| | | }) |
| | | .catch(err => { |
| | | this.$u.func.showToast({ |
| | |
| | | <template> |
| | | <view class="wrap"> |
| | | |
| | | <view class="info-row flex j-c-s-b a-i-c bgc-ff" @click="isShowPopup = true"> |
| | | <view class="info-row flex j-c-s-b a-i-c bgc-ff" @click="isShowPopup = true" v-if="!from"> |
| | | <text class="f-28">场所名称</text> |
| | | <view class="flex"> |
| | | <text class="mr-10">{{selectedPlace.placeName}}</text> |
| | |
| | | updatePlaceCheck, |
| | | auditPlaceCheck |
| | | } from "@/api/reporting/reporting.js" |
| | | |
| | | import { |
| | | getQrCodeDetail |
| | | } from "@/api/system/index" |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | data() { |
| | |
| | | isShowPopup: false, |
| | | selectedPlace: {}, |
| | | placeList: [], |
| | | placeName: "" |
| | | placeName: "", |
| | | from: "" //页面进入来源 |
| | | } |
| | | }, |
| | | async onLoad(option) { |
| | |
| | | this.isEdit = true; |
| | | this.getDetail(option.taskId) |
| | | } else { |
| | | this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427"; |
| | | this.info.placeName = "校学小学场所" |
| | | // this.info.houseCode = uni.getStorageSync("siteInfo").houseCode; |
| | | // this.info.placeName = uni.getStorageSync("siteInfo").name; |
| | | if (uni.getStorageSync("houseCode")) { |
| | | let houseCode = uni.getStorageSync("houseCode"); |
| | | this.getHouseType(houseCode); |
| | | } else { |
| | | this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427"; |
| | | this.info.placeName = "校学小学场所" |
| | | } |
| | | } |
| | | this.getPlaceList(); |
| | | // if (option.houseCode) { |
| | | // this.info.houseCode = option.houseCode; |
| | | // } |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | getPlaceList() { |
| | | getLocationRecord({ |
| | | roleName: uni.getStorageSync('activeRole').roleName, |
| | |
| | | this.selectedPlace = item; |
| | | this.info.houseCode = item.houseCode; |
| | | this.isShowPopup = false; |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | getHouseType(code) { |
| | | getQrCodeDetail({ |
| | | roleName: uni.getStorageSync("activeRole").roleName, |
| | | addressCode: code |
| | | }).then(res => { |
| | | let { |
| | | isJur, |
| | | doorplateType, |
| | | addressLevel |
| | | } = res.data; |
| | | if (isJur == 1) { |
| | | if (doorplateType == "中门牌" || doorplateType == "小门牌") { |
| | | if (res.data.labelCode == 160102 || res.data.labelCode == 160103) { |
| | | this.info.houseCode = code; |
| | | this.info.placeName = poi; |
| | | this.from = "jump" |
| | | } else { |
| | | this.$showTips("该场所不是校园类型"); |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示!", |
| | | content: "该区域不是您管辖范围", |
| | | showCancel: false |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | async getAllBizDict() { |
| | | |
| | | //反诈类别 |
| | | |
| | | await this.getBizDict('hiddenDangerType', this.troubleTypeList); |
| | | }, |
| | | |
| | |
| | | const install = (Vue, vm) => { |
| | | |
| | | // 登录操作 1 |
| | | const login = async (userInfo) => { |
| | | const login = async (userInfo, pageType) => { |
| | | vm.$u.vuex('userInfo', userInfo) |
| | | vm.$u.vuex('accessToken', userInfo.access_token) |
| | | vm.$u.vuex('isLogin', true) |
| | |
| | | let appMenu = data.filter(e => e.name == 'app')[0].children |
| | | console.log("当前角色菜单:", appMenu) |
| | | store.commit('SET_MENU', appMenu) |
| | | |
| | | //跳转到首页 |
| | | uni.switchTab({ |
| | | url: '/pages/home/index' |
| | | }) |
| | | if (pageType == 4 && resDetail.data.roleAlias == "mj") { |
| | | uni.navigateTo({ |
| | | url: '/subPackage/school/security' |
| | | }) |
| | | } else { |
| | | //跳转到首页 |
| | | uni.switchTab({ |
| | | url: '/pages/home/index' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | if (uni.getStorageSync("pageType")) { |
| | | uni.removeStorageSync("pageType") |
| | | } |
| | | |
| | | if (uni.getStorageSync("houseCode")) { |
| | | uni.removeStorageSync("houseCode") |
| | | } |
| | | uni.redirectTo({ |
| | | url: '/pages/login/login-account' |
| | | }) |