| | |
| | | getDic |
| | | } from '@/utils/login.js' // 配置文件 |
| | | import store from '@/store/index.js' |
| | | import routingIntercept from '@/utils/permission.js' |
| | | import { |
| | | httpPost, |
| | | httpGet |
| | |
| | | console.log('optionsonShow', options) |
| | | if (options.scene === 1007 || options.scene === 1014 || options.scene === 1008) { |
| | | // 通过单人聊天会话分享进入 |
| | | this.getWXCode() |
| | | // this.getWXCode() |
| | | } |
| | | }, |
| | | onLaunch() { |
| | | // 自动登录检测 |
| | | let token = uni.getStorageSync('token') |
| | | console.log('apptoken', token) |
| | | console.log('apptoken1', !token) |
| | | if (!token) { |
| | | uni.login({ |
| | | provider: 'weixin', |
| | | success: loginRes => { |
| | | console.log('loginRes', loginRes) |
| | | console.log('loginRes1', loginRes) |
| | | httpGet('/AppUser/wx/login', { |
| | | 'code': loginRes.code |
| | | }).then(result => { |
| | | routingIntercept() |
| | | console.log('AppUser1', result) |
| | | try { |
| | | if (result.data.code === 0) { |
| | | uni.clearStorageSync() |
| | |
| | | * |
| | | */ |
| | | getWXCode() { |
| | | let token = uni.getStorageSync('token') |
| | | console.log('apptoken', token) |
| | | if (!token) { |
| | | uni.login({ |
| | | provider: 'weixin', |
| | | success: loginRes => { |
| | | console.log('loginRes', loginRes) |
| | | httpGet('/AppUser/wx/login', { |
| | | 'code': loginRes.code |
| | | }).then(result => { |
| | | routingIntercept() |
| | | try { |
| | | if (result.data.code === 0) { |
| | | uni.clearStorageSync() |
| | | uni.setStorageSync('userInfor', JSON.stringify(result.data)) |
| | | uni.setStorageSync('tonken', result.data.token) |
| | | uni.setStorageSync('openId', result.data.openId) |
| | | getDic() |
| | | this.$isResolve() |
| | | } else { |
| | | uni.clearStorageSync() |
| | | uni.setStorageSync('openId', result.data.openId) |
| | | uni.showModal({ |
| | | title: '未登录', |
| | | content: '您未登录,需要登录后才能继续', |
| | | showCancel: false, |
| | | confirmText: '确定', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | uni.reLaunch({ |
| | | url: '/pages/login/login', |
| | | }) |
| | | } |
| | | }, |
| | | }) |
| | | this.$isResolve() |
| | | } |
| | | } catch (e) { |
| | | console.error(e) |
| | | uni.login({ |
| | | provider: 'weixin', |
| | | success: loginRes => { |
| | | console.log('loginRes2', loginRes) |
| | | httpGet('/AppUser/wx/login', { |
| | | 'code': loginRes.code |
| | | }).then(result => { |
| | | console.log('AppUser2', result) |
| | | try { |
| | | if (result.data.code === 0) { |
| | | uni.clearStorageSync() |
| | | uni.setStorageSync('userInfor', JSON.stringify(result.data)) |
| | | uni.setStorageSync('tonken', result.data.token) |
| | | uni.setStorageSync('openId', result.data.openId) |
| | | getDic() |
| | | this.$isResolve() |
| | | } else { |
| | | uni.clearStorageSync() |
| | | uni.setStorageSync('openId', result.data.openId) |
| | | uni.showModal({ |
| | | title: '未登录', |
| | | content: '您未登录,需要登录后才能继续', |
| | | showCancel: false, |
| | | confirmText: '确定', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | uni.reLaunch({ |
| | | url: '/pages/login/login', |
| | | }) |
| | | } |
| | | }, |
| | | }) |
| | | this.$isResolve() |
| | | } |
| | | }).catch(errors => { |
| | | console.log('appdddd', errors) |
| | | uni.showToast({ |
| | | title: errors, |
| | | icon: 'none', |
| | | }) |
| | | this.$isResolve() |
| | | } catch (e) { |
| | | console.error(e) |
| | | } |
| | | }).catch(errors => { |
| | | console.log('appdddd2', errors) |
| | | uni.showToast({ |
| | | title: errors, |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$isResolve() |
| | | } |
| | | this.$isResolve() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getLogin(data) { |
| | | // 调用接口。将登录code传给后端进行判断 |
| | |
| | | <uni-datetime-picker v-model="range" type="daterange" rangeSeparator="至" /> |
| | | </view> |
| | | <view> |
| | | <u-button type="primary" size="small" text="查询" @click="getWorkOrder"></u-button> |
| | | <u-button type="primary" size="small" text="查询" @click="getSearch" throttleTime='500'></u-button> |
| | | </view> |
| | | </view> |
| | | <view :key="index" v-for="(item, index) in workOderList" class="workOrderDetail" |
| | |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">上报单位:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ unitList.find( |
| | | (a) => |
| | | item && parseInt(a.unitId) === item.escalationUnitId |
| | | ).unitName |
| | | }} |
| | | {{ item.escalationUnitName}} |
| | | </text> |
| | | </view> |
| | | </view> |
| | |
| | | currentPage: 1, |
| | | pageSize: 10 |
| | | } |
| | | this.workOderList = [] |
| | | this.startTime = '' |
| | | this.endTime = '' |
| | | uni.$u.throttle(this.getWorkOrder, 500) |
| | | }, |
| | | getSearch() { |
| | | this.workOderList = [] |
| | | this.page = { |
| | | currentPage: 1, |
| | | pageSize: 10 |
| | | } |
| | | this.getWorkOrder() |
| | | }, |
| | | // 获取责任单位list |
| | |
| | | this.isLoading = true |
| | | this.status = 'loadmore' |
| | | } |
| | | if (this.page.currentPage === res.data.page.currentPage) { |
| | | this.workOderList = res.data.list |
| | | } else { |
| | | res.data.list.forEach(el => { |
| | | this.workOderList.push(el) |
| | | }) |
| | | } |
| | | res.data.list.forEach(el => { |
| | | this.workOderList.push(el) |
| | | }) |
| | | } else { |
| | | this.status = 'nomore' |
| | | } |
| | | }) |
| | | }, |
| | | handleClick(e, pageState) { |
| | | this.$http.httpGet('/allocation/detail', { |
| | | id: e.allocationId |
| | | }).then(res => { |
| | | let data = res.data |
| | | data.pageState = e.stateName === '待处理' ? pageState : 'view' |
| | | data.stateName = e.stateName |
| | | let myData = JSON.stringify(data) |
| | | uni.navigateTo({ |
| | | url: '/pages/actionChange/workOrderDetails/index?infor=' + myData + '&type=jump', |
| | | }) |
| | | let data = {} |
| | | data.pageState = e.stateName === '待处理' ? pageState : 'view' |
| | | data.stateName = e.stateName |
| | | data.allocationId = e.allocationId |
| | | data.state = e.state |
| | | data.allocationNum = e.allocationNum |
| | | let myData = JSON.stringify(data) |
| | | uni.navigateTo({ |
| | | url: '/pages/actionChange/workOrderDetails/index?infor=' + myData + '&type=jump', |
| | | }) |
| | | }, |
| | | }, |
| | |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">责任主体:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ unitName }} |
| | | {{ basicInfor.unitName }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">污染分类:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ polluteType }} |
| | | {{ basicInfor.polluteTypeName }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="wholeLine"> |
| | | <text class="rowTipContenetLabel">上报单位:</text> |
| | | <text class="rowTipContenetAll"> |
| | | {{ escalationUnitName }} |
| | | {{ basicInfor.escalationUnitName }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | |
| | | baseUrl: this.$storage.get('baseUrl'), |
| | | } |
| | | }, |
| | | computed: { |
| | | unitName() { |
| | | let data = '' |
| | | if (this.basicInfor.unitId && this.unitList.length > 0) { |
| | | data = this.unitList && this.unitList.find(a => Number(a.unitId) === Number(this.basicInfor.unitId)) |
| | | .unitName |
| | | } |
| | | return data |
| | | }, |
| | | escalationUnitName() { |
| | | let data = '' |
| | | if (this.basicInfor.unitId && this.unitList.length > 0) { |
| | | data = this.unitList && this.unitList.find(a => Number(a.unitId) === Number(this.basicInfor |
| | | .escalationUnitId)).unitName |
| | | } |
| | | return data |
| | | }, |
| | | polluteType() { |
| | | let data = '' |
| | | console.log('this.polluteList', this.polluteList) |
| | | console.log('this.basicInfor.polluteType', this.basicInfor.polluteType) |
| | | if (String(this.basicInfor.polluteType) && this.polluteList.length > 0) { |
| | | data = this.polluteList.find(a => Number(a.dataKey) === Number(this.basicInfor.polluteType)).dataValue |
| | | } |
| | | console.log('data', data) |
| | | return data |
| | | } |
| | | }, |
| | | computed: {}, |
| | | watch: { |
| | | basicInfor: { |
| | | handler: function(newValue, oldValue) { |
| | |
| | | <u-form-item label="是否整改:" :required="!pageState" :border-bottom="false"> |
| | | <u-radio-group v-model="form.isChange" @change="radioGroupChange"> |
| | | <u-radio :key="index" v-for="(item, index) in list" |
| | | :custom-style="{marginRight: '8px'}" :label="item.name" |
| | | :custom-style="{marginRight: '16px'}" :label="item.name" |
| | | :name="item.value" /> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | |
| | | </view> |
| | | </u-form-item> |
| | | </u-form> |
| | | <u-picker :show="showCheckBox" keyName="label" :columns="actionOptionList" @cancel="showCheckBox = false" |
| | | :immediateChange='true' @confirm="selectBack"></u-picker> |
| | | <u-picker v-if="showCheckBox" :show="showCheckBox" keyName="label" :columns="actionOptionList" |
| | | @cancel="showCheckBox = false" :default-selector="[0]" :immediateChange='true' |
| | | @confirm="selectBack"></u-picker> |
| | | <!-- <u-action-sheet v-if="actionOptionList.length > 0" :actions="actionOptionList" :show="showCheckBox" title="请选择" |
| | | @close="showCheckBox = false" @select="selectBack" /> --> |
| | | <view class="bunts"> |
| | |
| | | <view class="mainContent"> |
| | | <basicInfor :basic-infor="basicInfor" v-if="isShow" /> |
| | | <rectificationInfor ref="rectificationInfor" :basic-infor="basicInfor" |
| | | v-if="!(pageState === 'view' && basicInfor.state === 20)" /> |
| | | <approvalnfor ref="approvalnfor" v-if="basicInfor.state >= 30 && basicInfor.stateName!=='待完成'" |
| | | v-if="!(pageState === 'view' && basicInfor.state === 20)&&isShow" /> |
| | | <approvalnfor ref="approvalnfor" v-if="basicInfor.state >= 30 && basicInfor.stateName!=='待完成' && isShow" |
| | | :basic-infor="basicInfor" /> |
| | | <view class="bunts"> |
| | | <view class="bunts" v-if="isShow"> |
| | | <view class="but butRight"> |
| | | <u-button shape="square" @click="refuse" type="error" |
| | | v-if="pageState==='edit'&& basicInfor.state >= 30">拒绝</u-button> |
| | |
| | | basicInfor: {}, |
| | | unitListL: [], |
| | | userInfor: null, |
| | | show: false, |
| | | show: true, |
| | | isShow: false, |
| | | option: {} |
| | | } |
| | |
| | | created() { |
| | | this.getUnitList() |
| | | }, |
| | | onLoad: function(option) { |
| | | onLoad(option) { |
| | | //option为object类型,会序列化上个页面传递的参数 |
| | | this.basicInfor = JSON.parse(option.infor) |
| | | // let type = JSON.parse(option.type) |
| | |
| | | this.option = option |
| | | }, |
| | | async mounted() { |
| | | //等待登录成功 |
| | | await this.$onLaunched |
| | | //等待登录成功 |
| | | this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null') |
| | | console.log('详情页的用户信息', this.userInfor) |
| | | if (this.option.type === 'share' && this.userInfor) { |
| | |
| | | // 可以编辑 |
| | | this.basicInfor.pageState = 'edit' |
| | | this.basicInfor.stateName = res.data.name |
| | | this.isShow = true |
| | | this.getData() |
| | | } else if (res.data.code === 2) { |
| | | // 可以看 |
| | | this.isShow = true |
| | | this.basicInfor.pageState = 'view' |
| | | this.basicInfor.stateName = res.data.name |
| | | this.getData() |
| | | } |
| | | }).catch(errors => { |
| | | console.log('获取失败的信息', errors) |
| | |
| | | }) |
| | | } else { |
| | | this.isShow = true |
| | | this.getData() |
| | | } |
| | | console.log('this.basicInfor123', this.basicInfor) |
| | | }, |
| | | methods: { |
| | | closePop() {}, |
| | | getData() { |
| | | this.$http.httpGet('/allocation/detail', { |
| | | id: this.basicInfor.allocationId |
| | | }).then(res => { |
| | | this.isShow = true |
| | | this.show = false |
| | | this.basicInfor = { |
| | | ...this.basicInfor, |
| | | ...res.data |
| | | } |
| | | }) |
| | | }, |
| | | getUnitList() { |
| | | this.$http.httpGet('/allocation/unit').then(res => { |
| | | this.unitList = res.data |
| | |
| | | myInfor, |
| | | tabBar |
| | | }, |
| | | onLoad(option) {}, |
| | | async onLoad() { |
| | | await this.$onLaunched |
| | | this.getData() |
| | | }, |
| | | onReady() {}, |
| | | onShow() { |
| | | this.currIndex = '0' |
| | | this.showTabBar = true |
| | | }, |
| | | async mounted() { |
| | | mounted() { |
| | | //等待登录成功 |
| | | await this.$onLaunched |
| | | this.token = uni.getStorageSync('tonken') |
| | | console.log('已经进了index页面了', this.token) |
| | | this.loading = false |
| | | this.getData() |
| | | uni.$on('currIndex', data => { |
| | | console.log('currIndexOn', data) |
| | | this.currIndex = data.data.index |
| | |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | console.log('获取数据') |
| | | this.$refs.agencyPage.getContaminateList() |
| | | }, |
| | | handleChangeTabe(index) { |