zhnghongrui hai 1 ano
pai
achega
b0f4afda83
Modificáronse 4 ficheiros con 65 adicións e 25 borrados
  1. 4 4
      api/common.js
  2. 2 2
      config.js
  3. 1 1
      manifest.json
  4. 58 18
      pages/statistics/statistics.vue

+ 4 - 4
api/common.js

@@ -17,12 +17,12 @@ export function getHistoryDetails(id, name) {
 	})
 }
 //  通过身份查询历史 
-export function gethistoryList(enginType, createBy, pageNum, pageSize) {
-	let enginClassification = 'indoor_engin';
+export function gethistoryList( createBy, pageNum, pageSize) {
+	//let enginClassification = 'indoor_engin';
 	let enginCycle = '0';
 	const data = {
-		enginType,
-		enginClassification,
+		//enginType,
+		//enginClassification,
 		enginCycle,
 		createBy,
 		pageNum,

+ 2 - 2
config.js

@@ -1,8 +1,8 @@
 // 应用全局配置
 module.exports = {
-	// baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
+	baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
 	// baseUrl: 'http://192.168.4.6:8080',
-	baseUrl: 'http://192.168.4.23:8080',
+	//baseUrl: 'http://192.168.4.23:8080',
 	//baseUrl: 'http://192.168.4.11:8080',
 	// baseUrl: 'http://192.168.4.14:8089',
 	baseIconUrl: 'https://www.xcx.cczdsz.cn/app/images/',

+ 1 - 1
manifest.json

@@ -41,7 +41,7 @@
     },
     "quickapp" : {},
     "mp-weixin" : {
-        "appid" : "wx6f1b92a9d915fb4d",
+        "appid" : "wx41e003e1c9067d02",
         "setting" : {
             "urlCheck" : false,
             "es6" : false,

+ 58 - 18
pages/statistics/statistics.vue

@@ -224,12 +224,27 @@
 		<view v-else-if="isLeader=='app_user'">
 
 
-			<lgd-tab v-model="tabIndex" :tabValue="tabValue" @change="changeTab" />
+			
+	<!-- 		<view class="grid-body">
+				<view class="Grid">
+					<view class="Grid-Item" v-for="item in List" :key="item.id" @click="changeTab(item.id)"
+						hover-class="click-hover" hover-start-time="50" hover-stay-time="50"
+						v-if="userRole.includes(item.title)">
+						<button class="icon-item" v-if="item.title == '民用工程'">民用工程</button>
+						<button class="icon-item" v-if="item.title == '工业工程'">工业工程</button>
+						<button class="icon-item" v-if="item.title == '市政工程'">市政工程</button>
+						<button class="icon-item" v-if="item.title == '危险作业工程'">危险作业工程</button>
+						<button class="icon-item" v-if="item.title == '顶管工程'">顶管工程</button>
+						<button class="icon-item" v-if="item.title == '基建工程'">基建工程</button>
+						<button class="icon-item" v-if="item.title == '开栓'">开栓</button>
+					</view>
+				</view>
+			</view> -->
 			<cc-pullScroolView class="pullScrollView" ref="pullScroll" :pullDown="pullDown" :isDownLoading="true">
 				<view class="notice" v-for="(item,index) in list" :key="index">
 					<view class="justify-content" @click="chooseNode(item)">
 						<view class="font-forty">
-							{{item.areaName+item.buildingName+item.unitName+item.houseName}}
+							{{item.areaName+item.buildingName+item.unitName+item.houseName+(item.enginType=='new_built'? '-新建':'-旧改')+'-'+item.enginClassificationName}}
 						</view>
 						<view class="font-twenty-eight gray">
 							{{item.createTime}}
@@ -238,7 +253,6 @@
 				</view>
 			</cc-pullScroolView>
 
-
 			<view class="share">
 				<view :class="{'share-box': shareState}" @click="handleHiddenShare">
 				</view>
@@ -271,7 +285,8 @@
 	} from '@/api/common'
 
 	import {
-		getUserType
+		getUserType,
+		getUserRole
 	} from '@/utils/auth';
 	import {
 		getDicts
@@ -296,6 +311,7 @@
 		},
 		data() {
 			return {
+				userRole: getUserRole(),
 				tabValue: ['旧改', '新建'],
 				tabIndex: 0,
 				isLeader: '',
@@ -341,12 +357,42 @@
 				materialUsageList: [],
 				roomList: [],
 				roomCount: 4,
-				nodeId: ''
+				nodeId: '',
+				// List: [{
+				// 		id: 1,
+				// 		title: '民用工程'
+				// 	},
+				// 	{
+				// 		id: 2,
+				// 		title: '工业工程'
+				// 	},
+				// 	{
+				// 		id: 3,
+				// 		title: '市政工程'
+				// 	},
+				// 	{
+				// 		id: 4,
+				// 		title: '危险作业工程'
+				// 	},
+				// 	{
+				// 		id: 5,
+				// 		title: '顶管工程'
+				// 	},
+				// 	{
+				// 		id: 6,
+				// 		title: '基建工程'
+				// 	},
+				// 	{
+				// 		id: 7,
+				// 		title: '开栓'
+				// 	},
+				// ]
 			}
 		},
 		created() {},
 		onLoad() {
 			this.isLeader = getUserType()
+			this.changeTab();
 
 		},
 
@@ -360,11 +406,7 @@
 				// 显示加载中
 				this.$refs.pullScroll.showUpLoading();
 				this.pageNum++;
-				if (this.tabIndex == 0) {
-					this.requestData();
-				} else {
-					this.requestDataNew();
-				}
+				this.requestData();
 
 			}
 
@@ -667,10 +709,11 @@
 
 				});
 			},
-			changeTab() {
+			changeTab(e) {
 				this.pageSize = 10; // 条数
 				this.totalNum = '';
 				this.pageNum = 1; // 页数
+				this.tabIndex=e;
 				this.requestData();
 
 			},
@@ -679,13 +722,8 @@
 				uni.showLoading()
 
 				let type = ''
-				if (this.tabIndex == 0) {
-					type = 'old_renovation'
-				} else {
-					type = 'new_built'
-
-				}
-				gethistoryList(type, user.state.name, this.pageNum, this.pageSize).then(res => {
+				
+				gethistoryList( user.state.name, this.pageNum, this.pageSize).then(res => {
 
 					this.totalNum = res.total
 
@@ -1072,4 +1110,6 @@
 			border-top: 1rpx solid #E4E7ED;
 		}
 	}
+
+	
 </style>