Browse Source

feat: [试验管理] 将进入试验改成新tab

master
memorylkf 3 days ago
parent
commit
bad04c4d07
8 changed files with 103 additions and 35 deletions
  1. +43
    -16
      src/router/index.js
  2. +17
    -3
      src/views/business/form/drug/comp/enter.vue
  3. +4
    -3
      src/views/business/form/drug/list.vue
  4. +15
    -3
      src/views/business/form/nonTrial/comp/enter.vue
  5. +4
    -3
      src/views/business/form/nonTrial/list.vue
  6. +15
    -1
      src/views/business/study/comp/enter.vue
  7. +1
    -1
      src/views/business/study/comp/suject.vue
  8. +4
    -5
      src/views/business/study/list.vue

+ 43
- 16
src/router/index.js View File

@ -46,7 +46,7 @@ export const constantRoutes = [
component: () => import('@/views/login'), component: () => import('@/views/login'),
hidden: true hidden: true
}, },
{
{
path: '/lblh', path: '/lblh',
component: () => import('@/views/lblh/index'), component: () => import('@/views/lblh/index'),
hidden: true hidden: true
@ -167,22 +167,49 @@ export const dynamicRoutes = [
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
} }
] ]
},
{
path: '/study/enter',
component: Layout,
hidden: true,
permissions: ['business:study:enter'],
children: [
{
path: ':studyId(\\d+)',
component: () => import('@/views/business/study/comp/enter'),
name: 'StudyEnter',
meta: { title: '进入试验', activeMenu: '/trial/list' }
}
]
},
{
path: '/nonTrial/enter',
component: Layout,
hidden: true,
permissions: ['business:form:nonTrial:enter'],
children: [
{
path: ':studyId(\\d+)',
component: () => import('@/views/business/form/nonTrial/comp/enter'),
name: 'NonTrialEnter',
meta: { title: '进入', activeMenu: '/form/nonTrial' }
}
]
},
{
path: '/drug/enter',
component: Layout,
hidden: true,
permissions: ['business:form:drug:enter'],
children: [
{
path: ':studyId(\\d+)',
component: () => import('@/views/business/form/drug/comp/enter'),
name: 'DrugEnter',
meta: { title: '进入', activeMenu: '/form/drug' }
}
]
} }
// {
// path: '/study/enter',
// component: Layout,
// hidden: true,
// permissions: ['business:study:enter'],
// children: [
// {
// path: 'index/:studyId(\\d+)',
// component: () => import('@/views/business/study/comp/enter'),
// name: 'Data',
// meta: { title: '进入试验', activeMenu: '/busuness/study/list' }
// }
// ]
// }
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错

+ 17
- 3
src/views/business/form/drug/comp/enter.vue View File

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="content-box">
<div class="content-box" v-if="study.id!='' && study.id!=undefined">
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" /> <ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/> <tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
<sqbd v-if="active === 'sqbd'" :study="study" @showDetail="showDetailCallback"/> <sqbd v-if="active === 'sqbd'" :study="study" @showDetail="showDetailCallback"/>
@ -19,12 +19,13 @@
</template> </template>
<script> <script>
import { drug_info} from "@/api/business/form/drug";
import ytbd from './ytbd.vue' import ytbd from './ytbd.vue'
import tbbd from './tbbd.vue' import tbbd from './tbbd.vue'
import sqbd from './sqbd.vue' import sqbd from './sqbd.vue'
import wzlb from './wzlb.vue' import wzlb from './wzlb.vue'
export default { export default {
name: 'StudyEnter',
name: 'DrugEnter',
props: {}, props: {},
components: { ytbd, tbbd ,sqbd,wzlb}, components: { ytbd, tbbd ,sqbd,wzlb},
computed: {}, computed: {},
@ -43,8 +44,20 @@ export default {
study: {}, study: {},
} }
}, },
created() { },
created() {
this.getInfo()
},
methods: { methods: {
getInfo(){
this.$modal.loading()
drug_info({id:this.$route.params.studyId}).then(({data}) => {
this.study = data
const obj = Object.assign({}, this.$route, { title: '麻精药:'+this.study.sn })
this.$tab.updatePage(obj);
}).finally(() => {
this.$modal.closeLoading()
})
},
show(row) { show(row) {
this.study = row this.study = row
}, },
@ -61,6 +74,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.study-enter { .study-enter {
margin: 10px 10px;
.search-box { .search-box {
background: #fff; background: #fff;
padding: 0; padding: 0;

+ 4
- 3
src/views/business/form/drug/list.vue View File

@ -141,7 +141,7 @@
</div> </div>
<Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" /> <Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" />
<Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" />
<!-- <Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" /> -->
<Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" /> <Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" />
<Sign ref="signRef" @callback="doSign" /> <Sign ref="signRef" @callback="doSign" />
</div> </div>
@ -237,8 +237,9 @@ export default {
this.getList() this.getList()
}, },
enter(row){ enter(row){
this.showType = 'enter'
this.$refs.enter.show(row)
this.$tab.openPage("进入", '/drug/enter/' + row.id)
// this.showType = 'enter'
// this.$refs.enter.show(row)
}, },
detail(row){ detail(row){
this.showType = 'detail' this.showType = 'detail'

+ 15
- 3
src/views/business/form/nonTrial/comp/enter.vue View File

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="content-box">
<div class="content-box" v-if="study.id!='' && study.id!=undefined">
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" /> <ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/> <tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
<syff v-if="active === 'syff'" :study="study" @showDetail="showDetailCallback"/> <syff v-if="active === 'syff'" :study="study" @showDetail="showDetailCallback"/>
@ -19,12 +19,13 @@
</template> </template>
<script> <script>
import { nonTrial_info} from "@/api/business/form/nonTrial";
import ytbd from './ytbd.vue' import ytbd from './ytbd.vue'
import tbbd from './tbbd.vue' import tbbd from './tbbd.vue'
import syff from './syff.vue' import syff from './syff.vue'
import wzlb from './wzlb.vue' import wzlb from './wzlb.vue'
export default { export default {
name: 'StudyEnter',
name: 'NonTrialEnter',
props: {}, props: {},
components: { ytbd, tbbd ,syff,wzlb}, components: { ytbd, tbbd ,syff,wzlb},
computed: {}, computed: {},
@ -43,8 +44,18 @@ export default {
study: {}, study: {},
} }
}, },
created() { },
created() {this.getInfo() },
methods: { methods: {
getInfo(){
this.$modal.loading()
nonTrial_info({id:this.$route.params.studyId}).then(({data}) => {
this.study = data
const obj = Object.assign({}, this.$route, { title: '非试验:'+this.study.sn })
this.$tab.updatePage(obj);
}).finally(() => {
this.$modal.closeLoading()
})
},
show(row) { show(row) {
this.study = row this.study = row
}, },
@ -61,6 +72,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.study-enter { .study-enter {
margin: 10px 10px;
.search-box { .search-box {
background: #fff; background: #fff;
padding: 0; padding: 0;

+ 4
- 3
src/views/business/form/nonTrial/list.vue View File

@ -141,7 +141,7 @@
</div> </div>
<Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" /> <Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" />
<Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" />
<!-- <Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" /> -->
<Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" /> <Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" />
<Sign ref="signRef" @callback="doSign" /> <Sign ref="signRef" @callback="doSign" />
</div> </div>
@ -237,8 +237,9 @@ export default {
this.getList() this.getList()
}, },
enter(row){ enter(row){
this.showType = 'enter'
this.$refs.enter.show(row)
this.$tab.openPage("进入", '/nonTrial/enter/' + row.id)
// this.showType = 'enter'
// this.$refs.enter.show(row)
}, },
detail(row){ detail(row){
this.showType = 'detail' this.showType = 'detail'

+ 15
- 1
src/views/business/study/comp/enter.vue View File

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="content-box">
<div class="content-box" v-if="study.id!='' && study.id!=undefined">
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" /> <ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/> <tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
<syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/> <syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/>
@ -21,6 +21,7 @@
</template> </template>
<script> <script>
import { study_info} from "@/api/business/study/study";
import ytbd from './ytbd.vue' import ytbd from './ytbd.vue'
import tbbd from './tbbd.vue' import tbbd from './tbbd.vue'
import syxx from './syxx.vue' import syxx from './syxx.vue'
@ -53,8 +54,20 @@ export default {
// let x = this.$route.params // let x = this.$route.params
// let y = this.$route.query // let y = this.$route.query
// debugger // debugger
this.getInfo()
}, },
methods: { methods: {
getInfo(){
this.$modal.loading()
study_info({id:this.$route.params.studyId}).then(({data}) => {
this.study = data
const obj = Object.assign({}, this.$route, { title: '进入试验:'+this.study.sn })
this.$tab.updatePage(obj);
}).finally(() => {
this.$modal.closeLoading()
})
},
show(row) { show(row) {
this.study = row this.study = row
}, },
@ -71,6 +84,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.study-enter { .study-enter {
margin: 10px 10px;
.search-box { .search-box {
background: #fff; background: #fff;
padding: 0; padding: 0;

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

@ -131,7 +131,7 @@ export default {
this.subjectList = response.data; this.subjectList = response.data;
for(let i=0;i<this.subjectList.length;i++){ for(let i=0;i<this.subjectList.length;i++){
let item = this.subjectList[i] let item = this.subjectList[i]
if(item.leader==this.userId || (item.userIdList && item.userIdList.length>0 && item.userIdList.indexof(this.userId)>-1)){
if(item.leader==this.userId || (item.userIdList && item.userIdList.length>0 && item.userIdList.indexOf(this.userId)>-1)){
this.selectedSubjectId = item.id this.selectedSubjectId = item.id
break break
} }

+ 4
- 5
src/views/business/study/list.vue View File

@ -140,7 +140,7 @@
</div> </div>
<Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" /> <Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" />
<Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" />
<!-- <Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" /> -->
<Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" /> <Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" />
<Sign ref="signRef" @callback="doSign" /> <Sign ref="signRef" @callback="doSign" />
</div> </div>
@ -236,11 +236,10 @@ export default {
this.getList() this.getList()
}, },
enter(row){ enter(row){
// const params = row
// this.$tab.openPage("", '/study/enter/index/' + row.id, params)
this.$tab.openPage("进入试验", '/study/enter/' + row.id)
this.showType = 'enter'
this.$refs.enter.show(row)
// this.showType = 'enter'
// this.$refs.enter.show(row)
}, },
detail(row){ detail(row){
this.showType = 'detail' this.showType = 'detail'

Loading…
Cancel
Save