| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- <template>
- <view class="wrap">
- <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
- @clickLeft="toBack">
- <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
- <text style="color: white;font-size: 1rem;">{{title}}</text>
- </view>
- </uni-nav-bar>
- <view class="container">
- <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text"
- activeColor="#4cd964"></uni-segmented-control>
- <view class="content">
- <view v-show="current === 0">
- <uGroup>
- <uni-table ref="order_table" border stripe type="" emptyText="暂无更多数据">
- <uni-tr>
- <uni-th width="120" align="center"><view style="text-align: center;color: black;">运维人员姓名</view></uni-th>
- <uni-th width="120" align="center"><view style="text-align: center;color: black;">已接工单</view></uni-th>
- <uni-th width="120" align="center"><view style="text-align: center;color: black;">未完成工单</view></uni-th>
- </uni-tr>
- <uni-tr v-for="(item, index) in orderTableData" :key="index">
- <uni-td>
- <view style="text-align: center;">{{ item.servicePersonName }}</view>
- </uni-td>
- <!-- <uni-td>
- <view v-if="item.rtuName" style="text-align: center;">
- {{ item.rtuName }}
- </view>
- <view v-else style="text-align: center;">
- {{ item.rtuCode }}
- </view>
- </uni-td> -->
- <uni-td align="center">
- <view style="text-align: center;color: coral;">{{ item.orderCount }}</view>
- </uni-td>
- <uni-td align="center">
- <view style="text-align: center;color: coral;">{{ item.processingOrderCount }}</view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </uGroup>
- </view>
- <view v-show="current === 1">
- <uGroup>
- <uni-table ref="equipment_inspection_table" border stripe type="" emptyText="暂无更多数据">
- <uni-tr>
- <uni-th width="150" align="center"><view style="text-align: center;color: black;">运维人员姓名</view></uni-th>
- <uni-th align="center"><view style="text-align: center;color: black;">已完成巡检任务</view></uni-th>
- <!-- <uni-th width="120" align="center">降水量</uni-th> -->
- </uni-tr>
- <uni-tr v-for="(item, index) in equipmentInspectionTableData" :key="index">
- <uni-td>
- <view style="text-align: center;">{{ item.servicePersonName }}</view>
- </uni-td>
- <!-- <uni-td>
- <view v-if="item.rtuName" style="text-align: center;">
- {{ item.rtuName }}
- </view>
- <view v-else style="text-align: center;">
- {{ item.rtuCode }}
- </view>
- </uni-td> -->
- <uni-td align="center">
- <view style="text-align: center;color: coral;">{{ item.completeCount }}</view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </uGroup>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
- import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
- import uGroup from '@/uni_modules/uni-group/uni-group.vue'
- import uSection from '@/uni_modules/uni-section/uni-section.vue'
- import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
- import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
- import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
- import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
- import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
- import uSegmentedControl from '@/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue'
- import uniTable from '@/uni_modules/uni-table/components/uni-table/uni-table.vue'
- import http from '@/http/api.js';
- export default {
- components: {
- uNavBar,
- uList,
- uListItem,
- uIcons,
- uGroup,
- uPagination,
- uBreadcrumb,
- uSection,
- uDataPicker,
- uSegmentedControl,
- uniTable
- },
- onLoad(option) {
-
- },
- data() {
- return {
- list: [],
- title: '统计报表',
- items: ['工单统计', '巡检统计'],
- current: 0,
- desc: '',
- orderTableData: [],
- equipmentInspectionTableData: [],
- pageSize: 10,
- // 当前页
- pageCurrent: 1,
- // 数据总量
- total: 0,
- orgId: '',
- projectId: '',
- projectTree: [],
- selectedTreeNode: '',
- searchVal: '',
- }
- },
- computed: {
- getIcon() {
- return path => {
- return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
- }
- },
- },
- onShow() {
- this.getOrderList();
- this.getInspectionCountList();
- },
- methods: {
- toBack() {
- uni.navigateBack({
- delta: 1
- })
- },
- onClickItem(e) {
- if (this.current != e.currentIndex) {
- this.current = e.currentIndex;
- }
- },
- // 分页触发
- change(e) {
- //this.$refs.table.clearSelection()
- //this.selectedIndexs.length = 0
- this.pageCurrent = e.current;
- this.getOrderList()
- },
- onnodeclick(node) {
- if (node.projectId != null) {
- this.orgId = node.orgId;
- this.projectId = node.projectId;
- this.searchVal = '';
- this.pageCurrent = 1;
- this.getOrderList();
- }
- },
- onpopupopened(e) {
- },
- onpopupclosed(e) {
- },
- onchange(e) {
- },
- search(res) {
- this.getOrderList();
- },
- input(res) {
- },
- clear(res) {
- this.searchVal = '';
- this.getOrderList();
- },
- blur(res) {},
- focus(e) {},
- cancel(res) {
- this.searchVal = '';
- this.getOrderList();
- },
- onBackPress() {
- // #ifdef APP-PLUS
- plus.key.hideSoftKeybord();
- // #endif
- },
- getProjectTree() {
- var that = this;
- http.request({
- url: '/galaxy-test/rtu/manage/tree',
- method: 'GET',
- }).then(res => {
- console.log(res)
- if (res.data != null) {
- that.projectTree = res.data;
- that.selectedTreeNode = that.projectTree[0].value;
- that.orgId = that.projectTree[0].orgId;
- that.projectId = that.projectTree[0].projectId;
- that.getOrderList();
- }
- }).catch(err => {
- console.log(err)
- })
- },
- getOrderList() {
- var that = this;
- http.request({
- url: '/galaxy-test/rtu/check/order/statistics',
- method: 'GET',
- }).then(res => {
- if (res.data != null) {
- that.orderTableData = res.data;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- getInspectionCountList() {
- var that = this;
- http.request({
- url: '/galaxy-test/equipment/inspection/statistics',
- method: 'GET',
- }).then(res => {
- if (res.data != null) {
- that.equipmentInspectionTableData = res.data;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- toDetailPage(id) {
- var url = '/pages/check-order/orderprocessrecord?id=' + id;
- uni.navigateTo({
- url: url
- })
- },
- toOrderReport(id) {
- var url = '/pages/check-order/orderprocesslist?id=' + id;
- uni.navigateTo({
- url: url
- })
- },
- toOrderConfirm(id) {
- var that = this;
- uni.showModal({
- content: '确定进行接单确认操作?',
- showCancel: true,
- success(res) {
- if (res.confirm) {
- var postData2 = {};
- postData2['id'] = id;
- http.request({
- url: '/galaxy-test/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/orderprocesslist?id=' + id;
- uni.navigateTo({
- url: url
- })
- }
- }
- });
- }
- }).catch(err => {
- console.log(err)
- })
- }
- }
- });
- },
- toLocation(item) {
- let lat = item.lat;
- let lng = item.lng;
- let name = item.rtuName;
- let add = item.locationDesc;
- uni.openLocation({
- latitude: Number(lat),
- longitude: Number(lng),
- name: name,
- address: "",
- success() {}
- })
- },
- }
- }
- </script>
- <style>
- </style>
- <style lang="scss" scoped>
- .container {
- padding: 0 0 100rpx;
- }
- .u-cell-icon {
- width: 36rpx;
- height: 36rpx;
- margin-right: 8rpx;
- }
- .slot-box {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- }
- .slot-image {
- /* #ifndef APP-NVUE */
- display: block;
- /* #endif */
- //margin-right: 10px;
- width: 20px;
- height: 20px;
- }
- .order-title-image {
- /* #ifndef APP-NVUE */
- display: block;
- /* #endif */
- // margin-right: 10px;
- width: 20px;
- height: 20px;
- border-radius: 50%;
- }
- .slot-text {
- flex: 1;
- font-size: 14px;
- color: #4cd964;
- margin-right: 10px;
- }
- .content-box {
- flex: 1;
- /* #ifdef APP-NVUE */
- justify-content: center;
- /* #endif */
- height: 100%;
- line-height: 44px;
- padding: 0 15px;
- position: relative;
- background-color: #fff;
- border-bottom-color: #f5f5f5;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- }
- .content-text {
- font-size: 15px;
- }
- .example-body {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: center;
- padding: 10px 0;
- background-color: #fff;
- }
- .button {
- border-color: #e5e5e5;
- border-style: solid;
- border-width: 1px;
- padding: 4px 8px;
- border-radius: 4px;
- }
- .button-text {
- font-size: 15px;
- }
- .slot-button {
- /* #ifndef APP-NVUE */
- display: flex;
- height: 100%;
- /* #endif */
- flex: 1;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- padding: 0 20px;
- background-color: #ff5a5f;
- }
- .slot-button-text {
- color: #ffffff;
- font-size: 14px;
- }
- </style>
|