Browse Source

feat: [试验管理] 权限控制

master
memorylkf 4 days ago
parent
commit
1de8fe9036
4 changed files with 36 additions and 14 deletions
  1. +8
    -1
      src/api/business/study/studySubject.js
  2. +17
    -10
      src/views/business/study/comp/tbbdList.vue
  3. +9
    -1
      src/views/business/study/comp/ytbd/Xq.vue
  4. +2
    -2
      src/views/business/study/comp/ytbdList.vue

+ 8
- 1
src/api/business/study/studySubject.js View File

@ -29,4 +29,11 @@ export function studySubject_isMatchSubject(query) {
method: 'get',
params: query
})
}
}
export function studySubject_isQa(query) {
return request({
url: '/system/business/studySubject/isQa',
method: 'get',
params: query
})
}

+ 17
- 10
src/views/business/study/comp/tbbdList.vue View File

@ -105,35 +105,35 @@
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyFormFill:xq']">{{
$t('form.detail') }}</el-button>
<!-- 编辑 -->
<el-button type="text" v-if="scope.row.bdzt === 1 || scope.row.bdzt === 5 || scope.row.bdzt === 7"
<el-button type="text" v-if="(scope.row.bdzt === 1 || scope.row.bdzt === 5 || scope.row.bdzt === 7) && id==scope.row.userId"
@click="edit(scope.row)" v-hasPermi="['business:studyFormFill:bj']">{{
$t('form.edit') }}</el-button>
<!-- 复核 -->
<el-button type="text" v-if="scope.row.bdzt === 3" @click="fh(scope.row)"
<el-button type="text" v-if="scope.row.bdzt === 3 && isMatchSubject" @click="fh(scope.row)"
v-hasPermi="['business:studyFormFill:fh']">{{
$t('page.business.study.studyFormFill.fh') }}</el-button>
<!-- 加签 -->
<el-button type="text" v-if="scope.row.bdzt === 1" @click="jq(scope.row)"
<el-button type="text" v-if="scope.row.bdzt === 1 && isMatchSubject" @click="jq(scope.row)"
v-hasPermi="['business:studyFormFill:jq']">{{
$t('page.business.study.studyFormFill.jq') }}</el-button>
<!-- 更换归属人 -->
<el-button type="text"
v-if="scope.row.bdzt === 1 || scope.row.bdzt === 3 || scope.row.bdzt === 5 || scope.row.bdzt === 7"
v-if="(scope.row.bdzt === 1 || scope.row.bdzt === 3 || scope.row.bdzt === 5 || scope.row.bdzt === 7) && id==scope.row.subjectLeader"
@click="ghgsr(scope.row)" v-hasPermi="['business:studyFormFill:ghgsr']">{{
$t('page.business.study.studyFormFill.ghgsr') }}</el-button>
<!-- 审阅 -->
<el-button type="text" v-if="scope.row.bdzt === 5 || scope.row.bdzt === 7" @click="sy(scope.row)"
<el-button type="text" v-if="(scope.row.bdzt === 5 || scope.row.bdzt === 7) && (isQa || id==scope.row.studyLeader)" @click="sy(scope.row)"
v-hasPermi="['business:studyFormFill:sy']">{{
$t('page.business.study.studyFormFill.sy') }}</el-button>
<!-- 废止 -->
<el-button type="text" v-if="scope.row.bdzt === 1" @click="fz(scope.row)"
<el-button type="text" v-if="scope.row.bdzt === 1 && id==scope.row.userId" @click="fz(scope.row)"
v-hasPermi="['business:studyFormFill:fz']">{{
$t('page.business.study.studyFormFill.fz') }}</el-button>
<!-- 确认废止 -->
<el-button type="text" v-if="scope.row.bdzt === 9" @click="qrfz(scope.row)"
<el-button type="text" v-if="scope.row.bdzt === 9 && id==scope.row.studyLeader" @click="qrfz(scope.row)"
v-hasPermi="['business:studyFormFill:qrfz']">{{
$t('page.business.study.studyFormFill.qrfz') }}</el-button>
<!-- 观察 -->
<!-- 观察 todo 观察按钮只在系统模板为细胞复苏记录表才展示) -->
<el-button type="text" v-if="scope.row.bdzt === 1" @click="gc(scope.row)"
v-hasPermi="['business:studyFormFill:gc']">{{
$t('page.business.study.studyFormFill.gc') }}</el-button>
@ -169,7 +169,7 @@
</template>
<script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studySubject_isMatchSubject,studySubject_isQa } from "@/api/business/study/studySubject"
import { studyFormFill_list } from '@/api/business/study/studyFormFill'
import Bj from "./tbbd/Bj";
import Xq from "./tbbd/Xq";
@ -218,6 +218,7 @@ export default {
data() {
return {
isMatchSubject:false,
isQa:false,
leader: null,
showFh: false,
showAudit: false,
@ -248,13 +249,19 @@ export default {
currentRow: null
}
},
created() { },
created() {this.getIsQa() },
methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.searchForm.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
getIsQa() {
studySubject_isQa().then(response => {
this.isQa=response.data
})
},
ghgsr(row) {
this.currentRow = row
this.$refs.selectDeptUserDialog.show(null, null)

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

@ -10,7 +10,7 @@
</div>
<div class="right-top">
<el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
<el-button type="primary" v-if="form.bdzt === 5 && form.tbzt === 1&&form.userId==id" @click="openApprove = true">{{
<el-button type="primary" v-if="form.bdzt === 5 && isMatchSubject" @click="openApprove = true">{{
$t('page.business.study.studyFormPre.tb') }}</el-button>
</div>
</div>
@ -100,6 +100,7 @@
</template>
<script>
import { studySubject_isMatchSubject } from "@/api/business/study/studySubject"
import { studyFormPre_tb, studyFormPre_info, studyFormPre_jcgj, studyFormPre_qmxx } from "@/api/business/study/studyFormPre"
import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList";
@ -110,6 +111,7 @@ export default {
components: { JcgjList, TemplateTable },
data() {
return {
isMatchSubject:false,
openApprove: false,
formApprove: {
id: null,
@ -166,6 +168,11 @@ export default {
created() {
},
methods: {
getIsMatchSubject() {
studySubject_isMatchSubject({studySubjectId:this.form.studySubjectId }).then(response => {
this.isMatchSubject=response.data
})
},
getJjcgjList(val) {
studyFormPre_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
this.jcgjList = response.rows
@ -208,6 +215,7 @@ export default {
this.open = true
this.getQmxxList()
this.getJjcgjList()
this.getIsMatchSubject()
}).finally(() => {
this.$modal.closeLoading()
})

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

@ -92,13 +92,13 @@
<template>
<!-- 有权限审核 -->
<el-button type="text" @click="audit(scope.row)" v-hasPermi="['business:studyFormPre:sh']"
v-if="scope.row.bdzt === 3">{{ $t('page.business.form.audit') }}</el-button>
v-if="scope.row.bdzt === 3 && isMatchSubject">{{ $t('page.business.form.audit') }}</el-button>
</template>
</template>
<template v-else>
<!-- 有权限审核 -->
<el-button type="text" @click="audit(scope.row)" v-hasPermi="['business:studyFormPre:sh']"
v-if="scope.row.bdzt === 3">{{ $t('page.business.form.audit') }}</el-button>
v-if="scope.row.bdzt === 3 && isMatchSubject">{{ $t('page.business.form.audit') }}</el-button>
</template>
</template>
</el-table-column>

Loading…
Cancel
Save