|
|
@@ -20,12 +20,11 @@ |
|
|
|
<view style="min-height: 90rpx;" :style="item.vertical == 2 ? 'margin-top: 20rpx' : ''" |
|
|
|
:class="item.vertical == 2 ? 'as-layout-vertical' : 'as-layout-horizontal'" v-else> |
|
|
|
<!-- 标题 --> |
|
|
|
<view v-if="item.titleShow||item.titleShow===undefined&&item.type!=14" |
|
|
|
class="as-gravity-center-start" :style="'min-width:'+ config.titleWidth + 'rpx'" |
|
|
|
<view v-if="item.titleShow||item.titleShow===undefined&&item.type!=14" class="as-gravity-center-start" |
|
|
|
:style="'min-width:'+ config.titleWidth + 'rpx'" |
|
|
|
style="margin:0 20rpx;flex-direction: row;display: flex;flex-direction: row;"> |
|
|
|
<image class="img-size" :src="item.required ? '/static/image/must.png' : ''"></image> |
|
|
|
<view :class="item.vertical == 2 ? 'text-left' : 'text-justify'" class="text-title" |
|
|
|
style="width:100%;"> |
|
|
|
<view :class="item.vertical == 2 ? 'text-left' : 'text-justify'" class="text-title" style="width:100%;"> |
|
|
|
{{item.title}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
@@ -47,8 +46,7 @@ |
|
|
|
<view class="as-layout-horizontal" style="flex-wrap: wrap;margin: 10px 0;"> |
|
|
|
<label style="display: flex;flex-direction: row;margin-right: 30rpx;" |
|
|
|
v-for="(itemData,index) in item.itemData " :key="index"> |
|
|
|
<checkbox style="transform:scale(0.7)" :value="itemData.value" |
|
|
|
:checked="itemData.checked" /> |
|
|
|
<checkbox style="transform:scale(0.7)" :value="itemData.value" :checked="itemData.checked" /> |
|
|
|
<view>{{itemData.value}}</view> |
|
|
|
</label> |
|
|
|
</view> |
|
|
@@ -70,12 +68,10 @@ |
|
|
|
|
|
|
|
<!-- 富文本框 --> |
|
|
|
<view v-if="item.type == 5" style="width: 100%;"> |
|
|
|
<view |
|
|
|
style="margin: 20rpx 30rpx 0 30rpx;border: 1px solid #999999;height: 200rpx;border-radius: 10px;"> |
|
|
|
<view style="margin: 20rpx 30rpx 0 30rpx;border: 1px solid #999999;height: 200rpx;border-radius: 10px;"> |
|
|
|
<textarea :disabled="item.disabled" class="text" v-model="item[item.value]" |
|
|
|
@input="textareaInput($event,item)" placeholder-class="text-hint" |
|
|
|
style="width: 100%;margin: 20rpx" :maxlength="item.maxlength" auto-height |
|
|
|
:placeholder="item.hint ? item.hint : '请输入' + item.title"> |
|
|
|
@input="textareaInput($event,item)" placeholder-class="text-hint" style="width: 100%;margin: 20rpx" |
|
|
|
:maxlength="item.maxlength" auto-height :placeholder="item.hint ? item.hint : '请输入' + item.title"> |
|
|
|
</textarea> |
|
|
|
<view v-if="item.maxlength" class="as-gravity-center-end" |
|
|
|
style="display: flex;flex-direction: row;height: 20%;"> |
|
|
@@ -110,20 +106,18 @@ |
|
|
|
<view class="text-error"> |
|
|
|
{{item.hint && item.hint.split(',')[0] ? item.hint.split(',')[0] : ''}} |
|
|
|
</view> |
|
|
|
<view class="as-layout-horizontal as-gravity-center" |
|
|
|
style="height: 260rpx;margin-top: 20rpx;" :class="{dan:item.inputType === '999'}"> |
|
|
|
<view class="as-layout-horizontal as-gravity-center" style="height: 260rpx;margin-top: 20rpx;" |
|
|
|
:class="{dan:item.inputType === '999'}"> |
|
|
|
<view class="as-layout-vertical as-gravity-center" style="width: 90%;height: 100%;"> |
|
|
|
<image |
|
|
|
:src="item.placeholderImg ? item.placeholderImg.split(',')[0] : '../../static/image/license2.png'" |
|
|
|
style="width: 100%;height: 80%;" :style="item.style" |
|
|
|
@tap="ImageSelection(item,1)"></image> |
|
|
|
style="width: 100%;height: 80%;" :style="item.style" @tap="ImageSelection(item,1)"></image> |
|
|
|
<view class="as-gravity-center text-hint" style="margin-top: 5rpx;"> |
|
|
|
{{item.hint && item.hint.split(',')[1] ? item.hint.split(',')[1] : ''}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="width: 40rpx;"></view> |
|
|
|
<view class="as-layout-vertical" style="width: 90%;height: 100%;" |
|
|
|
v-if="item.inputType != '999'"> |
|
|
|
<view class="as-layout-vertical" style="width: 90%;height: 100%;" v-if="item.inputType != '999'"> |
|
|
|
<image |
|
|
|
:src="item.placeholderImg && item.placeholderImg.split(',')[1] ? item.placeholderImg.split(',')[1] : '../../static/image/license2.png'" |
|
|
|
style="width: 100%;height: 80%;" @tap="ImageSelection(item,2)"></image> |
|
|
@@ -138,8 +132,7 @@ |
|
|
|
<!-- 车牌号输入 --> |
|
|
|
<view v-if="item.type == 9" style="width: 100%"> |
|
|
|
<view style="margin: 20rpx 30rpx 0 30rpx;"> |
|
|
|
<car-num-ber-input @numberInputResult="numberInputResult($event,item)" |
|
|
|
:defaultStr='item[item.value]'> |
|
|
|
<car-num-ber-input @numberInputResult="numberInputResult($event,item)" :defaultStr='item[item.value]'> |
|
|
|
</car-num-ber-input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@@ -157,9 +150,8 @@ |
|
|
|
<view v-if="item.type == 11" style="width: 100%;"> |
|
|
|
<view class="as-layout-horizontal as-gravity-center"> |
|
|
|
<input v-model="item[item.value]" type="number" |
|
|
|
:placeholder="item.hint ? item.hint : '请输入' + item.title" |
|
|
|
placeholder-class="text-hint" class="text as-gravity-center-start" |
|
|
|
:maxlength="item.maxlength" :style="item.style" |
|
|
|
:placeholder="item.hint ? item.hint : '请输入' + item.title" placeholder-class="text-hint" |
|
|
|
class="text as-gravity-center-start" :maxlength="item.maxlength" :style="item.style" |
|
|
|
style="min-height: 90rpx;word-break:break-all" /> |
|
|
|
|
|
|
|
<button style="width: 160rpx;font-size: 24rpx;height: 60rpx" :disabled="item.disabled" |
|
|
@@ -179,8 +171,8 @@ |
|
|
|
|
|
|
|
<!-- 车牌颜色 --> |
|
|
|
<view v-if="item.type == 13" style="width: 100%;"> |
|
|
|
<licensePlateColor @numberplateResult="numberplateResult($event,item)" |
|
|
|
:defaultStr='item[item.value]' :vanType='vanType'> |
|
|
|
<licensePlateColor @numberplateResult="numberplateResult($event,item)" :defaultStr='item[item.value]' |
|
|
|
:vanType='vanType'> |
|
|
|
</licensePlateColor> |
|
|
|
</view> |
|
|
|
<!-- 上传图片,证件照等 --> |
|
|
@@ -352,7 +344,8 @@ |
|
|
|
var str = e.replace(/\s*/g, ""); |
|
|
|
item[item.value] = str |
|
|
|
} |
|
|
|
function numberplateResult(e: any, item){ |
|
|
|
|
|
|
|
function numberplateResult(e: any, item) { |
|
|
|
item[item.value] = e.id |
|
|
|
console.log(e); |
|
|
|
} |
|
|
@@ -453,6 +446,19 @@ |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (data.type == 2 && !data.show) { |
|
|
|
if (data.checkReg) { |
|
|
|
let regs = new RegExp(data.checkReg) //g代表全部 |
|
|
|
if (!regs.test(data[data.value])) { |
|
|
|
showToast(data.checkPrompt || data.title + '校验失败') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (data.minlength && data[data.value].length && +data.minlength > data[data.value].length) { |
|
|
|
showToast(data.title + '最小长度为' + data.minlength) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (data.value.indexOf(',') != -1 && data.type == 8) { |
|
|
|
if (data[data.value.split(',')[0]]) { |