站长端督查、回访

master
xy 2 years ago
parent 455e8a30ba
commit eecada0bc5

@ -1,5 +1,5 @@
const mode = process.env.NODE_ENV; // const mode = process.env.NODE_ENV;
//const mode = 'development'; const mode = 'development';
let ROOTPATH = ''; //域名 let ROOTPATH = ''; //域名
switch (mode) { switch (mode) {
case 'development': case 'development':

@ -21,8 +21,12 @@ let apiTask = {
//站长 //站长
let apiAdmin = { let apiAdmin = {
login: "/api/admin/auth/login", login: "/api/admin/auth/login",
logout: "/api/admin/auth/logout",
me: "/api/admin/auth/me", me: "/api/admin/auth/me",
scheduleList: "/api/admin/schedule/schedule-index" scheduleList: "/api/admin/schedule/schedule-index",
customerList: "/api/admin/customer/get-list",
saveCallback: "/api/admin/schedule-list-callbacks/save",
saveCheck: "/api/admin/schedule-list-checks/save"
} }
// 此处第二个参数vm就是我们在页面使用的this你可以通过vm获取vuex等操作 // 此处第二个参数vm就是我们在页面使用的this你可以通过vm获取vuex等操作
const install = (Vue, vm) => { const install = (Vue, vm) => {
@ -45,8 +49,12 @@ const install = (Vue, vm) => {
//站长 //站长
let adminLogin = (data = {}) => vm.$u.post(apiAdmin.login, data); let adminLogin = (data = {}) => vm.$u.post(apiAdmin.login, data);
let adminLogout = (data = {}) => vm.$u.post(apiAdmin.logout, data);
let adminMe = (data = {}) => vm.$u.post(apiAdmin.me, data); let adminMe = (data = {}) => vm.$u.post(apiAdmin.me, data);
let adminScheduleList = (data = {}) => vm.$u.get(apiAdmin.scheduleList, data); let adminScheduleList = (data = {}) => vm.$u.get(apiAdmin.scheduleList, data);
let adminCustomerList = (data = {}) => vm.$u.get(apiAdmin.customerList, data);
let adminSaveCallback = (data = {}) => vm.$u.post(apiAdmin.saveCallback, data);
let adminSaveCheck = (data = {}) => vm.$u.post(apiAdmin.saveCheck, data);
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下 // 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下
vm.$u.api = { vm.$u.api = {
login, login,
@ -65,8 +73,12 @@ const install = (Vue, vm) => {
scheduleSave, scheduleSave,
adminLogin, adminLogin,
adminLogout,
adminMe, adminMe,
adminScheduleList adminScheduleList,
adminCustomerList,
adminSaveCallback,
adminSaveCheck
}; };
}; };

@ -59,3 +59,14 @@ export function getAgeByIdcard(identityCard) {
} }
return age; return age;
} }
export function getSexByIdcard (idCard) {
let sexStr;
if (parseInt(idCard.slice(-2, -1)) % 2 == 1) {
sexStr = '男';
}
else {
sexStr = '女';
}
return sexStr;
}

@ -0,0 +1,252 @@
<template>
<view>
<cpn-navbar title="回访" :is-back="true"></cpn-navbar>
<view class="container">
<u-form :model="form" ref="uForm" :label-width="200" :error-type="['message', 'border-bottom']">
<u-form-item label="回访方式" prop="way">
<u-radio-group v-model="form.way">
<u-radio v-for="(item, index) in ways" :key="item.value" :name="item.value">
{{ item.label }}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="是否接通" prop="is_coherent">
<u-switch v-model="form.is_coherent" :active-value="1" :inactive-value="0"></u-switch>
</u-form-item>
<u-form-item label="回访时间" required prop="visit_time">
<u-input :value="form.visit_time" type="select" @click="isShowTime = true"></u-input>
</u-form-item>
<u-form-item label="是否回访" prop="is_serve">
<u-switch v-model="form.is_serve" :active-value="1" :inactive-value="0"></u-switch>
</u-form-item>
<u-form-item label="满意度" required prop="satisfy">
<u-radio-group v-model="form.satisfy">
<u-radio v-for="(item, index) in satisfies" :key="item.value" :name="item.value">
{{ item.label }}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="服务规范" prop="is_standard">
<u-radio-group v-model="form.is_standard">
<u-radio v-for="(item, index) in standards" :key="item.value" :name="item.value">
{{ item.label }}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="回访备注" prop="remark">
<u-input v-model="form.remark" type="textarea"></u-input>
</u-form-item>
<u-form-item label="回访图片">
<u-upload ref="uUpload" :custom-btn="true" :action="action" :file-list="fileList"
:source-type="['camera']">
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<u-icon name="camera" size="60" color="#c0c4cc" label="点击拍摄" label-pos="bottom"></u-icon>
</view>
</u-upload>
</u-form-item>
<u-form-item label="所在位置">
<view>
<u-button type="primary" size="mini" :throttle-time="3000" @click="getLoaction"></u-button>
<view>
{{ `${(form.lng || form.lat) ? ('(' + form.lng + ',' + form.lat + ')') : ''}${form.address}` }}
</view>
</view>
</u-form-item>
</u-form>
<u-button type="primary" @click="submit"></u-button>
</view>
<u-picker mode="time"
v-model="isShowTime"
:params="{
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true
}" @confirm="timeConfirm"></u-picker>
</view>
</template>
<script>
import QQMapWX from '@/libs/qqmap-wx-jssdk.js'
import moment from "@/libs/moment.min";
import { ROOTPATH } from "@/common/config"
export default {
data() {
return {
action: `${ROOTPATH}/api/admin/upload-file`,
fileList: [],
isShowTime: false,
form: {
schedule_list_id: "",
way: "",
is_coherent: 1,
visit_time: moment().format('YYYY-MM-DD HH:mm:ss'),
is_serve: 1,
satisfy: "",
is_standard: 1,
remark: "",
file_ids: [],
lat: "",
lng: "",
address: ""
},
rules: {
visit_time: [
{
required: true,
type: 'string',
message: '请选择回访时间',
trigger: ['change','blur']
}
],
satisfy: [
{
required: true,
type: "number",
message: '请选择满意度',
trigger: ['change','blur']
}
]
},
standards: [
{
label: "不规范",
value: 0
},
{
label: "规范",
value: 1
},
],
satisfies: [
{
label: "非常满意",
value: 1
},
{
label: "满意",
value: 2
},
{
label: "一般",
value: 3
},
{
label: "不满意",
value: 4
},
],
ways: [
{
label: "上门",
value: 1
},
{
label: "电话",
value: 2
}
],
};
},
methods: {
load() {
this.qqmapsdk = new QQMapWX({
key: 'D5EBZ-C3BWP-HZIDG-VO6BE-P2MN5-ESFZO'
});
},
timeConfirm (e) {
this.form.visit_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`
},
getLoaction() {
return new Promise((resolve, reject) => {
uni.getLocation({
type: 'gcj02',
isHighAccuracy: true
}).then(res => {
if (res[1]) {
this.form.lat = res[1]?.latitude
this.form.lng = res[1]?.longitude
this.qqmapsdk.reverseGeocoder({
location: {
latitude: this.form.lat,
longitude: this.form.lng
},
success: (res) => {
this.form.address = res.result.address + res.result.formatted_addresses.recommend
console.log(this.form)
resolve(res)
},
fail: (err) => {
reject(err)
}
})
} else {
uni.showToast({
icon: 'none',
title: '操作频繁,请稍后再试'
})
reject(res)
console.log(res);
}
})
})
},
submit () {
this.$refs.uForm.validate(valid => {
if (valid) {
this.form.file_ids = this.fileList.map(i => i.response?.id)
this.$u.api.adminSaveCallback(this.form).then(res => {
uni.showToast({
icon: 'success',
title: '保存成功',
})
setTimeout(() => {
uni.navigateBack()
},1500)
})
}
})
}
},
onLoad(option) {
this.form.schedule_list_id = option.schedule_list_id;
},
onReady() {
this.load();
this.$refs.uForm.setRules(this.rules);
},
}
</script>
<style lang="scss">
.container {
border-radius: 10rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
margin: 20rpx;
padding: 20rpx;
}
.slot-btn {
width: 200rpx;
height: 200rpx;
display: flex;
justify-content: center;
align-items: center;
background: rgb(244, 245, 246);
border: 2rpx #108cff solid;
border-radius: 10rpx;
box-sizing: content-box;
filter: drop-shadow(0 0 4rpx #0fc7ff) drop-shadow(0 0 6rpx #00eaff);
}
.slot-btn__hover {
background-color: rgb(235, 236, 238);
}
</style>

@ -0,0 +1,157 @@
<template>
<view>
<cpn-navbar title="督查" :is-back="true"></cpn-navbar>
<view class="container">
<u-form :model="form" ref="uForm" :label-width="200" :error-type="['message', 'border-bottom']">
<u-form-item label="结果" prop="result">
<u-radio-group v-model="form.result">
<u-radio v-for="(item, index) in results" :key="item.value" :name="item.value">
{{ item.label }}
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="督查备注" prop="remark">
<u-input v-model="form.remark" type="textarea"></u-input>
</u-form-item>
<u-form-item label="督查图片">
<u-upload ref="uUpload" :custom-btn="true" :action="action" :file-list="fileList"
:source-type="['camera']">
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<u-icon name="camera" size="60" color="#c0c4cc" label="点击拍摄" label-pos="bottom"></u-icon>
</view>
</u-upload>
</u-form-item>
<u-form-item label="所在位置">
<view>
<u-button type="primary" size="mini" :throttle-time="3000" @click="getLoaction"></u-button>
<view>
{{ `${(form.lng || form.lat) ? ('(' + form.lng + ',' + form.lat + ')') : ''}${form.address}` }}
</view>
</view>
</u-form-item>
</u-form>
<u-button type="primary" @click="submit"></u-button>
</view>
</view>
</template>
<script>
import QQMapWX from '@/libs/qqmap-wx-jssdk.js'
import { ROOTPATH } from "@/common/config"
export default {
data() {
return {
action: `${ROOTPATH}/api/admin/upload-file`,
fileList: [],
form: {
schedule_list_id: "",
result: 1,
remark: "",
file_ids: [],
lat: "",
lng: "",
address: ""
},
results: [
{
label: "异常",
value: 0
},
{
label: "正常",
value: 1
},
],
};
},
methods: {
load() {
this.qqmapsdk = new QQMapWX({
key: 'D5EBZ-C3BWP-HZIDG-VO6BE-P2MN5-ESFZO'
});
},
getLoaction() {
return new Promise((resolve, reject) => {
uni.getLocation({
type: 'gcj02',
isHighAccuracy: true
}).then(res => {
if (res[1]) {
this.form.lat = res[1]?.latitude
this.form.lng = res[1]?.longitude
this.qqmapsdk.reverseGeocoder({
location: {
latitude: this.form.lat,
longitude: this.form.lng
},
success: (res) => {
this.form.address = res.result.address + res.result.formatted_addresses.recommend
console.log(this.form)
resolve(res)
},
fail: (err) => {
reject(err)
}
})
} else {
uni.showToast({
icon: 'none',
title: '操作频繁,请稍后再试'
})
reject(res)
console.log(res);
}
})
})
},
submit () {
this.form.file_ids = this.fileList.map(i => i.response?.id)
this.$u.api.adminSaveCheck(this.form).then(res => {
uni.showToast({
icon: 'success',
title: '保存成功',
})
setTimeout(() => {
uni.navigateBack()
},1500)
})
}
},
onLoad(option) {
this.form.schedule_list_id = option.schedule_list_id;
},
onReady() {
this.load();
},
}
</script>
<style lang="scss">
.container {
border-radius: 10rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
margin: 20rpx;
padding: 20rpx;
}
.slot-btn {
width: 200rpx;
height: 200rpx;
display: flex;
justify-content: center;
align-items: center;
background: rgb(244, 245, 246);
border: 2rpx #108cff solid;
border-radius: 10rpx;
box-sizing: content-box;
filter: drop-shadow(0 0 4rpx #0fc7ff) drop-shadow(0 0 6rpx #00eaff);
}
.slot-btn__hover {
background-color: rgb(235, 236, 238);
}
</style>

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<cpn-navbar title="护理列表"></cpn-navbar> <cpn-navbar title="护理列表" :is-back="true"></cpn-navbar>
<view> <view>
<view> <view>
@ -49,9 +49,38 @@
<view class="line"></view> <view class="line"></view>
<view class="center" @click="toDetail(item)"> <view style="padding: 20rpx 40rpx 0;font-size: 32rpx;line-height: 2;font-weight: 600;">
护理人
</view>
<view class="center">
<view class="avatar">
<u-image :src="((item.nurse && item.nurse.idcard) ? getSexByIdcard(item.nurse.idcard) : '无') === '男' ? vuex_male_img : vuex_female_img" height="104"
width="104" shape="circle"></u-image>
</view>
<view class="user-info">
<view class="name">{{item.nurse.name}}</view>
<view class="tel">
<view>
<u-icon name="phone" size="28" color="#1479FF"></u-icon>
</view>
<view class="text">{{item.nurse.phone || '无'}}</view>
</view>
</view>
<view class="sex">
<view class="sex-text">
{{ (item.nurse && item.nurse.idcard) ? getSexByIdcard(item.nurse.idcard) : '无' }}
</view>
</view>
</view>
<view class="line" style="margin-top: 22rpx;"></view>
<view style="padding: 20rpx 40rpx 0;font-size: 32rpx;line-height: 2;font-weight: 600;">
被护理人
</view>
<view class="center">
<view class="avatar"> <view class="avatar">
<u-image :src="item.customer.sex === '男' ? vuex_male_img : vuex_female_img" height="104" <u-image :src="((item.customer && item.customer.idcard) ? getSexByIdcard(item.customer.idcard) : '无') === '男' ? vuex_male_img : vuex_female_img" height="104"
width="104" shape="circle"></u-image> width="104" shape="circle"></u-image>
</view> </view>
<view class="user-info"> <view class="user-info">
@ -71,24 +100,73 @@
</view> </view>
<view class="sex"> <view class="sex">
<view class="sex-text"> <view class="sex-text">
{{item.customer.sex || '无'}} {{ (item.customer && item.customer.idcard) ? getSexByIdcard(item.customer.idcard) : '无' }}
</view> </view>
</view> </view>
</view> </view>
<view class="line" style="margin-top: 22rpx;"></view>
<view style="padding: 20rpx 40rpx 0;font-size: 32rpx;line-height: 2;font-weight: 600;">
护理项目
</view>
<view v-if="item.sku" class="sku-list">
<u-collapse>
<u-collapse-item>
<view slot="title">
<view class="sku-list__tag" v-for="sku in item.sku.slice(0,1)" :key="sku.id">
<view>{{ (sku.sku_info ? sku.sku_info.name : sku.sku_id) }}</view>
<view>{{ (sku.time || 0) + '(分钟)' }}</view>
</view>
</view>
<view slot="default" class="sku-list__tag" v-for="sku in item.sku.slice(1)" :key="sku.id">
<view>{{ (sku.sku_info ? sku.sku_info.name : sku.sku_id) }}</view>
<view>{{ (sku.time || 0) + '(分钟)' }}</view>
</view>
</u-collapse-item>
</u-collapse>
</view>
<view class="line"></view>
<view class="bottom"> <view class="bottom">
<view class="distance"> <view class="show-status">
<view class="distance-icon"> <view class="status">
<u-image src="/static/todayNursing/distance.png" height="42" width="42"></u-image> <view class="status-icon"
:class="{icon1:item.schedule_list_checks.length <= 0,icon2:item.schedule_list_checks.length > 0}">
</view>
<view class="status-text">{{ item.schedule_list_checks.length > 0 ? "已督查" : "未督查" }}</view>
</view> </view>
<view class="distance-text">{{item.distance}}公里</view> <view class="status">
</view> <view class="status-icon"
<view class="to-there" @click="toThere(item)"> :class="{icon1:item.schedule_list_callback.length <= 0,icon2:item.schedule_list_callback.length > 0}">
<view class="to-there-text">去那里</view> </view>
<view class="to-there-icon"> <view class="status-text">{{ item.schedule_list_callback.length > 0 ? "已回访" : "未回访" }}</view>
<u-image src="/static/todayNursing/to-there.png" height="46" width="46"></u-image>
</view> </view>
</view> </view>
<view class="operate">
<u-button v-if="item.status === 1 && item.schedule_list_checks.length <= 0"
class="operate-item"
:custom-style="{ width: '100%' }"
type="primary"
size="medium"
plain
ripple
style="flex: 1;"
@click="pageTo('/package_sub/pages/addChecks/addChecks' + '?schedule_list_id=' + item.id)">督查</u-button>
<u-button class="operate-item"
:custom-style="{ width: '100%' }"
style="flex: 1;"
v-if="item.status === 2 && item.schedule_list_callback.length <= 0"
type="primary"
size="medium"
plain
ripple
@click="pageTo('/package_sub/pages/addCallback/addCallback' + '?schedule_list_id=' + item.id)">回访</u-button>
</view>
</view> </view>
</view> </view>
@ -109,6 +187,7 @@
</template> </template>
<script> <script>
import { getSexByIdcard } from "@/common/util"
export default { export default {
data() { data() {
return { return {
@ -166,8 +245,8 @@ export default {
status: '', status: '',
lat: '', lat: '',
lng: '', lng: '',
start_time: this.$moment(new Date()).startOf('month').format('YYYY-MM-DD'), start_date: this.$moment(new Date()).startOf('month').format('YYYY-MM-DD'),
end_time: this.$moment(new Date()).endOf('month').format('YYYY-MM-DD'), end_date: this.$moment(new Date()).endOf('month').format('YYYY-MM-DD'),
keyword: '', keyword: '',
is_new_auth: 1, is_new_auth: 1,
sort_name:'start_time', sort_name:'start_time',
@ -176,6 +255,12 @@ export default {
} }
}, },
methods: { methods: {
pageTo (url) {
uni.navigateTo({
url
})
},
getSexByIdcard,
refresh(){ refresh(){
this.select = { this.select = {
page_size: 10, page_size: 10,
@ -184,8 +269,8 @@ export default {
status: '', status: '',
lat: '', lat: '',
lng: '', lng: '',
//start_time: this.$moment(new Date()).startOf('month').format('YYYY-MM-DD'), start_date: this.$moment(new Date()).startOf('month').format('YYYY-MM-DD'),
//end_time: this.$moment(new Date()).endOf('month').format('YYYY-MM-DD'), end_date: this.$moment(new Date()).endOf('month').format('YYYY-MM-DD'),
keyword: '', keyword: '',
sort_name:'start_time', sort_name:'start_time',
sort_type:'asc' sort_type:'asc'
@ -220,8 +305,8 @@ export default {
}, },
async getList() { async getList() {
let res = await this.$u.api.adminScheduleList(this.select) let res = await this.$u.api.adminScheduleList(this.select)
if (res.data.length > 0 && res.data) { if (res instanceof Array && res.length > 0) {
this.nursingList.push(...res.data) this.nursingList.push(...res)
this.status = 'loadmore' this.status = 'loadmore'
} else { } else {
this.status = 'nomore' this.status = 'nomore'
@ -231,23 +316,6 @@ export default {
} }
}, },
//
toDetail(item) {
uni.$u.throttle(() => {
uni.navigateTo({
url: `/pages/detailNursing/detailNursing?id=${item.id}`
})
})
},
toThere(item) {
this.$u.throttle(() => {
uni.openLocation({
latitude: Number(item.customer.lat),
longitude: Number(item.customer.lng),
name: item.customer.address
})
})
}
}, },
computed: { computed: {
statusComputed() { statusComputed() {
@ -504,55 +572,54 @@ export default {
} }
.bottom { .bottom {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 16rpx; margin-top: 16rpx;
padding-bottom: 26rpx; padding: 0 60rpx 26rpx;
.show-status {
.distance {
align-items: center;
display: flex; display: flex;
justify-content: space-between;
align-items: center;
.distance-icon {
padding-left: 20rpx; .status {
} display: flex;
align-items: center;
.distance-text {
height: 34rpx;
font-size: 24rpx;
font-weight: 500;
color: #A7AFBC;
line-height: 34rpx;
padding-left: 20rpx;
} }
} }
.operate {
.to-there {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
margin-top: 16rpx;
margin-right: 20rpx; }
.operate-item + .operate-item {
.to-there-text { margin-left: 40rpx;
height: 34rpx;
font-size: 24rpx;
font-weight: 500;
color: #A7AFBC;
line-height: 34rpx;
margin-right: 14rpx;
}
.to-there-icon {
margin-left: 3rpx;
}
} }
} }
} }
} }
.sku-list {
padding: 22rpx 60rpx;
&__tag {
padding-left: 20rpx;
margin-bottom: 20rpx;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
&::before {
content: "";
width: 12rpx;
height: 12rpx;
border-radius: 100%;
background: #3877f6;
position: absolute;
top: calc(50% - 6rpx);
left: -8rpx;
}
}
}
</style> </style>

@ -1,164 +1,176 @@
{ {
"easycom": { "easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue", "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"^cpn-(.*)": "@/components/cpn-$1.vue" "^cpn-(.*)": "@/components/cpn-$1.vue"
}, },
"pages": [ "pages": [
{ {
"path": "pages/enter/enter", "path": "pages/enter/enter",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/home/home", "path": "pages/home/home",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, },
{ {
"path": "pages/list/list", "path": "pages/list/list",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/todayNursing/todayNursing", "path": "pages/todayNursing/todayNursing",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/nursingCalendar/nursingCalendar", "path": "pages/nursingCalendar/nursingCalendar",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/map/map", "path": "pages/map/map",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/detailNursing/detailNursing", "path": "pages/detailNursing/detailNursing",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/setting/setting", "path": "pages/setting/setting",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper", "path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper",
"style": { "style": {
"navigationBarTitleText": "头像裁剪", "navigationBarTitleText": "头像裁剪",
"navigationBarBackgroundColor": "#000000" "navigationBarBackgroundColor": "#000000"
} }
}, },
{ {
"path": "pages/showimg/showimg", "path": "pages/showimg/showimg",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"animationType": "fade-in", "animationType": "fade-in",
"animationDuration": 300 "animationDuration": 300
} }
} }
}, },
{ {
"path": "pages/order/order", "path": "pages/order/order",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/order/addOrder", "path": "pages/order/addOrder",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
], ],
"subPackages": [ "subPackages": [
{ {
"root": "package_sub", "root": "package_sub",
"pages": [ "pages": [
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/customer/customer", "path": "pages/customer/customer",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/callback/callback", "path": "pages/callback/callback",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/schedule/schedule", "path": "pages/schedule/schedule",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} },
] {
} "path": "pages/addCallback/addCallback",
], "style": {
"globalStyle": { "navigationStyle": "custom"
"navigationBarTextStyle": "white", }
"navigationBarTitleText": "uni-app", },
"navigationBarBackgroundColor": "#F8F8F8", {
"backgroundColor": "#F8F8F8" "path": "pages/addChecks/addChecks",
}, "style": {
"tabBar": { "navigationStyle": "custom"
"color": "#ABAEBE", }
"selectedColor": "#1479FF", }
"list": [ ]
{ }
"iconPath": "/static/tabbar/notification.png", ],
"selectedIconPath": "/static/tabbar/notification-active.png", "globalStyle": {
"pagePath": "pages/todayNursing/todayNursing", "navigationBarTextStyle": "white",
"text": "今日护理" "navigationBarTitleText": "uni-app",
}, "navigationBarBackgroundColor": "#F8F8F8",
{ "backgroundColor": "#F8F8F8"
"iconPath": "/static/tabbar/canlendar.png", },
"selectedIconPath": "/static/tabbar/canlendar-active.png", "tabBar": {
"pagePath": "pages/nursingCalendar/nursingCalendar", "color": "#ABAEBE",
"text": "护理日历" "selectedColor": "#1479FF",
}, "list": [
{ {
"iconPath": "/static/tabbar/list.png", "iconPath": "/static/tabbar/notification.png",
"selectedIconPath": "/static/tabbar/list-active.png", "selectedIconPath": "/static/tabbar/notification-active.png",
"pagePath": "pages/list/list", "pagePath": "pages/todayNursing/todayNursing",
"text": "护理列表" "text": "今日护理"
}, },
{ {
"iconPath": "/static/tabbar/order.png", "iconPath": "/static/tabbar/canlendar.png",
"selectedIconPath": "/static/tabbar/order-active.png", "selectedIconPath": "/static/tabbar/canlendar-active.png",
"pagePath": "pages/order/order", "pagePath": "pages/nursingCalendar/nursingCalendar",
"text": "预约护理" "text": "护理日历"
}, },
{ {
"iconPath": "/static/tabbar/home.png", "iconPath": "/static/tabbar/list.png",
"selectedIconPath": "/static/tabbar/home-active.png", "selectedIconPath": "/static/tabbar/list-active.png",
"pagePath": "pages/home/home", "pagePath": "pages/list/list",
"text": "我的" "text": "护理列表"
},
{
"iconPath": "/static/tabbar/order.png",
"selectedIconPath": "/static/tabbar/order-active.png",
"pagePath": "pages/order/order",
"text": "预约护理"
},
{
"iconPath": "/static/tabbar/home.png",
"selectedIconPath": "/static/tabbar/home-active.png",
"pagePath": "pages/home/home",
"text": "我的"
} }
] ]
} }

@ -162,7 +162,8 @@ export default {
} }
}, },
mySkus () { mySkus () {
return this.vuex_user.nurse_sku_links.map(i => i.sku) const orderSku = this.getOrder()?.product?.skus || []
return this.vuex_user.nurse_sku_links.map(i => i.sku).filter(i => orderSku.find(j => j.id === i.id))
}, },
params () { params () {
return this.pickerType === 1 ? { return this.pickerType === 1 ? {

@ -66,23 +66,42 @@
}, },
methods: { methods: {
logout() { logout() {
this.$u.api.logout().then((res) => { if (this.vuex_my_role === 1) {
uni.showToast({ this.$u.api.logout().then((res) => {
title: res.msg, uni.showToast({
icon: 'none' title: res.msg,
}) icon: 'none'
setTimeout(() => { })
uni.navigateTo({ setTimeout(() => {
url: "/pages/login/login", uni.navigateTo({
fail: (err) => { url: "/pages/login/login",
console.log(err); fail: (err) => {
}, console.log(err);
}); },
uni.clearStorageSync(); });
}, 1500) uni.clearStorageSync();
}, 1500)
});
} else {
this.$u.api.adminLogout().then((res) => {
uni.showToast({
title: res.msg,
icon: 'none'
})
setTimeout(() => {
uni.navigateTo({
url: "/pages/login/login",
fail: (err) => {
console.log(err);
},
});
uni.clearStorageSync();
}, 1500)
});
}
});
}, },
chooseAvatar() { chooseAvatar() {
// uView"-JS"uniuni.navigateTo // uView"-JS"uniuni.navigateTo

Loading…
Cancel
Save