| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <!--
- * @Title:
- * @Description: 测站基础信息
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="wrap">
- <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
- @clickLeft="toBack">
- <view class="nav-title">
- <text>{{title}}</text>
- </view>
- </uni-nav-bar>
- <view class="container">
- <uni-section title="测站信息" titleFontSize="0.8rem" type="line">
- <uni-card :is-shadow="false">
- <view style="width: 100%;padding-left: 0px;padding-right: 10px;">
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">测站名称:</view>
- <view style="font-size: 0.7rem;color: gray;">{{orderInfo.rtuName}}</view>
- </view>
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">测站编码:</view>
- <view style="font-size: 0.7rem;color: gray;">{{orderInfo.rtuCode}}</view>
- </view>
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">测站类型:</view>
- <view style="display: flex;flex-direction: row;align-items: center;">
- <view v-if="orderInfo.isRain ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">雨量站</view>
- <view v-if="orderInfo.isRiver ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位站</view>
- <view v-else-if="orderInfo.isRes ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位站</view>
- <view v-if="orderInfo.isGround ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">墒情站</view>
- </view>
- </view>
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">行政区划:</view>
- <view style="font-size: 0.7rem;color: gray;">{{orderInfo.adCity}}/{{orderInfo.adDist}}
- </view>
- </view>
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">经纬度:</view>
- <view style="display: flex;flex-direction: row;align-items: center;">
- <view style="margin-right: 5px;font-size: 0.7rem;color: gray;">经度:{{orderInfo.lng}}
- </view>
- <view style="margin-right: 5px;font-size: 0.7rem;color: gray;">纬度:{{orderInfo.lat}}
- </view>
- </view>
- </view>
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">安装位置:</view>
- <view style="font-size: 0.7rem;color: gray;">{{orderInfo.locationDesc}}</view>
- </view>
- </view>
- </uni-card>
- </uni-section>
- <uni-section title="测站数据" titleFontSize="0.8rem" type="line">
- <uni-card :is-shadow="false">
- <view style="width: 100%;padding-left: 0px;padding-right: 10px;">
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">最近上报数据:</view>
- <view style="display: flex;flex-direction: row;align-items: center;">
- <view v-if="orderInfo.isRain ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">降水:{{orderInfo.drp}}</view>
- <view v-if="orderInfo.isRiver ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位:{{orderInfo.z}}</view>
- <view v-else-if="orderInfo.isRes ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">水位:{{orderInfo.rz}}
- </view>
- <view v-if="orderInfo.isGround ==1"
- style="margin-right: 5px;font-size: 0.7rem;color: gray;">墒情:</view>
- </view>
- </view>
- <view style="margin-top: 5px;display: flex;flex-direction: column;">
- <view style="font-size: 0.7rem;color: black;">最近上报时间:</view>
- <view style="font-size: 0.7rem;color: gray;">{{orderInfo.lastUpTime}}</view>
- </view>
- </view>
- </uni-card>
- </uni-section>
- </view>
- </view>
- </template>
- <script>
- import {
- role
- } from "@/api/role.js";
- import http from '@/http/api.js';
- export default {
- components: {},
- onLoad(option) {
- this.rtuCode = option.rtuCode;
- if (this.userInfo.role_name === role['admin']) {
- this.permission.admin = true;
- } else if (this.userInfo.role_name === role['orgAdmin']) {
- this.permission.orgAdmin = true;
- } else if (this.userInfo.role_name === role['companyAdmin']) {
- this.permission.companyAdmin = true;
- } else if (this.userInfo.role_name === role['companyServciePerson']) {
- this.permission.companyServciePerson = true;
- }
- this.getOrderInfo();
- },
- data() {
- return {
- permission: {
- 'admin': false,
- 'orgAdmin': false,
- 'companyAdmin': false,
- 'companyServciePerson': false,
- },
- rtuCode: '',
- orderInfo: {
- },
- title: '测站基础信息',
- }
- },
- computed: {},
- onShow() {
- this.getOrderInfo();
- },
- created() {},
- methods: {
- toBack() {
- uni.navigateBack({
- delta: 1
- })
- },
- // 分页触发
- change(e) {
- this.selectedIndexs.length = 0
- this.pageCurrent = e.current;
- this.getOrderList()
- },
- getOrderInfo() {
- var that = this;
- var postData = {};
- postData['rtuCode'] = this.rtuCode;
- http.request({
- url: '/galaxy-business/rtu/base/detail',
- method: 'GET',
- data: postData
- }).then(res => {
- console.log(res)
- if (res.data != null) {
- that.orderInfo = res.data;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- toOrderConfirm() {
- var that = this;
- uni.showModal({
- content: '确定进行维修确认操作?',
- showCancel: true,
- success(res) {
- if (res.confirm) {
- var postData2 = {};
- postData2['id'] = that.orderId;
- http.request({
- url: '/galaxy-business/rtu/check/order/confirm',
- method: 'POST',
- data: postData2
- }).then(res => {
- console.log(res)
- if (res.success) {
- uni.showModal({
- content: '确认已成功,是否立即填报?',
- showCancel: true,
- success(res) {
- if (res.confirm) {
- var url =
- '/pages/check-order/orderprocessreport?orderId=' +
- that.orderId;
- uni.navigateTo({
- url: url
- })
- }
- }
- });
- }
- }).catch(err => {
- console.log(err)
- })
- }
- }
- });
- },
- toOrderProcessReport() {
- var url = '/pages/check-order/orderprocessreport?orderId=' + this.orderId;
- uni.navigateTo({
- url: url
- })
- },
- }
- }
- </script>
- <style>
- /* page {
- background-color: rgb(240, 242, 244);
- } */
- </style>
- <style lang="scss" scoped>
- </style>
|