- {{$t('trials:auditRecord:title:signInfo')}}
+ {{ $t("trials:auditRecord:title:signInfo") }}
- {{otherData[0].Value}}
+
+ {{ otherData[0].Value }}
-
- {{$t('common:button:close')}}
+
+ {{ $t("common:button:close") }}
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -758,22 +1226,28 @@
import {
getTrialSiteSelect,
getTrialVisitStageSelect,
- getTrialCriterionList
-} from '@/api/trials'
-import { getInspectionList, getInspectionJsonDataList } from '@/api/trials/inspection'
-import { getFrontAuditConfigList, getAuditConfigChildList, getModuleTypeDescriptionList, setInspectionEnumValue } from '@/api/dictionary/checkConfig'
-import Pagination from '@/components/Pagination'
-import BaseContainer from '@/components/BaseContainer'
-import BaseModel from '@/components/BaseModel'
-import { getToken } from '@/utils/auth'
+ getTrialCriterionList,
+} from "@/api/trials";
+import {
+ getInspectionList,
+ getInspectionJsonDataList,
+} from "@/api/trials/inspection";
+import {
+ getAuditConfigChildList,
+ getModuleTypeDescriptionList,
+} from "@/api/dictionary/checkConfig";
+import Pagination from "@/components/Pagination";
+import BaseContainer from "@/components/BaseContainer";
+import BaseModel from "@/components/BaseModel";
+import { getToken } from "@/utils/auth";
export default {
components: { BaseContainer, Pagination, BaseModel },
- dicts: ['OptType', 'ModuleType', 'ChildrenType'],
+ dicts: ["OptType", "ModuleType", "ChildrenType"],
data() {
const searchDataDefault = () => {
return {
- SortField: 'CreateTime',
+ SortField: "TrialReadingCriterionName",
Asc: false,
PageIndex: 1,
PageSize: 20,
@@ -795,16 +1269,40 @@ export default {
OpByUserName: null,
BatchId: null,
TrialReadingCriterionId: null,
- RoleName:null
- }
- }
+ RoleName: null,
+ };
+ };
return {
isViewer: true,
- otherData:[],
- model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true },
- model_cfg2: { visible: false, showClose: true, width: '1000px', title: this.$t('trials:auditRecord:title:viewRelationOperations'), appendToBody: true },//'查看关联操作'
- model_cfg3: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true },
- model_cfg4: { visible: false, showClose: true, width: '600px', title: this.$t('trials:auditRecord:title:viewImage'), appendToBody: true },//查看图片
+ otherData: [],
+ model_cfg: {
+ visible: false,
+ showClose: true,
+ width: "600px",
+ title: "",
+ appendToBody: true,
+ },
+ model_cfg2: {
+ visible: false,
+ showClose: true,
+ width: "1000px",
+ title: this.$t("trials:auditRecord:title:viewRelationOperations"),
+ appendToBody: true,
+ }, //'查看关联操作'
+ model_cfg3: {
+ visible: false,
+ showClose: true,
+ width: "600px",
+ title: "",
+ appendToBody: true,
+ },
+ model_cfg4: {
+ visible: false,
+ showClose: true,
+ width: "600px",
+ title: this.$t("trials:auditRecord:title:viewImage"),
+ appendToBody: true,
+ }, //查看图片
total: 0,
loading: false,
searchData: searchDataDefault(),
@@ -828,418 +1326,579 @@ export default {
trialCriterionList: [],
openImageUrl: null,
$viewer: null,
- imagesList: []
- }
+ imagesList: [],
+ };
},
mounted() {
- this.ResearchProgramNo = this.$route.query.researchProgramNo
- this.getSite()
- this.getVisitPlanOptions()
- this.getTrialCriterionList()
- this.getList()
+ this.ResearchProgramNo = this.$route.query.researchProgramNo;
+ this.getSite();
+ this.getVisitPlanOptions();
+ this.getTrialCriterionList();
+ this.getList();
},
methods: {
openImage(url) {
- console.log(url)
-
- this.$nextTick(()=>{
+ console.log(url);
+
+ this.$nextTick(() => {
if (url instanceof Array) {
- this.imagesList = url.map(v => this.OSSclientConfig.basePath + v)
+ this.imagesList = url.map((v) => this.OSSclientConfig.basePath + v);
} else {
- this.imagesList = [this.OSSclientConfig.basePath + url]
+ this.imagesList = [this.OSSclientConfig.basePath + url];
}
- if(this.$refs[url][0]) {
- this.$refs[url][0].$viewer.show()
+ if (this.$refs[url][0]) {
+ this.$refs[url][0].$viewer.show();
} else {
- this.$refs[url].$viewer.show()
+ this.$refs[url].$viewer.show();
}
- })
+ });
},
getTrialCriterionList() {
- getTrialCriterionList(this.trialId, false).then(res => {
- this.trialCriterionList = res.Result
- }).catch(() => {})
+ getTrialCriterionList(this.trialId, false)
+ .then((res) => {
+ this.trialCriterionList = res.Result;
+ })
+ .catch(() => {});
},
handleSortChange(column) {
- if (column.order === 'ascending') {
- this.searchData.Asc = true
+ if (column.order === "ascending") {
+ this.searchData.Asc = true;
} else {
- this.searchData.Asc = false
+ this.searchData.Asc = false;
}
- this.searchData.SortField = column.prop
- this.searchData.PageIndex = 1
- this.getList()
+ this.searchData.SortField = column.prop;
+ this.searchData.PageIndex = 1;
+ this.getList();
},
changeTimeList() {
if (this.timeList) {
- this.searchData.StartTime = this.timeList[0]
- this.searchData.EndTime = this.timeList[1]
+ this.searchData.StartTime = this.timeList[0];
+ this.searchData.EndTime = this.timeList[1];
} else {
- this.searchData.StartTime = null
- this.searchData.EndTime = null
+ this.searchData.StartTime = null;
+ this.searchData.EndTime = null;
}
-
},
getModuleTypeDescriptionList(v) {
- this.searchData.Description = null
- getModuleTypeDescriptionList( v ).then(res => {
- this.DescriptionOptions = res.Result
- })
+ this.searchData.Description = null;
+ getModuleTypeDescriptionList(v).then((res) => {
+ this.DescriptionOptions = res.Result;
+ });
},
// 获取site下拉框数据
getSite() {
- getTrialSiteSelect(this.trialId).then(res => {
- this.siteOptions = res.Result
- })
+ getTrialSiteSelect(this.trialId).then((res) => {
+ this.siteOptions = res.Result;
+ });
},
// 获取访视下拉框数据
getVisitPlanOptions() {
- getTrialVisitStageSelect(this.trialId)
- .then((res) => {
- this.visitPlanOptions = res.Result
- })
+ getTrialVisitStageSelect(this.trialId).then((res) => {
+ this.visitPlanOptions = res.Result;
+ });
},
toTree(arr, ParentId) {
function loop(ParentId) {
- const res = []
+ const res = [];
for (let i = 0; i < arr.length; i++) {
- const item = arr[i]
- item.hasChildren = false
+ const item = arr[i];
+ item.hasChildren = false;
if (item.ParentId !== ParentId) {
- continue
+ continue;
}
- item.Children = loop(item.Id)
- res.push(item)
+ item.Children = loop(item.Id);
+ res.push(item);
}
- return res
+ return res;
}
- return loop(ParentId)
+ return loop(ParentId);
},
formatting(config, obj, upObj, parentRow, row, auditData) {
- this.tableList = []
- this.tableListData = []
- this[auditData] = []
- config.forEach(v => {
- var item
- if (!v.IsEnable) return
+ this.tableList = [];
+ this.tableListData = [];
+ this[auditData] = [];
+ config.forEach((v) => {
+ var item;
+ if (!v.IsEnable) return;
if (v.IsShowByTrialConfig) {
- if (!parentRow[v.TrialConfigRelyFieldName]) return
+ if (!parentRow[v.TrialConfigRelyFieldName]) return;
}
if (v.IsTableFiled) {
if (obj[v.TableFiledName] && obj[v.TableFiledName].length > 0) {
obj[v.TableFiledName].forEach((o, i) => {
- let uo = upObj[v.TableFiledName][i]
- if (row.OptType === 'Add' || row.OptType === 'Init') {
+ let uo = upObj[v.TableFiledName][i];
+ if (row.OptType === "Add" || row.OptType === "Init") {
item = {
- newValue: o[v.Code] ? (o[v.Code] ? o[v.Code] : '--') : '--',
- oldValue: ''
- }
- } else if (row.OptType === 'Delete') {
+ newValue: o[v.Code] ? (o[v.Code] ? o[v.Code] : "--") : "--",
+ oldValue: "",
+ };
+ } else if (row.OptType === "Delete") {
item = {
- oldValue: o[v.Code] ? (o[v.Code] ? o[v.Code] : '--') : '--',
- newValue: '--'
- }
+ oldValue: o[v.Code] ? (o[v.Code] ? o[v.Code] : "--") : "--",
+ newValue: "--",
+ };
} else {
item = {
- newValue: o[v.Code] ? (o[v.Code] ? o[v.Code] : '--') : '--',
- oldValue: uo ? uo[v.Code] : '--'
- }
+ newValue: o[v.Code] ? (o[v.Code] ? o[v.Code] : "--") : "--",
+ oldValue: uo ? uo[v.Code] : "--",
+ };
}
- item.key = o ? ((o[v.Code] && o[v.Code] !== null && o[v.Code] !== '' || o[v.Code] !== 0) ? o[v.Code] : '--') : '--'
- item.Enum = v.ValueCN
- item.DataType = v.DataType
- item.IsTableFiled = v.IsTableFiled
- this[auditData].push(item)
- })
+ item.key = o
+ ? (o[v.Code] && o[v.Code] !== null && o[v.Code] !== "") ||
+ o[v.Code] !== 0
+ ? o[v.Code]
+ : "--"
+ : "--";
+ item.Enum = v.ValueCN;
+ item.DataType = v.DataType;
+ item.IsTableFiled = v.IsTableFiled;
+ this[auditData].push(item);
+ });
}
- return
+ return;
}
- if (v.DataType === 'ImageList') {
+ if (v.DataType === "ImageList") {
if (obj[v.Code] && obj[v.Code].length > 0) {
// obj[v.Code].forEach((o,i) => {
// var uo = upObj && upObj.length > 0 ? upObj[v.Code][i] : 0
- if (row.OptType === 'Add' || row.OptType === 'Init') {
+ if (row.OptType === "Add" || row.OptType === "Init") {
item = {
key: v.Code,
Enum: v.ValueCN,
- newValue: obj[v.Code] ? obj[v.Code] : '--',
- oldValue: ''
- }
- } else if (row.OptType === 'Delete') {
+ newValue: obj[v.Code] ? obj[v.Code] : "--",
+ oldValue: "",
+ };
+ } else if (row.OptType === "Delete") {
item = {
key: v.Code,
Enum: v.ValueCN,
- oldValue: obj[v.Code] ? obj[v.Code] : '--',
- newValue: '--'
- }
+ oldValue: obj[v.Code] ? obj[v.Code] : "--",
+ newValue: "--",
+ };
} else {
item = {
key: v.Code,
Enum: v.ValueCN,
- newValue: obj[v.Code] ? obj[v.Code] : '--',
- oldValue: upObj[v.Code] ? upObj[v.Code] : '--'
- }
+ newValue: obj[v.Code] ? obj[v.Code] : "--",
+ oldValue: upObj[v.Code] ? upObj[v.Code] : "--",
+ };
}
- item.DataType = v.DataType
- this[auditData].push(item)
- // })
+ item.DataType = v.DataType;
+ this[auditData].push(item);
+ // })
}
- return
+ return;
}
- if (v.DataType === 'Array' || v.DataType === 'array') {
+ if (v.DataType === "Array" || v.DataType === "array") {
if (obj[v.Code] && obj[v.Code].length > 0) {
obj[v.Code].forEach((o) => {
- var uo = upObj ? upObj[v.Code].find(u => u[v.ChildDataLabel] == o[v.ChildDataLabel]) : null
- if (row.OptType === 'Add' || row.OptType === 'Init') {
+ var uo = upObj
+ ? upObj[v.Code].find(
+ (u) => u[v.ChildDataLabel] == o[v.ChildDataLabel]
+ )
+ : null;
+ if (row.OptType === "Add" || row.OptType === "Init") {
item = {
key: o[v.ChildDataLabel],
Enum: o[v.ChildDataLabel],
- newValue: o[v.ChildDataValue] ? (o[v.ChildDataValue] ? o[v.ChildDataValue] : '--') : '--',
- oldValue: ''
- }
- } else if (row.OptType === 'Delete') {
+ newValue: o[v.ChildDataValue]
+ ? o[v.ChildDataValue]
+ ? o[v.ChildDataValue]
+ : "--"
+ : "--",
+ oldValue: "",
+ };
+ } else if (row.OptType === "Delete") {
item = {
key: o[v.ChildDataLabel],
Enum: o[v.ChildDataLabel],
- oldValue: o[v.ChildDataValue] ? (o[v.ChildDataValue] ? o[v.ChildDataValue] : '--') : '--',
- newValue: '--'
- }
+ oldValue: o[v.ChildDataValue]
+ ? o[v.ChildDataValue]
+ ? o[v.ChildDataValue]
+ : "--"
+ : "--",
+ newValue: "--",
+ };
} else {
item = {
key: o[v.ChildDataLabel],
Enum: o[v.ChildDataLabel],
- newValue: o[v.ChildDataValue] ? (o[v.ChildDataValue] ? o[v.ChildDataValue] : '--') : '--',
- oldValue: uo ? uo[v.ChildDataValue] : '--'
- }
+ newValue: o[v.ChildDataValue]
+ ? o[v.ChildDataValue]
+ ? o[v.ChildDataValue]
+ : "--"
+ : "--",
+ oldValue: uo ? uo[v.ChildDataValue] : "--",
+ };
}
- this[auditData].push(item)
- })
+ this[auditData].push(item);
+ });
}
- return
+ return;
}
- if (v.DataType === 'Router') {
+ if (v.DataType === "Router") {
item = {
- oldValue: v.UrlConfig.IsHaveParameters ? v.UrlConfig.RoutePath + '?' +
- v.UrlConfig.ParameterList.map((v) => {
- let a = obj[v.UrlParameterValueName] ? obj[v.UrlParameterValueName] : parentRow[v.UrlParameterValueName]
- if (v.UrlParameterValueName === 'token') {
- a = getToken()
- }
- return v.UrlParameterName + '=' + a + '&'
- }).toString().replaceAll(',', '') : v.UrlConfig.RoutePath,
- newValue: v.UrlConfig.IsHaveParameters ? v.UrlConfig.RoutePath + '?' +
- v.UrlConfig.ParameterList.map((v) => {
- let a = obj[v.UrlParameterValueName] ? obj[v.UrlParameterValueName] : parentRow[v.UrlParameterValueName]
- if (v.UrlParameterValueName === 'token') {
- a = getToken()
- }
- return v.UrlParameterName + '=' + a + '&'
- }).toString().replaceAll(',', '') : v.UrlConfig.RoutePath
- }
- console.log(item)
- item.IsTableFiled = v.IsTableFiled
- item.DataType = v.DataType
- item.key = v.Code
- item.Enum = v.ValueCN
- this[auditData].push(item)
- return
+ oldValue: v.UrlConfig.IsHaveParameters
+ ? v.UrlConfig.RoutePath +
+ "?" +
+ v.UrlConfig.ParameterList.map((v) => {
+ let a = obj[v.UrlParameterValueName]
+ ? obj[v.UrlParameterValueName]
+ : parentRow[v.UrlParameterValueName];
+ if (v.UrlParameterValueName === "token") {
+ a = getToken();
+ }
+ return v.UrlParameterName + "=" + a + "&";
+ })
+ .toString()
+ .replaceAll(",", "")
+ : v.UrlConfig.RoutePath,
+ newValue: v.UrlConfig.IsHaveParameters
+ ? v.UrlConfig.RoutePath +
+ "?" +
+ v.UrlConfig.ParameterList.map((v) => {
+ let a = obj[v.UrlParameterValueName]
+ ? obj[v.UrlParameterValueName]
+ : parentRow[v.UrlParameterValueName];
+ if (v.UrlParameterValueName === "token") {
+ a = getToken();
+ }
+ return v.UrlParameterName + "=" + a + "&";
+ })
+ .toString()
+ .replaceAll(",", "")
+ : v.UrlConfig.RoutePath,
+ };
+ console.log(item);
+ item.IsTableFiled = v.IsTableFiled;
+ item.DataType = v.DataType;
+ item.key = v.Code;
+ item.Enum = v.ValueCN;
+ this[auditData].push(item);
+ return;
}
- if (v.DataType === 'Table') {
- var head = []
- var body = []
+ if (v.DataType === "Table") {
+ var head = [];
+ var body = [];
v.TableConfigList.forEach((j, i) => {
if (j.IsFixedColumn) {
- head.push({IsPicture: j.IsPicture, headName: j.FixedColumnName, IsMerge: j.IsMerge, ColumnName: j.ColumnName, ColumnValue: j.ColumnValue, ListName: j.ListName, MergeColumnName: j.IsMerge ? j.MergeColumnName : null, ChildrenList: []})
+ head.push({
+ IsPicture: j.IsPicture,
+ headName: j.FixedColumnName,
+ IsMerge: j.IsMerge,
+ ColumnName: j.ColumnName,
+ ColumnValue: j.ColumnValue,
+ ListName: j.ListName,
+ MergeColumnName: j.IsMerge ? j.MergeColumnName : null,
+ ChildrenList: [],
+ });
} else {
if (j.ListName) {
obj[v.Code][0][j.ListName].forEach((x, o) => {
- head.push({IsPicture: j.IsPicture, headName: x[j.ColumnName], IsMerge: j.IsMerge, ColumnName: j.ColumnName, ColumnValue: j.ColumnValue, ListName: j.ListName, MergeColumnName: j.IsMerge ? j.MergeColumnName : null, ChildrenList: []})
- })
+ head.push({
+ IsPicture: j.IsPicture,
+ headName: x[j.ColumnName],
+ IsMerge: j.IsMerge,
+ ColumnName: j.ColumnName,
+ ColumnValue: j.ColumnValue,
+ ListName: j.ListName,
+ MergeColumnName: j.IsMerge ? j.MergeColumnName : null,
+ ChildrenList: [],
+ });
+ });
} else {
- head.push({IsPicture: j.IsPicture, headName: j.ColumnName, IsMerge: j.IsMerge, ColumnName: j.ColumnName, ColumnValue: j.ColumnValue, ListName: j.ListName, MergeColumnName: j.IsMerge ? j.MergeColumnName : null, ChildrenList: []})
+ head.push({
+ IsPicture: j.IsPicture,
+ headName: j.ColumnName,
+ IsMerge: j.IsMerge,
+ ColumnName: j.ColumnName,
+ ColumnValue: j.ColumnValue,
+ ListName: j.ListName,
+ MergeColumnName: j.IsMerge ? j.MergeColumnName : null,
+ ChildrenList: [],
+ });
}
}
- })
+ });
obj[v.Code].forEach((o, i) => {
- var b = {}
+ var b = {};
v.TableConfigList.forEach((j) => {
if (j.ListName) {
o[j.ListName].forEach((ite, i) => {
- b[j.ListName + j.ColumnValue + i] = ite[j.ColumnValue]
- })
+ b[j.ListName + j.ColumnValue + i] = ite[j.ColumnValue];
+ });
} else {
- b[j.ColumnValue] = o[j.ColumnValue]
+ b[j.ColumnValue] = o[j.ColumnValue];
}
- })
- body.push(Object.assign({}, b))
- })
- var newHead = []
- var h = JSON.parse(JSON.stringify(head))
- h.forEach(j => {
+ });
+ body.push(Object.assign({}, b));
+ });
+ var newHead = [];
+ var h = JSON.parse(JSON.stringify(head));
+ h.forEach((j) => {
if (j.IsMerge) {
- var hasChildren = h.filter(o => {
- return o.MergeColumnName === j.MergeColumnName
- })
- console.log(hasChildren)
+ var hasChildren = h.filter((o) => {
+ return o.MergeColumnName === j.MergeColumnName;
+ });
+ console.log(hasChildren);
if (!!hasChildren) {
- j.ChildrenList = Object.assign([], hasChildren)
- var has = newHead.find(v => {
- return v.MergeColumnName === j.MergeColumnName
- })
+ j.ChildrenList = Object.assign([], hasChildren);
+ var has = newHead.find((v) => {
+ return v.MergeColumnName === j.MergeColumnName;
+ });
if (!has) {
- newHead.push(j)
+ newHead.push(j);
}
} else {
}
} else {
- newHead.push(j)
+ newHead.push(j);
}
- })
- console.log(newHead, body)
- this.tableList = newHead
- this.tableListData = body
- return
+ });
+ console.log(newHead, body);
+ this.tableList = newHead;
+ this.tableListData = body;
+ return;
}
if (v.IsShowParent === 1) {
- if (row.OptType === 'Delete') {
+ if (row.OptType === "Delete") {
item = {
// oldValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--',
- oldValue: parentRow ? ((parentRow[v.Code] && parentRow[v.Code] !== null && parentRow[v.Code] !== '' || parentRow[v.Code] === 0) ? parentRow[v.Code] : '--') : '--',
- newValue: '--'
- }
- } else if (row.OptType === 'Add' || row.OptType === 'Init') {
+ oldValue: parentRow
+ ? (parentRow[v.Code] &&
+ parentRow[v.Code] !== null &&
+ parentRow[v.Code] !== "") ||
+ parentRow[v.Code] === 0
+ ? parentRow[v.Code]
+ : "--"
+ : "--",
+ newValue: "--",
+ };
+ } else if (row.OptType === "Add" || row.OptType === "Init") {
item = {
// newValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--',
- newValue: parentRow ? ((parentRow[v.Code] && parentRow[v.Code] !== null && parentRow[v.Code] !== '' || parentRow[v.Code] === 0) ? parentRow[v.Code] : '--') : '--',
- oldValue: '--'
- }
+ newValue: parentRow
+ ? (parentRow[v.Code] &&
+ parentRow[v.Code] !== null &&
+ parentRow[v.Code] !== "") ||
+ parentRow[v.Code] === 0
+ ? parentRow[v.Code]
+ : "--"
+ : "--",
+ oldValue: "--",
+ };
} else {
item = {
// newValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--',
- newValue: parentRow ? ((parentRow[v.Code] && parentRow[v.Code] !== null && parentRow[v.Code] !== '' || parentRow[v.Code] === 0) ? parentRow[v.Code] : '--') : '--',
- oldValue: parentRow ? ((parentRow[v.Code] && parentRow[v.Code] !== null && parentRow[v.Code] !== '' || parentRow[v.Code] === 0) ? parentRow[v.Code] : '--') : '--',
+ newValue: parentRow
+ ? (parentRow[v.Code] &&
+ parentRow[v.Code] !== null &&
+ parentRow[v.Code] !== "") ||
+ parentRow[v.Code] === 0
+ ? parentRow[v.Code]
+ : "--"
+ : "--",
+ oldValue: parentRow
+ ? (parentRow[v.Code] &&
+ parentRow[v.Code] !== null &&
+ parentRow[v.Code] !== "") ||
+ parentRow[v.Code] === 0
+ ? parentRow[v.Code]
+ : "--"
+ : "--",
// oldValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--'
- }
+ };
}
- console.log(item, '1')
+ console.log(item, "1");
} else if (v.IsShowParent === 0) {
- if (row.OptType === 'Delete') {
+ if (row.OptType === "Delete") {
item = {
- oldValue: obj ? ((obj[v.Code] && obj[v.Code] !== null && obj[v.Code] !== '' || obj[v.Code] === 0) ? obj[v.Code] : '--') : '--',
- newValue: '--'
- }
- } else if (row.OptType === 'Add' || row.OptType === 'Init') {
+ oldValue: obj
+ ? (obj[v.Code] && obj[v.Code] !== null && obj[v.Code] !== "") ||
+ obj[v.Code] === 0
+ ? obj[v.Code]
+ : "--"
+ : "--",
+ newValue: "--",
+ };
+ } else if (row.OptType === "Add" || row.OptType === "Init") {
item = {
- newValue: obj ? ((obj[v.Code] && obj[v.Code] !== null && obj[v.Code] !== '' || obj[v.Code] === 0) ? obj[v.Code] : '--') : '--',
- oldValue: '--'
- }
+ newValue: obj
+ ? (obj[v.Code] && obj[v.Code] !== null && obj[v.Code] !== "") ||
+ obj[v.Code] === 0
+ ? obj[v.Code]
+ : "--"
+ : "--",
+ oldValue: "--",
+ };
} else {
item = {
- newValue: obj ? ((obj[v.Code] && obj[v.Code] !== null && obj[v.Code] !== '' || obj[v.Code] === 0) ? obj[v.Code] : '--') : '--',
- oldValue: upObj ? ((upObj[v.Code] && upObj[v.Code] !== null && upObj[v.Code] !== '' || upObj[v.Code] === 0) ? upObj[v.Code] : '--') : '--'
- }
+ newValue: obj
+ ? (obj[v.Code] && obj[v.Code] !== null && obj[v.Code] !== "") ||
+ obj[v.Code] === 0
+ ? obj[v.Code]
+ : "--"
+ : "--",
+ oldValue: upObj
+ ? (upObj[v.Code] &&
+ upObj[v.Code] !== null &&
+ upObj[v.Code] !== "") ||
+ upObj[v.Code] === 0
+ ? upObj[v.Code]
+ : "--"
+ : "--",
+ };
}
} else {
- if (row.OptType === 'Delete') {
+ if (row.OptType === "Delete") {
item = {
- oldValue: row ? ((row[v.Code] && row[v.Code] !== null && row[v.Code] !== '' || row[v.Code] === 0) ? row[v.Code] : '--') : '--',
- newValue: '--'
- }
- } else if (row.OptType === 'Add' || row.OptType === 'Init') {
+ oldValue: row
+ ? (row[v.Code] && row[v.Code] !== null && row[v.Code] !== "") ||
+ row[v.Code] === 0
+ ? row[v.Code]
+ : "--"
+ : "--",
+ newValue: "--",
+ };
+ } else if (row.OptType === "Add" || row.OptType === "Init") {
item = {
- newValue: row ? ((row[v.Code] && row[v.Code] !== null && row[v.Code] !== '' || row[v.Code] === 0) ? row[v.Code] : '--') : '--',
- oldValue: '--'
- }
+ newValue: row
+ ? (row[v.Code] && row[v.Code] !== null && row[v.Code] !== "") ||
+ row[v.Code] === 0
+ ? row[v.Code]
+ : "--"
+ : "--",
+ oldValue: "--",
+ };
} else {
item = {
- newValue: row ? ((row[v.Code] && row[v.Code] !== null && row[v.Code] !== '' || row[v.Code] === 0) ? row[v.Code] : '--') : '--',
- oldValue: row ? ((row[v.Code] && row[v.Code] !== null && row[v.Code] !== '' || row[v.Code] === 0) ? row[v.Code] : '--') : '--'
- }
+ newValue: row
+ ? (row[v.Code] && row[v.Code] !== null && row[v.Code] !== "") ||
+ row[v.Code] === 0
+ ? row[v.Code]
+ : "--"
+ : "--",
+ oldValue: row
+ ? (row[v.Code] && row[v.Code] !== null && row[v.Code] !== "") ||
+ row[v.Code] === 0
+ ? row[v.Code]
+ : "--"
+ : "--",
+ };
}
}
- item.DataType = v.DataType
- item.key = v.Code
- item.Enum = this.$i18n.locale === 'zh' ? v.ValueCN : v.Value
- this[auditData].push(item)
- })
- console.log(this[auditData],this.tableListData,this.tableList)
+ item.DataType = v.DataType;
+ item.key = v.Code;
+ item.Enum = this.$i18n.locale === "zh" ? v.ValueCN : v.Value;
+ this[auditData].push(item);
+ });
+ console.log(this[auditData], this.tableListData, this.tableList);
},
getJSON(row) {
- return new Promise(resolve => {
- getInspectionJsonDataList(this.trialId, row.Id).then(res => {
- resolve(res.Result)
- })
- })
+ return new Promise((resolve) => {
+ getInspectionJsonDataList(this.trialId, row.Id).then((res) => {
+ resolve(res.Result);
+ });
+ });
},
lookAssociated(n) {
- var searchData = Object.assign({}, {
- SortField: '',
- Asc: true,
- PageIndex: 1,
- PageSize: 20,
- TrialId: this.$route.query.trialId,
- BatchId: !n ? this.currentRow.BatchId : null,
- ObjectRelationParentId: n ? this.currentRow.ObjectRelationParentId : null,
- RelationDeadlineTime: n ? this.currentRow.CreateTime : null,
- GeneralId: n ? this.currentRow.GeneralId : null
- })
+ var searchData = Object.assign(
+ {},
+ {
+ SortField: "",
+ Asc: true,
+ PageIndex: 1,
+ PageSize: 20,
+ TrialId: this.$route.query.trialId,
+ BatchId: !n ? this.currentRow.BatchId : null,
+ ObjectRelationParentId: n
+ ? this.currentRow.ObjectRelationParentId
+ : null,
+ RelationDeadlineTime: n ? this.currentRow.CreateTime : null,
+ GeneralId: n ? this.currentRow.GeneralId : null,
+ }
+ );
// 查看关联操作
- this.model_cfg2.title = `${this.$t('trials:auditRecord:title:viewRelationOperations')}--${this.$i18n.locale === 'en' ? this.currentRow.Description : this.currentRow.DescriptionCN}`
- this.loading = true
- getInspectionList(searchData).then((res) => {
- this.list2 = res.CurrentPageData
- this.model_cfg2.visible = true
- this.loading = false
- }).catch(() => {
- this.loading = false
- })
+ this.model_cfg2.title = `${this.$t(
+ "trials:auditRecord:title:viewRelationOperations"
+ )}--${
+ this.$i18n.locale === "en"
+ ? this.currentRow.Description
+ : this.currentRow.DescriptionCN
+ }`;
+ this.loading = true;
+ getInspectionList(searchData)
+ .then((res) => {
+ this.list2 = res.CurrentPageData;
+ this.model_cfg2.visible = true;
+ this.loading = false;
+ })
+ .catch(() => {
+ this.loading = false;
+ });
},
async lookDetails2(row) {
- var Json = await this.getJSON(row)
- var JsonDetail = Json[0] ? JSON.parse(Json[0]) : null
- var ParentJson = Json[1] ? JSON.parse(Json[1]) : null
- getAuditConfigChildList(row.FrontAuditConfigId).then(res => {
- console.log(res)
- var configList2 = res.Result
- this.formatting(configList2, JsonDetail.Data, ParentJson ? ParentJson.Data : null, JsonDetail.CommonData, row, 'auditData2')
- this.otherData2 = []
+ var Json = await this.getJSON(row);
+ var JsonDetail = Json[0] ? JSON.parse(Json[0]) : null;
+ var ParentJson = Json[1] ? JSON.parse(Json[1]) : null;
+ getAuditConfigChildList(row.FrontAuditConfigId).then((res) => {
+ console.log(res);
+ var configList2 = res.Result;
+ this.formatting(
+ configList2,
+ JsonDetail.Data,
+ ParentJson ? ParentJson.Data : null,
+ JsonDetail.CommonData,
+ row,
+ "auditData2"
+ );
+ this.otherData2 = [];
if (row.IsSign) {
// 签名信息
this.otherData2.push({
- Enum: this.$t('trials:auditRecord:title:signInfo2'),
- Value: row.SignText
- })
+ Enum: this.$t("trials:auditRecord:title:signInfo2"),
+ Value: row.SignText,
+ });
}
- this.model_cfg3.title = this.$i18n.locale === 'en' ? row.Description : row.DescriptionCN
- this.model_cfg3.visible = true
- })
+ this.model_cfg3.title =
+ this.$i18n.locale === "en" ? row.Description : row.DescriptionCN;
+ this.model_cfg3.visible = true;
+ });
},
async lookDetails(row) {
- this.currentRow = {...row}
- this.OptType = row.OptType
- var Json = await this.getJSON(row)
- var JsonDetail = Json[0] ? JSON.parse(Json[0]) : null
- var ParentJson = Json[1] ? JSON.parse(Json[1]) : null
- getAuditConfigChildList(row.FrontAuditConfigId).then(res => {
- console.log(res)
- var configList = res.Result
- this.formatting(configList, JsonDetail.Data, ParentJson ? ParentJson.Data : null, JsonDetail.CommonData, row, 'auditData')
- this.otherData = []
+ this.currentRow = { ...row };
+ this.OptType = row.OptType;
+ var Json = await this.getJSON(row);
+ var JsonDetail = Json[0] ? JSON.parse(Json[0]) : null;
+ var ParentJson = Json[1] ? JSON.parse(Json[1]) : null;
+ getAuditConfigChildList(row.FrontAuditConfigId).then((res) => {
+ console.log(res);
+ var configList = res.Result;
+ this.formatting(
+ configList,
+ JsonDetail.Data,
+ ParentJson ? ParentJson.Data : null,
+ JsonDetail.CommonData,
+ row,
+ "auditData"
+ );
+ this.otherData = [];
if (row.IsSign) {
- console.log(row.SignText)
+ console.log(row.SignText);
this.otherData.push({
- Enum: this.$t('trials:auditRecord:title:signInfo2'),//'签名信息'
- Value: row.SignText
- })
+ Enum: this.$t("trials:auditRecord:title:signInfo2"), //'签名信息'
+ Value: row.SignText,
+ });
}
- this.model_cfg.title = this.$i18n.locale === 'en' ? row.Description : row.DescriptionCN
- this.model_cfg.visible = true
- })
+ this.model_cfg.title =
+ this.$i18n.locale === "en" ? row.Description : row.DescriptionCN;
+ this.model_cfg.visible = true;
+ });
},
handleReset() {
this.searchData = Object.assign(this.searchData, {
- SortField: '',
+ SortField: "",
Asc: false,
PageIndex: 1,
PageSize: 20,
@@ -1260,32 +1919,34 @@ export default {
Description: null,
OpByUserName: null,
BatchId: null,
- RoleName: null
- })
- this.timeList = []
- this.getList()
+ RoleName: null,
+ });
+ this.timeList = [];
+ this.getList();
},
handleSearch() {
- this.searchData.PageIndex = 1
- this.getList()
+ this.searchData.PageIndex = 1;
+ this.getList();
},
getList() {
- this.loading = true
- getInspectionList(this.searchData).then((res) => {
- this.list = res.CurrentPageData
- // this.list = this.list.map(v => {
- // v.OptType = v.OptTypeName
- // return v
- // })
- this.total = res.TotalCount
- this.model_cfg.visible = false
- this.loading = false
- this.searchData.BatchId = null
- }).catch(() => {
- this.loading = false
- })
- }
- }
-}
+ this.loading = true;
+ getInspectionList(this.searchData)
+ .then((res) => {
+ this.list = res.CurrentPageData;
+ // this.list = this.list.map(v => {
+ // v.OptType = v.OptTypeName
+ // return v
+ // })
+ this.total = res.TotalCount;
+ this.model_cfg.visible = false;
+ this.loading = false;
+ this.searchData.BatchId = null;
+ })
+ .catch(() => {
+ this.loading = false;
+ });
+ },
+ },
+};
diff --git a/src/views/trials/trials-panel/trial-summary/trial-information/index.vue b/src/views/trials/trials-panel/trial-summary/trial-information/index.vue
index 5d1a3e0..c86f9e7 100644
--- a/src/views/trials/trials-panel/trial-summary/trial-information/index.vue
+++ b/src/views/trials/trials-panel/trial-summary/trial-information/index.vue
@@ -116,13 +116,13 @@
- {{ trialInfo.AuthorizationDate }}
+ {{ otherInfo.ActiveTime }}
- {{ trialInfo.AuthorizationDate }}
+ {{ otherInfo.AuthorizationDeadLineDate }}
Date: Thu, 25 Apr 2024 14:23:42 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main.js | 7 +-
src/permission.js | 12 +++-
src/views/recompose/index.vue | 2 +-
.../system/dicomAE/components/edit-dicom.vue | 1 +
src/views/system/dicomAE/index.vue | 3 +-
src/views/system/user/components/UserInfo.vue | 13 +++-
.../components/confirm-visit-list.vue | 1 +
.../components/view-study-list.vue | 4 +-
.../trials-list/components/TrialForm.vue | 4 +-
src/views/trials/trials-myinfo/account.vue | 2 +-
.../hirVisit/components/current-study.vue | 2 +
.../hirVisit/components/edit-study-list.vue | 2 +
.../hirVisit/components/studyInfo.vue | 2 +
.../components/staffExternalAdd.vue | 69 ++++++++++++++++---
.../personnel-manage/components/staffForm.vue | 20 +++---
.../trials-panel/study/components/list.vue | 41 +----------
.../trial-summary/audit-record/index.vue | 8 +++
17 files changed, 116 insertions(+), 77 deletions(-)
diff --git a/src/main.js b/src/main.js
index 7f9011b..b16b28d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -2,12 +2,10 @@
import Vue from 'vue'
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 'element-ui/lib/theme-chalk/index.css'
import './assets/css/theme-blue/index.css' // 浅绿色主题
import './assets/css/iconfont/index.css' // 阿里巴巴图标库
-// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import i18n from './lang'
import '@/styles/index.scss' // global css
@@ -23,10 +21,7 @@ import '@/permission' // permission control
import md5 from 'js-md5'
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
-// import htmlToPdf from './utils/htmlToPdf'
-// Vue.use(htmlToPdf)
import permission from './utils/permission'
-import { OSSclient } from './utils/oss'
Vue.use(permission)
import Viewer from 'v-viewer'
diff --git a/src/permission.js b/src/permission.js
index ebfd678..e68f7d2 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -10,10 +10,18 @@ import { OSSclient } from './utils/oss'
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) => {
NProgress.start()
+ Vue.prototype.$setOpenWindow();
// 设置页面标题
// document.title = getPageTitle(to.meta.title)
diff --git a/src/views/recompose/index.vue b/src/views/recompose/index.vue
index 6b04452..2a07c5e 100644
--- a/src/views/recompose/index.vue
+++ b/src/views/recompose/index.vue
@@ -68,7 +68,7 @@
diff --git a/src/views/system/dicomAE/components/edit-dicom.vue b/src/views/system/dicomAE/components/edit-dicom.vue
index be1f931..1eebc8d 100644
--- a/src/views/system/dicomAE/components/edit-dicom.vue
+++ b/src/views/system/dicomAE/components/edit-dicom.vue
@@ -6,6 +6,7 @@
width="500px"
custom-class="base-dialog-wrapper"
append-to-body
+ :before-close="handleCancel"
>
@@ -212,7 +211,9 @@ export default {
},
// 测试连通性
async test(item) {
+ this.loading = true;
let res = await testConnect(item.Id);
+ this.loading = false;
if (res.IsSuccess && res.Result) {
this.$message.success(this.$t("system:dicomAE:connect:success"));
} else {
diff --git a/src/views/system/user/components/UserInfo.vue b/src/views/system/user/components/UserInfo.vue
index 7e188fc..aaa71d3 100644
--- a/src/views/system/user/components/UserInfo.vue
+++ b/src/views/system/user/components/UserInfo.vue
@@ -76,13 +76,12 @@
ref="userType"
v-model="user.UserTypeId"
size="small"
- placeholder="Please select"
+ placeholder=""
style="width: 100%"
:disabled="user.CanEditUserType === false"
>
{
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);
}
});
},
diff --git a/src/views/trials/trials-inspection/components/confirm-visit-list.vue b/src/views/trials/trials-inspection/components/confirm-visit-list.vue
index 80e127e..201edb4 100644
--- a/src/views/trials/trials-inspection/components/confirm-visit-list.vue
+++ b/src/views/trials/trials-inspection/components/confirm-visit-list.vue
@@ -456,6 +456,7 @@ export default {
});
var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow);
+ this.$setOpenWindow(newWindow);
},
// 确认提交
async confirmSubmit() {
diff --git a/src/views/trials/trials-inspection/components/view-study-list.vue b/src/views/trials/trials-inspection/components/view-study-list.vue
index e5c0a27..0e68253 100644
--- a/src/views/trials/trials-inspection/components/view-study-list.vue
+++ b/src/views/trials/trials-inspection/components/view-study-list.vue
@@ -207,6 +207,7 @@ export default {
methods: {
// 关闭弹框
beforeCloseStudyDig() {
+ this.$setOpenWindow();
this.$emit("update:visible", false);
},
// 获取列表
@@ -256,7 +257,8 @@ export default {
const routeData = this.$router.resolve({
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() {},
diff --git a/src/views/trials/trials-list/components/TrialForm.vue b/src/views/trials/trials-list/components/TrialForm.vue
index e52c5af..e0cb1ca 100644
--- a/src/views/trials/trials-list/components/TrialForm.vue
+++ b/src/views/trials/trials-list/components/TrialForm.vue
@@ -110,7 +110,7 @@
v-model="trialForm.CriterionTypeList"
multiple
clearable
- :disabled="trialForm.Id !== ''"
+ :disabled="TrialStatusStr === 'Ongoing'"
>
{
diff --git a/src/views/trials/trials-myinfo/account.vue b/src/views/trials/trials-myinfo/account.vue
index 478e0e1..40720e7 100644
--- a/src/views/trials/trials-myinfo/account.vue
+++ b/src/views/trials/trials-myinfo/account.vue
@@ -42,7 +42,7 @@
diff --git a/src/views/trials/trials-panel/hirVisit/components/current-study.vue b/src/views/trials/trials-panel/hirVisit/components/current-study.vue
index b323bee..df284ec 100644
--- a/src/views/trials/trials-panel/hirVisit/components/current-study.vue
+++ b/src/views/trials/trials-panel/hirVisit/components/current-study.vue
@@ -150,6 +150,7 @@ export default {
});
var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow);
+ this.$setOpenWindow(newWindow);
},
// 预览影像
handleViewStudy(row) {
@@ -159,6 +160,7 @@ export default {
});
var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow);
+ this.$setOpenWindow(newWindow);
},
},
};
diff --git a/src/views/trials/trials-panel/hirVisit/components/edit-study-list.vue b/src/views/trials/trials-panel/hirVisit/components/edit-study-list.vue
index 2d0a389..b90a29f 100644
--- a/src/views/trials/trials-panel/hirVisit/components/edit-study-list.vue
+++ b/src/views/trials/trials-panel/hirVisit/components/edit-study-list.vue
@@ -376,6 +376,7 @@ export default {
},
// 关闭弹框
beforeCloseStudyDig() {
+ this.$setOpenWindow();
this.$emit("update:visible", false);
},
// 预览
@@ -390,6 +391,7 @@ export default {
});
var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow);
+ this.$setOpenWindow(newWindow);
},
// 当前检查移除
remove(item) {
diff --git a/src/views/trials/trials-panel/hirVisit/components/studyInfo.vue b/src/views/trials/trials-panel/hirVisit/components/studyInfo.vue
index fb6c438..4934fef 100644
--- a/src/views/trials/trials-panel/hirVisit/components/studyInfo.vue
+++ b/src/views/trials/trials-panel/hirVisit/components/studyInfo.vue
@@ -184,6 +184,7 @@ export default {
});
var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow);
+ this.$setOpenWindow(newWindow);
},
// 预览影像
handleViewStudy(row) {
@@ -193,6 +194,7 @@ export default {
});
var newWindow = window.open(routeData.href, "_blank");
this.$emit("setOpenWindow", newWindow);
+ this.$setOpenWindow(newWindow);
},
getBodyPart(bodyPart) {
if (!bodyPart) return "";
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 e88dd1e..1fc1472 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
@@ -91,19 +91,25 @@