中心调研问题修改

uat_us^2
wangxiaoshuang 2026-08-12 16:19:15 +08:00
parent 9b596ce0ed
commit 9a748b0c8a
3 changed files with 72 additions and 47 deletions

View File

@ -8,7 +8,7 @@
<!-- <TopLang style="position: fixed;top: 40px;right: 40px" /> -->
<div style="display: flex;justify-content: space-between;" v-if="!isPreview">
<div>{{ $t('trials:researchForm:title:researchSurveyStatus') }} <el-tag>{{ $fd('ResearchRecord', state)
}}</el-tag></div>
}}</el-tag></div>
<div>
<!-- 提交 -->
<el-button v-if="(state === 0 && userTypeEnumInt === 0)" type="primary" size="small"
@ -234,7 +234,7 @@ export default {
},
computed: {
isPM() {
return this.hasPermi(['role:pm', 'role:spm', 'role:cpm', 'role:apm']) && this.state !== 3
return this.hasPermi(['role:pm', 'role:spm', 'role:cpm', 'role:apm']) && this.state !== 3 && this.IsOnlyUploadFile
}
},
methods: {

View File

@ -52,21 +52,15 @@
{{ $t('common:button:reset') }}
</el-button>
<!-- 中心人员 -->
<el-button
v-if="searchData.State === 3"
v-hasPermi="['trials:trials-panel:attachments:site-research:summary-record']"
type="primary"
icon="el-icon-info"
@click="showResearchUser">
<el-button v-if="searchData.State === 3"
v-hasPermi="['trials:trials-panel:attachments:site-research:summary-record']" type="primary"
icon="el-icon-info" @click="showResearchUser">
{{ $t('trials:researchRecord:button:researchData') }}
</el-button>
<!-- 调查表链接 -->
<el-button
v-if="searchData.State === 0"
v-hasPermi="['trials:trials-panel:attachments:site-research:questionnaire-link']"
type="primary"
icon="el-icon-link"
@click="showResearchLink">
<el-button v-if="searchData.State === 0"
v-hasPermi="['trials:trials-panel:attachments:site-research:questionnaire-link']" type="primary"
icon="el-icon-link" @click="showResearchLink">
{{ $t('trials:researchRecord:button:questionLink') }}
</el-button>
</el-form>
@ -146,22 +140,17 @@
<el-table-column width="150">
<template slot-scope="scope">
<!-- 查看 -->
<el-button
v-if="searchData.State === 1 || searchData.State === 2 || searchData.State === 3"
:disabled="scope.row.State !== 3"
circle
:title="$t('common:button:view')"
icon="el-icon-view"
@click="handleViewResearchList(scope.row)" />
<el-button v-if="searchData.State === 3" :disabled="scope.row.State !== 3" circle
:title="$t('common:button:view')" icon="el-icon-view" @click="handleViewResearchList(scope.row)" />
<!-- 审批 -->
<el-button
v-if="searchData.State === 1 || searchData.State === 2"
v-hasPermi="['trials:trials-panel:attachments:site-research:auidt']"
:disabled="scope.row.State === 0 || scope.row.State === 3 || scope.row.IsDeleted"
circle
:title="$t('trials:researchRecord:action:view')"
icon="el-icon-s-check"
<el-button v-if="(searchData.State === 1 || searchData.State === 2) && isAudit"
v-hasPermi="['trials:trials-panel:attachments:site-research:auidt']"
:disabled="scope.row.State === 0 || scope.row.State === 3 || scope.row.IsDeleted" circle
:title="$t('trials:researchRecord:action:view')" icon="el-icon-s-check"
@click="handleViewResearchList(scope.row)" />
<!-- 日志 -->
<el-button circle :title="$t('trials:researchRecord:action:log')" icon="el-icon-tickets"
@click="viewLog(scope.row)" />
<!-- 废除 -->
<el-button v-if="searchData.State === 0" v-hasPermi="[
'trials:trials-panel:attachments:site-research:abolish',
@ -180,29 +169,22 @@
<!-- 中心数据 trials:researchRecord:button:researchData-->
<!-- 中心人员 trials:researchRecord:dialogTitle:questionStaff-->
<el-dialog v-if="researchUserVisible" :visible.sync="researchUserVisible"
:title="$t('trials:researchRecord:button:researchData')" custom-class="base-dialog-wrapper"
:fullscreen="true">
:title="$t('trials:researchRecord:button:researchData')" custom-class="base-dialog-wrapper" :fullscreen="true">
<div class="base-modal-body" style="border: 1px solid #ccc; padding: 10px">
<el-tabs v-model="activeName">
<el-tab-pane
:label="$t('trials:researchRecord:dialogTitle:questionStaff')"
name="first">
<Users v-if="activeName === 'first'"/>
<el-tab-pane :label="$t('trials:researchRecord:dialogTitle:questionStaff')" name="first">
<Users v-if="activeName === 'first'" />
</el-tab-pane>
<el-tab-pane
label="中心设备"
name="second">
<Equipments v-if="activeName === 'second'"/>
<el-tab-pane label="中心设备" name="second">
<Equipments v-if="activeName === 'second'" />
</el-tab-pane>
<el-tab-pane
label="基本情况"
name="third">
<Questions v-if="activeName === 'third'"/>
<el-tab-pane label="基本情况" name="third">
<Questions v-if="activeName === 'third'" />
</el-tab-pane>
</el-tabs>
</div>
</el-dialog>
<!-- 调查表 -->
<el-dialog v-if="researchInfoVisible" :visible.sync="researchInfoVisible" :fullscreen="true"
:close-on-click-modal="false">
@ -290,6 +272,26 @@
</template>
</base-model>
<el-dialog v-if="logVisible" :visible.sync="logVisible"
:custom-class="isFullscreen ? 'full-log-dialog-container' : 'log-dialog-container'" :close-on-click-modal="false"
:fullscreen="isFullscreen" :show-close="false" width="60%" append-to-body>
<span slot="title" class="dialog-footer">
<div style="display: flex;flex-direction: row;justify-content: space-between;">
<div>
{{ $t('trials:researchForm:button:log') }}
</div>
<div>
<svg-icon :icon-class="isFullscreen ? 'exit-fullscreen' : 'fullscreen'"
style="vertical-align: baseline;cursor: pointer;font-size: 20px;" @click="toggleLogFullscreen" />
<svg-icon icon-class="dClose" style="cursor: pointer;font-size: 25px;margin-left: 10px;"
@click="logVisible = false" />
</div>
</div>
</span>
<div class="log-dialog-content">
<LogList :trial-site-survey-id="trialSiteSurveyId" />
</div>
</el-dialog>
</BaseContainer>
</template>
<script>
@ -311,6 +313,7 @@ import ResearchForm from '@/views/research/form'
import BaseModel from '@/components/BaseModel'
import ImageManual from './ImageManual'
import QRCode from 'qrcodejs2'
import LogList from '@/views/research/components/LogList'
const searchDataDefault = () => {
return {
@ -329,7 +332,13 @@ const searchDataDefault = () => {
}
export default {
name: 'ResearchList',
components: { BaseContainer, Pagination, Users, Equipments, Questions, ResearchForm, BaseModel, ImageManual },
components: { BaseContainer, Pagination, Users, Equipments, Questions, ResearchForm, BaseModel, ImageManual, LogList },
props: {
isAudit: {
type: Boolean,
default: false
}
},
data() {
return {
searchData: searchDataDefault(),
@ -388,7 +397,9 @@ export default {
},
ImageManualVisible: false,
trialSiteSurveyId: null,
activeName: 'first'
activeName: 'first',
isFullscreen: false,
logVisible: false
}
},
mounted() {
@ -396,6 +407,14 @@ export default {
this.getSite()
},
methods: {
toggleLogFullscreen() {
this.isFullscreen = !this.isFullscreen
},
viewLog(row) {
this.trialSiteSurveyId = row.Id
this.isFullscreen = false
this.logVisible = true
},
async getLinkTimeIsExpired() {
try {
let data = {

View File

@ -16,7 +16,7 @@
@click.native="handleClick(3)" />
</el-steps>
<div class="step-content">
<ResearchList ref="researchList" />
<ResearchList ref="researchList" :isAudit="isAudit" />
</div>
</div>
</BaseContainer>
@ -50,10 +50,15 @@ export default {
}
}
},
computed: {
isAudit() {
return (this.hasPermi(['role:spm', 'role:cpm', 'role:apm']) && this.activeStatus === 1) || (this.hasPermi(['role:pm']) && this.activeStatus === 2)
}
},
mounted() {
this.getTrialIsSPMJoin()
if (this.hasPermi(['role:pm'])) this.activeStatus = 2
if (this.hasPermi(['role:spm'])) this.activeStatus = 1
if (this.hasPermi(['role:spm', 'role:cpm', 'role:apm'])) this.activeStatus = 1
},
methods: {
async getTrialIsSPMJoin() {
@ -62,6 +67,7 @@ export default {
if (!trialId) return
let res = await getTrialIsSPMJoin(trialId)
this.isSPMJoin = res.Result
if (!this.isSPMJoin && this.activeStatus === 1) this.activeStatus = 0
} catch (e) {
console.log(e)
}