123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view class="admin-jiazheng-page">
- <view class="icon-title-navBar-box">
- <view @click="goUpPage" class="nav-bar-icon"></view>
- <text class="nav-bar-title">家政人员</text>
- </view>
- <v-tabs v-model="current" :tabs="tabs" :scroll="false" @change="changeTab" field="name"
- class="admin-tab-box"></v-tabs>
- <uni-list v-if="current ==1" class="admin-list-box">
- <uni-list-item v-for="item in list" class="jz-list-item-box">
- <template v-slot:body>
- <view @click="lookUserInfo(item)" class="card-body-row">
- <view class="card-img-box">
- <img :src="item.pic" v-if="item.pic">
- <icon class="phone-default-userImg" v-else></icon>
- </view>
- <view class="body-content-row">
- <view class="content-text-row">
- <view> {{item.name}}</view>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-list v-if="current ==2" class="admin-list-box">
- <view class="jz-new-btn-box">
- <button type="default" class="phone-green-btn" @click="addJiazhengRenyuan">新增人员</button>
- </view>
- <uni-list-item v-for="item in list" class="jz-list-item-box">
- <template v-slot:body>
- <view @click="lookUserInfo(item)" class="card-body-row">
- <view class="card-img-box">
- <img :src="item.pic" v-if="item.pic">
- <icon class="phone-default-userImg" v-else></icon>
- </view>
- <view class="body-content-row">
- <view class="content-text-row">
- <view> {{item.name}}</view>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </template>
- <script>
- import {
- ref
- } from "vue";
- import {
- kcSelectList
- } from "@/api/jiazheng.js";
- import commonDialog from '@/components/dialog/commonDialog.vue';
- export default {
- data() {
- return {
- kcClassifyId: 0,
- id: '',
- current: 1,
- list:[],
- tabs: [{
- id: 1,
- name: '未绑定课程',
- },
- {
- id: 2,
- name: '已绑定课程',
- },
- ],
- }
- },
- components: {
- commonDialog,
- },
- onLoad(options) {
- this.id = options.id
- this.getList()
- },
- methods: {
- changeTab(data){
- console.log('data',data);
- },
- goUpPage() {
- if (this.pageInfo.from == 'banzheng') {
- uni.redirectTo({
- url: "/pages/admin/banzheng/list"
- })
- } else {
- uni.redirectTo({
- url: "/pages/admin/Jiazheng/index"
- })
- }
- },
- getList() {
- let req = {
- id: this.id,
- "kcClassifyId": this.kcClassifyId,
- }
- kcSelectList(req).then(res => {
- if (res.code == 0) {
- this.list = res.data
- } else {
- return false
- }
- })
- },
- }
- }
- </script>
|