|
@@ -0,0 +1,564 @@
|
|
|
+<template>
|
|
|
+ <div class="wrap-layout">
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="150px"
|
|
|
+ label-position="left"
|
|
|
+ >
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">设备基本信息</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item label="设备sn" prop="sn" required>
|
|
|
+ <el-input v-model="form.sn" placeholder="请输入设备sn" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="服务商平台名称" prop="tenantId" required>
|
|
|
+ <el-select v-model="form.tenantId" placeholder="服务商平台名称" filterable>
|
|
|
+ <el-option v-for="(item, index) in merchantLists" :key="index" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="公司名称" prop="company" required>
|
|
|
+ <el-input v-model="form.company" placeholder="请输入公司名称" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="场景" prop="sceneId" :required="false">
|
|
|
+ <el-select v-model="form.sceneId" placeholder="请选择场景" clearable>
|
|
|
+ <el-option v-for="(item, index) in sceneLists" :key="index" :label="item.sceneName" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="模式" prop="mode" required>
|
|
|
+ <el-select v-model="form.mode" placeholder="请选择模式">
|
|
|
+ <el-option v-for="(item, index) in modeLists" :key="index" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="!(!form.mode || form.mode === 'public')" label="⽤户库" prop="userLibId" :required="false">
|
|
|
+ <el-select v-model="form.userLibId" placeholder="请选择⽤户库" clearable>
|
|
|
+ <el-option v-for="(item, index) in userlibLists" :key="index" :label="item.userLibName" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">采集配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item label="启用支付宝人脸能力" prop="useAlipayFace" required>
|
|
|
+ <el-radio-group v-model="form.useAlipayFace">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="启用身份证功能" prop="useIdcard">
|
|
|
+ <el-radio-group v-model="form.useIdcard">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="启用人证比对" prop="usePersonCard">
|
|
|
+ <el-radio-group v-model="form.usePersonCard">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="启用二维码功能" prop="useQrcode">
|
|
|
+ <el-radio-group v-model="form.useQrcode">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="form.useAlipayFace" class="item-layout">
|
|
|
+ <span class="prompt">支付宝刷脸配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item label="刷脸模式" prop="faceMode">
|
|
|
+ <el-radio-group v-model="form.faceMode">
|
|
|
+ <el-radio label="auto">自动</el-radio>
|
|
|
+ <el-radio label="click">点击</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="form.faceMode === 'click'" label="点击刷脸按钮的文本" prop="clickButtonText">
|
|
|
+ <el-input v-model="form.clickButtonText" placeholder="请输入点击刷脸按钮的文本" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="form.faceMode === 'click'" label="是否抓拍人脸" prop="isCaptureFace">
|
|
|
+ <el-radio-group v-model="form.isCaptureFace">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="overlength" label="need1V1是否使用支付宝刷证提示页" prop="isNeed1V1">
|
|
|
+ <el-radio-group v-model="form.isNeed1V1">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">联动平台配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item label="启用联动平台" prop="useLinkage">
|
|
|
+ <el-radio-group v-model="form.useLinkage">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="form.useLinkage" label="联动平台地址" prop="linkageAds">
|
|
|
+ <el-input v-model="form.linkageAds" placeholder="请输入联动平台地址" maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">结果页配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item class="overlength" label="刷脸成功结果页时长(1~10)" prop="successPageTime">
|
|
|
+ <el-input-number v-model="form.successPageTime" size="mini" :min="1" :max="10" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="overlength" label="刷脸失败结果页时长(1~10)" prop="failPageTime">
|
|
|
+ <el-input-number v-model="form.failPageTime" size="mini" :min="1" :max="10" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开门信号" prop="useSerialPort">
|
|
|
+ <el-radio-group v-model="form.useSerialPort">
|
|
|
+ <el-radio label="default" style="margin-right: 40px;">继电器</el-radio>
|
|
|
+ <el-radio label="RS232">RS232</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="form.useSerialPort === 'RS232'" label="RS232默认信号" prop="signalNo">
|
|
|
+ <el-input v-model="form.signalNo" placeholder="请输入RS232默认信号" maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="成功语音" prop="sucVoice">
|
|
|
+ <el-input v-model="form.sucVoice" placeholder="请输入成功语音" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="成功文字" prop="sucText">
|
|
|
+ <el-input v-model="form.sucText" placeholder="请输入成功文字" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="失败语音" prop="failVoice">
|
|
|
+ <el-input v-model="form.failVoice" placeholder="请输入成功语音" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="失败文字" prop="failText">
|
|
|
+ <el-input v-model="form.failText" placeholder="请输入失败文字" maxlength="50" />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">页面背景配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item label="首页图片配置" prop="homePageUrl">
|
|
|
+ <el-upload
|
|
|
+ name="file"
|
|
|
+ class="avatar-uploader"
|
|
|
+ action="#"
|
|
|
+ :show-file-list="false"
|
|
|
+ :http-request="(event) => { doUploadAvatar(event, 'homeImgUrl'); }"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ :auto-upload="true"
|
|
|
+ accept="image/png,image/gif,image/jpg,image/jpeg"
|
|
|
+ >
|
|
|
+ <img v-if="!form.homeImgUrl" class="upload-img" src="../../../assets/default-img-home.jpg" alt="">
|
|
|
+ <div v-else class="upload-img">
|
|
|
+ <img :src="form.homeImgUrl">
|
|
|
+ <span class="del-img" @click.stop="handleRemove('homeImgUrl')">x</span>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="过渡图片配置" prop="transitionPageUrl">
|
|
|
+ <el-upload
|
|
|
+ name="file"
|
|
|
+ class="avatar-uploader"
|
|
|
+ action="#"
|
|
|
+ :show-file-list="false"
|
|
|
+ :http-request="(event) => { doUploadAvatar(event, 'transitionPageUrl'); }"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
+ :auto-upload="true"
|
|
|
+ accept="image/png,image/gif,image/jpg,image/jpeg"
|
|
|
+ >
|
|
|
+ <!-- <view v-if="!form.transitionPageUrl">
|
|
|
+ <i class="el-icon-upload" />
|
|
|
+ <div class="el-upload__text">上传图片</div>
|
|
|
+ </view> -->
|
|
|
+ <i v-if="!form.transitionPageUrl" class="el-icon-plus avatar-uploader-icon" />
|
|
|
+ <div v-else class="upload-img">
|
|
|
+ <img :src="form.transitionPageUrl">
|
|
|
+ <span class="del-img" @click.stop="handleRemove('transitionPageUrl')">x</span>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">系统配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item label="补光灯" prop="lightMode">
|
|
|
+ <el-select v-model="form.lightMode" placeholder="请选择补光灯模式">
|
|
|
+ <el-option v-for="(item, index) in lightModeLists" :key="index" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="语音音量(1~100)" prop="volume">
|
|
|
+ <el-input-number v-model="form.volume" size="mini" :min="1" :max="100" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="隐藏底部导航栏" prop="hideNavigationBar">
|
|
|
+ <el-radio-group v-model="form.hideNavigationBar">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="禁止下拉通知栏" prop="forbidPullDown">
|
|
|
+ <el-radio-group v-model="form.forbidPullDown">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item-layout">
|
|
|
+ <span class="prompt">zoloConfig摄像头配置</span>
|
|
|
+ <div class="display-config-layout">
|
|
|
+ <el-form-item class="overlength" label="摄像头显示角度(0~270)" prop="supAlgorithmAngle">
|
|
|
+ <el-input-number v-model="form.zoloConfig.supAlgorithmAngle" size="mini" :min="0" :max="270" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="overlength" label="RGB摄像头旋转角度(0~270)" prop="algorithmAngle">
|
|
|
+ <el-input-number v-model="form.zoloConfig.algorithmAngle" size="mini" :min="0" :max="270" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="overlength" label="IR摄像头旋转角度(0~270)" prop="displayAngle">
|
|
|
+ <el-input-number v-model="form.zoloConfig.displayAngle" size="mini" :min="1" :max="270" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="RGB摄像头镜像" prop="isMirror">
|
|
|
+ <el-radio-group v-model="form.zoloConfig.isMirror">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="IR摄像头镜像" prop="isDisplayMirror">
|
|
|
+ <el-radio-group v-model="form.zoloConfig.isDisplayMirror">
|
|
|
+ <el-radio :label="true">是</el-radio>
|
|
|
+ <el-radio :label="false">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { add } from '@/api/device'
|
|
|
+import { pictureLocal } from '@/api/ordinary_user'
|
|
|
+import { getAllList } from '@/api/merchant'
|
|
|
+import { getList as getSceneList } from '@/api/scene'
|
|
|
+import { getList as getUserlibList } from '@/api/userlib'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'EditDevice',
|
|
|
+ props: {
|
|
|
+ obj: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ submitLoading: false,
|
|
|
+ merchantLists: [],
|
|
|
+ sceneLists: [],
|
|
|
+ userlibLists: [],
|
|
|
+ modeLists: [
|
|
|
+ {
|
|
|
+ key: 'public',
|
|
|
+ value: '开放'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'close',
|
|
|
+ value: '封闭'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'elasticity',
|
|
|
+ value: '弹性'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ lightModeLists: [
|
|
|
+ {
|
|
|
+ key: 'auto',
|
|
|
+ value: '自动'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ form: {
|
|
|
+ // 点击刷脸按钮文本 默认 点击开始刷脸核验
|
|
|
+ clickButtonText: '点击开始刷脸核验',
|
|
|
+ // 公司名称
|
|
|
+ company: null,
|
|
|
+ // 刷脸模式: 点击/自动 click/auto 默认 auto
|
|
|
+ faceMode: 'auto',
|
|
|
+ // 刷脸失败结果页时长 1-10 默认值5
|
|
|
+ failPageTime: 5,
|
|
|
+ // 失败文字 默认: 比对失败,请联系现场工作人员
|
|
|
+ failText: '比对失败,请联系现场工作人员',
|
|
|
+ // 失败语音 默认: 比对失败,请联系现场工作人员
|
|
|
+ failVoice: '比对失败,请联系现场工作人员',
|
|
|
+ // 禁止下拉通知栏 默认: false
|
|
|
+ forbidPullDown: false,
|
|
|
+ // 隐藏底部导航栏 默认: false
|
|
|
+ hideNavigationBar: false,
|
|
|
+ // 首页图片
|
|
|
+ homePageUrl: null,
|
|
|
+ id: null,
|
|
|
+ // 是否抓拍人脸 默认:false
|
|
|
+ isCaptureFace: false,
|
|
|
+ // need1V1是否使用支付宝刷证提示页 默认:true
|
|
|
+ isNeed1V1: true,
|
|
|
+ // 补光灯: 自动 auto 默认:auto
|
|
|
+ lightMode: 'auto',
|
|
|
+ // 联动平台地址
|
|
|
+ linkageAds: null,
|
|
|
+ // 模式 mode: public/close/elasticity 三个参数分别代表 开放/封闭/弹性
|
|
|
+ mode: null,
|
|
|
+ // 场景id
|
|
|
+ sceneId: null,
|
|
|
+ // RS232默认信号
|
|
|
+ signalNo: null,
|
|
|
+ // 设备sn
|
|
|
+ sn: null,
|
|
|
+ // 授权状态 false:未授权 true:已授权
|
|
|
+ status: null,
|
|
|
+ // 成功文字 默认: 请通行
|
|
|
+ sucText: '请通行',
|
|
|
+ // 成功语音 默认: 请通行
|
|
|
+ sucVoice: '请通行',
|
|
|
+ // 刷脸成功结果页时长 1-10 默认值2
|
|
|
+ successPageTime: 2,
|
|
|
+ // 商户id tenantId
|
|
|
+ tenantId: null,
|
|
|
+ // 过渡图片
|
|
|
+ transitionPageUrl: null,
|
|
|
+ // 是否启用支付宝人脸能力 默认:true
|
|
|
+ useAlipayFace: true,
|
|
|
+ // 是否启用身份证功能 默认:true
|
|
|
+ useIdcard: true,
|
|
|
+ // 是否启用联动平台 默认:true
|
|
|
+ useLinkage: true,
|
|
|
+ // 是否人证比对 默认:false
|
|
|
+ usePersonCard: false,
|
|
|
+ // 是否启用二维码功能 默认:true
|
|
|
+ useQrcode: true,
|
|
|
+ // 开门信号: 继电器/RS232 default/RS232 默认:default
|
|
|
+ useSerialPort: 'default',
|
|
|
+ // 用户库id
|
|
|
+ userLibId: null,
|
|
|
+ // 语音音量 0-100 默认值80
|
|
|
+ volume: 80,
|
|
|
+ // zoloConfig摄像头配置
|
|
|
+ zoloConfig: {
|
|
|
+ // RGB摄像头旋转角度 0-270 默认值270
|
|
|
+ algorithmAngle: 270,
|
|
|
+ // IR摄像头旋转角度 0-270 默认值270
|
|
|
+ displayAngle: 270,
|
|
|
+ // IR摄像头镜像 默认值false
|
|
|
+ isDisplayMirror: false,
|
|
|
+ // RGB摄像头镜像 默认值true
|
|
|
+ isMirror: true,
|
|
|
+ // 摄像头显示角度 0-270 默认值90
|
|
|
+ supAlgorithmAngle: 90
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ sn: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入设备sn',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initData() {
|
|
|
+ this.getMerchantList()
|
|
|
+ this.getSceneList()
|
|
|
+ this.getUserlibList()
|
|
|
+ if (this.obj) {
|
|
|
+ this.form = this.obj
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getMerchantList() {
|
|
|
+ getAllList().then(res => {
|
|
|
+ this.merchantLists = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getSceneList() {
|
|
|
+ getSceneList({ pageNumber: 1, pageSize: 1000 }).then(res => {
|
|
|
+ this.sceneLists = res.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getUserlibList() {
|
|
|
+ getUserlibList({ pageNumber: 1, pageSize: 1000 }).then(res => {
|
|
|
+ this.userlibLists = res.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 2
|
|
|
+ if (!isLt2M) {
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '图片大小必须小于2M'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ },
|
|
|
+ doUploadAvatar(obj, type) {
|
|
|
+ this.listLoading = true
|
|
|
+ var avatar = new FormData()
|
|
|
+ avatar.append('file', obj.file)
|
|
|
+ pictureLocal(avatar).then((res) => {
|
|
|
+ this.value = res.data
|
|
|
+ this.listLoading = false
|
|
|
+ this.$set(this.form, type, res.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ submit(e) {
|
|
|
+ e.preventDefault()
|
|
|
+ this.$refs.form.validate(async(valid) => {
|
|
|
+ if (!valid) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.submitLoading) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.submitLoading = true
|
|
|
+ try {
|
|
|
+ // 启用支付宝人脸能力
|
|
|
+ // if (!this.form.useAlipayFace) {
|
|
|
+ // this.form.faceMode = 'auto'
|
|
|
+ // this.form.isNeed1V1 = true
|
|
|
+ // }
|
|
|
+
|
|
|
+ // 是否启用联动平台
|
|
|
+ if (!this.form.useLinkage) {
|
|
|
+ this.form.linkageAds = null
|
|
|
+ }
|
|
|
+
|
|
|
+ // 刷脸模式 非点击
|
|
|
+ if (this.form.faceMode !== 'click') {
|
|
|
+ this.form.clickButtonText = null
|
|
|
+ this.form.isCaptureFace = false
|
|
|
+ }
|
|
|
+
|
|
|
+ // 开门信号
|
|
|
+ // if (this.form.useSerialPort !== 'RS232') {
|
|
|
+ // this.form.
|
|
|
+ // }
|
|
|
+ await add(this.form)
|
|
|
+ this.$emit('finish')
|
|
|
+ } catch (e) {
|
|
|
+ console.info('add', e)
|
|
|
+ } finally {
|
|
|
+ this.submitLoading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.wrap-layout {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-start;
|
|
|
+ width: 1120px;
|
|
|
+ form {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item-layout {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-start;
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 24px;
|
|
|
+ &:before {
|
|
|
+ position: absolute;
|
|
|
+ top: 1px;
|
|
|
+ left: -10px;
|
|
|
+ width: 3px;
|
|
|
+ height: 16px;
|
|
|
+ content: "";
|
|
|
+ background-color: #409EFF;
|
|
|
+ border-radius: 3px;
|
|
|
+ }
|
|
|
+ .prompt {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ .display-config-layout {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding-top: 12px;
|
|
|
+ width: 100%;
|
|
|
+ & > div {
|
|
|
+ width: calc(50% - 60px);
|
|
|
+ flex: none;
|
|
|
+ margin-left: 0;
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ & > div:nth-child(odd) {
|
|
|
+ margin-right: 120px;
|
|
|
+ }
|
|
|
+ .overlength ::v-deep .el-form-item__label {
|
|
|
+ line-height: 1.4;
|
|
|
+ }
|
|
|
+ .upload-img {
|
|
|
+ width: 63px;
|
|
|
+ height: 91px;
|
|
|
+ position: relative;
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: contain;
|
|
|
+ // border-radius: 12px;
|
|
|
+ }
|
|
|
+ .del-img {
|
|
|
+ display: inline-block;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ background: #83878f;
|
|
|
+ color: #fff;
|
|
|
+ position: absolute;
|
|
|
+ top: -12px;
|
|
|
+ right: -10px;
|
|
|
+ border-radius: 48%;
|
|
|
+ line-height: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-radio__input {
|
|
|
+ vertical-align: top;
|
|
|
+ }
|
|
|
+ ::v-deep .el-select {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ ::v-deep .el-radio-group {
|
|
|
+ & > label.el-radio {
|
|
|
+ margin-right: 60px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|