检查名称配置更改
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
|
||||
})
|
||||
}
|
||||
// 修改检查名称列表
|
||||
export function updateTrialStudyNameList(data) {
|
||||
return request({
|
||||
url: `/TrialConfig/updateTrialStudyNameList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -912,10 +912,19 @@
|
|||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button type="primary" @click="addOrUpdateTrialStudyName">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="addOrUpdateTrialStudyName"
|
||||
:loading="studyNameLoading"
|
||||
>
|
||||
{{ $t('common:button:confirm') }}
|
||||
</el-button>
|
||||
<el-button @click="addStudyName_model.visible = false">
|
||||
<el-button
|
||||
@click="
|
||||
;(addStudyName_model.visible = false),
|
||||
(addStudyNameForm.Name = null)
|
||||
"
|
||||
>
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -933,6 +942,7 @@ import {
|
|||
ConfigTrialBasicInfoConfirm,
|
||||
getTrialBodyPartList,
|
||||
addOrUpdateTrialBodyPart,
|
||||
updateTrialStudyNameList,
|
||||
} from '@/api/trials/setting'
|
||||
import SignForm from '@/views/trials/components/newSignForm'
|
||||
import ClinicalDataForm from './clinicalDataForm'
|
||||
|
@ -1094,6 +1104,7 @@ export default {
|
|||
width: '500px',
|
||||
appendToBody: true,
|
||||
},
|
||||
studyNameLoading: false,
|
||||
addBodyPartForm: {
|
||||
bodyPartStr: null,
|
||||
Id: null,
|
||||
|
@ -1328,13 +1339,51 @@ export default {
|
|||
if (!validate) return
|
||||
this.addStudyNameForm.EnName = this.addStudyNameForm.Name
|
||||
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 = {
|
||||
EnName: null,
|
||||
Name: null,
|
||||
IsChoose: 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) {
|
||||
|
@ -1344,11 +1393,33 @@ export default {
|
|||
this.addBodyPart_model.title = this.$t('trials:setting:button:edit')
|
||||
this.addBodyPart_model.visible = true
|
||||
},
|
||||
handleDelStudyName(item) {
|
||||
async handleDelStudyName(item) {
|
||||
let index = this.trialStudyNameList.findIndex(
|
||||
(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.getStudyNameList()
|
||||
},
|
||||
handleSetBodyPart() {
|
||||
this.bodyPartListVisible = true
|
||||
|
@ -1835,7 +1906,9 @@ export default {
|
|||
this.form.ClinicalDataSetNames.join(', ')
|
||||
}
|
||||
this.getClinicalDataList(true)
|
||||
this.$message.success('删除成功!')
|
||||
this.$message.success(
|
||||
this.$t('common:message:deletedSuccessfully')
|
||||
)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
Loading…
Reference in New Issue