检查名称配置更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3167c2bea7
commit
a5f16c866d
|
@ -110,4 +110,12 @@ export function addOrUpdateTrialBodyPart(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改检查名称列表
|
||||||
|
export function updateTrialStudyNameList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/updateTrialStudyNameList`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -912,10 +912,19 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button type="primary" @click="addOrUpdateTrialStudyName">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="addOrUpdateTrialStudyName"
|
||||||
|
:loading="studyNameLoading"
|
||||||
|
>
|
||||||
{{ $t('common:button:confirm') }}
|
{{ $t('common:button:confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="addStudyName_model.visible = false">
|
<el-button
|
||||||
|
@click="
|
||||||
|
;(addStudyName_model.visible = false),
|
||||||
|
(addStudyNameForm.Name = null)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ $t('common:button:cancel') }}
|
{{ $t('common:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -933,6 +942,7 @@ import {
|
||||||
ConfigTrialBasicInfoConfirm,
|
ConfigTrialBasicInfoConfirm,
|
||||||
getTrialBodyPartList,
|
getTrialBodyPartList,
|
||||||
addOrUpdateTrialBodyPart,
|
addOrUpdateTrialBodyPart,
|
||||||
|
updateTrialStudyNameList,
|
||||||
} from '@/api/trials/setting'
|
} from '@/api/trials/setting'
|
||||||
import SignForm from '@/views/trials/components/newSignForm'
|
import SignForm from '@/views/trials/components/newSignForm'
|
||||||
import ClinicalDataForm from './clinicalDataForm'
|
import ClinicalDataForm from './clinicalDataForm'
|
||||||
|
@ -1094,6 +1104,7 @@ export default {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
appendToBody: true,
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
|
studyNameLoading: false,
|
||||||
addBodyPartForm: {
|
addBodyPartForm: {
|
||||||
bodyPartStr: null,
|
bodyPartStr: null,
|
||||||
Id: null,
|
Id: null,
|
||||||
|
@ -1328,13 +1339,51 @@ export default {
|
||||||
if (!validate) return
|
if (!validate) return
|
||||||
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
|
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
|
||||||
let data = { ...this.addStudyNameForm }
|
let data = { ...this.addStudyNameForm }
|
||||||
this.trialStudyNameList.push(data)
|
let arr = []
|
||||||
|
this.trialStudyNameList.forEach((item) => {
|
||||||
|
let obj = {
|
||||||
|
EnName: item.EnName,
|
||||||
|
Name: item.EnName,
|
||||||
|
IsChoose: false,
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
})
|
||||||
|
arr.push(data)
|
||||||
|
|
||||||
|
this.studyNameLoading = true
|
||||||
|
let res = await this.updateStudyNameList(arr)
|
||||||
|
this.studyNameLoading = false
|
||||||
|
if (!res)
|
||||||
|
return this.$message.warning(
|
||||||
|
this.$t('trials:seeting:message:addStudyNameFail')
|
||||||
|
)
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('trials:seeting:message:addStudyNameSucccess')
|
||||||
|
)
|
||||||
this.addStudyNameForm = {
|
this.addStudyNameForm = {
|
||||||
EnName: null,
|
EnName: null,
|
||||||
Name: null,
|
Name: null,
|
||||||
IsChoose: false,
|
IsChoose: false,
|
||||||
}
|
}
|
||||||
this.addStudyName_model.visible = false
|
this.addStudyName_model.visible = false
|
||||||
|
// this.getStudyNameList()
|
||||||
|
this.trialStudyNameList.push(data)
|
||||||
|
},
|
||||||
|
async updateStudyNameList(StudyNameList) {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
StudyNameList,
|
||||||
|
}
|
||||||
|
let res = await updateTrialStudyNameList(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 编辑检查部位
|
// 编辑检查部位
|
||||||
handleEditBodyPart(item) {
|
handleEditBodyPart(item) {
|
||||||
|
@ -1344,11 +1393,33 @@ export default {
|
||||||
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
||||||
this.addBodyPart_model.visible = true
|
this.addBodyPart_model.visible = true
|
||||||
},
|
},
|
||||||
handleDelStudyName(item) {
|
async handleDelStudyName(item) {
|
||||||
let index = this.trialStudyNameList.findIndex(
|
let index = this.trialStudyNameList.findIndex(
|
||||||
(data) => item.Name === data.Name
|
(data) => item.Name === data.Name
|
||||||
)
|
)
|
||||||
|
let arr = []
|
||||||
|
this.trialStudyNameList.forEach((item, i) => {
|
||||||
|
if (index !== i) {
|
||||||
|
let obj = {
|
||||||
|
EnName: item.EnName,
|
||||||
|
Name: item.EnName,
|
||||||
|
IsChoose: false,
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.listLoading = true
|
||||||
|
let res = await this.updateStudyNameList(arr)
|
||||||
|
this.listLoading = false
|
||||||
|
if (!res)
|
||||||
|
return this.$message.warning(
|
||||||
|
this.$t('trials:seeting:message:delStudyNameFail')
|
||||||
|
)
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('trials:seeting:message:delStudyNameSucccess')
|
||||||
|
)
|
||||||
this.trialStudyNameList.splice(index, 1)
|
this.trialStudyNameList.splice(index, 1)
|
||||||
|
// this.getStudyNameList()
|
||||||
},
|
},
|
||||||
handleSetBodyPart() {
|
handleSetBodyPart() {
|
||||||
this.bodyPartListVisible = true
|
this.bodyPartListVisible = true
|
||||||
|
@ -1835,7 +1906,9 @@ export default {
|
||||||
this.form.ClinicalDataSetNames.join(', ')
|
this.form.ClinicalDataSetNames.join(', ')
|
||||||
}
|
}
|
||||||
this.getClinicalDataList(true)
|
this.getClinicalDataList(true)
|
||||||
this.$message.success('删除成功!')
|
this.$message.success(
|
||||||
|
this.$t('common:message:deletedSuccessfully')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
Loading…
Reference in New Issue