|
@@ -61,6 +61,52 @@
|
|
</el-select>
|
|
</el-select>
|
|
<span v-if="addressId && !activeList.length">该考试地点暂无考试时间,建议重新选择考试地点</span>
|
|
<span v-if="addressId && !activeList.length">该考试地点暂无考试时间,建议重新选择考试地点</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item v-if="reportStatus == 1" label="考试疫情防控承诺书:" label-width="165px">
|
|
|
|
+ <div class="commitment">
|
|
|
|
+ 本人参加“住房和城乡建设领域施工现场专业人员岗位”考试,愿意遵守疫情防控各项管理的相关要求,秉承对自己、对他人负责的原则,承担疫情防控社会责任,郑重作出以下承诺:<br/>
|
|
|
|
+ 一、充分理解并遵守考试期间考点各项防疫安全的要求。<br/>
|
|
|
|
+ 二、在考试前14天内,没有到过国内疫情中风险、高风险地区,未出境,不存在自境外回国情形。<br/>
|
|
|
|
+ 三、在考试前14天内,每日自觉监测体温,体温均未出现高于37.3度的情形,无发热和呼吸道门诊就诊史。<br/>
|
|
|
|
+ 四、在考试前14天内,未和新冠肺炎病例或疑似病例密切接触或间接接触,没有发烧、干咳、乏力、咳痰、气短、肌肉痛或关节痛、咽喉痛、头痛、寒颤、恶心或呕吐、鼻塞、腹泻、咳血、结膜充血等疑似新冠肺炎症状。<br/>
|
|
|
|
+ 五、如出现与前述第二、三、四项任何一项不符的情形之一的,本人将及时在考前向相关管理机构报告,自觉配合采取隔离或其他防疫措施,并根据情况,自愿放弃参加考试。<br/>
|
|
|
|
+ 六、考试当日自行做好防护工作,佩戴防护口罩。提前抵达考点,配合查验健康码、测量体温等。<br/>
|
|
|
|
+ 七、考试期间,将严格遵守应考人员考场守则及疫情防控相关管理要求,完成考试后立即离场,不扎堆,不聚集。<br/>
|
|
|
|
+ 八、本人承诺遵守《应考人员安全承诺书》中所有承诺内容,若因有瞒报、谎报造成新冠肺炎疫情传播的,一经查实,由本人承担相应的法律和经济责任。
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="reportStatus == 1" label="签名板:">
|
|
|
|
+ <div class="dis_stys">
|
|
|
|
+ <span style="color: #999999">请在下方签名区进行签名</span>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="retDraw"
|
|
|
|
+ mode=""
|
|
|
|
+ >清空</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ <div class="handCenter">
|
|
|
|
+ <vue-esign
|
|
|
|
+ ref="esign"
|
|
|
|
+ :width="600"
|
|
|
|
+ :height="300"
|
|
|
|
+ :isCrop="false"
|
|
|
|
+ :lineWidth="5"
|
|
|
|
+ :lineColor="'#333'"
|
|
|
|
+ />
|
|
|
|
+ <!-- <div
|
|
|
|
+ v-else
|
|
|
|
+ style="width: 100%; height: 100%; position: relative"
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
|
+ :src="$tools.splitImgHost(infoForm[item.fieldKey])"
|
|
|
|
+ mode=""
|
|
|
|
+ />
|
|
|
|
+ </div> -->
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="appointment-content__footer">
|
|
<div class="appointment-content__footer">
|
|
@@ -121,6 +167,11 @@ export default {
|
|
dataId: "",
|
|
dataId: "",
|
|
orderGoodsId: "",
|
|
orderGoodsId: "",
|
|
addressName: "",
|
|
addressName: "",
|
|
|
|
+ uploading: false,
|
|
|
|
+ commitment_electr_signature: '',
|
|
|
|
+ siteId: '', // 考场id
|
|
|
|
+ reportStatus: 0, // 是否线上签署疫情防控承诺书, 1是,0否
|
|
|
|
+ baseAddress: '', // 签名转成base64
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -129,6 +180,7 @@ export default {
|
|
this.applyStatus = this.$route.query.applyStatus;
|
|
this.applyStatus = this.$route.query.applyStatus;
|
|
this.dataId = this.$route.query.dataId;
|
|
this.dataId = this.$route.query.dataId;
|
|
this.orderGoodsId = this.$route.query.orderGoodsId;
|
|
this.orderGoodsId = this.$route.query.orderGoodsId;
|
|
|
|
+ this.reportStatus = this.$route.query.reportStatus
|
|
|
|
|
|
this.getApplysubscribeApplySite();
|
|
this.getApplysubscribeApplySite();
|
|
},
|
|
},
|
|
@@ -149,6 +201,9 @@ export default {
|
|
(item) => item.id == this.addressId
|
|
(item) => item.id == this.addressId
|
|
);
|
|
);
|
|
this.addressName = this.listData[index].siteAddress;
|
|
this.addressName = this.listData[index].siteAddress;
|
|
|
|
+
|
|
|
|
+ this.siteId = this.listData[index].siteId
|
|
|
|
+ console.log('siteId: ', this.siteId, index)
|
|
this.listData[index].examUserApplySiteTime.forEach((item) => {
|
|
this.listData[index].examUserApplySiteTime.forEach((item) => {
|
|
item.examApplySiteTimeTwoVo.forEach((items) => {
|
|
item.examApplySiteTimeTwoVo.forEach((items) => {
|
|
arrays.push({
|
|
arrays.push({
|
|
@@ -206,54 +261,137 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- sureOppoint() {
|
|
|
|
|
|
+ async sureOppoint() {
|
|
|
|
+ if (this.uploading) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.uploading = true
|
|
|
|
+
|
|
var self = this;
|
|
var self = this;
|
|
if (self.addressId) {
|
|
if (self.addressId) {
|
|
if (this.timeIndex !== "") {
|
|
if (this.timeIndex !== "") {
|
|
- var copyData = JSON.parse(JSON.stringify(self.activeList));
|
|
|
|
- const index = copyData.findIndex(
|
|
|
|
- (item, index) => this.timeIndex == index
|
|
|
|
- );
|
|
|
|
- var data = {
|
|
|
|
- applyId: self.applyId,
|
|
|
|
- goodsId: self.goodsId,
|
|
|
|
- studentType: self.applyStatus,
|
|
|
|
- applySiteAddress: self.addressName,
|
|
|
|
- applySiteExamTime: copyData[index].examTime,
|
|
|
|
- applySiteStartTime: copyData[index].startTimeC,
|
|
|
|
- applySiteEndTime: copyData[index].endTimeC,
|
|
|
|
- orderGoodsId: self.orderGoodsId,
|
|
|
|
- };
|
|
|
|
- if (self.dataId == 1) {
|
|
|
|
- this.updateApplyData(data);
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/person-center/my-classhour/appointment-add-kp",
|
|
|
|
- query: {
|
|
|
|
- applyId: self.applyId,
|
|
|
|
- applyStatus: self.applyStatus,
|
|
|
|
- goodsId: self.goodsId,
|
|
|
|
- orderGoodsId: self.orderGoodsId,
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (self.dataId == 2) {
|
|
|
|
- self.$request.addApply(data).then((res) => {
|
|
|
|
- this.showDetailModal = true;
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.reportStatus == 1) {
|
|
|
|
+ await this.subCanvas()
|
|
|
|
+ if (!this.commitment_electr_signature) {
|
|
|
|
+ this.$message.warning('请签名')
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ this.submits()
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.submits()
|
|
}
|
|
}
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
type: "warning",
|
|
type: "warning",
|
|
message: "请选择考试时间",
|
|
message: "请选择考试时间",
|
|
});
|
|
});
|
|
|
|
+ this.uploading = false
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
type: "warning",
|
|
type: "warning",
|
|
message: "请选择考试地点",
|
|
message: "请选择考试地点",
|
|
});
|
|
});
|
|
|
|
+ this.uploading = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ submits() {
|
|
|
|
+ var copyData = JSON.parse(JSON.stringify(this.activeList));
|
|
|
|
+ const index = copyData.findIndex(
|
|
|
|
+ (item, index) => this.timeIndex == index
|
|
|
|
+ );
|
|
|
|
+ var data = {
|
|
|
|
+ applyId: this.applyId,
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
+ studentType: this.applyStatus,
|
|
|
|
+ applySiteAddress: this.addressName,
|
|
|
|
+ applySiteExamTime: copyData[index].examTime,
|
|
|
|
+ applySiteStartTime: copyData[index].startTimeC,
|
|
|
|
+ applySiteEndTime: copyData[index].endTimeC,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ siteId: this.siteId, // 考场id
|
|
|
|
+ };
|
|
|
|
+ if (this.reportStatus == 1) {
|
|
|
|
+ data.signImageStr = this.commitment_electr_signature
|
|
|
|
+ }
|
|
|
|
+ console.log('---data', data)
|
|
|
|
+ // return
|
|
|
|
+ if (this.dataId == 1) {
|
|
|
|
+ this.updateApplyData(data);
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/person-center/my-classhour/appointment-add-kp",
|
|
|
|
+ query: {
|
|
|
|
+ applyId: this.applyId,
|
|
|
|
+ applyStatus: this.applyStatus,
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (this.dataId == 2) {
|
|
|
|
+ this.$request.addApply(data).then((res) => {
|
|
|
|
+ console.log('sfhsdfu成功')
|
|
|
|
+ this.showDetailModal = true;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ retDraw() {
|
|
|
|
+ this.commitment_electr_signature = ''
|
|
|
|
+ // this.$set(this.infoForm, "commitment_electr_signature", "");
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.esign.reset()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ subCanvas() {
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
+ if (this.commitment_electr_signature) {
|
|
|
|
+ resolve();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ console.log('this.$refs', this.$refs)
|
|
|
|
+ this.$refs.esign
|
|
|
|
+ .generate() // 使用生成器调用把签字的图片转换成为base64图片格式
|
|
|
|
+ .then(async (res) => {
|
|
|
|
+ // let url = await this.$upload.upload(
|
|
|
|
+ // this.convertBase64UrlToBlob(res),
|
|
|
|
+ // 0
|
|
|
|
+ // );
|
|
|
|
+ console.log('base64:', res)
|
|
|
|
+ this.commitment_electr_signature = res
|
|
|
|
+ // this.$set(this.infoForm, "commitment_electr_signature", url);
|
|
|
|
+ resolve();
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ console.log(err, "err");
|
|
|
|
+ // 画布没有签字时会执行这里提示一下
|
|
|
|
+ this.uploading = false
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: "warning",
|
|
|
|
+ // message: "请签名后再生成签字图片",
|
|
|
|
+ // });
|
|
|
|
+ resolve();
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ convertBase64UrlToBlob(urlData) {
|
|
|
|
+ console.log('dsfsdg', urlData)
|
|
|
|
+ var localData = urlData; //dataUrl为base64位
|
|
|
|
+ let base = atob(localData.substring(localData.indexOf(",") + 1)); // base是将base64编码解码,去掉data:image/png;base64部分
|
|
|
|
+ console.log('base', base)
|
|
|
|
+ let length = base.length;
|
|
|
|
+ let url = new Uint8Array(length);
|
|
|
|
+ while (length--) {
|
|
|
|
+ url[length] = base.charCodeAt(length);
|
|
|
|
+ }
|
|
|
|
+ let file = new File([url], "a.jpg", {
|
|
|
|
+ type: "image/jpg",
|
|
|
|
+ });
|
|
|
|
+ console.log('file',file)
|
|
|
|
+ //最后将file,通过ajax请求做为参数传给服务器就可以了
|
|
|
|
+ return file;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -437,5 +575,17 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .commitment {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 300px;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ border: 1px solid #ddd;
|
|
|
|
+ }
|
|
|
|
+ .handCenter {
|
|
|
|
+ width: 600px;
|
|
|
|
+ height: 300px;
|
|
|
|
+ background-color: #DCDFE6;
|
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|