Browse Source

fix:预填,填报,新增权限判断

master
15881625488@163.com 4 days ago
parent
commit
f8e66aead9
10 changed files with 86 additions and 30 deletions
  1. +7
    -0
      src/api/business/study/studySubject.js
  2. +0
    -1
      src/views/business/comps/select/SelectTemplate.vue
  3. +9
    -1
      src/views/business/form/drug/comp/tbbdList.vue
  4. +9
    -1
      src/views/business/form/drug/comp/ytbdList.vue
  5. +9
    -1
      src/views/business/form/nonTrial/comp/tbbdList.vue
  6. +9
    -1
      src/views/business/form/nonTrial/comp/ytbdList.vue
  7. +23
    -15
      src/views/business/study/comp/jhbd/Sy.vue
  8. +8
    -1
      src/views/business/study/comp/tbbdList.vue
  9. +3
    -8
      src/views/business/study/comp/ytbd/Xq.vue
  10. +9
    -1
      src/views/business/study/comp/ytbdList.vue

+ 7
- 0
src/api/business/study/studySubject.js View File

@ -23,3 +23,10 @@ export function studySubject_save(data) {
data: data data: data
}) })
} }
export function studySubject_isMatchSubject(query) {
return request({
url: '/system/business/studySubject/isMatchSubject',
method: 'get',
params: query
})
}

+ 0
- 1
src/views/business/comps/select/SelectTemplate.vue View File

@ -2,7 +2,6 @@
<template> <template>
<div> <div>
{{ readOnly }}
<el-input v-model="selected.name" :placeholder="$t('form.placeholderSelect')" :disabled="disabled" @click.native="showSelectTemplate" /> <el-input v-model="selected.name" :placeholder="$t('form.placeholderSelect')" :disabled="disabled" @click.native="showSelectTemplate" />
<SelectTemplateDialog ref="selectTemplateDialog" @callback="handleChange" /> <SelectTemplateDialog ref="selectTemplateDialog" @callback="handleChange" />
</div> </div>

+ 9
- 1
src/views/business/form/drug/comp/tbbdList.vue View File

@ -69,7 +69,7 @@
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:drugFormFill:xz']">{{
<el-button type="primary" icon="el-icon-plus" v-if="isMatchSubject" @click="add()" v-hasPermi="['business:drugFormFill:xz']">{{
$t('page.business.study.studyFormFill.xzbd') }}</el-button> $t('page.business.study.studyFormFill.xzbd') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -169,6 +169,7 @@
</template> </template>
<script> <script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studyFormFill_list } from '@/api/business/study/studyFormFill' import { studyFormFill_list } from '@/api/business/study/studyFormFill'
import Bj from "@/views/business/study/comp/tbbd/Bj"; import Bj from "@/views/business/study/comp/tbbd/Bj";
import Xq from "@/views/business/study/comp/tbbd/Xq"; import Xq from "@/views/business/study/comp/tbbd/Xq";
@ -206,6 +207,7 @@ export default {
this.searchForm.studyId = newVal.studyId this.searchForm.studyId = newVal.studyId
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
// this.getIsMatchSubject()
this.search() this.search()
}, },
immediate: true, immediate: true,
@ -215,6 +217,7 @@ export default {
components: { Ghgsr, Fh, Fz, Bj, Xq, Qrfz, Sy, Jq, Gc, SelectDeptUser, SelectDeptUserDialog }, components: { Ghgsr, Fh, Fz, Bj, Xq, Qrfz, Sy, Jq, Gc, SelectDeptUser, SelectDeptUserDialog },
data() { data() {
return { return {
isMatchSubject:false,
leader: null, leader: null,
showFh: false, showFh: false,
showAudit: false, showAudit: false,
@ -247,6 +250,11 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
ghgsr(row) { ghgsr(row) {
this.currentRow = row this.currentRow = row
this.$refs.selectDeptUserDialog.show(null, null) this.$refs.selectDeptUserDialog.show(null, null)

+ 9
- 1
src/views/business/form/drug/comp/ytbdList.vue View File

@ -50,7 +50,7 @@
<div class="ytbd-content"> <div class="ytbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
<el-button type="primary" icon="el-icon-plus" v-if="isMatchSubject" @click="showAdd()"
v-hasPermi="['business:drugFormPre:xz']">{{ v-hasPermi="['business:drugFormPre:xz']">{{
$t('page.business.study.studyFormPre.xzbd') }}</el-button> $t('page.business.study.studyFormPre.xzbd') }}</el-button>
</el-col> </el-col>
@ -168,6 +168,7 @@
</template> </template>
<script> <script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre' import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre'
import { public_studyList, public_studyFormPreList } from '@/api/business/public/public' import { public_studyList, public_studyFormPreList } from '@/api/business/public/public'
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -200,6 +201,7 @@ export default {
this.searchForm.studyId = newVal.studyId this.searchForm.studyId = newVal.studyId
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
// this.getIsMatchSubject()
this.search() this.search()
}, },
immediate: true, immediate: true,
@ -209,6 +211,7 @@ export default {
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable }, components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable },
data() { data() {
return { return {
isMatchSubject:false,
formPreview: { formPreview: {
templateSn: null templateSn: null
}, },
@ -260,6 +263,11 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
copy() { copy() {
this.$modal.loading() this.$modal.loading()
public_studyList().then(response => { public_studyList().then(response => {

+ 9
- 1
src/views/business/form/nonTrial/comp/tbbdList.vue View File

@ -69,7 +69,7 @@
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:nonTrialFormFill:xz']">{{
<el-button type="primary" icon="el-icon-plus" v-if="isMatchSubject" @click="add()" v-hasPermi="['business:nonTrialFormFill:xz']">{{
$t('page.business.study.studyFormFill.xzbd') }}</el-button> $t('page.business.study.studyFormFill.xzbd') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -169,6 +169,7 @@
</template> </template>
<script> <script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studyFormFill_list } from '@/api/business/study/studyFormFill' import { studyFormFill_list } from '@/api/business/study/studyFormFill'
import Bj from "@/views/business/study/comp/tbbd/Bj"; import Bj from "@/views/business/study/comp/tbbd/Bj";
import Xq from "@/views/business/study/comp/tbbd/Xq"; import Xq from "@/views/business/study/comp/tbbd/Xq";
@ -206,6 +207,7 @@ export default {
this.searchForm.studyId = newVal.studyId this.searchForm.studyId = newVal.studyId
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
// this.getIsMatchSubject()
this.search() this.search()
}, },
immediate: true, immediate: true,
@ -215,6 +217,7 @@ export default {
components: { Ghgsr, Fh, Fz, Bj, Xq, Qrfz, Sy, Jq, Gc, SelectDeptUser, SelectDeptUserDialog }, components: { Ghgsr, Fh, Fz, Bj, Xq, Qrfz, Sy, Jq, Gc, SelectDeptUser, SelectDeptUserDialog },
data() { data() {
return { return {
isMatchSubject:false,
leader: null, leader: null,
showFh: false, showFh: false,
showAudit: false, showAudit: false,
@ -247,6 +250,11 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
ghgsr(row) { ghgsr(row) {
this.currentRow = row this.currentRow = row
this.$refs.selectDeptUserDialog.show(null, null) this.$refs.selectDeptUserDialog.show(null, null)

+ 9
- 1
src/views/business/form/nonTrial/comp/ytbdList.vue View File

@ -50,7 +50,7 @@
<div class="ytbd-content"> <div class="ytbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
<el-button type="primary" icon="el-icon-plus" v-if="isMatchSubject" @click="showAdd()"
v-hasPermi="['business:nonTrialFormPre:xz']">{{ v-hasPermi="['business:nonTrialFormPre:xz']">{{
$t('page.business.study.studyFormPre.xzbd') }}</el-button> $t('page.business.study.studyFormPre.xzbd') }}</el-button>
</el-col> </el-col>
@ -168,6 +168,7 @@
</template> </template>
<script> <script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre' import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre'
import { public_studyList, public_studyFormPreList } from '@/api/business/public/public' import { public_studyList, public_studyFormPreList } from '@/api/business/public/public'
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -200,6 +201,7 @@ export default {
this.searchForm.studyId = newVal.studyId this.searchForm.studyId = newVal.studyId
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
// this.getIsMatchSubject()
this.search() this.search()
}, },
immediate: true, immediate: true,
@ -209,6 +211,7 @@ export default {
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable }, components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable },
data() { data() {
return { return {
isMatchSubject:false,
formPreview: { formPreview: {
templateSn: null templateSn: null
}, },
@ -260,6 +263,11 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
copy() { copy() {
this.$modal.loading() this.$modal.loading()
public_studyList().then(response => { public_studyList().then(response => {

+ 23
- 15
src/views/business/study/comp/jhbd/Sy.vue View File

@ -16,7 +16,7 @@
</div> </div>
<div class="edit-content"> <div class="edit-content">
<div class="content-left"> <div class="content-left">
<TemplateTable ref="templateTable" :sn="form.templateSn" fillType="actFill" :templateData="form"/>
<TemplateTable ref="templateTable" :sn="form.templateSn" fillType="actFill" :templateData="form" />
<div class="content-title"> <div class="content-title">
<div class="line"></div> <div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.qmxx') }}</div> <div class="subtitle"> {{ $t('page.business.study.studyFormPlan.qmxx') }}</div>
@ -43,7 +43,7 @@
<div class="line"></div> <div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormPlan.jcgj') }}</div> <div class="subtitle"> {{ $t('page.business.study.studyFormPlan.jcgj') }}</div>
</div> </div>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true"/>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal" <pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" /> @pagination="getJjcgjList" />
@ -142,7 +142,7 @@ export default {
created() { created() {
}, },
methods: { methods: {
getJjcgjList(val) { getJjcgjList(val) {
this.$modal.loading() this.$modal.loading()
studyFormPlan_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => { studyFormPlan_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
@ -183,10 +183,13 @@ export default {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })
}, },
showApprove() {
this.resetApprove()
this.formApprove.id = this.form.id
this.openApprove = true
async showApprove() {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.resetApprove()
this.formApprove.id = this.form.id
this.openApprove = true
}
}, },
resetApprove() { resetApprove() {
this.formApprove = { this.formApprove = {
@ -200,16 +203,21 @@ export default {
approve() { approve() {
this.$refs["formApprove"].validate(valid => { this.$refs["formApprove"].validate(valid => {
if (valid) { if (valid) {
this.$modal.loading()
studyFormPlan_sy(this.formApprove).then(response => {
this.openApprove = false
this.$modal.closeLoading()
this.$emit('close')
}).finally(() => {
this.$modal.closeLoading()
})
this.doapprove()
} }
}) })
},
async doapprove() {
let content = await this.$refs.templateTable.getFormData()
this.formApprove.bdnr = JSON.stringify(content)
this.$modal.loading()
studyFormPlan_sy(this.formApprove).then(response => {
this.$emit('close')
this.openSubmit = false
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
})
} }
} }
} }

+ 8
- 1
src/views/business/study/comp/tbbdList.vue View File

@ -69,7 +69,7 @@
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyFormFill:xz']">{{
<el-button type="primary" icon="el-icon-plus" v-if="isMatchSubject" @click="add()" v-hasPermi="['business:studyFormFill:xz']">{{
$t('page.business.study.studyFormFill.xzbd') }}</el-button> $t('page.business.study.studyFormFill.xzbd') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -206,6 +206,7 @@ export default {
this.searchForm.studyId = newVal.studyId this.searchForm.studyId = newVal.studyId
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
this.getIsMatchSubject()
this.search() this.search()
}, },
immediate: true, immediate: true,
@ -215,6 +216,7 @@ export default {
components: { Ghgsr, Fh, Fz, Bj, Xq, Qrfz, Sy, Jq, Gc, SelectDeptUser, SelectDeptUserDialog }, components: { Ghgsr, Fh, Fz, Bj, Xq, Qrfz, Sy, Jq, Gc, SelectDeptUser, SelectDeptUserDialog },
data() { data() {
return { return {
isMatchSubject:false,
leader: null, leader: null,
showFh: false, showFh: false,
showAudit: false, showAudit: false,
@ -247,6 +249,11 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
ghgsr(row) { ghgsr(row) {
this.currentRow = row this.currentRow = row
this.$refs.selectDeptUserDialog.show(null, null) this.$refs.selectDeptUserDialog.show(null, null)

+ 3
- 8
src/views/business/study/comp/ytbd/Xq.vue View File

@ -10,7 +10,7 @@
</div> </div>
<div class="right-top"> <div class="right-top">
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> <el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
<el-button type="primary" v-if="form.bdzt === 5 && form.tbzt === 1" @click="openApprove = true">{{
<el-button type="primary" v-if="form.bdzt === 5 && form.tbzt === 1&&form.userId==id" @click="openApprove = true">{{
$t('page.business.study.studyFormPre.tb') }}</el-button> $t('page.business.study.studyFormPre.tb') }}</el-button>
</div> </div>
</div> </div>
@ -159,22 +159,18 @@ export default {
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'nickName'
'nickName',
'id'
]), ]),
}, },
created() { created() {
}, },
methods: { methods: {
getJjcgjList(val) { getJjcgjList(val) {
this.$modal.loading()
studyFormPre_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => { studyFormPre_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
this.jcgjList = response.rows this.jcgjList = response.rows
this.jcgjTotal = response.total this.jcgjTotal = response.total
this.$refs.jcgjList.init(this.jcgjList) this.$refs.jcgjList.init(this.jcgjList)
this.$modal.closeLoading()
}).finally(() => {
this.$modal.closeLoading()
}) })
}, },
getQmxxList() { getQmxxList() {
@ -212,7 +208,6 @@ export default {
this.open = true this.open = true
this.getQmxxList() this.getQmxxList()
this.getJjcgjList() this.getJjcgjList()
this.$modal.closeLoading()
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })

+ 9
- 1
src/views/business/study/comp/ytbdList.vue View File

@ -50,7 +50,7 @@
<div class="ytbd-content"> <div class="ytbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
<el-button type="primary" icon="el-icon-plus" v-if="isMatchSubject" @click="showAdd()"
v-hasPermi="['business:studyFormPre:xz']">{{ v-hasPermi="['business:studyFormPre:xz']">{{
$t('page.business.study.studyFormPre.xzbd') }}</el-button> $t('page.business.study.studyFormPre.xzbd') }}</el-button>
</el-col> </el-col>
@ -169,6 +169,7 @@
</template> </template>
<script> <script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre' import { studyFormPre_list, studyFormPre_info } from '@/api/business/study/studyFormPre'
import { public_studyList, public_studyFormPreList } from '@/api/business/public/public' import { public_studyList, public_studyFormPreList } from '@/api/business/public/public'
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -202,6 +203,7 @@ export default {
this.searchForm.studySubjectId = newVal.studySubjectId this.searchForm.studySubjectId = newVal.studySubjectId
this.leader = newVal.leader this.leader = newVal.leader
this.search() this.search()
this.getIsMatchSubject()
}, },
immediate: true, immediate: true,
deep: true deep: true
@ -210,6 +212,7 @@ export default {
components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable }, components: { Bj, Xq, Sh, SelectDeptUser, TemplateTable },
data() { data() {
return { return {
isMatchSubject:false,
formPreview: { formPreview: {
templateSn: null templateSn: null
}, },
@ -261,6 +264,11 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
copy() { copy() {
this.$modal.loading() this.$modal.loading()
public_studyList().then(response => { public_studyList().then(response => {

Loading…
Cancel
Save