@ -35,7 +35,7 @@
< / e l - f o r m - i t e m >
< / e l - c o l >
< el -col >
< el -button type = "primary" @click ="sdsy" > {{ $ t ( ' page.business.study.studyFormPlan.sdsy ' ) }} < / el -button >
< el -button type = "primary" @click ="sdsy" v-hasPermi ="['business:study:sd']" v-if="studyInfo.createBy==userId && studyInfo.status!=5" > {{ $ t ( ' page.business.study.studyFormPlan.sdsy ' ) }} < / el -button >
< / e l - c o l >
< / e l - r o w >
< / e l - f o r m >
@ -52,12 +52,15 @@
< div class = "syxx-content" >
< jhbdList :study ="studyInfo" @showDetail ="showDetailCallback" / >
< / div >
< Sign ref = "syxxSignRef" @callback ="doSign" / >
< / div >
< / template >
< script >
import Sign from './sign.vue'
import jhbdList from './jhbdList.vue'
import { study_info } from "@/api/business/study/study"
import { study_info , study_checkSd , study_sd } from "@/api/business/study/study"
import { studySubject_listByStudyId } from '@/api/business/study/studySubject'
export default {
name : 'StudyTbbd' ,
@ -78,9 +81,10 @@ export default {
}
} ,
} ,
components : { jhbdList } ,
components : { jhbdList , Sign } ,
data ( ) {
return {
userId : this . $store . getters . id ,
showDetail : false ,
id : { } ,
studyInfo : { } ,
@ -107,7 +111,29 @@ export default {
} )
} ,
sdsy ( ) {
alert ( 'todo' )
this . $modal . loading ( )
study_checkSd ( {
study : { id : this . study . id } ,
} ) . then ( ( ) => {
this . $refs . syxxSignRef . show ( this . $t ( 'page.business.study.study.sdsy' ) , this . $t ( 'page.business.study.study.sdsy' ) )
} ) . finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
doSign ( val ) {
this . doSd ( val )
} ,
doSd ( sign ) {
this . $modal . loading ( )
study_sd ( {
study : { id : this . study . id } ,
sign : sign
} ) . then ( ( ) => {
this . $refs . syxxSignRef . cancel ( )
this . getStudyInfo ( )
} ) . finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
showDetailCallback ( val ) {
this . showDetail = val