拉取影像同步课题组信息
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-08-25 16:55:38 +08:00
parent 1280a5d23a
commit 3f8e2e84ae
2 changed files with 259 additions and 15 deletions

View File

@ -151,7 +151,7 @@
</el-button> </el-button>
<!-- 拉取 --> <!-- 拉取 -->
<el-button type="primary" :disabled="!multipleSelection || multipleSelection.length <= 0" <el-button type="primary" :disabled="!multipleSelection || multipleSelection.length <= 0"
@click="pullImage()"> @click="openGroup(null, 2)">
{{ $t('trials:inspection:button:pull') }} {{ $t('trials:inspection:button:pull') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -225,18 +225,55 @@
<!--studyInstanceUID--> <!--studyInstanceUID-->
<el-table-column prop="StudyInstanceUID" :label="$t('trials:inspection:pullImage:table:studyInstanceUID')" <el-table-column prop="StudyInstanceUID" :label="$t('trials:inspection:pullImage:table:studyInstanceUID')"
show-overflow-tooltip min-width="120" sortable="custom" /> show-overflow-tooltip min-width="120" sortable="custom" />
<!--课题组-->
<el-table-column prop="ViewHospitalGroupList"
:label="$t('trials:inspection:pullImage:table:ViewHospitalGroupList')" show-overflow-tooltip min-width="100">
<template slot-scope="scope">
<span>{{
scope.row.ViewHospitalGroupList && scope.row.ViewHospitalGroupList.length > 0 ?
scope.row.ViewHospitalGroupList.map(item => item.Name).join(', ') : ''}}</span>
</template>
</el-table-column>
<!--操作--> <!--操作-->
<el-table-column :label="$t('common:action:action')" min-width="80"> <el-table-column :label="$t('common:action:action')" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button circle icon="el-icon-refresh" class="refreshBtn" :title="$t('trials:inspection:button:pull')" <el-button circle icon="el-icon-refresh" class="refreshBtn" :title="$t('trials:inspection:button:pull')"
@click.stop="pullImage(scope.row)" /> @click.stop="openGroup(scope.row, 2)" />
<el-button circle icon="el-icon-edit-outline" :title="$t('trials:inspection:button:collect')"
v-if="scope.row.IsStudyExist" @click.stop="openGroup(scope.row, 1)" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="PageIndex" :limit.sync="PageSize" @pagination="paging" /> <pagination class="page" :total="total" :page.sync="PageIndex" :limit.sync="PageSize" @pagination="paging" />
<base-model v-if="group_model.visible" :config="group_model">
<template slot="dialog-body">
<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-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> -->
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<!-- 取消 -->
<el-button size="small" type="primary" :disabled="btnLoading" @click="handleCancelGroup">
{{ $t("common:button:cancel") }}
</el-button>
<!-- 保存 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="pullImage">
{{ $t("common:button:save") }}
</el-button>
</template>
</base-model>
</div> </div>
</template> </template>
<script> <script>
@ -247,6 +284,8 @@ import {
cMoveVerify, cMoveVerify,
} from '@/api/inspection.js' } from '@/api/inspection.js'
import { getDicomAEList } from '@/api/dicomAE.js' import { getDicomAEList } from '@/api/dicomAE.js'
import BaseModel from '@/components/BaseModel'
import { modifySCPStudyHospitalGroup } from '@/api/admin.js'
const defaultSearchData = () => { const defaultSearchData = () => {
return { return {
PacsDicomAEId: null, PacsDicomAEId: null,
@ -267,7 +306,7 @@ const defaultSearchData = () => {
} }
export default { export default {
name: 'byPatient', name: 'byPatient',
components: { Pagination }, components: { Pagination, BaseModel },
props: { props: {
calledAeList: { calledAeList: {
required: true, required: true,
@ -300,6 +339,29 @@ export default {
PageSize: 50, PageSize: 50,
AElist: [], AElist: [],
multipleSelection: [], multipleSelection: [],
group_model: {
visible: false,
title: this.$t('trials:inspection:dialogTitle:collect'),
width: '400px',
appendToBody: true
},
form: {
HospitalGroupIdList: [],
},
rules: {
HospitalGroupIdList: [
{
required: true,
type: "array",
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change']
}
]
},
btnLoading: false,
hospitalGroupList: [],
groupStatus: 1,
} }
}, },
computed: { computed: {
@ -577,11 +639,66 @@ export default {
} }
this.paging() this.paging()
}, },
// pacs async handleSaveGroup() {
async pullImage(row) {
try { try {
let validate = await this.$refs.groupFrom.validate()
if (!validate) return false
let ScPstudyIdList = []
let row = this.currentData
if (!row) {
if (this.multipleSelection.length <= 0) return false
ScPstudyIdList = this.multipleSelection.map(item => item.SCPStudyId)
} else {
ScPstudyIdList = [this.currentData.SCPStudyId]
}
let data = {
ScPstudyIdList,
AddOrDelete: 1,
HospitalGroupIdList: this.form.HospitalGroupIdList
}
this.btnLoading = true
let res = await modifySCPStudyHospitalGroup(data)
this.btnLoading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.handleCancelGroup()
this.getList()
}
} catch (err) {
console.log(err)
this.btnLoading = false
}
},
handleCancelGroup() {
this.form.HospitalGroupIdList = []
this.groupStatus = 1
this.group_model.visible = false
},
openGroup(row, type = 1) {
this.currentData = row
this.groupStatus = type
if (row) {
this.hospitalGroupList = row.CurrentUserHospitalGroupList
} else {
this.hospitalGroupList = this.multipleSelection[0].CurrentUserHospitalGroupList
}
if (type === 1) {
this.group_model.title = this.$t('trials:inspection:dialogTitle:collect')
} else {
this.group_model.title = this.$t('trials:inspection:dialogTitle:pull')
}
this.group_model.visible = true
},
// pacs
async pullImage() {
try {
let validate = await this.$refs.groupFrom.validate()
if (!validate) return false
if (this.groupStatus === 1) return this.handleSaveGroup()
let row = this.currentData
let data = { let data = {
PacsDicomAEId: this.searchData.PacsDicomAEId, PacsDicomAEId: this.searchData.PacsDicomAEId,
HospitalGroupIdList: this.form.HospitalGroupIdList
// studyIDList: [row.StudyID], // studyIDList: [row.StudyID],
} }
if (row) { if (row) {
@ -620,8 +737,10 @@ export default {
if (!confirm) return false if (!confirm) return false
this.loading = true this.loading = true
this.btnLoading = true
let res = await cmoveStudyList(data) let res = await cmoveStudyList(data)
this.loading = false this.loading = false
this.btnLoading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success( this.$message.success(
this.$t('trials:inspection:pullImage:message:pullSuccess') this.$t('trials:inspection:pullImage:message:pullSuccess')
@ -629,6 +748,7 @@ export default {
} }
} catch (err) { } catch (err) {
this.loading = false this.loading = false
this.btnLoading = false
console.log(err) console.log(err)
} }
}, },

View File

@ -162,7 +162,7 @@
</el-button> </el-button>
<!-- 拉取 --> <!-- 拉取 -->
<el-button type="primary" :disabled="!multipleSelection || multipleSelection.length <= 0" <el-button type="primary" :disabled="!multipleSelection || multipleSelection.length <= 0"
@click="pullImage()"> @click="openGroup({}, 2)">
{{ $t('trials:inspection:button:pull') }} {{ $t('trials:inspection:button:pull') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -236,18 +236,58 @@
<!--studyInstanceUID--> <!--studyInstanceUID-->
<el-table-column prop="StudyInstanceUID" :label="$t('trials:inspection:pullImage:table:studyInstanceUID')" <el-table-column prop="StudyInstanceUID" :label="$t('trials:inspection:pullImage:table:studyInstanceUID')"
show-overflow-tooltip min-width="120" sortable="custom" /> show-overflow-tooltip min-width="120" sortable="custom" />
<!--课题组-->
<el-table-column prop="ViewHospitalGroupList"
:label="$t('trials:inspection:pullImage:table:ViewHospitalGroupList')" show-overflow-tooltip
min-width="100">
<template slot-scope="scope">
<span>{{
scope.row.ViewHospitalGroupList && scope.row.ViewHospitalGroupList.length > 0 ?
scope.row.ViewHospitalGroupList.map(item => item.Name).join(', ') : ''}}</span>
</template>
</el-table-column>
<!--操作--> <!--操作-->
<el-table-column :label="$t('common:action:action')" min-width="80"> <el-table-column :label="$t('common:action:action')" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button circle icon="el-icon-refresh" class="refreshBtn" <el-button circle icon="el-icon-refresh" class="refreshBtn"
:title="$t('trials:inspection:button:pull')" @click.stop="pullImage(scope.row)" /> :title="$t('trials:inspection:button:pull')" @click.stop="openGroup(scope.row, 2)" />
<el-button circle icon="el-icon-edit-outline" :title="$t('trials:inspection:button:collect')"
v-if="scope.row.IsStudyExist" @click.stop="openGroup(scope.row, 1)" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="PageIndex" :limit.sync="PageSize" @pagination="paging" /> <pagination class="page" :total="total" :page.sync="PageIndex" :limit.sync="PageSize" @pagination="paging" />
<base-model v-if="group_model.visible" :config="group_model">
<template slot="dialog-body">
<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-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> -->
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<!-- 取消 -->
<el-button size="small" type="primary" :disabled="btnLoading" @click="handleCancelGroup">
{{ $t("common:button:cancel") }}
</el-button>
<!-- 保存 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="pullImage">
{{ $t("common:button:save") }}
</el-button>
</template>
</base-model>
</div> </div>
</template> </template>
<script> <script>
@ -259,6 +299,7 @@ import {
getUserJoinedTrialPatientList getUserJoinedTrialPatientList
} from '@/api/inspection.js' } from '@/api/inspection.js'
import { getDicomAEList } from '@/api/dicomAE.js' import { getDicomAEList } from '@/api/dicomAE.js'
import BaseModel from '@/components/BaseModel'
const defaultSearchData = () => { const defaultSearchData = () => {
return { return {
PacsDicomAEId: null, PacsDicomAEId: null,
@ -280,7 +321,7 @@ const defaultSearchData = () => {
} }
export default { export default {
name: 'byTrials', name: 'byTrials',
components: { Pagination }, components: { Pagination, BaseModel },
props: { props: {
calledAeList: { calledAeList: {
required: true, required: true,
@ -314,7 +355,31 @@ export default {
AElist: [], AElist: [],
multipleSelection: [], multipleSelection: [],
trialList: [] trialList: [],
group_model: {
visible: false,
title: this.$t('trials:inspection:dialogTitle:collect'),
width: '400px',
appendToBody: true
},
form: {
HospitalGroupIdList: [],
},
rules: {
HospitalGroupIdList: [
{
required: true,
type: "array",
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change']
}
]
},
btnLoading: false,
hospitalGroupList: [],
groupStatus: 1, // 1 2
currentData: {}
} }
}, },
computed: { computed: {
@ -615,11 +680,66 @@ export default {
} }
this.paging() this.paging()
}, },
// pacs async handleSaveGroup() {
async pullImage(row) {
try { try {
let validate = await this.$refs.groupFrom.validate()
if (!validate) return false
let ScPstudyIdList = []
let row = this.currentData
if (!row) {
if (this.multipleSelection.length <= 0) return false
ScPstudyIdList = this.multipleSelection.map(item => item.SCPStudyId)
} else {
ScPstudyIdList = [this.currentData.SCPStudyId]
}
let data = {
ScPstudyIdList,
AddOrDelete: 1,
HospitalGroupIdList: this.form.HospitalGroupIdList
}
this.btnLoading = true
let res = await modifySCPStudyHospitalGroup(data)
this.btnLoading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.handleCancelGroup()
this.getList()
}
} catch (err) {
console.log(err)
this.btnLoading = false
}
},
handleCancelGroup() {
this.form.HospitalGroupIdList = []
this.groupStatus = 1
this.group_model.visible = false
},
openGroup(row, type = 1) {
this.currentData = row
this.groupStatus = type
if (row) {
this.hospitalGroupList = row.CurrentUserHospitalGroupList
} else {
this.hospitalGroupList = this.multipleSelection[0].CurrentUserHospitalGroupList
}
if (type === 1) {
this.group_model.title = this.$t('trials:inspection:dialogTitle:collect')
} else {
this.group_model.title = this.$t('trials:inspection:dialogTitle:pull')
}
this.group_model.visible = true
},
// pacs
async pullImage() {
let validate = await this.$refs.groupFrom.validate()
if (!validate) return false
if (this.groupStatus === 1) return this.handleSaveGroup()
try {
let row = this.currentData
let data = { let data = {
PacsDicomAEId: this.searchData.PacsDicomAEId, PacsDicomAEId: this.searchData.PacsDicomAEId,
HospitalGroupIdList: this.form.HospitalGroupIdList
// studyIDList: [row.StudyID], // studyIDList: [row.StudyID],
} }
if (row) { if (row) {
@ -658,15 +778,19 @@ export default {
if (!confirm) return false if (!confirm) return false
this.loading = true this.loading = true
this.btnLoading = true
let res = await cmoveStudyList(data) let res = await cmoveStudyList(data)
this.loading = false this.loading = false
this.btnLoading = true
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success( this.$message.success(
this.$t('trials:inspection:pullImage:message:pullSuccess') this.$t('trials:inspection:pullImage:message:pullSuccess')
) )
this.handleCancelGroup()
} }
} catch (err) { } catch (err) {
this.loading = false this.loading = false
this.btnLoading = true
console.log(err) console.log(err)
} }
}, },