Browse Source

feat: [试验管理] 试验方法页面

master
memorylkf 1 week ago
parent
commit
d9a03f13e4
4 changed files with 88 additions and 4 deletions
  1. +3
    -1
      src/views/business/study/comp/enter.vue
  2. +6
    -2
      src/views/business/study/comp/suject.vue
  3. +78
    -0
      src/views/business/study/comp/syff.vue
  4. +1
    -1
      src/views/business/study/comp/ytbd.vue

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

@ -13,6 +13,7 @@
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
<sqbd v-if="active === 'sqbd'" :study="study" @showDetail="showDetailCallback"/>
<syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/>
<syff v-if="active === 'syff'" :study="study" @showDetail="showDetailCallback"/>
</div>
</div>
</div>
@ -23,10 +24,11 @@ import ytbd from './ytbd.vue'
import tbbd from './tbbd.vue'
import sqbd from './sqbd.vue'
import syxx from './syxx.vue'
import syff from './syff.vue'
export default {
name: 'StudyEnter',
props: {},
components: { ytbd, tbbd ,syxx,sqbd},
components: { ytbd, tbbd ,syxx,sqbd,syff},
computed: {},
filters: {},
data() {

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

@ -10,13 +10,13 @@
<div class="operate-img"></div>
<div class="operate-left">{{$t('page.business.study.studyEnter.syxkxx')}}</div>
<div class="operate-right">
<i class="el-icon-edit operate-icon" @click="editSubject" v-if="study.createBy==userId"></i>
<i class="el-icon-edit operate-icon" @click="editSubject" v-if="operate && study.createBy==userId"></i>
</div>
</div>
<div class="subject-content">
<div class="subject-item" :class="selectedSubjectId===item.id?'active':''" v-for="(item,index) in subjectList" :key="index" @click="changeSelectedSubject(item)">
<div class="subject-item-name">{{item.deptName}}({{item.leaderName}})</div>
<div class="subject-item-add" v-if="item.leader==userId">
<div class="subject-item-add" v-if="operate && item.leader==userId">
<el-button type="primary" plain @click.stop="yq(item)">{{$t('page.business.study.studyEnter.yq')}}</el-button>
</div>
</div>
@ -77,6 +77,10 @@ export default {
default:()=>{
return {}
}
},
operate:{
type:Boolean,
default:false
}
},
watch: {

+ 78
- 0
src/views/business/study/comp/syff.vue View File

@ -0,0 +1,78 @@
<template>
<div class="study-tbbd">
<div class="tbbd-left" v-show="!showDetail">
<sbject :study="study" @change="changeSubject" />
</div>
<div class="tbbd-right" v-if="studyInfo.studySubjectId!=''">
试验方法可以参考飞哥其他几个
<!-- <tbbdList :study="studyInfo" @showDetail="showDetailCallback"/> -->
</div>
</div>
</template>
<script>
import sbject from './suject.vue'
export default {
name: 'StudySyff',
props: {
study:{
type:Object,
default:()=>{
return {}
}
}
},
watch:{
study: {
immediate: true,
handler(v) {
this.studyInfo = {
studyId:v.id,
studyLeader:v.leader,
studySubjectId:''
}
}
},
},
components: {sbject},
computed: {},
filters: {},
data() {
return {
showDetail:false,
studyInfo:{
studyId:this.study.id,
studyLeader:this.study.leader,
studySubjectId:''
}
}
},
created() {},
methods: {
changeSubject(val){
this.studyInfo.studySubjectId = val
},
showDetailCallback(val){
this.showDetail=val
this.$emit('showDetail',val)
}
}
}
</script>
<style lang="scss" scoped>
.study-tbbd {
display: flex;
flex-direction: row;
.tbbd-left {
background: #fff;
padding: 20px;
margin-right: 10px;
flex-shrink: 0;
width: 350px;
}
.tbbd-right{
flex-grow: 1;
overflow: hidden;
}
}
</style>

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

@ -1,7 +1,7 @@
<template>
<div class="study-ytbd">
<div class="ytbd-left" v-show="!showDetail">
<sbject :study="study" @change="changeSubject" />
<sbject :study="study" :operate="true" @change="changeSubject" />
</div>
<div class="ytbd-right" v-if="studyInfo.studySubjectId!=''">
<ytbdList :study="studyInfo" @showDetail="showDetailCallback"/>

Loading…
Cancel
Save