检查编辑课题组
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-08-25 13:45:19 +08:00
parent cd224161bb
commit ae2cb2c5fb
1 changed files with 42 additions and 12 deletions

View File

@ -30,7 +30,8 @@
{{ $t('common:button:reset') }}
</el-button>
<!-- 选择课题组 -->
<el-button type="primary" :disabled="multipleSelection.length <= 0" @click="openGroup">
<el-button type="primary" v-hasPermi="['trials:trialsInspection:addGroup']"
:disabled="multipleSelection.length <= 0" @click="openGroup({})">
{{ $t('trials:inspection:button:checkGroupId') }}
</el-button>
</el-form-item>
@ -40,8 +41,8 @@
<el-table ref="viewStudyList" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe height="100"
@sort-change="handleSortByColumn" :default-sort="{ prop: 'StudyTime', order: 'descending' }"
@selection-change="handleSelectionChange">
<!-- <el-table-column type="index" width="40" /> -->
<el-table-column type="selection" width="55" />
<el-table-column type="selection" width="55" v-if="hasPermi(['trials:trialsInspection:editGroup'])" />
<el-table-column type="index" width="40" v-else />
<!--检查申请号-->
<el-table-column align="center" prop="AccessionNumber" :label="$t('trials:inspection:table:AccessionNumber')"
show-overflow-tooltip min-width="120" sortable="custom"></el-table-column>
@ -78,11 +79,14 @@
<el-table-column align="center" prop="StudyTime" :label="$t('trials:audit:table:studyDate')" show-overflow-tooltip
min-width="180" sortable="custom"></el-table-column>
<!--操作-->
<el-table-column :label="$t('common:action:action')" min-width="150">
<el-table-column :label="$t('common:action:action')" min-width="180">
<template slot-scope="scope">
<!-- 影像 -->
<el-button circle icon="el-icon-view" :title="$t('trials:inspection:button:image')"
@click.stop="image(scope.row)" />
<!-- 修改课题组 -->
<el-button circle icon="el-icon-edit-outline" :title="$t('trials:inspection:button:editGroup')"
v-hasPermi="['trials:trialsInspection:editGroup']" @click.stop="openGroup(scope.row, 3)" />
<!--删除-->
<el-button circle v-hasPermi="['trials:trialsInspection:delStudy']" icon="el-icon-delete"
:title="$t('trials:inspection:button:delete')" @click.stop="deletePatientStudy(scope.row)" />
@ -98,12 +102,12 @@
@pagination="getList" />
<base-model v-if="group_model.visible" :config="group_model">
<template slot="dialog-body">
<el-form ref="anonymizationFrom" :model="form" :rules="rules" label-width="100px" size="small">
<el-form ref="groupFrom" :model="form" :rules="rules" label-width="100px" size="small">
<el-form-item :label="$t('trials:externalStaff:table:lastName')" prop="LastName" v-show="false">
<el-input clearable />
</el-form-item>
<!-- 用户类型 -->
<el-form-item :label="$t('trials:externalStaff:table:hospitalGroupIdList')" prop="hospitalGroupIdList">
<el-form-item :label="$t('trials:externalStaff:table:hospitalGroupIdList')" prop="HospitalGroupIdList">
<el-select v-model="form.HospitalGroupIdList" style="width: 100%" multiple clearable>
<el-option v-for="item of hospitalGroupList" :key="item.Id" :label="item.Name" :value="item.Id">
<!-- <span>{{ item.UserType }}</span> -->
@ -177,9 +181,20 @@ export default {
form: {
HospitalGroupIdList: [],
},
rules: {},
rules: {
HospitalGroupIdList: [
{
required: true,
type: "array",
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change']
}
]
},
btnLoading: false,
hospitalGroupList: []
hospitalGroupList: [],
groupStatus: 1,
currentData: {}
}
},
created() {
@ -196,22 +211,37 @@ export default {
console.log(err)
}
},
openGroup() {
openGroup(row, status = 1) {
this.form.HospitalGroupIdList = []
this.group_model.title = this.$t('trials:inspection:dialogTitle:add')
if (row.HospitalGroupList && row.HospitalGroupList.length > 0) {
this.form.HospitalGroupIdList = row.HospitalGroupList.map(item => item.Id)
this.group_model.title = this.$t('trials:inspection:dialogTitle:edit')
}
this.currentData = row
this.groupStatus = status
this.getHospitalGroupList()
this.group_model.visible = true
},
handleCancelGroup() {
this.form.HospitalGroupIdList = []
this.groupStatus = 1
this.group_model.visible = false
},
async handleSaveGroup() {
try {
if (this.multipleSelection.length <= 0) return false
let ScPstudyIdList = this.multipleSelection.map(item => item.SCPStudyId)
let validate = await this.$refs.groupFrom.validate()
if (!validate) return false
let ScPstudyIdList = []
if (this.groupStatus === 1) {
if (this.multipleSelection.length <= 0) return false
ScPstudyIdList = this.multipleSelection.map(item => item.SCPStudyId)
} else {
ScPstudyIdList = [this.currentData.SCPStudyId]
}
let data = {
ScPstudyIdList,
AddOrDelete: 1,
AddOrDelete: this.groupStatus,
HospitalGroupIdList: this.form.HospitalGroupIdList
}
this.btnLoading = true