稽查的关联记录页面,需要增加排序和分页
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
285f864036
commit
8b70d38cfe
|
@ -345,20 +345,21 @@
|
|||
<!-- 新增/编辑项目 -->
|
||||
<el-dialog v-if="model_cfg2.visible" :visible.sync="model_cfg2.visible" :title="model_cfg2.title"
|
||||
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
|
||||
<el-table v-adaptive="{ bottomOffset: 20 }" v-loading="loading" :data="list2" stripe height="100">
|
||||
<el-table v-adaptive="{ bottomOffset: 60 }" v-loading="loading" :data="list2" stripe height="100"
|
||||
@sort-change="handleSortChange2">
|
||||
<el-table-column type="index" width="40" align="left" />
|
||||
<!-- 研究方案号 -->
|
||||
<el-table-column prop="ResearchProgramNo" min-width="90" :label="$t('trials:auditRecord:table:researchNo')"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="ResearchProgramNo" min-width="120" :label="$t('trials:auditRecord:table:researchNo')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 中心编号 -->
|
||||
<el-table-column prop="SiteCode" min-width="100" :label="$t('trials:auditRecord:table:siteNo')"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 受试者 -->
|
||||
<el-table-column prop="SubjectCode" min-width="100" :label="$t('trials:auditRecord:table:subject')"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 访视 -->
|
||||
<el-table-column prop="VisitName" min-width="100" :label="$t('trials:auditRecord:table:visit')"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 任务名称 -->
|
||||
<el-table-column prop="TaskName" min-width="100" :label="$t('trials:auditRecord:table:taskName')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
|
@ -379,17 +380,17 @@
|
|||
/> -->
|
||||
<!-- 阅片标准 -->
|
||||
<el-table-column prop="TrialReadingCriterionName" min-width="100"
|
||||
:label="$t('trials:auditRecord:table:criterion')" show-overflow-tooltip />
|
||||
:label="$t('trials:auditRecord:table:criterion')" show-overflow-tooltip sortable="custom" />
|
||||
<!-- 功能模块 -->
|
||||
<el-table-column prop="ModuleTypeName" min-width="100" :label="$t('trials:auditRecord:table:funcModule')"
|
||||
show-overflow-tooltip>
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $i18n.locale === 'zh' ? scope.row.ModuleTypeNameCN : scope.row.ModuleTypeName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 操作名 -->
|
||||
<el-table-column prop="Description" min-width="140" :label="$t('trials:auditRecord:table:operationName')"
|
||||
show-overflow-tooltip>
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $i18n.locale === 'zh' ? scope.row.DescriptionCN : scope.row.Description }}
|
||||
</template>
|
||||
|
@ -398,8 +399,8 @@
|
|||
<el-table-column prop="Reason" min-width="100" :label="$t('trials:auditRecord:table:modifyReason')"
|
||||
show-overflow-tooltip />
|
||||
<!-- 是否电签 -->
|
||||
<el-table-column prop="IsSign" min-width="90" align="center" :label="$t('trials:auditRecord:table:isSign')"
|
||||
show-overflow-tooltip>
|
||||
<el-table-column prop="IsSign" min-width="120" align="center" :label="$t('trials:auditRecord:table:isSign')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-tooltip v-if="scope.row.IsSign" class="item" effect="dark" placement="top">
|
||||
|
@ -422,17 +423,17 @@
|
|||
</template> -->
|
||||
</el-table-column>
|
||||
<!-- 用户名 -->
|
||||
<el-table-column prop="CreateUserName" min-width="80" :label="$t('trials:auditRecord:table:userName')"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="CreateUserName" min-width="100" :label="$t('trials:auditRecord:table:userName')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 角色 -->
|
||||
<el-table-column prop="RoleName" min-width="70" :label="$t('trials:auditRecord:table:role')"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="RoleName" min-width="100" :label="$t('trials:auditRecord:table:role')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<!-- 操作时间 -->
|
||||
<el-table-column prop="CreateTime" min-width="140" :label="$t('trials:auditRecord:table:operateTime')"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="IP" min-width="100" label="IP" show-overflow-tooltip />
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="IP" min-width="100" label="IP" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="" min-width="150" :label="$t('common:action:action')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- 详情 -->
|
||||
<el-button type="text" @click="lookDetails2(scope.row)">
|
||||
|
@ -441,6 +442,9 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" style="text-align: right;" :total="list2_total" :page.sync="list2_searchData.PageIndex"
|
||||
:limit.sync="list2_searchData.PageSize" @pagination="getList2" />
|
||||
</el-dialog>
|
||||
<base-model :config="model_cfg3">
|
||||
<template slot="dialog-body">
|
||||
|
@ -693,7 +697,9 @@ export default {
|
|||
openImageUrl: null,
|
||||
$viewer: null,
|
||||
imagesList: [],
|
||||
moduleTypeList: []
|
||||
moduleTypeList: [],
|
||||
list2_total: 0,
|
||||
list2_searchData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -739,6 +745,16 @@ export default {
|
|||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleSortChange2(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.list2_searchData.Asc = true
|
||||
} else {
|
||||
this.list2_searchData.Asc = false
|
||||
}
|
||||
this.list2_searchData.SortField = column.prop
|
||||
this.list2_searchData.PageIndex = 1
|
||||
this.getList2()
|
||||
},
|
||||
changeTimeList() {
|
||||
if (this.timeList) {
|
||||
this.searchData.StartTime = this.timeList[0]
|
||||
|
@ -850,22 +866,22 @@ export default {
|
|||
item = {
|
||||
key: v.Code,
|
||||
Enum: this.$i18n.locale === 'zh' ? v.ValueCN : v.Value,
|
||||
newValue: parseInt(obj[v.Code] ) >= 0 ? this.$FormatSize(obj[v.Code]) : '--',
|
||||
newValue: parseInt(obj[v.Code]) >= 0 ? this.$FormatSize(obj[v.Code]) : '--',
|
||||
oldValue: ''
|
||||
}
|
||||
} else if (row.OptType === 'Delete') {
|
||||
item = {
|
||||
key: v.Code,
|
||||
Enum: this.$i18n.locale === 'zh' ? v.ValueCN : v.Value,
|
||||
oldValue: parseInt(obj[v.Code] ) >= 0 ? this.$FormatSize(obj[v.Code]) : '--',
|
||||
oldValue: parseInt(obj[v.Code]) >= 0 ? this.$FormatSize(obj[v.Code]) : '--',
|
||||
newValue: '--'
|
||||
}
|
||||
} else {
|
||||
item = {
|
||||
key: v.Code,
|
||||
Enum: this.$i18n.locale === 'zh' ? v.ValueCN : v.Value,
|
||||
newValue: parseInt(obj[v.Code] ) >= 0 ? this.$FormatSize(obj[v.Code]) : '--',
|
||||
oldValue: parseInt(upObj[v.Code] ) >= 0 ? this.$FormatSize(upObj[v.Code]) : '--',
|
||||
newValue: parseInt(obj[v.Code]) >= 0 ? this.$FormatSize(obj[v.Code]) : '--',
|
||||
oldValue: parseInt(upObj[v.Code]) >= 0 ? this.$FormatSize(upObj[v.Code]) : '--',
|
||||
}
|
||||
}
|
||||
item.DataType = v.DataType
|
||||
|
@ -874,7 +890,7 @@ export default {
|
|||
return
|
||||
}
|
||||
if (v.DataType === 'ImageList') {
|
||||
// if (obj[v.Code] && obj[v.Code].length > 0) {
|
||||
// if (obj[v.Code] && obj[v.Code].length > 0) {
|
||||
|
||||
if (obj[v.Code]) {
|
||||
obj[v.Code] = obj[v.Code].filter(s => s && s.trim())
|
||||
|
@ -952,10 +968,10 @@ export default {
|
|||
// }
|
||||
// return v.UrlParameterName + '=' + a + '&'
|
||||
// }).toString().replaceAll(',', '')+'&'+'lang='+this.$i18n.locale +'&'+ 'zh='+this.$i18n.locale : v.UrlConfig.RoutePath,
|
||||
|
||||
|
||||
// 后端已确定旧数据不会有跳转 25/06/13
|
||||
oldValue: '--',
|
||||
newValue: v.UrlConfig.IsHaveParameters ? 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') {
|
||||
|
@ -1111,12 +1127,13 @@ export default {
|
|||
RelationDeadlineTime: n ? this.currentRow.CreateTime : null,
|
||||
GeneralId: n ? this.currentRow.GeneralId : null
|
||||
})
|
||||
this.list2_searchData = Object.assign({}, searchData)
|
||||
// 查看关联操作
|
||||
|
||||
this.model_cfg2.title = `${n ? this.$t('trials:auditRecord:title:viewRelationOperations2') : this.$t('trials:auditRecord:title:viewRelationOperations')}--${this.$i18n.locale === 'en' ? this.currentRow.Description : this.currentRow.DescriptionCN}`
|
||||
this.model_cfg2.title += ` ( ${this.currentRow.CreateUserRealName} ${this.currentRow.CreateTime} )`
|
||||
this.loading = true
|
||||
getInspectionList(searchData).then((res) => {
|
||||
getInspectionList(this.list2_searchData).then((res) => {
|
||||
this.list2 = res.CurrentPageData
|
||||
this.model_cfg2.visible = true
|
||||
this.loading = false
|
||||
|
@ -1124,6 +1141,20 @@ export default {
|
|||
this.loading = false
|
||||
})
|
||||
},
|
||||
getList2() {
|
||||
this.loading = true
|
||||
getInspectionList(this.list2_searchData).then((res) => {
|
||||
this.list2 = res.CurrentPageData
|
||||
// this.list = this.list.map(v => {
|
||||
// v.OptType = v.OptTypeName
|
||||
// return v
|
||||
// })
|
||||
this.list2_total = res.TotalCount
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async lookDetails2(row) {
|
||||
this.OptType2 = row.OptType
|
||||
var Json = await this.getJSON(row)
|
||||
|
|
Loading…
Reference in New Issue