部分问题修复

main
wangxiaoshuang 2024-04-25 14:23:42 +08:00
parent ebacc5bb1d
commit 55cc1492b6
17 changed files with 116 additions and 77 deletions

View File

@ -2,12 +2,10 @@
import Vue from 'vue' import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI, { MessageBox } from 'element-ui' import ElementUI from 'element-ui'
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary' import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
// import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/theme-blue/index.css' // 浅绿色主题 import './assets/css/theme-blue/index.css' // 浅绿色主题
import './assets/css/iconfont/index.css' // 阿里巴巴图标库 import './assets/css/iconfont/index.css' // 阿里巴巴图标库
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import i18n from './lang' import i18n from './lang'
import '@/styles/index.scss' // global css import '@/styles/index.scss' // global css
@ -23,10 +21,7 @@ import '@/permission' // permission control
import md5 from 'js-md5' import md5 from 'js-md5'
import VueClipboard from 'vue-clipboard2' import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard) Vue.use(VueClipboard)
// import htmlToPdf from './utils/htmlToPdf'
// Vue.use(htmlToPdf)
import permission from './utils/permission' import permission from './utils/permission'
import { OSSclient } from './utils/oss'
Vue.use(permission) Vue.use(permission)
import Viewer from 'v-viewer' import Viewer from 'v-viewer'

View File

@ -11,9 +11,17 @@ import { OSSclient } from './utils/oss'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/activate', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] const whiteList = ['/activate', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
// 影像页关闭
Vue.prototype.$openWindow = null
Vue.prototype.$setOpenWindow = (openWindow) => {
if (Vue.prototype.$openWindow) {
Vue.prototype.$openWindow.close();
}
Vue.prototype.$openWindow = openWindow;
}
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
NProgress.start() NProgress.start()
Vue.prototype.$setOpenWindow();
// 设置页面标题 // 设置页面标题
// document.title = getPageTitle(to.meta.title) // document.title = getPageTitle(to.meta.title)

View File

@ -68,7 +68,7 @@
<el-form-item <el-form-item
:label="$t('trials:researchForm:form:checkCode')" :label="$t('trials:researchForm:form:checkCode')"
prop="CheckCode" prop="CheckCode"
:maxlength="10" :maxlength="6"
> >
<el-input v-model="password.CheckCode" type="number" /> <el-input v-model="password.CheckCode" type="number" />
</el-form-item> </el-form-item>

View File

@ -6,6 +6,7 @@
width="500px" width="500px"
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
append-to-body append-to-body
:before-close="handleCancel"
> >
<el-form <el-form
ref="editVisitForm" ref="editVisitForm"

View File

@ -78,7 +78,6 @@
label="actions" label="actions"
fixed="right" fixed="right"
prop="UserTypeShortName" prop="UserTypeShortName"
min-width="200"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -212,7 +211,9 @@ export default {
}, },
// //
async test(item) { async test(item) {
this.loading = true;
let res = await testConnect(item.Id); let res = await testConnect(item.Id);
this.loading = false;
if (res.IsSuccess && res.Result) { if (res.IsSuccess && res.Result) {
this.$message.success(this.$t("system:dicomAE:connect:success")); this.$message.success(this.$t("system:dicomAE:connect:success"));
} else { } else {

View File

@ -76,13 +76,12 @@
ref="userType" ref="userType"
v-model="user.UserTypeId" v-model="user.UserTypeId"
size="small" size="small"
placeholder="Please select" placeholder=""
style="width: 100%" style="width: 100%"
:disabled="user.CanEditUserType === false" :disabled="user.CanEditUserType === false"
> >
<template v-for="(userType, key) of userTypeOptions"> <template v-for="(userType, key) of userTypeOptions">
<el-option <el-option
v-if="userType.UserTypeEnum !== 20"
:key="key" :key="key"
:label="userType.UserType" :label="userType.UserType"
:value="userType.Id" :value="userType.Id"
@ -368,7 +367,15 @@ export default {
getUserTypeList() { getUserTypeList() {
getUserTypeListByUserType(0).then((res) => { getUserTypeListByUserType(0).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.userTypeOptions = res.Result; let arr = [2, 4, 5, 8, 9, 12, 14];
if (this.hasPermi(["role:oa"])) {
arr = [4, 5, 8, 9, 12, 14];
}
this.userTypeOptions = res.Result.map((item) => {
if (arr.includes(item.UserTypeEnum)) {
return item;
}
}).filter((item) => item);
} }
}); });
}, },

View File

@ -456,6 +456,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
// //
async confirmSubmit() { async confirmSubmit() {

View File

@ -207,6 +207,7 @@ export default {
methods: { methods: {
// //
beforeCloseStudyDig() { beforeCloseStudyDig() {
this.$setOpenWindow();
this.$emit("update:visible", false); this.$emit("update:visible", false);
}, },
// //
@ -256,7 +257,8 @@ export default {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path: `/showdicom?studyId=${item.SCPStudyId}&TokenKey=${token}&type=Patient`, path: `/showdicom?studyId=${item.SCPStudyId}&TokenKey=${token}&type=Patient`,
}); });
window.open(routeData.href, "_blank"); let newWindow = window.open(routeData.href, "_blank");
this.$setOpenWindow(newWindow);
}, },
// //
report() {}, report() {},

View File

@ -110,7 +110,7 @@
v-model="trialForm.CriterionTypeList" v-model="trialForm.CriterionTypeList"
multiple multiple
clearable clearable
:disabled="trialForm.Id !== ''" :disabled="TrialStatusStr === 'Ongoing'"
> >
<el-option <el-option
v-for="item of CriterionTypeList" v-for="item of CriterionTypeList"
@ -330,6 +330,7 @@ export default {
phaseNum: null, phaseNum: null,
dictionaryList: {}, dictionaryList: {},
CriterionTypeList: [], // CriterionTypeList: [], //
TrialStatusStr: null, //
}; };
}, },
computed: { computed: {
@ -367,6 +368,7 @@ export default {
)[0].raw.ChildGroup; )[0].raw.ChildGroup;
} }
} }
this.TrialStatusStr = res.Result.TrialStatusStr;
} }
}) })
.catch(() => { .catch(() => {

View File

@ -42,7 +42,7 @@
<el-input <el-input
v-model="userForm.CheckCode" v-model="userForm.CheckCode"
:placeholder="$t('trials:researchForm:form:checkCode')" :placeholder="$t('trials:researchForm:form:checkCode')"
:maxlength="10" :maxlength="6"
type="number" type="number"
/> />
<!-- 修改 --> <!-- 修改 -->

View File

@ -150,6 +150,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
// //
handleViewStudy(row) { handleViewStudy(row) {
@ -159,6 +160,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
}, },
}; };

View File

@ -376,6 +376,7 @@ export default {
}, },
// //
beforeCloseStudyDig() { beforeCloseStudyDig() {
this.$setOpenWindow();
this.$emit("update:visible", false); this.$emit("update:visible", false);
}, },
// //
@ -390,6 +391,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
// //
remove(item) { remove(item) {

View File

@ -184,6 +184,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
// //
handleViewStudy(row) { handleViewStudy(row) {
@ -193,6 +194,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
getBodyPart(bodyPart) { getBodyPart(bodyPart) {
if (!bodyPart) return ""; if (!bodyPart) return "";

View File

@ -91,19 +91,25 @@
</base-model> </base-model>
</template> </template>
<script> <script>
import { addOrUpdateTrialExternalUser } from "@/api/trials";
import BaseModel from "@/components/BaseModel"; import BaseModel from "@/components/BaseModel";
import { getHospital } from "@/api/hospital.js";
import { addUser } from "@/api/admin.js";
const formDataDefault = () => { const formDataDefault = () => {
return { return {
Id: null,
TrialId: null,
LastName: null, LastName: null,
FirstName: null, FirstName: null,
UserTypeId: "", UserTypeId: "",
Phone: null, Phone: null,
Email: null, Email: null,
OrganizationName: null, IsSendEmail: false,
Sex: "9",
IsZhiZhun: "",
OrganizationName: "",
DepartmentName: "",
PositionName: "",
IsTestUser: false,
verifyCode: "",
checkCode: "",
}; };
}; };
export default { export default {
@ -152,14 +158,21 @@ export default {
}; };
return { return {
form: { form: {
Id: null, // Id: null,
LastName: null, LastName: null,
FirstName: null, FirstName: null,
UserTypeId: "", UserTypeId: "",
Phone: null, Phone: null,
Email: null, Email: null,
TrialId: null,
IsSendEmail: false, IsSendEmail: false,
Sex: "9",
IsZhiZhun: "",
OrganizationName: "",
DepartmentName: "",
PositionName: "",
IsTestUser: false,
verifyCode: "",
checkCode: "",
}, },
rules: { rules: {
LastName: [ LastName: [
@ -212,6 +225,7 @@ export default {
}, },
trialId: "", trialId: "",
errorMsg: null, errorMsg: null,
hospitalName: null,
}; };
}, },
watch: { watch: {
@ -221,11 +235,44 @@ export default {
}, },
deep: true, deep: true,
}, },
"form.UserTypeId": {
handler() {
if (this.form.UserTypeId) {
let name = this.getUserType(this.form.UserTypeId);
if (["PM", "PI", "SR", "OA"].includes(name)) {
this.form.IsZhiZhun = true;
this.form.OrganizationName = this.hospitalName;
return (this.IsZhiZhunDisabled = true);
}
}
this.form.IsZhiZhun = null;
this.form.OrganizationName = null;
this.IsZhiZhunDisabled = false;
},
deep: true,
immediate: true,
},
}, },
mounted() { mounted() {
this.trialId = this.$route.query.trialId; this.trialId = this.$route.query.trialId;
this.getInfo();
}, },
methods: { methods: {
//
async getInfo() {
try {
let res = await getHospital();
if (res.IsSuccess) {
this.hospitalName = res.Result.HospitalName;
}
} catch (err) {
console.log(err);
}
},
getUserType(id) {
let obj = this.userTypeOptions.find((item) => item.Id === id);
return obj.UserTypeShortName;
},
openDialog(title, data) { openDialog(title, data) {
this.model_cfg.visible = true; this.model_cfg.visible = true;
this.model_cfg.title = title; this.model_cfg.title = title;
@ -245,7 +292,7 @@ export default {
this.form.BaseUrl = `${location.protocol}//${location.host}/login`; this.form.BaseUrl = `${location.protocol}//${location.host}/login`;
this.form.RouteUrl = `${location.protocol}//${location.host}/email-recompose`; this.form.RouteUrl = `${location.protocol}//${location.host}/email-recompose`;
} }
addOrUpdateTrialExternalUser(this.form) addUser(this.form)
.then((res) => { .then((res) => {
this.btnLoading = false; this.btnLoading = false;
this.$message.success( this.$message.success(
@ -256,9 +303,9 @@ export default {
}) })
.catch((res) => { .catch((res) => {
if (res.Result) { if (res.Result) {
this.$set(this.form, "LastName", res.Result.LastName); // this.$set(this.form, "LastName", res.Result.LastName);
this.$set(this.form, "FirstName", res.Result.FirstName); // this.$set(this.form, "FirstName", res.Result.FirstName);
this.$set(this.form, "Phone", res.Result.Phone); // this.$set(this.form, "Phone", res.Result.Phone);
this.errorMsg = res.ErrorMessage; this.errorMsg = res.ErrorMessage;
} }
this.btnLoading = false; this.btnLoading = false;

View File

@ -11,13 +11,13 @@
clearable clearable
/> />
<!-- 用户名 --> <!-- 用户名 -->
<span>{{ $t("trials:staff:table:uid") }}:</span> <!-- <span>{{ $t("trials:staff:table:uid") }}:</span>
<el-input <el-input
v-model="listQuery.UserName" v-model="listQuery.UserName"
size="mini" size="mini"
class="mr" class="mr"
clearable clearable
/> /> -->
<!-- 单位 --> <!-- 单位 -->
<span>{{ $t("trials:staff:table:organization") }}:</span> <span>{{ $t("trials:staff:table:organization") }}:</span>
<el-input <el-input
@ -26,6 +26,9 @@
class="mr" class="mr"
clearable clearable
/> />
<!-- 邮箱 -->
<span>{{ $t("trials:externalStaff:table:email") }}:</span>
<el-input v-model="listQuery.EMail" size="mini" class="mr" clearable />
<!-- 用户类型 --> <!-- 用户类型 -->
<span>{{ $t("trials:staff:table:userType") }}:</span> <span>{{ $t("trials:staff:table:userType") }}:</span>
<el-select <el-select
@ -66,7 +69,7 @@
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
v-hasPremi="['role:pm']" v-hasPermi="['role:pm']"
> >
{{ $t("common:button:add") }} {{ $t("common:button:add") }}
</el-button> </el-button>
@ -108,13 +111,13 @@
min-width="100" min-width="100"
/> />
<!-- 用户名 --> <!-- 用户名 -->
<el-table-column <!-- <el-table-column
prop="UserName" prop="UserName"
:label="$t('trials:staff:table:uid')" :label="$t('trials:staff:table:uid')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
min-width="100" min-width="100"
/> /> -->
<!-- 电话 --> <!-- 电话 -->
<el-table-column <el-table-column
prop="Phone" prop="Phone"
@ -166,11 +169,7 @@
</el-container> </el-container>
</template> </template>
<script> <script>
import { import { getTrialUserScreeningList, addTrialUsers } from "@/api/trials";
getTrialUserScreeningList,
addTrialUsers,
getUserTypeList,
} from "@/api/trials";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import staffExternalAdd from "./staffExternalAdd.vue"; import staffExternalAdd from "./staffExternalAdd.vue";
const getListQueryDefault = () => { const getListQueryDefault = () => {
@ -178,6 +177,7 @@ const getListQueryDefault = () => {
UserRealName: "", UserRealName: "",
UserName: "", UserName: "",
OrganizationName: "", OrganizationName: "",
EMail: null,
UserTypeEnum: "", UserTypeEnum: "",
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,

View File

@ -38,34 +38,6 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 申请号 -->
<!-- <el-form-item :label="$t('trials:study:form:accessionNumber')">
<el-input v-model="searchData.SubjectInfo" style="width: 140px" />
</el-form-item> -->
<!-- 检查设备 -->
<!-- <el-form-item :label="$t('trials:studyList:table:modality')">
<el-select v-model="searchData.VisitPlanArray" clearable>
<el-option
v-for="item of $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> -->
<!-- 检查类型 -->
<!-- <el-form-item :label="$t('trials:seletctedReviews:form:modality')">
<el-select v-model="searchData.Modalities" clearable>
<el-option
v-for="item of $d.modalType"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> -->
<!-- 检查日期 --> <!-- 检查日期 -->
<el-form-item :label="$t('trials:audit:table:studyDate')"> <el-form-item :label="$t('trials:audit:table:studyDate')">
<el-date-picker <el-date-picker
@ -77,18 +49,6 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<!-- 状态 -->
<!-- <el-form-item :label="$t('trials:seletctedReviews:table:status')">
<el-select v-model="searchData.VisitPlanArray" clearable>
<el-option
v-for="item of $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> -->
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
@ -460,6 +420,7 @@ export default {
}); });
var newWindow = window.open(routeData.href, "_blank"); var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow); this.$emit("setOpenWindow", newWindow);
this.$setOpenWindow(newWindow);
}, },
// //
handleSearch() { handleSearch() {

View File

@ -1329,6 +1329,14 @@ export default {
imagesList: [], imagesList: [],
}; };
}, },
watch: {
"model_cfg.visible": {
handler() {
console.log(this.model_cfg.visible);
if (!this.model_cfg.visible) this.$setOpenWindow();
},
},
},
mounted() { mounted() {
this.ResearchProgramNo = this.$route.query.researchProgramNo; this.ResearchProgramNo = this.$route.query.researchProgramNo;
this.getSite(); this.getSite();