Browse Source

feat:[试验管理][填报表单]落笔留痕

lkf
15881625488@163.com 3 months ago
parent
commit
f7e6932b60
3 changed files with 94 additions and 12 deletions
  1. +28
    -0
      src/api/business/study/studyFormFill.js
  2. +29
    -9
      src/views/business/study/comp/tbbd/Bj.vue
  3. +37
    -3
      src/views/business/study/comp/tbbd/Fh.vue

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

@ -132,3 +132,31 @@ export function studyFormFill_sy(data) {
data: data
})
}
//保存字段勾选记录
export function studyFormFill_updateZdgxjl(data) {
return request({
url: '/system/business/studyFormFill/updateZdgxjl',
method: 'post',
data: data
})
}
//保存复核意见
export function studyFormFill_updateFhyjjl(data) {
return request({
url: '/system/business/studyFormFill/updateFhyjjl',
method: 'post',
data: data
})
}
//保存表单内容
export function studyFormFill_updateBdnr(data) {
return request({
url: '/system/business/studyFormFill/updateBdnr',
method: 'post',
data: data
})
}

+ 29
- 9
src/views/business/study/comp/tbbd/Bj.vue View File

@ -76,7 +76,8 @@
</el-form>
</div>
<div class="content" v-if="showIndex == 2">
<TemplateTable emitName="onEditCallback" @onEditCallback="onEditCallback" ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="actFill" />
<TemplateTable emitName="onEditCallback" @onEditCallback="onEditCallback" ref="templateTable"
:sn="form.templateSn" :templateData="form" fillType="actFill" />
</div>
</div>
</div>
@ -85,7 +86,7 @@
append-to-body :close-on-click-modal="false">
<el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px">
<div class="sbzdtcma"> <input type="text"> <input type="password"> </div>
<el-row v-if="form.sftb==1">
<el-row v-if="form.sftb == 1">
<el-col :psna="24">
<el-form-item>
<div><el-checkbox v-model="formApprove.sfcz" @change="sfczChange">{{
@ -223,7 +224,7 @@
</template>
<script>
import { studyFormFill_bc, studyFormFill_tj, studyFormFill_info } from "@/api/business/study/studyFormFill"
import { studyFormFill_bc, studyFormFill_updateBdnr, studyFormFill_tj, studyFormFill_info } from "@/api/business/study/studyFormFill"
import { study_info } from "@/api/business/study/study"
import { mapGetters } from 'vuex'
import SelectTemplate from "@/views/business/comps/select/SelectTemplate";
@ -297,7 +298,19 @@ export default {
},
methods: {
onEditCallback(data) {
console.log(data,"onEditCallback")
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
// {"type":"fieldChanged","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","oldValue":"1.0","value":"1.0333","title":"","time":"2026-01-14 19:44:02"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","oldValue":"1.0","value":"1.0","title":"","time":"2026-01-14 19:43:57"}]}
if (data.type == 'fieldChanged') {
studyFormFill_updateBdnr(
{
id:this.form.id,
bdnr:JSON.stringify(this.$refs.templateTable.getFilledFormData()),
zdxgjl:JSON.stringify(data.newRecord)
}
).then(response => {
})
}
},
delcc(index) {
this.cclist.splice(index, 1)
@ -340,7 +353,7 @@ export default {
this.showIndex = 1
this.$modal.loading()
study_info({ id: studyId }).then(response => {
this.form = _.merge({}, this.form, { stydyId: studyId, resourceStudy: response.data.resource,sftb:1 })
this.form = _.merge({}, this.form, { stydyId: studyId, resourceStudy: response.data.resource, sftb: 1 })
this.$modal.closeLoading()
})
}
@ -416,6 +429,13 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
this.showIndex = 2
this.$modal.loading()
studyFormFill_bc(this.form).then(response => {
this.form=response.data
this.showIndex = 2
}).finally(() => {
this.$modal.closeLoading()
})
}
})
},
@ -483,16 +503,16 @@ export default {
}
},
tj() {
let that=this
let that = this
this.$refs["formApprove"].validate(valid => {
if (valid) {
that.$modal.loading()
that.formApprove.resource = JSON.stringify(that.resource)
if(that.czlist.length>0){
if (that.czlist.length > 0) {
that.formApprove.czlist = JSON.stringify(that.czlist)
}
if(that.cclist.length>0){
that.formApprove.cclist = JSON.stringify(that.cclist)
if (that.cclist.length > 0) {
that.formApprove.cclist = JSON.stringify(that.cclist)
}
studyFormFill_tj(that.formApprove).then(response => {
that.openApprove = false

+ 37
- 3
src/views/business/study/comp/tbbd/Fh.vue View File

@ -20,7 +20,8 @@
</div>
<div class="edit-content">
<div class="content-left">
<TemplateTable emitName="onFhCallback" @onFhCallback = "onFhCallback" ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="qc" />
<TemplateTable emitName="onFhCallback" @onFhCallback="onFhCallback" ref="templateTable" :sn="form.templateSn"
:templateData="form" fillType="qc" />
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.qmxx') }}</div>
@ -110,7 +111,7 @@
</template>
<script>
import { studyFormFill_fhtg, studyFormFill_fhjj, studyFormFill_tg, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx } from "@/api/business/study/studyFormFill"
import { studyFormFill_fhtg, studyFormFill_fhjj,studyFormFill_updateZdgxjl,studyFormFill_updateFhyjjl, studyFormFill_tg, studyFormFill_info, studyFormFill_jcgj, studyFormFill_qmxx } from "@/api/business/study/studyFormFill"
import { mapGetters } from 'vuex'
import JcgjList from "@/views/business/comps/common/JcgjList";
import TemplateTable from '@/views/business/comps/template/TemplateTable';
@ -162,7 +163,40 @@ export default {
},
methods: {
onFhCallback(data) {
console.log(data,"onFhCallback")
console.log("data:" + JSON.stringify(data))
console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData()))
if (data.type == 'checkbox') {
// {"type":"checkbox","fieldCheckObj":"{\"_methodCode\":{\"checked\":false}}"}
studyFormFill_updateZdgxjl(
{
id:this.form.id,
zdxgjl:JSON.stringify(data.fieldCheckObj)
}
).then(response => {
})
}
else if (data.type == 'content') {
// {"type":"content","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormFill_updateFhyjjl(
{
id:this.form.id,
content:JSON.stringify(data.newRecord),
fhyjjl:JSON.stringify(data.resourceList)
}
).then(response => {
})
}
else if (data.type == 'reply') {
// {"type":"reply","newRecord":{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},"resourceList":[{"userNameCn":"","userNameEn":"tf","key":"_versionNum","field":"-","title":"","time":"2026-01-14 20:23:30","content":"qweqe"},{"userNameCn":"","userNameEn":"tf","key":"_methodCode","field":"-","title":"","time":"2026-01-14 20:23:28","content":"qweqw"}]}
studyFormFill_updateFhyjjl(
{
id:this.form.id,
replay:JSON.stringify(data.newRecord),
fhyjjl:JSON.stringify(data.resourceList)
}
).then(response => {
})
}
},
getJjcgjList(val) {
this.$modal.loading()

Loading…
Cancel
Save