Commit fa60e1d0 by wangzhihui

```

feat(recruitDetail): 添加试岗计划权限过滤功能

- 引入util工具类用于获取本地存储的手机号信息
- 根据创建者手机号过滤试岗计划数据,确保只能查看自己创建的计划
- 更新手机号验证正则表达式,支持更多号段格式
- 修复样式中的空格问题
- 在删除试岗计划时传递需求ID参数以确保正确删除
```
1 parent dbd6f198
...@@ -332,6 +332,7 @@ ...@@ -332,6 +332,7 @@
</template> </template>
<script> <script>
import { util } from 'utils'
import api from '../api' import api from '../api'
// import EmptyCard from '../components/emptyCard/emptyCard' // import EmptyCard from '../components/emptyCard/emptyCard'
import { ImagePreview } from 'vant' import { ImagePreview } from 'vant'
...@@ -551,6 +552,7 @@ export default { ...@@ -551,6 +552,7 @@ export default {
} }
}, },
getDetail(id) { getDetail(id) {
let phone = util.getLocalStorage('ww_params_phone')
this.detailLoaded = true this.detailLoaded = true
api api
.getRecruitDetailAPI({ id: id }) .getRecruitDetailAPI({ id: id })
...@@ -582,7 +584,9 @@ export default { ...@@ -582,7 +584,9 @@ export default {
// Format trialOnboardingPlans // Format trialOnboardingPlans
if (trialOnboardingPlans && trialOnboardingPlans.length > 0) { if (trialOnboardingPlans && trialOnboardingPlans.length > 0) {
trialOnboardingPlans = trialOnboardingPlans.map(item => ({ trialOnboardingPlans = trialOnboardingPlans.filter(item => {
return item.createdPhone == phone
}).map(item => ({
...item, ...item,
trialTime: this.formatDate(item.trialTime) trialTime: this.formatDate(item.trialTime)
})) }))
...@@ -767,7 +771,7 @@ export default { ...@@ -767,7 +771,7 @@ export default {
if (!trialFormData.personName.trim()) { if (!trialFormData.personName.trim()) {
return this.$toast('请输入人员姓名') return this.$toast('请输入人员姓名')
} }
if (!/^1\d{10}$/.test(trialFormData.phoneNumber)) { if (!/^(13\d|15\d|16\d|17\d|18\d|19\d|14\d)\d{8}$/.test(trialFormData.phoneNumber)) {
return this.$toast('请输入正确的11位手机号') return this.$toast('请输入正确的11位手机号')
} }
if (!trialFormData.channelType) { if (!trialFormData.channelType) {
...@@ -811,7 +815,7 @@ export default { ...@@ -811,7 +815,7 @@ export default {
title: '提示', title: '提示',
message: '确认删除该试岗计划吗?' message: '确认删除该试岗计划吗?'
}).then(() => { }).then(() => {
api.deleteTrialPlanAPI({ id }).then(res => { api.deleteTrialPlanAPI({ id, demandId: this.curDataId }).then(res => {
if (res == true || (res && res.code == 0)) { if (res == true || (res && res.code == 0)) {
this.$toast.success('删除成功') this.$toast.success('删除成功')
this.getDetail(this.curDataId) this.getDetail(this.curDataId)
...@@ -1190,7 +1194,7 @@ export default { ...@@ -1190,7 +1194,7 @@ export default {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
height:30px; height: 30px;
} }
.btn_edit { .btn_edit {
...@@ -1488,8 +1492,10 @@ export default { ...@@ -1488,8 +1492,10 @@ export default {
} }
} }
} }
.value_box{
.value_box {
display: flex; display: flex;
align-items: center; align-items: center;
} }
}</style> }
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!