Browse Source

feat: [试验管理] [试验详情] 增加试验详情功能

master
memorylkf 1 week ago
parent
commit
4636ab041b
8 changed files with 344 additions and 19 deletions
  1. +8
    -0
      src/api/business/study/study.js
  2. +24
    -2
      src/lang/en/business/study/study.js
  3. +23
    -1
      src/lang/zh/business/study/study.js
  4. +13
    -6
      src/views/business/comps/common/JcgjList.vue
  5. +149
    -0
      src/views/business/study/comp/detail.vue
  6. +25
    -8
      src/views/business/study/comp/edit.vue
  7. +94
    -0
      src/views/business/study/comp/sign.vue
  8. +8
    -2
      src/views/business/study/list.vue

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

@ -31,3 +31,11 @@ export function study_delete(data) {
data: data data: data
}) })
} }
export function study_jcgjList(query) {
return request({
url: '/system/business/study/jcgjList',
method: 'get',
params: query
})
}

+ 24
- 2
src/lang/en/business/study/study.js View File

@ -35,11 +35,33 @@ export default {
jd: 'De-archive', jd: 'De-archive',
js: 'Unlock', js: 'Unlock',
create: 'Create New Study',
create: 'Create Study',
inputName: 'Input Study Name', inputName: 'Input Study Name',
inputSn: 'Input Study ID', inputSn: 'Input Study ID',
inputLeader: 'Select Study Director', inputLeader: 'Select Study Director',
cancel: 'Cancel', cancel: 'Cancel',
save: 'Save', save: 'Save',
submit: 'Submit'
submit: 'Submit',
jbxx: 'Information',
bdsl: 'Total Records',
syfzr: 'Study Director',
jcgj: 'Track Record',
rybg: 'Change of Person',
xgsy: 'Change of Information',
sdsy: 'Lock Study',
jssy: 'Unlock Study',
sqjy: 'Apply for Check-out',
sqgd: 'Apply for Archiving',
jjjd: 'Reject De-archiving',
tyjd: 'Approve De-archiving',
jjgd: 'Reject Archiving',
tygd: 'Approve Archiving',
dqzdgh: 'Check-out End on Time',
qrgh: 'Check-out End Confirmation',
qb: 'All',
lc: 'Milestone',
bj: 'Change',
ry: 'User'
} }

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

@ -41,5 +41,27 @@ export default {
inputLeader: '请选择负责人', inputLeader: '请选择负责人',
cancel: '取消', cancel: '取消',
save: '保存', save: '保存',
submit: '提交'
submit: '提交',
jbxx: '基本信息',
bdsl: '表单数量',
syfzr: '试验负责人',
jcgj: '稽查轨迹',
rybg: '人员变更',
xgsy: '修改试验',
sdsy: '锁定试验',
jssy: '解锁试验',
sqjy: '申请借阅',
sqgd: '申请归档',
jjjd: '拒绝解档',
tyjd: '同意解档',
jjgd: '拒绝归档',
tygd: '同意归档',
dqzdgh: '到期自动归还',
qrgh: '确认归还',
qb: '全部',
lc: '流程',
bj: '编辑',
ry: '人员'
} }

+ 13
- 6
src/views/business/comps/common/JcgjList.vue View File

@ -7,9 +7,10 @@
</div> </div>
<div class="jcgjList-jcgjlx"> <div class="jcgjList-jcgjlx">
<el-radio-group v-model="queryParams.jcgjlx" @change="handleQuery"> <el-radio-group v-model="queryParams.jcgjlx" @change="handleQuery">
<el-radio-button :label="-1">全部</el-radio-button>
<el-radio-button :label="1">流程</el-radio-button>
<el-radio-button :label="3">编辑</el-radio-button>
<el-radio-button :label="-1">{{ $t('page.business.study.study.qb') }}</el-radio-button>
<el-radio-button :label="1">{{ $t('page.business.study.study.lc') }}</el-radio-button>
<el-radio-button :label="3">{{ $t('page.business.study.study.bj') }}</el-radio-button>
<el-radio-button :label="5" v-if="showRy">{{ $t('page.business.study.study.ry') }}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="jcgjList-content"> <div class="jcgjList-content">
@ -26,11 +27,11 @@
<div v-if="item.remark&&item.remark!==''"> <div v-if="item.remark&&item.remark!==''">
备注{{ item.remark }} 备注{{ item.remark }}
</div> </div>
<div >
<div v-if="item.qmrId&&item.qmrId>0">
签名意义{{ item.jcmc }} 签名意义{{ item.jcmc }}
</div> </div>
<div >
签名意义{{ item.qmrMc }}
<div v-if="item.qmrId&&item.qmrId>0">
签名{{ item.qmrMc }}
</div> </div>
</div> </div>
</el-timeline-item> </el-timeline-item>
@ -43,6 +44,12 @@
export default { export default {
name: "JcgjList", name: "JcgjList",
components: {}, components: {},
props:{
showRy:{
type:Boolean,
default:false
}
},
data() { data() {
return { return {
list: [], list: [],

+ 149
- 0
src/views/business/study/comp/detail.vue View File

@ -0,0 +1,149 @@
G<template>
<!-- 详情 -->
<div v-show="open">
<div class="detail-container">
<div class="detail-top">
<div class="left-top">
<img src="@/assets/images/back.png" @click="cancel()" />
<div class="left-title"></div>
</div>
<div class="right-top">
{{$t('page.business.study.study.detail')}}
</div>
</div>
<!-- <div class="detail-title"><img src="@/assets/images/detail-title.png" >{{ $t('page.business.study.study.mjyxq') }}<img src="@/assets/images/detail-title.png" /></div> -->
<div class="detail-content">
<div class="content-left">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.study.jbxx') }}</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.study.name') }}</div>
<el-input type="text" :value="form.name" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.study.sn') }}</div>
<el-input type="text" :value="form.sn" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.study.bdsl') }}</div>
<el-input type="text" :value="form.formCount" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.study.syfzr') }}</div>
<el-input type="text" :value="form.leaderName" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.study.createDate') }}</div>
<el-input type="text" :value="form.createTime" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">{{ $t('page.business.study.study.status') }}</div>
<el-select v-model="form.status" disabled style="width: 100%;">
<el-option :label="$t('page.business.study.study.statusCg')" :value="1" />
<el-option :label="$t('page.business.study.study.statusSyz')" :value="3" />
<el-option :label="$t('page.business.study.study.statusYsd')" :value="5" />
<el-option :label="$t('page.business.study.study.statusDgd')" :value="7" />
<el-option :label="$t('page.business.study.study.statusGd')" :value="9" />
<el-option :label="$t('page.business.study.study.statusDjd')" :value="10" />
</el-select>
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">{{ $t('page.business.study.study.borrowStatus') }}</div>
<el-select v-model="form.borrowStatus" disabled style="width: 100%;">
<el-option :label="$t('page.business.study.study.borrowStatusWjy')" :value="1" />
<el-option :label="$t('page.business.study.study.borrowStatusJyz')" :value="5" />
<el-option :label="$t('page.business.study.study.borrowStatusDjy')" :value="10" />
</el-select>
</div>
</div>
<div class="pal">
<div class="left" style="width:100%;margin-right:0">
<div class="left-title">{{ $t('page.business.study.study.remark') }}</div>
<el-input type="textarea" :rows="5" v-model="form.remark" maxlength="500" show-word-limit disabled> </el-input>
</div>
</div>
</div>
<div class="content-right">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.study.jcgj') }}</div>
</div>
<jcgjList ref="jcgjList" :showRy="true" @handleQuery="jcgjListHandleQuery" />
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" />
</div>
</div>
</div>
</div>
</template>
<script>
import { study_info, study_jcgjList } from "@/api/business/study/study"
import JcgjList from "@/views/business/comps/common/JcgjList";
export default {
name: "StudyDetail",
components: { JcgjList },
data() {
return {
form: {},
open: false,
jcgjTotal: 0,
jcgjList: [],
queryJcgjParams: {
pageNum: 1,
studyId: null,
pageSize: 10,
}
}
},
created() {
},
methods: {
jcgjListHandleQuery(val) {
this.$modal.loading()
study_jcgjList(_.merge({}, this.queryJcgjParams, val)).then(response => {
this.jcgjList = response.rows
this.jcgjTotal = response.total
this.$refs.jcgjList.init(this.jcgjList)
this.$modal.closeLoading()
})
},
getJjcgjList() {
study_jcgjList(this.queryJcgjParams).then(response => {
this.jcgjList = response.rows
this.jcgjTotal = response.total
this.$refs.jcgjList.init(this.jcgjList)
}).finally(()=>{
this.$modal.closeLoading()
})
},
cancel() {
this.$emit('cancel')
},
show(row) {
this.$modal.loading()
this.queryJcgjParams.studyId = row.id
study_info({ id: row.id }).then(response => {
this.form = response.data
this.open = true
}).finally(()=>{
this.$modal.closeLoading()
})
this.getJjcgjList()
}
}
}
</script>

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

@ -7,7 +7,7 @@
</div> </div>
<div class="right-top"> <div class="right-top">
<el-button @click="cancel()">{{$t('page.business.study.study.cancel')}}</el-button> <el-button @click="cancel()">{{$t('page.business.study.study.cancel')}}</el-button>
<el-button type="primary" @click="save(1)" plain>{{$t('page.business.study.study.save')}}</el-button>
<el-button type="primary" @click="save(1)" plain v-if="!infoDialog.formData.status || infoDialog.formData.status===1">{{$t('page.business.study.study.save')}}</el-button>
<el-button type="primary" @click="save(3)">{{$t('page.business.study.study.submit')}}</el-button> <el-button type="primary" @click="save(3)">{{$t('page.business.study.study.submit')}}</el-button>
</div> </div>
</div> </div>
@ -37,12 +37,14 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<Sign ref="signRef" @callback="doSign" />
</div> </div>
</template> </template>
<script> <script>
import { study_info,study_save} from "@/api/business/study/study"; import { study_info,study_save} from "@/api/business/study/study";
import SelectDeptUser from '../../comps/select/SelectDeptUser.vue'; import SelectDeptUser from '../../comps/select/SelectDeptUser.vue';
import Sign from './sign.vue'
const EmptyDialogData = { const EmptyDialogData = {
id:'', id:'',
name:'', name:'',
@ -56,7 +58,8 @@ export default {
props:{ props:{
}, },
components:{ components:{
SelectDeptUser
SelectDeptUser,
Sign
}, },
computed: { computed: {
}, },
@ -108,16 +111,30 @@ export default {
save(status) { save(status) {
this.$refs['infoDialogForm'].validate(valid => { this.$refs['infoDialogForm'].validate(valid => {
if (valid) { if (valid) {
this.$modal.loading()
this.infoDialog.formData.status = status this.infoDialog.formData.status = status
study_save(this.infoDialog.formData).then(() => {
this.$emit('save')
}).finally(() => {
this.$modal.closeLoading()
})
if(status === 3){
this.$refs.signRef.show(this.$t('page.business.study.study.submit'),'创建试验')
}else{
this.doSave({})
}
} }
}) })
}, },
doSign(val){
this.doSave(val)
},
doSave(sign) {
this.$modal.loading()
study_save({
study:this.infoDialog.formData,
sign:sign
}).then(() => {
this.$emit('save')
this.$refs.signRef.cancel()
}).finally(() => {
this.$modal.closeLoading()
})
},
} }
}; };
</script> </script>

+ 94
- 0
src/views/business/study/comp/sign.vue View File

@ -0,0 +1,94 @@
G<template>
<div>
<!-- 签名弹窗 -->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="signForm" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" v-model="form.qmyy" maxlength="50" readonly
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="remark">
<el-input type="textarea" v-model="form.remark" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="form.qmrMc" maxlength="50" readonly
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="form.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "Sign",
components: { },
data() {
return {
title:'',
open: false,
form: {
qmyy:'',
remark:'',
qmrId:'',
qmrMc:'',
qmrmm:''
},
rules: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}]
}
}
},
computed: {
},
created() {
},
methods: {
show(title,qmyy) {
this.title = title
this.form = {
qmyy:qmyy,
remark:'',
qmrId:this.$store.getters.id,
qmrMc:this.$store.getters.nickName,
qmrmm:''
}
this.resetForm("signForm")
this.open = true
},
cancel() {
this.open = false
},
save() {
this.$refs["signForm"].validate(valid => {
if (valid) {
this.$emit('callback',this.form)
}
})
}
}
}
</script>

+ 8
- 2
src/views/business/study/list.vue View File

@ -141,7 +141,7 @@
<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'" />
</div> </div>
</template> </template>
@ -150,13 +150,15 @@
import { study_list,study_info,study_save,study_delete} from "@/api/business/study/study"; import { study_list,study_info,study_save,study_delete} from "@/api/business/study/study";
import Edit from './comp/edit.vue' import Edit from './comp/edit.vue'
import Enter from './comp/enter.vue' import Enter from './comp/enter.vue'
import Detail from './comp/detail.vue'
export default { export default {
name: "Study", name: "Study",
props:{ props:{
}, },
components:{ components:{
Edit, Edit,
Enter
Enter,
Detail
}, },
computed: { computed: {
}, },
@ -239,6 +241,10 @@ export default {
this.showType = 'enter' this.showType = 'enter'
this.$refs.enter.show(row) this.$refs.enter.show(row)
}, },
detail(row){
this.showType = 'detail'
this.$refs.detail.show(row)
}
} }
}; };
</script> </script>

Loading…
Cancel
Save