Kaynağa Gözat

页面更新

wangxy 2 ay önce
ebeveyn
işleme
1117dc70a7

+ 6 - 3
components/MtaScrollView/MtaScrollView.vue

@@ -29,6 +29,10 @@
 			type: Number,
 			default: 5
 		},
+		otherOption: {
+			type: Object,
+			default: () => ({})
+		}
 	})
 
 	const page = ref(1);
@@ -73,7 +77,7 @@
 
 	// 获取数据
 	function getData(action) {
-		const options = Object.assign({}, {
+		let options = Object.assign({}, {
 			page: page.value,
 			size: props.size,
 		});
@@ -123,8 +127,7 @@
 		page.value++;
 		getData('reach-buttom')
 	}
-
-
+	
 	defineExpose({
 		onRefresh
 	})

+ 7 - 0
pages.json

@@ -431,6 +431,13 @@
 			{
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path" : "pages/jyjxZhuanyejiansheInfo/jyjxZhuanyejiansheInfo",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
 		}
 
 	],

+ 78 - 11
pages/jyjxZhuanyejianshe/jyjxZhuanyejianshe.vue

@@ -1,33 +1,100 @@
 <template>
-	<view>
-		
+	<view class="dljt-page-box">
+		<MtaNavbar></MtaNavbar>
+		<view class="dljt-container-box">
+			<view class="dljt-page-title">教育教学</view>
+			<view class="dljt-page-content-box">
+				<view class="dljt-breadcrumb-box">
+					<view class="breadcrumb-text" @click="handleGo()">首页</view>
+					<icon class="breadcrumb-jt"></icon>
+					<view class="breadcrumb-text">教育教学</view>
+					<icon class="breadcrumb-jt"></icon>
+					<view class="breadcrumb-active">专业建设</view>
+				</view>
+				
+				<view>
+					<view :class="{active: data.type == 1}" @click="changeType(1)">专业发展</view>
+					<view :class="{active: data.type == 2}" @click="changeType(2)">人培方案</view>
+					<view :class="{active: data.type == 3}" @click="changeType(3)">课程标准</view>
+					<view :class="{active: data.type == 4}" @click="changeType(4)">实训安全</view>
+					<view :class="{active: data.type == 5}" @click="changeType(5)">教材管理</view>
+				</view>
+				
+				<MtaScrollViewVue :refreshFn="getList" :other-option="{type: data.type}" ref="listRef">
+					<template v-slot="{ list }">
+						<view class="data-content-item" v-for="item in list" :key="item.id" @click="handleClick(item)">
+							<view class="list-time-box">
+								<view class="time-data">{{formatDateToYearMonthDay(item.createTime)[1]}}</view>
+								<view class="time-year">{{formatDateToYearMonthDay(item.createTime)[0]}}</view>
+							</view>
+							<view class="list-title-box"> {{item.title}} </view>
+						</view>
+					</template>
+				</MtaScrollViewVue>
+			</view>
+			<!-- 底部导航 -->
+			<MtaFooter></MtaFooter>
+		</view>
 	</view>
 </template>
 
 <script setup>
 	import {
 		ref,
-		reactive
+		reactive,
+		nextTick
 	} from "vue";
 	import {
 		onLoad
 	} from "@dcloudio/uni-app"
 	import * as httpApi from "@/api/common.js"
-	
-	
+	import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
+	import {
+		formatDateToYearMonthDay,
+		getStringByHtml3
+	} from "@/utils/common.js"
+	import MtaFooter from "@/components/MtaFooter.vue"
+
 	const data = reactive({
-		list: [],
-		total: 0,
+		list: '',
+		total: '',
 		page: 1,
-		size: 5
+		size: 5,
+		type: 1
 	})
 	
-	onLoad(() => {
-		pageInit();
+	const listRef = ref(null)
+	
+	onLoad(({type}) => {
+		data.type = type;
 	})
+
+	function handleClick(data) {
+		uni.navigateTo({
+			url: `/pages/jyjxZhuanyejiansheInfo/jyjxZhuanyejiansheInfo?id=${data.id}&type=${data.type}`
+		})
+	}
+
+	function getList(data) {
+		return httpApi.getJiaoyuZhuanyejiansheList(data)
+	}
+
+	function handleGo() {
+		uni.navigateTo({
+			url: '/pages/index/index'
+		})
+	}
+	
+	function changeType(code) {
+		data.type = code;
+		data.page = 1;
+		nextTick(() => {
+			listRef.value.onRefresh()
+		})
+	}
 	
 	function pageInit() {
-		httpApi.getJiaoyuZhuanyejiansheList({page:data.page,size:data.size}).then(res => {
+		httpApi.getJiaoyuZhuanyejiansheList({page:data.page,size:data.size,type: data.type}).then(res => {
 			data.list = res.data.data;
 			data.total = res.data.total;
 		})

+ 3 - 7
pages/xygkXueyuanrongyu/xygkXueyuanrongyu.vue

@@ -7,11 +7,13 @@
 				<view class="dljt-breadcrumb-box">
 					<view class="breadcrumb-text" @click="handleGo()">首页</view>
 					<icon class="breadcrumb-jt"></icon>
+					<view class="breadcrumb-text">学院概况</view>
+					<icon class="breadcrumb-jt"></icon>
 					<view class="breadcrumb-active">学院荣誉</view>
 				</view>
 				<MtaScrollViewVue :refreshFn="getList">
 					<template v-slot="{ list }">
-						<view class="list-item-box" v-for="item in list" :key="item.id" @click="handleClick(item)">
+						<view class="list-item-box" v-for="item in list" :key="item.id">
 							<!-- 图 -->
 							<!-- 内容 -->
 							<view class="list-right-box">
@@ -52,12 +54,6 @@
 		size: 5
 	})
 
-	function handleClick(data) {
-		uni.navigateTo({
-			url: `/pages/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo?id=${data.id}`
-		})
-	}
-
 	function getList(data) {
 		return httpApi.getCommonGaikuangRongyuList(data)
 	}