|
|
@@ -1,23 +1,28 @@
|
|
|
<template>
|
|
|
<view class="phone-list-page kc-bind-page">
|
|
|
- <view class="phone-navBar-box">
|
|
|
+ <view class="phone-navBar-box border-navBar-box">
|
|
|
<view @click="goUpPage" class="nav-bar-icon"></view>
|
|
|
- <text class="nav-bar-title">家政人员</text>
|
|
|
- <uni-icons v-show="current ==0" class="nav-bar-right-icon bar-ml10" type="search" @click="searchBtn"
|
|
|
+ <text class="nav-bar-title">{{pageTitle}}</text>
|
|
|
+ <!-- 未绑定显示 -->
|
|
|
+ <view class="bd-navbar-btn" v-if="bindType==1" @click="bdBtn"><icon class="bd-title-icon" />已绑定</view>
|
|
|
+ <!-- 已绑定显示 -->
|
|
|
+ <view class="bd-navbar-btn" v-if="bindType==2" @click="wbdBtn"><icon class="bd-title-icon" />未绑定</view>
|
|
|
+
|
|
|
+ <!-- <uni-icons v-show="current ==0" class="nav-bar-right-icon bar-ml10" type="search" @click="searchBtn"
|
|
|
size="20"></uni-icons>
|
|
|
<uni-icons v-show="current ==1" style="opacity: 0;" class="nav-bar-right-icon bar-ml10" type="search"
|
|
|
- size="20"></uni-icons>
|
|
|
+ size="20"></uni-icons> -->
|
|
|
</view>
|
|
|
<v-tabs v-model="current" :tabs="tabs" :scroll="false" @change="changeTab" field="name"
|
|
|
class="admin-tab-box"></v-tabs>
|
|
|
- <view v-if="current ==0" class="jiazheng-search-box">
|
|
|
+ <view v-if="bindType ==1" class="jiazheng-search-box">
|
|
|
<view @click.stop="clickAlltype" class="select-item-box">
|
|
|
<text class="select-text">{{leixing}}</text>
|
|
|
<icon class="select-jt-default" />
|
|
|
</view>
|
|
|
<view>课程剩余数量:{{kechengNumber||0}}</view>
|
|
|
</view>
|
|
|
- <view class="kc-bind-scroll-view scroll-top-border" v-if="current ==0">
|
|
|
+ <view class="kc-bind-scroll-view scroll-top-border" v-if="bindType ==1">
|
|
|
|
|
|
<uni-list class="admin-list-box">
|
|
|
<uni-list-item v-for="item in list" class="admin-list-item-box">
|
|
|
@@ -42,7 +47,7 @@
|
|
|
</uni-list-item>
|
|
|
</uni-list>
|
|
|
</view>
|
|
|
- <view class="kc-notbind-scroll-view scroll-top-border" v-if="current ==1">
|
|
|
+ <view class="kc-notbind-scroll-view scroll-top-border" v-if="bindType ==2">
|
|
|
<uni-list class="admin-list-box">
|
|
|
<uni-list-item v-for="item in listYx" class="admin-list-item-box">
|
|
|
<template v-slot:body>
|
|
|
@@ -101,6 +106,9 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ bindType:1,// 未绑定1 已绑定2
|
|
|
+ kcLx:1,// 课程类型
|
|
|
+ pageTitle:'未绑定课程',
|
|
|
leixing: '全部类型',
|
|
|
leixingList: [],
|
|
|
selectClassify: null,
|
|
|
@@ -117,12 +125,12 @@
|
|
|
deleteConcent: '你确定要执行这个操作吗',
|
|
|
tabs: [{
|
|
|
id: 1,
|
|
|
- name: '未绑定课程',
|
|
|
+ name: '课程类型A',
|
|
|
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
- name: '已绑定课程',
|
|
|
+ name: '课程类型B',
|
|
|
|
|
|
},
|
|
|
],
|
|
|
@@ -140,6 +148,19 @@
|
|
|
this.chaxunNumber()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 绑定
|
|
|
+ bdBtn(){
|
|
|
+ this.pageTitle = '已绑定课程';
|
|
|
+ this.bindType = 2;
|
|
|
+ this.getYxList()
|
|
|
+ },
|
|
|
+ //未绑定
|
|
|
+ wbdBtn(){
|
|
|
+ this.pageTitle = '未绑定课程'
|
|
|
+ this.bindType = 1;
|
|
|
+ this.chaxunNumber()
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
chaxunNumber() {
|
|
|
chaxunNumberKecheng({
|
|
|
id: this.id
|
|
|
@@ -266,15 +287,17 @@
|
|
|
this.$refs.commonDialogRef.handleShow();
|
|
|
},
|
|
|
changeTab(data) {
|
|
|
- this.current = data
|
|
|
- if (this.current == 0) {
|
|
|
- this.getList()
|
|
|
- } else {
|
|
|
- this.chaxunNumber()
|
|
|
- this.getYxList()
|
|
|
- }
|
|
|
-
|
|
|
- console.log('data', data);
|
|
|
+ this.current = data;
|
|
|
+ this.kcLx = data + 1;
|
|
|
+ console.log(this.kcLx,'this.kcLx')
|
|
|
+ console.log(this.bindType,'this.bindType')
|
|
|
+ if(this.bindType == 1){
|
|
|
+ this.getList(); // 未绑定列表
|
|
|
+ this.chaxunNumber()
|
|
|
+ } else {
|
|
|
+ this.getYxList(); // 已绑定列表
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
goUpPage() {
|
|
|
uni.redirectTo({
|
|
|
@@ -285,7 +308,8 @@
|
|
|
let req = {
|
|
|
id: this.id,
|
|
|
"kcClassifyId": this.selectClassify && this.selectClassify.id || 0,
|
|
|
- name: this.name
|
|
|
+ name: this.name,
|
|
|
+ leixing:this.kcLx,
|
|
|
}
|
|
|
kcSelectList(req).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
@@ -298,6 +322,7 @@
|
|
|
getYxList() {
|
|
|
let req = {
|
|
|
id: this.id,
|
|
|
+ leixing:this.kcLx,
|
|
|
}
|
|
|
jiazhengKcList(req).then(res => {
|
|
|
if (res.code == 0) {
|