| | |
| | | width="80%" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @open='open' |
| | | class="submit-confirm-dialog" |
| | | > |
| | | <div class="approval-content"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <Table :tableData="sampleData" :total="0" :height="null"> |
| | | <Table :data="sampleData" :total="0" :height="null"> |
| | | <template> |
| | | <el-table-column prop="index" label="序号" width="60" align="center"></el-table-column> |
| | | <el-table-column prop="testName" label="检测项名称"></el-table-column> |
| | | <el-table-column prop="testCode" label="检测项编号"></el-table-column> |
| | | <el-table-column prop="testType" label="定性/定量" align="center"> |
| | | <el-table-column type="index" label="序号" width="60" align="center"></el-table-column> |
| | | <el-table-column prop="termName" label="检测项名称"></el-table-column> |
| | | <el-table-column prop="termCode" label="检测项编号"></el-table-column> |
| | | <el-table-column prop="termType" label="定性/定量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.testType === 1 ? '定性' : '定量' }} |
| | | {{ scope.row.termType === 1 ? '定性' : '定量' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="methodCode" label="检测方法编号"></el-table-column> |
| | | <el-table-column prop="methodName" label="检测方法"></el-table-column> |
| | | <el-table-column prop="requirements" label="收样要求" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="termMethodCode" label="检测方法编号"></el-table-column> |
| | | <el-table-column prop="termMethod" label="检测方法"></el-table-column> |
| | | <el-table-column prop="sampleRequire" label="收样要求" show-overflow-tooltip></el-table-column> |
| | | </template> |
| | | </Table> |
| | | |
| | |
| | | <el-button type="primary" @click="openSignature">签名</el-button> |
| | | </div> |
| | | <div v-if="imgSrc" class="signature-preview"> |
| | | <img :src="imgSrc" alt="签名" /> |
| | | <img :src="getFullUrl(imgSrc)" alt="签名" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">取 消</el-button> |
| | | <el-button type="primary" @click="handleConfirm" :disabled="!imgSrc">确 认</el-button> |
| | | <el-button type="primary" @click="handleConfirm">确 认</el-button> |
| | | </div> |
| | | |
| | | <SignatureCanvas |
| | |
| | | |
| | | <script> |
| | | import SignatureCanvas from "@/components/SignatureCanvas.vue"; |
| | | import {queryDetail} from '@/components/service.js' |
| | | import {getFullUrl} from '@/utils/utils.js' |
| | | |
| | | |
| | | export default { |
| | | name: "ConfirmDialog", |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(){ |
| | | queryDetail().then(res=>{ |
| | | if(res){ |
| | | this.imgSrc=res.signPicture |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.$emit("update:visible", false); |
| | | this.imgSrc = ""; |
| | |
| | | }, |
| | | handleSignatureConfirm(imageData) { |
| | | this.signatureDialogVisible = false; |
| | | this.imgSrc = imageData; |
| | | this.imgSrc = ""; // 先清空 |
| | | this.$nextTick(() => { |
| | | this.imgSrc = imageData; |
| | | }); |
| | | }, |
| | | handleConfirm() { |
| | | if (!this.imgSrc) { |
| | | this.$message.warning("请先完成签名确认"); |
| | | return; |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请先完成签名确认', |
| | | duration: 2000 |
| | | }) |
| | | return |
| | | } |
| | | this.$emit("confirm", this.imgSrc); |
| | | this.handleClose(); |
| | | }, |
| | | getFullUrl |
| | | }, |
| | | }; |
| | | </script> |