123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- <template>
- <view>
- <view class="jiazheng-uni-list">
- <view class="icon-title-navBar-box">
- <view @click="goUpPage" class="nav-bar-icon"></view>
- <text class="nav-bar-title">家政人员</text>
- <text class="nav-bar-title">+</text>
- <uni-icons type="search" size="16" color="#000" @click="toggle('top')"></uni-icons>
- </view>
- <view class="jiazheng-search-box">
- <view @click="clickAlltype" class="select-item-box">
- <text>全部类型</text>
- <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>
- </view>
- <view class="jiazheng-search-right">
- <!-- 当前点击 增加 saixuan-active-->
- <view class="saixuan-item-box saixuan-active">
- <text @click="timeClick">更新时间</text>
- <icon :class="updataJtClass" />
- </view>
- <view class="saixuan-item-box">
- <!-- class切换 saixuan-jt-default saixuan-jt-click-->
- <text>录入时间</text>
- <icon :class="luruJtClass" />
- </view>
- </view>
- </view>
- <view>
- <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.loading"
- :refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
- class="phone-scroll-view">
- <uni-list class="admin-list-box">
- <uni-list-item v-for="item in data.list" class="admin-list-item-box">
- <template v-slot:body>
- <view>
- <view>{{item.realName}}</view>
- <view @click="shareInfo">分享</view>
- <view @click="telephone">打电话</view>
- </view>
- <view @click="lookUserInfo">
- <image :src="item.icon ||defauleImg" mode=""></image>
- <view>
- <p> 1000岁|3年经验</p>
- <p>四川成都人</p>
- </view>
- <view>
- 待岗
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-load-more :status="data.state" @click="getMore(0)"
- :contentText="data.contentText"></uni-load-more>
- </uni-list>
- </scroll-view>
- </view>
- <view>
- <!-- 普通弹窗 -->
- <uni-popup ref="popup" background-color="#fff">
- <view>
- <view>
- <uni-section title="全部" type="line">
- <view class="uni-px-5 uni-pb-5">
- <uni-data-select v-model="value" :localdata="range"
- @change="change"></uni-data-select>
- </view>
- <view class="phone-search-box">
- <input class="search-input" placeholder="请输入职业名称" v-model="zyName" />
- <view class="search-icon" @click="handleSearch">
- <uni-icons type="search" size="24" color="#fff"></uni-icons>
- </view>
- </view>
- </uni-section>
- </view>
- </view>
- </uni-popup>
- </view>
- </view>
- </view>
- </template>
- <script setup>
- import {
- ref,
- reactive
- } from "vue";
- import {
- onLoad
- } from "@dcloudio/uni-app";
- import {
- getJiazhengList
- } 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
- },
- ]
- let range = ref([{
- "value": 0,
- "text": "篮球",
- "disable": true
- },
- {
- "value": 1,
- "text": "足球"
- },
- {
- "value": 2,
- "text": "游泳"
- }
- ])
- let data = reactive({
- zyName: '', // 职业名称
- list: [], // 考试列表
- loading: false,
- page: 0,
- size: 10,
- state: 'more',
- contentText: {
- contentdown: '查看更多',
- contentrefresh: '加载中',
- contentnomore: '没有更多'
- }
- })
- let zyName = ref('')
- let value = ref(0)
- let isOpen = ref(false)
- let typeChecked = ref(1)
- let defauleImg = ref('@/static/images/my/client-default-icon.png')
- const popup = ref(null);
- const allJtClass = 'select-jt-default';
- const updataJtClass = 'saixuan-jt-default';
- const luruJtClass = 'saixuan-jt-click';
- const clickAlltype = (data) => {
- isOpen.value = true
- }
- const onSelectCell = (data, index) => {
- console.log('data', data);
- console.log('index', index);
- // isOpen.value = false;
- // allJtClass = 'select-jt-click'
- }
- const toggle = (data, index) => {
- popup.value.open('top')
- }
- const lookUserInfo = (data, index) => {
- uni.redirectTo({
- url: `/pages/admin/Jiazheng/jiazhengUserInfo`
- })
- }
- function goUpPage() {
- uni.redirectTo({
- url: `/pages/admin/ShouYe/shouye`
- })
- }
- function onRefresh() {
- data.page = 0;
- data.list = [];
- data.loading = true;
- refreshData();
- }
- function telephone() {
- uni.makePhoneCall({
- phoneNumber: '114' //仅为示例
- });
- }
- function shareInfo() {
- }
- function refreshData() {
- }
- function timeClick() {
- }
- function change() {
- }
- function handleSearch() {
- }
- function getDataList() {
- let req = {
- "leixing": "",
- "page": 1,
- "realName": "",
- "size": 10,
- "sortRule": 0,
- "sortType": 0,
- "userName": ""
- }
- getJiazhengList(req).then(res => {
- console.log('res', res);
- data.list = res.data.data
- console.log('data.list', data.list);
- })
- }
- onLoad(() => {
- getDataList()
- })
- </script>
- <style>
- .jiazheng-uni-list {
- display: flex;
- width: 100%;
- flex-direction: column;
- }
- .jiazheng-uni-list-left {
- position: relative;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- }
- </style>
|