@ -90,11 +90,11 @@
<!-- 归档 -- >
< el -button type = "text" @click ="gd(scope.row)" v-hasPermi ="['business:study:gd']" v-if="scope.row.status===5" > {{ $ t ( ' page.business.study.study.gd ' ) }} < / el -button >
<!-- 解锁 -- >
< el -button type = "text" @click ="jd (scope.row)" v-hasPermi ="['business:study:js']" v-if="scope.row.status===5" > {{ $ t ( ' page.business.study.study.js ' ) }} < / el -button >
< el -button type = "text" @click ="js (scope.row)" v-hasPermi ="['business:study:js']" v-if="scope.row.status===5" > {{ $ t ( ' page.business.study.study.js ' ) }} < / el -button >
<!-- 解档 -- >
< el -button type = "text" @click ="jd(scope.row)" v-hasPermi ="['business:study:jd']" v-if="scope.row.status===9 && scope.row.borrowStatus===1" > {{ $ t ( ' page.business.study.study.jd ' ) }} < / el -button >
<!-- 借阅 -- >
< el -button type = "text" @click ="jd (scope.row)" v-hasPermi ="['business:study:jy']" v-if="scope.row.status===9 && scope.row.borrowStatus===1" > {{ $ t ( ' page.business.study.study.jy ' ) }} < / el -button >
< el -button type = "text" @click ="jy (scope.row)" v-hasPermi ="['business:study:jy']" v-if="scope.row.status===9 && scope.row.borrowStatus===1" > {{ $ t ( ' page.business.study.study.jy ' ) }} < / el -button >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
@ -142,15 +142,16 @@
< Edit ref = "edit" v -show = " showType = = = ' edit ' " @cancel ="showType='list'" @save ="save" / >
< Enter ref = "enter" v -show = " showType = = = ' enter ' " @cancel ="showType='list'" / >
< Detail ref = "detail" v -show = " showType = = = ' detail ' " @cancel ="showType='list'" / >
< Sign ref = "signRef" @callback ="doSign" / >
< / div >
< / template >
< script >
import { study_list , study_info , study_save , study_delete } from "@/api/business/study/study" ;
import { study_list , study_delete , study_gd , study_js , study_jd , study_jy } from "@/api/business/study/study" ;
import Edit from './comp/edit.vue'
import Enter from './comp/enter.vue'
import Detail from './comp/detail.vue'
import Sign from './comp/sign.vue'
export default {
name : "Study" ,
props : {
@ -158,7 +159,8 @@ export default {
components : {
Edit ,
Enter ,
Detail
Detail ,
Sign
} ,
computed : {
} ,
@ -182,7 +184,10 @@ export default {
total : 0 ,
list : [ ] ,
/ / 线 上 类 型 l i s t , e d i t 。 。 。 。
showType : 'list'
showType : 'list' ,
operate : '' ,
operateRow : { } ,
} ;
} ,
created ( ) {
@ -226,17 +231,6 @@ export default {
this . showType = 'list'
this . getList ( )
} ,
del ( row ) {
this . $modal . confirm ( this . $t ( 'form.confirmDelete' ) ) . then ( function ( ) {
this . $modal . loading ( )
study_delete ( { id : row . id } ) . then ( ( ) => {
this . getList ( )
} )
. finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ) . catch ( ( ) => { } )
} ,
enter ( row ) {
this . showType = 'enter'
this . $refs . enter . show ( row )
@ -244,7 +238,126 @@ export default {
detail ( row ) {
this . showType = 'detail'
this . $refs . detail . show ( row )
}
} ,
del ( row ) {
this . operate = 'del'
this . operateRow = row
this . $refs . signRef . show ( this . $t ( 'page.business.study.study.scsy' ) , this . $t ( 'page.business.study.study.scsy' ) )
} ,
doDel ( signInfo ) {
this . $modal . loading ( )
let postData = {
study : this . operateRow ,
sign : signInfo
}
study_delete ( postData ) . then ( ( ) => {
this . $refs . signRef . cancel ( )
this . getList ( )
} )
. finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
gd ( row ) {
this . operate = 'gd'
this . operateRow = row
this . $refs . signRef . show ( this . $t ( 'page.business.study.study.sqgd' ) , this . $t ( 'page.business.study.study.sqgd' ) )
} ,
doGd ( signInfo ) {
this . $modal . loading ( )
let postData = {
study : this . operateRow ,
sign : signInfo
}
study_gd ( postData ) . then ( ( ) => {
this . $refs . signRef . cancel ( )
this . getList ( )
} )
. finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
gs ( row ) {
this . operate = 'gs'
this . operateRow = row
this . $refs . signRef . show ( this . $t ( 'page.business.study.study.jssy' ) , this . $t ( 'page.business.study.study.jssy' ) )
} ,
doJs ( signInfo ) {
this . $modal . loading ( )
let postData = {
study : this . operateRow ,
sign : signInfo
}
study_js ( postData ) . then ( ( ) => {
this . $refs . signRef . cancel ( )
this . getList ( )
} )
. finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
jd ( row ) {
this . operate = 'jd'
this . operateRow = row
this . $refs . signRef . show ( this . $t ( 'page.business.study.study.sqjd' ) , this . $t ( 'page.business.study.study.sqjd' ) )
} ,
doJd ( signInfo ) {
this . $modal . loading ( )
let postData = {
study : this . operateRow ,
sign : signInfo
}
study_jd ( postData ) . then ( ( ) => {
this . $refs . signRef . cancel ( )
this . getList ( )
} )
. finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
jy ( row ) {
this . operate = 'jy'
this . operateRow = row
this . $refs . signRef . show ( this . $t ( 'page.business.study.study.sqjy' ) , this . $t ( 'page.business.study.study.sqjy' ) )
} ,
doJy ( signInfo ) {
this . $modal . loading ( )
let postData = {
study : this . operateRow ,
sign : signInfo
}
study_jy ( postData ) . then ( ( ) => {
this . $refs . signRef . cancel ( )
this . getList ( )
} )
. finally ( ( ) => {
this . $modal . closeLoading ( )
} )
} ,
doSign ( val ) {
if ( this . operate === 'del' ) {
this . doDel ( val )
}
if ( this . operate === 'gd' ) {
this . doGd ( val )
}
if ( this . operate === 'js' ) {
this . doJs ( val )
}
if ( this . operate === 'jd' ) {
this . doJd ( val )
}
if ( this . operate === 'jy' ) {
this . doJy ( val )
}
} ,
}
} ;
< / script >