Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-12 09:14:15 +08:00
14 changed files with 2271 additions and 141 deletions
+27
View File
@@ -187,3 +187,30 @@ export function qCVisitList_Export(data) {
data
})
}
// 导出下载记录
export function getTrialDownloadList_Export(data) {
return requestDownload({
url: `/ExcelExport/getTrialDownloadList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出接收记录
export function getSCPImageUploadList_Export(data) {
return requestDownload({
url: `/ExcelExport/getSCPImageUploadList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出接收检查影像记录
export function getPatientList_Export(data) {
return requestDownload({
url: `/ExcelExport/getPatientList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
@@ -67,7 +67,7 @@
<span>{{
scope.row.FileSize && scope.row.FileSize > 0
? `${(scope.row.FileSize / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -139,7 +139,7 @@
<span>{{
scope.row.FileSize && scope.row.FileSize > 0
? `${(scope.row.FileSize / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -321,7 +321,7 @@
<span>{{
scope.row.size && scope.row.size > 0
? `${(scope.row.size / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -26,7 +26,7 @@
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t("common:button:search") }}
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
@@ -34,7 +34,7 @@
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
<el-button
@@ -44,7 +44,7 @@
size="small"
@click="handleAdd"
>
{{ $t("common:button:new") }}
{{ $t('common:button:new') }}
</el-button>
</el-form>
</template>
@@ -74,7 +74,7 @@
<template slot-scope="scope">
{{
$fd(
"Common_File_BusinessScenario",
'Common_File_BusinessScenario',
scope.row.BusinessScenarioEnum
)
}}
@@ -106,10 +106,10 @@
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd("YesOrNo", scope.row.IsDeleted)
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd("YesOrNo", scope.row.IsDeleted)
$fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag>
</template>
</el-table-column>
@@ -122,14 +122,17 @@
<el-table-column :label="$t('common:action:action')">
<template slot-scope="scope">
<el-button type="text" @click="PreviewFile(scope.row)">
{{ $t('common:button:preview') }}
</el-button>
<el-button type="text" @click="handleDownload(scope.row)">
{{ $t("common:button:download") }}
{{ $t('common:button:download') }}
</el-button>
<el-button type="text" @click="handleEdit(scope.row)">
{{ $t("common:button:edit") }}
{{ $t('common:button:edit') }}
</el-button>
<el-button type="text" @click="handleDelete(scope.row)">
{{ $t("common:button:delete") }}
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
@@ -166,22 +169,22 @@ import {
getCommonDocumentList,
DownloadCommonDoc,
deleteCommonDocument,
} from "@/api/dictionary";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import TemplateForm from "./TemplateForm";
const FileTypeEnum = 2;
} from '@/api/dictionary'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import TemplateForm from './TemplateForm'
const FileTypeEnum = 2
const searchDataDefault = () => {
return {
FileTypeEnum: FileTypeEnum,
BusinessScenarioEnum: null,
Name: "",
Name: '',
PageIndex: 1,
PageSize: 20,
};
};
}
}
export default {
name: "ExportTemplate",
name: 'ExportTemplate',
components: { BaseContainer, Pagination, TemplateForm },
data() {
return {
@@ -189,86 +192,97 @@ export default {
list: [],
total: 0,
currentRow: {},
editDialog: { title: "", visible: false },
editDialog: { title: '', visible: false },
loading: false,
};
}
},
mounted() {
this.getList();
this.getList()
},
methods: {
PreviewFile(row) {
let basePath = window.location.origin
if (window.location.protocol !== 'https:') {
basePath = 'https://irc.test.extimaging.com'
}
let data = {
name: row.NameCN,
path: basePath + row.Path,
}
this.$emit('PreviewFile', data)
},
handleDelete(row) {
this.$confirm(
this.$t("dictionary:attachment:export:confirm:delete")
this.$t('dictionary:attachment:export:confirm:delete')
).then(() => {
deleteCommonDocument(row.Id).then(() => {
this.$message.success(this.$t("common:message:deletedSuccessfully"));
this.getList();
});
});
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getList()
})
})
},
getList() {
this.loading = true;
this.loading = true
getCommonDocumentList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false;
});
this.loading = false
})
},
// 新增
handleAdd() {
this.editDialog.title = "Add";
this.currentRow = { FileTypeEnum: FileTypeEnum };
this.editDialog.visible = true;
this.editDialog.title = 'Add'
this.currentRow = { FileTypeEnum: FileTypeEnum }
this.editDialog.visible = true
},
// 下载
handleDownload(row) {
this.loading = true;
this.loading = true
DownloadCommonDoc(row.Code)
.then((data) => {
this.loading = false;
this.loading = false
})
.catch(() => {
this.loading = false;
});
this.loading = false
})
},
// 编辑
handleEdit(row) {
this.editDialog.title = "Edit";
this.currentRow = { ...row };
this.editDialog.visible = true;
this.editDialog.title = 'Edit'
this.currentRow = { ...row }
this.editDialog.visible = true
},
handleSearch() {
this.searchData.PageIndex = 1;
this.getList();
this.searchData.PageIndex = 1
this.getList()
},
handleReset() {
this.searchData = searchDataDefault();
this.getList();
this.searchData = searchDataDefault()
this.getList()
},
closeDialog() {
this.editDialog.visible = false;
this.editDialog.visible = false
},
// 排序
handleSortChange(column) {
if (column.order === "ascending") {
this.searchData.Asc = true;
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false;
this.searchData.Asc = false
}
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
},
};
}
</script>
<style lang="scss" scoped>
::v-deep .search{
::v-deep .search {
display: block;
}
</style>
@@ -118,6 +118,9 @@
<el-table-column label="Action">
<template slot-scope="scope">
<el-button type="text" @click="PreviewFile(scope.row)">
{{ $t('common:button:preview') }}
</el-button>
<el-button type="text" @click="handleDownload(scope.row)">
下载
</el-button>
@@ -201,6 +204,17 @@ export default {
})
})
},
PreviewFile(row) {
let basePath = window.location.origin
if (window.location.protocol !== 'https:') {
basePath = 'https://irc.test.extimaging.com'
}
let data = {
name: row.NameCN,
path: basePath + row.Path,
}
this.$emit('PreviewFile', data)
},
getList() {
this.loading = true
getCommonDocumentList(this.searchData)
+106 -16
View File
@@ -1,14 +1,54 @@
<template>
<div class="attachment-wrapper">
<el-tabs v-model="activeTab" @tab-click="clickTab">
<el-tab-pane v-for="item in $d.Common_File_Type" :key="item.value" :label="item.label" :name="String(item.value)">
<UploadTemplate v-if="activeTab === '1'" />
<ExportTemplate v-if="activeTab === '2'" />
<EmailTemplate v-if="activeTab === '3'" />
<CommonTemplate v-if="activeTab === '4'" />
<SignatureTemplate v-if="activeTab === '5'" />
<el-tab-pane
v-for="item in $d.Common_File_Type"
:key="item.value"
:label="item.label"
:name="String(item.value)"
>
<UploadTemplate
v-if="activeTab === '1' && item.value == activeTab"
@PreviewFile="PreviewFile"
/>
<ExportTemplate
v-if="activeTab === '2' && item.value == activeTab"
@PreviewFile="PreviewFile"
/>
<EmailTemplate v-if="activeTab === '3' && item.value == activeTab" />
<CommonTemplate v-if="activeTab === '4' && item.value == activeTab" />
<SignatureTemplate
v-if="activeTab === '5' && item.value == activeTab"
/>
</el-tab-pane>
</el-tabs>
<!-- 预览 -->
<el-dialog
v-if="Preview.visible"
:visible.sync="Preview.visible"
:close-on-click-modal="false"
:fullscreen="true"
:title="Preview.title"
width="600px"
custom-class="base-dialog-wrapper"
>
<vue-office-docx
v-if="docxTypes.includes(Preview.type)"
:src="Preview.path"
style="height: calc(100vh - 70px)"
@rendered="renderedHandler"
@error="errorHandler"
/>
<vue-office-excel
v-else-if="excelTypes.includes(Preview.type)"
:src="Preview.path"
:options="options"
style="height: calc(100vh - 70px)"
@rendered="renderedHandler"
@error="errorHandler"
/>
<PreviewFile v-else :file-path="Preview.path" :file-type="Preview.type" />
</el-dialog>
</div>
</template>
<script>
@@ -17,6 +57,11 @@ import ExportTemplate from './components/ExportTemplate'
import EmailTemplate from './components/EmailTemplate'
import CommonTemplate from './components/CommonTemplate'
import SignatureTemplate from './components/SignatureTemplate'
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'
import VueOfficeExcel from '@vue-office/excel'
import '@vue-office/excel/lib/index.css'
import PreviewFile from '@/components/PreviewFile/index'
export default {
name: 'Attachment',
components: {
@@ -24,11 +69,35 @@ export default {
ExportTemplate,
EmailTemplate,
CommonTemplate,
SignatureTemplate
SignatureTemplate,
VueOfficeDocx,
VueOfficeExcel,
PreviewFile,
},
data() {
return {
activeTab: null
activeTab: null,
Preview: {
visible: false,
title: '',
type: null,
path: null,
},
excelTypes: ['xlsx', 'xls'],
docxTypes: ['docx', 'doc'],
options: {
xls: false, //预览xlsx文件设为false;预览xls文件设为true
minColLength: 0, // excel最少渲染多少列,如果想实现xlsx文件内容有几列,就渲染几列,可以将此值设置为0.
minRowLength: 0, // excel最少渲染多少行,如果想实现根据xlsx实际函数渲染,可以将此值设置为0.
widthOffset: 10, //如果渲染出来的结果感觉单元格宽度不够,可以在默认渲染的列表宽度上再加 Npx宽
heightOffset: 10, //在默认渲染的列表高度上再加 Npx高
beforeTransformData: (workbookData) => {
return workbookData
}, //底层通过exceljs获取excel文件内容,通过该钩子函数,可以对获取的excel文件内容进行修改,比如某个单元格的数据显示不正确,可以在此自行修改每个单元格的value值。
transformData: (workbookData) => {
return workbookData
}, //将获取到的excel数据进行处理之后且渲染到页面之前,可通过transformData对即将渲染的数据及样式进行修改,此时每个单元格的text值就是即将渲染到页面上的内容
},
}
},
mounted() {
@@ -40,25 +109,46 @@ export default {
},
methods: {
clickTab(tab, event) {
this.$router.push({ path: `/dictionary/attachment?tabActive=${tab.name}` })
}
}
this.$router.push({
path: `/dictionary/attachment?tabActive=${tab.name}`,
})
},
PreviewFile(data) {
if (!data.path) return false
let type = data.path
.substring(data.path.lastIndexOf('.') + 1)
.toLocaleLowerCase()
this.Preview.path = data.path
this.Preview.type = type
this.Preview.title = data.name
if (this.excelTypes.includes(type)) {
this.options.xls = type === 'xls'
}
this.Preview.visible = true
},
renderedHandler() {
console.log('渲染完成')
},
errorHandler() {
console.log('渲染失败')
},
},
}
</script>
<style lang="scss">
.attachment-wrapper{
.el-tabs{
.attachment-wrapper {
.el-tabs {
height: 100%;
display: flex;
flex-direction: column;
}
.el-tabs__header {
height: 40px;
margin-bottom:5px;
margin-bottom: 5px;
}
.el-tabs__content{
.el-tabs__content {
flex: 1;
.el-tab-pane{
.el-tab-pane {
height: 100%;
}
}
@@ -104,7 +104,7 @@
? `${(scope.row.size / 1024 / 1024).toFixed(2)}MB`
: scope.row.Size && scope.row.Size > 0
? `${(scope.row.Size / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -82,13 +82,14 @@
{{ $t('common:button:reset') }}
</el-button>
<!--导出-->
<!-- <el-button
<el-button
type="primary"
icon="el-icon-download"
:disabled="list.length <= 0"
@click="handleExport"
>
{{ $t('common:button:export') }}
</el-button> -->
</el-button>
</el-form-item>
</el-form>
</template>
@@ -263,6 +264,7 @@
import { getTrialDownloadList } from '@/api/load'
import Pagination from '@/components/Pagination'
import BaseContainer from '@/components/BaseContainer'
import { getTrialDownloadList_Export } from '@/api/export'
const searchDataDefault = () => {
return {
SortField: 'DownloadStartTime',
@@ -352,6 +354,14 @@ export default {
this.searchData.DownloadEndTime = ''
}
},
// 导出
async handleExport() {
try {
return getTrialDownloadList_Export(this.searchData)
} catch (err) {
consol.log(err)
}
},
},
}
</script>
@@ -92,7 +92,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t("common:button:search") }}
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
@@ -100,7 +100,16 @@
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
{{ $t('common:button:reset') }}
</el-button>
<!--导出-->
<el-button
type="primary"
icon="el-icon-download"
:disabled="list.length <= 0"
@click="handleExport"
>
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
</el-form>
@@ -155,7 +164,7 @@
min-width="90"
show-overflow-tooltip
><template slot-scope="scope">
{{ scope.row.CalledAEList.join(", ") }}
{{ scope.row.CalledAEList.join(', ') }}
</template>
</el-table-column>
<!--发送端AE-->
@@ -166,7 +175,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.CallingAEList.join(", ") }}
{{ scope.row.CallingAEList.join(', ') }}
</template>
</el-table-column>
<!--检查-->
@@ -240,11 +249,12 @@ import {
getPatientList,
getDicomCalledAEList,
getDicomCallingAEList,
} from "@/api/trials";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import moment from "moment";
import viewStudy from "./components/view-study";
} from '@/api/trials'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import moment from 'moment'
import viewStudy from './components/view-study'
import { getPatientList_Export } from '@/api/export'
const searchDataDefault = () => {
return {
PatientIdStr: null,
@@ -258,9 +268,9 @@ const searchDataDefault = () => {
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: "LatestPushTime",
};
};
SortField: 'LatestPushTime',
}
}
export default {
components: { BaseContainer, Pagination, viewStudy },
data() {
@@ -275,33 +285,33 @@ export default {
callingAEList: [],
visible: false,
selectPatient: {},
};
}
},
created() {
this.getCalledAEList();
this.getCallingAEList();
this.getCalledAEList()
this.getCallingAEList()
},
mounted() {
this.getList();
this.getList()
},
methods: {
// 打开弹框
handleOpenDialog(item) {
this.visible = true;
this.selectPatient = item;
this.visible = true
this.selectPatient = item
},
// 获取接收端AE列表
async getCalledAEList() {
try {
let params = {
TrialId: this.$route.query.trialId,
};
let res = await getDicomCalledAEList(params);
}
let res = await getDicomCalledAEList(params)
if (res.IsSuccess) {
this.calledAEList = res.Result;
this.calledAEList = res.Result
}
} catch (err) {
console.log(err);
console.log(err)
}
},
// 获取发送端端AE列表
@@ -309,60 +319,68 @@ export default {
try {
let params = {
TrialId: this.$route.query.trialId,
};
let res = await getDicomCallingAEList(params);
}
let res = await getDicomCallingAEList(params)
if (res.IsSuccess) {
this.callingAEList = res.Result;
this.callingAEList = res.Result
}
} catch (err) {
console.log(err);
console.log(err)
}
},
getList() {
this.loading = true;
this.searchData.TrialId = this.$route.query.trialId;
this.loading = true
this.searchData.TrialId = this.$route.query.trialId
getPatientList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false;
});
this.loading = false
})
},
handleDatetimeChange(val) {
if (val) {
this.searchData.BeginPushTime = val[0];
this.searchData.EndPushTime = val[1];
this.searchData.BeginPushTime = val[0]
this.searchData.EndPushTime = val[1]
} else {
this.searchData.BeginPushTime = "";
this.searchData.EndPushTime = "";
this.searchData.BeginPushTime = ''
this.searchData.EndPushTime = ''
}
},
handleSearch() {
this.searchData.PageIndex = 1;
this.getList();
this.searchData.PageIndex = 1
this.getList()
},
// 重置列表查询
handleReset() {
this.datetimerange = null;
this.handleDatetimeChange();
this.searchData = searchDataDefault();
this.getList();
this.datetimerange = null
this.handleDatetimeChange()
this.searchData = searchDataDefault()
this.getList()
},
// 排序
handleSortByColumn(column) {
if (column.order === "ascending") {
this.searchData.Asc = true;
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false;
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
// 导出
async handleExport() {
try {
return getPatientList_Export(this.searchData)
} catch (err) {
consol.log(err)
}
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
},
};
}
</script>
@@ -75,6 +75,15 @@
>
{{ $t('common:button:reset') }}
</el-button>
<!--导出-->
<el-button
type="primary"
icon="el-icon-download"
:disabled="list.length <= 0"
@click="handleExport"
>
{{ $t('common:button:export') }}
</el-button>
</el-form-item>
</el-form>
</template>
@@ -156,7 +165,7 @@
<span>{{
scope.row.FileSize && scope.row.FileSize > 0
? `${(scope.row.FileSize / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -208,6 +217,7 @@ import {
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import moment from 'moment'
import { getSCPImageUploadList_Export } from '@/api/export'
const searchDataDefault = () => {
return {
CallingAE: null,
@@ -315,6 +325,14 @@ export default {
this.searchData.PageIndex = 1
this.getList()
},
// 导出
async handleExport() {
try {
return getSCPImageUploadList_Export(this.searchData)
} catch (err) {
consol.log(err)
}
},
},
}
</script>
@@ -324,7 +324,7 @@
<span>{{
scope.row.Size && scope.row.Size > 0
? `${(scope.row.Size / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -75,7 +75,7 @@
<span>{{
scope.row.FileSize && scope.row.FileSize > 0
? `${(scope.row.FileSize / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -409,7 +409,7 @@
<span>{{
scope.row.size && scope.row.size > 0
? `${(scope.row.size / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>
@@ -329,7 +329,7 @@
<span>{{
scope.row.Size && scope.row.Size > 0
? `${(scope.row.Size / 1024 / 1024).toFixed(2)}MB`
: 0
: ''
}}</span>
</template>
</el-table-column>