Browse Source

fix:[试验管理][填报跳转]

lkf
15881625488@163.com 3 months ago
parent
commit
504b4b9be0
8 changed files with 112 additions and 73 deletions
  1. +3
    -3
      src/router/index.js
  2. +10
    -0
      src/utils/index.js
  3. +20
    -16
      src/views/business/form/drug/comp/tbbdList.vue
  4. +12
    -9
      src/views/business/form/nonTrial/comp/tbbdList.vue
  5. +1
    -1
      src/views/business/study/comp/sqbd/Bj.vue
  6. +44
    -30
      src/views/business/study/comp/tbbd/Bj.vue
  7. +13
    -8
      src/views/business/study/comp/tbbdList.vue
  8. +9
    -6
      src/views/business/study/comp/ytbd/Xq.vue

+ 3
- 3
src/router/index.js View File

@ -217,7 +217,7 @@ export const dynamicRoutes = [
permissions: ['business:studyFormFill:bj'], permissions: ['business:studyFormFill:bj'],
children: [ children: [
{ {
path: ':formId(\\d+)/:fromYt/:key/:studyId',
path: ':key',
component: () => import('@/views/business/study/comp/tbbd/Bj'), component: () => import('@/views/business/study/comp/tbbd/Bj'),
name: 'studyFormFillBj', name: 'studyFormFillBj',
meta: { title: 'loading', activeMenu: '/trial/list' } meta: { title: 'loading', activeMenu: '/trial/list' }
@ -231,7 +231,7 @@ export const dynamicRoutes = [
permissions: ['business:nonTrialFormFill:bj'], permissions: ['business:nonTrialFormFill:bj'],
children: [ children: [
{ {
path: ':formId(\\d+)/:fromYt/:key/:studyId',
path: ':key',
component: () => import('@/views/business/study/comp/tbbd/Bj'), component: () => import('@/views/business/study/comp/tbbd/Bj'),
name: 'nonTrialFormFillBj', name: 'nonTrialFormFillBj',
meta: { title: 'loading', activeMenu: '/form/nonTrial' } meta: { title: 'loading', activeMenu: '/form/nonTrial' }
@ -245,7 +245,7 @@ export const dynamicRoutes = [
permissions: ['business:drugFormFill:bj'], permissions: ['business:drugFormFill:bj'],
children: [ children: [
{ {
path: ':formId(\\d+)/:fromYt/:key/:studyId',
path: ':key',
component: () => import('@/views/business/study/comp/tbbd/Bj'), component: () => import('@/views/business/study/comp/tbbd/Bj'),
name: 'drugFormFillBj', name: 'drugFormFillBj',
meta: { title: 'loading', activeMenu: '/form/drug' } meta: { title: 'loading', activeMenu: '/form/drug' }

+ 10
- 0
src/utils/index.js View File

@ -388,3 +388,13 @@ export function isNumberStr(str) {
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
} }
// 编码
export function caesarCipher(str) {
return btoa(btoa(str))
}
// 解码
export function caesarDecipher(str) {
return atob(atob(str));
}

+ 20
- 16
src/views/business/form/drug/comp/tbbdList.vue View File

@ -105,7 +105,8 @@
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:drugFormFill:xq']">{{ <el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:drugFormFill:xq']">{{
$t('form.detail') }}</el-button> $t('form.detail') }}</el-button>
<!-- 编辑 --> <!-- 编辑 -->
<el-button type="text" v-if="(scope.row.bdzt === 1 || scope.row.bdzt === 5 || scope.row.bdzt === 7) && id==scope.row.userId"
<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:drugFormFill:bj']">{{ @click="edit(scope.row)" v-hasPermi="['business:drugFormFill:bj']">{{
$t('form.edit') }}</el-button> $t('form.edit') }}</el-button>
<!-- 复核 --> <!-- 复核 -->
@ -122,11 +123,12 @@
@click="ghgsr(scope.row)" v-hasPermi="['business:drugFormFill:ghgsr']">{{ @click="ghgsr(scope.row)" v-hasPermi="['business:drugFormFill:ghgsr']">{{
$t('page.business.study.studyFormFill.ghgsr') }}</el-button> $t('page.business.study.studyFormFill.ghgsr') }}</el-button>
<!-- 审阅 --> <!-- 审阅 -->
<el-button type="text" v-if="(scope.row.bdzt === 5 || scope.row.bdzt === 7) && (isQa || checkRole(['bz']))" @click="sy(scope.row)"
v-hasPermi="['business:drugFormFill:sy']">{{
<el-button type="text"
v-if="(scope.row.bdzt === 5 || scope.row.bdzt === 7) && (isQa || checkRole(['bz']))"
@click="sy(scope.row)" v-hasPermi="['business:drugFormFill:sy']">{{
$t('page.business.study.studyFormFill.sy') }}</el-button> $t('page.business.study.studyFormFill.sy') }}</el-button>
<!-- 废止 --> <!-- 废止 -->
<el-button type="text" v-if="scope.row.bdzt === 1 && id==scope.row.userId" @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:drugFormFill:fz']">{{ v-hasPermi="['business:drugFormFill:fz']">{{
$t('page.business.study.studyFormFill.fz') }}</el-button> $t('page.business.study.studyFormFill.fz') }}</el-button>
<!-- 确认废止 --> <!-- 确认废止 -->
@ -183,6 +185,7 @@ import Ghgsr from "@/views/business/study/comp/tbbd/Ghgsr";
import Gc from "@/views/business/study/comp/tbbd/Gc"; import Gc from "@/views/business/study/comp/tbbd/Gc";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectDeptUserDialog from '@/views/business/comps/select/SelectDeptUserDialog'; import SelectDeptUserDialog from '@/views/business/comps/select/SelectDeptUserDialog';
import { caesarCipher } from "@/utils/index";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from "moment"; import moment from "moment";
export default { export default {
@ -216,7 +219,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 {
isQa:false,
isQa: false,
leader: null, leader: null,
showFh: false, showFh: false,
showAudit: false, showAudit: false,
@ -246,13 +249,13 @@ export default {
currentRow: null currentRow: null
} }
}, },
created() {this.getIsQa() },
created() { this.getIsQa() },
methods: { methods: {
checkPermi, checkPermi,
checkRole, checkRole,
getIsQa() { getIsQa() {
studySubject_isQa().then(response => { studySubject_isQa().then(response => {
this.isQa=response.data
this.isQa = response.data
}) })
}, },
ghgsr(row) { ghgsr(row) {
@ -313,22 +316,23 @@ export default {
// this.showEdit = true // this.showEdit = true
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId }) // this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId })
let key = 'formFillReturnUrl' + this.searchForm.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.searchForm.studyId,
formId: null
})) }))
this.$tab.openPage("新增表单", '/drug/formFillBj/0/0/' + key + '/' + this.searchForm.studyId)
this.$tab.openPage("新增表单", '/drug/formFillBj/' + params)
}, },
edit(row) { edit(row) {
// this.showEdit = true // this.showEdit = true
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit(row) // this.$refs.Bj.edit(row)
let key = 'formFillReturnUrl' + this.searchForm.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.searchForm.studyId,
formId: row.id
})) }))
this.$tab.openPage(row.bdmc, '/drug/formFillBj/' + row.id + "/0/" + key + '/' + searchForm.studyId)
this.$tab.openPage(row.bdmc, '/drug/formFillBj/' + params)
}, },
bjClose() { bjClose() {
this.showEdit = false this.showEdit = false

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

@ -94,7 +94,7 @@
<el-table-column :label="$t('page.business.study.studyFormFill.sfbl')" align="center" prop="status" <el-table-column :label="$t('page.business.study.studyFormFill.sfbl')" align="center" prop="status"
width="100"> width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.sfbl ==='是'">{{ $t('page.business.study.studyFormFill.yes') }}</span>
<span v-if="scope.row.sfbl === '是'">{{ $t('page.business.study.studyFormFill.yes') }}</span>
<span v-if="scope.row.sfbl === '否'">{{ $t('page.business.study.studyFormFill.no') }}</span> <span v-if="scope.row.sfbl === '否'">{{ $t('page.business.study.studyFormFill.no') }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -186,6 +186,7 @@ import Ghgsr from "@/views/business/study/comp/tbbd/Ghgsr";
import Gc from "@/views/business/study/comp/tbbd/Gc"; import Gc from "@/views/business/study/comp/tbbd/Gc";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectDeptUserDialog from '@/views/business/comps/select/SelectDeptUserDialog'; import SelectDeptUserDialog from '@/views/business/comps/select/SelectDeptUserDialog';
import { caesarCipher } from "@/utils/index";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from "moment"; import moment from "moment";
export default { export default {
@ -316,21 +317,23 @@ export default {
// this.showEdit = true // this.showEdit = true
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId }) // this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId })
let key = 'formFillReturnUrl' + this.searchForm.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.searchForm.studyId,
formId: null
})) }))
this.$tab.openPage("新增表单", '/nonTrial/formFillBj/0/0/' + key + '/' + this.searchForm.studyId)
this.$tab.openPage("新增表单", '/nonTrial/formFillBj/' + params)
}, },
edit(row) { edit(row) {
// this.showEdit = true // this.showEdit = true
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit(row) // this.$refs.Bj.edit(row)
let key = 'formFillReturnUrl' + this.searchForm.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.searchForm.studyId,
formId: row.id
})) }))
this.$tab.openPage(row.bdmc, '/nonTrial/formFillBj/' + row.id + "/0/" + key + '/' + searchForm.studyId)
this.$tab.openPage(row.bdmc, '/nonTrial/formFillBj/' + params)
}, },
bjClose() { bjClose() {
this.showEdit = false this.showEdit = false

+ 1
- 1
src/views/business/study/comp/sqbd/Bj.vue View File

@ -132,7 +132,7 @@ import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate"; import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
import { deepClone } from "@/utils/index";
import { deepClone,caesarDecipher } from "@/utils/index";
export default { export default {
name: "Bj", name: "Bj",

+ 44
- 30
src/views/business/study/comp/tbbd/Bj.vue View File

@ -231,7 +231,7 @@ import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import { deepClone } from "@/utils/index";
import { deepClone, caesarDecipher } from "@/utils/index";
export default { export default {
name: "Bj", name: "Bj",
@ -334,32 +334,42 @@ export default {
}) })
}, },
getInfo() { getInfo() {
let formId = this.$route.params.formId
let studyId = this.$route.params.studyId
let fromYt = this.$route.params.fromYt
this.reset()
if (parseInt(formId) > 0) {
if (fromYt + '' == "10") {
this.showIndex = 1
this.bdmbTitle = this.$t('page.business.study.studyFormFill.ytbd')
let key = this.$route.params.key
if (key && key != undefined && key != '') {
let params = null
try {
params = JSON.parse(caesarDecipher(this.$route.params.key))
} catch (e) {
console.log('参数错误')
}
if (params) {
this.reset()
if (params.formId && params.formId != '') {
if (params.fromYt) {
this.showIndex = 1
this.bdmbTitle = this.$t('page.business.study.studyFormFill.ytbd')
} else {
this.showIndex = 2
}
this.$modal.loading()
studyFormFill_info({ id: params.formId }).then(response => {
this.form = response.data
this.form.qmyy = this.$t('page.business.study.studyFormFill.zztjyzbd')
this.templateData = deepClone(this.form)
this.$modal.closeLoading()
})
} else {
this.showIndex = 1
this.$modal.loading()
study_info({ id: params.studyId }).then(response => {
this.form = _.merge({}, this.form, { stydyId: params.studyId, resourceStudy: response.data.resource, sftb: 1 })
this.templateData = deepClone(this.form)
this.$modal.closeLoading()
})
}
} else { } else {
this.showIndex = 2
this.$tab.closeOpenPage('/404')
} }
this.$modal.loading()
studyFormFill_info({ id: formId }).then(response => {
this.form = response.data
this.form.qmyy = this.$t('page.business.study.studyFormFill.zztjyzbd')
this.templateData = deepClone(this.form)
this.$modal.closeLoading()
})
} else {
this.showIndex = 1
this.$modal.loading()
study_info({ id: studyId }).then(response => {
this.form = _.merge({}, this.form, { stydyId: studyId, resourceStudy: response.data.resource, sftb: 1 })
this.templateData = deepClone(this.form)
this.$modal.closeLoading()
})
} }
}, },
getDisabledCz(bh, idx) { getDisabledCz(bh, idx) {
@ -450,11 +460,15 @@ export default {
this.form.templateSn = val.sn this.form.templateSn = val.sn
}, },
cancel() { cancel() {
let data = localStorage.getItem(this.$route.params.key)
if (data && data != '') {
let params = JSON.parse(data)
const obj = { path: params.url }
this.$tab.closeOpenPage(obj)
try {
let key = caesarDecipher(this.$route.params.key)
let data = JSON.parse(key)
if (data && data != undefined && data != '') {
const obj = { path: data.url }
this.$tab.closeOpenPage(obj)
}
} catch (e) {
this.$tab.closeOpenPage('/404')
} }
}, },
reset() { reset() {

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

@ -184,6 +184,7 @@ import Ghgsr from "./tbbd/Ghgsr";
import Gc from "./tbbd/Gc"; import Gc from "./tbbd/Gc";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectDeptUserDialog from '@/views/business/comps/select/SelectDeptUserDialog'; import SelectDeptUserDialog from '@/views/business/comps/select/SelectDeptUserDialog';
import { caesarCipher } from "@/utils/index";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from "moment"; import moment from "moment";
export default { export default {
@ -322,21 +323,25 @@ export default {
// this.showEdit = true // this.showEdit = true
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId }) // this.$refs.Bj.edit({ studySn:this.searchForm.studySn, studyMc:this.searchForm.studyMc,studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId })
let key = 'formFillReturnUrl' + this.searchForm.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params=caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.searchForm.studyId,
id:null
})) }))
this.$tab.openPage("新增表单", '/study/formFillBj/0/0/' + key+'/'+this.searchForm.studyId)
this.$tab.openPage("新增表单", '/study/formFillBj/'+params)
}, },
edit(row) { edit(row) {
// this.showEdit = true // this.showEdit = true
// this.$emit('showDetail', this.showEdit) // this.$emit('showDetail', this.showEdit)
// this.$refs.Bj.edit(row) // this.$refs.Bj.edit(row)
let key = 'formFillReturnUrl' + this.searchForm.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params=caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.searchForm.studyId,
formId:row.id
})) }))
this.$tab.openPage(row.bdmc, '/study/formFillBj/' + row.id + "/0/" + key+'/'+this.searchForm.studyId)
debugger
this.$tab.openPage(row.bdmc, '/study/formFillBj/' +params)
}, },
bjClose() { bjClose() {
this.showEdit = false this.showEdit = false

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

@ -106,6 +106,7 @@ import { studyFormPre_tb, studyFormPre_info, studyFormPre_jcgj, studyFormPre_qmx
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList"; import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable'; import TemplateTable from '@/views/business/comps/template/TemplateTable';
import { caesarCipher } from "@/utils/index";
export default { export default {
name: "Xq", name: "Xq",
@ -229,16 +230,18 @@ export default {
if (valid) { if (valid) {
this.$modal.loading() this.$modal.loading()
studyFormPre_tb(this.formApprove).then(response => { studyFormPre_tb(this.formApprove).then(response => {
let key = 'formFillReturnUrl' + response.data.studyId
localStorage.setItem(key, JSON.stringify({
url: this.$route.fullPath
let params = caesarCipher(JSON.stringify({
url: this.$route.fullPath,
studyId: this.form.studyId,
formId: response.data.id,
fromYt: true
})) }))
if (this.$route.fullPath.indexOf('/study/') > -1) { if (this.$route.fullPath.indexOf('/study/') > -1) {
this.$tab.openPage(response.data.bdmc, '/study/formFillBj/' + response.data.id + "/10/" + key + '/' + response.data.studyId)
this.$tab.openPage(response.data.bdmc, '/study/formFillBj/' + params)
} else if (this.$route.fullPath.indexOf('/nonTrial/') > -1) { } else if (this.$route.fullPath.indexOf('/nonTrial/') > -1) {
this.$tab.openPage(response.data.bdmc, '/nonTrial/formFillBj/' + response.data.id + "/10/" + key + '/' + response.data.studyId)
this.$tab.openPage(response.data.bdmc, '/nonTrial/formFillBj/' + params)
} else { } else {
this.$tab.openPage(response.data.bdmc, '/drug/formFillBj/' + response.data.id + "/10/" + key + '/' + response.data.studyId)
this.$tab.openPage(response.data.bdmc, '/drug/formFillBj/' + params)
} }
this.$emit('close') this.$emit('close')
this.openApprove = false this.openApprove = false

Loading…
Cancel
Save