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

uat_us
caiyiling 2024-09-29 17:20:03 +08:00
commit 64fd549d12
8 changed files with 403 additions and 265 deletions

View File

@ -95,4 +95,12 @@ export function getTrialDownloadList(data) {
method: 'post', method: 'post',
data data
}) })
}
// 修改后处理检查类型
export function updateTaskStudyModality(params) {
return request({
url: '/DownloadAndUpload/updateTaskStudyModality',
method: 'put',
params
})
} }

View File

@ -52,7 +52,7 @@
class="el-icon-warning-outline" class="el-icon-warning-outline"
style="color: #f56c6c; font-size: 24px" style="color: #f56c6c; font-size: 24px"
></i> ></i>
<span>{{ $t("feedBack:imgfail:tip") }}</span> <span>{{ $t('feedBack:imgfail:tip') }}</span>
</p> </p>
<!-- 问题反馈 --> <!-- 问题反馈 -->
<el-form-item <el-form-item
@ -140,7 +140,7 @@
<div slot="footer" v-if="type !== 'detail' || isImgfail"> <div slot="footer" v-if="type !== 'detail' || isImgfail">
<!-- 取消 --> <!-- 取消 -->
<el-button size="small" @click.stop="cancel"> <el-button size="small" @click.stop="cancel">
{{ $t("feedBack:button:cancel") }} {{ $t('feedBack:button:cancel') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button <el-button
@ -149,21 +149,21 @@
@click.stop="save" @click.stop="save"
:loading="loading" :loading="loading"
> >
{{ $t("feedBack:button:save") }} {{ $t('feedBack:button:save') }}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import uploadImage from "./uploadImage.vue"; import uploadImage from './uploadImage.vue'
import { import {
addOrUpdateUserFeedBack, addOrUpdateUserFeedBack,
getUserFeedBackInfo, getUserFeedBackInfo,
batchUpdateFeedBackState, batchUpdateFeedBackState,
} from "@/api/trials.js"; } from '@/api/trials.js'
export default { export default {
name: "FB", name: 'FB',
components: { uploadImage }, components: { uploadImage },
data() { data() {
return { return {
@ -195,131 +195,131 @@ export default {
QuestionType: [ QuestionType: [
{ {
required: true, required: true,
message: this.$t("common:ruleMessage:specify"), message: this.$t('common:ruleMessage:specify'),
trigger: "blur", trigger: 'blur',
}, },
], ],
QuestionDescription: [ QuestionDescription: [
{ {
required: true, required: true,
message: this.$t("common:ruleMessage:specify"), message: this.$t('common:ruleMessage:specify'),
trigger: "blur", trigger: 'blur',
}, },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value.length < 5) { if (value.length < 5) {
callback( callback(
new Error(this.$t("feedBack:ruleMessage:lengthLimitMin5")) new Error(this.$t('feedBack:ruleMessage:lengthLimitMin5'))
); )
} }
callback(); callback()
}, },
trigger: "blur", trigger: 'blur',
}, },
], ],
}, },
isUpload: false, isUpload: false,
}; }
}, },
computed: { computed: {
level() { level() {
if (this.hasPermi(["role:dev", "role:admin"])) { if (this.hasPermi(['role:dev', 'role:admin'])) {
return 9; return 9
} }
if (this.hasPermi(["role:pm"])) { if (this.hasPermi(['role:pm', 'role:apm'])) {
return 8; return 8
} }
if (this.hasPermi(["role:ir", "role:crc"])) { if (this.hasPermi(['role:ir', 'role:crc'])) {
return 7; return 7
} }
return 0; return 0
}, },
QuestionTypeOptions() { QuestionTypeOptions() {
if (this.level > 7) { if (this.level > 7) {
return [ return [
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0), ...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
...this.$d.FeedBackTypeToIR, ...this.$d.FeedBackTypeToIR,
]; ]
} }
if (this.hasPermi(["role:ir"])) { if (this.hasPermi(['role:ir'])) {
return this.$d.FeedBackTypeToIR; return this.$d.FeedBackTypeToIR
} }
if (this.hasPermi(["role:crc"])) { if (this.hasPermi(['role:crc'])) {
return this.$d.FeedBackTypeToCRC; return this.$d.FeedBackTypeToCRC
} }
return []; return []
}, },
}, },
methods: { methods: {
open(data) { open(data) {
let { type, trialId, Id, visitTaskId, SubjectVisitId } = data; let { type, trialId, Id, visitTaskId, SubjectVisitId } = data
this.type = type; this.type = type
this.trialId = trialId; this.trialId = trialId
this.Id = Id; this.Id = Id
this.visitTaskId = visitTaskId; this.visitTaskId = visitTaskId
this.SubjectVisitId = SubjectVisitId; this.SubjectVisitId = SubjectVisitId
if (visitTaskId) { if (visitTaskId) {
this.isImgfail = true; this.isImgfail = true
} }
this.setTypeOption(); this.setTypeOption()
if (!Id) { if (!Id) {
this.title = this.setTitle(); this.title = this.setTitle()
} }
if (Id || visitTaskId) { if (Id || visitTaskId) {
this.getInfo(Id, visitTaskId); this.getInfo(Id, visitTaskId)
} }
this.visible = true; this.visible = true
}, },
cancel() { cancel() {
this.visible = false; this.visible = false
this.$emit("closed"); this.$emit('closed')
}, },
async save() { async save() {
try { try {
let validate = await this.$refs.feedBackForm.validate(); let validate = await this.$refs.feedBackForm.validate()
if (!validate) return; if (!validate) return
if (this.trialId) { if (this.trialId) {
this.form.TrialId = this.trialId; this.form.TrialId = this.trialId
} }
if (this.visitTaskId) { if (this.visitTaskId) {
this.form.VisitTaskId = this.visitTaskId; this.form.VisitTaskId = this.visitTaskId
} }
if (this.SubjectVisitId) { if (this.SubjectVisitId) {
this.form.SubjectVisitId = this.SubjectVisitId; this.form.SubjectVisitId = this.SubjectVisitId
} }
if (this.Id) { if (this.Id) {
this.form.Id = this.Id; this.form.Id = this.Id
} }
this.loading = true; this.loading = true
let res = await addOrUpdateUserFeedBack(this.form); let res = await addOrUpdateUserFeedBack(this.form)
this.loading = false; this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$emit("success"); this.$emit('success')
this.$message.success(this.$t("feedBack:save:success")); this.$message.success(this.$t('feedBack:save:success'))
this.cancel(); this.cancel()
} }
} catch (err) { } catch (err) {
this.loading = false; this.loading = false
console.log(err); console.log(err)
} }
}, },
// //
async changeState() { async changeState() {
if (this.isImgfail) return; if (this.isImgfail) return
try { try {
let data = { let data = {
IdList: [this.Id], IdList: [this.Id],
State: this.form.State, State: this.form.State,
}; }
let res = await batchUpdateFeedBackState(data); let res = await batchUpdateFeedBackState(data)
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success(this.$t("feedBack:changeState:success")); this.$message.success(this.$t('feedBack:changeState:success'))
this.$emit("success"); this.$emit('success')
// this.cancel(); // this.cancel();
this.getInfo(this.Id, this.visitTaskId); this.getInfo(this.Id, this.visitTaskId)
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, },
// //
@ -328,56 +328,56 @@ export default {
let data = { let data = {
Id, Id,
visitTaskId, visitTaskId,
}; }
let res = await getUserFeedBackInfo(data); let res = await getUserFeedBackInfo(data)
if (res.IsSuccess && res.Result) { if (res.IsSuccess && res.Result) {
this.form = res.Result; this.form = res.Result
this.form.ScreenshotList = this.form.ScreenshotList || [] this.form.ScreenshotList = this.form.ScreenshotList || []
this.Id = res.Result.Id; this.Id = res.Result.Id
if (res.Result.State > 0) { if (res.Result.State > 0) {
this.isStateChange = false; this.isStateChange = false
} }
if (res.Result.VisitTaskId) { if (res.Result.VisitTaskId) {
this.visitTaskId = res.Result.VisitTaskId; this.visitTaskId = res.Result.VisitTaskId
} }
if (res.Result.SubjectVisitId) { if (res.Result.SubjectVisitId) {
this.SubjectVisitId = res.Result.SubjectVisitId; this.SubjectVisitId = res.Result.SubjectVisitId
} }
let code = this.$fd("UserType", res.Result.UserTypeEnum); let code = this.$fd('UserType', res.Result.UserTypeEnum)
this.title = this.setTitle(code, res.Result.FeedBackFullName); this.title = this.setTitle(code, res.Result.FeedBackFullName)
if (visitTaskId) { if (visitTaskId) {
code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`; code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`
this.title = this.setTitle(code, res.Result.FeedBackFullName); this.title = this.setTitle(code, res.Result.FeedBackFullName)
} }
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList); this.$refs.uploadImage.initFileList(res.Result.ScreenshotList)
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err)
} }
}, },
setTypeOption() { setTypeOption() {
if (!this.trialId) return (this.options = []); if (!this.trialId) return (this.options = [])
if (this.hasPermi(["role:ir"])) if (this.hasPermi(['role:ir']))
return (this.option = this.$d.FeedBackTypeToIR); return (this.option = this.$d.FeedBackTypeToIR)
if (this.hasPermi(["role:crc"])) if (this.hasPermi(['role:crc']))
return (this.option = this.$d.FeedBackTypeToCRC); return (this.option = this.$d.FeedBackTypeToCRC)
}, },
setTitle(code, name) { setTitle(code, name) {
if (this.hasPermi(["role:pm"]) && this.visitTaskId) { if (this.hasPermi(['role:pm']) && this.visitTaskId) {
return `${this.$t("feedBack:form:title:pm2")}(${code}/${name})`; return `${this.$t('feedBack:form:title:pm2')}(${code}/${name})`
} }
if (this.hasPermi(["role:pm", "role:dev", "role:admin"])) { if (this.hasPermi(['role:pm', 'role:dev', 'role:admin'])) {
return `${this.$t("feedBack:form:title:pm")}(${code},${name})`; return `${this.$t('feedBack:form:title:pm')}(${code},${name})`
} }
if (this.hasPermi(["role:ir", "role:crc"]) && this.type === "detail") { if (this.hasPermi(['role:ir', 'role:crc']) && this.type === 'detail') {
return `${this.$t("feedBack:form:detail:title")}`; return `${this.$t('feedBack:form:detail:title')}`
} }
if (this.hasPermi(["role:ir", "role:crc"])) { if (this.hasPermi(['role:ir', 'role:crc'])) {
return `${this.$t("feedBack:form:title")}`; return `${this.$t('feedBack:form:title')}`
} }
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tip { .tip {

View File

@ -58,14 +58,14 @@
</div> </div>
</template> </template>
<script> <script>
const type = "Statement of Work"; const type = 'Statement of Work'
export default { export default {
name: "UploadImage", name: 'UploadImage',
props: { props: {
path: { path: {
required: true, required: true,
default: () => { default: () => {
return []; return []
}, },
}, },
disabled: { disabled: {
@ -78,14 +78,14 @@ export default {
}, },
trialId: { trialId: {
type: String, type: String,
default: "", default: '',
}, },
}, },
data() { data() {
return { return {
fileList: [], fileList: [],
btnDisabled: false, btnDisabled: false,
}; }
}, },
methods: { methods: {
remove(file, fileList) { remove(file, fileList) {
@ -93,115 +93,113 @@ export default {
}, },
fileToBlob(file) { fileToBlob(file) {
// FileReader // FileReader
const reader = new FileReader(); const reader = new FileReader()
return new Promise((resolve) => { return new Promise((resolve) => {
// FileReader load // FileReader load
reader.addEventListener("load", (e) => { reader.addEventListener('load', (e) => {
let blob; let blob
if (typeof e.target.result === "object") { if (typeof e.target.result === 'object') {
blob = new Blob([e.target.result]); blob = new Blob([e.target.result])
} else { } else {
blob = e.target.result; blob = e.target.result
} }
resolve(blob); resolve(blob)
}); })
// FileReader ArrayBuffer File // FileReader ArrayBuffer File
reader.readAsArrayBuffer(file); reader.readAsArrayBuffer(file)
}); })
}, },
// oss // oss
async uploadToOSS(name, file) { async uploadToOSS(name, file) {
try { try {
let defaultPath = "/System/FeedBack/"; let defaultPath = '/System/FeedBack/'
if (this.trialId) { if (this.trialId) {
defaultPath = `/${this.trialId}/FeedBack/`; defaultPath = `/${this.trialId}/FeedBack/`
} }
let res = await this.OSSclient.put(`${defaultPath}${name}`, file); let res = await this.OSSclient.put(`${defaultPath}${name}`, file)
return res; return res
} catch (err) { } catch (err) {
console.log(err); console.log(err)
return false; return false
} }
}, },
initFileList(list) { initFileList(list) {
if (list && list.length > 0) { if (list && list.length > 0) {
this.fileList = []; this.fileList = []
list.forEach((item, index) => { list.forEach((item, index) => {
let name = item.split("/"); let name = item.split('/')
this.fileList.push({ this.fileList.push({
name: name[name.length - 1], name: name[name.length - 1],
path: item, path: item,
fullPath: this.OSSclientConfig.basePath + item, fullPath: this.OSSclientConfig.basePath + item,
url: this.OSSclientConfig.basePath + item, url: this.OSSclientConfig.basePath + item,
uid: `${name[name.length - 1]}${index}`, uid: `${name[name.length - 1]}${index}`,
}); })
}); })
console.log(this.fileList);
} }
}, },
async uploadFile(param) { async uploadFile(param) {
var fileName = param.file.name; var fileName = param.file.name
this.$emit("update:isUpload", true); this.$emit('update:isUpload', true)
this.btnDisabled = true; this.btnDisabled = true
this.fileList.push({ this.fileList.push({
url: param.file.url, url: param.file.url,
path: fileName, path: fileName,
uid: param.file.uid, uid: param.file.uid,
}); })
let file = await this.fileToBlob(param.file); let file = await this.fileToBlob(param.file)
let res = await this.uploadToOSS(fileName, file); let res = await this.uploadToOSS(fileName, file)
this.btnDisabled = false; this.btnDisabled = false
let index = this.fileList.findIndex( let index = this.fileList.findIndex((item) => item.uid === param.file.uid)
(item) => item.uid === param.file.uid
);
if (!res) { if (!res) {
if (index >= 0) { if (index >= 0) {
this.fileList.splice(index, 1); this.fileList.splice(index, 1)
} }
return this.$emit("update:isUpload", false); return this.$emit('update:isUpload', false)
} }
this.fileList[index].url = this.OSSclientConfig.basePath + res.name; let name = this.$getObjectName(res.url)
this.fileList[index].path = res.name; this.fileList[index].url = this.OSSclientConfig.basePath + name
this.$emit("update:path", [...this.path, res.name]); this.fileList[index].path = name
this.$emit("update:isUpload", false); this.$emit('update:path', [...this.path, res.name])
return false; this.$emit('update:isUpload', false)
return false
}, },
beforeUpload(file, fileList) { beforeUpload(file, fileList) {
const isValidFile = this.fileValid(file.name, ["png", "jpg", "jpeg"]); const isValidFile = this.fileValid(file.name, ['png', 'jpg', 'jpeg'])
if (isValidFile) { if (isValidFile) {
// this.fileList = []; // this.fileList = [];
} else { } else {
this.$alert(this.$t("feedBack:uploadImg:format")); this.$alert(this.$t('feedBack:uploadImg:format'))
return false; return false
} }
}, },
handlePreview(file) { handlePreview(file) {
file.fullPath ? window.open(file.fullPath, "_blank") : ""; file.fullPath ? window.open(file.fullPath, '_blank') : ''
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning(`Upload is currently limited to 1 file`); this.$message.warning(`Upload is currently limited to 1 file`)
}, },
fileValid(fileName, typeArr) { fileValid(fileName, typeArr) {
var extendName = fileName var extendName = fileName
.substring(fileName.lastIndexOf(".") + 1) .substring(fileName.lastIndexOf('.') + 1)
.toLocaleLowerCase(); .toLocaleLowerCase()
if (typeArr.indexOf(extendName) > -1) { if (typeArr.indexOf(extendName) > -1) {
return true; return true
} else { } else {
return false; return false
} }
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.$refs[file.url].$viewer.show(); this.$refs[file.url].$viewer.show()
}, },
handleRemove(file) { handleRemove(file) {
let index = this.fileList.findIndex((item) => item.uid === file.uid); let index = this.fileList.findIndex((item) => item.uid === file.uid)
this.fileList.splice(index, 1); this.fileList.splice(index, 1)
let arr = this.fileList.map((item) => item.path); let arr = this.fileList.map((item) => item.path)
this.$emit("update:path", arr); this.$emit('update:path', arr)
}, },
}, },
}; }
</script> </script>
<style> <style>
.upload-container .el-upload--text { .upload-container .el-upload--text {

View File

@ -45,11 +45,18 @@
prop="UploadStudyList" prop="UploadStudyList"
:label="$t('upload:dicom:table:uploadStudyListNum')" :label="$t('upload:dicom:table:uploadStudyListNum')"
> >
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.UploadStudyList && Array.isArray(scope.row.UploadStudyList) <el-button
? scope.row.UploadStudyList.length v-if="
: 0 scope.row.UploadStudyList && scope.row.UploadStudyList.length >= 1
}}</template> "
type="text"
@click="handleOpenDialog(scope.row, 'UploadStudyList', true)"
>
<span>{{ scope.row.UploadStudyList.length }}</span>
</el-button>
<span v-else>0</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="$t('common:action:action')" :label="$t('common:action:action')"
@ -436,6 +443,9 @@
:IsDicom="true" :IsDicom="true"
:bodyPart="bodyPart" :bodyPart="bodyPart"
:modelList="modelList" :modelList="modelList"
:isUpload="openIsUpload"
:TrialModality="TrialModality"
@getList="getList"
/> />
</div> </div>
</template> </template>
@ -544,6 +554,8 @@ export default {
errStudyUidList: [], errStudyUidList: [],
open: null, open: null,
bodyPart: [], bodyPart: [],
openIsUpload: false,
TrialModality: [],
} }
}, },
created() { created() {
@ -580,6 +592,7 @@ export default {
let res = await getSubjectImageUploadList(params) let res = await getSubjectImageUploadList(params)
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.TrialModality = res.OtherInfo.TrialModality.split('|')
this.StudyInstanceUidList = [] this.StudyInstanceUidList = []
this.SopInstanceUidList = [] this.SopInstanceUidList = []
this.UploadStudyList = [] this.UploadStudyList = []
@ -654,7 +667,8 @@ export default {
} }
}, },
// //
handleOpenDialog(item, list) { handleOpenDialog(item, list, isUpload = false) {
this.openIsUpload = isUpload
this.model_cfg.title = `${item.SubjectCode || ''} > ${item.TaskBlindName}` this.model_cfg.title = `${item.SubjectCode || ''} > ${item.TaskBlindName}`
this.modelList = item[list] this.modelList = item[list]
this.model_cfg.visible = true this.model_cfg.visible = true

View File

@ -1,120 +1,175 @@
<template> <template>
<base-model :config="model_cfg"> <div v-if="model_cfg.visible">
<div slot="dialog-body"> <base-model :config="model_cfg">
<el-table :data="modelList" style="width: 100%" height="300"> <div slot="dialog-body">
<!--检查编号--> <el-table :data="modelList" style="width: 100%" height="300">
<el-table-column <!--检查编号-->
prop="StudyCode" <el-table-column
:label="$t('trials:uploadImage:table:StudyCode')" prop="StudyCode"
/> :label="$t('trials:uploadImage:table:StudyCode')"
<!--检查类型--> />
<el-table-column <!--检查类型-->
prop="ModalityForEdit" <el-table-column
:label="$t('trials:uploadImage:table:ModalityForEdit')" prop="ModalityForEdit"
v-if="IsDicom" :label="$t('trials:uploadImage:table:ModalityForEdit')"
/> v-if="IsDicom"
<!--检查模态--> />
<el-table-column <!--检查模态-->
prop="Modalities" <el-table-column
:label="$t('trials:uploadImage:table:Modalities')" prop="Modalities"
v-if="IsDicom" :label="$t('trials:uploadImage:table:Modalities')"
/> v-if="IsDicom"
<!--检查部位--> />
<el-table-column <!--检查部位-->
prop="BodyPartForEdit" <el-table-column
:label="$t('trials:uploadImage:table:BodyPartForEdit')" prop="BodyPartForEdit"
v-if="IsDicom" :label="$t('trials:uploadImage:table:BodyPartForEdit')"
v-if="IsDicom"
>
<template slot-scope="scope">
<span>{{
$fd(
'Bodypart',
scope.row.BodyPartForEdit,
'Code',
{ Bodypart: bodyPart },
'Name'
)
}}</span>
</template>
</el-table-column>
<!--序列数量-->
<el-table-column
prop="SeriesCount"
:label="$t('trials:uploadImage:table:SeriesCount')"
v-if="IsDicom"
/>
<!--图像数量-->
<el-table-column
prop="InstanceCount"
:label="$t('trials:uploadImage:table:InstanceCount')"
v-if="IsDicom"
/>
<!--检查时间-->
<el-table-column
prop="StudyTime"
:label="$t('trials:uploadImage:table:StudyTime')"
v-if="IsDicom"
min-width="130"
/>
<!--检查模态-->
<el-table-column
prop="Modality"
:label="$t('trials:uploadImage:table:Modalities')"
v-if="!IsDicom"
/>
<!--检查部位-->
<el-table-column
prop="BodyPart"
:label="$t('trials:uploadImage:table:BodyPartForEdit')"
v-if="!IsDicom"
>
<template slot-scope="scope">
<span>{{
$fd(
'Bodypart',
scope.row.BodyPart,
'Code',
{ Bodypart: bodyPart },
'Name'
)
}}</span>
</template>
</el-table-column>
<!--文件数量-->
<el-table-column
prop="FileCount"
:label="$t('trials:uploadImage:table:FileCount')"
v-if="!IsDicom"
/>
<!--检查时间-->
<el-table-column
prop="ImageDate"
:label="$t('trials:uploadImage:table:StudyTime')"
v-if="!IsDicom"
min-width="130"
/>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="80"
>
<template slot-scope="scope">
<!--预览--->
<el-button
circle
icon="el-icon-view"
:title="$t('trials:uploadImage:button:preview')"
v-if="!isUpload"
@click.stop="preview(scope.row)"
/>
<!--编辑--->
<el-button
circle
icon="el-icon-edit-outline"
:title="$t('trials:uploadImage:button:edit')"
v-else
@click.stop="openEdit(scope.row)"
/>
</template>
</el-table-column>
</el-table>
</div>
</base-model>
<!--新增检查部位-->
<base-model v-if="editModality_model.visible" :config="editModality_model">
<template slot="dialog-body">
<el-form
ref="editModalityform"
:inline="true"
:model="form"
class="demo-form-inline"
:rules="rules"
> >
<template slot-scope="scope"> <el-form-item
<span>{{ :label="$t('trials:uploadImage:form:ModalityForEdit')"
$fd( prop="Modality"
'Bodypart', label-width="150px"
scope.row.BodyPartForEdit, >
'Code', <el-select v-model="form.Modality" placeholder="">
{ Bodypart: bodyPart }, <el-option
'Name' v-for="item in TrialModality"
) :key="item"
}}</span> :label="item"
</template> :value="item"
</el-table-column> >
<!--序列数量--> </el-option>
<el-table-column </el-select>
prop="SeriesCount" </el-form-item>
:label="$t('trials:uploadImage:table:SeriesCount')" </el-form>
v-if="IsDicom" </template>
/> <template slot="dialog-footer">
<!--图像数量--> <el-button
<el-table-column type="primary"
prop="InstanceCount" @click="updateTaskStudyModality"
:label="$t('trials:uploadImage:table:InstanceCount')" :loading="loading"
v-if="IsDicom"
/>
<!--检查时间-->
<el-table-column
prop="StudyTime"
:label="$t('trials:uploadImage:table:StudyTime')"
v-if="IsDicom"
min-width="130"
/>
<!--检查模态-->
<el-table-column
prop="Modality"
:label="$t('trials:uploadImage:table:Modalities')"
v-if="!IsDicom"
/>
<!--检查部位-->
<el-table-column
prop="BodyPart"
:label="$t('trials:uploadImage:table:BodyPartForEdit')"
v-if="!IsDicom"
> >
<template slot-scope="scope"> {{ $t('common:button:confirm') }}
<span>{{ </el-button>
$fd( <el-button
'Bodypart', @click="editModality_model.visible = false"
scope.row.BodyPart, :loading="loading"
'Code',
{ Bodypart: bodyPart },
'Name'
)
}}</span>
</template>
</el-table-column>
<!--文件数量-->
<el-table-column
prop="FileCount"
:label="$t('trials:uploadImage:table:FileCount')"
v-if="!IsDicom"
/>
<!--检查时间-->
<el-table-column
prop="ImageDate"
:label="$t('trials:uploadImage:table:StudyTime')"
v-if="!IsDicom"
min-width="130"
/>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
width="80"
> >
<template slot-scope="scope"> {{ $t('common:button:cancel') }}
<!--预览---> </el-button>
<el-button </template>
circle </base-model>
icon="el-icon-view" </div>
:title="$t('trials:uploadImage:button:preview')"
@click.stop="preview(scope.row)"
/>
</template>
</el-table-column>
</el-table>
</div>
</base-model>
</template> </template>
<script> <script>
import baseModel from '@/components/BaseModel' import baseModel from '@/components/BaseModel'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { updateTaskStudyModality } from '@/api/load.js'
export default { export default {
name: 'studyView', name: 'studyView',
props: { props: {
@ -136,6 +191,12 @@ export default {
return [] return []
}, },
}, },
TrialModality: {
type: Array,
default: () => {
return []
},
},
visitTaskId: { visitTaskId: {
type: String, type: String,
}, },
@ -144,10 +205,39 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
isUpload: {
required: true,
type: Boolean,
default: false,
},
}, },
components: { components: {
'base-model': baseModel, 'base-model': baseModel,
}, },
data() {
return {
form: {
Modality: null,
TaskStudyId: null,
},
editModality_model: {
visible: false,
title: this.$t('trials:uploadImage:button:edit'),
width: '500px',
appendToBody: true,
},
rules: {
Modality: [
{
required: true,
message: this.$t('trials:uploadImage:format:notModality'),
trigger: ['blur', 'change'],
},
],
},
loading: false,
}
},
methods: { methods: {
// //
preview(row) { preview(row) {
@ -166,6 +256,34 @@ export default {
} }
window.open(routeData.href, '_blank') window.open(routeData.href, '_blank')
}, },
//
openEdit(row) {
this.form.TaskStudyId = row.Id
this.form.Modality = row.ModalityForEdit
this.editModality_model.visible = true
},
//
async updateTaskStudyModality() {
try {
let validate = await this.$refs.editModalityform.validate()
if (!validate) return false
this.loading = true
let res = await updateTaskStudyModality(this.form)
this.loading = false
if (res.IsSuccess) {
this.modelList.some((item) => {
if (this.form.TaskStudyId === item.Id) {
item.ModalityForEdit = this.form.Modality
}
return this.form.TaskStudyId === item.Id
})
this.editModality_model.visible = false
this.$emit('getList')
}
} catch (err) {
console.log(err)
}
},
}, },
} }
</script> </script>

View File

@ -350,7 +350,7 @@ export default {
if (this.hasPermi(['role:dev', 'role:admin'])) { if (this.hasPermi(['role:dev', 'role:admin'])) {
return 9 return 9
} }
if (this.hasPermi(['role:pm', 'role:spm'])) { if (this.hasPermi(['role:pm', 'role:apm'])) {
return 8 return 8
} }
if (this.hasPermi(['role:ir', 'role:crc'])) { if (this.hasPermi(['role:ir', 'role:crc'])) {

View File

@ -185,7 +185,7 @@
</p> </p>
<p style="margin-bottom: 20px" v-else>{{ $t('login:title:system') }}</p> <p style="margin-bottom: 20px" v-else>{{ $t('login:title:system') }}</p>
<p style="margin-bottom: 20px"> <p style="margin-bottom: 20px">
V{{ $Version.IsEnv_US ? $version.Version_US : $version.Version }} V{{ $version.IsEnv_US ? $version.Version_US : $version.Version }}
</p> </p>
<p style="margin-bottom: 20px" v-if="language === 'zh'"> <p style="margin-bottom: 20px" v-if="language === 'zh'">
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司 Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司

View File

@ -151,7 +151,7 @@
:value="trialInfo.UserFeedBackUnDealedCount || 0" :value="trialInfo.UserFeedBackUnDealedCount || 0"
:max="99" :max="99"
class="inBox" class="inBox"
v-hasPermi="['role:pm', 'role:admin', 'role:spm']" v-hasPermi="['role:pm', 'role:admin', 'role:apm']"
> >
<i class="el-icon-message" @click.stop="openFeedBack"></i> <i class="el-icon-message" @click.stop="openFeedBack"></i>
</el-badge> </el-badge>