1076 lines
		
	
	
		
			38 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			1076 lines
		
	
	
		
			38 KiB
		
	
	
	
		
			Plaintext
		
	
	
| /* eslint-disable */
 | |
| <template>
 | |
|   <BaseContainer class="auditRecord">
 | |
|     <template slot="search-container">
 | |
|       <el-form :inline="true">
 | |
|         <div style="margin-bottom: 15px;">
 | |
|           <el-form-item label="研究方案号:">
 | |
|             <el-input v-model="ResearchProgramNo" disabled />
 | |
|           </el-form-item>
 | |
|           <el-form-item label="中心:">
 | |
|             <el-select v-model="searchData.SiteId" clearable filterable>
 | |
|               <el-option
 | |
|                 v-for="(item,index) of siteOptions"
 | |
|                 :key="index"
 | |
|                 :label="item.TrialSiteCode"
 | |
|                 :value="item.SiteId"
 | |
|               />
 | |
|             </el-select>
 | |
|           </el-form-item>
 | |
|           <el-form-item label="受试者:">
 | |
|             <el-input v-model="searchData.SubjectInfo" placeholder="受试者" />
 | |
|           </el-form-item>
 | |
|           <el-form-item label="访视:">
 | |
|             <el-select
 | |
|               v-model="searchData.VisitPlanInfo"
 | |
|               clearable
 | |
|               filterable
 | |
|             >
 | |
|               <el-option
 | |
|                 v-for="(item, index) of visitPlanOptions"
 | |
|                 :key="index"
 | |
|                 :label="item.VisitName"
 | |
|                 :value="item.VisitNum"
 | |
|               />
 | |
|               <el-option
 | |
|                 key="Other"
 | |
|                 label="OutPlan"
 | |
|                 value="1.11"
 | |
|               />
 | |
|             </el-select>
 | |
|           </el-form-item>
 | |
|           <el-form-item label="阅片标准:">
 | |
|             <el-select v-model="searchData.TrialReadingCriterionId" clearable filterable>
 | |
|               <el-option
 | |
|                 v-for="(item,index) of trialCriterionList"
 | |
|                 :key="index"
 | |
|                 :label="item.TrialReadingCriterionName"
 | |
|                 :value="item.TrialReadingCriterionId"
 | |
|               />
 | |
|             </el-select>
 | |
|           </el-form-item>
 | |
|         </div>
 | |
|         <div>
 | |
|           <el-form-item label="功能模块: ">
 | |
|             <el-select v-model="searchData.ModuleType" style="width:120px" placeholder="功能模块" clearable @change="getModuleTypeDescriptionList">
 | |
|               <el-option v-for="item of dict.type.ModuleType" :value="item.value" :label="item.raw.ValueCN" />
 | |
|             </el-select>
 | |
|           </el-form-item>
 | |
|           <el-form-item label="操作名: ">
 | |
|             <el-select v-model="searchData.Description" style="width:120px" placeholder="操作" clearable>
 | |
|               <el-option v-for="item of DescriptionOptions" :value="item" :label="item" />
 | |
|             </el-select>
 | |
|           </el-form-item>
 | |
|           <el-form-item label="操作人:">
 | |
|             <el-input v-model="searchData.OpByUserName" placeholder="操作人" style="width:120px" />
 | |
|           </el-form-item>
 | |
|           <el-form-item label="操作时间:">
 | |
|             <el-date-picker
 | |
|               v-model="timeList"
 | |
|               @change="changeTimeList"
 | |
|               value-format="yyyy-MM-dd HH:mm:ss"
 | |
|               type="datetimerange"
 | |
|               range-separator="至"
 | |
|               start-placeholder="开始日期"
 | |
|               end-placeholder="结束日期">
 | |
|             </el-date-picker>
 | |
|           </el-form-item>
 | |
|           <!--<el-form-item label="阅片人: ">-->
 | |
|           <!--<el-select v-model="searchData.ModuleType" placeholder="模块" clearable>-->
 | |
|           <!--<el-option v-for="item of dict.type.ModuleType" :value="item.label" :label="item.raw.ValueCN"></el-option>-->
 | |
|           <!--</el-select>-->
 | |
|           <!--</el-form-item>-->
 | |
|           <el-form-item label="是否签名: ">
 | |
|             <el-select v-model="searchData.IsSign" style="width:120px" placeholder="是否签名" clearable>
 | |
|               <el-option v-for="item of $d.YesOrNo" v-if="item.raw.ValueCN !== '无'" :label="item.label" :value="item.value" />
 | |
|             </el-select>
 | |
|           </el-form-item>
 | |
|           <el-form-item>
 | |
|             <el-button type="primary" icon="el-icon-search" @click="handleSearch"> {{ $t('common:button:search') }}</el-button>
 | |
|             <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset"> {{ $t('common:button:reset') }}</el-button>
 | |
|           </el-form-item>
 | |
|         </div>
 | |
| 
 | |
|       </el-form>
 | |
|     </template>
 | |
|     <template slot="main-container">
 | |
|       <el-table
 | |
|         v-adaptive="{bottomOffset:60}"
 | |
|         v-loading="loading"
 | |
|         :data="list"
 | |
|         @sort-change="handleSortChange"
 | |
|         stripe
 | |
|         height="100"
 | |
|       >
 | |
|         <el-table-column type="index" width="40" fixed="left" align="left" />
 | |
|         <el-table-column
 | |
|           prop="ResearchProgramNo"
 | |
|           min-width="140"
 | |
|           label="研究方案号"
 | |
|           fixed="left"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="SiteCode"
 | |
|           min-width="100"
 | |
|           label="中心编号"
 | |
|           fixed="left"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="SubjectCode"
 | |
|           min-width="100"
 | |
|           label="受试者"
 | |
|           fixed="left"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="VisitName"
 | |
|           min-width="100"
 | |
|           label="访视"
 | |
|           fixed="left"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|             prop="TaskName"
 | |
|             min-width="100"
 | |
|             label="任务名称"
 | |
|             fixed="left"
 | |
|             show-overflow-tooltip
 | |
|             sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="BlindName"
 | |
|           min-width="150"
 | |
|           label="盲态任务标识"
 | |
|           fixed="left"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="TrialReadingCriterionName"
 | |
|           min-width="100"
 | |
|           label="阅片标准"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="ModuleTypeName"
 | |
|           min-width="100"
 | |
|           label="功能模块"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="Description"
 | |
|           min-width="140"
 | |
|           label="操作名"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="Reason"
 | |
|           min-width="100"
 | |
|           label="修改原因"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="IsSign"
 | |
|           min-width="120"
 | |
|           align="center"
 | |
|           label="是否电签"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <div>
 | |
|               <el-tooltip v-if="scope.row.IsSign" class="item" effect="dark" placement="top">
 | |
|                 <div slot="content">
 | |
|                   {{ scope.row.SignText }}
 | |
|                 </div>
 | |
|                 <el-tag type="success">{{ $fd('YesOrNo', scope.row.IsSign) }}</el-tag>
 | |
|               </el-tooltip>
 | |
|               <el-tag v-else type="info">{{ $fd('YesOrNo', scope.row.IsSign) }}</el-tag>
 | |
|             </div>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="CreateUserRealName"
 | |
|           min-width="100"
 | |
|           label="操作人"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         >
 | |
|           <!-- <template slot-scope="scope">
 | |
|             <div>
 | |
|               {{ scope.row.UserLastName }}/{{ scope.row.UserFirstName }}
 | |
|             </div>
 | |
|           </template> -->
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="CreateUserName"
 | |
|           min-width="100"
 | |
|           label="用户名"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="RoleName"
 | |
|           min-width="100"
 | |
|           label="角色"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="CreateTime"
 | |
|           min-width="140"
 | |
|           label="操作时间"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="IP"
 | |
|           min-width="100"
 | |
|           label="IP"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="UserCount"
 | |
|           min-width="150"
 | |
|           fixed="right"
 | |
|           label="操作"
 | |
|           show-overflow-tooltip
 | |
|           sortable="custom"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-button type="text" @click="lookDetails(scope.row)">
 | |
|               详情
 | |
|             </el-button>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|       </el-table>
 | |
|       <!-- 分页组件 -->
 | |
|       <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
 | |
|       <base-model :config="model_cfg">
 | |
|         <template slot="dialog-body">
 | |
|           <div style="display: flex;align-items: center;justify-content: flex-start;">
 | |
|             <el-button size="small" style="position: relative;top: -15px;" type="primary" @click="lookAssociated(1)">同一对象历史操作</el-button>
 | |
|             <el-button size="small" style="position: relative;top: -15px;" type="primary" @click="lookAssociated(0)">同一对象关联操作</el-button>
 | |
|           </div>
 | |
|           <el-table
 | |
|             :data="auditData"
 | |
|             border
 | |
|             style="width: 100%"
 | |
|             size="small"
 | |
|           >
 | |
|             <el-table-column
 | |
|               prop="Enum"
 | |
|               label="字段名"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               v-if="OptType !== 'Add' && OptType !== 'Upload' && OptType !== 'Init'"
 | |
|               prop="oldValue"
 | |
|               :label="OptType === 'Add' ? '值' : OptType === 'Delete' ? '删除前' : '修改前'"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                  <span>
 | |
|                   <a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">查看详情</a>
 | |
|                    <viewer v-else-if="scope.row.DataType === 'Image' && scope.row.oldValue" :images="[scope.row.oldValue]" @inited="handleInited">
 | |
|                      <span style="color:#409eff;cursor: pointer"  @click="openImage(scope.row.oldValue)">查看图片</span>
 | |
|                        <img :src="scope.row.oldValue" v-show="false" crossorigin="anonymous" alt="">
 | |
|                    </viewer>
 | |
|                   <span v-else>
 | |
|                     {{ scope.row.oldValue }}
 | |
|                   </span>
 | |
|                 </span>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|             <el-table-column
 | |
|               prop="newValue"
 | |
|               :label="OptType === 'Add' || OptType === 'Init' ? '值' : OptType === 'Delete' ? '删除后' : '修改后'"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <span :style="{ color: scope.row.newValue !== scope.row.oldValue ? '#f66' : null }">
 | |
|                   <a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">查看详情</a>
 | |
|                    <viewer v-else-if="scope.row.DataType === 'Image' && scope.row.newValue" :images="[scope.row.newValue]" @inited="handleInited">
 | |
|                      <span style="color:#409eff;cursor: pointer"  @click="openImage(scope.row.nenewValuewValue)">查看图片</span>
 | |
|                      <img :src="scope.row.newValue" v-show="false" crossorigin="anonymous" alt="">
 | |
|                    </viewer>
 | |
|                   <span v-else>{{ scope.row.newValue }}</span>
 | |
|                 </span>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|           </el-table>
 | |
|           <el-table
 | |
|             :data="tableListData"
 | |
|             v-if="tableListData.length > 0"
 | |
|             border
 | |
|             style="width: 100%"
 | |
|             size="small"
 | |
|           >
 | |
|             <el-table-column
 | |
|               v-for="item of tableList"
 | |
|               :prop="item.ColumnValue"
 | |
|               :label="item.IsMerge ? item.MergeColumnName : item.headName"
 | |
|               align="center"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <el-table-column
 | |
|                 v-if="item.IsMerge"
 | |
|                 v-for="(ite, index) of item.ChildrenList"
 | |
|                 :prop="ite.ListName ? ite.ListName + ite.ColumnValue + index : ite.ColumnValue"
 | |
|                 :label="ite.headName"
 | |
|                 align="center"
 | |
|                 show-overflow-tooltip
 | |
|               >
 | |
|               </el-table-column>
 | |
|             </el-table-column>
 | |
|           </el-table>
 | |
|           <div v-if="otherData.length > 0" style="margin-top: 20px;margin-bottom: 10px;">
 | |
|             签名信息:
 | |
|           </div>
 | |
|           <div v-if="otherData.length > 0" style="color:#f66;font-size: 12px">
 | |
|             {{otherData[0].Value}}
 | |
|           </div>
 | |
|         </template>
 | |
|         <template slot="dialog-footer">
 | |
|           <el-button size="small" type="primary" @click="model_cfg.visible = false">关闭</el-button>
 | |
|         </template>
 | |
|       </base-model>
 | |
|       <!-- 新增/编辑项目 -->
 | |
|       <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:300}"
 | |
|             v-loading="loading"
 | |
|             :data="list2"
 | |
|             stripe
 | |
|             height="100"
 | |
|           >
 | |
|             <el-table-column type="index" width="40" align="left" />
 | |
|             <el-table-column
 | |
|               prop="ResearchProgramNo"
 | |
|               min-width="90"
 | |
|               label="研究方案号"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="SiteCode"
 | |
|               min-width="100"
 | |
|               label="中心编号"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="SubjectCode"
 | |
|               min-width="100"
 | |
|               label="受试者"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="VisitName"
 | |
|               min-width="100"
 | |
|               label="访视"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|                 prop="TaskName"
 | |
|                 min-width="100"
 | |
|                 label="任务名称"
 | |
|                 show-overflow-tooltip
 | |
|                 sortable="custom"
 | |
|             />
 | |
|             <el-table-column
 | |
|                 prop="BlindName"
 | |
|                 min-width="150"
 | |
|                 label="盲态任务标识"
 | |
|                 show-overflow-tooltip
 | |
|                 sortable="custom"
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="TrialReadingCriterionName"
 | |
|               min-width="100"
 | |
|               label="阅片标准"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="ModuleTypeName"
 | |
|               min-width="100"
 | |
|               label="功能模块"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="Description"
 | |
|               min-width="140"
 | |
|               label="操作名"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="Reason"
 | |
|               min-width="100"
 | |
|               label="修改原因"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="IsSign"
 | |
|               min-width="90"
 | |
|               align="center"
 | |
|               label="是否电签"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <div>
 | |
|                   <el-tooltip v-if="scope.row.IsSign" class="item" effect="dark" placement="top">
 | |
|                     <div slot="content">
 | |
|                       {{ scope.row.SignText }}
 | |
|                     </div>
 | |
|                     <el-tag type="success">{{ $fd('YesOrNo', scope.row.IsSign) }}</el-tag>
 | |
|                   </el-tooltip>
 | |
|                   <el-tag v-else type="info">{{ $fd('YesOrNo', scope.row.IsSign) }}</el-tag>
 | |
|                 </div>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|           <el-table-column
 | |
|             prop="CreateUserRealName"
 | |
|             min-width="80"
 | |
|             label="操作人"
 | |
|             show-overflow-tooltip
 | |
|           >
 | |
|             <!-- <template slot-scope="scope">
 | |
|               <div>
 | |
|                 {{ scope.row.UserLastName }}/{{ scope.row.UserFirstName }}
 | |
|               </div>
 | |
|             </template> -->
 | |
|           </el-table-column>
 | |
|           <el-table-column
 | |
|             prop="CreateUserName"
 | |
|             min-width="80"
 | |
|             label="用户名"
 | |
|             show-overflow-tooltip
 | |
|           />
 | |
|           <el-table-column
 | |
|             prop="RoleName"
 | |
|             min-width="70"
 | |
|             label="角色"
 | |
|             show-overflow-tooltip
 | |
|           />
 | |
|             <el-table-column
 | |
|               prop="CreateTime"
 | |
|               min-width="140"
 | |
|               label="操作时间"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="IP"
 | |
|               min-width="100"
 | |
|               label="IP"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               prop="UserCount"
 | |
|               min-width="150"
 | |
|               label="操作"
 | |
|               show-overflow-tooltip
 | |
|               sortable="custom"
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <el-button type="text" @click="lookDetails2(scope.row)">
 | |
|                   详情
 | |
|                 </el-button>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|           </el-table>
 | |
|       </el-dialog>
 | |
|       <base-model :config="model_cfg3">
 | |
|         <template slot="dialog-body">
 | |
|           <el-table
 | |
|             :data="auditData2"
 | |
|             border
 | |
|             style="width: 100%"
 | |
|             size="small"
 | |
|           >
 | |
|             <el-table-column
 | |
|               prop="Enum"
 | |
|               label="字段名"
 | |
|               show-overflow-tooltip
 | |
|             />
 | |
|             <el-table-column
 | |
|               v-if="OptType !== 'Add' && OptType !== 'Upload' && OptType !== 'Init'"
 | |
|               prop="oldValue"
 | |
|               :label="OptType === 'Add' ? '值' : OptType === 'Delete' ? '删除前' : '修改前'"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <span>
 | |
|                   <a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">{{scope.row.oldValue}}</a>
 | |
|                   <span v-else>
 | |
|                     {{ scope.row.oldValue }}
 | |
|                   </span>
 | |
|                 </span>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|             <el-table-column
 | |
|               prop="newValue"
 | |
|               :label="OptType === 'Add' || OptType === 'Init' ? '值' : OptType === 'Delete' ? '删除后' : '修改后'"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <template slot-scope="scope">
 | |
|                 <span :style="{ color: scope.row.newValue !== scope.row.oldValue ? '#f66' : null }">
 | |
|                   <a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">{{scope.row.newValue}}</a>
 | |
|                   <span v-else>{{ scope.row.newValue }}</span>
 | |
|                 </span>
 | |
|               </template>
 | |
|             </el-table-column>
 | |
|           </el-table>
 | |
|           <el-table
 | |
|             v-if="tableListData.length > 0"
 | |
|             :data="tableListData"
 | |
|             border
 | |
|             style="width: 100%"
 | |
|             size="small"
 | |
|           >
 | |
|             <el-table-column
 | |
|               v-for="item of tableList"
 | |
|               :prop="item.ColumnValue"
 | |
|               :label="item.IsMerge ? item.MergeColumnName : item.headName"
 | |
|               align="center"
 | |
|               show-overflow-tooltip
 | |
|             >
 | |
|               <el-table-column
 | |
|                 v-if="item.IsMerge"
 | |
|                 v-for="(ite, index) of item.ChildrenList"
 | |
|                 :prop="ite.ListName ? ite.ListName + ite.ColumnValue + index : ite.ColumnValue"
 | |
|                 :label="ite.headName"
 | |
|                 align="center"
 | |
|                 show-overflow-tooltip
 | |
|               >
 | |
|               </el-table-column>
 | |
|             </el-table-column>
 | |
|           </el-table>
 | |
|           <div v-if="otherData.length > 0" style="margin-top: 20px;margin-bottom: 10px;">
 | |
|             签名信息:
 | |
|           </div>
 | |
|           <div v-if="otherData.length > 0" style="color:#f66;font-size: 12px">
 | |
|             {{otherData[0].Value}}
 | |
|           </div>
 | |
|         </template>
 | |
|         <template slot="dialog-footer">
 | |
|           <el-button size="small" type="primary" @click="model_cfg3.visible = false">关闭</el-button>
 | |
|         </template>
 | |
|       </base-model>
 | |
| <!--      <base-model :config="model_cfg4">-->
 | |
| <!--        <template slot="dialog-body">-->
 | |
| 
 | |
| <!--        </template>-->
 | |
| <!--        <template slot="dialog-footer">-->
 | |
| <!--          <el-button size="small" type="primary" @click="model_cfg4.visible = false; openImageUrl = null">关闭</el-button>-->
 | |
| <!--        </template>-->
 | |
| <!--      </base-model>-->
 | |
| <!--      <div v-viewer v-if="isViewer">-->
 | |
| <!--        <img-->
 | |
| <!--            :src="openImageUrl"-->
 | |
| <!--            style="width: 50px;height: 50px; cursor:pointer">-->
 | |
| <!--      </div>-->
 | |
|     </template>
 | |
|   </BaseContainer>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| 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'
 | |
| 
 | |
| export default {
 | |
|   components: { BaseContainer, Pagination, BaseModel },
 | |
|   dicts: ['OptType', 'ModuleType', 'ChildrenType'],
 | |
|   data() {
 | |
|     const searchDataDefault = () => {
 | |
|       return {
 | |
|         SortField: '',
 | |
|         Asc: false,
 | |
|         PageIndex: 1,
 | |
|         PageSize: 20,
 | |
|         ModuleType: null,
 | |
|         BlindName: null,
 | |
|         TrialId: this.$route.query.trialId,
 | |
|         SiteId: null,
 | |
|         SubjectId: null,
 | |
|         SubjectInfo: null,
 | |
|         SubjectVisitId: null,
 | |
|         VisitPlanInfo: null,
 | |
|         OptType: null,
 | |
|         ChildrenType: null,
 | |
|         Reason: null,
 | |
|         IsSign: null,
 | |
|         StartTime: null,
 | |
|         EndTime: null,
 | |
|         Description: null,
 | |
|         OpByUserName: null,
 | |
|         BatchId: null,
 | |
|         TrialReadingCriterionId: 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: '查看关联操作', appendToBody: true },
 | |
|       model_cfg3: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true },
 | |
|       model_cfg4: { visible: false, showClose: true, width: '600px', title: '查看图片', appendToBody: true },
 | |
|       total: 0,
 | |
|       loading: false,
 | |
|       searchData: searchDataDefault(),
 | |
|       ResearchProgramNo: null,
 | |
|       list: [],
 | |
|       list2: [],
 | |
|       isOpen: false,
 | |
|       typeConfigList: [],
 | |
|       DescriptionOptions: [],
 | |
|       auditData: [],
 | |
|       auditData2: [],
 | |
|       siteOptions: [],
 | |
|       visitPlanOptions: [],
 | |
|       OptType: null,
 | |
|       trialId: this.$route.query.trialId,
 | |
|       configList2: [],
 | |
|       otherData2: [],
 | |
|       timeList: [],
 | |
|       tableList: [],
 | |
|       tableListData: [],
 | |
|       trialCriterionList: [],
 | |
|       openImageUrl: null,
 | |
|       $viewer: null
 | |
|     }
 | |
|   },
 | |
|   mounted() {
 | |
|     this.ResearchProgramNo = this.$route.query.researchProgramNo
 | |
|     this.getSite()
 | |
|     this.getVisitPlanOptions()
 | |
|     this.getTrialCriterionList()
 | |
|     this.getList()
 | |
|     this.handleInited()
 | |
|   },
 | |
|   methods: {
 | |
|     handleInited(viewer) {
 | |
|       this.$viewer = viewer
 | |
|     },
 | |
|     openImage(url) {
 | |
|       this.openImageUrl = url
 | |
|       console.log(this.$viewer)
 | |
|       console.log(url)
 | |
|       this.$viewer.show()
 | |
|       // this.model_cfg4.visible = true
 | |
|     },
 | |
|     getTrialCriterionList() {
 | |
|       getTrialCriterionList(this.trialId, false).then(res => {
 | |
|         this.trialCriterionList = res.Result
 | |
|       }).catch(() => {})
 | |
|     },
 | |
|     handleSortChange(column) {
 | |
|       if (column.order === 'ascending') {
 | |
|         this.searchData.Asc = true
 | |
|       } else {
 | |
|         this.searchData.Asc = false
 | |
|       }
 | |
|       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]
 | |
|       } else {
 | |
|         this.searchData.StartTime = null
 | |
|         this.searchData.EndTime = null
 | |
|       }
 | |
| 
 | |
|     },
 | |
|     getModuleTypeDescriptionList(v) {
 | |
|       this.searchData.Description = null
 | |
|       getModuleTypeDescriptionList( v ).then(res => {
 | |
|         this.DescriptionOptions = res.Result
 | |
|       })
 | |
|     },
 | |
|     // 获取site下拉框数据
 | |
|     getSite() {
 | |
|       getTrialSiteSelect(this.trialId).then(res => {
 | |
|         this.siteOptions = res.Result
 | |
|       })
 | |
|     },
 | |
|     // 获取访视下拉框数据
 | |
|     getVisitPlanOptions() {
 | |
|       getTrialVisitStageSelect(this.trialId)
 | |
|         .then((res) => {
 | |
|           this.visitPlanOptions = res.Result
 | |
|         })
 | |
|     },
 | |
|     toTree(arr, ParentId) {
 | |
|       function loop(ParentId) {
 | |
|         const res = []
 | |
|         for (let i = 0; i < arr.length; i++) {
 | |
|           const item = arr[i]
 | |
|           item.hasChildren = false
 | |
|           if (item.ParentId !== ParentId) {
 | |
|             continue
 | |
|           }
 | |
|           item.Children = loop(item.Id)
 | |
|           res.push(item)
 | |
|         }
 | |
|         return res
 | |
|       }
 | |
|       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
 | |
|         console.log(v.IsTableFiled)
 | |
|         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') {
 | |
|                 item = {
 | |
|                   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: '--'
 | |
|                 }
 | |
|               } else {
 | |
|                 item = {
 | |
|                   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)
 | |
|             })
 | |
|           }
 | |
|           return
 | |
|         }
 | |
|         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') {
 | |
|                 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') {
 | |
|                 item = {
 | |
|                   key: o[v.ChildDataLabel],
 | |
|                   Enum: o[v.ChildDataLabel],
 | |
|                   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] : '--'
 | |
|                 }
 | |
|               }
 | |
|               this[auditData].push(item)
 | |
|             })
 | |
|           }
 | |
|           return
 | |
|         }
 | |
|         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
 | |
|         }
 | |
|         if (v.DataType === 'Table') {
 | |
|           var head = []
 | |
|           var body = []
 | |
|           v.TableConfigList.forEach((j, i) => {
 | |
|             if (j.IsFixedColumn) {
 | |
|                 head.push({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({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({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 = {}
 | |
|             v.TableConfigList.forEach((j) => {
 | |
|               if (j.ListName) {
 | |
|                 o[j.ListName].forEach((ite, i) => {
 | |
|                   b[j.ListName + j.ColumnValue + i] = ite[j.ColumnValue]
 | |
|                 })
 | |
|               } else {
 | |
|                 b[j.ColumnValue] = o[j.ColumnValue]
 | |
|               }
 | |
|             })
 | |
|             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)
 | |
|               if (!!hasChildren) {
 | |
|                 j.ChildrenList = Object.assign([], hasChildren)
 | |
|                 var has = newHead.find(v => {
 | |
|                   return v.MergeColumnName === j.MergeColumnName
 | |
|                 })
 | |
|                 if (!has) {
 | |
|                   newHead.push(j)
 | |
|                 }
 | |
|               } else {
 | |
|               }
 | |
|             } else {
 | |
|               newHead.push(j)
 | |
|             }
 | |
|           })
 | |
|           this.tableList = newHead
 | |
|           this.tableListData = body
 | |
|           return
 | |
|         }
 | |
|         if (v.IsShowParent === 1) {
 | |
|           if (row.OptType === 'Delete') {
 | |
|             item = {
 | |
|               oldValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--',
 | |
|               newValue: '--'
 | |
|             }
 | |
|           } else if (row.OptType === 'Add' || row.OptType === 'Init') {
 | |
|             item = {
 | |
|               newValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--',
 | |
|               oldValue: '--'
 | |
|             }
 | |
|           } else {
 | |
|             item = {
 | |
|               newValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--',
 | |
|               oldValue: parentRow ? (parentRow[v.Code] ? parentRow[v.Code] : '--') : '--'
 | |
|             }
 | |
|           }
 | |
|         } else if (v.IsShowParent === 0) {
 | |
|           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') {
 | |
|             item = {
 | |
|               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] : '--') : '--'
 | |
|             }
 | |
|           }
 | |
|         } else {
 | |
|           if (row.OptType === 'Delete') {
 | |
|             item = {
 | |
|               oldValue: row ? ((row[v.Code] && row[v.Code] !== null && row[v.Code] !== '') ? 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: '--'
 | |
|             }
 | |
|           } else {
 | |
|             item = {
 | |
|               newValue: row ? ((row[v.Code] && row[v.Code] !== null && row[v.Code] !== '' && row[v.Code] !== 0) ? row[v.Code] : '--') : '--',
 | |
|               oldValue: '--'
 | |
|             }
 | |
|           }
 | |
|         }
 | |
|         item.DataType = v.DataType
 | |
|         // if () {
 | |
|         // }
 | |
|         item.key = v.Code
 | |
|         item.Enum = v.ValueCN
 | |
|         this[auditData].push(item)
 | |
|       })
 | |
|     },
 | |
|     getJSON(row) {
 | |
|       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
 | |
|       })
 | |
|       this.model_cfg2.title = `查看关联操作${this.currentRow.Description}`
 | |
|       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')
 | |
|         console.log(this.auditData2)
 | |
|         this.otherData2 = []
 | |
|         if (row.IsSign) {
 | |
|           this.otherData2.push({
 | |
|             Enum: '签名信息',
 | |
|             Value: row.SignText
 | |
|           })
 | |
|         }
 | |
|         this.model_cfg3.title = row.Description
 | |
|         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 = []
 | |
|         if (row.IsSign) {
 | |
|           console.log(row.SignText)
 | |
|           this.otherData.push({
 | |
|             Enum: '签名信息',
 | |
|             Value: row.SignText
 | |
|           })
 | |
|         }
 | |
|         this.model_cfg.title = row.Description
 | |
|         this.model_cfg.visible = true
 | |
|       })
 | |
|     },
 | |
|     handleReset() {
 | |
|       this.searchData = Object.assign(this.searchData, {
 | |
|         SortField: '',
 | |
|         Asc: false,
 | |
|         PageIndex: 1,
 | |
|         PageSize: 20,
 | |
|         ModuleType: null,
 | |
|         BlindName: null,
 | |
|         TrialId: this.$route.query.trialId,
 | |
|         SiteId: null,
 | |
|         SubjectId: null,
 | |
|         SubjectInfo: null,
 | |
|         SubjectVisitId: null,
 | |
|         VisitPlanInfo: null,
 | |
|         OptType: null,
 | |
|         ChildrenType: null,
 | |
|         Reason: null,
 | |
|         IsSign: null,
 | |
|         StartTime: null,
 | |
|         EndTime: null,
 | |
|         Description: null,
 | |
|         OpByUserName: null,
 | |
|         BatchId: null
 | |
|       })
 | |
|       this.getList()
 | |
|     },
 | |
|     handleSearch() {
 | |
|       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
 | |
|       })
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| 
 |