|
@@ -178,7 +178,7 @@
|
|
|
<div v-if="form.specialCodeSwitch" class="wrap-content-detail" style="background: #dcdfe63d;">
|
|
|
<div class="wrap-content-detail__item">
|
|
|
<el-form-item label="三要素换特殊码接口地址" prop="specialCodeUrl">
|
|
|
-<!-- <el-input
|
|
|
+ <!-- <el-input
|
|
|
v-model="form.specialCodeUrl"
|
|
|
placeholder="请输入三要素换特殊码接口地址"
|
|
|
maxlength="300"
|
|
@@ -312,6 +312,51 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
+ <div class="wrap-content__item">
|
|
|
+ <el-form-item label="是否加盖公章" prop="officialSealSwitch">
|
|
|
+ <el-radio-group v-model="form.officialSealSwitch">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div v-if="form.officialSealSwitch" class="wrap-content__item">
|
|
|
+ <el-form-item label="临时证明公章" prop="officialSealUrl">
|
|
|
+ <el-upload
|
|
|
+ name="file"
|
|
|
+ class="avatar-uploader"
|
|
|
+ action="#"
|
|
|
+ :show-file-list="false"
|
|
|
+ :http-request="
|
|
|
+ (event) => {
|
|
|
+ doUploadAvatar(event, 'officialSealUrl');
|
|
|
+ }
|
|
|
+ "
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ :auto-upload="true"
|
|
|
+ accept="image/png,image/gif,image/jpg,image/jpeg"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-if="!form.officialSealUrl"
|
|
|
+ class="upload-img"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="../../../assets/officialSealUrl-icon.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 56px;height: 51px"
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div v-else class="upload-img">
|
|
|
+ <img :src="form.officialSealUrl" style="width: 100%;height: 100%;">
|
|
|
+ <span
|
|
|
+ class="del-img"
|
|
|
+ @click.stop="handleRemove('officialSealUrl')"
|
|
|
+ >x</span>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div v-else class="wrap-content__item" />
|
|
|
<div class="wrap-content__item">
|
|
|
<el-form-item label="签发单位" prop="issuingAuthority">
|
|
|
<el-input v-model="form.issuingAuthority" placeholder="请输入" />
|
|
@@ -646,8 +691,8 @@
|
|
|
<script>
|
|
|
import TagCard from '@/components/TagCard'
|
|
|
import { applicationTypeList, deviceModelList, purchaserList } from '@/api/configuration'
|
|
|
-import { deviceAdd, noticeList, templateAdd } from '@/api/titlelib'
|
|
|
-import { parseTime } from '@/utils'
|
|
|
+import { noticeList, templateAdd } from '@/api/titlelib'
|
|
|
+import { pictureLocal } from '@/api/ordinary_user'
|
|
|
|
|
|
export default {
|
|
|
components: { TagCard },
|
|
@@ -702,6 +747,8 @@ export default {
|
|
|
'https://tx.hz-hanghui.com:8087/ti-prove/handleProveRecord/push', // 办证记录推送地址
|
|
|
|
|
|
printIdentityProof: true, // 是否打印临时证明
|
|
|
+ officialSealSwitch: false, // 是否加盖公章
|
|
|
+ officialSealUrl: '', // 公章图片地址
|
|
|
validTime: 2, // 临证有效期 默认为 2 最小为 1
|
|
|
issuingAuthority: '', // 签发单位
|
|
|
riskCheck: true, // 启用风险人员核查
|
|
@@ -856,6 +903,45 @@ export default {
|
|
|
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
|
|
}
|
|
|
},
|
|
|
+ handleRemove(type) {
|
|
|
+ if (type) {
|
|
|
+ this.form[type] = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 图片上传前
|
|
|
+ beforeAvatarUpload(file) {
|
|
|
+ if (
|
|
|
+ !(
|
|
|
+ file.type === 'image/png' ||
|
|
|
+ file.type === 'image/gif' ||
|
|
|
+ file.type === 'image/jpg' ||
|
|
|
+ file.type === 'image/jpeg'
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message:
|
|
|
+ '请上传格式为image/png, image/gif, image/jpg, image/jpeg的图片'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2
|
|
|
+ if (!isLt2M) {
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '图片大小必须小于2M'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ doUploadAvatar(obj, type) {
|
|
|
+ var avatar = new FormData()
|
|
|
+ avatar.append('file', obj.file)
|
|
|
+ pictureLocal(avatar).then((res) => {
|
|
|
+ this.value = res.data
|
|
|
+ this.$set(this.form, type, res.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
back() {
|
|
|
this.$emit('back')
|
|
|
},
|
|
@@ -872,7 +958,7 @@ export default {
|
|
|
try {
|
|
|
// 以下字段根据切换条件重置为默认值
|
|
|
const fieldArr = [
|
|
|
- 'specialCodeSwitch', 'specialCodeEncryptSwitch'
|
|
|
+ 'specialCodeSwitch', 'specialCodeEncryptSwitch', 'officialSealSwitch'
|
|
|
]
|
|
|
fieldArr.forEach(field => {
|
|
|
const fieldValue = this.form[field]
|
|
@@ -904,6 +990,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
break
|
|
|
+ // 是否加盖公章
|
|
|
+ case 'officialSealSwitch':
|
|
|
+ if (!fieldValue) {
|
|
|
+ this.form = {
|
|
|
+ ...this.form,
|
|
|
+ officialSealUrl: '' // 公章图片地址
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
})
|
|
|
await templateAdd(this.form)
|
|
@@ -971,7 +1066,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
.avatar-uploader .upload-default {
|
|
|
border: 1px dashed #d9d9d9;
|
|
|
border-radius: 0;
|
|
@@ -997,14 +1091,20 @@ export default {
|
|
|
color: #ced3e3;
|
|
|
}
|
|
|
.upload-img {
|
|
|
- width: 50px;
|
|
|
- height: 91px;
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
position: relative;
|
|
|
+ background: #F7F8FC;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border: 1px dashed #C4CAD7;
|
|
|
+ border-radius: 8px;
|
|
|
img {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
object-fit: contain;
|
|
|
// border-radius: 12px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-radius: 8px;
|
|
|
}
|
|
|
.del-img {
|
|
|
display: inline-block;
|