部分问题修复

main
wangxiaoshuang 2024-04-18 16:35:26 +08:00
parent a78a0e038c
commit 88ad9101d4
22 changed files with 1226 additions and 633 deletions

View File

@ -3548,4 +3548,12 @@ export function getPatientSeriesList(scpStudyId) {
url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`, url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`,
method: 'get' method: 'get'
}) })
}
// 获取系统已确认标准
export function getSystemConfirmedCreiterionList() {
return request({
url: `/Patient/getSystemConfirmedCreiterionList`,
method: 'get'
})
} }

113
src/utils/uploadZip.js Normal file
View File

@ -0,0 +1,113 @@
import JSZip from "jszip";
import axios from "axios";
import { saveAs } from "file-saver";
import {
getSubjectImageZipInfo,
} from "@/api/trials/visit.js";
export const downloadImage = async (id) => {
try {
let res = await getSubjectImageZipInfo(id);
if (res.IsSuccess) {
let item = res.Result;
await setfolder(item);
}
} catch (err) {
console.log(err);
}
};
const setfolder = async (item) => {
const zip = new JSZip(); // 创建实例对象
let zipObj = {};
const promises = [];
for (let patient of item.PatientList) {
if (!zipObj[patient.PatientIdStr]) {
zipObj[patient.PatientIdStr] = zip.folder(
`${item.SubjectCode}_${patient.PatientIdStr}`
);
}
for (let visit of patient.VisitList) {
if (!zipObj[`${patient.PatientIdStr}${visit.VisitName}`]) {
zipObj[`${patient.PatientIdStr}${visit.VisitName}`] = zipObj[
patient.PatientIdStr
].folder(visit.VisitName);
}
for (let study of visit.StudyList) {
let date = study.StudyTime.split(" ")[0];
for (let series of study.SeriesList) {
if (
!zipObj[
`${patient.PatientIdStr}${visit.VisitName}${series.Modality}`
]
) {
zipObj[
`${patient.PatientIdStr}${visit.VisitName}${series.Modality}`
] = zipObj[`${patient.PatientIdStr}${visit.VisitName}`].folder(
`${date}_${series.Modality}`
);
}
for (let instance of series.InstancePathList) {
let obj = {
subjectCode: item.SubjectCode,
patientIdStr: patient.PatientIdStr,
visitName: visit.VisitName,
date: study.StudyTime.split(" ")[0],
modality: series.Modality,
instancePath: instance.Path,
dicomName: instance.Path.split("/Dicom/")[1],
};
const promise = handleBatchDown(
obj,
zipObj[
`${patient.PatientIdStr}${visit.VisitName}${series.Modality}`
]
);
promises.push(promise);
}
}
}
}
}
// 生成 zip 文件
Promise.all(promises)
.then(() => {
// 生成zip 文件
zip
.generateAsync({
type: "blob",
compression: "DEFLATE", // STORE: 默认不压缩, DEFLATE需要压缩
compressionOptions: {
level: 9, // 压缩等级 1~9 1 压缩速度最快, 9 最优压缩方式
},
})
.then((res) => {
saveAs(res, item.SubjectCode + new Date().getTime() + "_CV.zip"); // 使用FileSaver.saveAs保存文件文件名可自定义
zipObj = null;
});
})
.catch((reason) => { });
};
const handleBatchDown = async (item, zip) => {
return new Promise((resolve) => {
getFileData(
this.OSSclientConfig.basePath + item.instancePath.slice(1)
).then((res) => {
const fileName = item.dicomName + ".dcm";
zip.file(fileName, res.data, { binary: true });
resolve();
});
});
};
const getFileData = (fileUrl) => {
return new Promise((resolve, reject) => {
axios(fileUrl, {
method: "GET",
responseType: "blob", // 返回的数据会被强制转为blob类型 转换成arraybuffer 也行
})
.then((res) => {
resolve(res);
})
.catch((error) => {
reject(error);
});
});
};

View File

@ -146,7 +146,7 @@ export default {
} }
</style> </style>
<style scoped> <style scoped>
>>>.is-error{ .is-error{
margin-bottom: 40px; margin-bottom: 40px;
} }
input:-webkit-autofill { input:-webkit-autofill {

View File

@ -3,14 +3,16 @@
<template slot="dialog-body"> <template slot="dialog-body">
<el-form <el-form
ref="NoticeForm" ref="NoticeForm"
v-loading="loading"
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="120px" label-width="180px"
size="small" size="small"
> >
<el-form-item label="通知级别: " prop="NoticeLevelEnum"> <el-form-item
<el-select v-model="form.NoticeLevelEnum" placeholder="通知级别" clearable size="small"> :label="$t('system:notice:label:NoticeLevel')"
prop="NoticeLevelEnum"
>
<el-select v-model="form.NoticeLevelEnum" clearable size="small">
<el-option <el-option
v-for="item of dict.type.NoteLevel" v-for="item of dict.type.NoteLevel"
:key="item.value" :key="item.value"
@ -19,8 +21,11 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="通知类型: " prop="NoticeTypeEnum"> <el-form-item
<el-select v-model="form.NoticeTypeEnum" placeholder="通知类型" clearable size="small"> :label="$t('system:notice:label:NoticeType')"
prop="NoticeTypeEnum"
>
<el-select v-model="form.NoticeTypeEnum" clearable size="small">
<el-option <el-option
v-for="item of dict.type.NoteType" v-for="item of dict.type.NoteType"
:key="item.value" :key="item.value"
@ -29,8 +34,15 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="适用项目: " prop="ApplicableProjectEnum"> <el-form-item
<el-select v-model="form.ApplicableProjectEnum" placeholder="适用项目" clearable size="small"> :label="$t('system:notice:label:ApplicableProject')"
prop="ApplicableProjectEnum"
>
<el-select
v-model="form.ApplicableProjectEnum"
clearable
size="small"
>
<el-option <el-option
v-for="item of dict.type.NoticeApplicableTrial" v-for="item of dict.type.NoticeApplicableTrial"
:key="item.value" :key="item.value"
@ -39,8 +51,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="适用角色: " prop="NoticeUserTypeIdList"> <el-form-item
<el-select v-model="form.NoticeUserTypeIdList" multiple placeholder="使用角色" clearable size="small"> :label="$t('system:notice:label:NoticeUserTypeIdList')"
prop="NoticeUserTypeIdList"
>
<el-select
v-model="form.NoticeUserTypeIdList"
multiple
clearable
size="small"
>
<el-option <el-option
v-for="item of roleList" v-for="item of roleList"
:key="item.Id" :key="item.Id"
@ -49,8 +69,11 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="提醒方式: " prop="NoticeModeEnum"> <el-form-item
<el-select v-model="form.NoticeModeEnum" placeholder="提醒方式" clearable size="small"> :label="$t('system:notice:label:NoticeMode')"
prop="NoticeModeEnum"
>
<el-select v-model="form.NoticeModeEnum" clearable size="small">
<el-option <el-option
v-for="item of dict.type.NoticeMode" v-for="item of dict.type.NoticeMode"
:key="item.value" :key="item.value"
@ -59,35 +82,37 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="开始时间: " prop="Code"> <el-form-item
<el-date-picker :label="$t('system:notice:label:StartDate')"
v-model="form.StartDate" prop="StartDate"
type="datetime" >
placeholder="选择开始时间" <el-date-picker v-model="form.StartDate" type="datetime" />
/>
</el-form-item> </el-form-item>
<el-form-item label="结束时间: " prop="Code"> <el-form-item :label="$t('system:notice:label:EndDate')" prop="EndDate">
<el-date-picker <el-date-picker v-model="form.EndDate" type="datetime" />
v-model="form.EndDate"
type="datetime"
placeholder="选择结束时间"
/>
</el-form-item> </el-form-item>
<el-form-item v-if="!form.Id" label="是否发布: " prop="Code"> <el-form-item
v-if="!form.Id"
:label="$t('system:notice:label:IsPush')"
prop="IsPush"
>
<el-switch <el-switch
v-model="form.IsPush" v-model="form.IsPush"
:active-value="true" :active-value="true"
:inactive-value="false" :inactive-value="false"
/> />
</el-form-item> </el-form-item>
<el-form-item label="通知内容: " prop="NoticeContent"> <el-form-item
:label="$t('system:notice:label:NoticeContent')"
prop="NoticeContent"
>
<el-input <el-input
v-model="form.NoticeContent" v-model="form.NoticeContent"
type="textarea" type="textarea"
:autosize="{ minRows: 2, maxRows: 4}" :autosize="{ minRows: 2, maxRows: 4 }"
/> />
</el-form-item> </el-form-item>
<el-form-item label="附件: "> <el-form-item :label="$t('system:notice:label:file')">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action action
@ -99,20 +124,40 @@
:limit="1" :limit="1"
:file-list="fileList" :file-list="fileList"
> >
<el-button size="small" type="primary" :disabled="fileList.length > 0">点击上传</el-button> <el-button
size="small"
type="primary"
:disabled="fileList.length > 0"
>{{ $t("common:button:upload") }}</el-button
>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<template slot="dialog-footer"> <template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">Cancel</el-button> <el-button
<el-button size="small" type="primary" @click="handleSave">Save</el-button> :disabled="btnLoading"
size="small"
type="primary"
@click="handleCancle"
>{{ $t("common:button:cancel") }}</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>{{ $t("common:button:save") }}</el-button
>
</template> </template>
</base-model> </base-model>
</template> </template>
<script> <script>
import { addOrUpdateSystemNotice } from '@/api/system/notice' import {
import BaseModel from '@/components/BaseModel' addOrUpdateSystemNotice,
uploadSystemNoticeDoc,
} from "@/api/system/notice";
import BaseModel from "@/components/BaseModel";
const formDataDefault = () => { const formDataDefault = () => {
return { return {
Id: null, Id: null,
@ -127,120 +172,147 @@ const formDataDefault = () => {
FileName: null, FileName: null,
Path: null, Path: null,
IsPush: false, IsPush: false,
NoticeUserTypeIdList: [] NoticeUserTypeIdList: [],
} };
} };
export default { export default {
components: { BaseModel }, components: { BaseModel },
props: { props: {
roleList: { roleList: {
type: Array, type: Array,
default() { default() {
return [] return [];
} },
} },
}, },
dicts: ['NoticeApplicableTrial', 'NoteLevel', 'NoteType', 'NoticeState', 'NoticeMode'], dicts: [
"NoticeApplicableTrial",
"NoteLevel",
"NoteType",
"NoticeState",
"NoticeMode",
],
data() { data() {
return { return {
loading: false, btnLoading: false,
form: formDataDefault(), form: formDataDefault(),
rules: { rules: {
NoticeLevelEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }], NoticeLevelEnum: [
NoticeTypeEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }], { required: true, message: "Please specify", trigger: "blur" },
NoticeContent: [{ required: true, message: 'Please specify', trigger: 'blur' }], ],
ApplicableProjectEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }], NoticeTypeEnum: [
NoticeModeEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }], { required: true, message: "Please specify", trigger: "blur" },
],
NoticeContent: [
{ required: true, message: "Please specify", trigger: "blur" },
],
ApplicableProjectEnum: [
{ required: true, message: "Please specify", trigger: "blur" },
],
NoticeModeEnum: [
{ required: true, message: "Please specify", trigger: "blur" },
],
// NoticeStateEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }], // NoticeStateEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }],
NoticeUserTypeIdList: [{ required: true, message: 'Please specify', trigger: 'blur' }] NoticeUserTypeIdList: [
{ required: true, message: "Please specify", trigger: "blur" },
],
}, },
fileList: [], fileList: [],
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true } model_cfg: {
} visible: false,
}, showClose: true,
mounted() { width: "600px",
title: "",
appendToBody: true,
},
};
}, },
mounted() {},
methods: { methods: {
handleRemoveFile() { handleRemoveFile() {
this.form.FileName = null this.form.FileName = null;
this.form.Path = null this.form.Path = null;
this.fileList = [] this.fileList = [];
}, },
beforeUpload() { beforeUpload() {
if (this.fileList.length > 0) { if (this.fileList.length > 0) {
this.$alert('最多只能传一个附件') this.$alert(this.$t("system:notice:msg:message1"));
return return;
} }
}, },
handlePreview(row, r2) { handlePreview(row, r2) {
if (row.fullPath) { if (row.fullPath) {
window.open(row.fullPath, '_blank') window.open(row.fullPath, "_blank");
} }
}, },
async handleUploadFile(param) { async handleUploadFile(param) {
this.loading = true this.loading = true;
var file = await this.fileToBlob(param.file) var file = await this.fileToBlob(param.file);
const res = await this.OSSclient.put(`/System/NoticeAttachment/${param.file.name}`, file) const res = await this.OSSclient.put(
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url), url: this.$getObjectName(res.url)}) `/System/NoticeAttachment/${param.file.name}`,
this.form.Path = this.$getObjectName(res.url) file
this.form.FileName = param.file.name );
this.loading = false this.fileList.push({
}, name: param.file.name,
fileToBlob(file) { path: this.$getObjectName(res.url),
// FileReader fullPath: this.$getObjectName(res.url),
const reader = new FileReader() url: this.$getObjectName(res.url),
return new Promise(resolve => { });
// FileReader load this.form.Path = this.$getObjectName(res.url);
reader.addEventListener('load', (e) => { this.form.FileName = param.file.name;
let blob this.loading = false;
if (typeof e.target.result === 'object') {
blob = new Blob([e.target.result])
} else {
blob = e.target.result
}
resolve(blob)
})
// FileReader ArrayBuffer File
reader.readAsArrayBuffer(file)
})
}, },
openDialog(title, data) { openDialog(title, data) {
this.model_cfg.visible = true this.model_cfg.visible = true;
this.model_cfg.title = title this.model_cfg.title = title;
this.fileList = [] this.fileList = [];
if (Object.keys(data).length) { if (Object.keys(data).length) {
this.form = { ...data } this.form = { ...data };
if (this.form.FileName) { if (this.form.FileName) {
this.fileList[0] = { name: this.form.FileName, url: this.form.Path } this.fileList[0] = {
name: this.form.FileName,
path: this.form.FilePath,
fullPath: this.form.FullFilePath,
};
} }
this.$set(this.form, 'NoticeUserTypeIdList', this.form.NoticeUserTypeList.map(v => v.Id)) this.$set(
this.form,
"NoticeUserTypeIdList",
this.form.NoticeUserTypeList.map((v) => v.Id)
);
} else { } else {
this.form = formDataDefault() this.form = formDataDefault();
} }
}, },
handleSave() { handleSave() {
this.$refs.NoticeForm.validate(valid => { this.$refs.NoticeForm.validate((valid) => {
if (!this.form.Id && this.form.IsPush) { if (!this.form.Id && this.form.IsPush) {
this.form.NoticeStateEnum = 1 this.form.NoticeStateEnum = 1;
} }
if (valid) { if (valid) {
this.loading = true this.form.StartDate = this.form.StartDate
this.form.StartDate = this.form.StartDate ? this.parseTime(this.form.StartDate) : null ? this.parseTime(this.form.StartDate)
this.form.EndDate = this.parseTime(this.form.EndDate) ? this.parseTime(this.form.EndDate) : null : null;
addOrUpdateSystemNotice(this.form).then(res => { this.form.EndDate = this.parseTime(this.form.EndDate)
this.loading = false ? this.parseTime(this.form.EndDate)
this.$message.success('Saved successfully!') : null;
this.model_cfg.visible = false this.btnLoading = true;
this.$emit('getList') addOrUpdateSystemNotice(this.form)
}).catch(() => { .then((res) => {
this.loading = false this.btnLoading = false;
}) this.$message.success("Saved successfully!");
this.model_cfg.visible = false;
this.$emit("getList");
})
.catch(() => {
this.btnLoading = false;
});
} }
}) });
}, },
handleCancle() { handleCancle() {
this.model_cfg.visible = false this.model_cfg.visible = false;
} },
} },
} };
</script> </script>

View File

@ -2,10 +2,12 @@
<div class="role"> <div class="role">
<div ref="leftContainer" class="left"> <div ref="leftContainer" class="left">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item label="通知级别: " prop="NoticeLevelEnum"> <el-form-item
:label="$t('system:notice:label:NoticeLevel')"
prop="NoticeLevelEnum"
>
<el-select <el-select
v-model="searchData.NoticeLevelEnum" v-model="searchData.NoticeLevelEnum"
placeholder="通知级别"
clearable clearable
size="small" size="small"
> >
@ -13,17 +15,15 @@
v-for="item of $d.NoteLevel" v-for="item of $d.NoteLevel"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value * 1" :value="item.raw.Code * 1"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="通知类型: " prop="NoticeTypeEnum"> <el-form-item
<el-select :label="$t('system:notice:label:NoticeType')"
v-model="searchData.NoticeTypeEnum" prop="NoticeTypeEnum"
placeholder="通知类型" >
clearable <el-select v-model="searchData.NoticeTypeEnum" clearable size="small">
size="small"
>
<el-option <el-option
v-for="item of $d.NoteType" v-for="item of $d.NoteType"
:key="item.value" :key="item.value"
@ -32,26 +32,30 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="适用项目: " prop="ApplicableProjectEnum"> <el-form-item
:label="$t('system:notice:label:ApplicableProject')"
prop="ApplicableProjectEnum"
>
<el-select <el-select
v-model="searchData.ApplicableProjectEnum" v-model="searchData.ApplicableProjectEnum"
placeholder="适用项目"
clearable clearable
size="small" size="small"
> >
<el-option <el-option
v-for="item of dict.type.NoticeApplicableTrial" v-for="item of $d.NoticeApplicableTrial"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="使用角色: " prop="NoticeUserTypeIdList"> <el-form-item
:label="$t('system:notice:label:NoticeUserTypeIdList')"
prop="NoticeUserTypeIdList"
>
<el-select <el-select
v-model="searchData.NoticeUserTypeIdList" v-model="searchData.NoticeUserTypeIdList"
multiple multiple
placeholder="使用角色"
clearable clearable
size="small" size="small"
> >
@ -63,18 +67,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="提醒方式: " prop="NoticeModeEnum"> <el-form-item
<el-select :label="$t('system:notice:label:NoticeMode')"
v-model="searchData.NoticeModeEnum" prop="NoticeModeEnum"
placeholder="提醒方式" >
clearable <el-select v-model="searchData.NoticeModeEnum" clearable size="small">
size="small"
>
<el-option <el-option
v-for="item of dict.type.NoticeMode" v-for="item of $d.NoticeMode"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value * 1" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -84,15 +86,15 @@
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="getList" @click="getList"
>搜索</el-button >{{ $t("common:button:search") }}</el-button
> >
<el-button <el-button
v-hasPermi="['system:notice:add']"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:notice:add']" >{{ $t("common:button:add") }}</el-button
>新增</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -105,27 +107,43 @@
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column <el-table-column
label="通知级别" :label="$t('system:notice:table:NoticeLevel')"
prop="NoticeLevelEnum" prop="NoticeLevelEnum"
min-width="120" min-width="120"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd("NoteLevel", scope.row.NoticeLevelEnum) }} {{
$d.NoteLevel.find((v) => {
return v.raw.Code * 1 === scope.row.NoticeLevelEnum;
})
? $d.NoteLevel.find((v) => {
return v.raw.Code * 1 === scope.row.NoticeLevelEnum;
}).label
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="通知类型" :label="$t('system:notice:table:NoticeType')"
prop="NoticeTypeEnum" prop="NoticeTypeEnum"
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd("NoteType", scope.row.NoticeTypeEnum) }} {{
$d.NoteType.find((v) => {
return v.raw.Code * 1 === scope.row.NoticeTypeEnum;
})
? $d.NoteType.find((v) => {
return v.raw.Code * 1 === scope.row.NoticeTypeEnum;
}).label
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="通知内容" :label="$t('system:notice:table:NoticeContent')"
prop="NoticeContent" prop="NoticeContent"
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
@ -135,7 +153,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="通知状态" :label="$t('system:notice:table:NoticeState')"
prop="NoticeStateEnum" prop="NoticeStateEnum"
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
@ -150,32 +168,52 @@
: 'danger' : 'danger'
" "
> >
{{ $fd("NoticeState", scope.row.ActualNoticeStateEnum) }} {{
$d.NoticeState.find((v) => {
return v.raw.Code * 1 === scope.row.ActualNoticeStateEnum;
})
? $d.NoticeState.find((v) => {
return v.raw.Code * 1 === scope.row.ActualNoticeStateEnum;
}).label
: ""
}}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="适用项目" :label="$t('system:notice:table:ApplicableProject')"
prop="ApplicableProjectEnum" prop="ApplicableProjectEnum"
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd("NoticeApplicableTrial", scope.row.ApplicableProjectEnum) }} {{
$d.NoticeApplicableTrial.find((v) => {
return v.raw.Code * 1 === scope.row.ApplicableProjectEnum;
})
? $d.NoticeApplicableTrial.find((v) => {
return v.raw.Code * 1 === scope.row.ApplicableProjectEnum;
}).label
: ""
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="适用角色" :label="$t('system:notice:table:NoticeUserTypeList')"
prop="NoticeUserTypeList" prop="NoticeUserTypeList"
min-width="80" min-width="80"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd("NoticeUserTypeList", scope.row.UserTypeShortName) }} {{
scope.row.NoticeUserTypeList.map(
(v) => v.UserTypeShortName
).toString()
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="提示方式" :label="$t('system:notice:table:NoticeMode')"
prop="NoticeModeEnum" prop="NoticeModeEnum"
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
@ -185,7 +223,7 @@
dict.type.NoticeMode.find((v) => { dict.type.NoticeMode.find((v) => {
return v.raw.Code * 1 === scope.row.NoticeModeEnum; return v.raw.Code * 1 === scope.row.NoticeModeEnum;
}) })
? dict.type.NoticeMode.find((v) => { ? $d.NoticeMode.find((v) => {
return v.raw.Code * 1 === scope.row.NoticeModeEnum; return v.raw.Code * 1 === scope.row.NoticeModeEnum;
}).label }).label
: "" : ""
@ -193,7 +231,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="保留时长" :label="$t('system:notice:table:StartDate')"
prop="StartDate" prop="StartDate"
min-width="240" min-width="240"
show-overflow-tooltip show-overflow-tooltip
@ -203,19 +241,19 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="发布人" :label="$t('system:notice:table:PublishUserName')"
prop="PublishUserName" prop="PublishUserName"
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="发布时间" :label="$t('system:notice:table:PublishedTime')"
prop="PublishedTime" prop="PublishedTime"
min-width="160" min-width="160"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="更新时间" :label="$t('system:notice:table:UpdateTime')"
prop="UpdateTime" prop="UpdateTime"
min-width="160" min-width="160"
show-overflow-tooltip show-overflow-tooltip
@ -227,7 +265,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="附件" :label="$t('system:notice:table:FileName')"
fixed="right" fixed="right"
prop="FileName" prop="FileName"
min-width="120" min-width="120"
@ -243,7 +281,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" :label="$t('common:action:action')"
fixed="right" fixed="right"
prop="UserTypeShortName" prop="UserTypeShortName"
min-width="200" min-width="200"
@ -256,30 +294,30 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['system:notice:edit']"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
v-hasPermi="['system:notice:edit']" >{{ $t("common:action:edit") }}</el-button
>编辑</el-button
> >
<el-button <el-button
v-hasPermi="['system:notice:publish']"
v-if="scope.row.NoticeStateEnum === 0" v-if="scope.row.NoticeStateEnum === 0"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-s-promotion" icon="el-icon-s-promotion"
@click="handlePush(scope.row)" @click="handlePush(scope.row)"
v-hasPermi="['system:notice:publish']" >{{ $t("common:action:push") }}</el-button
>发布</el-button
> >
<el-button <el-button
v-hasPermi="['system:notice:back']"
v-if="scope.row.NoticeStateEnum === 1" v-if="scope.row.NoticeStateEnum === 1"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-s-release" icon="el-icon-s-release"
@click="handleGet(scope.row)" @click="handleGet(scope.row)"
v-hasPermi="['system:notice:back']" >{{ $t("common:action:pull") }}</el-button
>撤回</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@ -387,12 +425,12 @@ export default {
}, },
handleEdit(row) { handleEdit(row) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["NoticeForm"].openDialog("编辑", row); this.$refs["NoticeForm"].openDialog(this.$t("common:button:edit"), row);
}); });
}, },
handleAdd() { handleAdd() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["NoticeForm"].openDialog("新增", {}); this.$refs["NoticeForm"].openDialog(this.$t("common:button:add"), {});
}); });
}, },
getUserTypeRoleList() { getUserTypeRoleList() {

View File

@ -1,39 +1,45 @@
<template> <template>
<el-card class="box-card" style="width:800px;" size="small"> <el-card class="box-card" style="width: 800px" size="small">
<!-- <div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">
<span>Security</span> <span>Security</span>
</div> --> </div> -->
<div> <div>
<el-button type="danger" @click="handleReset">Reset Password</el-button> <el-button type="danger" @click="handleReset">{{
$t("system:userlist:button:ResetPassword")
}}</el-button>
</div> </div>
</el-card> </el-card>
</template> </template>
<script> <script>
import { resetPassword } from '@/api/admin' import { params } from "@/utils/ruoyi";
import { resetPassword } from "@/api/admin";
export default { export default {
name: 'Account', name: "Account",
props: { props: {
userId: { type: String, default: '' } userId: { type: String, default: "" },
}, },
methods: { methods: {
handleReset() { handleReset() {
this.$confirm('Sure to reset password?', { this.$confirm(
type: 'warning', this.$t("system:userlist:message:ResetPassword").replace(
distinguishCancelAndClose: true, "xxx",
confirmButtonText: 'Ok', params("userName")
cancelButtonText: 'Cancel' ),
}) {
.then(() => { type: "warning",
resetPassword(this.userId).then(res => { distinguishCancelAndClose: true,
if (res.IsSuccess) { }
this.$message({ ).then(() => {
message: 'Reset password successfully', resetPassword(this.userId).then((res) => {
type: 'success' if (res.IsSuccess) {
}) this.$message({
} message: this.$t("trials:adRules:message:msg7"),
}) type: "success",
}) });
} }
} });
} });
},
},
};
</script> </script>

View File

@ -9,35 +9,56 @@
> >
<el-card class="Basic" shadow="never" size="small"> <el-card class="Basic" shadow="never" size="small">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>Basic Information</span> <span>{{ $t("system:userlist:title:Information") }}</span>
</div> </div>
<el-form-item v-if="user.UserCode" label="S/N: " prop="UserCode"> <el-form-item
v-if="user.UserCode"
:label="$t('system:userlist:table:S/N')"
prop="UserCode"
>
<el-input v-model="user.UserCode" disabled /> <el-input v-model="user.UserCode" disabled />
</el-form-item> </el-form-item>
<el-form-item label="User ID: " class="my_new_pwd" prop="UserName"> <el-form-item
:label="$t('system:userlist:table:UserName')"
class="my_new_pwd"
prop="UserName"
>
<el-input v-model="user.UserName" /> <el-input v-model="user.UserName" />
</el-form-item> </el-form-item>
<el-form-item label="Surname: " prop="LastName"> <el-form-item
:label="$t('system:userlist:table:LastName')"
prop="LastName"
>
<el-input v-model="user.LastName" /> <el-input v-model="user.LastName" />
</el-form-item> </el-form-item>
<el-form-item label="Given Name: " prop="FirstName"> <el-form-item
:label="$t('system:userlist:table:FirstName')"
prop="FirstName"
>
<el-input v-model="user.FirstName" /> <el-input v-model="user.FirstName" />
</el-form-item> </el-form-item>
<el-form-item label="Gender: " prop="Sex" style="margin-right: 40px"> <el-form-item
:label="$t('system:userlist:table:Gender')"
prop="Sex"
style="margin-right: 40px"
>
<el-radio-group v-model="user.Sex"> <el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio> <el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio> <el-radio :label="0">Female</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="Email: " prop="EMail"> <el-form-item :label="$t('system:userlist:table:Email')" prop="EMail">
<el-input v-model="user.EMail" /> <el-input v-model="user.EMail" />
</el-form-item> </el-form-item>
<el-form-item label="Phone: " prop="Phone"> <el-form-item :label="$t('system:userlist:table:Phone')" prop="Phone">
<el-input v-model="user.Phone" /> <el-input v-model="user.Phone" />
</el-form-item> </el-form-item>
<el-form-item v-if="type == 1" label="Disable:"> <el-form-item
v-if="type == 1"
:label="$t('system:userlist:table:Disable')"
>
<el-switch <el-switch
v-model="user.Status" v-model="user.Status"
:active-value="0" :active-value="0"
@ -47,7 +68,10 @@
<!-- <el-form-item label="IsTestUser:"> <!-- <el-form-item label="IsTestUser:">
<el-switch v-model="user.IsTestUser" /> <el-switch v-model="user.IsTestUser" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="User Type: " prop="UserTypeId"> <el-form-item
:label="$t('system:userlist:table:UserType')"
prop="UserTypeId"
>
<el-select <el-select
ref="userType" ref="userType"
v-model="user.UserTypeId" v-model="user.UserTypeId"
@ -67,7 +91,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="Check Code: " :label="$t('trials:researchForm:form:checkCode')"
prop="checkCode" prop="checkCode"
v-if="!IsCanConnectInternet" v-if="!IsCanConnectInternet"
> >
@ -85,28 +109,38 @@
size="small" size="small"
> >
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>Affiliation</span> <span>{{ $t("system:userlist:title:Affiliation") }}</span>
</div> </div>
<el-form-item prop="IsZhiZhun"> <el-form-item prop="IsZhiZhun">
<el-radio-group <el-radio-group
v-model="user.IsZhiZhun" v-model="user.IsZhiZhun"
@change="OrgnizationTypeChanged" @change="OrgnizationTypeChanged"
> >
<el-radio :label="true">Internal</el-radio> <el-radio :label="true">{{
<el-radio :label="false">External</el-radio> $t("system:userlist:title:Internal")
}}</el-radio>
<el-radio :label="false">{{
$t("system:userlist:title:External")
}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-show="user.IsZhiZhun === false" v-show="user.IsZhiZhun === false"
label="Organization Name: " :label="$t('system:userlist:table:OrganizationName')"
> >
<el-input v-model="user.OrganizationName" /> <el-input v-model="user.OrganizationName" />
</el-form-item> </el-form-item>
<el-form-item label="Department: " prop="DepartmentName"> <el-form-item
:label="$t('system:userlist:table:Department')"
prop="DepartmentName"
>
<el-input v-model="user.DepartmentName" /> <el-input v-model="user.DepartmentName" />
</el-form-item> </el-form-item>
<el-form-item label="Position: " prop="PositionName"> <el-form-item
:label="$t('system:userlist:table:Position')"
prop="PositionName"
>
<el-input v-model="user.PositionName" /> <el-input v-model="user.PositionName" />
</el-form-item> </el-form-item>
</el-card> </el-card>
@ -117,7 +151,7 @@
:disabled="isDisabled" :disabled="isDisabled"
style="margin: 10px 15px" style="margin: 10px 15px"
@click="handleSave" @click="handleSave"
>Save</el-button >{{ $t("passwordReset:button:submit") }}</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -1,40 +1,40 @@
<template> <template>
<div class="edit-container"> <div class="edit-container">
<el-tabs v-model="activeTab" @tab-click="clickTab"> <el-tabs v-model="activeTab" @tab-click="clickTab">
<el-tab-pane label="User " name="user"> <el-tab-pane :label="$t('system:userlist:tab:User')" name="user">
<user-info :user-id="userId" /> <user-info :user-id="userId" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Password " name="account"> <el-tab-pane :label="$t('system:userlist:tab:Password')" name="account">
<Account v-if="load.account" :user-id="userId" /> <Account v-if="load.account" :user-id="userId" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script> <script>
import UserInfo from '../components/UserInfo' import UserInfo from "../components/UserInfo";
import Account from '../components/Account' import Account from "../components/Account";
export default { export default {
name: 'EditUser', name: "EditUser",
components: { UserInfo, Account }, components: { UserInfo, Account },
data() { data() {
return { return {
activeTab: 'user', activeTab: "user",
userId: '', userId: "",
load: { load: {
role: false, role: false,
account: false account: false,
} },
} };
}, },
created() { created() {
this.userId = this.$router.currentRoute.query.Id this.userId = this.$router.currentRoute.query.Id;
}, },
methods: { methods: {
clickTab(tab, event) { clickTab(tab, event) {
if (this.load[tab.name] === false) { if (this.load[tab.name] === false) {
this.load[tab.name] = true this.load[tab.name] = true;
} }
} },
} },
} };
</script> </script>

View File

@ -9,14 +9,8 @@
:search-handle="searchHandle" :search-handle="searchHandle"
@search="handleSearch" @search="handleSearch"
@reset="handleReset" @reset="handleReset"
@new="handleAddUser"
/> />
<!--style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"-->
<el-button
type="primary"
size="mini"
style="margin-left:auto;height: 28px;"
@click="handleAddUser"
>New</el-button>
</div> </div>
<base-table <base-table
v-loading="loading" v-loading="loading"
@ -30,31 +24,46 @@
@sortByColumn="sortByColumn" @sortByColumn="sortByColumn"
> >
<!-- 选择自定义slot --> <!-- 选择自定义slot -->
<template slot="genderSlot" slot-scope="{scope}"> <template slot="genderSlot" slot-scope="{ scope }">
{{ scope.row.Sex?'Male':'Female' }} {{ scope.row.Sex ? "Male" : "Female" }}
</template> </template>
<template slot="roleSlot" slot-scope="{scope}"> <template slot="roleSlot" slot-scope="{ scope }">
{{ scope.row.RoleNameList.map(role => role.RoleName).join(',') }} {{ scope.row.RoleNameList.map((role) => role.RoleName).join(",") }}
</template> </template>
<template slot="isZhiZhunSlot" slot-scope="{scope}"> <template slot="isZhiZhunSlot" slot-scope="{ scope }">
{{scope.row.IsZhiZhun ? 'Internal' : 'External'}} {{
scope.row.IsZhiZhun
? $t("system:userlist:table:InternalOrExternal:Internal")
: $t("system:userlist:table:InternalOrExternal:External")
}}
</template> </template>
<template slot="isTestUserSlot" slot-scope="{scope}"> <template slot="isTestUserSlot" slot-scope="{ scope }">
{{scope.row.IsTestUser ? 'Yes' : 'No'}} {{
scope.row.IsTestUser
? $t("system:userlist:table:IsTestUser:Yes")
: $t("system:userlist:table:IsTestUser:No")
}}
</template> </template>
<template slot="statusSlot" slot-scope="{scope}"> <template slot="statusSlot" slot-scope="{ scope }">
{{ scope.row.Status?'Enable':'Disable' }} {{
scope.row.Status
? $t("system:userlist:table:Status:Enable")
: $t("system:userlist:table:Status:Disable")
}}
</template> </template>
</base-table> </base-table>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getUserList, getUserTypeList, deleteSysUser } from '@/api/admin' import { getUserList, getUserTypeList, deleteSysUser } from "@/api/admin";
import { searchForm, searchHandle, columns } from './list' // import { searchForm, searchHandle, columns } from './list'
import BoxContent from '@/components/BoxContent' import BoxContent from "@/components/BoxContent";
import SearchForm from '@/components/BaseForm/search-form' import SearchForm from "@/components/BaseForm/search-form";
import BaseTable from '@/components/BaseTable' import BaseTable from "@/components/BaseTable";
import tableMixins from '@/mixins/table' import tableMixins from "@/mixins/table";
//
//
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
UserName: null, UserName: null,
@ -65,87 +74,309 @@ const searchDataDefault = () => {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: true, Asc: true,
RealName: '', RealName: "",
SortField: '' SortField: "",
} };
} };
export default { export default {
name: 'UserList', name: "UserList",
components: { BoxContent, SearchForm, BaseTable }, components: { BoxContent, SearchForm, BaseTable },
mixins: [tableMixins], mixins: [tableMixins],
data() { data() {
return { return {
searchData: searchDataDefault(), searchData: searchDataDefault(),
searchForm, columns: [
searchHandle, { type: "index" },
columns, {
prop: "UserCode",
label: this.$t("system:userlist:table:S/N"),
width: 100,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "UserName",
label: this.$t("system:userlist:table:UserName"),
minWidth: 100,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "RealName",
label: this.$t("system:userlist:table:RealName"),
minWidth: 120,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "Sex",
label: this.$t("system:userlist:table:Gender"),
hidden: true,
slot: "genderSlot",
minWidth: 100,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "Phone",
label: this.$t("system:userlist:table:Phone"),
minWidth: 120,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "EMail",
label: this.$t("system:userlist:table:Email"),
minWidth: 150,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "OrganizationName",
label: this.$t("system:userlist:table:Organization"),
minWidth: 130,
showOverflowTooltip: true,
},
{
prop: "UserType",
label: this.$t("system:userlist:table:UserType"),
minWidth: 100,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "IsZhiZhun",
label: this.$t("system:userlist:table:InternalOrExternal"),
hidden: true,
slot: "isZhiZhunSlot",
minWidth: 140,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "IsTestUser",
label: this.$t("system:userlist:table:IsTestUser"),
hidden: true,
slot: "isTestUserSlot",
minWidth: 120,
sortable: "custom",
showOverflowTooltip: true,
},
{
prop: "Status",
label: this.$t("system:userlist:table:Status"),
hidden: true,
slot: "statusSlot",
minWidth: 100,
sortable: "custom",
showOverflowTooltip: true,
},
{
type: "operate",
label: this.$t("common:action:action"),
minWidth: 200,
operates: [
{
name: this.$t("common:button:edit"),
type: "primary",
emitKey: "editCb",
},
// {
// name: this.$t("common:button:delete"),
// type: "danger",
// emitKey: "deleteCb",
// },
],
},
],
searchForm: [
{
type: "Input",
label: this.$t("system:userlist:label:UserName"),
prop: "UserName",
width: "120px",
placeholder: "",
},
{
type: "Input",
label: this.$t("system:userlist:label:RealName"),
prop: "RealName",
width: "120px",
placeholder: "",
},
{
type: "Input",
label: this.$t("system:userlist:label:Phone"),
prop: "Phone",
width: "120px",
placeholder: "",
},
{
type: "Input",
label: this.$t("system:userlist:label:Organization"),
prop: "OrganizationName",
width: "120px",
placeholder: "",
},
{
type: "Select",
label: this.$t("system:userlist:label:InternalOrExternal"),
prop: "IsZhiZhun",
width: "100px",
options: [
{
label: this.$t(
"system:userlist:label:InternalOrExternal:Internal"
),
value: true,
},
{
label: this.$t(
"system:userlist:label:InternalOrExternal:External"
),
value: false,
},
],
props: { label: "label", value: "value" },
change: (scope) => "",
placeholder: "",
},
{
type: "Select",
label: this.$t("system:userlist:label:IsTestUser"),
prop: "IsTestUser",
width: "100px",
options: [
{
label: this.$t("system:userlist:label:IsTestUser:Yes"),
value: true,
},
{
label: this.$t("system:userlist:label:IsTestUser:No"),
value: false,
},
],
props: { label: "label", value: "value" },
change: (scope) => "",
placeholder: "",
},
{
type: "Select",
label: this.$t("system:userlist:label:Status"),
prop: "UserState",
width: "100px",
options: [
{ label: this.$t("system:userlist:label:Status:Enable"), value: 1 },
{
label: this.$t("system:userlist:label:Status:Disable"),
value: 0,
},
],
props: { label: "label", value: "value" },
change: (scope) => "",
placeholder: "",
},
{
type: "Select",
label: this.$t("system:userlist:label:UserType"),
prop: "UserType",
width: "100px",
options: [], //
props: { label: "UserType", value: "Id" }, //
placeholder: "",
},
],
searchHandle: [
{
label: this.$t("common:button:reset"),
type: "primary",
emitKey: "reset",
},
{
label: this.$t("common:button:search"),
type: "primary",
emitKey: "search",
},
{
label: this.$t("common:button:new"),
type: "primary",
emitKey: "new",
},
],
userTypeOptions: [], userTypeOptions: [],
loading: false, loading: false,
total: 0, total: 0,
users: [] users: [],
} };
}, },
created() { created() {
this.getList() this.getList();
this.getInfo() this.getInfo();
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true;
getUserList(this.searchData).then(res => { getUserList(this.searchData)
this.loading = false .then((res) => {
this.users = res.Result.CurrentPageData this.loading = false;
this.total = res.Result.TotalCount this.users = res.Result.CurrentPageData;
}).catch(() => { this.total = res.Result.TotalCount;
this.loading = false })
}) .catch(() => {
this.loading = false;
});
}, },
findItemIndex(key) { findItemIndex(key) {
return this.searchForm.findIndex(value => value.prop && value.prop === key return this.searchForm.findIndex(
) (value) => value.prop && value.prop === key
);
}, },
// //
async getInfo() { async getInfo() {
const res = await getUserTypeList() const res = await getUserTypeList();
const index = this.findItemIndex('UserType') const index = this.findItemIndex("UserType");
this.$set(this.searchForm[index], 'options', res.Result) this.$set(this.searchForm[index], "options", res.Result);
}, },
handleAddUser() { handleAddUser() {
this.$router.push({ path: '/system/user/add' }) this.$router.push({ path: "/system/user/add" });
}, },
// //
handleEditUser(data) { handleEditUser(data) {
this.$router.push({ path: '/system/user/edit', query: { Id: data.Id }}) this.$router.push({
path: "/system/user/edit",
query: { Id: data.Id, userName: data.UserName, email: data.EMail },
});
}, },
// //
handleDeleteUser(data) { handleDeleteUser(data) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok', }).then(() => {
cancelButtonText: 'Cancel' deleteSysUser(data.Id).then((res) => {
}) if (res.IsSuccess) {
.then(() => { this.users.splice(
deleteSysUser(data.Id) this.users.findIndex((item) => item.Id === data.Id),
.then(res => { 1
if (res.IsSuccess) { );
this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1) this.$message.success(
this.$message.success('Deleted successfully!') this.$t("common:message:deletedSuccessfully")
} );
}) }
}) });
});
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
} },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
>>>.box-body .search .base-search-form .el-form-item{ /deep/ .box-body .search .base-search-form .el-form-item {
margin-bottom: 15px; margin-bottom: 15px;
} }
</style> </style>

View File

@ -71,17 +71,19 @@ export const columns = [
label: 'Internal Or External:', label: 'Internal Or External:',
hidden: true, hidden: true,
slot: 'isZhiZhunSlot', slot: 'isZhiZhunSlot',
minWidth: 160, minWidth: 140,
sortable: 'custom', sortable: 'custom',
showOverflowTooltip: true }, showOverflowTooltip: true
// { },
// prop: 'IsTestUser', {
// label: 'Is Test User', prop: 'IsTestUser',
// hidden: true, label: 'Is Test User',
// slot: 'isTestUserSlot', hidden: true,
// minWidth: 120, slot: 'isTestUserSlot',
// sortable: 'custom', minWidth: 120,
// showOverflowTooltip: true }, sortable: 'custom',
showOverflowTooltip: true
},
{ {
prop: 'Status', prop: 'Status',
label: 'Status', label: 'Status',
@ -89,14 +91,17 @@ export const columns = [
slot: 'statusSlot', slot: 'statusSlot',
minWidth: 100, minWidth: 100,
sortable: 'custom', sortable: 'custom',
showOverflowTooltip: true }, showOverflowTooltip: true
{ type: 'operate', },
{
type: 'operate',
label: 'Action', label: 'Action',
minWidth: 100, minWidth: 200,
operates: [ operates: [
{ name: 'Edit', type: 'primary', emitKey: 'editCb' }, { name: 'Edit', type: 'primary', emitKey: 'editCb' },
// { name: 'Delete', type: 'danger', emitKey: 'deleteCb' } // { name: 'Delete', type: 'danger', emitKey: 'deleteCb' }
] } ]
}
] ]
// 用户列表查询表单配置信息 // 用户列表查询表单配置信息
@ -142,19 +147,19 @@ export const searchForm = [
change: scope => '', change: scope => '',
placeholder: '' placeholder: ''
}, },
// { {
// type: 'Select', type: 'Select',
// label: 'Is Test User:', label: 'Is Test User:',
// prop: 'IsTestUser', prop: 'IsTestUser',
// width: '100px', width: '100px',
// options: [ options: [
// { label: 'Yes', value: true }, { label: 'Yes', value: true },
// { label: 'No', value: false } { label: 'No', value: false }
// ], ],
// props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
// change: scope => '', change: scope => '',
// placeholder: '' placeholder: ''
// }, },
{ {
type: 'Select', type: 'Select',
label: 'Status:', label: 'Status:',

View File

@ -129,11 +129,13 @@
min-width="140" min-width="140"
sortable="custom" sortable="custom"
></el-table-column> ></el-table-column>
<!--操作--> <!--访视-->
<el-table-column <el-table-column
:label="$t('common:action:action')" align="center"
width="330" prop="StudyTime"
class-name="actionBox" :label="$t('trials:auditRecord:table:visit')"
show-overflow-tooltip
min-width="140"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!--切换访视--> <!--切换访视-->
@ -145,21 +147,30 @@
@add="addVisit" @add="addVisit"
@selectChange="selectChange" @selectChange="selectChange"
/> />
</template>
</el-table-column>
<!--操作-->
<el-table-column
:label="$t('common:action:action')"
width="100"
class-name="actionBox"
>
<template slot-scope="scope">
<!-- 详情 --> <!-- 详情 -->
<el-button <el-button
type="text" circle
icon="el-icon-view"
:title="$t('trials:trials-list:action:panel')"
@click.stop="detail(scope.row)" @click.stop="detail(scope.row)"
class="detail" />
>{{ $t("trials:trials-list:action:panel") }}</el-button
>
<!-- 移除 --> <!-- 移除 -->
<el-button <el-button
type="text" circle
icon="el-icon-delete"
:title="$t('common:button:remove')"
@click.stop="remove(scope.row)" @click.stop="remove(scope.row)"
class="detail"
:disabled="!scope.row.SubjectVisitId" :disabled="!scope.row.SubjectVisitId"
>{{ $t("common:button:remove") }}</el-button />
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -46,6 +46,13 @@
show-overflow-tooltip show-overflow-tooltip
min-width="140" min-width="140"
></el-table-column> ></el-table-column>
<!--申办方-->
<el-table-column
prop="Sponsor"
:label="$t('trials:trials-list:table:sponsor')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--受试者编号--> <!--受试者编号-->
<el-table-column <el-table-column
prop="Code" prop="Code"
@ -78,13 +85,6 @@
<span>{{ $fd("sex", Number(scope.row.Sex)) }}</span> <span>{{ $fd("sex", Number(scope.row.Sex)) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!--申办方-->
<el-table-column
prop="Sponsor"
:label="$t('trials:trials-list:table:sponsor')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--状态--> <!--状态-->
<el-table-column <el-table-column
prop="TrialStatusStr" prop="TrialStatusStr"
@ -113,10 +113,10 @@
}}</el-tag> }}</el-tag>
</template></el-table-column </template></el-table-column
> >
<!--创建日期--> <!--加入时间-->
<el-table-column <el-table-column
prop="CreateTime" prop="CreateTime"
:label="$t('trials:trials-list:table:createDate')" :label="$t('trials:staff:table:joinTime')"
show-overflow-tooltip show-overflow-tooltip
min-width="140" min-width="140"
></el-table-column> ></el-table-column>
@ -124,13 +124,19 @@
<el-table-column :label="$t('common:action:action')" width="250"> <el-table-column :label="$t('common:action:action')" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 详情 --> <!-- 详情 -->
<el-button type="text" @click.stop="detail(scope.row)">{{ <el-button
$t("trials:trials-list:action:panel") circle
}}</el-button> icon="el-icon-view"
:title="$t('trials:trials-list:action:panel')"
@click.stop="detail(scope.row)"
/>
<!-- 移除项目 --> <!-- 移除项目 -->
<el-button type="text" @click.stop="remove(scope.row)">{{ <el-button
$t("common:button:remove") circle
}}</el-button> icon="el-icon-delete"
:title="$t('common:button:remove')"
@click.stop="remove(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -135,13 +135,20 @@
<el-table-column :label="$t('common:action:action')" width="250"> <el-table-column :label="$t('common:action:action')" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 影像 --> <!-- 影像 -->
<el-button type="text" @click.stop="image(scope.row)">{{ <el-button
$t("trials:inspection:button:image") circle
}}</el-button> icon="el-icon-view"
<!-- 报告 --> :title="$t('trials:inspection:button:image')"
<el-button type="text" @click.stop="report(scope.row)" disabled>{{ @click.stop="image(scope.row)"
$t("trials:inspection:button:report") />
}}</el-button> <!-- 诊断报告 -->
<el-button
circle
icon="el-icon-document"
@click.stop="report(scope.row)"
:title="$t('trials:inspection:button:diagnosticReport')"
disabled
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -59,6 +59,18 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<!-- 最新接收时间 -->
<el-form-item :label="$t('trials:inspection:table:latestReceiveTime')">
<el-date-picker
v-model="dateValue"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
clearable
>
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
@ -213,10 +225,11 @@
<el-table-column :label="$t('common:action:action')" width="250"> <el-table-column :label="$t('common:action:action')" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" circle
icon="el-icon-plus"
:title="$t('trials:inspection:button:addTrials')"
@click.stop="handleOpenDialog(scope.row, 'add')" @click.stop="handleOpenDialog(scope.row, 'add')"
>{{ $t("trials:inspection:button:addTrials") }}</el-button />
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -272,6 +285,8 @@ const defaultSearchData = () => {
callingAE: null, callingAE: null,
ExperimentName: null, ExperimentName: null,
Asc: false, Asc: false,
BeginPushTime: null,
EndPushTime: null,
SortField: "LatestPushTime", SortField: "LatestPushTime",
PageIndex: 1, PageIndex: 1,
PageSize: 10, PageSize: 10,
@ -292,6 +307,7 @@ export default {
searchData: defaultSearchData(), searchData: defaultSearchData(),
calledAeList: [], calledAeList: [],
callingAeList: [], callingAeList: [],
dateValue: [],
// //
total: 0, total: 0,
loading: false, loading: false,
@ -340,6 +356,13 @@ export default {
Object.keys(this.searchData).forEach((key) => { Object.keys(this.searchData).forEach((key) => {
data[key] = this.searchData[key]; data[key] = this.searchData[key];
}); });
if (this.dateValue[0] && this.dateValue[1]) {
data.BeginPushTime = this.dateValue[0].toISOString();
data.EndPushTime = this.dateValue[1].toISOString();
} else {
data.BeginPushTime = null;
data.EndPushTime = null;
}
try { try {
this.loading = true; this.loading = true;
let res = await getPatientList(data); let res = await getPatientList(data);
@ -361,6 +384,7 @@ export default {
handleReset() { handleReset() {
this.searchData = defaultSearchData(); this.searchData = defaultSearchData();
this.$refs.inspectionList.clearSort(); this.$refs.inspectionList.clearSort();
this.dateValue = [];
this.getList(); this.getList();
}, },
// //

View File

@ -125,10 +125,10 @@
> >
<el-select v-model="trialForm.CriterionTypeList" multiple clearable> <el-select v-model="trialForm.CriterionTypeList" multiple clearable>
<el-option <el-option
v-for="item of $d.CriterionType" v-for="item of CriterionTypeList"
:key="item.id" :key="item.Id"
:label="item.label" :label="item.CriterionName"
:value="item.value" :value="item.CriterionType"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -217,7 +217,11 @@
<script> <script>
// import store from "@/store"; // import store from "@/store";
import { mapGetters, mapState } from "vuex"; import { mapGetters, mapState } from "vuex";
import { getTrialInfoHir, addOrUpdateTrialHir } from "@/api/trials"; import {
getTrialInfoHir,
addOrUpdateTrialHir,
getSystemConfirmedCreiterionList,
} from "@/api/trials";
import { getBasicDataSelects } from "@/api/dictionary/dictionary"; import { getBasicDataSelects } from "@/api/dictionary/dictionary";
export default { export default {
name: "TrialForm", name: "TrialForm",
@ -359,6 +363,7 @@ export default {
indicationNum: null, indicationNum: null,
phaseNum: null, phaseNum: null,
dictionaryList: {}, dictionaryList: {},
CriterionTypeList: [], //
}; };
}, },
computed: { computed: {
@ -369,6 +374,17 @@ export default {
this.initPage(); this.initPage();
}, },
methods: { methods: {
//
async getSystemConfirmedCreiterionList() {
try {
let res = await getSystemConfirmedCreiterionList();
if (res.IsSuccess) {
this.CriterionTypeList = res.Result;
}
} catch (err) {
console.log(err);
}
},
initForm() { initForm() {
this.loading = true; this.loading = true;
getTrialInfoHir(this.trialId) getTrialInfoHir(this.trialId)
@ -490,6 +506,7 @@ export default {
this.trialForm.Id = this.trialId; this.trialForm.Id = this.trialId;
this.initForm(); this.initForm();
} }
this.getSystemConfirmedCreiterionList();
this.loading = false; this.loading = false;
}, },
getDicData() { getDicData() {

View File

@ -18,6 +18,14 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 项目编号 -->
<el-form-item :label="$t('trials:trials-list:table:trialId')">
<el-input
v-model="searchData.TrialCode"
style="width: 100px"
clearable
/>
</el-form-item>
<!-- 研究方案号 --> <!-- 研究方案号 -->
<el-form-item :label="$t('trials:trials-list:table:researchNumber')"> <el-form-item :label="$t('trials:trials-list:table:researchNumber')">
<el-input <el-input
@ -103,6 +111,12 @@
<span>{{ $fd("TrialType", scope.row.TrialType) }}</span> <span>{{ $fd("TrialType", scope.row.TrialType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="TrialCode"
:label="$t('trials:trials-list:table:trialId')"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column <el-table-column
prop="ResearchProgramNo" prop="ResearchProgramNo"
:label="$t('trials:trials-list:table:researchNumber')" :label="$t('trials:trials-list:table:researchNumber')"
@ -170,8 +184,15 @@
:label="$t('trials:trials-list:table:dateAuthorized')" :label="$t('trials:trials-list:table:dateAuthorized')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> >
/> <template slot-scope="scope">
<span>{{
scope.row.AuthorizationDate
? scope.row.AuthorizationDate.split(" ")[0]
: ""
}}</span>
</template>
</el-table-column>
<!--授权时长--> <!--授权时长-->
<el-table-column <el-table-column
prop="AuthorizationYear" prop="AuthorizationYear"
@ -179,14 +200,6 @@
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
/>
<!--失效日期-->
<!-- <el-table-column
prop="CreateTime"
:label="$t('trials:trials-list:table:dateDisabled')"
show-overflow-tooltip
sortable="custom"
/> -->
<el-table-column label="" min-width="150" align="left" fixed="right"> <el-table-column label="" min-width="150" align="left" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 详情 --> <!-- 详情 -->
@ -337,6 +350,7 @@ const searchDataDefault = () => {
SortField: "CreateTime", SortField: "CreateTime",
SponsorName: "", SponsorName: "",
trialType: null, trialType: null,
TrialCode: null,
}; };
}; };
export default { export default {

View File

@ -85,13 +85,19 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<el-button type="text" @click.stop="detail(scope.row, 'top')">{{ <el-button
$t("trials:enrolledReviews:button:view") circle
}}</el-button> icon="el-icon-view"
:title="$t('trials:enrolledReviews:button:view')"
@click.stop="detail(scope.row, 'top')"
/>
<!-- 移除 --> <!-- 移除 -->
<el-button type="text" @click.stop="remove(scope.row)">{{ <el-button
$t("common:button:remove") circle
}}</el-button> icon="el-icon-delete"
:title="$t('common:button:remove')"
@click.stop="remove(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -207,13 +213,19 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<el-button type="text" @click.stop="detail(scope.row, 'bottom')">{{ <el-button
$t("trials:enrolledReviews:button:view") circle
}}</el-button> icon="el-icon-view"
:title="$t('trials:enrolledReviews:button:view')"
@click.stop="detail(scope.row, 'bottom')"
/>
<!-- 添加 --> <!-- 添加 -->
<el-button type="text" @click.stop="add(scope.row)">{{ <el-button
$t("common:button:add") circle
}}</el-button> icon="el-icon-plus"
:title="$t('common:button:add')"
@click.stop="add(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -4,17 +4,25 @@
<template slot="search-container"> <template slot="search-container">
<el-form :inline="true"> <el-form :inline="true">
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-form-item :label="$t('trials:crcQuestion:table:subjectId')"> <el-form-item :label="$t('trials:uploadMonitor:table:subjectId')">
<el-input <el-input
v-model="searchData.SubjectCode" v-model="searchData.SubjectCode"
clearable clearable
style="width: 140px" style="width: 140px"
/> />
</el-form-item> </el-form-item>
<!-- 患者编号 -->
<el-form-item :label="$t('trials:uploadDicomList:table:pId')">
<el-input
v-model="searchData.PatientIdStr"
clearable
style="width: 140px"
/>
</el-form-item>
<!-- 患者姓名 --> <!-- 患者姓名 -->
<el-form-item :label="$t('trials:uploadDicomList:table:patientName')"> <el-form-item :label="$t('trials:uploadDicomList:table:patientName')">
<el-input <el-input
v-model="searchData.SubjectShortName" v-model="searchData.PatientName"
clearable clearable
style="width: 140px" style="width: 140px"
/> />
@ -35,6 +43,34 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--拍片日期-->
<el-form-item :label="$t('trials:trials-panel:table:ScanDate')">
<el-date-picker
v-model="dateValue"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
clearable
>
</el-date-picker>
</el-form-item>
<!--状态-->
<el-form-item :label="$t('trials:trials-list:table:status')">
<el-select
v-model="searchData.SubmitState"
clearable
filterable
style="width: 150px"
>
<el-option
v-for="item of $d.SubmitState"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
@ -234,14 +270,21 @@
> >
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!--评估结果--> <!--影像数据-->
<el-dropdown-item <el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:result']" v-hasPermi="['trials:trials-panel:hirVisit:result']"
disabled disabled
command="result" command="result"
>{{ $t("trials:adReview:title:result") }}</el-dropdown-item >{{ $t("trials:adReview:title:result") }}</el-dropdown-item
> >
<!--下载影像--> <!--评估报告-->
<el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:result']"
disabled
command="result"
>{{ $t("trials:adReview:title:result") }}</el-dropdown-item
>
<!--数据导出-->
<el-dropdown-item <el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:download']" v-hasPermi="['trials:trials-panel:hirVisit:download']"
command="downloadImage" command="downloadImage"
@ -253,15 +296,6 @@
$t("trials:reading:button:uploadImages") $t("trials:reading:button:uploadImages")
}}</el-dropdown-item }}</el-dropdown-item
> >
<!--下载医疗报告-->
<el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:download']"
command="downloadReport"
disabled
>{{
$t("trials:reading:button:uploadReport")
}}</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
@ -298,14 +332,9 @@ import Pagination from "@/components/Pagination";
import editStudyList from "./components/edit-study-list.vue"; import editStudyList from "./components/edit-study-list.vue";
import visitInfo from "./components/visit-info.vue"; import visitInfo from "./components/visit-info.vue";
import { deleteSubjectVisit } from "@/api/trials"; import { deleteSubjectVisit } from "@/api/trials";
import { import { getPatientSubejctVisitList } from "@/api/trials/visit.js";
getPatientSubejctVisitList,
getSubjectImageZipInfo,
} from "@/api/trials/visit.js";
import { submitVisitStudyBinding } from "@/api/inspection.js"; import { submitVisitStudyBinding } from "@/api/inspection.js";
import JSZip from "jszip"; import { downloadImage } from "@/utils/uploadZip.js";
import axios from "axios";
import { saveAs } from "file-saver";
const defaultSearchData = () => { const defaultSearchData = () => {
return { return {
subjectCode: null, subjectCode: null,
@ -315,6 +344,12 @@ const defaultSearchData = () => {
pageSize: 20, pageSize: 20,
asc: true, asc: true,
sortField: "", sortField: "",
SubmitState: null,
PatientName: null,
PatientIdStr: null,
PatientSex: null,
BeginStudyTime: null,
EndStudyTime: null,
}; };
}; };
export default { export default {
@ -325,6 +360,7 @@ export default {
// //
searchData: defaultSearchData(), searchData: defaultSearchData(),
visitOptions: [], visitOptions: [],
dateValue: [],
// //
list: [], list: [],
loading: false, loading: false,
@ -353,6 +389,7 @@ export default {
handleReset() { handleReset() {
this.searchData = defaultSearchData(); this.searchData = defaultSearchData();
this.$refs.visitList.clearSort(); this.$refs.visitList.clearSort();
this.dateValue = [];
this.getList(); this.getList();
}, },
// //
@ -370,6 +407,13 @@ export default {
data[key] = this.searchData[key]; data[key] = this.searchData[key];
}); });
data.TrialId = this.$route.query.trialId; data.TrialId = this.$route.query.trialId;
if (this.dateValue[0] && this.dateValue[1]) {
data.BeginStudyTime = this.dateValue[0].toISOString();
data.EndStudyTime = this.dateValue[1].toISOString();
} else {
data.BeginStudyTime = null;
data.EndStudyTime = null;
}
try { try {
this.loading = true; this.loading = true;
let res = await getPatientSubejctVisitList(data); let res = await getPatientSubejctVisitList(data);
@ -455,111 +499,7 @@ export default {
downloadReport() {}, downloadReport() {},
// //
async downloadImage(item) { async downloadImage(item) {
try { downloadImage(item.subjectId);
let res = await getSubjectImageZipInfo(item.SubjectId);
if (res.IsSuccess) {
let item = res.Result;
await this.setfolder(item);
}
} catch (err) {
console.log(err);
}
},
async setfolder(item) {
const zip = new JSZip(); //
let zipObj = {};
const promises = [];
for (let patient of item.PatientList) {
if (!zipObj[patient.PatientIdStr]) {
zipObj[patient.PatientIdStr] = zip.folder(
`${item.SubjectCode}_${patient.PatientIdStr}`
);
}
for (let visit of patient.VisitList) {
if (!zipObj[`${patient.PatientIdStr}${visit.VisitName}`]) {
zipObj[`${patient.PatientIdStr}${visit.VisitName}`] = zipObj[
patient.PatientIdStr
].folder(visit.VisitName);
}
for (let study of visit.StudyList) {
let date = study.StudyTime.split(" ")[0];
for (let series of study.SeriesList) {
if (
!zipObj[
`${patient.PatientIdStr}${visit.VisitName}${series.Modality}`
]
) {
zipObj[
`${patient.PatientIdStr}${visit.VisitName}${series.Modality}`
] = zipObj[`${patient.PatientIdStr}${visit.VisitName}`].folder(
`${date}_${series.Modality}`
);
}
for (let instance of series.InstancePathList) {
let obj = {
subjectCode: item.SubjectCode,
patientIdStr: patient.PatientIdStr,
visitName: visit.VisitName,
date: study.StudyTime.split(" ")[0],
modality: series.Modality,
instancePath: instance.Path,
dicomName: instance.Path.split("/Dicom/")[1],
};
const promise = this.handleBatchDown(
obj,
zipObj[
`${patient.PatientIdStr}${visit.VisitName}${series.Modality}`
]
);
promises.push(promise);
}
}
}
}
}
// zip
Promise.all(promises)
.then(() => {
// zip
zip
.generateAsync({
type: "blob",
compression: "DEFLATE", // STORE: DEFLATE
compressionOptions: {
level: 9, // 1~9 1 9
},
})
.then((res) => {
saveAs(res, item.SubjectCode + new Date().getTime() + "_CV.zip"); // 使FileSaver.saveAs
zipObj = null;
});
})
.catch((reason) => {});
},
async handleBatchDown(item, zip) {
return new Promise((resolve) => {
this.getFileData(
this.OSSclientConfig.basePath + item.instancePath.slice(1)
).then((res) => {
const fileName = item.dicomName + ".dcm";
zip.file(fileName, res.data, { binary: true });
resolve();
});
});
},
getFileData(fileUrl) {
return new Promise((resolve, reject) => {
axios(fileUrl, {
method: "GET",
responseType: "blob", // blob arraybuffer
})
.then((res) => {
resolve(res);
})
.catch((error) => {
reject(error);
});
});
}, },
}, },
}; };

View File

@ -3,34 +3,45 @@
<!-- 搜索框 --> <!-- 搜索框 -->
<template slot="search-container"> <template slot="search-container">
<el-form :inline="true"> <el-form :inline="true">
<!-- 受试者编号 --> <!-- 阅片标准 -->
<el-form-item :label="$t('trials:crcQuestion:table:subjectId')"> <el-form-item :label="$t('trials:processCfg:form:criterion')">
<el-input v-model="searchData.SubjectCode" style="width: 140px" />
</el-form-item>
<!-- 患者编号 -->
<!-- <el-form-item :label="$t('trials:uploadDicomList:table:pId')">
<el-input v-model="searchData.SubjectInfo" style="width: 140px" />
</el-form-item> -->
<!-- 患者姓名 -->
<!-- <el-form-item :label="$t('trials:uploadDicomList:table:patientName')">
<el-input v-model="searchData.SubjectInfo" style="width: 140px" />
</el-form-item> -->
<!-- 访视名称 -->
<!-- <el-form-item :label="$t('trials:globalReview:table:visitName')">
<el-select <el-select
v-model="searchData.SiteId" v-model="searchData.TrialReadingCriterionId"
clearable clearable
filterable filterable
style="width: 150px" style="width: 150px"
> >
<el-option <el-option
v-for="item of visitOptions" v-for="item of CriterionTypeList"
:key="item.SiteId" :key="item.Id"
:label="item.TrialSiteCode" :label="item.CriterionName"
:value="item.SiteId" :value="item.Id"
/> />
</el-select> </el-select>
</el-form-item> --> </el-form-item>
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:uploadMonitor:table:subjectId')">
<el-input v-model="searchData.SubjectCode" style="width: 140px" />
</el-form-item>
<!-- 患者编号 -->
<el-form-item :label="$t('trials:uploadDicomList:table:pId')">
<el-input v-model="searchData.PatientIdStr" style="width: 140px" />
</el-form-item>
<!-- 患者姓名 -->
<el-form-item :label="$t('trials:uploadDicomList:table:patientName')">
<el-input v-model="searchData.PatientName" style="width: 140px" />
</el-form-item>
<!-- 任务创建时间 -->
<el-form-item :label="$t('trials:reviewTrack:table:createTime')">
<el-date-picker
v-model="dateValue2"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<!-- 任务状态 --> <!-- 任务状态 -->
<el-form-item :label="$t('trials:readTask:table:taskState')"> <el-form-item :label="$t('trials:readTask:table:taskState')">
<el-select <el-select
@ -210,18 +221,20 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!--阅片结果--> <!--阅片结果-->
<el-button <el-button
type="text" circle
icon="el-icon-view"
:title="$t('trials:auditRecord:table:readingResult')"
@click="readResult(scope.row)" @click="readResult(scope.row)"
:disabled="scope.row.ReadingTaskState !== 2" :disabled="scope.row.ReadingTaskState !== 2"
>{{ $t("trials:auditRecord:table:readingResult") }}</el-button />
>
<!--下载报告--> <!--下载报告-->
<el-button <el-button
type="text" circle
icon="el-icon-download"
:title="$t('trials:reading:button:download')"
@click="downloadReport(scope.row)" @click="downloadReport(scope.row)"
disabled disabled
>{{ $t("trials:reading:button:uploadReport") }}</el-button />
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -242,6 +255,7 @@ import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import { getPatientVisitTaskList } from "@/api/readManagenent.js"; import { getPatientVisitTaskList } from "@/api/readManagenent.js";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { getSystemConfirmedCreiterionList } from "@/api/trials";
const defaultSearchData = () => { const defaultSearchData = () => {
return { return {
SubjectCode: null, SubjectCode: null,
@ -254,6 +268,14 @@ const defaultSearchData = () => {
PageSize: 20, PageSize: 20,
Asc: false, Asc: false,
SortField: "CreateTime", SortField: "CreateTime",
TrialReadingCriterionId: null,
TaskState: null,
SubjectShortName: null,
PatientName: null,
PatientIdStr: null,
PatientSex: null,
BeginTaskCreateTime: null,
EndTaskCreateTime: null,
}; };
}; };
export default { export default {
@ -264,6 +286,8 @@ export default {
// //
searchData: defaultSearchData(), searchData: defaultSearchData(),
dateValue: [], dateValue: [],
dateValue2: [],
CriterionTypeList: [],
// //
list: [], list: [],
loading: false, loading: false,
@ -273,8 +297,20 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getSystemConfirmedCreiterionList();
}, },
methods: { methods: {
//
async getSystemConfirmedCreiterionList() {
try {
let res = await getSystemConfirmedCreiterionList();
if (res.IsSuccess) {
this.CriterionTypeList = res.Result;
}
} catch (err) {
console.log(err);
}
},
// //
handleSearch() { handleSearch() {
this.getList(); this.getList();
@ -288,6 +324,7 @@ export default {
reset() { reset() {
this.searchData = defaultSearchData(); this.searchData = defaultSearchData();
this.dateValue = []; this.dateValue = [];
this.dateValue2 = [];
this.$refs.redManagenentTable.clearSort(); this.$refs.redManagenentTable.clearSort();
}, },
// //
@ -313,6 +350,13 @@ export default {
data.EarliestStudyTime = null; data.EarliestStudyTime = null;
data.LatestStudyTime = null; data.LatestStudyTime = null;
} }
if (this.dateValue2[0] && this.dateValue2[1]) {
data.BeginTaskCreateTime = this.dateValue2[0].toISOString();
data.EndTaskCreateTime = this.dateValue2[1].toISOString();
} else {
data.BeginTaskCreateTime = null;
data.EndTaskCreateTime = null;
}
this.loading = true; this.loading = true;
let res = await getPatientVisitTaskList(data); let res = await getPatientVisitTaskList(data);
this.loading = false; this.loading = false;

View File

@ -46,6 +46,10 @@
> >
<el-input v-model="data.Description" disabled /> <el-input v-model="data.Description" disabled />
</el-form-item> </el-form-item>
<!--检查日期-->
<el-form-item :label="$t('trials:audit:table:studyDate')" prop="reason">
<el-input v-model="data.StudyTime" disabled />
</el-form-item>
<!--访视--> <!--访视-->
<el-form-item <el-form-item
:label="$t('trials:auditRecord:table:visit')" :label="$t('trials:auditRecord:table:visit')"

View File

@ -8,17 +8,6 @@
<el-form-item :label="$t('trials:auditRecord:table:researchNo')"> <el-form-item :label="$t('trials:auditRecord:table:researchNo')">
<el-input v-model="ResearchProgramNo" disabled /> <el-input v-model="ResearchProgramNo" disabled />
</el-form-item> </el-form-item>
<!-- 中心 -->
<el-form-item :label="$t('trials:auditRecord:table:siteNo')">
<el-select v-model="searchData.SiteId" clearable filterable>
<el-option
v-for="(item, index) of siteOptions"
:key="index"
:label="item.TrialSiteCode"
:value="item.SiteId"
/>
</el-select>
</el-form-item>
<!-- 受试者 --> <!-- 受试者 -->
<el-form-item :label="$t('trials:auditRecord:table:subject')"> <el-form-item :label="$t('trials:auditRecord:table:subject')">
<el-input v-model="searchData.SubjectInfo" /> <el-input v-model="searchData.SubjectInfo" />
@ -98,11 +87,6 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<!--<el-form-item label="阅片人: ">-->
<!--<el-select v-model="searchData.ModuleType" placeholder="模块" clearable>-->
<!--<el-option v-for="item of dict.type.ModuleType" :value="item.label" :label="item.raw.ValueCN"></el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!-- 是否签名 --> <!-- 是否签名 -->
<el-form-item :label="$t('trials:auditRecord:table:isSign')"> <el-form-item :label="$t('trials:auditRecord:table:isSign')">
<el-select <el-select
@ -133,8 +117,6 @@
:key="`RoleName${item.value}`" :key="`RoleName${item.value}`"
/> />
</el-select> </el-select>
<!-- <el-input v-model="searchData.RoleName" clearable/>-->
<!-- RoleName-->
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
@ -174,15 +156,6 @@
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 中心编号 -->
<el-table-column
prop="SiteCode"
min-width="100"
:label="$t('trials:auditRecord:table:siteNo')"
fixed="left"
show-overflow-tooltip
sortable="custom"
/>
<!-- 受试者 --> <!-- 受试者 -->
<el-table-column <el-table-column
prop="SubjectCode" prop="SubjectCode"
@ -210,15 +183,6 @@
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 盲态任务标识 -->
<el-table-column
prop="BlindName"
min-width="170"
:label="$t('trials:auditRecord:table:taskBlindName')"
fixed="left"
show-overflow-tooltip
sortable="custom"
/>
<!-- 阅片标准 --> <!-- 阅片标准 -->
<el-table-column <el-table-column
prop="TrialReadingCriterionName" prop="TrialReadingCriterionName"

View File

@ -1,12 +1,16 @@
<template> <template>
<BaseContainer> <BaseContainer>
<template slot="search-container"> <template slot="search-container">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item <el-form-item
:label="$t('trials:loginLog:table:optType')" :label="$t('trials:loginLog:table:optType')"
prop="OptType" prop="OptType"
> >
<el-select v-model="searchData.OptType" clearable style="width:120px;"> <el-select
v-model="searchData.OptType"
clearable
style="width: 120px"
>
<el-option <el-option
v-for="item of $d.UserOptType" v-for="item of $d.UserOptType"
:key="'UserOptType' + item.label" :key="'UserOptType' + item.label"
@ -15,15 +19,12 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="IP" prop="IP">
label="IP"
prop="IP"
>
<el-input <el-input
v-model="searchData.IP" v-model="searchData.IP"
size="small" size="small"
clearable clearable
style="width:120px;" style="width: 120px"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -34,12 +35,39 @@
v-model="searchData.LoginFaildName" v-model="searchData.LoginFaildName"
size="small" size="small"
clearable clearable
style="width:120px;" style="width: 120px"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('trials:loginLog:table:createTime')" :label="$t('trials:loginLog:table:userName')"
prop="LoginUserName"
> >
<el-input
v-model="searchData.LoginUserName"
size="small"
clearable
style="width: 120px"
/>
</el-form-item>
<el-form-item
:label="$t('trials:loginLog:table:userType')"
prop="OptType"
>
<el-select
v-model="searchData.LoginUserTypeEnum"
clearable
style="width: 120px"
>
<el-option
v-for="item of $d.UserType"
v-show="item.value !== 1 && item.value !== 2"
:key="'UserType' + item.label"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:loginLog:table:createTime')">
<el-date-picker <el-date-picker
v-model="datetimerange" v-model="datetimerange"
type="datetimerange" type="datetimerange"
@ -52,11 +80,15 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t("common:button:search") }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset"> <el-button
{{ $t('common:button:reset') }} type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -64,16 +96,14 @@
<template slot="main-container"> <template slot="main-container">
<el-table <el-table
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:60}" v-adaptive="{ bottomOffset: 60 }"
height="100" height="100"
:data="list" :data="list"
class="table" class="table"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
:default-sort="{ prop: 'CreateTime', order: 'descending' }"
> >
<el-table-column <el-table-column type="index" width="50" />
type="index"
width="50"
/>
<el-table-column <el-table-column
:label="$t('trials:loginLog:table:optType')" :label="$t('trials:loginLog:table:optType')"
prop="OptType" prop="OptType"
@ -82,7 +112,7 @@
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('UserOptType',scope.row.OptType) }} {{ $fd("UserOptType", scope.row.OptType) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -90,6 +120,7 @@
prop="IP" prop="IP"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('trials:loginLog:table:incorrectUserName')" :label="$t('trials:loginLog:table:incorrectUserName')"
@ -110,9 +141,10 @@
prop="LoginUserTypeEnum" prop="LoginUserTypeEnum"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('UserType',scope.row.LoginUserTypeEnum) }} {{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -120,15 +152,17 @@
prop="optUserName" prop="optUserName"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('trials:loginLog:table:optUserType')" :label="$t('trials:loginLog:table:optUserType')"
prop="OptUserTypeEnum" prop="OptUserTypeEnum"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('UserType',scope.row.OptUserTypeEnum) }} {{ $fd("UserType", scope.row.OptUserTypeEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -136,34 +170,41 @@
prop="CreateTime" prop="CreateTime"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" /> <pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</template> </template>
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
import { getUserLogList } from '@/api/user' import { getUserLogList } from "@/api/user";
import BaseContainer from '@/components/BaseContainer' import BaseContainer from "@/components/BaseContainer";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import moment from 'moment' import moment from "moment";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
TrialId:'', TrialId: "",
OptType: null, OptType: null,
Ip: '', Ip: "",
LoginFaildName: '', LoginFaildName: "",
BeginDate: '', BeginDate: "",
EndDate: '', EndDate: "",
Asc: true, Asc: false,
SortField: '', SortField: "CreateTime",
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20,
} };
} };
export default { export default {
components: { BaseContainer,Pagination }, components: { BaseContainer, Pagination },
data() { data() {
return { return {
moment, moment,
@ -171,53 +212,55 @@ export default {
list: [], list: [],
total: 0, total: 0,
loading: false, loading: false,
datetimerange: [] datetimerange: [],
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
getList() { getList() {
this.loading = true this.loading = true;
this.searchData.TrialId = this.$route.query.trialId this.searchData.TrialId = this.$route.query.trialId;
getUserLogList(this.searchData).then((res) => { getUserLogList(this.searchData)
this.loading = false .then((res) => {
this.list = res.Result.CurrentPageData this.loading = false;
this.total = res.Result.TotalCount this.list = res.Result.CurrentPageData;
}).catch(() => { this.total = res.Result.TotalCount;
this.loading = false })
}) .catch(() => {
this.loading = false;
});
}, },
handleDatetimeChange(val) { handleDatetimeChange(val) {
if (val) { if (val) {
this.searchData.BeginDate = val[0] this.searchData.BeginDate = val[0];
this.searchData.EndDate = val[1] this.searchData.EndDate = val[1];
} else { } else {
this.searchData.BeginDate = '' this.searchData.BeginDate = "";
this.searchData.EndDate = '' this.searchData.EndDate = "";
} }
}, },
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === 'ascending') { if (column.order === "ascending") {
this.searchData.Asc = true this.searchData.Asc = true;
} else { } else {
this.searchData.Asc = false this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
} },
} },
} };
</script> </script>