Sfoglia il codice sorgente

主页待办模块跳转以及数据显示

guoqing 2 anni fa
parent
commit
2f4e4d117f

+ 0 - 2
src/views/placeManage/placePersoninfo.vue

@@ -221,12 +221,10 @@ export default {
       //个人数据
       data:{},
     })
-    let id = ref('')
     //数据接收
     const router = useRouter();
     onMounted(()=>{
       var item = JSON.parse(router.currentRoute.value.query.data)
-      console.log(item);
       data.data = item;
     })
     //返回

+ 33 - 13
src/views/tab_a/tabAll.vue

@@ -20,24 +20,24 @@
 		</van-swipe-item>
 	</van-swipe>
 
-	<div class="tabtitlelay">
+	<div class="tabtitlelay" @click="goToBeDone">
 		<div class="tabtitle1"></div>
 		<div class="tabtitle">我的待办</div>
 		<div class="tabtitle2">(</div>
-		<div class="tabtitle3">15</div>
+		<div class="tabtitle3">{{con1+con2}}</div>
 		<div class="tabtitle4">)</div>
-		<van-icon name="ellipsis" class="tabtitle5" @click="goToBeDone" />
+		<van-icon name="ellipsis" class="tabtitle5" />
 	</div>
 
 	<div class="flexll">
-		<div class="ffl2">
-			<div class="textRegular">待处理</div>
+		<div class="ffl2" id="0" @click="goToBeDone($event)"> 
+			<div class="textRegular" >待处理</div>
 			<div class="textRed">{{con1}}</div>
 		</div>
 		<div class="verticalLine"></div>
-		<div class="ffl2">
-			<div class="textRegular">已处理</div>
-			<div class="textBlue">8</div>
+		<div class="ffl2" id="1" @click="goToBeDone($event)">
+			<div class="textRegular" >已处理</div>
+			<div class="textBlue">{{con2}}</div>
 		</div>
 	</div>
 	<div class="hLine"></div>
@@ -76,7 +76,7 @@
 import tool from "@/tool";
 import  qs  from "qs";
 import userSets from "@/api/sys/userSets";
-
+import toBeDone from '@/api/toBeDone/toBeDone';
 	export default {
 		data() {
 			return{
@@ -85,30 +85,50 @@ import userSets from "@/api/sys/userSets";
 				sms:"",
 				password:"",
 				password2:"",
-				con1:"0",
+				con1:0,
+				con2:0,
 				BannerImgurls:['https://img1.baidu.com/it/u=2086445453,3056906789&fm=253&fmt=auto&app=138&f=GIF?w=1378&h=400','https://img1.baidu.com/it/u=2086445453,3056906789&fm=253&fmt=auto&app=138&f=GIF?w=1378&h=400']
 			}
 		},
 
 		created(){
 			let id=this.$route.query.id;
-			window.xm.setNavigationBarTitle({ title: '智慧“和顺”'})
+			// window.xm.setNavigationBarTitle({ title: '智慧“和顺”'})
 			this.TokenLogin2();
+			this.dataNumber();
 		},
 
 		methods:{
-            goToBeDone() {
-              this.$router.push("/toBeDone");
+			// 待办跳转
+            goToBeDone(e) {
+				let value = JSON.stringify(e.currentTarget.id)
+				// console.log(e.currentTarget.id);
+              this.$router.push({
+				path:"/toBeDone",
+				query:{"name":value}
+			  });
             },
+			// 场所登记跳转
 			goPlaceRegister() {
               this.$router.push("/placeRegister");
             },
+			// 人员档案跳转
 			goPlacePerson() {
               this.$router.push("/placePerson");
             },
+			// 牌位管理跳转
 			goPlaceTablet(){
 				this.$router.push("/placeTablet");
 			},
+			//待办数据获取
+			dataNumber(){
+				new toBeDone().list().then((res)=>{
+					this.con1 = res.records.length;
+				})
+				new toBeDone().list2().then((res1)=>{
+					this.con2 = res1.records.length;
+				})
+			},
 			onClickLeft(){
 				history.back();
 			},

+ 11 - 3
src/views/toBeDone/toBeDone.vue

@@ -60,7 +60,7 @@
 </template>
 
 <script>
-import {reactive,ref} from "vue"
+import {onMounted,reactive,ref} from "vue"
 import { useRouter } from 'vue-router'
 import ToBeDone from '@/api/toBeDone/toBeDone'
 export default {
@@ -72,6 +72,7 @@ export default {
       //已处理
       toBeDoneList2:[]
     })
+    const active = ref(0);
     //获取待办列表
     let workDBList = ref([])
     new ToBeDone().list({}).then((res)=>{
@@ -84,9 +85,15 @@ export default {
     })
     //跳转
     let router = useRouter()
+    //数据接收
+    onMounted(()=>{
+      var item = JSON.parse(router.currentRoute.value.query.name)
+      if(item==1){
+        active.value = 1
+      }
+    })
     const goToBeDoneinfo = (item)=>{
       let data = JSON.stringify(item)
-      // console.log(data);
       router.push({
         path:"/toBeDone_details",
         query:{'data':data}
@@ -98,7 +105,8 @@ export default {
     return {
       goback,
       toBeDone,
-      goToBeDoneinfo
+      goToBeDoneinfo,
+      active 
     }
   }
 };