513 lines
		
	
	
		
			16 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			513 lines
		
	
	
		
			16 KiB
		
	
	
	
		
			Plaintext
		
	
	
| <template>
 | |
|   <BaseContainer>
 | |
|     <template slot="search-container">
 | |
|       <el-form :inline="true">
 | |
|         <el-form-item :label="$t('trials:consistencyCheck:table:siteId')">
 | |
|           <el-select v-model="searchData.SiteId" clearable filterable style="width:120px;">
 | |
|             <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="$t('trials:consistencyCheck:table:subjectId')">
 | |
|           <el-input v-model="searchData.SubjectCode" style="width:100px;" />
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px" label="任务名称">
 | |
|           <el-input
 | |
|             v-model="searchData.TaskName"
 | |
|             style="width:100px;"
 | |
|             clearable
 | |
|           />
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px" label="阅片人">
 | |
|           <el-select v-model="searchData.DoctorUserId" clearable style="width:120px;">
 | |
|             <el-option v-for="item of DoctorUserList" :value="item.DoctorUserId" :label="item.UserName" />
 | |
|           </el-select>
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px" label="是否加急">
 | |
|           <el-select v-model="searchData.IsUrgent" clearable style="width:120px;">
 | |
|             <el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
 | |
|           </el-select>
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px" label="任务类型">
 | |
|           <el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
 | |
|             <el-option v-for="item of $d.ReadingCategory" :value="item.value" :label="item.label" />
 | |
|           </el-select>
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px" label="分配状态">
 | |
|           <el-select v-model="searchData.TaskState" clearable style="width:120px;">
 | |
|             <el-option v-for="item of $d.TaskState" :value="item.value" :label="item.label" />
 | |
|           </el-select>
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px" label="分配时间">
 | |
|           <el-date-picker
 | |
|             v-model="timeList"
 | |
|             value-format="yyyy-MM-dd HH:mm:ss"
 | |
|             type="datetimerange"
 | |
|             range-separator="至"
 | |
|             start-placeholder="开始日期"
 | |
|             end-placeholder="结束日期"
 | |
|             @change="changeTimeList"
 | |
|           />
 | |
|         </el-form-item>
 | |
|         <el-form-item style="margin-bottom:10px">
 | |
|           <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-button type="primary" @click="openReadingRules">
 | |
|             阅片任务规则
 | |
|           </el-button>
 | |
|           <el-button type="primary" @click="openRefereeAllocation">
 | |
|             设置裁判触发规则
 | |
|           </el-button>
 | |
|         </el-form-item>
 | |
|       </el-form>
 | |
|     </template>
 | |
|     <template slot="main-container">
 | |
|       <el-table
 | |
|         v-adaptive="{bottomOffset:60}"
 | |
|         v-loading="loading"
 | |
|         :data="list"
 | |
|         stripe
 | |
|         height="100"
 | |
|         @sort-change="handleSortChange"
 | |
|       >
 | |
|         <el-table-column
 | |
|           prop="IsUrgent"
 | |
|           :label="$t('trials:consistencyCheck:table:isUrgent')"
 | |
|           show-overflow-tooltip
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag v-if="scope.row.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
 | |
|             <el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="TaskCode"
 | |
|           label="任务编号"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="TrialSiteCode"
 | |
|           label="中心编号"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="SubjectCode"
 | |
|           label="受试者编号"
 | |
|           min-width="120"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="TaskName"
 | |
|           label="访视/阅片期名称"
 | |
|           min-width="160"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="TaskBlindName"
 | |
|           label="访视盲态名称"
 | |
|           min-width="140"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="CreateTime"
 | |
|           label="任务创建时间"
 | |
|           min-width="140"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="ReadingCategory"
 | |
|           label="阅片类别"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag type="primary">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="TaskState"
 | |
|           label="任务状态"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag v-if="!scope.row.TaskState" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
 | |
|             <el-tag v-else type="primary">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="ArmEnum"
 | |
|           label="任务组"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag type="primary">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="UserName"
 | |
|           label="阅片人"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="AllocateTime"
 | |
|           label="分配时间"
 | |
|           min-width="120"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="SuggesteFinishedTime"
 | |
|           label="建议完成时间"
 | |
|           min-width="140"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="ReadingTaskState"
 | |
|           label="阅片状态"
 | |
|           min-width="120"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag type="primary">{{ $fd('ReadingTaskState', scope.row.ReadingTaskState) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="CheckPassedTime"
 | |
|           label="签名时间"
 | |
|           min-width="120"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         />
 | |
|         <el-table-column
 | |
|           prop="IsReturned"
 | |
|           label="是否退回"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag type="primary">{{ $fd('YesOrNo', scope.row.IsReturned) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           prop="AllocateTime"
 | |
|           label="是否重阅"
 | |
|           min-width="100"
 | |
|           sortable="custom"
 | |
|           show-overflow-tooltip
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-tag type="primary">{{ $fd('YesOrNo', scope.row.IsReReading) }}</el-tag>
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|         <el-table-column
 | |
|           fixed="right"
 | |
|           label="操作"
 | |
|           width="300"
 | |
|         >
 | |
|           <template slot-scope="scope">
 | |
|             <el-button
 | |
|               v-if="OtherInfo && OtherInfo.TaskAllocateObjEnum === 1"
 | |
|               :disabled="scope.row.TaskState === 2 || scope.row.UserName"
 | |
|               icon="el-icon-thumb"
 | |
|               circle
 | |
|               title="分配"
 | |
|               @click="assignSubjectTaskToDoctor(scope.row, 1)"
 | |
|             />
 | |
|             <el-button
 | |
|               :disabled="scope.row.TaskState === 2 || !scope.row.UserName"
 | |
|               icon="el-icon-check"
 | |
|               circle
 | |
|               title="确认"
 | |
|               @click="assignSubjectTaskToDoctor(scope.row,3)"
 | |
|             />
 | |
|             <el-button
 | |
|               v-if="OtherInfo && OtherInfo.TaskAllocateObjEnum === 1"
 | |
|               :disabled="scope.row.TaskState === 0"
 | |
|               icon="el-icon-close"
 | |
|               circle
 | |
|               title="取消分配"
 | |
|               @click="assignSubjectTaskToDoctor(scope.row,4)"
 | |
|             />
 | |
|             <el-button
 | |
|               v-if="OtherInfo && OtherInfo.TaskAllocateObjEnum === 1"
 | |
|               :disabled="!scope.row.UserName"
 | |
|               icon="el-icon-refresh-left"
 | |
|               circle
 | |
|               title="重新分配"
 | |
|               @click="assignSubjectTaskToDoctor(scope.row,2)"
 | |
|             />
 | |
|           </template>
 | |
|         </el-table-column>
 | |
|       </el-table>
 | |
|       <!-- 分页组件 -->
 | |
|       <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
 | |
|       <el-dialog
 | |
|         title="阅片任务规则"
 | |
|         :visible.sync="ReadingRulesVisible"
 | |
|         width="400px"
 | |
|         :close-on-click-modal="false"
 | |
|         custom-class="base-dialog-wrapper"
 | |
|       >
 | |
|         <div class="base-dialog-body" style="position: relative">
 | |
|           <el-form
 | |
|             ref="signForm"
 | |
|             size="small"
 | |
|             label-width="100px"
 | |
|           >
 | |
|             <el-form-item label="呈现对象">
 | |
|               <el-radio-group v-model="ReadingRulesInfo.ReadingTaskViewEnum">
 | |
|                 <el-radio v-for="item of $d.TaskAllocateObj" :key="'TaskAllocateObjEnum' + item.value" :label="item.value" :disabled="item.value === 1">{{ item.label }}</el-radio>
 | |
|               </el-radio-group>
 | |
|             </el-form-item>
 | |
|             <el-form-item label="呈现顺序">
 | |
|               <el-radio-group v-model="ReadingRulesInfo.IsReadingTaskViewInOrder">
 | |
|                 <el-radio v-for="item of $d.IsReadingTaskViewInOrder" :key="'TaskAllocateObjEnum' + item.value" :label="item.value" :disabled="item.value === 1">{{ item.label }}</el-radio>
 | |
|               </el-radio-group>
 | |
|             </el-form-item>
 | |
|           </el-form>
 | |
|         </div>
 | |
|         <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
 | |
|           <!-- 取消 -->
 | |
|           <el-button
 | |
|             :disabled="btnLoading"
 | |
|             size="small"
 | |
|             type="primary"
 | |
|             @click="handleCancel"
 | |
|           >
 | |
|             {{ $t('common:button:cancel') }}
 | |
|           </el-button>
 | |
|           <!-- 保存 -->
 | |
|           <el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">
 | |
|             {{ $t('common:button:save') }}
 | |
|           </el-button>
 | |
|         </div>
 | |
|       </el-dialog>
 | |
|       <el-dialog
 | |
|         title="裁判触发规则"
 | |
|         v-if="RefereeAllocationVisible"
 | |
|         :visible.sync="RefereeAllocationVisible"
 | |
|         width="1200px"
 | |
|         append-to-body
 | |
|         :close-on-click-modal="false"
 | |
|         custom-class="base-dialog-wrapper"
 | |
|       >
 | |
|         <RefereeRules></RefereeRules>
 | |
|         <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
 | |
|           <!-- 取消 -->
 | |
|           <el-button
 | |
|             :disabled="btnLoading"
 | |
|             size="small"
 | |
|             type="primary"
 | |
|             @click="RefereeAllocationVisible = false"
 | |
|           >
 | |
|             {{ $t('common:button:cancel') }}
 | |
|           </el-button>
 | |
|         </div>
 | |
|       </el-dialog>
 | |
|     </template>
 | |
|   </BaseContainer>
 | |
| </template>
 | |
| <script>
 | |
| import { getTrialSiteSelect } from '@/api/trials'
 | |
| import { getReadingTaskList, configTrialReadingTaskViewRule, getDoctorUserSelectList } from '@/api/trials/reading'
 | |
| import BaseContainer from '@/components/BaseContainer'
 | |
| import Pagination from '@/components/Pagination'
 | |
| import RefereeRules from './components/RefereeRules.vue'
 | |
| const searchDataDefault = () => {
 | |
|   return {
 | |
|     PageIndex: 1,
 | |
|     PageSize: 20,
 | |
|     Asc: true,
 | |
|     SortField: '',
 | |
|     TrialId: null,
 | |
|     SiteId: null,
 | |
|     SubjectId: null,
 | |
|     SubjectCode: null,
 | |
|     IsUrgent: null,
 | |
|     TaskName: null,
 | |
|     DoctorUserId: null,
 | |
|     ReadingCategory: null,
 | |
|     TaskState: null,
 | |
|     BeginAllocateDate: null,
 | |
|     EndAllocateDate: null
 | |
|   }
 | |
| }
 | |
| export default {
 | |
|   name: 'TrialsNotice',
 | |
|   components: { BaseContainer, Pagination, RefereeRules },
 | |
|   data() {
 | |
|     return {
 | |
|       searchData: searchDataDefault(),
 | |
|       maxLength: 0,
 | |
|       list: [],
 | |
|       siteOptions: [],
 | |
|       total: 0,
 | |
|       SubjectAssignListTotal: 0,
 | |
|       loading: false,
 | |
|       ReadingRulesVisible: false,
 | |
|       RefereeAllocationVisible: false,
 | |
|       trialId: this.$route.query.trialId,
 | |
|       currentData: {},
 | |
|       param: {},
 | |
|       DoctorUserList: [],
 | |
|       TaskAllocationRuleList: [],
 | |
|       btnLoading: false,
 | |
|       value: true,
 | |
|       value1: true,
 | |
|       ReadingRulesInfo: {
 | |
|         TrialId: this.$route.query.trialId,
 | |
|         ReadingTaskViewEnum: 0,
 | |
|         IsReadingTaskViewInOrder: false
 | |
|       },
 | |
|       rules: {
 | |
|         DoctorUserId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }]
 | |
|       },
 | |
|       title: '',
 | |
|       rowData: {},
 | |
|       timeList: [],
 | |
|       SubjectAssignList: [],
 | |
|       SubjectAssignSelectList: [],
 | |
|       TaskAllocationRuleSelectList: [],
 | |
|       readVisible: false,
 | |
|       TaskOptType: null,
 | |
|       OtherInfo: null
 | |
|     }
 | |
|   },
 | |
|   mounted() {
 | |
|     this.getList()
 | |
|     this.getSite()
 | |
|     this.getDoctorUserSelectList()
 | |
|   },
 | |
|   methods: {
 | |
|     openRefereeAllocation() {
 | |
|       this.RefereeAllocationVisible = true
 | |
|     },
 | |
|     openReadingRules() {
 | |
|       this.ReadingRulesVisible = true
 | |
|     },
 | |
|     handleCancel() {
 | |
|       this.ReadingRulesVisible = false
 | |
|     },
 | |
|     handleSave() {
 | |
|       this.btnLoading = true
 | |
|       this.loading = true
 | |
|       var params = Object.assign({}, this.ReadingRulesInfo)
 | |
|       params.TrialId = this.$route.query.trialId
 | |
|       configTrialReadingTaskViewRule(params).then(res => {
 | |
|         this.btnLoading = false
 | |
|         this.loading = false
 | |
|         this.ReadingRulesVisible = false
 | |
|         this.getList()
 | |
|         this.$message.success('保存成功')
 | |
|       }).catch(() => {
 | |
|         this.btnLoading = false
 | |
|         this.loading = false
 | |
|       })
 | |
|     },
 | |
|     getDoctorUserSelectList() {
 | |
|       getDoctorUserSelectList(this.$route.query.trialId).then(res => {
 | |
|         this.DoctorUserList = res.Result
 | |
|         if (this.DoctorUserList.length > 0) {
 | |
|           this.ReadingType = this.DoctorUserList[0].ReadingType
 | |
|         } else {
 | |
|           this.$alert('请先去选择项目阅片人')
 | |
|         }
 | |
|       })
 | |
|     },
 | |
|     getList() {
 | |
|       this.searchData.TrialId = this.$route.query.trialId
 | |
|       this.loading = true
 | |
|       getReadingTaskList(this.searchData).then(res => {
 | |
|         this.loading = false
 | |
|         this.OtherInfo = res.OtherInfo
 | |
|         this.ReadingRulesInfo = Object.assign({}, this.OtherInfo)
 | |
|         this.list = res.Result.CurrentPageData
 | |
|         this.total = res.Result.TotalCount
 | |
|       }).catch(() => { this.loading = false })
 | |
|     },
 | |
|     handleSearch() {
 | |
|       this.searchData.PageIndex = 1
 | |
|       this.getList()
 | |
|     },
 | |
|     handleReset() {
 | |
|       this.searchData = searchDataDefault()
 | |
|       this.getList()
 | |
|     },
 | |
|     getSite() {
 | |
|       getTrialSiteSelect(this.trialId).then(res => {
 | |
|         this.siteOptions = res.Result
 | |
|       })
 | |
|     },
 | |
|     changeTimeList() {
 | |
|       if (this.timeList) {
 | |
|         this.searchData.BeginAllocateDate = this.timeList[0]
 | |
|         this.searchData.EndAllocateDate = this.timeList[1]
 | |
|       } else {
 | |
|         this.searchData.BeginAllocateDate = null
 | |
|         this.searchData.EndAllocateDate = null
 | |
|       }
 | |
|     },
 | |
|     // 排序
 | |
|     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()
 | |
|     }
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| <style lang="scss" scoped>
 | |
|   >>>.hidden-row{
 | |
|     display: none;
 | |
|   }
 | |
|   >>>.el-dialog__body {
 | |
|     padding: 15px 20px;
 | |
|   }
 | |
| 
 | |
|   >>>.el-tag--danger.el-tag--dark {
 | |
|     // background-color: #f56c6c!important;
 | |
|     border-color: none!important;
 | |
|     // color: #fff!important;
 | |
|   }
 | |
|   >>>#TaskAllocationRuleList thead .el-checkbox__inner{
 | |
|     display: none;
 | |
|   }
 | |
|   >>>.el-descriptions-item__label.has-colon:after{
 | |
|     display: none;
 | |
|   }
 | |
| </style>
 |