Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
4bd286ca45
|
@ -94,4 +94,20 @@ export function getTrialJudgyInfo(params) {
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取检查部位列表
|
||||||
|
export function getTrialBodyPartList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/getTrialBodyPartList`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增检查部位
|
||||||
|
export function addOrUpdateTrialBodyPart(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TrialConfig/addOrUpdateTrialBodyPart`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -582,15 +582,23 @@
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
width="400px"
|
width="400px"
|
||||||
>
|
>
|
||||||
<div class="base-dialog-body">
|
<div class="base-dialog-body" style="position: relative">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="addBodyPart_model.visible = true"
|
||||||
|
style="position: absolute; top: 10px; right: 10px; z-index: 9"
|
||||||
|
>
|
||||||
|
{{ $t("common:button:add") }}
|
||||||
|
</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
ref="bodyPartTable"
|
ref="bodyPartTable"
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="$d.Bodypart"
|
:data="trialBodyPartList"
|
||||||
stripe
|
stripe
|
||||||
height="450"
|
height="400"
|
||||||
row-key="id"
|
row-key="Code"
|
||||||
@select="handleBodyPartSelectionChange"
|
@selection-change="handleBodyPartSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
|
@ -599,12 +607,10 @@
|
||||||
:reserve-selection="true"
|
:reserve-selection="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="value"
|
prop="Name"
|
||||||
:label="$t('trials:logincCfg:form:bodypart')"
|
:label="$t('trials:logincCfg:form:bodypart')"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{ scope.row.Name }}</template>
|
||||||
$fd("Bodypart", scope.row.value)
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -683,6 +689,45 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<base-model v-if="addBodyPart_model.visible" :config="addBodyPart_model">
|
||||||
|
<template slot="dialog-body">
|
||||||
|
<el-form
|
||||||
|
ref="addBodyPartForm"
|
||||||
|
:inline="true"
|
||||||
|
:model="addBodyPartForm"
|
||||||
|
class="demo-form-inline"
|
||||||
|
:rules="addBodyPartrules"
|
||||||
|
>
|
||||||
|
<!--受试者编号-->
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:setting:form:bodyPart')"
|
||||||
|
prop="bodyPartStr"
|
||||||
|
label-width="150px"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="addBodyPartForm.bodyPartStr"
|
||||||
|
clearable
|
||||||
|
:maxlength="50"
|
||||||
|
@focus="errMessage = null"
|
||||||
|
></el-input>
|
||||||
|
<span class="errTip" v-if="errMessage">{{ errMessage }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<template slot="dialog-footer">
|
||||||
|
<el-button type="primary" @click="addOrUpdateTrialBodyPart">
|
||||||
|
{{ $t("common:button:confirm") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
(addBodyPart_model.visible = false),
|
||||||
|
(addBodyPartForm.bodyPartStr = null)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ $t("common:button:cancel") }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</base-model>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -692,13 +737,18 @@ import {
|
||||||
deleteClinicalTrialSetData,
|
deleteClinicalTrialSetData,
|
||||||
DownloadTrialClinicalFile,
|
DownloadTrialClinicalFile,
|
||||||
} from "@/api/trials";
|
} from "@/api/trials";
|
||||||
import { ConfigTrialBasicInfoConfirm } from "@/api/trials/setting";
|
import {
|
||||||
|
ConfigTrialBasicInfoConfirm,
|
||||||
|
getTrialBodyPartList,
|
||||||
|
addOrUpdateTrialBodyPart,
|
||||||
|
} 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";
|
||||||
import const_ from "@/const/sign-code";
|
import const_ from "@/const/sign-code";
|
||||||
|
import BaseModel from "@/components/BaseModel";
|
||||||
export default {
|
export default {
|
||||||
name: "LogicalConfig",
|
name: "LogicalConfig",
|
||||||
components: { SignForm, ClinicalDataForm },
|
components: { SignForm, ClinicalDataForm, BaseModel },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
|
@ -822,9 +872,47 @@ export default {
|
||||||
bodyPartListVisible: false,
|
bodyPartListVisible: false,
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
selectedBodyParts: [],
|
selectedBodyParts: [],
|
||||||
|
trialBodyPartList: [],
|
||||||
|
addBodyPart_model: {
|
||||||
|
visible: false,
|
||||||
|
title: this.$t("trials:setting:button:add"),
|
||||||
|
width: "500px",
|
||||||
|
appendToBody: true,
|
||||||
|
},
|
||||||
|
addBodyPartForm: {
|
||||||
|
bodyPartStr: null,
|
||||||
|
},
|
||||||
|
addBodyPartrules: {
|
||||||
|
bodyPartStr: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("trials:setting:format:notBodyPart"),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
let flag = this.trialBodyPartList.some(
|
||||||
|
(item) => item.Name === value
|
||||||
|
);
|
||||||
|
if (flag) {
|
||||||
|
callback(
|
||||||
|
new Error(this.$t("trials:setting:format:hasBodyPart"))
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
message: this.$t("trials:setting:format:hasBodyPart"),
|
||||||
|
trigger: ["blur", "change"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
errMessage: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getTrialBodyPartList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleConfirmModality() {
|
handleConfirmModality() {
|
||||||
this.form.ModalityList = Object.assign(
|
this.form.ModalityList = Object.assign(
|
||||||
|
@ -839,7 +927,6 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.selectedList = val;
|
this.selectedList = val;
|
||||||
console.log(this.selectedList);
|
|
||||||
},
|
},
|
||||||
toggleSelection(rows) {
|
toggleSelection(rows) {
|
||||||
if (rows) {
|
if (rows) {
|
||||||
|
@ -864,12 +951,67 @@ export default {
|
||||||
handleBodyPartSelectionChange(val) {
|
handleBodyPartSelectionChange(val) {
|
||||||
this.selectedBodyParts = val;
|
this.selectedBodyParts = val;
|
||||||
},
|
},
|
||||||
|
// 获取检查部位
|
||||||
|
async getTrialBodyPartList(data) {
|
||||||
|
try {
|
||||||
|
let params = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
};
|
||||||
|
let res = await getTrialBodyPartList(params);
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.trialBodyPartList = res.Result;
|
||||||
|
if (data) {
|
||||||
|
if (this.$refs.bodyPartTable) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
let obj = this.trialBodyPartList.filter(
|
||||||
|
(item) => item.Code === data.Code
|
||||||
|
);
|
||||||
|
console.log(obj);
|
||||||
|
this.$refs.bodyPartTable.toggleRowSelection(obj[0]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 添加检查部位
|
||||||
|
async addOrUpdateTrialBodyPart() {
|
||||||
|
try {
|
||||||
|
this.errMessage = null;
|
||||||
|
let validate = await this.$refs.addBodyPartForm.validate();
|
||||||
|
if (!validate) return;
|
||||||
|
let str = this.addBodyPartForm.bodyPartStr;
|
||||||
|
let data = {
|
||||||
|
Code: str,
|
||||||
|
Name: str,
|
||||||
|
NameCN: str,
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
};
|
||||||
|
let res = await addOrUpdateTrialBodyPart(data);
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getTrialBodyPartList(data);
|
||||||
|
this.$message.success(
|
||||||
|
this.$t("trials:seeting:message:addBodyPartSuccess")
|
||||||
|
);
|
||||||
|
this.addBodyPart_model.visible = false;
|
||||||
|
this.addBodyPartForm.bodyPartStr = null;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
if (err.Code === 5) {
|
||||||
|
this.getTrialBodyPartList();
|
||||||
|
this.errMessage = err.ErrorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
handleSetBodyPart() {
|
handleSetBodyPart() {
|
||||||
this.bodyPartListVisible = true;
|
this.bodyPartListVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
var a = this.$d.Bodypart.filter((v) => {
|
var a = this.trialBodyPartList.filter((v) => {
|
||||||
return !!this.form.BodyPartTypeList.find((v1) => {
|
return !!this.form.BodyPartTypeList.find((v1) => {
|
||||||
return v1 === v.value;
|
return v1 === v.Name;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.toggleBodyPartSelection(a);
|
this.toggleBodyPartSelection(a);
|
||||||
|
@ -887,11 +1029,9 @@ export default {
|
||||||
handleConfirmBodyParts() {
|
handleConfirmBodyParts() {
|
||||||
this.form.BodyPartTypeList = Object.assign(
|
this.form.BodyPartTypeList = Object.assign(
|
||||||
[],
|
[],
|
||||||
this.selectedBodyParts.map((v) => v.value)
|
this.selectedBodyParts.map((v) => v.Name)
|
||||||
);
|
);
|
||||||
var bodyPartTypes = this.form.BodyPartTypeList.map((i) => {
|
var bodyPartTypes = this.form.BodyPartTypeList;
|
||||||
return this.$fd("Bodypart", i);
|
|
||||||
});
|
|
||||||
this.form.BodyPartTypes = bodyPartTypes.join(" | ");
|
this.form.BodyPartTypes = bodyPartTypes.join(" | ");
|
||||||
this.bodyPartListVisible = false;
|
this.bodyPartListVisible = false;
|
||||||
},
|
},
|
||||||
|
@ -1123,7 +1263,7 @@ export default {
|
||||||
);
|
);
|
||||||
this.form.BodyPartTypeList = this.form.BodyPartTypes.split("|");
|
this.form.BodyPartTypeList = this.form.BodyPartTypes.split("|");
|
||||||
var bodyPartTypes = this.form.BodyPartTypeList.map((i) => {
|
var bodyPartTypes = this.form.BodyPartTypeList.map((i) => {
|
||||||
return this.$fd("Bodypart", i.trim());
|
return i.trim();
|
||||||
});
|
});
|
||||||
this.form.BodyPartTypes = bodyPartTypes.toString().replaceAll(",", " | ");
|
this.form.BodyPartTypes = bodyPartTypes.toString().replaceAll(",", " | ");
|
||||||
// this.form.ClinicalDataSetNamesStr = this.form.ClinicalDataSetNames.join(', ')
|
// this.form.ClinicalDataSetNamesStr = this.form.ClinicalDataSetNames.join(', ')
|
||||||
|
@ -1275,4 +1415,13 @@ export default {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.errTip {
|
||||||
|
color: #f56c6c;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1;
|
||||||
|
padding-top: 4px;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue