意见反馈
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-08-01 09:31:58 +08:00
parent fc6d0c7b35
commit c13fe6b521
7 changed files with 223 additions and 83 deletions

View File

@ -3,15 +3,16 @@ import FEEDBACKCOMP from "./index.vue";
const FBConstructor = Vue.extend(FEEDBACKCOMP);
const FB = options => {
const { cancelBack } = options;
// if (!UserId) throw `UserId is requred.but ${UserId}`
const { type, cancelBack, trialId = null, Id = null } = options;
if (!type) throw `type is requred.but ${type}`
const id = `FB${new Date().getTime()}`;
const instance = new FBConstructor();
instance.id = id;
instance.vm = instance.$mount();
if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el);
instance.vm.open();
console.log(type);
instance.vm.open({ type, trialId, Id });
instance.vm.$on("success", (Id) => {
});
instance.vm.$on("closed", () => {

View File

@ -1,6 +1,6 @@
<template>
<!--FEEDBACK-->
<div v-if="visible" @click.stop="()=>false">
<div v-if="visible" @click.stop="() => false">
<el-dialog
:visible.sync="visible"
v-dialogDrag
@ -18,6 +18,7 @@
:model="form"
:inline="true"
class="trialsForm"
v-if="type === 'detail'"
>
<el-form-item :label="$t('feedBack:trials:code')">
<span>2024-06-28 15:00</span>
@ -41,7 +42,7 @@
label-width="100px"
>
<!-- 影像异常tip -->
<p class="tip">
<p class="tip" v-if="type === 'imgfail'">
<i
class="el-icon-warning-outline"
style="color: #f56c6c; font-size: 24px"
@ -49,16 +50,27 @@
<span> 影像异常导致无法阅片</span>
</p>
<!-- 问题反馈 -->
<el-form-item :label="$t('feedBack:form:feedBack')" prop="feedBack">
<el-select v-model="form.value" style="width: 100%">
<el-form-item
:label="$t('feedBack:form:feedBack')"
prop="feedBack"
v-if="type === 'feedback' && trialId"
>
<el-select v-model="form.type" style="width: 100%">
<el-option
v-for="item in options"
:key="item.value"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!-- 问题反馈 -->
<el-form-item
:label="$t('feedBack:form:feedBack')"
prop="feedBack"
v-if="type === 'detail'"
>
<span>影像异常导致无法阅片</span>
</el-form-item>
<!-- 问题描述 -->
@ -66,21 +78,34 @@
:label="$t('feedBack:form:description')"
prop="description"
>
<el-input v-model="form.Code" type="textarea" :rows="4" />
<el-input
v-model="form.Code"
type="textarea"
:rows="4"
:disabled="type === 'detail'"
/>
</el-form-item>
<!-- 截图 -->
<el-form-item :label="$t('feedBack:form:screenshot')" prop="screenshot">
<uploadImage
:path.sync="form.HospitalLogoPath"
:disabled="disabled"
:disabled="type === 'detail'"
/>
</el-form-item>
<!-- 反馈时间 -->
<el-form-item :label="$t('feedBack:form:time')" prop="screenshot">
<el-form-item
:label="$t('feedBack:form:time')"
prop="screenshot"
v-if="type === 'detail'"
>
<span>2024-06-28 15:00</span>
</el-form-item>
<!-- 状态 -->
<el-form-item :label="$t('feedBack:form:status')" prop="screenshot">
<el-form-item
:label="$t('feedBack:form:status')"
prop="screenshot"
v-if="type === 'detail'"
>
<el-switch
v-model="form.status"
active-color="#13ce66"
@ -89,11 +114,12 @@
:inactive-value="false"
:active-text="$fd('FeedBackStatus', true)"
:inactive-text="$fd('FeedBackStatus', false)"
:disabled="level < 8"
>
</el-switch>
</el-form-item>
</el-form>
<div slot="footer">
<div slot="footer" v-if="type !== 'detail'">
<!-- 取消 -->
<el-button size="small" @click.stop="cancel">
{{ $t("feedBack:button:cancel") }}
@ -122,11 +148,16 @@ export default {
visible: false,
loading: false,
options: [],
type: null, // detail feedback imgfail
trialId: null,
Id: null,
form: {
Code: null,
UserId: null,
EMail: null,
username: null,
HospitalLogoPath: [],
type: 0,
},
rules: {
Code: [
@ -154,13 +185,30 @@ export default {
};
},
computed: {
disabled() {
return false;
level() {
if (this.hasPermi(["role:dev", "role:admin"])) {
return 9;
}
if (this.hasPermi(["role:pm"])) {
return 8;
}
if (this.hasPermi(["role:ir", "role:crc"])) {
return 7;
}
return 0;
},
},
methods: {
open(data) {
let { type, trialId, Id } = data;
this.type = type;
this.trialId = trialId;
this.Id = Id;
this.visible = true;
if (!Id) {
this.title = this.setTitle();
}
this.setTypeOption();
},
cancel() {
this.visible = false;
@ -169,6 +217,21 @@ export default {
async save() {
this.cancel();
},
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);
},
setTitle(code, name) {
if (this.hasPermi(["role:pm"])) {
return `${this.$t("feedBack:form:title:pm")}(${code},${name})`;
}
if (this.hasPermi(["role:ir", "role:crc"])) {
return `${this.$t("feedBack:form:title")}`;
}
},
},
};
</script>

View File

@ -4,6 +4,7 @@
class="upload-demo"
:class="{ uploadDisabled: disabled ? true : false }"
action
multiple
:http-request="uploadFile"
:before-upload="beforeUpload"
:file-list="fileList"
@ -70,7 +71,7 @@ export default {
},
methods: {
remove(file, fileList) {
this.$emit("update:path", null);
// this.$emit("update:path", null);
},
fileToBlob(file) {
// FileReader
@ -125,6 +126,11 @@ export default {
let res = await this.uploadToOSS(fileName, file);
this.btnDisabled = false;
if (!res) return;
this.fileList.push({
url: this.OSSclientConfig.basePath + res.name,
path: res.name,
uid: param.file.uid,
});
this.$emit("update:path", [...this.path, res.name]);
return false;
},
@ -159,7 +165,7 @@ export default {
handleRemove(file) {
let index = this.fileList.findIndex((item) => item.uid === file.uid);
this.fileList.splice(index, 1);
let arr = this.fileList.map((item) => item.name);
let arr = this.fileList.map((item) => item.path);
this.$emit("update:path", arr);
},
},

View File

@ -294,7 +294,7 @@ export default {
],
data() {
return {
list: [],
list: [{ PublishUserName: 1 }],
total: 0,
loading: false,
datetimerange: [],
@ -357,8 +357,11 @@ export default {
this.getList();
},
//
getDetail() {
this.$FB();
getDetail(row) {
this.$FB({
type: "detail",
Id: row.Id,
});
},
},
};

View File

@ -10,7 +10,7 @@
>
<i class="el-icon-chat-dot-square icon"></i>
<transition name="fade">
<div class="checkBox" v-show="visible" @click.stop="()=>false">
<div class="checkBox" v-show="visible" @click.stop="() => false">
<span @click.stop="openFeedBack">{{
$t("triials:feedBack:botton:opinion")
}}</span>
@ -59,6 +59,8 @@ export default {
openFeedBack() {
this.lock = true;
this.$FB({
type: "feedback",
trialId: this.$route.query.trialId,
cancelBack: () => {
this.lock = false;
},

View File

@ -140,6 +140,7 @@
align="center"
>
<template slot-scope="scope">
<i class="el-icon-question fbBox" @click.stop="openFeedBack(scope.row)"></i>
<!-- <el-tag v-if="scope.row.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag> -->
<el-tooltip placement="top">
@ -1075,6 +1076,13 @@ export default {
}
},
methods: {
//
openFeedBack(row){
this.$FB({
type:"detail",
Id:row.Id
})
},
handleExport() {
this.exportVisible = true
},
@ -1334,4 +1342,10 @@ export default {
/deep/ .el-descriptions-item__label.has-colon:after{
display: none;
}
.fbBox{
float: left;
font-size: 32px;
color:#F56C6C;
cursor: pointer;
}
</style>

View File

@ -1,137 +1,188 @@
<template>
<div class="trial-information">
<el-descriptions :column="2" border style="width:1000px;">
<el-descriptions :column="2" border style="width: 1000px">
<el-descriptions-item :label="$t('trials:trials-list:form:trialId')">
{{trialInfo.TrialCode}}
<el-tag v-show="trialInfo.TrialStatusStr" size="small" style="margin-left:10px;">
( {{ $fd('TrialStatusEnum',trialInfo.TrialStatusStr) }} )
{{ trialInfo.TrialCode }}
<el-tag
v-show="trialInfo.TrialStatusStr"
size="small"
style="margin-left: 10px"
>
( {{ $fd("TrialStatusEnum", trialInfo.TrialStatusStr) }} )
</el-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:trialType')">
{{ $fd('TrialType', trialInfo.TrialType) }}
{{ $fd("TrialType", trialInfo.TrialType) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:experimentName')" :contentStyle="{'max-width': '300px'}">
<el-descriptions-item
:label="$t('trials:trials-list:form:experimentName')"
:contentStyle="{ 'max-width': '300px' }"
>
{{ trialInfo.ExperimentName }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:researchNumber')" :contentStyle="{'max-width': '300px'}">
<el-descriptions-item
:label="$t('trials:trials-list:form:researchNumber')"
:contentStyle="{ 'max-width': '300px' }"
>
{{ trialInfo.ResearchProgramNo }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:researchUnit')">
{{trialInfo.MainResearchUnit}}
{{ trialInfo.MainResearchUnit }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:pi')">
{{ trialInfo.HeadPI }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:sponsor')">
{{trialInfo.Sponsor}}
{{ trialInfo.Sponsor }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:cro')">
{{ trialInfo.CRO }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:declarationType')">
<span v-if="trialInfo.DeclarationTypeEnumList">{{trialInfo.DeclarationTypeEnumList.map(v => $fd('DeclarationType', v)).join(', ')}}</span>
<el-descriptions-item
:label="$t('trials:trials-list:form:declarationType')"
>
<span v-if="trialInfo.DeclarationTypeEnumList">{{
trialInfo.DeclarationTypeEnumList.map((v) =>
$fd("DeclarationType", v)
).join(", ")
}}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:phase')">
{{ trialInfo.Phase }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:indicationType')">
{{$fd('IndicationType', trialInfo.IndicationTypeId, 'id')}}
<el-descriptions-item
:label="$t('trials:trials-list:form:indicationType')"
>
{{ $fd("IndicationType", trialInfo.IndicationTypeId, "id") }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:indication')">
{{$fd('Indication', trialInfo.IndicationEnum)}}{{trialInfo.Indication}}
{{ $fd("Indication", trialInfo.IndicationEnum)
}}{{ trialInfo.Indication }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:modality')">
{{trialInfo.Modalitys}}
{{ trialInfo.Modalitys }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:siteCount')">
{{ trialInfo.PlanSiteCount }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:patientsNum')">
{{trialInfo.ExpectedPatients}}
{{ trialInfo.ExpectedPatients }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:timePointsPerPatient')">
<el-descriptions-item
:label="$t('trials:trials-list:form:timePointsPerPatient')"
>
{{ trialInfo.TimePointsPerPatient }}
</el-descriptions-item>
<el-descriptions-item :span="2" :label="$t('trials:trials-list:form:visitCount')">
{{trialInfo.PlanVisitCount}}
<el-descriptions-item
:span="2"
:label="$t('trials:trials-list:form:visitCount')"
>
{{ trialInfo.PlanVisitCount }}
</el-descriptions-item>
<el-descriptions-item :span="2" :label="$t('trials:trials-list:form:criterion')">
<el-descriptions-item
:span="2"
:label="$t('trials:trials-list:form:criterion')"
>
{{ trialInfo.Criterion }}
</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('trials:trials-list:form:reviewMode')">-->
<!-- <span>{{$fd('ReadingType', trialInfo.ReadingType)}}</span>-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item :label="$t('trials:trials-list:form:reviewMode')">-->
<!-- <span>{{$fd('ReadingType', trialInfo.ReadingType)}}</span>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item :label="$t('trials:trials-list:form:expedited')">
{{$fd('YesOrNoForInt', trialInfo.Expedited)}}
{{ $fd("YesOrNoForInt", trialInfo.Expedited) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:projectCycle')">
{{ trialInfo.ProjectCycle }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:totalReviewers')">
{{trialInfo.TotalReviewers}}
<el-descriptions-item
:label="$t('trials:trials-list:form:totalReviewers')"
>
{{ trialInfo.TotalReviewers }}
</el-descriptions-item>
<el-descriptions-item :label="$t('trials:trials-list:form:typeofReviewers')">
<span v-if="trialInfo.AttendedReviewerTypeEnumList">{{trialInfo.AttendedReviewerTypeEnumList.map(v => $fd('AttendedReviewerType', v)).join(', ')}}</span>
<el-descriptions-item
:label="$t('trials:trials-list:form:typeofReviewers')"
>
<span v-if="trialInfo.AttendedReviewerTypeEnumList">{{
trialInfo.AttendedReviewerTypeEnumList.map((v) =>
$fd("AttendedReviewerType", v)
).join(", ")
}}</span>
</el-descriptions-item>
</el-descriptions>
<el-badge :value="200" :max="99" class="inBox">
<i class="el-icon-message" @click.stop="openFeedBack"></i>
</el-badge>
</div>
</template>
<script>
import { getTrialInfo } from '@/api/trials'
import { getTrialInfo } from "@/api/trials";
export default {
data() {
return {
trialInfo: {},
trialId: '',
trialStatus: '',
formLoading: false
}
trialId: "",
trialStatus: "",
formLoading: false,
};
},
mounted() {
this.trialId = this.$route.query.trialId
this.initForm()
this.trialId = this.$route.query.trialId;
this.initForm();
},
methods: {
initForm() {
this.formLoading = true
getTrialInfo(this.trialId).then(res => {
this.formLoading = false
this.trialInfo = res.Result
this.trialInfo.ReviewTypeList = this.trialInfo.ReviewTypeList.length > 0 ? this.trialInfo.ReviewTypeList.join(', ') : ''
var modalityArr = []
res.Result.ModalityIds.map(i=>{
modalityArr.push(this.$fd('Modality',i,'id'))
this.formLoading = true;
getTrialInfo(this.trialId)
.then((res) => {
this.formLoading = false;
this.trialInfo = res.Result;
this.trialInfo.ReviewTypeList =
this.trialInfo.ReviewTypeList.length > 0
? this.trialInfo.ReviewTypeList.join(", ")
: "";
var modalityArr = [];
res.Result.ModalityIds.map((i) => {
modalityArr.push(this.$fd("Modality", i, "id"));
});
this.trialInfo.ModalityList = modalityArr.join(", ");
this.trialInfo.Criterion =
res.Result.CriterionList && res.Result.CriterionList.length > 0
? res.Result.CriterionList.join(", ")
: "";
// this.trialInfo.Expedited = this.$fd('Trial_BasicInfo', res.Result.Expedited)
// this.trialInfo.AttendedReviewerType = this.$fd('Trial_BasicInfo', res.Result.AttendedReviewerType)
})
this.trialInfo.ModalityList = modalityArr.join(', ')
this.trialInfo.Criterion = res.Result.CriterionList && res.Result.CriterionList.length > 0
? res.Result.CriterionList.join(', ')
: ''
// this.trialInfo.Expedited = this.$fd('Trial_BasicInfo', res.Result.Expedited)
// this.trialInfo.AttendedReviewerType = this.$fd('Trial_BasicInfo', res.Result.AttendedReviewerType)
}).catch(() => { this.formLoading = false })
}
}
}
.catch(() => {
this.formLoading = false;
});
},
//
openFeedBack() {
this.$FBT();
},
},
};
</script>
<style lang="scss">
.trial-information{
min-height: 100%;
padding: 10px 0 0 10px;
background: #fff;
}
.trial-information {
min-height: 100%;
padding: 10px 0 0 10px;
background: #fff;
}
.inBox {
font-size: 32px;
margin-top: 30px;
cursor: pointer;
}
</style>