123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <template>
- <view class="sign_commit">
- <nav-bar title="签署承诺书"></nav-bar>
- <!-- 考试疫情承诺书 -->
- <view class="appointmentItem">
- <view class="title"><text class="star_red">*</text> 考试疫情承诺书</view>
- <view class="commitment">
- 本人参加“住房和城乡建设领域施工现场专业人员岗位”考试,愿意遵守疫情防控各项管理的相关要求,秉承对自己、对他人负责的原则,承担疫情防控社会责任,郑重作出以下承诺:<br/>
- 一、充分理解并遵守考试期间考点各项防疫安全的要求。<br/>
- 二、在考试前14天内,没有到过国内疫情中风险、高风险地区,未出境,不存在自境外回国情形。<br/>
- 三、在考试前14天内,每日自觉监测体温,体温均未出现高于37.3度的情形,无发热和呼吸道门诊就诊史。<br/>
- 四、在考试前14天内,未和新冠肺炎病例或疑似病例密切接触或间接接触,没有发烧、干咳、乏力、咳痰、气短、肌肉痛或关节痛、咽喉痛、头痛、寒颤、恶心或呕吐、鼻塞、腹泻、咳血、结膜充血等疑似新冠肺炎症状。<br/>
- 五、如出现与前述第二、三、四项任何一项不符的情形之一的,本人将及时在考前向相关管理机构报告,自觉配合采取隔离或其他防疫措施,并根据情况,自愿放弃参加考试。<br/>
- 六、考试当日自行做好防护工作,佩戴防护口罩。提前抵达考点,配合查验健康码、测量体温等。<br/>
- 七、考试期间,将严格遵守应考人员考场守则及疫情防控相关管理要求,完成考试后立即离场,不扎堆,不聚集。<br/>
- 八、本人承诺遵守《应考人员安全承诺书》中所有承诺内容,若因有瞒报、谎报造成新冠肺炎疫情传播的,一经查实,由本人承担相应的法律和经济责任。
- </view>
- </view>
- <view class="appointmentItem">
- <view class="title"><text class="star_red">*</text>签名板</view>
- <view class="dis_stys">
- <text style="color: #999999">请在下方签名区进行签名</text>
- <text @click="retDraw" mode="">清空</text>
- </view>
- <view class="handCenter">
- <!-- v-if="!form[item.fieldKey]" -->
- <canvas
- class="handWriting"
- disable-scroll="true"
- :catchtouchmove="true"
- @touchstart="uploadScaleStart"
- @touchmove="uploadScaleMove"
- @touchend="uploadScaleEnd"
- canvas-id="handWriting"
- ></canvas>
- <!-- <view
- v-else
- style="width: 100%; height: 100%; position: relative"
- >
- <view class="ctoples">图片</view>
- <image
- style="width: 100%; height: 100%"
- :src="$method.splitImgHost(form[item.fieldKey])"
- mode=""
- ></image>
- </view> -->
- </view>
- </view>
- <view class="finish_btn" @click="submits()">
- 完成签署
- </view>
- </view>
- </template>
- <script>
- import Handwriting from "@/common/signature.js";
- export default {
- name: 'sign_commit',
- data() {
- return {
- handwriting: '',
- lineColor: "black",
- slideValue: 50,
- commitment_electr_signature: '',
- isUploading: false,
- }
- },
- onReady(res) {
- this.handwriting = new Handwriting({
- lineColor: this.lineColor,
- slideValue: this.slideValue, // 0, 25, 50, 75, 100
- canvasName: "handWriting",
- });
- // this.$refs.uForm.setRules(this.rules);
- },
- methods: {
- retDraw() {
- this.handwriting.retDraw()
- this.commitment_electr_signature = ''
- // this.$set(this.form, "commitment_electr_signature", "");
- },
- uploadScaleStart(event) {
- this.handwriting.uploadScaleStart(event);
- },
- uploadScaleMove(event) {
- this.handwriting.uploadScaleMove(event);
- },
- uploadScaleEnd(event) {
- this.handwriting.uploadScaleEnd(event);
- },
- subCanvas() {
- console.log("签名-------");
- return new Promise((resolve, reject) => {
- if (this.commitment_electr_signature) {
- resolve();
- return;
- }
- this.handwriting.saveCanvas().then((res) => {
- if (this.handwriting.linePrack.length) {
- console.log('签名-----res', res)
- // this.$set(this.form, "commitment_electr_signature", res);
- this.commitment_electr_signature = res
- }
- resolve(res)
- })
- .catch((err) => {
- uni.showToast({
- title: "签名上传失败",
- icon: "error",
- });
- });
- this.isUploading = false
- });
- },
- async submits() {
- if (this.isUploading) {
- return;
- }
- this.isUploading = true
- await this.subCanvas()
- if (!this.commitment_electr_signature) {
- uni.showToast({
- title: "请签名",
- icon: "none",
- })
- return
- } else {
- await this.submitApi()
- }
- },
- //提交表单
- async submitApi() {
- if (this.commitment_electr_signature) {
- this.commitment_electr_signature = await this.$method.uploadFile(
- this.commitment_electr_signature,
- 0
- );
- console.log('----commitment_electr_signature', this.commitment_electr_signature)
- }
- },
- },
- }
- </script>
- <style>
- page {
- background-color: #eaeef1;
- }
- </style>
- <style lang="scss" scoped>
- .sign_commit {
- padding-bottom: 50rpx;
- .appointmentItem {
- margin: 24rpx 0 40rpx;
- .title {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 1;
- margin-bottom: 16rpx;
- padding-left: 24rpx;
- .star_red {
- color: red;
- }
- }
- .place {
- height: 80rpx;
- background: #ffffff;
- border-radius: 16rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 24rpx;
- }
- .commitment {
- padding: 12rpx;
- height: 900rpx;
- background: #ffffff;
- overflow-y: auto;
- }
- .handCenter, .dis_stys, .commitment {
- margin: 0rpx 24rpx;
- }
- .dis_stys {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 16rpx;
- }
- .handCenter {
- .handWriting {
- width: 100%;
- height: 400rpx;
- background: #fff;
- }
- }
- }
- .finish_btn {
- // width: 100%;
- height: 100rpx;
- line-height: 100rpx;
- text-align: center;
- background-color:#1890ff;
- font-size: 32rpx;
- color: #fff;
- border-radius: 10rpx;
- margin: 20rpx 24rpx;
- }
- }
- </style>
|