fix: 页面调整
This commit is contained in:
parent
43d367fe5c
commit
3da2ca791a
@ -5,5 +5,6 @@ MP_WX_APP_ID=wx1d8337a40c11d66c
|
||||
MP_CORP_ID=wwe3fb2faa52cf9dfb
|
||||
MP_TIM_SDK_APP_ID=1600123876
|
||||
MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate
|
||||
MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient
|
||||
MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/'
|
||||
MP_SURVEY_URL= 'https://www.youcan365.com/surveyDev/#/pages/survey/survey'
|
||||
1
.env.ip
1
.env.ip
@ -5,5 +5,6 @@ MP_WX_APP_ID=wx1d8337a40c11d66c
|
||||
MP_CORP_ID=wwe3fb2faa52cf9dfb
|
||||
MP_TIM_SDK_APP_ID=1600123876
|
||||
MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate
|
||||
MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient
|
||||
MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/'
|
||||
MP_SURVEY_URL= 'https://www.youcan365.com/surveyDev/#/pages/survey/survey'
|
||||
|
||||
@ -5,5 +5,6 @@ MP_WX_APP_ID=wx1d8337a40c11d66c
|
||||
MP_CORP_ID=wwe3fb2faa52cf9dfb
|
||||
MP_TIM_SDK_APP_ID=1600123876
|
||||
MP_INVITE_TEAMMATE_QRCODE=https://patient.youcan365.com/invite-teammate
|
||||
MP_INVITE_PATIENT_QRCODE=https://patient.youcan365.com/invite-patient
|
||||
MP_PATIENT_PAGE_BASE_URL= 'https://www.youcan365.com/patientDeploy/#/'
|
||||
MP_SURVEY_URL= 'https://www.youcan365.com/surveyDev/#/pages/survey/survey'
|
||||
@ -34,7 +34,7 @@
|
||||
<view class="flex items-center">
|
||||
<view class="action-btn flex-col items-center mr-10" @click="invitePatient()">
|
||||
<image class="mb-5 qrcode-icon" src="/static/work/qrcode.svg" />
|
||||
<text class="action-text text-dark text-sm">邀请</text>
|
||||
<text class="action-text text-dark text-sm">邀请患者</text>
|
||||
</view>
|
||||
<view class="action-btn flex-col items-center" @click="handleMore">
|
||||
<image class="mb-5 qrcode-icon" src="/static/work/more.svg" />
|
||||
|
||||
@ -61,8 +61,8 @@ useLoad(options => {
|
||||
acc[key] = value;
|
||||
return acc;
|
||||
}, {})
|
||||
if (data.type === 'inviteTeam') {
|
||||
getTeam(data.teamId)
|
||||
if (options.type === 'inviteTeam' || data.type === 'inviteTeam') {
|
||||
getTeam(data.teamId || options.teamId)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<view class="bg-white px-10 mb-10 rounded">
|
||||
<!-- 填写认证资料的时候岗位必填 -->
|
||||
<common-cell :required="type === 'cert'" title="job" :name="rule.job.name">
|
||||
<picker mode="selector" :disable="rule.job.disable" :range="jobOptions" range-key="name"
|
||||
<picker mode="selector" :disabled="rule.job.disabled" :range="jobOptions" range-key="name"
|
||||
@change="changeJob($event)">
|
||||
<view class="flex-grow flex items-center justify-end">
|
||||
<view v-if="jobStr" class="text-base text-base">{{ jobStr }}</view>
|
||||
@ -27,7 +27,7 @@
|
||||
</picker>
|
||||
</common-cell>
|
||||
<common-cell title="title" :name="rule.title.name">
|
||||
<picker mode="selector" :disable="rule.title.disable" :range="titleOptions" @change="changeTitle($event)">
|
||||
<picker mode="selector" :disabled="rule.title.disabled" :range="titleOptions" @change="changeTitle($event)">
|
||||
<view class="flex-grow flex items-center justify-end">
|
||||
<view class="text-base text-base">{{ formData.title }}</view>
|
||||
<uni-icons color="#999" type="right" size="16" />
|
||||
@ -97,23 +97,27 @@ const jobStr = computed(() => {
|
||||
return jobs[0] && job[jobs[0]] ? job[jobs[0]] : "";
|
||||
});
|
||||
const rule = computed(() => {
|
||||
if (
|
||||
doctorInfo.value &&
|
||||
["verified", "verifying"].includes(doctorInfo.value.verifyStatus)
|
||||
) {
|
||||
return {
|
||||
anotherName: { name: "姓名 (不可修改)", required: false, disabled: true },
|
||||
job: { name: "岗位 (不可修改)", disabled: true },
|
||||
title: { name: "职称 (不可修改)", disabled: true },
|
||||
dept: { name: "科室 (不可修改)", disabled: true },
|
||||
};
|
||||
}
|
||||
return {
|
||||
const data = {
|
||||
anotherName: { name: "姓名", required: true, disabled: false },
|
||||
job: { name: "岗位", disabled: false },
|
||||
title: { name: "职称", disabled: false },
|
||||
dept: { name: "科室", disabled: false },
|
||||
};
|
||||
}
|
||||
if (doctorInfo.value && ["verified", "verifying"].includes(doctorInfo.value.verifyStatus)) {
|
||||
data.anotherName.name = "姓名 (不可修改)";
|
||||
data.anotherName.required = false;
|
||||
data.anotherName.disabled = true;
|
||||
|
||||
data.job.name = "岗位 (不可修改)";
|
||||
data.job.disabled = true;
|
||||
|
||||
data.title.name = doctorInfo.value.verifyStatus === 'verified' ? "职称 (不可修改)" : "职称";
|
||||
data.title.disabled = doctorInfo.value.verifyStatus === 'verified';
|
||||
|
||||
data.dept.name = doctorInfo.value.verifyStatus === 'verified' ? "科室 (不可修改)" : "科室";
|
||||
data.dept.disabled = doctorInfo.value.verifyStatus === 'verified';
|
||||
}
|
||||
return data
|
||||
});
|
||||
const deptNames = computed(() => {
|
||||
const hlwDepts = formData.value.hlwDepts || [];
|
||||
@ -126,20 +130,6 @@ const genderOptions = [
|
||||
{ label: "女", value: "1" },
|
||||
];
|
||||
|
||||
// 打开科室选择
|
||||
const openDepartmentSelect = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/work/department-select",
|
||||
events: {
|
||||
deptSelected: ({ name, deptId }) => {
|
||||
formData.value.department = name || "";
|
||||
formData.value.departmentName = name || "";
|
||||
formData.value.departmentId = deptId || "";
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
function back() {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length > 1) {
|
||||
@ -172,7 +162,7 @@ function onChange({ title, value }) {
|
||||
|
||||
function changeJob(e) {
|
||||
const data = jobOptions[e.detail.value];
|
||||
form.value.job = data.value;
|
||||
form.value.job = [data.value];
|
||||
}
|
||||
|
||||
function changeTitle(e) {
|
||||
@ -195,6 +185,7 @@ function toCert() {
|
||||
}
|
||||
|
||||
function selectDept() {
|
||||
if(rule.value.dept.disabled) return;
|
||||
const eventName = `selectDept_${Date.now()}`
|
||||
const deptIds = (formData.value.hlwDepts || []).map(i => i.deptId).filter(Boolean).join(',')
|
||||
uni.navigateTo({
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
<view class="w-0 flex-grow">
|
||||
<view class="flex items-center">
|
||||
<view class="mr-5 text-lg font-semibold text-dark truncate">{{ i.anotherName }}</view>
|
||||
<view v-if="i.isCreator"
|
||||
<!-- <view v-if="i.isCreator"
|
||||
class="mr-5 px-10 flex-shrink-0 border-auto text-sm leading-normal text-primary rounded-full">
|
||||
创建人
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="i.isLeader"
|
||||
class="px-10 flex-shrink-0 border-auto text-sm leading-normal text-primary rounded-full">
|
||||
团队负责人
|
||||
@ -206,5 +206,4 @@ useShow(() => {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@ -68,6 +68,9 @@ import { getInvitePatientPoster } from './base-poster-data';
|
||||
import emptyData from "@/components/empty-data.vue";
|
||||
import renamePopup from "./rename-popup.vue";
|
||||
|
||||
const env = __VITE_ENV__;
|
||||
const inviteQrcode = env.MP_INVITE_PATIENT_QRCODE;
|
||||
|
||||
const options = { margin: 10 }
|
||||
const painterRef = ref()
|
||||
const poster = ref({})
|
||||
@ -99,7 +102,9 @@ async function getTeams() {
|
||||
id: i._id,
|
||||
teamId: i.teamId,
|
||||
name: i.name,
|
||||
qrcode: i.qrcodes && i.qrcodes[0] && i.qrcodes[0].qrcode ? i.qrcodes[0].qrcode : ''
|
||||
qrcode: `${inviteQrcode}?teamId=${i.teamId}&corpId=${i.corpId}`
|
||||
// qrcode: i.qrcodes && i.qrcodes[0] && i.qrcodes[0].qrcode ? i.qrcodes[0].qrcode : ''
|
||||
|
||||
})) : [];
|
||||
if (teamId.value) {
|
||||
const idx = arr.findIndex(i => i.teamId === teamId.value);
|
||||
@ -160,22 +165,6 @@ async function saveImage(action = 'save') {
|
||||
}
|
||||
}
|
||||
|
||||
// 分享到朋友圈
|
||||
function onShareTimeline() {
|
||||
if (!team.value) {
|
||||
return {
|
||||
title: '邀请患者加入团队',
|
||||
path: '/pages/work/team/invite/invite-patient'
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
title: `邀请您加入${team.value.name}`,
|
||||
query: `teamId=${team.value.teamId}`,
|
||||
imageUrl: team.value.qrcode || ''
|
||||
};
|
||||
}
|
||||
|
||||
onLoad(opts => {
|
||||
teamId.value = opts.teamId || '';
|
||||
})
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<button class="mr-10 border-auto rounded py-5 text-base text-primary flex-grow" @click="saveImage('save')">
|
||||
保存图片
|
||||
</button>
|
||||
<button class="bg-primary rounded py-5 text-base text-white flex-grow" @click="saveImage('share')">分享微信</button>
|
||||
<button class="bg-primary rounded py-5 text-base text-white flex-grow" open-type="share">分享微信</button>
|
||||
</view>
|
||||
<view class="canvas-box">
|
||||
<l-painter ref="painterRef" :board="poster" />
|
||||
@ -31,6 +31,7 @@
|
||||
<script setup>
|
||||
import { computed, ref } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { onLoad, onShareAppMessage } from "@dcloudio/uni-app";
|
||||
import useGuard from "@/hooks/useGuard.js";
|
||||
import useAccountStore from "@/store/account.js";
|
||||
import api from '@/utils/api';
|
||||
@ -97,6 +98,13 @@ useLoad(options => {
|
||||
useShow(() => {
|
||||
getTeam()
|
||||
});
|
||||
|
||||
onShareAppMessage(() => {
|
||||
return {
|
||||
title: '邀请团队成员',
|
||||
path: `pages/login/redirect-page?type=inviteTeam&teamId=${teamId.value}`
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.canvas-box {
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<view class="flex items-center">
|
||||
<view class="action-btn flex-col items-center mr-10" @click="invitePatient()">
|
||||
<image class="mb-5 qrcode-icon" src="/static/work/qrcode.svg" />
|
||||
<text class="action-text text-dark text-sm">邀请</text>
|
||||
<text class="action-text text-dark text-sm">邀请患者</text>
|
||||
</view>
|
||||
<view class="action-btn flex-col items-center" @click="handleMore">
|
||||
<image class="mb-5 qrcode-icon" src="/static/work/more.svg" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user