Browse Source

vant 框架引入

maxiaoxiao 2 months ago
parent
commit
dfa97d74c6
6 changed files with 21 additions and 152 deletions
  1. 3 1
      App.vue
  2. 10 0
      api/dkjbxx.js
  3. 6 0
      main.js
  4. 2 1
      package.json
  5. 0 150
      pages/index/index.vue
  6. 0 0
      测试文件.txt

+ 3 - 1
App.vue

@@ -30,5 +30,7 @@
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-  @import '@/static/scss/index.scss'
+  @import '@/static/scss/index.scss';
+  @import 'vant/lib/index.css';
 </style>
 </style>
+

+ 10 - 0
api/dkjbxx.js

@@ -2,6 +2,16 @@
 
 
 import request from '@/utils/request'
 import request from '@/utils/request'
 
 
+//查询外业个人汇总列表
+export function getHcCount(params) {
+  return request({
+    url: '/rsmonitoring/fieldwork/hc/count',
+    method: 'get',
+    params
+  })
+}
+
+
 // 查询地块基本信息(DKJBXX)列表
 // 查询地块基本信息(DKJBXX)列表
 export function listDkjbxx(data) {
 export function listDkjbxx(data) {
   return request({
   return request({

+ 6 - 0
main.js

@@ -5,6 +5,12 @@ import plugins from './plugins' // plugins
 import './permission' // permission
 import './permission' // permission
 Vue.use(plugins)
 Vue.use(plugins)
 
 
+import Vant from 'vant';
+// import 'vant/lib/index.css';
+Vue.use(Vant)
+
+
+
 Vue.config.productionTip = false
 Vue.config.productionTip = false
 Vue.prototype.$store = store
 Vue.prototype.$store = store
 
 

+ 2 - 1
package.json

@@ -14,6 +14,7 @@
     "gcoord": "^1.0.6",
     "gcoord": "^1.0.6",
     "js-cookie": "3.0.1",
     "js-cookie": "3.0.1",
     "ol": "^10.2.1",
     "ol": "^10.2.1",
-    "vant": "^4.9.7"
+    "postcss-loader": "^8.1.1",
+    "vant": "^2.13.6"
   }
   }
 }
 }

+ 0 - 150
pages/index/index.vue

@@ -1,150 +0,0 @@
-<template>
-	<view class="orderPage">
-		<!-- sticky 
-<uni-segmented-control :current="current" :values="tabOptions" style-type="text"
-					active-color="#007aff" @clickItem="onClickItem" />-->
-		<!-- <van-sticky :offset-top="140">-->
-		<van-tabs v-model="searchForm.basetype" @click="tabList(searchForm.basetype)">
-			<van-tab v-for="(item, key) in tabOptions" :key="key" :name="item.name"
-				:title="`${item.name}(${item.num})`"></van-tab>
-		</van-tabs>
-		<!--</van-sticky>-->
-		<!-- :finished="finished" -->
-		<van-list v-model="loading" :immediate-check="false" :error.sync="error" error-text="请求失败,点击重新加载"
-			finished-text="没有更多了~" @load="getList">
-			<view class="list-item" v-for="(item, key) in pcsjList" :key="key" @click="goDetail(item)">
-				
-				<div>{{ item.dkbh }}</div>
-				<div>监测面积:{{ item.dkmj }}</div>
-				<div>核查截止日期:{{ item.jsdw }}</div>
-				
-			</view>
-		</van-list>
-		<!-- <button type="primary" @click="submit">提交</button> -->
-	</view>
-</template>
-<script>
-	// import { Tabs } from "vant";
-	import {
-		getUserProfile
-	} from "@/api/system/user";
-	import {
-		listDkjbxx
-	} from "@/api/dkjbxx.js";
-	export default {
-		name: "list",
-		components: {},
-		data() {
-			return {
-				activeName: "a",
-				searchForm: {},
-				tabOptions: [{
-						name: "待核查",
-						num: 2,
-					},
-					{
-						name: "核查中",
-						num: 1,
-					},
-					{
-						name: "已核查",
-						num: 1,
-					},
-					{
-						name: "已退回",
-						num: 1,
-					},
-				],
-				queryParams: {
-					pageNum: 1,
-					pageSize: 10,
-					time: ["", ""],
-					startTime: "",
-					endTime: "",
-					auditflowList: [],
-					dkmjbs: "",
-					dkmj: "",
-					descValue: "dkmj",
-					dkbh: "",
-					xzqdm: null,
-				},
-				loading: false,
-				pcsjList: [],
-				total: 0,
-			};
-		},
-		onLoad() {
-			// console.log("aaaa", "00s00s");
-			// this.getUser();
-		},
-		created() {
-			console.log("aaZZaa", "00s00s");
-		},
-		mounted() {
-			console.log("aaaa", "00s00s");
-			this.getList();
-		},
-		onReady() {
-			//this.$refs.form.setRules(this.rules)
-		},
-		methods: {
-			getUser() {
-				getUserProfile().then((response) => {
-					this.user = response.data;
-				});
-			},
-			getList() {
-				this.loading = true;
-				console.log("", "00s00s");
-				listDkjbxx(this.queryParams).then((res) => {
-					console.log(res, "00s00s");
-					this.pcsjList = res.rows;
-					this.total = res.total;
-					this.loading = false;
-				});
-			},
-			//跳转到详情页
-			goDetail(value) {
-				uni.setStorage({
-					key: "my_param",
-					data: value,
-					success: () => {
-						uni.switchTab({
-							url: "/pages/check/index",
-						});
-					},
-				});
-				//   uni.navigateTo({
-				//     url: "/pages/check/index?item=" + value,
-				//   });
-			},
-		},
-	};
-</script>
-
-<style lang="scss">
-	.button {
-		display: flex;
-		align-items: center;
-		height: 35px;
-		line-height: 35px;
-		margin-left: 10px;
-	}
-
-	.orderPage {
-		padding: 30rpx;
-		background: azure;
-		padding-bottom: 50px;
-
-		.list-item {
-			background: #fff;
-			padding: 40rpx 20rpx;
-			border-radius: 20rpx;
-			margin-bottom: 30rpx;
-			position: relative;
-
-
-		
-		}
-	}
-</style>

+ 0 - 0
测试文件.txt