From 1932e26ad59c8e8291c4aa1f780c1b0530e1da1d Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Thu, 25 Apr 2024 17:07:28 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=99=BB=E5=BD=95=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E8=A7=92=E8=89=B2=E8=BF=87=E6=BB=A4=E5=8F=AF=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E8=A7=92=E8=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/notice/components/from.vue | 2 +-
src/views/system/notice/index.vue | 14 ++++++--
src/views/system/user/list/index.vue | 17 ++++++++-
.../components/add-trials-list.vue | 1 +
.../personnel-manage/components/staff.vue | 14 ++++++--
.../components/staffExternalAdd.vue | 2 +-
.../personnel-manage/components/staffForm.vue | 8 ++---
.../subject-list/components/SubjectsForm.vue | 3 +-
.../subject/subject-list/index.vue | 8 ++++-
.../trial-summary/audit-record/index.vue | 35 +++++++++++++++----
.../trial-summary/login-log/index.vue | 35 +++++++++++++++----
11 files changed, 114 insertions(+), 25 deletions(-)
diff --git a/src/views/system/notice/components/from.vue b/src/views/system/notice/components/from.vue
index 0ba0ab6..0b72673 100644
--- a/src/views/system/notice/components/from.vue
+++ b/src/views/system/notice/components/from.vue
@@ -64,7 +64,7 @@
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index ff74a65..7d94d70 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -62,7 +62,7 @@
@@ -438,8 +438,18 @@ export default {
getUserTypeRoleList() {
getUserTypeRoleList({})
.then((res) => {
+ let arr = [];
+ if (this.hasPermi(["role:admin"])) {
+ arr = [1];
+ }
+ if (this.hasPermi(["role:oa"])) {
+ arr = [1, 2];
+ }
+ if (this.hasPermi(["role:pm"])) {
+ arr = [1, 2, 14];
+ }
this.roleList = res.Result.map((item) => {
- if ([4, 5, 8, 9, 12, 14].includes(item.UserTypeEnum)) {
+ if (!arr.includes(item.UserTypeEnum)) {
return item;
}
}).filter((item) => item);
diff --git a/src/views/system/user/list/index.vue b/src/views/system/user/list/index.vue
index a74c25c..35d4a5f 100644
--- a/src/views/system/user/list/index.vue
+++ b/src/views/system/user/list/index.vue
@@ -336,8 +336,23 @@ export default {
// 获取用户类型下拉选项信息
async getInfo() {
const res = await getUserTypeList();
+ let arr = [];
+ if (this.hasPermi(["role:admin"])) {
+ arr = [1];
+ }
+ if (this.hasPermi(["role:oa"])) {
+ arr = [1, 2];
+ }
+ if (this.hasPermi(["role:pm"])) {
+ arr = [1, 2, 14];
+ }
+ let roleList = res.Result.map((item) => {
+ if (!arr.includes(item.UserTypeEnum)) {
+ return item;
+ }
+ }).filter((item) => item);
const index = this.findItemIndex("UserType");
- this.$set(this.searchForm[index], "options", res.Result);
+ this.$set(this.searchForm[index], "options", roleList);
},
handleAddUser() {
this.$router.push({ path: "/system/user/add" });
diff --git a/src/views/trials/trials-inspection/components/add-trials-list.vue b/src/views/trials/trials-inspection/components/add-trials-list.vue
index 6a2bd7c..f0063fd 100644
--- a/src/views/trials/trials-inspection/components/add-trials-list.vue
+++ b/src/views/trials/trials-inspection/components/add-trials-list.vue
@@ -352,6 +352,7 @@ export default {
let params = {
PatientId: this.Patient.PatientId,
SubjectId: this.submitMessage.SubjectId,
+ TrialId:this.submitMessage.TrialId
};
this.btnLoading = true;
let res = await deleteSubjectPatientBinding(params);
diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue
index 3c16861..55665b9 100644
--- a/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue
+++ b/src/views/trials/trials-panel/setting/personnel-manage/components/staff.vue
@@ -17,7 +17,7 @@
@@ -522,8 +522,18 @@ export default {
// 获取用户类型下拉数据
getUserType() {
getUserTypeListByUserType(0).then((res) => {
+ let arr = [];
+ if (this.hasPermi(["role:admin"])) {
+ arr = [1];
+ }
+ if (this.hasPermi(["role:oa"])) {
+ arr = [1, 2];
+ }
+ if (this.hasPermi(["role:pm"])) {
+ arr = [1, 2, 14];
+ }
this.userTypeOptions = res.Result.map((item) => {
- if ([4, 5, 8, 9, 12].includes(item.UserTypeEnum)) {
+ if (!arr.includes(item.UserTypeEnum)) {
return item;
}
}).filter((item) => item);
diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalAdd.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalAdd.vue
index 3a9bffb..66500ec 100644
--- a/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalAdd.vue
+++ b/src/views/trials/trials-panel/setting/personnel-manage/components/staffExternalAdd.vue
@@ -31,7 +31,7 @@
diff --git a/src/views/trials/trials-panel/setting/personnel-manage/components/staffForm.vue b/src/views/trials/trials-panel/setting/personnel-manage/components/staffForm.vue
index 9808ac7..522bb42 100644
--- a/src/views/trials/trials-panel/setting/personnel-manage/components/staffForm.vue
+++ b/src/views/trials/trials-panel/setting/personnel-manage/components/staffForm.vue
@@ -38,10 +38,10 @@
class="mr"
>
diff --git a/src/views/trials/trials-panel/subject/subject-list/components/SubjectsForm.vue b/src/views/trials/trials-panel/subject/subject-list/components/SubjectsForm.vue
index e43daf0..67dba49 100644
--- a/src/views/trials/trials-panel/subject/subject-list/components/SubjectsForm.vue
+++ b/src/views/trials/trials-panel/subject/subject-list/components/SubjectsForm.vue
@@ -42,6 +42,7 @@
type="date"
placeholder="选择日期"
style="width: 100%"
+ value-format="YYYY-MM-DD"
>
@@ -153,7 +154,7 @@ export default {
Object.keys(this.form).forEach((key) => {
data[key] = this.form[key];
});
- data.BirthDate = data.BirthDate ? data.BirthDate.toISOString() : null;
+ // data.BirthDate = data.BirthDate ? new Date(data.BirthDate).toISOString() : null;
delete data.PatientId;
delete data.PatientList;
addOrUpdateSubjectHir(data)
diff --git a/src/views/trials/trials-panel/subject/subject-list/index.vue b/src/views/trials/trials-panel/subject/subject-list/index.vue
index d87ff3b..891e64b 100644
--- a/src/views/trials/trials-panel/subject/subject-list/index.vue
+++ b/src/views/trials/trials-panel/subject/subject-list/index.vue
@@ -148,7 +148,13 @@
:label="$t('trials:inspection:table:birthdate')"
show-overflow-tooltip
sortable="custom"
- />
+ >
+
+ {{
+ scope.row.BirthDate ? scope.row.BirthDate.split(" ")[0] : ""
+ }}
+
+
@@ -1240,6 +1240,7 @@ import Pagination from "@/components/Pagination";
import BaseContainer from "@/components/BaseContainer";
import BaseModel from "@/components/BaseModel";
import { getToken } from "@/utils/auth";
+import { getUserTypeListByUserType } from "@/api/admin";
export default {
components: { BaseContainer, Pagination, BaseModel },
@@ -1269,10 +1270,11 @@ export default {
OpByUserName: null,
BatchId: null,
TrialReadingCriterionId: null,
- RoleName: null,
+ UserTypeId: null,
};
};
return {
+ userTypeOptions: [],
isViewer: true,
otherData: [],
model_cfg: {
@@ -1343,8 +1345,29 @@ export default {
this.getVisitPlanOptions();
this.getTrialCriterionList();
this.getList();
+ this.getUserType();
},
methods: {
+ // 获取用户类型下拉数据
+ getUserType() {
+ getUserTypeListByUserType(0).then((res) => {
+ let arr = [];
+ if (this.hasPermi(["role:admin"])) {
+ arr = [1];
+ }
+ if (this.hasPermi(["role:oa"])) {
+ arr = [1, 2];
+ }
+ if (this.hasPermi(["role:pm"])) {
+ arr = [1, 2, 14];
+ }
+ this.userTypeOptions = res.Result.map((item) => {
+ if (!arr.includes(item.UserTypeEnum)) {
+ return item;
+ }
+ }).filter((item) => item);
+ });
+ },
openImage(url) {
console.log(url);
diff --git a/src/views/trials/trials-panel/trial-summary/login-log/index.vue b/src/views/trials/trials-panel/trial-summary/login-log/index.vue
index 0a878c4..150a879 100644
--- a/src/views/trials/trials-panel/trial-summary/login-log/index.vue
+++ b/src/views/trials/trials-panel/trial-summary/login-log/index.vue
@@ -56,16 +56,15 @@
v-if="!isMine"
>
@@ -188,6 +187,7 @@