- {{$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 }}