检查部位读取方式变更
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-06-05 17:52:13 +08:00
parent e1dfbb5d74
commit 93b0621ba1
15 changed files with 108 additions and 54 deletions

View File

@ -14,17 +14,19 @@ export function getHospitalList() {
}) })
} }
export function getAllSponsorList() { export function getAllSponsorList(params) {
return request({ return request({
url: '/sponsor/getAllSponsorList', url: '/sponsor/getAllSponsorList',
method: 'get' method: 'get',
params
}) })
} }
export function getAllCROList() { export function getAllCROList(params) {
return request({ return request({
url: '/cro/getAllCROList', url: '/cro/getAllCROList',
method: 'get' method: 'get',
params
}) })
} }
export function getAllSiteList() { export function getAllSiteList() {

View File

@ -24,7 +24,6 @@ Vue.use(VueClipboard)
// import htmlToPdf from './utils/htmlToPdf' // import htmlToPdf from './utils/htmlToPdf'
// Vue.use(htmlToPdf) // Vue.use(htmlToPdf)
import permission from './utils/permission' import permission from './utils/permission'
import { OSSclient } from './utils/oss'
Vue.use(permission) Vue.use(permission)
import Viewer from 'v-viewer' import Viewer from 'v-viewer'
@ -80,6 +79,7 @@ import DictTag from '@/components/DictTag'
import DictData from '@/components/DictData' import DictData from '@/components/DictData'
import { getBasicDataSelect } from '@/api/dictionary/dictionary' import { getBasicDataSelect } from '@/api/dictionary/dictionary'
import { checkConfig } from '@/const/check/index' import { checkConfig } from '@/const/check/index'
import { getTrialBodyPartList } from "@/api/trials/setting";
// 全局方法挂载 // 全局方法挂载
var $q = params var $q = params
Vue.prototype.checkConfig = checkConfig Vue.prototype.checkConfig = checkConfig
@ -181,6 +181,24 @@ async function VueInit() {
zhMessages[v.Code] = v.ValueCN zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value enMessages[v.Code] = v.Value
}) })
// 获取检查部位
Vue.prototype.$getBodyPart = (id) => {
return new Promise(async (resolve, reject) => {
try {
let params = {
TrialId: id
}
let BodyPart = await getTrialBodyPartList(params)
if (BodyPart.IsSuccess) {
resolve(BodyPart.Result);
} else {
reject(BodyPart);
}
} catch (err) {
reject(err)
}
})
}
i18n.mergeLocaleMessage('zh', zhMessages) i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages) i18n.mergeLocaleMessage('en', enMessages)
Vue.use(ElementUI, { Vue.use(ElementUI, {
@ -210,15 +228,17 @@ async function VueInit() {
return dictInfo return dictInfo
}() }()
Vue.prototype.$d = d Vue.prototype.$d = d
Vue.prototype.$fd = function (code, v, type) { Vue.prototype.$fd = function (code, v, type, arr, key = 'label') {
try { try {
let data = arr || d;
type = type || 'value';
console.log(data,type,key,code)
// code === 'YesOrNo' ? console.log(d) : '' // code === 'YesOrNo' ? console.log(d) : ''
type = type || 'value' return data[code].find(i => {
return d[code].find(i => {
return i[type] === v return i[type] === v
}) ? d[code].find(i => { }) ? data[code].find(i => {
return i[type] === v return i[type] === v
}).label : '' })[key] : ''
} catch (e) { } catch (e) {
} }
} }

View File

@ -96,7 +96,7 @@ export default {
// //
}, },
methods: { methods: {
getBodyPart(bodyPart) { async getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return ''
var separator = ',' var separator = ','
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf('|') > -1) {
@ -107,8 +107,9 @@ export default {
separator = '' separator = ''
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
let bp = await this.$getBodyPart(this.$route.query.trialId)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
}, },

View File

@ -17,7 +17,10 @@
:label="$t('trials:trials-list:form:trialId')" :label="$t('trials:trials-list:form:trialId')"
prop="TrialCode" prop="TrialCode"
> >
<el-input v-model="trialForm.TrialCode" @keyup.native="trialCodekeyUp"/> <el-input
v-model="trialForm.TrialCode"
@keyup.native="trialCodekeyUp"
/>
</el-form-item> </el-form-item>
<!-- 项目类型 --> <!-- 项目类型 -->
<el-form-item <el-form-item
@ -356,7 +359,6 @@
</el-form> </el-form>
</template> </template>
<script> <script>
import store from "@/store";
import { mapState } from "vuex"; import { mapState } from "vuex";
import { getTrialInfo, addOrUpdateTrial } from "@/api/trials"; import { getTrialInfo, addOrUpdateTrial } from "@/api/trials";
import { getBasicDataSelects } from "@/api/dictionary/dictionary"; import { getBasicDataSelects } from "@/api/dictionary/dictionary";
@ -425,7 +427,7 @@ export default {
message: this.$t("common:ruleMessage:specify"), message: this.$t("common:ruleMessage:specify"),
trigger: "blur", trigger: "blur",
}, },
{ max: 10, message: `${this.$t("common:ruleMessage:maxLength")} 10` } { max: 10, message: `${this.$t("common:ruleMessage:maxLength")} 10` },
], ],
TrialType: [ TrialType: [
{ {
@ -607,7 +609,10 @@ export default {
}, },
async getAllSponsorList() { async getAllSponsorList() {
try { try {
let res = await getAllSponsorList(); let params = {
TrialId: this.trialId,
};
let res = await getAllSponsorList(params);
if (res.IsSuccess) { if (res.IsSuccess) {
this.sponsorList = res.Result; this.sponsorList = res.Result;
} }
@ -617,7 +622,10 @@ export default {
}, },
async getAllCROList() { async getAllCROList() {
try { try {
let res = await getAllCROList(); let params = {
TrialId: this.trialId,
};
let res = await getAllCROList(params);
if (res.IsSuccess) { if (res.IsSuccess) {
this.croList = res.Result; this.croList = res.Result;
} }
@ -744,7 +752,7 @@ export default {
this.trialForm.PlanVisitCount = val * this.trialForm.ExpectedPatients; this.trialForm.PlanVisitCount = val * this.trialForm.ExpectedPatients;
}, },
trialCodekeyUp(e) { trialCodekeyUp(e) {
e.target.value = e.target.value.replace(/[%]/g, '') e.target.value = e.target.value.replace(/[%]/g, "");
}, },
async initPage() { async initPage() {
this.loading = true; this.loading = true;

View File

@ -174,7 +174,7 @@ export default {
preview() { preview() {
this.previewVisible = true this.previewVisible = true
}, },
getBodyPart(bodyPart) { async getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return ''
var separator = ',' var separator = ','
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf('|') > -1) {
@ -185,8 +185,9 @@ export default {
separator = '' separator = ''
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
let bp = await this.$getBodyPart(this.$route.query.trialId)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
} }

View File

@ -267,7 +267,7 @@ export default {
}) })
window.open(routeData.href, '_blank') window.open(routeData.href, '_blank')
}, },
getBodyPart(bodyPart) { async getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return ''
var separator = ',' var separator = ','
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf('|') > -1) {
@ -278,8 +278,9 @@ export default {
separator = '' separator = ''
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
let bp = await this.$getBodyPart(this.$route.query.trialId)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
} }

View File

@ -476,7 +476,7 @@ export default {
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
getBodyPart(bodyPart) { async getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return ''
var separator = ',' var separator = ','
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf('|') > -1) {
@ -487,8 +487,9 @@ export default {
separator = '' separator = ''
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
let bp = await this.$getBodyPart(this.$route.query.trialId)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
}, },

View File

@ -235,7 +235,7 @@ export default {
}) })
this.open = window.open(routeData.href, '_blank') this.open = window.open(routeData.href, '_blank')
}, },
getBodyPart(bodyPart) { async getBodyPart(bodyPart) {
if (!bodyPart) return '' if (!bodyPart) return ''
var separator = ',' var separator = ','
if (bodyPart.indexOf('|') > -1) { if (bodyPart.indexOf('|') > -1) {
@ -246,8 +246,9 @@ export default {
separator = '' separator = ''
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
let bp = await this.$getBodyPart(this.$route.query.trialId)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
}, },

View File

@ -46,7 +46,7 @@
{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication}} {{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:modality')"> <el-descriptions-item :label="$t('trials:trials-list:form:modality')">
{{trialInfo.ModalityList}} {{trialInfo.Modalitys}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:siteCount')"> <el-descriptions-item :label="$t('trials:trials-list:form:siteCount')">
{{ trialInfo.PlanSiteCount }} {{ trialInfo.PlanSiteCount }}

View File

@ -223,7 +223,7 @@
v-for="bodyPart in trialBodyPartTypes" v-for="bodyPart in trialBodyPartTypes"
:key="bodyPart" :key="bodyPart"
:label="bodyPart" :label="bodyPart"
>{{ $fd("Bodypart", bodyPart) }}</el-checkbox >{{ $fd("Bodypart", bodyPart,'Code',BodyPart,'Name') }}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -330,10 +330,13 @@ export default {
// pet-ctlinc // pet-ctlinc
petVisible: false, petVisible: false,
rowData: {}, rowData: {},
BodyPart:{}
}; };
}, },
mounted() { async mounted() {
this.getStudyInfo(); this.getStudyInfo();
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
}, },
methods: { methods: {
// //
@ -481,9 +484,9 @@ export default {
separator = ""; separator = "";
} }
var arr = bodyPart.split(separator); var arr = bodyPart.split(separator);
var newArr = arr.map((i) => { var newArr = arr.map(i => {
return this.$fd("Bodypart", i.trim()); return this.$fd('Bodypart', i.trim(),'Code',this.BodyPart,'Name')
}); })
return newArr.join(" | "); return newArr.join(" | ");
}, },
// //

View File

@ -419,7 +419,7 @@
]" ]"
> >
<el-checkbox-group v-model="studyForm.BodyPartForEdit"> <el-checkbox-group v-model="studyForm.BodyPartForEdit">
<el-checkbox v-for="bodyPart in trialBodyPartTypes" :key="bodyPart" :label="bodyPart">{{$fd('Bodypart',bodyPart)}}</el-checkbox> <el-checkbox v-for="bodyPart in trialBodyPartTypes" :key="bodyPart" :label="bodyPart">{{$fd("Bodypart", bodyPart,'Code',BodyPart,'Name')}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<!-- 序列数量 --> <!-- 序列数量 -->
@ -515,10 +515,12 @@ export default {
relationInfo: null, relationInfo: null,
trialBodyPartTypes: [], trialBodyPartTypes: [],
trialModalitys: [], trialModalitys: [],
BodyPart:{}
} }
}, },
mounted() { async mounted() {
this.trialId = this.$route.query.trialId this.trialId = this.$route.query.trialId
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
if (Object.keys(this.data).length) { if (Object.keys(this.data).length) {
this.form = { ...this.data } this.form = { ...this.data }
} }
@ -1183,7 +1185,7 @@ export default {
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',this.BodyPart,'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
} }

View File

@ -560,7 +560,7 @@
:visible.sync="previewVisible" :visible.sync="previewVisible"
append-to-body append-to-body
> >
<DicomPreview :uid="uid" :studyList="uploadQueues"/> <DicomPreview :uid="uid" :studyList="uploadQueues" />
</el-dialog> </el-dialog>
<!--pet-ct临床数据上传--> <!--pet-ct临床数据上传-->
<el-dialog <el-dialog
@ -683,7 +683,9 @@
v-for="bodyPart in trialBodyPartTypes" v-for="bodyPart in trialBodyPartTypes"
:key="bodyPart" :key="bodyPart"
:label="bodyPart" :label="bodyPart"
>{{ $fd("Bodypart", bodyPart) }}</el-checkbox >{{
$fd("Bodypart", bodyPart, "Code", BodyPart, "Name")
}}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -822,10 +824,12 @@ export default {
// pet-ct // pet-ct
petVisible: false, petVisible: false,
studyData: [], studyData: [],
BodyPart: {},
}; };
}, },
mounted() { async mounted() {
this.trialId = this.$route.query.trialId; this.trialId = this.$route.query.trialId;
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId);
if (Object.keys(this.data).length) { if (Object.keys(this.data).length) {
this.form = { ...this.data }; this.form = { ...this.data };
} }
@ -900,6 +904,7 @@ export default {
this.trialBodyPartTypes = this.relationInfo.BodyPartTypes this.trialBodyPartTypes = this.relationInfo.BodyPartTypes
? this.relationInfo.BodyPartTypes.split("|") ? this.relationInfo.BodyPartTypes.split("|")
: []; : [];
console.log(this.trialBodyPartTypes);
this.trialModalitys = this.relationInfo.Modalitys this.trialModalitys = this.relationInfo.Modalitys
? this.relationInfo.Modalitys.split("|") ? this.relationInfo.Modalitys.split("|")
: []; : [];
@ -1963,7 +1968,7 @@ export default {
} }
var arr = bodyPart.split(separator); var arr = bodyPart.split(separator);
var newArr = arr.map((i) => { var newArr = arr.map((i) => {
return this.$fd("Bodypart", i.trim()); return this.$fd("Bodypart", i.trim(), "Code", this.BodyPart,'Name');
}); });
return newArr.join(" | "); return newArr.join(" | ");
}, },

View File

@ -194,7 +194,7 @@
]" ]"
> >
<el-checkbox-group v-model="form.BodyParts"> <el-checkbox-group v-model="form.BodyParts">
<el-checkbox v-for="bodyPart in trialBodyPartTypes" :key="bodyPart" :label="bodyPart">{{$fd('Bodypart',bodyPart)}}</el-checkbox> <el-checkbox v-for="bodyPart in trialBodyPartTypes" :key="bodyPart" :label="bodyPart">{{$fd("Bodypart", bodyPart,'Code',BodyPart,'Name')}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<!-- 检查日期 --> <!-- 检查日期 -->
@ -432,10 +432,12 @@ export default {
type: '', type: '',
uploadVideoVisible: false, uploadVideoVisible: false,
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
moment moment,
} BodyPart:{}
};
}, },
mounted() { async mounted() {
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId)
this.getNoneDicomList() this.getNoneDicomList()
this.trialBodyPartTypes = this.bodyParts ? this.bodyParts.split('|') : [] this.trialBodyPartTypes = this.bodyParts ? this.bodyParts.split('|') : []
this.trialModalitys = this.modalities ? this.modalities.split('|') : [] this.trialModalitys = this.modalities ? this.modalities.split('|') : []
@ -775,7 +777,7 @@ export default {
} }
var arr = bodyPart.split(separator) var arr = bodyPart.split(separator)
var newArr = arr.map(i => { var newArr = arr.map(i => {
return this.$fd('Bodypart', i.trim()) return this.$fd('Bodypart', i.trim(),'Code',this.BodyPart,'Name')
}) })
return newArr.join(' | ') return newArr.join(' | ')
} }

View File

@ -237,7 +237,7 @@ export default {
}); });
window.open(routeData.href, "_blank"); window.open(routeData.href, "_blank");
}, },
getBodyPart(bodyPart) { async getBodyPart(bodyPart) {
if (!bodyPart) return ""; if (!bodyPart) return "";
var separator = ","; var separator = ",";
if (bodyPart.indexOf("|") > -1) { if (bodyPart.indexOf("|") > -1) {
@ -248,9 +248,10 @@ export default {
separator = ""; separator = "";
} }
var arr = bodyPart.split(separator); var arr = bodyPart.split(separator);
var newArr = arr.map((i) => { let bp = await this.$getBodyPart(this.$route.query.trialId)
return this.$fd("Bodypart", i.trim()); var newArr = arr.map(i => {
}); return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:bp},'Name')
})
return newArr.join(" | "); return newArr.join(" | ");
}, },
// //

View File

@ -815,7 +815,9 @@
v-for="bodyPart in trialBodyPartTypes" v-for="bodyPart in trialBodyPartTypes"
:key="bodyPart" :key="bodyPart"
:label="bodyPart" :label="bodyPart"
>{{ $fd("Bodypart", bodyPart) }}</el-checkbox >{{
$fd("Bodypart", bodyPart, "Code", BodyPart, "Name")
}}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -953,7 +955,9 @@
v-for="bodyPart in trialBodyPartTypes" v-for="bodyPart in trialBodyPartTypes"
:key="bodyPart" :key="bodyPart"
:label="bodyPart" :label="bodyPart"
>{{ $fd("Bodypart", bodyPart) }}</el-checkbox >{{
$fd("Bodypart", bodyPart, "Code", BodyPart, "Name")
}}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -1302,9 +1306,11 @@ export default {
petVisible: false, petVisible: false,
rowData: {}, rowData: {},
IsHaveStudyClinicalData: false, IsHaveStudyClinicalData: false,
BodyPart: {},
}; };
}, },
mounted() { async mounted() {
this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId);
if (this.disabled) { if (this.disabled) {
this.isAudit = true; this.isAudit = true;
this.currentQCType = this.qType; this.currentQCType = this.qType;
@ -2215,7 +2221,7 @@ export default {
} }
var arr = bodyPart.split(separator); var arr = bodyPart.split(separator);
var newArr = arr.map((i) => { var newArr = arr.map((i) => {
return this.$fd("Bodypart", i.trim()); return this.$fd("Bodypart", i.trim(), "Code", this.BodyPart, "Name");
}); });
return newArr.join(" | "); return newArr.join(" | ");
}, },
@ -2249,8 +2255,8 @@ export default {
padding: 10px; padding: 10px;
} }
} }
::v-deep .tip-i{ ::v-deep .tip-i {
&::before{ &::before {
color: #fff !important; color: #fff !important;
} }
} }