|
|
@@ -8,7 +8,12 @@
|
|
|
-->
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <van-form ref="formRef" @submit="onSubmit('20')" class="mt10" required="auto">
|
|
|
+ <van-form
|
|
|
+ ref="formRef"
|
|
|
+ @submit="onSubmit('20')"
|
|
|
+ class="mt10"
|
|
|
+ required="auto"
|
|
|
+ >
|
|
|
<!-- <h4 class="mb8 mt8">申请人课题组信息</h4>
|
|
|
<van-cell-group>
|
|
|
<van-field v-model="state.form.pgName" label="课题组" placeholder="课题组" readonly :rules="[{ required: true }]" />
|
|
|
@@ -17,41 +22,111 @@
|
|
|
<van-field v-model="state.form.mentorPhone" label="课题组负责人电话" placeholder="课题组负责人电话" readonly />
|
|
|
</van-cell-group> -->
|
|
|
<h4 class="mb8 mt8">申请入室平台</h4>
|
|
|
- <van-cell-group v-for="(item, index) in state.form.platformList" :key="item.id">
|
|
|
- <van-field label="申请平台" placeholder="申请平台">
|
|
|
+ <van-cell-group
|
|
|
+ v-for="(item, index) in state.form.platformList"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ <van-field
|
|
|
+ label="申请平台"
|
|
|
+ placeholder="申请平台"
|
|
|
+ >
|
|
|
<template #input>
|
|
|
- <van-checkbox v-model="item.isChecked" name="10">{{ item.platformName }}</van-checkbox>
|
|
|
+ <van-checkbox
|
|
|
+ v-model="item.isChecked"
|
|
|
+ name="10"
|
|
|
+ >
|
|
|
+ {{ item.platformName }}
|
|
|
+ </van-checkbox>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
- <van-field v-model.number="item.platformTime" label="申请时长(月)" placeholder="申请时长(月)" type="number" :disabled="!item.isChecked">
|
|
|
+ <van-field
|
|
|
+ v-model.number="item.platformTime"
|
|
|
+ label="申请时长(月)"
|
|
|
+ placeholder="申请时长(月)"
|
|
|
+ type="number"
|
|
|
+ :disabled="!item.isChecked"
|
|
|
+ >
|
|
|
<template #extra>个月</template>
|
|
|
</van-field>
|
|
|
<template v-if="item.platformType == '10'">
|
|
|
- <van-field v-model="item.cellType" label="拟培养细胞种类" placeholder="拟培养细胞种类" :disabled="!item.isChecked" />
|
|
|
- <van-field v-model="item.cellType" label="细胞房预约需求" placeholder="细胞房预约需求">
|
|
|
+ <van-field
|
|
|
+ v-model="item.cellType"
|
|
|
+ label="拟培养细胞种类"
|
|
|
+ placeholder="拟培养细胞种类"
|
|
|
+ :disabled="!item.isChecked"
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ v-model="item.cellType"
|
|
|
+ label="细胞房预约需求"
|
|
|
+ placeholder="细胞房预约需求"
|
|
|
+ >
|
|
|
<template #input>
|
|
|
- <van-radio-group v-model="item.cellSourceType" :disabled="!item.isChecked" direction="horizontal">
|
|
|
- <van-radio v-for="o in item.platformResourceType" :name="o.dictValue">{{ o.dictLabel }}</van-radio>
|
|
|
+ <van-radio-group
|
|
|
+ v-model="item.cellSourceType"
|
|
|
+ :disabled="!item.isChecked"
|
|
|
+ direction="horizontal"
|
|
|
+ >
|
|
|
+ <van-radio
|
|
|
+ v-for="o in item.platformResourceType"
|
|
|
+ :name="o.dictValue"
|
|
|
+ >
|
|
|
+ {{ o.dictLabel }}
|
|
|
+ </van-radio>
|
|
|
</van-radio-group>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
</template>
|
|
|
<template v-else-if="item.platformType == '20'">
|
|
|
- <van-field v-model="item.platOtherNeed" label="其他需求" placeholder="其他需求" :disabled="!item.isChecked" />
|
|
|
+ <van-field
|
|
|
+ v-model="item.platOtherNeed"
|
|
|
+ label="其他需求"
|
|
|
+ placeholder="其他需求"
|
|
|
+ :disabled="!item.isChecked"
|
|
|
+ />
|
|
|
</template>
|
|
|
</van-cell-group>
|
|
|
<h4 class="mb8 mt8">申请人信息</h4>
|
|
|
<van-cell-group>
|
|
|
- <van-field v-model="state.form.memberName" label="申请人姓名" placeholder="申请人姓名" readonly :rules="[{ required: true }]" />
|
|
|
- <van-field v-model="state.form.memberType" label="人员类型" placeholder="人员类型" readonly :rules="[{ required: true }]">
|
|
|
+ <van-field
|
|
|
+ v-model="state.form.memberName"
|
|
|
+ label="申请人姓名"
|
|
|
+ placeholder="申请人姓名"
|
|
|
+ readonly
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ v-model="state.form.memberType"
|
|
|
+ label="人员类型"
|
|
|
+ placeholder="人员类型"
|
|
|
+ readonly
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ >
|
|
|
<template #input>{{ getDictLabel(userTypeList, state.form.memberType) }}</template>
|
|
|
</van-field>
|
|
|
- <van-field v-model="state.form.memberPhone" label="申请人手机号" placeholder="申请人手机号" readonly />
|
|
|
- <van-field v-model="state.form.deptName" label="申请人科室" placeholder="申请人科室" readonly />
|
|
|
- <van-field v-model="state.form.pgName" label="课题组" placeholder="课题组" readonly :rules="[{ required: true }]" />
|
|
|
+ <van-field
|
|
|
+ v-model="state.form.memberPhone"
|
|
|
+ label="申请人手机号"
|
|
|
+ placeholder="申请人手机号"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ v-model="state.form.deptName"
|
|
|
+ label="申请人科室"
|
|
|
+ placeholder="申请人科室"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ v-model="state.form.pgName"
|
|
|
+ label="课题组"
|
|
|
+ placeholder="课题组"
|
|
|
+ readonly
|
|
|
+ :rules="[{ required: true }]"
|
|
|
+ />
|
|
|
</van-cell-group>
|
|
|
<h4 class="mb8 mt8">安全承诺</h4>
|
|
|
- <van-checkbox v-model="state.safePromise">本人承诺:如时候遵守实验室及个平台的各项规章制度,遵守在室的积分管理制度。</van-checkbox>
|
|
|
+ <van-checkbox v-model="state.safePromise">
|
|
|
+ 本人承诺:如时候遵守实验室及个平台的各项规章制度,遵守在室的积分管理制度。
|
|
|
+ </van-checkbox>
|
|
|
<!-- <h4 class="mb8 mt8">安全承诺</h4>
|
|
|
<van-checkbox v-model="state.safePromise">本人承诺:如时候遵守实验室及个平台的各项规章制度,遵守在室的积分管理制度。</van-checkbox>
|
|
|
<van-checkbox v-model="state.safeRead" :disabled="!state.isRead">
|
|
|
@@ -64,15 +139,27 @@
|
|
|
</div> -->
|
|
|
|
|
|
<van-action-bar placeholder>
|
|
|
- <van-action-bar-icon icon="wap-home-o" text="首页" @click="router.push('/home')" />
|
|
|
- <van-action-bar-icon icon="revoke" text="返回" @click="router.push('/entry')" />
|
|
|
+ <van-action-bar-icon
|
|
|
+ icon="wap-home-o"
|
|
|
+ text="首页"
|
|
|
+ @click="router.push('/home')"
|
|
|
+ />
|
|
|
+ <van-action-bar-icon
|
|
|
+ icon="revoke"
|
|
|
+ text="返回"
|
|
|
+ @click="router.push('/entry')"
|
|
|
+ />
|
|
|
<!-- <van-action-bar-icon
|
|
|
:icon="state.instDetail.following ? 'star' : 'star-o'"
|
|
|
:class="{ follow: state.instDetail.following }"
|
|
|
:text="state.instDetail.following ? '取消收藏' : '收藏'"
|
|
|
@click="handleFollowInst"
|
|
|
/> -->
|
|
|
- <van-action-bar-button type="primary" text="立即预约" native-type="submit" />
|
|
|
+ <van-action-bar-button
|
|
|
+ type="primary"
|
|
|
+ text="立即预约"
|
|
|
+ native-type="submit"
|
|
|
+ />
|
|
|
</van-action-bar>
|
|
|
</van-form>
|
|
|
</div>
|
|
|
@@ -81,12 +168,28 @@
|
|
|
<div class="ck-editor" v-html="noticeInfo.noticeContent"></div>
|
|
|
</van-dialog> -->
|
|
|
|
|
|
- <van-popup v-model:show="state.needToKnowShow" round :closeable="true" position="bottom" :style="{ height: '90vh' }">
|
|
|
+ <van-popup
|
|
|
+ v-model:show="state.needToKnowShow"
|
|
|
+ round
|
|
|
+ :closeable="true"
|
|
|
+ position="bottom"
|
|
|
+ :style="{ height: '90vh' }"
|
|
|
+ >
|
|
|
<div class="need-to-know">
|
|
|
<h4 class="mt8 mb8">申请须知</h4>
|
|
|
- <div class="ck-editor" v-html="noticeInfo.noticeContent"></div>
|
|
|
+ <div
|
|
|
+ class="ck-editor"
|
|
|
+ v-html="noticeInfo.noticeContent"
|
|
|
+ ></div>
|
|
|
<footer>
|
|
|
- <van-button class="w100" type="primary" round @click="confirmAppoint">我知道了</van-button>
|
|
|
+ <van-button
|
|
|
+ class="w100"
|
|
|
+ type="primary"
|
|
|
+ round
|
|
|
+ @click="confirmAppoint"
|
|
|
+ >
|
|
|
+ 我知道了
|
|
|
+ </van-button>
|
|
|
</footer>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
@@ -148,14 +251,14 @@
|
|
|
cellSourceType: '',
|
|
|
isMolecularChecked: '20',
|
|
|
molecularTime: null,
|
|
|
- platOtherNeed: ''
|
|
|
+ platOtherNeed: '',
|
|
|
},
|
|
|
- needToKnowShow: false
|
|
|
+ needToKnowShow: false,
|
|
|
})
|
|
|
const noticeShow = ref(false)
|
|
|
const noticeInfo = reactive({
|
|
|
noticeTitle: '',
|
|
|
- noticeContent: ''
|
|
|
+ noticeContent: '',
|
|
|
})
|
|
|
const createEntryPayload = ref({})
|
|
|
|
|
|
@@ -168,17 +271,22 @@
|
|
|
state.needToKnowShow = false
|
|
|
showNotify({
|
|
|
type: 'success',
|
|
|
- message: '入室申请创建成功'
|
|
|
+ message: '入室申请创建成功',
|
|
|
})
|
|
|
|
|
|
router.push('/entry')
|
|
|
}
|
|
|
|
|
|
const getDicts = async () => {
|
|
|
- await Promise.all([dictApi.getDictDataByType('sys_user_type'), platformApi.getAllPlatformList({ noPage: true })]).then(([type, plat]) => {
|
|
|
+ await Promise.all([
|
|
|
+ dictApi.getDictDataByType('sys_user_type'),
|
|
|
+ platformApi.getAllPlatformList({ noPage: true }),
|
|
|
+ ]).then(([type, plat]) => {
|
|
|
userTypeList.value = type.data.values || []
|
|
|
const platList = plat?.data?.list || []
|
|
|
- platformList.value = platList.map((item: any) => {
|
|
|
+ const moleculesAndCells = platList.filter((item) => item.platformType === '10' || item.platformType === '20')
|
|
|
+
|
|
|
+ platformList.value = moleculesAndCells.map((item: any) => {
|
|
|
const options = JSON.parse(item.platformResourceType)
|
|
|
return {
|
|
|
isChecked: false,
|
|
|
@@ -190,7 +298,7 @@
|
|
|
cellSourceType: options?.length ? options[0].dictValue : '',
|
|
|
platOtherNeed: '',
|
|
|
platformResourceType: options,
|
|
|
- platformDesc: item.platformDesc
|
|
|
+ platformDesc: item.platformDesc,
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -222,7 +330,7 @@
|
|
|
cellSourceType: '',
|
|
|
isMolecularChecked: '20',
|
|
|
molecularTime: null,
|
|
|
- platOtherNeed: ''
|
|
|
+ platOtherNeed: '',
|
|
|
}
|
|
|
state.form.memberId = userInfos.value.id
|
|
|
state.form.memberName = userInfos.value.nickName
|
|
|
@@ -241,7 +349,7 @@
|
|
|
} else {
|
|
|
showNotify({
|
|
|
message: '当前用户未加入课题组,无法发起入室申请',
|
|
|
- type: 'danger'
|
|
|
+ type: 'danger',
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -257,11 +365,11 @@
|
|
|
}
|
|
|
}
|
|
|
const onSubmit = async (type: string) => {
|
|
|
- onRead();
|
|
|
+ onRead()
|
|
|
if (!state.safePromise) {
|
|
|
showNotify({
|
|
|
type: 'warning',
|
|
|
- message: '请阅读并勾选安全承诺!'
|
|
|
+ message: '请阅读并勾选安全承诺!',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
@@ -273,13 +381,13 @@
|
|
|
params.platformList = arr.map((item: any) => {
|
|
|
return {
|
|
|
...item,
|
|
|
- isChecked: '10'
|
|
|
+ isChecked: '10',
|
|
|
}
|
|
|
})
|
|
|
if (!params.platformList.length) {
|
|
|
showNotify({
|
|
|
type: 'warning',
|
|
|
- message: '请选择平台'
|
|
|
+ message: '请选择平台',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
@@ -287,7 +395,7 @@
|
|
|
if (!item.platformTime) {
|
|
|
showNotify({
|
|
|
type: 'warning',
|
|
|
- message: '请选择平台预约时间'
|
|
|
+ message: '请选择平台预约时间',
|
|
|
})
|
|
|
return
|
|
|
}
|