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