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

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
<template>
<div v-if="model_cfg.visible">
<base-model :config="model_cfg">
<div slot="dialog-body">
<el-table :data="modelList" style="width: 100%" height="300">
@ -104,17 +105,71 @@
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"
>
<el-form-item
:label="$t('trials:uploadImage:form:ModalityForEdit')"
prop="Modality"
label-width="150px"
>
<el-select v-model="form.Modality" placeholder="">
<el-option
v-for="item in TrialModality"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button
type="primary"
@click="updateTaskStudyModality"
:loading="loading"
>
{{ $t('common:button:confirm') }}
</el-button>
<el-button
@click="editModality_model.visible = false"
:loading="loading"
>
{{ $t('common:button:cancel') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import baseModel from '@/components/BaseModel'
import { getToken } from '@/utils/auth'
import { updateTaskStudyModality } from '@/api/load.js'
export default {
name: 'studyView',
props: {
@ -136,6 +191,12 @@ export default {
return []
},
},
TrialModality: {
type: Array,
default: () => {
return []
},
},
visitTaskId: {
type: String,
},
@ -144,10 +205,39 @@ export default {
type: Boolean,
default: true,
},
isUpload: {
required: true,
type: Boolean,
default: false,
},
},
components: {
'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: {
//
preview(row) {
@ -166,6 +256,34 @@ export default {
}
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>

View File

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

View File

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

View File

@ -151,7 +151,7 @@
:value="trialInfo.UserFeedBackUnDealedCount || 0"
:max="99"
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>
</el-badge>