Browse Source

feat: [试验管理] 试验操作按钮

master
memorylkf 1 week ago
parent
commit
778089f72f
7 changed files with 182 additions and 34 deletions
  1. +29
    -0
      src/api/business/study/study.js
  2. +10
    -10
      src/lang/en.js
  3. +4
    -1
      src/lang/en/business/study/study.js
  4. +4
    -1
      src/lang/zh/business/study/study.js
  5. +3
    -3
      src/views/business/study/comp/edit.vue
  6. +1
    -1
      src/views/business/study/comp/suject.vue
  7. +131
    -18
      src/views/business/study/list.vue

+ 29
- 0
src/api/business/study/study.js View File

@ -39,3 +39,32 @@ export function study_jcgjList(query) {
params: query
})
}
export function study_gd(data) {
return request({
url: '/system/business/study/gd',
method: 'post',
data: data
})
}
export function study_js(data) {
return request({
url: '/system/business/study/js',
method: 'post',
data: data
})
}
export function study_jd(data) {
return request({
url: '/system/business/study/jd',
method: 'post',
data: data
})
}
export function study_jy(data) {
return request({
url: '/system/business/study/jy',
method: 'post',
data: data
})
}

+ 10
- 10
src/lang/en.js View File

@ -67,8 +67,8 @@ export default {
endDate: 'End Date',
password: 'Password',
signer: 'Signer',
signerPsw: '签名人密码',
qmyy: '签名意义',
signerPsw: 'Password',
qmyy: 'Purpose',
signTime: '签名时间',
remark: 'remark',
@ -116,18 +116,18 @@ export default {
},
business: {
resource: {
resource:resource,
zcg:zcg,
mjy:mjy,
yq:yq,
sj:sj,
gyzj:gyzj,
resource: resource,
zcg: zcg,
mjy: mjy,
yq: yq,
sj: sj,
gyzj: gyzj
},
study: {
study: study,
studyEnter: studyEnter,
studyFormPre:studyFormPre,
studyFormFill:studyFormFill
studyFormPre: studyFormPre,
studyFormFill: studyFormFill
},
form: form
}

+ 4
- 1
src/lang/en/business/study/study.js View File

@ -53,6 +53,7 @@ export default {
jssy: 'Unlock Study',
sqjy: 'Apply for Check-out',
sqgd: 'Apply for Archiving',
sqjd: 'Apply for De-archiving',
jjjd: 'Reject De-archiving',
tyjd: 'Approve De-archiving',
jjgd: 'Reject Archiving',
@ -63,5 +64,7 @@ export default {
qb: 'All',
lc: 'Milestone',
bj: 'Change',
ry: 'User'
ry: 'User',
scsy: 'Remove Study'
}

+ 4
- 1
src/lang/zh/business/study/study.js View File

@ -53,6 +53,7 @@ export default {
jssy: '解锁试验',
sqjy: '申请借阅',
sqgd: '申请归档',
sqjd: '申请解档',
jjjd: '拒绝解档',
tyjd: '同意解档',
jjgd: '拒绝归档',
@ -63,5 +64,7 @@ export default {
qb: '全部',
lc: '流程',
bj: '编辑',
ry: '人员'
ry: '人员',
scsy: '删除试验'
}

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

@ -37,7 +37,7 @@
</el-row>
</el-form>
</div>
<Sign ref="signRef" @callback="doSign" />
<Sign ref="editSignRef" @callback="doSign" />
</div>
</template>
@ -113,7 +113,7 @@ export default {
if (valid) {
this.infoDialog.formData.status = status
if(status === 3){
this.$refs.signRef.show(this.$t('page.business.study.study.submit'),'创建试验')
this.$refs.editSignRef.show(this.$t('page.business.study.study.submit'),'创建试验')
}else{
this.doSave({})
}
@ -130,7 +130,7 @@ export default {
sign:sign
}).then(() => {
this.$emit('save')
this.$refs.signRef.cancel()
this.$refs.editSignRef.cancel()
}).finally(() => {
this.$modal.closeLoading()
})

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

@ -17,7 +17,7 @@
<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">
<el-button type="primary" plain @click="yq(item)">{{$t('page.business.study.studyEnter.yq')}}</el-button>
<el-button type="primary" plain @click.stop="yq(item)">{{$t('page.business.study.studyEnter.yq')}}</el-button>
</div>
</div>
</div>

+ 131
- 18
src/views/business/study/list.vue View File

@ -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>
</el-table-column>
</el-table>
@ -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: [],
//线list,edit
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>

Loading…
Cancel
Save