Browse Source

feat:[试验管理][计划表单]

master
15881625488@163.com 1 week ago
parent
commit
1b1f7a29b2
12 changed files with 428 additions and 16 deletions
  1. +10
    -0
      src/api/business/study/studyFormPlan.js
  2. +4
    -1
      src/lang/en.js
  3. +12
    -0
      src/lang/en/business/study/studyFormPlan.js
  4. +1
    -0
      src/lang/en/business/study/studyFormPre.js
  5. +11
    -8
      src/lang/zh.js
  6. +11
    -0
      src/lang/zh/business/study/studyFormPlan.js
  7. +1
    -0
      src/lang/zh/business/study/studyFormPre.js
  8. +4
    -4
      src/views/business/comps/common/JcgjList.vue
  9. +3
    -1
      src/views/business/study/comp/enter.vue
  10. +184
    -0
      src/views/business/study/comp/jhbdList.vue
  11. +163
    -0
      src/views/business/study/comp/syxx.vue
  12. +24
    -2
      src/views/business/study/comp/ytbdList.vue

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

@ -0,0 +1,10 @@
import request from '@/utils/request'
//列表
export function studyFormPlan_list(query) {
return request({
url: '/system/business/studyFormPlan/list',
method: 'get',
params: query
})
}

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

@ -17,6 +17,8 @@ import studyEnter from './en/business/study/studyEnter'
import studyFormPre from './en/business/study/studyFormPre' import studyFormPre from './en/business/study/studyFormPre'
//填报表单 //填报表单
import studyFormFill from './en/business/study/studyFormFill' import studyFormFill from './en/business/study/studyFormFill'
//计划表单
import studyFormPlan from './en/business/study/studyFormPlan'
//表单 //表单
import form from './en/business/form/form' import form from './en/business/form/form'
@ -127,7 +129,8 @@ export default {
study: study, study: study,
studyEnter: studyEnter, studyEnter: studyEnter,
studyFormPre: studyFormPre, studyFormPre: studyFormPre,
studyFormFill: studyFormFill
studyFormFill: studyFormFill,
studyFormPlan: studyFormPlan
}, },
form: form form: form
} }

+ 12
- 0
src/lang/en/business/study/studyFormPlan.js View File

@ -0,0 +1,12 @@
export default {
syxx: '试验信息',
symc: '试验名称',
sybh: '试验编号',
syfzr: '试验负责人',
sdsy: '锁定试验',
cjsj: '创建时间',
syjj: '试验简介',
xz:'新增配置计划表',
syxkxx:'试验学科信息'
}

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

@ -23,5 +23,6 @@ export default {
bzyy:'备注原因', bzyy:'备注原因',
jcgj:'稽查轨迹', jcgj:'稽查轨迹',
cjjl:'创建记录', cjjl:'创建记录',
xjbd:'新建表单',
ts:'是否确定用该预填模板进行实际填报?', ts:'是否确定用该预填模板进行实际填报?',
} }

+ 11
- 8
src/lang/zh.js View File

@ -17,6 +17,8 @@ import studyEnter from './zh/business/study/studyEnter'
import studyFormPre from './zh/business/study/studyFormPre' import studyFormPre from './zh/business/study/studyFormPre'
//填报表单 //填报表单
import studyFormFill from './zh/business/study/studyFormFill' import studyFormFill from './zh/business/study/studyFormFill'
//计划表单
import studyFormPlan from './zh/business/study/studyFormPlan'
//表单 //表单
import form from './zh/business/form/form' import form from './zh/business/form/form'
@ -113,18 +115,19 @@ export default {
}, },
business: { business: {
resource: { 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: study, study: study,
studyEnter: studyEnter, studyEnter: studyEnter,
studyFormPre:studyFormPre,
studyFormFill:studyFormFill
studyFormPre: studyFormPre,
studyFormFill: studyFormFill,
studyFormPlan: studyFormPlan
}, },
form: form form: form
} }

+ 11
- 0
src/lang/zh/business/study/studyFormPlan.js View File

@ -0,0 +1,11 @@
export default {
syxx: '试验信息',
symc: '试验名称',
sybh: '试验编号',
syfzr: '试验负责人',
cjsj: '创建时间',
sdsy: '锁定试验',
syjj: '试验简介',
xz:'新增配置计划表',
syxkxx:'试验学科信息'
}

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

@ -23,5 +23,6 @@ export default {
bzyy:'备注原因', bzyy:'备注原因',
jcgj:'稽查轨迹', jcgj:'稽查轨迹',
cjjl:'创建记录', cjjl:'创建记录',
xjbd:'新建表单',
ts:'是否确定用该预填模板进行实际填报?', ts:'是否确定用该预填模板进行实际填报?',
} }

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

@ -84,14 +84,14 @@ export default {
item.jcnrList = [] item.jcnrList = []
} }
// 135绿7 // 135绿7
if (item.jcgjlx == 1) {
if (item.jcmcys == 1) {
item.color = '#409EFF' item.color = '#409EFF'
} }
else if (item.jcgjlx == 3) {
else if (item.jcmcys == 3) {
item.color = '#F56C6C' item.color = '#F56C6C'
} else if (item.jcgjlx == 5) {
} else if (item.jcmcys == 5) {
item.color = '#67C23A' item.color = '#67C23A'
} else if (item.jcgjlx == 7) {
} else if (item.jcmcys == 7) {
item.color = '#E6A23C' item.color = '#E6A23C'
} }
tmp.push(item) tmp.push(item)

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

@ -11,6 +11,7 @@
<div class="content-box"> <div class="content-box">
<ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" /> <ytbd v-if="active === 'ytbd'" :study="study" @showDetail="showDetailCallback" />
<tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/> <tbbd v-if="active === 'tbbd'" :study="study" @showDetail="showDetailCallback"/>
<syxx v-if="active === 'syxx'" :study="study" @showDetail="showDetailCallback"/>
</div> </div>
</div> </div>
</div> </div>
@ -19,10 +20,11 @@
<script> <script>
import ytbd from './ytbd.vue' import ytbd from './ytbd.vue'
import tbbd from './tbbd.vue' import tbbd from './tbbd.vue'
import syxx from './syxx.vue'
export default { export default {
name: 'StudyEnter', name: 'StudyEnter',
props: {}, props: {},
components: { ytbd, tbbd },
components: { ytbd, tbbd ,syxx},
computed: {}, computed: {},
filters: {}, filters: {},
data() { data() {

+ 184
- 0
src/views/business/study/comp/jhbdList.vue View File

@ -0,0 +1,184 @@
<template>
<div>
<div class="jhbd-list" v-show="!showDetail">
<div class="jhbd-search">
<el-form :model="searchForm" ref="searchForm" :inline="true" label-width="80px">
<el-row>
<el-col :span="5">
<el-form-item :label="$t('page.business.form.bdmc')" prop="name">
<el-input v-model="searchForm.bdmc" :placeholder="$t('form.placeholderInput')" clearable
style="width: 200px" @keyup.enter.native="search" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('page.business.form.bdbh')" prop="sn">
<el-input v-model="searchForm.bdbh" :placeholder="$t('form.placeholderInput')" clearable
style="width: 200px" @keyup.enter.native="search" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('page.business.form.gsr')" prop="userId">
<SelectDeptUser v-model="searchForm.userId" :name="searchForm.userMc" key="userId"
@change="userChange" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('page.business.form.cjsj')">
<el-date-picker v-model="daterange" clearable type="daterange" range-separator="-"
:start-placeholder="$t('page.business.form.startDate')"
:end-placeholder="$t('page.business.form.endDate')" value-format="yyyy-MM-dd" @change="search"
style="width: 200px" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="jhbd-content">
<el-row class="add-box">
<el-col>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
v-hasPermi="['business:studyFormPlan:xz']">{{
$t('page.business.form.xzjhbd') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.business.form.bh')" prop="bdbh" />
<el-table-column :label="$t('page.business.form.bdmc')" prop="bdmc" />
<el-table-column :label="$t('page.business.form.xtmbmc')" prop="templateMc" />
<el-table-column :label="$t('page.business.form.cjsj')" align="center" prop="createTime" width="140" />
<el-table-column :label="$t('page.business.form.gsr')" align="center" prop="userMc" width="100" />
<el-table-column :label="$t('page.business.form.status')" prop="status" width="100">
<template slot-scope="scope">
<span v-if="scope.row.bdzt === 1">{{ $t('page.business.form.statusTbz') }}</span>
<span v-if="scope.row.bdzt === 3">{{ $t('page.business.form.statusYtj') }}</span>
<span v-if="scope.row.bdzt === 5">{{ $t('page.business.form.statusYtg') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="200">
<template slot-scope="scope">
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
@pagination="getList" />
</div>
</div>
</div>
</template>
<script>
import {
studyFormPlan_list
} from '@/api/business/study/studyFormPlan'
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import moment from "moment";
import { mapGetters } from 'vuex'
export default {
name: 'JhbdList',
components: { SelectDeptUser },
props: {
study: {
type: Object,
default: () => {
return {}
}
}
},
computed: {
...mapGetters([
'id'
]),
},
watch: {
study: {
handler(newVal) {
this.searchForm.studyId = newVal.studyId
this.search()
},
immediate: true,
deep: true
}
},
data() {
return {
showDetail: false,
daterange: [],
searchForm: {
pageNum: 1,
pageSize: 10,
studyId: '',
bdbh: '',
bdmc: '',
userId: '',
userMc: '',
startDate: '',
endDate: '',
},
loading: false,
total: 0,
list: [],
}
},
created() { },
methods: {
userChange(val) {
this.searchForm.userId = val.id
this.searchForm.userMc = val.name
this.search()
},
search() {
this.searchForm.pageNum = 1
this.getList()
},
reset() {
this.resetForm("searchForm")
this.handleQuery()
},
getList() {
if (this.daterange != null && this.daterange.length > 0) {
this.searchForm.startDate = this.daterange[0]
this.searchForm.endDate = moment().add(this.daterange[1], 'days').format('YYYY-MM-DD');
} else {
this.searchForm.startDate = ''
this.searchForm.endDate = ''
}
this.loading = true
studyFormPlan_list(this.searchForm).then(response => {
this.list = response.rows
this.total = response.total
this.loading = false
})
}
}
}
</script>
<style lang="scss" scoped>
.jhbd-list {
.jhbd-search {
background: #fff;
margin-bottom: 10px;
.right-btn {
text-align: right
}
}
.jhbd-content {
background: #fff;
.add-box {
margin-bottom: 10px;
}
}
}
</style>

+ 163
- 0
src/views/business/study/comp/syxx.vue View File

@ -0,0 +1,163 @@
<template>
<div class="study-syxx">
<div class="syxx-top" v-show="!showDetail">
<div class="syxx-operate">
<div class="operate-img"></div>
<div class="operate-left">{{ $t('page.business.study.studyFormPlan.syxx') }}</div>
</div>
<el-form ref="form" label-width="90px">
<el-row>
<el-col :span="6">
<el-form-item :label="$t('page.business.study.studyFormPlan.symc')">
{{ studyInfo.name }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('page.business.study.studyFormPlan.sybh')">
{{ studyInfo.sn }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('page.business.study.studyFormPlan.syfzr')">
{{ studyInfo.leaderName }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('page.business.study.studyFormPlan.cjsj')">
{{ studyInfo.createTime }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyFormPlan.syjj')">
{{ studyInfo.remark }}
</el-form-item>
</el-col>
<el-col>
<el-button type="primary" @click="sdsy">{{ $t('page.business.study.studyFormPlan.sdsy') }}</el-button>
</el-col>
</el-row>
</el-form>
<div class="syxx-operate" style="margin-top: 10px;">
<div class="operate-img"></div>
<div class="operate-left">{{ $t('page.business.study.studyFormPlan.syxkxx') }}</div>
</div>
<div style="display: flex;">
<div style="margin-right: 30px;" v-for="(item, index) in subjectList" :key="index">
{{ item.deptName }}{{ item.leaderName }}
</div>
</div>
</div>
<div class="syxx-content">
<jhbdList :study="studyInfo" @showDetail="showDetailCallback" />
</div>
</div>
</template>
<script>
import jhbdList from './jhbdList.vue'
import { study_info } from "@/api/business/study/study"
import { studySubject_listByStudyId } from '@/api/business/study/studySubject'
export default {
name: 'StudyTbbd',
props: {
study: {
type: Object,
default: () => {
return {}
}
}
},
watch: {
study: {
immediate: true,
handler(v) {
this.id = v.id
this.getStudyInfo()
}
},
},
components: { jhbdList },
data() {
return {
showDetail: false,
id: {},
studyInfo:{},
subjectList: []
}
},
created() {
},
methods: {
getstudySubject() {
studySubject_listByStudyId({ studyId: this.id }).then(response => {
this.subjectList = response.data;
}).finally(() => {
this.$modal.closeLoading()
})
},
getStudyInfo() {
this.$modal.loading()
study_info({ id: this.id }).then(response => {
this.studyInfo = response.data
this.getstudySubject()
}).finally(() => {
this.$modal.closeLoading()
})
},
sdsy() {
alert('todo')
},
showDetailCallback(val) {
this.showDetail = val
this.$emit('showDetail', val)
}
}
}
</script>
<style lang="scss" scoped>
.study-syxx {
.syxx-top {
background: #fff;
padding: 20px;
width: 100%;
.syxx-operate {
margin: 0px 0 10px 0;
display: flex;
flex-direction: row;
align-items: center;
color: #409eff;
.operate-img {
flex-shrink: 0;
height: 15px;
background: #409eff;
width: 3px;
}
.operate-left {
flex-shrink: 0;
font-weight: bold;
padding-left: 10px;
}
.operate-right {
flex-grow: 1;
text-align: right;
.operate-icon {
cursor: pointer;
}
}
}
}
.syxx-content {
background: #fff;
padding: 20px;
margin-top: 10px;
}
}
</style>

+ 24
- 2
src/views/business/study/comp/ytbdList.vue View File

@ -50,8 +50,9 @@
<div class="ytbd-content"> <div class="ytbd-content">
<el-row class="add-box"> <el-row class="add-box">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyFormPre:xz']">{{
$t('page.business.form.xzytbd') }}</el-button>
<el-button type="primary" icon="el-icon-plus" @click="showAdd()"
v-hasPermi="['business:studyFormPre:xz']">{{
$t('page.business.form.xzytbd') }}</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -112,6 +113,19 @@
<Xq v-show="showDetail" key="Xq" ref="Xq" @close="xqClose" /> <Xq v-show="showDetail" key="Xq" ref="Xq" @close="xqClose" />
<!-- 审核 --> <!-- 审核 -->
<Sh v-show="showAudit" key="Sh" ref="Sh" @close="shClose" /> <Sh v-show="showAudit" key="Sh" ref="Sh" @close="shClose" />
<el-dialog :title="$t('page.business.study.studyFormPre.xjbd')" :visible.sync="open" width="500px" append-to-body
:close-on-click-modal="false">
<el-form ref="form" label-width="120px">
<el-row>
<el-col :span="24" style="text-align: center; margin-top: 50px;">
<el-button type="primary" style="width: 80%; height: 40px;" @click="add" plain icon="el-icon-circle-plus">创建新表单</el-button>
</el-col>
<el-col :span="24" style="text-align: center; margin: 50px 0px;">
<el-button type="primary" style="width: 80%;height: 40px;" @click="copy" plain icon="el-icon-document-copy">复制已有表单</el-button>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
@ -156,6 +170,7 @@ export default {
components: { Bj, Xq, Sh, SelectDeptUser }, components: { Bj, Xq, Sh, SelectDeptUser },
data() { data() {
return { return {
open: false,
leader: null, leader: null,
showAudit: false, showAudit: false,
showEdit: false, showEdit: false,
@ -182,6 +197,12 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
copy(){
alert('todo')
},
showAdd() {
this.open = true
},
userChange(val) { userChange(val) {
this.searchForm.userId = val.id this.searchForm.userId = val.id
this.searchForm.userMc = val.name this.searchForm.userMc = val.name
@ -211,6 +232,7 @@ export default {
}) })
}, },
add() { add() {
this.open = false
this.showEdit = true this.showEdit = true
this.$emit('showDetail', this.showEdit) this.$emit('showDetail', this.showEdit)
this.$refs.Bj.edit({ studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId }) this.$refs.Bj.edit({ studyId: this.searchForm.studyId, studySubjectId: this.searchForm.studySubjectId })

Loading…
Cancel
Save