中心ae列表权限

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-20 15:12:06 +08:00
parent 693e240578
commit a512ed551b
2 changed files with 558 additions and 326 deletions

View File

@ -8,7 +8,7 @@
style="float: right" style="float: right"
v-if="status === 'add'" v-if="status === 'add'"
> >
{{ $t("common:button:add") }} {{ $t('common:button:add') }}
</el-button> </el-button>
<el-table v-loading="loading" :data="list" stripe> <el-table v-loading="loading" :data="list" stripe>
<!-- AE 名称 --> <!-- AE 名称 -->
@ -44,6 +44,9 @@
prop="action" prop="action"
:label="$t('trials:sitesList:dicomAEList:table:action')" :label="$t('trials:sitesList:dicomAEList:table:action')"
min-width="120" min-width="120"
v-if="
hasPermi(['trials:trials-panel:setting:personnel-manage:edit-site'])
"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -67,9 +70,9 @@
</base-model> </base-model>
</template> </template>
<script> <script>
import BaseModel from "@/components/BaseModel"; import BaseModel from '@/components/BaseModel'
import dicomForm from "./dicomForm.vue"; import dicomForm from './dicomForm.vue'
import { getTrialSiteDicomAEList, deleteTrialSiteDicomAE } from "@/api/trials"; import { getTrialSiteDicomAEList, deleteTrialSiteDicomAE } from '@/api/trials'
const defaultSearchData = () => { const defaultSearchData = () => {
return { return {
TrialSiteId: null, TrialSiteId: null,
@ -77,88 +80,93 @@ const defaultSearchData = () => {
Ip: null, Ip: null,
Port: null, Port: null,
Description: null, Description: null,
}; }
}; }
export default { export default {
name: "dicomAE", name: 'dicomAE',
components: { BaseModel, dicomForm }, components: { BaseModel, dicomForm },
data() { data() {
return { return {
config: { config: {
visible: false, visible: false,
title: null, title: null,
width: "800px", width: '800px',
appendToBody: true, appendToBody: true,
}, },
status: "add", status: 'add',
TrialSiteId: null, TrialSiteId: null,
loading: false, loading: false,
list: [], list: [],
searchData: defaultSearchData(), searchData: defaultSearchData(),
siteData: {}, siteData: {},
}; }
}, },
methods: { methods: {
open(row, status = "add") { open(row, status = 'add') {
this.status = status; this.status = status
this.TrialSiteId = row.TrialSiteId; this.TrialSiteId = row.TrialSiteId
this.config.title = this.$t( this.config.title = this.$t(
"trials:trials-panel:setting:personnel-manage:dicomAETitle" 'trials:trials-panel:setting:personnel-manage:dicomAETitle'
).replace("xxx", `${row.TrialSiteCode}${row.TrialSiteAliasName}`); ).replace('xxx', `${row.TrialSiteCode}${row.TrialSiteAliasName}`)
this.siteData = row; this.siteData = row
this.config.visible = true; this.config.visible = true
this.getList(); this.getList()
console.log(
this.hasPermi([
'trials:trials-panel:setting:personnel-manage:edit-site',
])
)
}, },
// dicomAE // dicomAE
async getList() { async getList() {
try { try {
this.searchData.TrialSiteId = this.TrialSiteId; this.searchData.TrialSiteId = this.TrialSiteId
this.loading = true; this.loading = true
let res = await getTrialSiteDicomAEList(this.searchData); let res = await getTrialSiteDicomAEList(this.searchData)
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list = res.Result; this.list = res.Result
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
this.loading = false; this.loading = false
} }
}, },
// //
openAdd() { openAdd() {
this.$refs.dicomForm.open(this.siteData, null, "add"); this.$refs.dicomForm.open(this.siteData, null, 'add')
}, },
save() { save() {
this.$emit("getList"); this.$emit('getList')
}, },
// dicom // dicom
editDicom(row) { editDicom(row) {
this.$refs.dicomForm.open(this.siteData, row, "edit"); this.$refs.dicomForm.open(this.siteData, row, 'edit')
}, },
// dicom // dicom
async delDicom(row) { async delDicom(row) {
try { try {
let confirm = await this.$confirm( let confirm = await this.$confirm(
this.$t("trials:sitesList:dicomAEList:confirm:delMessage"), this.$t('trials:sitesList:dicomAEList:confirm:delMessage'),
{ {
type: "warning", type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"), confirmButtonText: this.$t('common:button:confirm'),
cancelButtonText: this.$t("common:button:cancel"), cancelButtonText: this.$t('common:button:cancel'),
} }
); )
if (confirm !== "confirm") return; if (confirm !== 'confirm') return
let res = await deleteTrialSiteDicomAE(row.Id); let res = await deleteTrialSiteDicomAE(row.Id)
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList(); this.getList()
this.save(); this.save()
this.$t("common:message:deletedSuccessfully"); this.$t('common:message:deletedSuccessfully')
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>