部分问题修复
parent
a78a0e038c
commit
88ad9101d4
|
@ -3549,3 +3549,11 @@ export function getPatientSeriesList(scpStudyId) {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取系统已确认标准
|
||||
export function getSystemConfirmedCreiterionList() {
|
||||
return request({
|
||||
url: `/Patient/getSystemConfirmedCreiterionList`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
};
|
|
@ -146,7 +146,7 @@ export default {
|
|||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
>>>.is-error{
|
||||
.is-error{
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
input:-webkit-autofill {
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
<template slot="dialog-body">
|
||||
<el-form
|
||||
ref="NoticeForm"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
label-width="180px"
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="通知级别: " prop="NoticeLevelEnum">
|
||||
<el-select v-model="form.NoticeLevelEnum" placeholder="通知级别" clearable size="small">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeLevel')"
|
||||
prop="NoticeLevelEnum"
|
||||
>
|
||||
<el-select v-model="form.NoticeLevelEnum" clearable size="small">
|
||||
<el-option
|
||||
v-for="item of dict.type.NoteLevel"
|
||||
:key="item.value"
|
||||
|
@ -19,8 +21,11 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知类型: " prop="NoticeTypeEnum">
|
||||
<el-select v-model="form.NoticeTypeEnum" placeholder="通知类型" clearable size="small">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeType')"
|
||||
prop="NoticeTypeEnum"
|
||||
>
|
||||
<el-select v-model="form.NoticeTypeEnum" clearable size="small">
|
||||
<el-option
|
||||
v-for="item of dict.type.NoteType"
|
||||
:key="item.value"
|
||||
|
@ -29,8 +34,15 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用项目: " prop="ApplicableProjectEnum">
|
||||
<el-select v-model="form.ApplicableProjectEnum" placeholder="适用项目" clearable size="small">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:ApplicableProject')"
|
||||
prop="ApplicableProjectEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.ApplicableProjectEnum"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of dict.type.NoticeApplicableTrial"
|
||||
:key="item.value"
|
||||
|
@ -39,8 +51,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用角色: " prop="NoticeUserTypeIdList">
|
||||
<el-select v-model="form.NoticeUserTypeIdList" multiple placeholder="使用角色" clearable size="small">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeUserTypeIdList')"
|
||||
prop="NoticeUserTypeIdList"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.NoticeUserTypeIdList"
|
||||
multiple
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of roleList"
|
||||
:key="item.Id"
|
||||
|
@ -49,8 +69,11 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提醒方式: " prop="NoticeModeEnum">
|
||||
<el-select v-model="form.NoticeModeEnum" placeholder="提醒方式" clearable size="small">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeMode')"
|
||||
prop="NoticeModeEnum"
|
||||
>
|
||||
<el-select v-model="form.NoticeModeEnum" clearable size="small">
|
||||
<el-option
|
||||
v-for="item of dict.type.NoticeMode"
|
||||
:key="item.value"
|
||||
|
@ -59,35 +82,37 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间: " prop="Code">
|
||||
<el-date-picker
|
||||
v-model="form.StartDate"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:StartDate')"
|
||||
prop="StartDate"
|
||||
>
|
||||
<el-date-picker v-model="form.StartDate" type="datetime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间: " prop="Code">
|
||||
<el-date-picker
|
||||
v-model="form.EndDate"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
/>
|
||||
<el-form-item :label="$t('system:notice:label:EndDate')" prop="EndDate">
|
||||
<el-date-picker v-model="form.EndDate" type="datetime" />
|
||||
</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
|
||||
v-model="form.IsPush"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知内容: " prop="NoticeContent">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeContent')"
|
||||
prop="NoticeContent"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.NoticeContent"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件: ">
|
||||
<el-form-item :label="$t('system:notice:label:file')">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
|
@ -99,20 +124,40 @@
|
|||
:limit="1"
|
||||
: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-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="handleCancle">Cancel</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">Save</el-button>
|
||||
<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>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateSystemNotice } from '@/api/system/notice'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import {
|
||||
addOrUpdateSystemNotice,
|
||||
uploadSystemNoticeDoc,
|
||||
} from "@/api/system/notice";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
const formDataDefault = () => {
|
||||
return {
|
||||
Id: null,
|
||||
|
@ -127,120 +172,147 @@ const formDataDefault = () => {
|
|||
FileName: null,
|
||||
Path: null,
|
||||
IsPush: false,
|
||||
NoticeUserTypeIdList: []
|
||||
}
|
||||
}
|
||||
NoticeUserTypeIdList: [],
|
||||
};
|
||||
};
|
||||
export default {
|
||||
components: { BaseModel },
|
||||
props: {
|
||||
roleList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
}
|
||||
return [];
|
||||
},
|
||||
dicts: ['NoticeApplicableTrial', 'NoteLevel', 'NoteType', 'NoticeState', 'NoticeMode'],
|
||||
},
|
||||
},
|
||||
dicts: [
|
||||
"NoticeApplicableTrial",
|
||||
"NoteLevel",
|
||||
"NoteType",
|
||||
"NoticeState",
|
||||
"NoticeMode",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
btnLoading: false,
|
||||
form: formDataDefault(),
|
||||
rules: {
|
||||
NoticeLevelEnum: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
NoticeTypeEnum: [{ 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' }],
|
||||
NoticeLevelEnum: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
],
|
||||
NoticeTypeEnum: [
|
||||
{ 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' }],
|
||||
NoticeUserTypeIdList: [{ required: true, message: 'Please specify', trigger: 'blur' }]
|
||||
NoticeUserTypeIdList: [
|
||||
{ required: true, message: "Please specify", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true }
|
||||
}
|
||||
model_cfg: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "600px",
|
||||
title: "",
|
||||
appendToBody: true,
|
||||
},
|
||||
mounted() {
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleRemoveFile() {
|
||||
this.form.FileName = null
|
||||
this.form.Path = null
|
||||
this.fileList = []
|
||||
this.form.FileName = null;
|
||||
this.form.Path = null;
|
||||
this.fileList = [];
|
||||
},
|
||||
beforeUpload() {
|
||||
if (this.fileList.length > 0) {
|
||||
this.$alert('最多只能传一个附件')
|
||||
return
|
||||
this.$alert(this.$t("system:notice:msg:message1"));
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreview(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, '_blank')
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const res = await this.OSSclient.put(`/System/NoticeAttachment/${param.file.name}`, file)
|
||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
|
||||
this.form.Path = this.$getObjectName(res.url)
|
||||
this.form.FileName = param.file.name
|
||||
this.loading = false
|
||||
},
|
||||
fileToBlob(file) {
|
||||
// 创建 FileReader 对象
|
||||
const reader = new FileReader()
|
||||
return new Promise(resolve => {
|
||||
// FileReader 添加 load 事件
|
||||
reader.addEventListener('load', (e) => {
|
||||
let blob
|
||||
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)
|
||||
})
|
||||
this.loading = true;
|
||||
var file = await this.fileToBlob(param.file);
|
||||
const res = await this.OSSclient.put(
|
||||
`/System/NoticeAttachment/${param.file.name}`,
|
||||
file
|
||||
);
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: this.$getObjectName(res.url),
|
||||
fullPath: this.$getObjectName(res.url),
|
||||
url: this.$getObjectName(res.url),
|
||||
});
|
||||
this.form.Path = this.$getObjectName(res.url);
|
||||
this.form.FileName = param.file.name;
|
||||
this.loading = false;
|
||||
},
|
||||
openDialog(title, data) {
|
||||
this.model_cfg.visible = true
|
||||
this.model_cfg.title = title
|
||||
this.fileList = []
|
||||
this.model_cfg.visible = true;
|
||||
this.model_cfg.title = title;
|
||||
this.fileList = [];
|
||||
if (Object.keys(data).length) {
|
||||
this.form = { ...data }
|
||||
this.form = { ...data };
|
||||
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 {
|
||||
this.form = formDataDefault()
|
||||
this.form = formDataDefault();
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.NoticeForm.validate(valid => {
|
||||
this.$refs.NoticeForm.validate((valid) => {
|
||||
if (!this.form.Id && this.form.IsPush) {
|
||||
this.form.NoticeStateEnum = 1
|
||||
this.form.NoticeStateEnum = 1;
|
||||
}
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.form.StartDate = this.form.StartDate ? this.parseTime(this.form.StartDate) : null
|
||||
this.form.EndDate = this.parseTime(this.form.EndDate) ? this.parseTime(this.form.EndDate) : null
|
||||
addOrUpdateSystemNotice(this.form).then(res => {
|
||||
this.loading = false
|
||||
this.$message.success('Saved successfully!')
|
||||
this.model_cfg.visible = false
|
||||
this.$emit('getList')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.form.StartDate = this.form.StartDate
|
||||
? this.parseTime(this.form.StartDate)
|
||||
: null;
|
||||
this.form.EndDate = this.parseTime(this.form.EndDate)
|
||||
? this.parseTime(this.form.EndDate)
|
||||
: null;
|
||||
this.btnLoading = true;
|
||||
addOrUpdateSystemNotice(this.form)
|
||||
.then((res) => {
|
||||
this.btnLoading = false;
|
||||
this.$message.success("Saved successfully!");
|
||||
this.model_cfg.visible = false;
|
||||
this.$emit("getList");
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false;
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleCancle() {
|
||||
this.model_cfg.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.model_cfg.visible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
<div class="role">
|
||||
<div ref="leftContainer" class="left">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="通知级别: " prop="NoticeLevelEnum">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeLevel')"
|
||||
prop="NoticeLevelEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.NoticeLevelEnum"
|
||||
placeholder="通知级别"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
|
@ -13,17 +15,15 @@
|
|||
v-for="item of $d.NoteLevel"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value * 1"
|
||||
:value="item.raw.Code * 1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知类型: " prop="NoticeTypeEnum">
|
||||
<el-select
|
||||
v-model="searchData.NoticeTypeEnum"
|
||||
placeholder="通知类型"
|
||||
clearable
|
||||
size="small"
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeType')"
|
||||
prop="NoticeTypeEnum"
|
||||
>
|
||||
<el-select v-model="searchData.NoticeTypeEnum" clearable size="small">
|
||||
<el-option
|
||||
v-for="item of $d.NoteType"
|
||||
:key="item.value"
|
||||
|
@ -32,26 +32,30 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用项目: " prop="ApplicableProjectEnum">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:ApplicableProject')"
|
||||
prop="ApplicableProjectEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.ApplicableProjectEnum"
|
||||
placeholder="适用项目"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of dict.type.NoticeApplicableTrial"
|
||||
v-for="item of $d.NoticeApplicableTrial"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用角色: " prop="NoticeUserTypeIdList">
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeUserTypeIdList')"
|
||||
prop="NoticeUserTypeIdList"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.NoticeUserTypeIdList"
|
||||
multiple
|
||||
placeholder="使用角色"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
|
@ -63,18 +67,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提醒方式: " prop="NoticeModeEnum">
|
||||
<el-select
|
||||
v-model="searchData.NoticeModeEnum"
|
||||
placeholder="提醒方式"
|
||||
clearable
|
||||
size="small"
|
||||
<el-form-item
|
||||
:label="$t('system:notice:label:NoticeMode')"
|
||||
prop="NoticeModeEnum"
|
||||
>
|
||||
<el-select v-model="searchData.NoticeModeEnum" clearable size="small">
|
||||
<el-option
|
||||
v-for="item of dict.type.NoticeMode"
|
||||
v-for="item of $d.NoticeMode"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value * 1"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -84,15 +86,15 @@
|
|||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="getList"
|
||||
>搜索</el-button
|
||||
>{{ $t("common:button:search") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-hasPermi="['system:notice:add']"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:notice:add']"
|
||||
>新增</el-button
|
||||
>{{ $t("common:button:add") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -105,27 +107,43 @@
|
|||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="通知级别"
|
||||
:label="$t('system:notice:table:NoticeLevel')"
|
||||
prop="NoticeLevelEnum"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="通知类型"
|
||||
:label="$t('system:notice:table:NoticeType')"
|
||||
prop="NoticeTypeEnum"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="通知内容"
|
||||
:label="$t('system:notice:table:NoticeContent')"
|
||||
prop="NoticeContent"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
|
@ -135,7 +153,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="通知状态"
|
||||
:label="$t('system:notice:table:NoticeState')"
|
||||
prop="NoticeStateEnum"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
|
@ -150,32 +168,52 @@
|
|||
: '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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="适用项目"
|
||||
:label="$t('system:notice:table:ApplicableProject')"
|
||||
prop="ApplicableProjectEnum"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="适用角色"
|
||||
:label="$t('system:notice:table:NoticeUserTypeList')"
|
||||
prop="NoticeUserTypeList"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd("NoticeUserTypeList", scope.row.UserTypeShortName) }}
|
||||
{{
|
||||
scope.row.NoticeUserTypeList.map(
|
||||
(v) => v.UserTypeShortName
|
||||
).toString()
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="提示方式"
|
||||
:label="$t('system:notice:table:NoticeMode')"
|
||||
prop="NoticeModeEnum"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
|
@ -185,7 +223,7 @@
|
|||
dict.type.NoticeMode.find((v) => {
|
||||
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;
|
||||
}).label
|
||||
: ""
|
||||
|
@ -193,7 +231,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="保留时长"
|
||||
:label="$t('system:notice:table:StartDate')"
|
||||
prop="StartDate"
|
||||
min-width="240"
|
||||
show-overflow-tooltip
|
||||
|
@ -203,19 +241,19 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发布人"
|
||||
:label="$t('system:notice:table:PublishUserName')"
|
||||
prop="PublishUserName"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="发布时间"
|
||||
:label="$t('system:notice:table:PublishedTime')"
|
||||
prop="PublishedTime"
|
||||
min-width="160"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
:label="$t('system:notice:table:UpdateTime')"
|
||||
prop="UpdateTime"
|
||||
min-width="160"
|
||||
show-overflow-tooltip
|
||||
|
@ -227,7 +265,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="附件"
|
||||
:label="$t('system:notice:table:FileName')"
|
||||
fixed="right"
|
||||
prop="FileName"
|
||||
min-width="120"
|
||||
|
@ -243,7 +281,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
prop="UserTypeShortName"
|
||||
min-width="200"
|
||||
|
@ -256,30 +294,30 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>编辑</el-button
|
||||
>{{ $t("common:action:edit") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-hasPermi="['system:notice:publish']"
|
||||
v-if="scope.row.NoticeStateEnum === 0"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-s-promotion"
|
||||
@click="handlePush(scope.row)"
|
||||
v-hasPermi="['system:notice:publish']"
|
||||
>发布</el-button
|
||||
>{{ $t("common:action:push") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-hasPermi="['system:notice:back']"
|
||||
v-if="scope.row.NoticeStateEnum === 1"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-s-release"
|
||||
@click="handleGet(scope.row)"
|
||||
v-hasPermi="['system:notice:back']"
|
||||
>撤回</el-button
|
||||
>{{ $t("common:action:pull") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -387,12 +425,12 @@ export default {
|
|||
},
|
||||
handleEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["NoticeForm"].openDialog("编辑", row);
|
||||
this.$refs["NoticeForm"].openDialog(this.$t("common:button:edit"), row);
|
||||
});
|
||||
},
|
||||
handleAdd() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["NoticeForm"].openDialog("新增", {});
|
||||
this.$refs["NoticeForm"].openDialog(this.$t("common:button:add"), {});
|
||||
});
|
||||
},
|
||||
getUserTypeRoleList() {
|
||||
|
|
|
@ -1,39 +1,45 @@
|
|||
<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">
|
||||
<span>Security</span>
|
||||
</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>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { resetPassword } from '@/api/admin'
|
||||
import { params } from "@/utils/ruoyi";
|
||||
import { resetPassword } from "@/api/admin";
|
||||
export default {
|
||||
name: 'Account',
|
||||
name: "Account",
|
||||
props: {
|
||||
userId: { type: String, default: '' }
|
||||
userId: { type: String, default: "" },
|
||||
},
|
||||
methods: {
|
||||
handleReset() {
|
||||
this.$confirm('Sure to reset password?', {
|
||||
type: 'warning',
|
||||
this.$confirm(
|
||||
this.$t("system:userlist:message:ResetPassword").replace(
|
||||
"xxx",
|
||||
params("userName")
|
||||
),
|
||||
{
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
resetPassword(this.userId).then(res => {
|
||||
}
|
||||
).then(() => {
|
||||
resetPassword(this.userId).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.$message({
|
||||
message: 'Reset password successfully',
|
||||
type: 'success'
|
||||
})
|
||||
message: this.$t("trials:adRules:message:msg7"),
|
||||
type: "success",
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -9,35 +9,56 @@
|
|||
>
|
||||
<el-card class="Basic" shadow="never" size="small">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Basic Information</span>
|
||||
<span>{{ $t("system:userlist:title:Information") }}</span>
|
||||
</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-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-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-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-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 :label="1">Male</el-radio>
|
||||
<el-radio :label="0">Female</el-radio>
|
||||
</el-radio-group>
|
||||
</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-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-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
|
||||
v-model="user.Status"
|
||||
:active-value="0"
|
||||
|
@ -47,7 +68,10 @@
|
|||
<!-- <el-form-item label="IsTestUser:">
|
||||
<el-switch v-model="user.IsTestUser" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="User Type: " prop="UserTypeId">
|
||||
<el-form-item
|
||||
:label="$t('system:userlist:table:UserType')"
|
||||
prop="UserTypeId"
|
||||
>
|
||||
<el-select
|
||||
ref="userType"
|
||||
v-model="user.UserTypeId"
|
||||
|
@ -67,7 +91,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Check Code: "
|
||||
:label="$t('trials:researchForm:form:checkCode')"
|
||||
prop="checkCode"
|
||||
v-if="!IsCanConnectInternet"
|
||||
>
|
||||
|
@ -85,28 +109,38 @@
|
|||
size="small"
|
||||
>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Affiliation</span>
|
||||
<span>{{ $t("system:userlist:title:Affiliation") }}</span>
|
||||
</div>
|
||||
<el-form-item prop="IsZhiZhun">
|
||||
<el-radio-group
|
||||
v-model="user.IsZhiZhun"
|
||||
@change="OrgnizationTypeChanged"
|
||||
>
|
||||
<el-radio :label="true">Internal</el-radio>
|
||||
<el-radio :label="false">External</el-radio>
|
||||
<el-radio :label="true">{{
|
||||
$t("system:userlist:title:Internal")
|
||||
}}</el-radio>
|
||||
<el-radio :label="false">{{
|
||||
$t("system:userlist:title:External")
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="user.IsZhiZhun === false"
|
||||
label="Organization Name: "
|
||||
:label="$t('system:userlist:table:OrganizationName')"
|
||||
>
|
||||
<el-input v-model="user.OrganizationName" />
|
||||
</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-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-form-item>
|
||||
</el-card>
|
||||
|
@ -117,7 +151,7 @@
|
|||
:disabled="isDisabled"
|
||||
style="margin: 10px 15px"
|
||||
@click="handleSave"
|
||||
>Save</el-button
|
||||
>{{ $t("passwordReset:button:submit") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<template>
|
||||
<div class="edit-container">
|
||||
<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" />
|
||||
</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" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UserInfo from '../components/UserInfo'
|
||||
import Account from '../components/Account'
|
||||
import UserInfo from "../components/UserInfo";
|
||||
import Account from "../components/Account";
|
||||
export default {
|
||||
name: 'EditUser',
|
||||
name: "EditUser",
|
||||
components: { UserInfo, Account },
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'user',
|
||||
userId: '',
|
||||
activeTab: "user",
|
||||
userId: "",
|
||||
load: {
|
||||
role: false,
|
||||
account: false
|
||||
}
|
||||
}
|
||||
account: false,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userId = this.$router.currentRoute.query.Id
|
||||
this.userId = this.$router.currentRoute.query.Id;
|
||||
},
|
||||
methods: {
|
||||
clickTab(tab, event) {
|
||||
if (this.load[tab.name] === false) {
|
||||
this.load[tab.name] = true
|
||||
this.load[tab.name] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -9,14 +9,8 @@
|
|||
:search-handle="searchHandle"
|
||||
@search="handleSearch"
|
||||
@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>
|
||||
<base-table
|
||||
v-loading="loading"
|
||||
|
@ -30,31 +24,46 @@
|
|||
@sortByColumn="sortByColumn"
|
||||
>
|
||||
<!-- 选择自定义slot -->
|
||||
<template slot="genderSlot" slot-scope="{scope}">
|
||||
{{ scope.row.Sex?'Male':'Female' }}
|
||||
<template slot="genderSlot" slot-scope="{ scope }">
|
||||
{{ scope.row.Sex ? "Male" : "Female" }}
|
||||
</template>
|
||||
<template slot="roleSlot" slot-scope="{scope}">
|
||||
{{ scope.row.RoleNameList.map(role => role.RoleName).join(',') }}
|
||||
<template slot="roleSlot" slot-scope="{ scope }">
|
||||
{{ scope.row.RoleNameList.map((role) => role.RoleName).join(",") }}
|
||||
</template>
|
||||
<template slot="isZhiZhunSlot" slot-scope="{scope}">
|
||||
{{scope.row.IsZhiZhun ? 'Internal' : 'External'}}
|
||||
<template slot="isZhiZhunSlot" slot-scope="{ scope }">
|
||||
{{
|
||||
scope.row.IsZhiZhun
|
||||
? $t("system:userlist:table:InternalOrExternal:Internal")
|
||||
: $t("system:userlist:table:InternalOrExternal:External")
|
||||
}}
|
||||
</template>
|
||||
<template slot="isTestUserSlot" slot-scope="{scope}">
|
||||
{{scope.row.IsTestUser ? 'Yes' : 'No'}}
|
||||
<template slot="isTestUserSlot" slot-scope="{ scope }">
|
||||
{{
|
||||
scope.row.IsTestUser
|
||||
? $t("system:userlist:table:IsTestUser:Yes")
|
||||
: $t("system:userlist:table:IsTestUser:No")
|
||||
}}
|
||||
</template>
|
||||
<template slot="statusSlot" slot-scope="{scope}">
|
||||
{{ scope.row.Status?'Enable':'Disable' }}
|
||||
<template slot="statusSlot" slot-scope="{ scope }">
|
||||
{{
|
||||
scope.row.Status
|
||||
? $t("system:userlist:table:Status:Enable")
|
||||
: $t("system:userlist:table:Status:Disable")
|
||||
}}
|
||||
</template>
|
||||
</base-table>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserList, getUserTypeList, deleteSysUser } from '@/api/admin'
|
||||
import { searchForm, searchHandle, columns } from './list'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import SearchForm from '@/components/BaseForm/search-form'
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
import tableMixins from '@/mixins/table'
|
||||
import { getUserList, getUserTypeList, deleteSysUser } from "@/api/admin";
|
||||
// import { searchForm, searchHandle, columns } from './list'
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import SearchForm from "@/components/BaseForm/search-form";
|
||||
import BaseTable from "@/components/BaseTable";
|
||||
import tableMixins from "@/mixins/table";
|
||||
|
||||
// 用户列表查询表单配置信息
|
||||
// 用户列表查询表单事件配置信息
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
UserName: null,
|
||||
|
@ -65,87 +74,309 @@ const searchDataDefault = () => {
|
|||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: true,
|
||||
RealName: '',
|
||||
SortField: ''
|
||||
}
|
||||
}
|
||||
RealName: "",
|
||||
SortField: "",
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'UserList',
|
||||
name: "UserList",
|
||||
components: { BoxContent, SearchForm, BaseTable },
|
||||
mixins: [tableMixins],
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
searchForm,
|
||||
searchHandle,
|
||||
columns,
|
||||
columns: [
|
||||
{ type: "index" },
|
||||
{
|
||||
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: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
users: []
|
||||
}
|
||||
users: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getInfo()
|
||||
this.getList();
|
||||
this.getInfo();
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getList() {
|
||||
this.loading = true
|
||||
getUserList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.users = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.loading = true;
|
||||
getUserList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.users = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
findItemIndex(key) {
|
||||
return this.searchForm.findIndex(value => value.prop && value.prop === key
|
||||
)
|
||||
return this.searchForm.findIndex(
|
||||
(value) => value.prop && value.prop === key
|
||||
);
|
||||
},
|
||||
// 获取用户类型下拉选项信息
|
||||
async getInfo() {
|
||||
const res = await getUserTypeList()
|
||||
const index = this.findItemIndex('UserType')
|
||||
this.$set(this.searchForm[index], 'options', res.Result)
|
||||
const res = await getUserTypeList();
|
||||
const index = this.findItemIndex("UserType");
|
||||
this.$set(this.searchForm[index], "options", res.Result);
|
||||
},
|
||||
handleAddUser() {
|
||||
this.$router.push({ path: '/system/user/add' })
|
||||
this.$router.push({ path: "/system/user/add" });
|
||||
},
|
||||
// 编辑用户
|
||||
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) {
|
||||
this.$confirm('Sure to delete?', {
|
||||
type: 'warning',
|
||||
this.$confirm(this.$t("trials:uploadedDicoms:message:deleteMes"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'Ok',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
.then(() => {
|
||||
deleteSysUser(data.Id)
|
||||
.then(res => {
|
||||
}).then(() => {
|
||||
deleteSysUser(data.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1)
|
||||
this.$message.success('Deleted successfully!')
|
||||
this.users.splice(
|
||||
this.users.findIndex((item) => item.Id === data.Id),
|
||||
1
|
||||
);
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<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;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -71,17 +71,19 @@ export const columns = [
|
|||
label: 'Internal Or External:',
|
||||
hidden: true,
|
||||
slot: 'isZhiZhunSlot',
|
||||
minWidth: 160,
|
||||
minWidth: 140,
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true },
|
||||
// {
|
||||
// prop: 'IsTestUser',
|
||||
// label: 'Is Test User',
|
||||
// hidden: true,
|
||||
// slot: 'isTestUserSlot',
|
||||
// minWidth: 120,
|
||||
// sortable: 'custom',
|
||||
// showOverflowTooltip: true },
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'IsTestUser',
|
||||
label: 'Is Test User',
|
||||
hidden: true,
|
||||
slot: 'isTestUserSlot',
|
||||
minWidth: 120,
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'Status',
|
||||
label: 'Status',
|
||||
|
@ -89,14 +91,17 @@ export const columns = [
|
|||
slot: 'statusSlot',
|
||||
minWidth: 100,
|
||||
sortable: 'custom',
|
||||
showOverflowTooltip: true },
|
||||
{ type: 'operate',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
type: 'operate',
|
||||
label: 'Action',
|
||||
minWidth: 100,
|
||||
minWidth: 200,
|
||||
operates: [
|
||||
{ name: 'Edit', type: 'primary', emitKey: 'editCb' },
|
||||
// { name: 'Delete', type: 'danger', emitKey: 'deleteCb' }
|
||||
] }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// 用户列表查询表单配置信息
|
||||
|
@ -142,19 +147,19 @@ export const searchForm = [
|
|||
change: scope => '',
|
||||
placeholder: ''
|
||||
},
|
||||
// {
|
||||
// type: 'Select',
|
||||
// label: 'Is Test User:',
|
||||
// prop: 'IsTestUser',
|
||||
// width: '100px',
|
||||
// options: [
|
||||
// { label: 'Yes', value: true },
|
||||
// { label: 'No', value: false }
|
||||
// ],
|
||||
// props: { label: 'label', value: 'value' },
|
||||
// change: scope => '',
|
||||
// placeholder: ''
|
||||
// },
|
||||
{
|
||||
type: 'Select',
|
||||
label: 'Is Test User:',
|
||||
prop: 'IsTestUser',
|
||||
width: '100px',
|
||||
options: [
|
||||
{ label: 'Yes', value: true },
|
||||
{ label: 'No', value: false }
|
||||
],
|
||||
props: { label: 'label', value: 'value' },
|
||||
change: scope => '',
|
||||
placeholder: ''
|
||||
},
|
||||
{
|
||||
type: 'Select',
|
||||
label: 'Status:',
|
||||
|
|
|
@ -129,11 +129,13 @@
|
|||
min-width="140"
|
||||
sortable="custom"
|
||||
></el-table-column>
|
||||
<!--操作-->
|
||||
<!--访视-->
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
width="330"
|
||||
class-name="actionBox"
|
||||
align="center"
|
||||
prop="StudyTime"
|
||||
:label="$t('trials:auditRecord:table:visit')"
|
||||
show-overflow-tooltip
|
||||
min-width="140"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--切换访视-->
|
||||
|
@ -145,21 +147,30 @@
|
|||
@add="addVisit"
|
||||
@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
|
||||
type="text"
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('trials:trials-list:action:panel')"
|
||||
@click.stop="detail(scope.row)"
|
||||
class="detail"
|
||||
>{{ $t("trials:trials-list:action:panel") }}</el-button
|
||||
>
|
||||
/>
|
||||
<!-- 移除 -->
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
:title="$t('common:button:remove')"
|
||||
@click.stop="remove(scope.row)"
|
||||
class="detail"
|
||||
:disabled="!scope.row.SubjectVisitId"
|
||||
>{{ $t("common:button:remove") }}</el-button
|
||||
>
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -46,6 +46,13 @@
|
|||
show-overflow-tooltip
|
||||
min-width="140"
|
||||
></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
|
||||
prop="Code"
|
||||
|
@ -78,13 +85,6 @@
|
|||
<span>{{ $fd("sex", Number(scope.row.Sex)) }}</span>
|
||||
</template>
|
||||
</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
|
||||
prop="TrialStatusStr"
|
||||
|
@ -113,10 +113,10 @@
|
|||
}}</el-tag>
|
||||
</template></el-table-column
|
||||
>
|
||||
<!--创建日期-->
|
||||
<!--加入时间-->
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trials-list:table:createDate')"
|
||||
:label="$t('trials:staff:table:joinTime')"
|
||||
show-overflow-tooltip
|
||||
min-width="140"
|
||||
></el-table-column>
|
||||
|
@ -124,13 +124,19 @@
|
|||
<el-table-column :label="$t('common:action:action')" width="250">
|
||||
<template slot-scope="scope">
|
||||
<!-- 详情 -->
|
||||
<el-button type="text" @click.stop="detail(scope.row)">{{
|
||||
$t("trials:trials-list:action:panel")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
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)">{{
|
||||
$t("common:button:remove")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
:title="$t('common:button:remove')"
|
||||
@click.stop="remove(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -135,13 +135,20 @@
|
|||
<el-table-column :label="$t('common:action:action')" width="250">
|
||||
<template slot-scope="scope">
|
||||
<!-- 影像 -->
|
||||
<el-button type="text" @click.stop="image(scope.row)">{{
|
||||
$t("trials:inspection:button:image")
|
||||
}}</el-button>
|
||||
<!-- 报告 -->
|
||||
<el-button type="text" @click.stop="report(scope.row)" disabled>{{
|
||||
$t("trials:inspection:button:report")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('trials:inspection:button:image')"
|
||||
@click.stop="image(scope.row)"
|
||||
/>
|
||||
<!-- 诊断报告 -->
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-document"
|
||||
@click.stop="report(scope.row)"
|
||||
:title="$t('trials:inspection:button:diagnosticReport')"
|
||||
disabled
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -59,6 +59,18 @@
|
|||
clearable
|
||||
/>
|
||||
</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-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
|
@ -213,10 +225,11 @@
|
|||
<el-table-column :label="$t('common:action:action')" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
icon="el-icon-plus"
|
||||
:title="$t('trials:inspection:button:addTrials')"
|
||||
@click.stop="handleOpenDialog(scope.row, 'add')"
|
||||
>{{ $t("trials:inspection:button:addTrials") }}</el-button
|
||||
>
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -272,6 +285,8 @@ const defaultSearchData = () => {
|
|||
callingAE: null,
|
||||
ExperimentName: null,
|
||||
Asc: false,
|
||||
BeginPushTime: null,
|
||||
EndPushTime: null,
|
||||
SortField: "LatestPushTime",
|
||||
PageIndex: 1,
|
||||
PageSize: 10,
|
||||
|
@ -292,6 +307,7 @@ export default {
|
|||
searchData: defaultSearchData(),
|
||||
calledAeList: [],
|
||||
callingAeList: [],
|
||||
dateValue: [],
|
||||
// 检查列表
|
||||
total: 0,
|
||||
loading: false,
|
||||
|
@ -340,6 +356,13 @@ export default {
|
|||
Object.keys(this.searchData).forEach((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 {
|
||||
this.loading = true;
|
||||
let res = await getPatientList(data);
|
||||
|
@ -361,6 +384,7 @@ export default {
|
|||
handleReset() {
|
||||
this.searchData = defaultSearchData();
|
||||
this.$refs.inspectionList.clearSort();
|
||||
this.dateValue = [];
|
||||
this.getList();
|
||||
},
|
||||
// 表格排序
|
||||
|
|
|
@ -125,10 +125,10 @@
|
|||
>
|
||||
<el-select v-model="trialForm.CriterionTypeList" multiple clearable>
|
||||
<el-option
|
||||
v-for="item of $d.CriterionType"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item of CriterionTypeList"
|
||||
:key="item.Id"
|
||||
:label="item.CriterionName"
|
||||
:value="item.CriterionType"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -217,7 +217,11 @@
|
|||
<script>
|
||||
// import store from "@/store";
|
||||
import { mapGetters, mapState } from "vuex";
|
||||
import { getTrialInfoHir, addOrUpdateTrialHir } from "@/api/trials";
|
||||
import {
|
||||
getTrialInfoHir,
|
||||
addOrUpdateTrialHir,
|
||||
getSystemConfirmedCreiterionList,
|
||||
} from "@/api/trials";
|
||||
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
|
||||
export default {
|
||||
name: "TrialForm",
|
||||
|
@ -359,6 +363,7 @@ export default {
|
|||
indicationNum: null,
|
||||
phaseNum: null,
|
||||
dictionaryList: {},
|
||||
CriterionTypeList: [], // 阅片标准列表
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -369,6 +374,17 @@ export default {
|
|||
this.initPage();
|
||||
},
|
||||
methods: {
|
||||
// 获取阅片标准
|
||||
async getSystemConfirmedCreiterionList() {
|
||||
try {
|
||||
let res = await getSystemConfirmedCreiterionList();
|
||||
if (res.IsSuccess) {
|
||||
this.CriterionTypeList = res.Result;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
initForm() {
|
||||
this.loading = true;
|
||||
getTrialInfoHir(this.trialId)
|
||||
|
@ -490,6 +506,7 @@ export default {
|
|||
this.trialForm.Id = this.trialId;
|
||||
this.initForm();
|
||||
}
|
||||
this.getSystemConfirmedCreiterionList();
|
||||
this.loading = false;
|
||||
},
|
||||
getDicData() {
|
||||
|
|
|
@ -18,6 +18,14 @@
|
|||
/>
|
||||
</el-select>
|
||||
</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-input
|
||||
|
@ -103,6 +111,12 @@
|
|||
<span>{{ $fd("TrialType", scope.row.TrialType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="TrialCode"
|
||||
:label="$t('trials:trials-list:table:trialId')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ResearchProgramNo"
|
||||
:label="$t('trials:trials-list:table:researchNumber')"
|
||||
|
@ -170,8 +184,15 @@
|
|||
:label="$t('trials:trials-list:table:dateAuthorized')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
/>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.row.AuthorizationDate
|
||||
? scope.row.AuthorizationDate.split(" ")[0]
|
||||
: ""
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--授权时长-->
|
||||
<el-table-column
|
||||
prop="AuthorizationYear"
|
||||
|
@ -179,14 +200,6 @@
|
|||
show-overflow-tooltip
|
||||
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">
|
||||
<template slot-scope="scope">
|
||||
<!-- 详情 -->
|
||||
|
@ -337,6 +350,7 @@ const searchDataDefault = () => {
|
|||
SortField: "CreateTime",
|
||||
SponsorName: "",
|
||||
trialType: null,
|
||||
TrialCode: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
|
|
|
@ -85,13 +85,19 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
<el-button type="text" @click.stop="detail(scope.row, 'top')">{{
|
||||
$t("trials:enrolledReviews:button:view")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
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)">{{
|
||||
$t("common:button:remove")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
:title="$t('common:button:remove')"
|
||||
@click.stop="remove(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -207,13 +213,19 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
<el-button type="text" @click.stop="detail(scope.row, 'bottom')">{{
|
||||
$t("trials:enrolledReviews:button:view")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
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)">{{
|
||||
$t("common:button:add")
|
||||
}}</el-button>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-plus"
|
||||
:title="$t('common:button:add')"
|
||||
@click.stop="add(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -4,17 +4,25 @@
|
|||
<template slot="search-container">
|
||||
<el-form :inline="true">
|
||||
<!-- 受试者编号 -->
|
||||
<el-form-item :label="$t('trials:crcQuestion:table:subjectId')">
|
||||
<el-form-item :label="$t('trials:uploadMonitor:table:subjectId')">
|
||||
<el-input
|
||||
v-model="searchData.SubjectCode"
|
||||
clearable
|
||||
style="width: 140px"
|
||||
/>
|
||||
</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-input
|
||||
v-model="searchData.SubjectShortName"
|
||||
v-model="searchData.PatientName"
|
||||
clearable
|
||||
style="width: 140px"
|
||||
/>
|
||||
|
@ -35,6 +43,34 @@
|
|||
/>
|
||||
</el-select>
|
||||
</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-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
|
@ -234,14 +270,21 @@
|
|||
>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!--评估结果-->
|
||||
<!--影像数据-->
|
||||
<el-dropdown-item
|
||||
v-hasPermi="['trials:trials-panel:hirVisit:result']"
|
||||
disabled
|
||||
command="result"
|
||||
>{{ $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
|
||||
v-hasPermi="['trials:trials-panel:hirVisit:download']"
|
||||
command="downloadImage"
|
||||
|
@ -253,15 +296,6 @@
|
|||
$t("trials:reading:button:uploadImages")
|
||||
}}</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>
|
||||
</template>
|
||||
|
@ -298,14 +332,9 @@ import Pagination from "@/components/Pagination";
|
|||
import editStudyList from "./components/edit-study-list.vue";
|
||||
import visitInfo from "./components/visit-info.vue";
|
||||
import { deleteSubjectVisit } from "@/api/trials";
|
||||
import {
|
||||
getPatientSubejctVisitList,
|
||||
getSubjectImageZipInfo,
|
||||
} from "@/api/trials/visit.js";
|
||||
import { getPatientSubejctVisitList } from "@/api/trials/visit.js";
|
||||
import { submitVisitStudyBinding } from "@/api/inspection.js";
|
||||
import JSZip from "jszip";
|
||||
import axios from "axios";
|
||||
import { saveAs } from "file-saver";
|
||||
import { downloadImage } from "@/utils/uploadZip.js";
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
subjectCode: null,
|
||||
|
@ -315,6 +344,12 @@ const defaultSearchData = () => {
|
|||
pageSize: 20,
|
||||
asc: true,
|
||||
sortField: "",
|
||||
SubmitState: null,
|
||||
PatientName: null,
|
||||
PatientIdStr: null,
|
||||
PatientSex: null,
|
||||
BeginStudyTime: null,
|
||||
EndStudyTime: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
|
@ -325,6 +360,7 @@ export default {
|
|||
// 查询
|
||||
searchData: defaultSearchData(),
|
||||
visitOptions: [],
|
||||
dateValue: [],
|
||||
// 列表
|
||||
list: [],
|
||||
loading: false,
|
||||
|
@ -353,6 +389,7 @@ export default {
|
|||
handleReset() {
|
||||
this.searchData = defaultSearchData();
|
||||
this.$refs.visitList.clearSort();
|
||||
this.dateValue = [];
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
|
@ -370,6 +407,13 @@ export default {
|
|||
data[key] = this.searchData[key];
|
||||
});
|
||||
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 {
|
||||
this.loading = true;
|
||||
let res = await getPatientSubejctVisitList(data);
|
||||
|
@ -455,111 +499,7 @@ export default {
|
|||
downloadReport() {},
|
||||
// 下载影像
|
||||
async downloadImage(item) {
|
||||
try {
|
||||
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);
|
||||
});
|
||||
});
|
||||
downloadImage(item.subjectId);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -3,34 +3,45 @@
|
|||
<!-- 搜索框 -->
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true">
|
||||
<!-- 受试者编号 -->
|
||||
<el-form-item :label="$t('trials:crcQuestion: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.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-form-item :label="$t('trials:processCfg:form:criterion')">
|
||||
<el-select
|
||||
v-model="searchData.SiteId"
|
||||
v-model="searchData.TrialReadingCriterionId"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of visitOptions"
|
||||
:key="item.SiteId"
|
||||
:label="item.TrialSiteCode"
|
||||
:value="item.SiteId"
|
||||
v-for="item of CriterionTypeList"
|
||||
:key="item.Id"
|
||||
:label="item.CriterionName"
|
||||
:value="item.Id"
|
||||
/>
|
||||
</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-select
|
||||
|
@ -210,18 +221,20 @@
|
|||
<template slot-scope="scope">
|
||||
<!--阅片结果-->
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('trials:auditRecord:table:readingResult')"
|
||||
@click="readResult(scope.row)"
|
||||
:disabled="scope.row.ReadingTaskState !== 2"
|
||||
>{{ $t("trials:auditRecord:table:readingResult") }}</el-button
|
||||
>
|
||||
/>
|
||||
<!--下载报告-->
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:reading:button:download')"
|
||||
@click="downloadReport(scope.row)"
|
||||
disabled
|
||||
>{{ $t("trials:reading:button:uploadReport") }}</el-button
|
||||
>
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -242,6 +255,7 @@ import BaseContainer from "@/components/BaseContainer";
|
|||
import Pagination from "@/components/Pagination";
|
||||
import { getPatientVisitTaskList } from "@/api/readManagenent.js";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getSystemConfirmedCreiterionList } from "@/api/trials";
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
SubjectCode: null,
|
||||
|
@ -254,6 +268,14 @@ const defaultSearchData = () => {
|
|||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: "CreateTime",
|
||||
TrialReadingCriterionId: null,
|
||||
TaskState: null,
|
||||
SubjectShortName: null,
|
||||
PatientName: null,
|
||||
PatientIdStr: null,
|
||||
PatientSex: null,
|
||||
BeginTaskCreateTime: null,
|
||||
EndTaskCreateTime: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
|
@ -264,6 +286,8 @@ export default {
|
|||
// 查询
|
||||
searchData: defaultSearchData(),
|
||||
dateValue: [],
|
||||
dateValue2: [],
|
||||
CriterionTypeList: [],
|
||||
// 列表
|
||||
list: [],
|
||||
loading: false,
|
||||
|
@ -273,8 +297,20 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getSystemConfirmedCreiterionList();
|
||||
},
|
||||
methods: {
|
||||
// 获取阅片标准
|
||||
async getSystemConfirmedCreiterionList() {
|
||||
try {
|
||||
let res = await getSystemConfirmedCreiterionList();
|
||||
if (res.IsSuccess) {
|
||||
this.CriterionTypeList = res.Result;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.getList();
|
||||
|
@ -288,6 +324,7 @@ export default {
|
|||
reset() {
|
||||
this.searchData = defaultSearchData();
|
||||
this.dateValue = [];
|
||||
this.dateValue2 = [];
|
||||
this.$refs.redManagenentTable.clearSort();
|
||||
},
|
||||
// 排序
|
||||
|
@ -313,6 +350,13 @@ export default {
|
|||
data.EarliestStudyTime = 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;
|
||||
let res = await getPatientVisitTaskList(data);
|
||||
this.loading = false;
|
||||
|
|
|
@ -46,6 +46,10 @@
|
|||
>
|
||||
<el-input v-model="data.Description" disabled />
|
||||
</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
|
||||
:label="$t('trials:auditRecord:table:visit')"
|
||||
|
|
|
@ -8,17 +8,6 @@
|
|||
<el-form-item :label="$t('trials:auditRecord:table:researchNo')">
|
||||
<el-input v-model="ResearchProgramNo" disabled />
|
||||
</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-input v-model="searchData.SubjectInfo" />
|
||||
|
@ -98,11 +87,6 @@
|
|||
>
|
||||
</el-date-picker>
|
||||
</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-select
|
||||
|
@ -133,8 +117,6 @@
|
|||
:key="`RoleName${item.value}`"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="searchData.RoleName" clearable/>-->
|
||||
<!-- RoleName-->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
|
@ -174,15 +156,6 @@
|
|||
show-overflow-tooltip
|
||||
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
|
||||
prop="SubjectCode"
|
||||
|
@ -210,15 +183,6 @@
|
|||
show-overflow-tooltip
|
||||
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
|
||||
prop="TrialReadingCriterionName"
|
||||
|
|
|
@ -6,7 +6,11 @@
|
|||
:label="$t('trials:loginLog:table: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
|
||||
v-for="item of $d.UserOptType"
|
||||
:key="'UserOptType' + item.label"
|
||||
|
@ -15,15 +19,12 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="IP"
|
||||
prop="IP"
|
||||
>
|
||||
<el-form-item label="IP" prop="IP">
|
||||
<el-input
|
||||
v-model="searchData.IP"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:120px;"
|
||||
style="width: 120px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
@ -34,12 +35,39 @@
|
|||
v-model="searchData.LoginFaildName"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:120px;"
|
||||
style="width: 120px"
|
||||
/>
|
||||
</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
|
||||
v-model="datetimerange"
|
||||
type="datetimerange"
|
||||
|
@ -52,11 +80,15 @@
|
|||
</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 type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -64,16 +96,14 @@
|
|||
<template slot="main-container">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
class="table"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'CreateTime', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
:label="$t('trials:loginLog:table:optType')"
|
||||
prop="OptType"
|
||||
|
@ -82,7 +112,7 @@
|
|||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('UserOptType',scope.row.OptType) }}
|
||||
{{ $fd("UserOptType", scope.row.OptType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -90,6 +120,7 @@
|
|||
prop="IP"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:loginLog:table:incorrectUserName')"
|
||||
|
@ -110,9 +141,10 @@
|
|||
prop="LoginUserTypeEnum"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('UserType',scope.row.LoginUserTypeEnum) }}
|
||||
{{ $fd("UserType", scope.row.LoginUserTypeEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -120,15 +152,17 @@
|
|||
prop="optUserName"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('trials:loginLog:table:optUserType')"
|
||||
prop="OptUserTypeEnum"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('UserType',scope.row.OptUserTypeEnum) }}
|
||||
{{ $fd("UserType", scope.row.OptUserTypeEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -136,34 +170,41 @@
|
|||
prop="CreateTime"
|
||||
min-width="90"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
</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>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getUserLogList } from '@/api/user'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import moment from 'moment'
|
||||
import { getUserLogList } from "@/api/user";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import moment from "moment";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialId:'',
|
||||
TrialId: "",
|
||||
OptType: null,
|
||||
Ip: '',
|
||||
LoginFaildName: '',
|
||||
BeginDate: '',
|
||||
EndDate: '',
|
||||
Asc: true,
|
||||
SortField: '',
|
||||
Ip: "",
|
||||
LoginFaildName: "",
|
||||
BeginDate: "",
|
||||
EndDate: "",
|
||||
Asc: false,
|
||||
SortField: "CreateTime",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
components: { BaseContainer,Pagination },
|
||||
components: { BaseContainer, Pagination },
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
|
@ -171,53 +212,55 @@ export default {
|
|||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: []
|
||||
}
|
||||
datetimerange: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.$route.query.trialId
|
||||
getUserLogList(this.searchData).then((res) => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
this.loading = true;
|
||||
this.searchData.TrialId = this.$route.query.trialId;
|
||||
getUserLogList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
this.searchData.BeginDate = val[0]
|
||||
this.searchData.EndDate = val[1]
|
||||
this.searchData.BeginDate = val[0];
|
||||
this.searchData.EndDate = val[1];
|
||||
} else {
|
||||
this.searchData.BeginDate = ''
|
||||
this.searchData.EndDate = ''
|
||||
this.searchData.BeginDate = "";
|
||||
this.searchData.EndDate = "";
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue