pm新增的部位,支持编辑
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-07-01 15:12:38 +08:00
parent 2f549846ba
commit e265b0c2af
2 changed files with 129 additions and 65 deletions
@@ -578,7 +578,18 @@
prop="Name"
:label="$t('trials:logincCfg:form:bodypart')"
>
<template slot-scope="scope">{{ scope.row.Name }}</template>
<template slot-scope="scope">
<div class="bodyPartName">
<span :title="scope.row.Name">{{ scope.row.Name }}</span>
<el-button
v-if="scope.row.IsHandAdd"
circle
icon="el-icon-edit-outline"
:title="$t('trials:logincCfg:form:bodypart:edit')"
@click.stop="handleEditBodyPart(scope.row)"
/>
</div>
</template>
</el-table-column>
</el-table>
</div>
@@ -604,7 +615,7 @@
</el-button>
</div>
</el-dialog>
<!--选择检查技术-->
<el-dialog
v-if="modalityListVisible"
:visible.sync="modalityListVisible"
@@ -674,6 +685,7 @@
</el-button>
</div>
</el-dialog>
<!--新增检查部位-->
<base-model v-if="addBodyPart_model.visible" :config="addBodyPart_model">
<template slot="dialog-body">
<el-form
@@ -873,6 +885,7 @@ export default {
},
addBodyPartForm: {
bodyPartStr: null,
Id: null,
},
addBodyPartrules: {
bodyPartStr: [
@@ -993,6 +1006,9 @@ export default {
NameCN: str,
TrialId: this.$route.query.trialId,
};
if(this.addBodyPartForm.Id){
data.Id = this.addBodyPartForm.Id;
}
let res = await addOrUpdateTrialBodyPart(data);
if (res.IsSuccess) {
this.getTrialBodyPartList(data);
@@ -1001,6 +1017,7 @@ export default {
);
this.addBodyPart_model.visible = false;
this.addBodyPartForm.bodyPartStr = null;
this.addBodyPartForm.Id = null;
}
} catch (err) {
console.log(err);
@@ -1010,6 +1027,13 @@ export default {
}
}
},
// 编辑检查部位
handleEditBodyPart(item) {
this.addBodyPartForm.bodyPartStr = item.Code;
this.addBodyPartForm.Id = item.Id;
this.addBodyPart_model.title = this.$t("trials:setting:button:edit");
this.addBodyPart_model.visible = true;
},
handleSetBodyPart() {
this.bodyPartListVisible = true;
this.$nextTick(() => {
@@ -1434,6 +1458,21 @@ export default {
};
</script>
<style lang="scss" scoped>
.bodyPartName {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100%;
span {
display: inline-block;
max-width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
}
.logincal-config-form {
.fontColor {
color: red;