|
|
|
|
@ -1,10 +1,9 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="g-components-item">
|
|
|
|
|
<view class="m-set g_bg_f g_radius_8">
|
|
|
|
|
<view
|
|
|
|
|
<div class="g-components-item">
|
|
|
|
|
<div class="m-set g_bg_f g_radius_8" :style="{ borderRadius: list[0] && list[0].radius == 'no_top' ? '0 0 8px 8px' : list[0] && list[0].radius == 'no_bottom' ? '8px 8px 0 0 ' : '' }">
|
|
|
|
|
<block v-for="(item, index) in list" :key="index">
|
|
|
|
|
<div
|
|
|
|
|
class="item g_flex_row_start"
|
|
|
|
|
v-for="(item, index) in list"
|
|
|
|
|
:key="index"
|
|
|
|
|
:style="{
|
|
|
|
|
'padding-top': (item.pColumn ? item.pColumn : 19) + 'px',
|
|
|
|
|
'padding-bottom': (item.pColumn ? item.pColumn : 19) + 'px',
|
|
|
|
|
@ -12,48 +11,55 @@
|
|
|
|
|
'padding-right': (item.pRow ? item.pRow : 10) + 'px',
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<view class="g_flex_none g_pr_10 g_flex_column_center">
|
|
|
|
|
<view
|
|
|
|
|
class="g_flex_1 g_flex_row_start"
|
|
|
|
|
<div class="g_flex_none g_pr_10 g_flex_column_center">
|
|
|
|
|
<div class="g_flex_1 g_flex_row_start">
|
|
|
|
|
<div class="t-icon g_h_22 g_w_22 g_pl_7 g_mr_5" style="width: 22px; height: 22px" v-if="item.icon" :class="'t-' + item.icon"></div>
|
|
|
|
|
<div
|
|
|
|
|
class="g_flex_column_center g_c_3 g_fs_16"
|
|
|
|
|
:class="{
|
|
|
|
|
labelRequire: item.require,
|
|
|
|
|
customRequire: item.customRequire,
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<view class="t-icon g_h_22 g_w_22 g_pl_7 g_mr_5" style="width: 22px; height: 22px" v-if="item.icon" :class="'t-' + item.icon"></view>
|
|
|
|
|
<view class="g_flex_column_center g_c_3 g_fs_16">{{ item.label }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="g_flex_1 g_flex_column_center">
|
|
|
|
|
<view class="g_flex_row_end 1" style="width: 100%">
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_1 g_flex_column_center">
|
|
|
|
|
<div class="g_flex_row_end 1" style="width: 100%">
|
|
|
|
|
<slot></slot>
|
|
|
|
|
<view class="g_flex_row_end 2 from-type" style="width: 100%">
|
|
|
|
|
<div class="g_flex_row_end 2 from-type" style="width: 100%">
|
|
|
|
|
<!-- 通用类型 -->
|
|
|
|
|
<view class="form-base g_fs_16 g_ell_1 g_lh_1_2 g_w_all g_text_r g_flex_1" :class="item.fontColor" v-if="item.result" @click="handleResult(item)">{{ item.result }}</view>
|
|
|
|
|
<div class="form-base g_fs_16 g_ell_1 g_lh_1_2 g_w_all g_text_r g_flex_1" :class="item.fontColor" v-if="item.result" @click="handleResult(item)">{{ item.result }}</div>
|
|
|
|
|
<!-- 迷你二维码 -->
|
|
|
|
|
<view class="form-wx-code g_flex_rowRight_columnCenter" v-if="item.tip == 'code'">
|
|
|
|
|
<div class="form-wx-code g_flex_rowRight_columnCenter" v-if="item.tip == 'code'">
|
|
|
|
|
<i class="iconfont icon-a-erweimabeifen2 g_fs_21 g_c_c" style="font-size: 21px"></i>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 头像类 -->
|
|
|
|
|
<view class="form-avatar g_flex_rowRight_columnCenter" v-if="item.tip == 'avatar'">
|
|
|
|
|
<div class="form-avatar g_flex_rowRight_columnCenter" v-if="item.tip == 'avatar'">
|
|
|
|
|
<img :src="item.value" alt="" class="g_w_48 g_h_48 g_radius_50" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上传图片头像类 -->
|
|
|
|
|
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
|
|
|
|
|
<button v-if="item.tip == 'update-avatar'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0" @click="handleOpenAvatar">
|
|
|
|
|
<img :src="item.value || localBaseImg + 'default.svg'" class="g_w_32 g_h_32 g_radius_50" />
|
|
|
|
|
<img :src="item.value || localBaseImg + 'default.svg'" class="g_w_32 g_h_32" />
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
</button>
|
|
|
|
|
<!-- #endif -->
|
|
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
|
|
<button open-type="chooseAvatar" @chooseavatar="handleStartChangeAvatar" v-if="item.tip == 'update-avatar'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0">
|
|
|
|
|
<img :src="item.value || localBaseImg + 'default.svg'" class="g_w_32 g_h_32 g_radius_50" />
|
|
|
|
|
<!-- handleStartChangeAvatar -->
|
|
|
|
|
<button @click="handleOpenAvatar" v-if="item.tip == 'update-avatar'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0">
|
|
|
|
|
<img :src="item.value || localBaseImg + 'default.svg'" class="g_w_32 g_h_32" />
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
</button>
|
|
|
|
|
<button @click="uploadQRCode" v-if="item.tip == 'update-QRCode'" aria-role="button" class="from-wx-avatar g_flex_rowRight_columnCenter g_bg_f g_w_all" style="padding-right: 0px; margin: 0">
|
|
|
|
|
<img :src="item.img || localBaseImg + 'default.svg'" class="g_w_48 g_h_48 g_radius_4" />
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
</button>
|
|
|
|
|
<!-- #endif -->
|
|
|
|
|
|
|
|
|
|
<!-- 指定输入框。场景:当有多个list时使用;若list只有一个,使用slot即可 -->
|
|
|
|
|
<view
|
|
|
|
|
<div
|
|
|
|
|
:style="{
|
|
|
|
|
width: item.type != 'slot' ? 'calc(100% - 16px)' : item.tip == 'slot-choose-address' ? 'calc(100% - 22px)' : '100%',
|
|
|
|
|
}"
|
|
|
|
|
@ -61,111 +67,115 @@
|
|
|
|
|
v-if="item.tip && item.tip.indexOf('slot') > -1"
|
|
|
|
|
>
|
|
|
|
|
<!-- 验证码 -->
|
|
|
|
|
<view class="g_flex_column_center" v-if="item.tip == 'slot-code'">
|
|
|
|
|
<view class="g_flex_row_end">
|
|
|
|
|
<view class="g_flex_1 g_mr_16">
|
|
|
|
|
<div class="g_flex_column_center" v-if="item.tip == 'slot-code'">
|
|
|
|
|
<div class="g_flex_row_end">
|
|
|
|
|
<div class="g_flex_1 g_mr_16">
|
|
|
|
|
<u-input maxlength="4" type="number" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r" placeholder-style="color:#999;font-size:16px;" v-model="item.code" @blur="(e) => handleCode(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="btn-text g_flex_column_center g_flex_none" @click="handleSendMsg">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-text g_flex_column_center g_flex_none" @click="handleSendMsg">
|
|
|
|
|
<button class="btn-con g_fs_14 g_c_9 g_w_88 g_flex_row_center">{{ msgCode.btnText }}</button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 新密码 -->
|
|
|
|
|
<view class="form-new-pwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-new-pwd'">
|
|
|
|
|
<div class="form-new-pwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-new-pwd'">
|
|
|
|
|
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleNewPwd(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 确认密码 -->
|
|
|
|
|
<view class="form-new-conpwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-confirm-pwd'">
|
|
|
|
|
<div class="form-new-conpwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-confirm-pwd'">
|
|
|
|
|
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleConfirmPwd(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 姓名输入框 -->
|
|
|
|
|
<view class="form-new-name g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-name' || item.tip == 'slot-upID'">
|
|
|
|
|
<u-input type="text" :hover-stop-propagation="true" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleName(e, item, index)" />
|
|
|
|
|
<view class="form-new-why g_flex_column_center" style="" @click="updateImg" v-if="item.tip == 'slot-upID'">
|
|
|
|
|
<image class="g_ml_4 g_w_24 g_h_22" :src="item.img || cdnBaseImg + 'mock_photo.svg'"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<div class="form-new-name g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-name' || item.tip == 'slot-upID' || item.tip == 'slot-weChat'">
|
|
|
|
|
<u-input type="text" :hover-stop-propagation="true" :maxlength="30" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleName(e, item, index)" @blur="(e) => handleName(e, item, index)" />
|
|
|
|
|
<div class="form-new-why g_flex_column_center" style="" @click="chooseImgType('IDCard')" v-if="item.tip == 'slot-upID'">
|
|
|
|
|
<image class="g_ml_4 g_w_24 g_h_22" :src="item.img || cdnBaseImg + 'mock_photo1.svg'"></image>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 性别输入框 -->
|
|
|
|
|
<view class="form-new-sex g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-sex'">
|
|
|
|
|
<u-radio-group v-model="item.value" @change="(e) => handleSex(e, item, index)" active-color="#00b666">
|
|
|
|
|
<div class="form-new-sex g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-sex'">
|
|
|
|
|
<u-radio-group v-model="item.value" @change="(e) => handleSex(e, item, index)" active-color="#6A81FF">
|
|
|
|
|
<u-radio :mr="sexItem.mr" v-for="(sexItem, sexIndex) in sexList" :key="sexIndex" :name="sexItem.tip">
|
|
|
|
|
{{ sexItem.name }}
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 年龄输入框 -->
|
|
|
|
|
<view class="form-new-age g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-age'">
|
|
|
|
|
<div class="form-new-age g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-age'">
|
|
|
|
|
<u-input type="number" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" :custom-style="{ fontSize: item.fontSize || ' 16px' }" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleAge(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 民族picker -->
|
|
|
|
|
<view class="form-new-nation g_flex_rowRight_columnCenter g_fs_16" v-if="item.tip == 'slot-nation'" style="width: calc(100% - 0px)">
|
|
|
|
|
<div class="form-new-nation g_flex_rowRight_columnCenter g_fs_16" v-if="item.tip == 'slot-nation'" style="width: calc(100% - 0px)">
|
|
|
|
|
<picker @change="(e) => handleNation(e, item, index)" :value="item.nationIndex" :range="nationData.list" style="width: 100%; text-align: right">
|
|
|
|
|
<view class="g_flex_row_end">
|
|
|
|
|
<view class="uni-input">{{ nationData.list[item.nationIndex] }}</view>
|
|
|
|
|
<view class="g_flex_column_center">
|
|
|
|
|
<div class="g_flex_row_end flex_center">
|
|
|
|
|
<div class="uni-input" :class="nationData.list[item.nationIndex] ? 'g_c_3' : 'g_c_9'">{{ nationData.list[item.nationIndex] || "请选择民族" }}</div>
|
|
|
|
|
<div class="g_flex_column_center">
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 自定义选择框 -->
|
|
|
|
|
<view class=""> </view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 身份证号输入框 -->
|
|
|
|
|
<view class="form-new-idcard g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-code-idcard'">
|
|
|
|
|
<u-input type="idcard" :clearable="false" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleIDcard(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
<div class="form-new-idcard g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-code-idcard'">
|
|
|
|
|
<u-input type="idcard" :clearable="false" :maxlength="18" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleIDcard(e, item, index)" />
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 家庭住址输入框 -->
|
|
|
|
|
<view class="form-new-address g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-address'">
|
|
|
|
|
<div class="form-new-address g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-address'">
|
|
|
|
|
<u-input type="text" :clearable="false" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleAddress(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 地址选择框 -->
|
|
|
|
|
<view class="form-new-choose g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-choose-address'">
|
|
|
|
|
<view class="g_text_r g_w_all g_fs_16" :class="item.value ? 'g_c_3' : 'g_c_9'" @click="chooseAddress">{{ item.value || item.placeholder }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<div class="form-new-choose g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-choose-address'">
|
|
|
|
|
<div class="g_text_r g_w_all g_fs_16" :class="item.value ? 'g_c_3' : 'g_c_9'" @click="chooseAddress(item)">{{ item.value || item.placeholder }}</div>
|
|
|
|
|
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="chooseAddress(item)"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 地址选择输入框 -->
|
|
|
|
|
|
|
|
|
|
<div class="form-new-choose g_flex_rowRight_columnCenter" v-if="item.tip == 'slot-choose&input-address'">
|
|
|
|
|
<u-input v-model="item.value" @input="(e) => handleAddress(e, item, index)" class="g_flex_1 g_ml_8" maxlength="1000" type="textarea" :placeholder="item.placeholder" placeholder-style="color:#999;line-height:24px" :clearable="false" :customStyle="{ fontSize: '16px', 'text-align': 'right', 'min-height': '24px', 'line-height': '24px' }" />
|
|
|
|
|
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="chooseAddress(item)"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 手机号 -->
|
|
|
|
|
<view class="form-new-tel g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-mobile'">
|
|
|
|
|
<u-input type="number" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :maxlength="11" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @blur="(e) => handleMobile(e, item, index)" @input="(e) => handleMobile(e, item, index)" />
|
|
|
|
|
</view>
|
|
|
|
|
<div class="form-new-tel g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-mobile'">
|
|
|
|
|
<u-input type="number" :disabled="item.disabled" :custom-style="{ fontSize: item.fontSize || ' 16px', color: item.disabled ? '#999' : '#333' }" :clearable="false" :password-icon="false" :maxlength="13" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleMobile(e, item, index)" />
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 多文本输入 -->
|
|
|
|
|
<view class="form-new-textarea g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-more-word'" style="width: calc(100%)">
|
|
|
|
|
<textarea class="weui-input g_text_r g_fs_16" v-model="item.value" :placeholder="item.placeholder" placeholder-style="color:#999999;font-size:16px" :maxlength="-1" auto-height style="min-height: 24px; width: 200px; line-height: 16px" @blur="(e) => handleMoreWord(e, item, index)" @input="(e) => handleMoreWord(e, item, index)"></textarea>
|
|
|
|
|
</view>
|
|
|
|
|
<div class="form-new-textarea g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-more-word'" style="width: calc(100%)">
|
|
|
|
|
<u-input v-model="item.value" @input="(e) => handleMoreWord(e, item, index)" @blur="(e) => handleMoreWord(e, item, index)" class="g_flex_1 g_ml_8" maxlength="1000" type="textarea" :placeholder="item.placeholder" placeholder-style="color:#999" :clearable="false" :customStyle="{ fontSize: '16px', 'text-align': 'right', 'min-height': '24px', 'line-height': '24px' }" />
|
|
|
|
|
<!-- <textarea class="g_text_r g_fs_16" v-model="item.value" :placeholder="item.placeholder" placeholder-style="color:#999999;font-size:16px;line-height: 24px" :maxlength="item.maxlength || -1" auto-height style="min-height: 24px; width: 200px; line-height: 24px" @input="(e) => handleMoreWord(e, item, index)" @blur="(e) => handleMoreWord(e, item, index)"></textarea> -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 时间 -->
|
|
|
|
|
<view class="form-new-time g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-time'">
|
|
|
|
|
<div class="form-new-time g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-time'">
|
|
|
|
|
<g-panel-detail-item :from="item.from" style="width: 100%" label=" " :isShowBottom="false" :value="item.value" afterType="time" @confirmChooseTime="handleMianshi" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 附件上传 -->
|
|
|
|
|
<view class="g_flex_rowRight_columnCenter g_w_all" @click="uploadPhoto" v-if="item.tip == 'slot-update-file'">
|
|
|
|
|
<view class="g_flex_1 g_c_9 g_text_r g_fs_16">请选附件上传</view>
|
|
|
|
|
<div class="g_flex_rowRight_columnCenter g_w_all" @click="chooseImgType('img')" v-if="item.tip == 'slot-update-file'">
|
|
|
|
|
<div class="g_flex_1 g_c_9 g_text_r g_fs_16">请选附件上传</div>
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 财务信息显示 -->
|
|
|
|
|
<view class="g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-caiwu'">
|
|
|
|
|
<view class="g_flex_1 g_c_3 g_text_l g_fs_16 g_pl_6" :class="[caiwuToggle ? '' : 'g_ell_3', item.value.length > 1 ? 'g_text_l' : 'g_text_r']" style="white-space: pre-line">{{ item.value || "-" }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<div class="g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-caiwu'">
|
|
|
|
|
<div class="g_flex_1 g_c_3 g_text_l g_fs_16 g_pl_6" :class="[caiwuToggle ? '' : 'g_ell_3', item.value.length > 1 ? 'g_text_l' : 'g_text_r']" style="white-space: pre-line">{{ item.value || "-" }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 选择政策 -->
|
|
|
|
|
<view class="g_flex_rowRight_columnCenter g_w_all" @click="uploadZhengce" v-if="item.tip == 'slot-zhengce'">
|
|
|
|
|
<view class="g_flex_1 g_c_3 g_text_r g_fs_16">{{ item.value }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<div class="g_flex_rowRight_columnCenter g_w_all" @click="uploadZhengce" v-if="item.tip == 'slot-zhengce'">
|
|
|
|
|
<div class="g_flex_1 g_c_3 g_text_r g_fs_16">{{ item.value }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 右箭头 -->
|
|
|
|
|
<view class="form-new-right g_flex_column_center" v-if="item.type != 'slot'" @click.capture="item.path ? handleResult(item) : ''">
|
|
|
|
|
<div class="form-new-right g_flex_column_center" v-if="item.type != 'slot'" @click.capture="item.path ? handleResult(item) : ''">
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-new-why g_flex_column_center" v-if="item.tip == 'slot-choose-address'">
|
|
|
|
|
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="chooseAddress"></i>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-new-why g_flex_column_center" v-if="item.tip == 'slot-zhengce'">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-new-why g_flex_column_center" v-if="item.tip == 'slot-zhengce'">
|
|
|
|
|
<i class="iconfont g_fsi_18 g_c_c g_ml_4" :class="item.suffix" @click="uploadZhengce"></i>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<slot name="after"></slot>
|
|
|
|
|
<view
|
|
|
|
|
class="g_flex_column_center tog"
|
|
|
|
|
<div
|
|
|
|
|
v-if="
|
|
|
|
|
list.filter((item) => {
|
|
|
|
|
return item.tip == 'slot-caiwu';
|
|
|
|
|
@ -173,45 +183,57 @@
|
|
|
|
|
"
|
|
|
|
|
@click="caiwuToggle = !caiwuToggle"
|
|
|
|
|
style="height: 45px"
|
|
|
|
|
class="g_flex_column_center tog"
|
|
|
|
|
>
|
|
|
|
|
<view class="g_flex_c">
|
|
|
|
|
<view class="g_flex_row_center">
|
|
|
|
|
<view class="g_fs_14 g_c_9 g_flex_column_center">{{ caiwuToggle ? "收起" : "展开" }}</view>
|
|
|
|
|
<view class="g_fs_14 g_flex_column_center">
|
|
|
|
|
<div class="g_flex_c">
|
|
|
|
|
<div class="g_flex_row_center">
|
|
|
|
|
<div class="g_fs_14 g_c_9 g_flex_column_center">{{ caiwuToggle ? "收起" : "展开" }}</div>
|
|
|
|
|
<div class="g_fs_14 g_flex_column_center">
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c g_ml_4" style="font-size: 14px" :class="caiwuToggle ? 'icon_down' : 'icon_up'"></i>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<u-popup v-model="chooseImg.chooseImgShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" @close="chooseImg.chooseImgShow = false">
|
|
|
|
|
<div class="g_text_c g_bg_f_5 g_fs_17">
|
|
|
|
|
<div class="g_bg_f">
|
|
|
|
|
<div class="g_c_3">
|
|
|
|
|
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('camera')">拍照</div>
|
|
|
|
|
<div class="g_p_16 g_border_e_t" @click="uploadPhotoByChat">从会话上传</div>
|
|
|
|
|
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('album')">从相册选择</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_p_16 g_mt_10 g_bg_f" style="padding-bottom: calc(constant(safe-area-inset-bottom) + 16px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px)" @click="chooseImg.chooseImgShow = false">取消</div>
|
|
|
|
|
</div>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<u-popup v-model="zhengceModal.isShow" mode="bottom" border-radius="16" height="980" :mask-close-able="true">
|
|
|
|
|
<view class="g_fs_18 g_c_3 g_flex_row_center g_pt_16"> 选择政策 </view>
|
|
|
|
|
<div class="g_fs_18 g_c_3 g_flex_row_center g_pt_16">选择政策</div>
|
|
|
|
|
<scroll-view scroll-y="true" style="height: 710rpx">
|
|
|
|
|
<view class="g_pl_12 g_pr_12">
|
|
|
|
|
<view class="g_flex_row_between g_pt_16 g_pb_16 g_border_d_b" v-for="(item, index) in zhengceList" :key="index" @click="handleChooseZhengce(item, index)">
|
|
|
|
|
<view class="g_fs_17 g_c_3">{{ item.name }}</view>
|
|
|
|
|
<view class="g_flex_column_center">
|
|
|
|
|
<div class="g_pl_12 g_pr_12">
|
|
|
|
|
<div class="g_flex_row_between g_pt_16 g_pb_16 g_border_d_b" v-for="(item, index) in zhengceList" :key="index" @click="handleChooseZhengce(item, index)">
|
|
|
|
|
<div class="g_fs_17 g_c_3">{{ item.name }}</div>
|
|
|
|
|
<div class="g_flex_column_center">
|
|
|
|
|
<i
|
|
|
|
|
class="iconfont icon-a-duigoubeifen2"
|
|
|
|
|
style="font-size: 24px"
|
|
|
|
|
:style="{
|
|
|
|
|
color: item.isSelected ? '#00b666' : '#fff',
|
|
|
|
|
color: item.isSelected ? '#6A81FF' : '#fff',
|
|
|
|
|
}"
|
|
|
|
|
></i>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
<g-panel-fixed>
|
|
|
|
|
<slot>
|
|
|
|
|
<view class="g_flex_row_center">
|
|
|
|
|
<div class="g_flex_row_center">
|
|
|
|
|
<g-button btnText="确定" type="primary" @clickBtn="submitZhengce" />
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
</g-panel-fixed>
|
|
|
|
|
</u-popup>
|
|
|
|
|
</view>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
@ -253,6 +275,7 @@ export default {
|
|
|
|
|
isShow: false,
|
|
|
|
|
},
|
|
|
|
|
zhengceList: [],
|
|
|
|
|
chooseImg: { chooseImgShow: false, type: "" }, // 选择上传图片类型的弹窗显示
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
@ -268,6 +291,10 @@ export default {
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
jobInfo: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.localBaseImg = this.G.store().localBaseImg;
|
|
|
|
|
@ -301,7 +328,18 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 姓名
|
|
|
|
|
handleName(e, $item, $index) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
if (e && e.trim().length > 30) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: "不能超过30个字",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if ($item.tip == "slot-weChat") {
|
|
|
|
|
this.$emit("changeWeChat", e, $item);
|
|
|
|
|
} else {
|
|
|
|
|
this.$emit("changeName", e, $item);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 性别
|
|
|
|
|
handleSex(e, $item, $index) {
|
|
|
|
|
@ -322,7 +360,7 @@ export default {
|
|
|
|
|
that.list.filter((item, index) => {
|
|
|
|
|
return index == $index;
|
|
|
|
|
})[0].nationIndex = e.detail.value;
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
|
|
|
|
|
that.$emit("changeNation", {
|
|
|
|
|
e: e,
|
|
|
|
|
name: that.nationData.list[e.detail.value],
|
|
|
|
|
@ -335,18 +373,34 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 家庭住址
|
|
|
|
|
handleAddress(e, $item, $index) {
|
|
|
|
|
console.log("eeeeeeeee", e);
|
|
|
|
|
this.$emit("changeAddress", e);
|
|
|
|
|
},
|
|
|
|
|
// 多文字输入框
|
|
|
|
|
handleMoreWord(e, $item, $index) {
|
|
|
|
|
// console.log(e);
|
|
|
|
|
// console.log($item);
|
|
|
|
|
this.$emit("changeMoreWord", $item);
|
|
|
|
|
console.log(e);
|
|
|
|
|
console.log($item);
|
|
|
|
|
if ($item.maxlength && $item.value && $item.value.trim().length >= $item.maxlength) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: `不能超过${$item.maxlength}个字`,
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.$emit("changeMoreWord", e, $item);
|
|
|
|
|
},
|
|
|
|
|
// 地图选择地址
|
|
|
|
|
chooseAddress() {
|
|
|
|
|
chooseAddress(_item) {
|
|
|
|
|
let that = this;
|
|
|
|
|
console.log(_item);
|
|
|
|
|
let obj = {};
|
|
|
|
|
if (_item.addressDetail) {
|
|
|
|
|
obj = {
|
|
|
|
|
latitude: _item.addressDetail.latitude,
|
|
|
|
|
longitude: _item.addressDetail.longitude,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
uni.chooseLocation({
|
|
|
|
|
...obj,
|
|
|
|
|
success(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
let res = {};
|
|
|
|
|
@ -355,9 +409,11 @@ export default {
|
|
|
|
|
let arr = e.address.match(reg);
|
|
|
|
|
res.district = [arr[0], arr[1]].join(" ");
|
|
|
|
|
res.address = e.address;
|
|
|
|
|
res.addressName = e.name;
|
|
|
|
|
}
|
|
|
|
|
res.lat = e.latitude;
|
|
|
|
|
res.lng = e.longitude;
|
|
|
|
|
console.log("resresresres", res);
|
|
|
|
|
that.$emit("chooseAddress", res);
|
|
|
|
|
},
|
|
|
|
|
fail(e) {
|
|
|
|
|
@ -395,10 +451,25 @@ export default {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
// 上传图片
|
|
|
|
|
updateImg() {
|
|
|
|
|
updateImg(sourceType) {
|
|
|
|
|
let that = this;
|
|
|
|
|
console.log("updateImg");
|
|
|
|
|
this.G.uploadImg((res) => {
|
|
|
|
|
if (sourceType == "camera") {
|
|
|
|
|
that.G.uploadImgByCamera((res) => {
|
|
|
|
|
console.log("身份证信息:", res);
|
|
|
|
|
if (res.status == "上传成功") {
|
|
|
|
|
that.$emit("updateIDInfo", res);
|
|
|
|
|
} else {
|
|
|
|
|
that.showToast({
|
|
|
|
|
title: "上传失败请重试",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
that.chooseImg.chooseImgShow = false;
|
|
|
|
|
}, "idcard");
|
|
|
|
|
} else {
|
|
|
|
|
that.G.uploadImgByAlbum((res) => {
|
|
|
|
|
console.log("身份证信息:", res);
|
|
|
|
|
if (res.status == "上传成功") {
|
|
|
|
|
that.$emit("updateIDInfo", res);
|
|
|
|
|
@ -409,21 +480,103 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
that.chooseImg.chooseImgShow = false;
|
|
|
|
|
}, "idcard");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 上传图片
|
|
|
|
|
uploadPhoto() {
|
|
|
|
|
uploadQRCode() {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.G.uploadImg((res) => {
|
|
|
|
|
that.G.cropBeforeUpload({
|
|
|
|
|
cropScale: "1:1",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.$emit("updateFile", res.image);
|
|
|
|
|
that.$emit("updateFile", res.image);
|
|
|
|
|
},
|
|
|
|
|
fail: (err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
chooseImgType(type) {
|
|
|
|
|
uni.hideKeyboard();
|
|
|
|
|
this.chooseImg.chooseImgShow = true;
|
|
|
|
|
this.chooseImg.type = type;
|
|
|
|
|
},
|
|
|
|
|
// 在会话上传文件
|
|
|
|
|
uploadPhotoByChat() {
|
|
|
|
|
let that = this;
|
|
|
|
|
let count = 1;
|
|
|
|
|
if (this.chooseImg.type == "img") {
|
|
|
|
|
count = 5;
|
|
|
|
|
}
|
|
|
|
|
uni.chooseMessageFile({
|
|
|
|
|
count,
|
|
|
|
|
type: "image",
|
|
|
|
|
success(res) {
|
|
|
|
|
console.log("successsuccesssuccesssuccess", res);
|
|
|
|
|
|
|
|
|
|
if (res.errMsg == "chooseMessageFile:ok") {
|
|
|
|
|
res.tempFiles.forEach((item, index) => {
|
|
|
|
|
if (that.chooseImg.type == "img") {
|
|
|
|
|
that.G.uploadTmpImg(item.path, (imgRes) => {
|
|
|
|
|
that.$emit("updateFile", imgRes.image);
|
|
|
|
|
});
|
|
|
|
|
} else if (that.chooseImg.type == "IDCard") {
|
|
|
|
|
// 会话列表获取的是临时文件, 需要单独处理
|
|
|
|
|
that.G.recognizeTmpIDcard([item.path], (cardData) => {
|
|
|
|
|
if (cardData.status == "上传成功") {
|
|
|
|
|
that.$emit("updateIDInfo", cardData);
|
|
|
|
|
} else {
|
|
|
|
|
that.showToast({
|
|
|
|
|
title: "上传失败请重试",
|
|
|
|
|
icon: "none",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
that.chooseImg.chooseImgShow = false;
|
|
|
|
|
|
|
|
|
|
// that.G.uploadTmpImg(res, () => {});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 上传图片
|
|
|
|
|
uploadPhoto(sourceType) {
|
|
|
|
|
let that = this;
|
|
|
|
|
if (that.chooseImg.type == "img") {
|
|
|
|
|
if (sourceType == "camera") {
|
|
|
|
|
that.G.uploadImgByCamera((res) => {
|
|
|
|
|
console.log("uploadImgByCamera", res);
|
|
|
|
|
that.$emit("updateFile", res.image);
|
|
|
|
|
that.chooseImg.chooseImgShow = false;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
that.G.uploadImgByAlbum((res) => {
|
|
|
|
|
console.log("uploadImgByAlbum", res);
|
|
|
|
|
that.$emit("updateFile", res.image);
|
|
|
|
|
that.chooseImg.chooseImgShow = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else if (that.chooseImg.type == "IDCard") {
|
|
|
|
|
that.updateImg(sourceType);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 更新政策
|
|
|
|
|
uploadZhengce() {
|
|
|
|
|
let that = this;
|
|
|
|
|
// 处理回显
|
|
|
|
|
let ids = "";
|
|
|
|
|
if (this.jobInfo == 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "请选择职位",
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
that.zhengceList
|
|
|
|
|
.filter((item) => {
|
|
|
|
|
return ids.indexOf(item.id) > -1;
|
|
|
|
|
@ -475,6 +628,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
handleStartChangeAvatar(e) {
|
|
|
|
|
let that = this;
|
|
|
|
|
console.log(e);
|
|
|
|
|
that.G.uploadTmpImg(e.detail.avatarUrl, (res) => {
|
|
|
|
|
console.log("微信:", res.image);
|
|
|
|
|
that.$emit("updateImg", res.image);
|
|
|
|
|
@ -514,7 +668,7 @@ export default {
|
|
|
|
|
this.$emit("clickResult", e);
|
|
|
|
|
},
|
|
|
|
|
handleMobile(e, $item, $index) {
|
|
|
|
|
this.$emit("changeMobile", e);
|
|
|
|
|
this.$emit("changeMobile", e, $item);
|
|
|
|
|
},
|
|
|
|
|
handleMianshi(e, $item, $index) {
|
|
|
|
|
this.$emit("changeTime", e);
|
|
|
|
|
@ -555,14 +709,15 @@ export default {
|
|
|
|
|
&::after {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: -8px;
|
|
|
|
|
top: 8px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
content: "*";
|
|
|
|
|
color: #ff4400;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.customRequire {
|
|
|
|
|
&::after {
|
|
|
|
|
top: 4px;
|
|
|
|
|
// top: 4px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -584,4 +739,9 @@ export default {
|
|
|
|
|
.icon_down {
|
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
|
}
|
|
|
|
|
.safe-area-inset-bottom {
|
|
|
|
|
padding-bottom: 0;
|
|
|
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
|
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|