From 16f0d72917d2d5465a33fe2a6181a1ba770b4632 Mon Sep 17 00:00:00 2001
From: caiyiling <1321909229@qq.com>
Date: Fri, 14 Jun 2024 10:42:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/research/components/BaseInfo.vue | 19 +++++++++++--------
src/views/research/form.vue | 20 ++++++++++++++------
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/src/views/research/components/BaseInfo.vue b/src/views/research/components/BaseInfo.vue
index aaa8be06..9f5a7d5c 100644
--- a/src/views/research/components/BaseInfo.vue
+++ b/src/views/research/components/BaseInfo.vue
@@ -59,7 +59,7 @@
-
+
-
+
{{ item.label }}
-
+
{{ item.label }}
@@ -95,7 +95,7 @@
{!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' },
+ { required: true, validator: (rule, value, callback) => { !value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback() }, trigger: 'blur' },
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: ['blur', 'change'] }
],
Phone: [
@@ -189,7 +189,8 @@ export default {
btnLoading: false,
state: null,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
- isShow: false
+ isShow: false,
+ notShowFieldList: []
}
},
methods: {
@@ -234,7 +235,7 @@ export default {
},
// 初始化
- async initForm(trialInfo, trialSiteSurvey) {
+ async initForm(trialInfo, trialSiteSurvey, notShowFieldList) {
// 获取项目下的site
const { Result } = await getTrialSiteSelect(this.$route.query.trialId)
this.siteOptions = Result
@@ -258,6 +259,8 @@ export default {
this.form.NotFollowReson = trialSiteSurvey.NotFollowReson
this.state = trialSiteSurvey.State
this.isShow = true
+ if (!notShowFieldList) return
+ this.notShowFieldList = notShowFieldList
},
handleSiteChange(val) {
var selected = this.siteOptions.find(item => item.TrialSiteId === val)
diff --git a/src/views/research/form.vue b/src/views/research/form.vue
index 49e07022..484ae961 100644
--- a/src/views/research/form.vue
+++ b/src/views/research/form.vue
@@ -93,7 +93,11 @@
{{ $t('trials:equiptResearch:form:precautions') }}
-
+
+
+
+
+
- {{ $t('trials:equiptResearch:form:item1') }}
@@ -203,7 +207,8 @@ export default {
rejectForm: { reason: '' },
btnLoading: false,
isFullscreen: false,
- historyVisible: false
+ historyVisible: false,
+ siteSurveyNoteInfo: null
}
},
mounted() {
@@ -221,9 +226,12 @@ export default {
if (res.Result) {
// this.trialSiteSurveyEquipmentType = res.Result.TrialInfo.TrialSiteSurveyEquipmentType
// this.trialSiteSurveyUserRoles = res.Result.TrialInfo.TrialSiteSurveyUserRoles
+ if (res.Result.SiteSurveyFiledConfig && res.Result.SiteSurveyFiledConfig.ModifyFiledList.length > 0) {
+ this.siteSurveyNoteInfo = res.Result.SiteSurveyFiledConfig.ModifyFiledList.find(i => i.NeedModifyFiled === 'SiteSurveyNote')
+ }
this.state = res.Result.TrialSiteSurvey.State
this.siteId = res.Result.TrialSiteSurvey.TrialSiteId
- this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey)
+ this.$refs['baseResearchInfo'].initForm(res.Result.TrialInfo, res.Result.TrialSiteSurvey, res.Result.SiteSurveyFiledConfig ? res.Result.SiteSurveyFiledConfig.NotShowFieldList : null)
var historicalArr = []
var newArr = []
res.Result.TrialSiteUserSurveyList.map(i => {
@@ -256,7 +264,7 @@ export default {
this.submit(type)
}
},
- submit() {
+ submit(type) {
// 是否确认提交
this.$confirm(this.userTypeEnumInt === 0 ? this.$t('trials:researchForm:message:submitWarning') : this.$t('trials:researchForm:message:submitWarning2'), {
type: 'warning',
@@ -275,9 +283,9 @@ export default {
this.$emit('refreshPage')
}
// this.$message.success(this.$t('common:message:savedSuccessfully'))
- if(type === 'approve'){
+ if (type === 'approve') {
this.$message.success(this.$t('common:message:approvedSuccessfully'))
- }else{
+ } else {
this.$message.success(this.$t('trials:researchForm:message:savedSuccessfully'))
}
}