| @ -0,0 +1,290 @@ | |||||
| <template> | |||||
| <div> | |||||
| <div class="edit-container" v-if="open"> | |||||
| <div class="edit-top"> | |||||
| <div class="left-top"> | |||||
| <img src="@/assets/images/back.png" @click="cancel()" /> | |||||
| <div class="left-title"></div> | |||||
| </div> | |||||
| <div class="center-top"> | |||||
| </div> | |||||
| <div class="right-top"> | |||||
| <el-button @click="cancel()">{{ $t('form.cancel') }}</el-button> | |||||
| <el-button type="danger" @click="showApprove('病理学家审核拒绝')">{{ $t('page.business.study.studyFormFill.reject') | |||||
| }}</el-button> | |||||
| <el-button type="primary" @click="showApprove('病理学家审核通过')">{{ $t('page.business.study.studyFormFill.approve') | |||||
| }}</el-button> | |||||
| </div> | |||||
| </div> | |||||
| <div class="edit-content"> | |||||
| <div class="content-left"> | |||||
| <TemplateTable emitName="onFillFhCallback" @onFillFhCallback="onFillFhCallback" ref="templateTable" | |||||
| :sn="form.templateSn" :templateData="form" fillType="blxj" /> | |||||
| <div class="content-title"> | |||||
| <div class="line"></div> | |||||
| <div class="subtitle"> {{ $t('page.business.study.studyFormFill.qmxx') }}</div> | |||||
| </div> | |||||
| <div class="pal"> | |||||
| <el-table :data="qmxxList" v-loading="loadingQmxx"> | |||||
| <el-table-column :label="$t('page.business.study.studyFormFill.qmr')" align="center" prop="qmrMc" | |||||
| width="150px" /> | |||||
| <el-table-column :label="$t('page.business.study.studyFormFill.qmyy')" align="center" prop="qmyy" | |||||
| width="150px" /> | |||||
| <el-table-column :label="$t('page.business.study.studyFormFill.qmsj')" align="center" prop="createTime" | |||||
| width="150px" /> | |||||
| <el-table-column :label="$t('page.business.study.studyFormFill.bzyy')" align="center" prop="remark" | |||||
| :show-overflow-tooltip="true" /> | |||||
| </el-table> | |||||
| </div> | |||||
| <div class="pal"> | |||||
| <pagination v-show="totalQmxx > 0" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum" | |||||
| :limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" /> | |||||
| </div> | |||||
| </div> | |||||
| <div class="content-right"> | |||||
| <div class="content-title"> | |||||
| <div class="line"></div> | |||||
| <div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div> | |||||
| </div> | |||||
| <JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true"/> | |||||
| <pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal" | |||||
| @pagination="getJjcgjList" :page.sync="queryParamsJcgj.pageNum" | |||||
| :limit.sync="queryParamsJcgj.pageSize"/> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <el-dialog :title="$t(openTitle)" :visible.sync="openApprove" width="500px" append-to-body | |||||
| :close-on-click-modal="false"> | |||||
| <el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px" v-if="openApprove"> | |||||
| <div class="sbzdtcma"> <input type="text"> <input type="password" show-password > </div> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.qmyy')" prop="qmyy"> | |||||
| <el-input type="text" :value="formApprove.qmyyMc" maxlength="50" disabled | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row v-if="formApprove.qmyy == '病理学家审核拒绝'"> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('page.business.study.studyFormFill.reason')" prop="reason"> | |||||
| <el-input type="textarea" v-model="formApprove.reason" :rows="5" maxlength="500" | |||||
| :placeholder="$t('form.placeholderInput')"> | |||||
| </el-input> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row v-else> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.remark')"> | |||||
| <el-input type="textarea" v-model="formApprove.remark" :rows="5" maxlength="500" | |||||
| :placeholder="$t('form.placeholderInput')"> | |||||
| </el-input> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.signer')"> | |||||
| <el-input type="text" v-model="nickName" maxlength="50" disabled | |||||
| :placeholder="$t('form.placeholderInput')" /> | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| <el-row> | |||||
| <el-col :span="24"> | |||||
| <el-form-item :label="$t('form.password')" prop="qmrmm"> | |||||
| <el-input type="password" show-password v-model="formApprove.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="approve">{{ $t('form.confirm') }}</el-button> | |||||
| <el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button> | |||||
| </div> | |||||
| </el-dialog> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { studyFormFill_blxjshtg, studyFormFill_blxjshjj, studyFormFill_updateZdgxjl, studyFormFill_updateFhyjjl, 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'; | |||||
| export default { | |||||
| name: "Blxjsh", | |||||
| components: { TemplateTable, JcgjList }, | |||||
| data() { | |||||
| return { | |||||
| form: {}, | |||||
| open: false, | |||||
| qmxxList: [], | |||||
| totalQmxx: 0, | |||||
| loadingQmxx: true, | |||||
| queryParamsQmxx: { | |||||
| formId: null, | |||||
| pageNum: 1, | |||||
| pageSize: 10 | |||||
| }, | |||||
| jcgjList: [], | |||||
| jcgjTotal: 0, | |||||
| queryParamsJcgj: { | |||||
| pageNum: 1, | |||||
| formId: null, | |||||
| pageSize: 10, | |||||
| }, | |||||
| openTitle: '', | |||||
| openApprove: false, | |||||
| formApprove: {}, | |||||
| rulesApprove: { | |||||
| qmrmm: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }], | |||||
| reason: [{ | |||||
| required: true, | |||||
| message: ' ', | |||||
| trigger: 'blur' | |||||
| }], | |||||
| } | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| ...mapGetters([ | |||||
| 'nickName', 'name' | |||||
| ]), | |||||
| }, | |||||
| created() { | |||||
| }, | |||||
| methods: { | |||||
| onFillFhCallback(data) { | |||||
| 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, | |||||
| zdgxjl: 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 => { | |||||
| }) | |||||
| } | |||||
| }, | |||||
| getJjcgjList(val) { | |||||
| this.$modal.loading() | |||||
| if(val){ | |||||
| this.queryParamsJcgj=_.merge({}, this.queryParamsJcgj, val) | |||||
| } | |||||
| studyFormFill_jcgj(this.queryParamsJcgj).then(response => { | |||||
| this.jcgjList = response.rows | |||||
| this.jcgjTotal = response.total | |||||
| this.$refs.jcgjList.init(this.jcgjList) | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| getQmxxList() { | |||||
| this.loadingQmxx = true | |||||
| studyFormFill_qmxx(this.queryParamsQmxx).then(response => { | |||||
| this.qmxxList = response.rows | |||||
| this.totalQmxx = response.total | |||||
| this.loadingQmxx = false | |||||
| }) | |||||
| }, | |||||
| cancel() { | |||||
| this.$emit('close') | |||||
| this.open = false | |||||
| }, | |||||
| reset() { | |||||
| this.form = {} | |||||
| this.resetForm("form") | |||||
| }, | |||||
| show(row) { | |||||
| this.reset() | |||||
| this.$modal.loading() | |||||
| this.queryParamsJcgj.formId = row.id | |||||
| this.queryParamsQmxx.formId = row.id | |||||
| studyFormFill_info({ id: row.id }).then(response => { | |||||
| this.form = response.data | |||||
| this.getQmxxList() | |||||
| this.getJjcgjList() | |||||
| this.saveSimpleLog({ jcmc: '填报表单审核', jcmcEn: '病历学家审核', name: this.form.bdmc + '(' + this.form.bdbh + ')', nameEn: this.form.bdmc + '(' + this.form.bdbh + ')' }) | |||||
| this.open = true | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| async showApprove(qmyy) { | |||||
| let content = await this.$refs.templateTable.getFormData() | |||||
| if (content) { | |||||
| this.openApprove = true | |||||
| this.resetApprove() | |||||
| this.formApprove.id = this.form.id | |||||
| this.formApprove.bdnr = JSON.stringify(content) | |||||
| this.formApprove.qmyy = qmyy | |||||
| if (qmyy == '病理学家审核通过') { | |||||
| this.openTitle = 'page.business.study.studyFormFill.blxjshtg' | |||||
| this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.blxjshtg') | |||||
| } else if (qmyy == '病理学家审核拒绝') { | |||||
| this.openTitle = 'page.business.study.studyFormFill.blxjshjj' | |||||
| this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.blxjshjj') | |||||
| } | |||||
| } | |||||
| }, | |||||
| resetApprove() { | |||||
| this.formApprove = { | |||||
| id: null, | |||||
| qmyy: '', | |||||
| qmyyMc: '', | |||||
| bdnr: '', | |||||
| remark: '', | |||||
| reason: '', | |||||
| qmrmm: '', | |||||
| } | |||||
| this.resetForm("formApprove") | |||||
| }, | |||||
| approve() { | |||||
| this.$refs["formApprove"].validate(valid => { | |||||
| if (valid) { | |||||
| this.$modal.loading() | |||||
| if (this.formApprove.qmyy == '病理学家审核通过') { | |||||
| studyFormFill_blxjshtg(this.formApprove).then(response => { | |||||
| this.openApprove = false | |||||
| this.$emit('close') | |||||
| this.open = false | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| } else if (this.formApprove.qmyy == '病理学家审核拒绝') { | |||||
| this.formApprove.remark = this.formApprove.reason | |||||
| studyFormFill_blxjshjj(this.formApprove).then(response => { | |||||
| this.openApprove = false | |||||
| this.$emit('close') | |||||
| this.open = false | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||