Prechádzať zdrojové kódy

Merge branch '2025北京诚祥' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025北京诚祥

tanxue 2 mesiacov pred
rodič
commit
c66d048e97
1 zmenil súbory, kde vykonal 30 pridanie a 31 odobranie
  1. 30 31
      pages/admin/Jiazheng/index.vue

+ 30 - 31
pages/admin/Jiazheng/index.vue

@@ -13,10 +13,8 @@
 					<icon :class="allJtClass" />
 				</view>
 				<view class="all-type-list">
-					<view v-if="isOpen" v-for="(item,index) in allType" :key="index" @click="onSelectCell(item,index)"
-						class="all-type-item all-type-active">
-						<view class="le-dropdown-cell-active-text">{{item.label}}</view>
-						<view v-show="item.value==typeChecked"></view>
+					<view v-show="isOpen">
+						<dataChecked :list="allType" mode="multiple" :defaultCount="99" :showAdd="false" @change="selectChangeSkill" />
 					</view>
 				</view>
 				<view class="jiazheng-search-right">
@@ -47,11 +45,11 @@
 								<view @click="lookUserInfo">
 									<image :src="item.icon ||defauleImg" mode=""></image>
 									<view>
-										<p> 1000岁|3年经验</p>
-										<p>四川成都人</p>
+										<p> {{item.age}}岁|{{item.jingyan}}年经验</p>
+										<p>{{item.jiguan}}</p>
 									</view>
 									<view>
-										待岗
+										{{item.zhuangtai}}
 									</view>
 								</view>				
 							</template>
@@ -95,30 +93,10 @@
 		onLoad
 	} from "@dcloudio/uni-app";
 	import {
-		getJiazhengList
+		getJiazhengList,
+		getJiazhengLeixing
 	} from "@/api/jiazheng.js"
-	// import {
-	// 	DropdownList
-	// } from "./data.js";
-	// const menuList = ref(DropdownList)
-	const allType = [{
-			label: "由近到远",
-			value: 0
-		},
-		{
-			label: "由远到近",
-			value: 1
-		},
-		{
-			label: "由远到近",
-			value: 2
-		},
-		{
-			label: "由远到近",
-			value: 3
-		},
-	]
-
+	import dataChecked from './common/dataChecked.vue';
 	let range = ref([{
 			"value": 0,
 			"text": "篮球",
@@ -133,6 +111,7 @@
 			"text": "游泳"
 		}
 	])
+	let allType = ref([])
 	let data = reactive({
 		zyName: '', // 职业名称
 		list: [], // 考试列表
@@ -156,7 +135,7 @@
 	const updataJtClass = 'saixuan-jt-default';
 	const luruJtClass = 'saixuan-jt-click';
 	const clickAlltype = (data) => {
-		isOpen.value = true
+	 isOpen.value = !isOpen.value;
 	}
 	const onSelectCell = (data, index) => {
 		console.log('data', data);
@@ -195,6 +174,9 @@
 	function shareInfo() {
 
 	}
+	function selectChangeSkill() {
+
+	}
 
 	function refreshData() {
 
@@ -228,8 +210,25 @@
 			console.log('data.list', data.list);
 		})
 	}
+	function getLeixing() {
+		let req = {
+		}
+		getJiazhengLeixing(req).then(res => {
+				allType = dataConversionObject(res.data)
+			console.log('allType',allType.value);
+		})
+	}
+	function dataConversionObject(data) {
+		let newList
+		newList = data.map((name, index) => ({
+			id: index,
+			name: name
+		}));
+		return newList
+	}
 	onLoad(() => {
 		getDataList()
+		getLeixing()
 	})
 </script>