Commit 40c70d6a authored by Mac's avatar Mac

1

parent dae2ef52
<style> <style >
.single_Phone { .listsignUp{
width: 100%;
height: 100vh;
overflow-y: auto;
background:#F6F6F6 ;
padding: 18px;
}
.listsignUp .single_Phone {
font-size: 28rpx; font-size: 28rpx;
color: #1F1F1F; color: #1F1F1F;
font-weight: bold; font-weight: bold;
margin-bottom:10rpx; margin-bottom:10rpx;
} }
.single_Input{ .listsignUp .single_Input{
border-bottom:1px solid #DADCE6; border-bottom:1px solid #DADCE6;
padding:10rpx 0 20rpx 0; padding:10rpx 0 20rpx 0;
} }
.single_Remark{ .listsignUp .single_Remark{
margin:10rpx 0 40rpx 0; margin:10rpx 0 40rpx 0;
font-size:25rpx; font-size:25rpx;
color:#808080; color:#808080;
} }
.listsignUp .btn{
width: 100%;
height: 44px;
border-radius: 10px;
background: #F70027;
font-size: 16px;
color: #FFF;
text-align: center;
line-height: 44px;
margin: 20px 0;
}
</style> </style>
<template> <template>
<view style="height:100vh;padding:30rpx;"> <view class="listsignUp">
<template v-for="(item,index) in dataList"> <view style="width: 100%;padding: 15px;border-radius: 15px;background: #FFF;">
<singleText v-if="item.CompKey=='SingleLineText'" :CompData="item.CompData"></singleText>
<multipleText v-if="item.CompKey=='MultiLineText'" :CompData="item.CompData"></multipleText> <template v-for="(item,index) in dataList">
<selectChoice v-if="item.CompKey=='DorpDownList'" :CompData="item.CompData"></selectChoice> <singleText v-if="item.CompKey=='SingleLineText'" :CompData="item.CompData" :index='index' @success="datasuccess()"></singleText>
<pictureUpload v-if="item.CompKey=='ImageUploadComp'" :CompData="item.CompData"></pictureUpload> <multipleText v-if="item.CompKey=='MultiLineText'" :CompData="item.CompData" :index='index' @success="datasuccess()"></multipleText>
<videoUpload v-if="item.CompKey=='VideoUploadComp'" :CompData="item.CompData"></videoUpload> <selectChoice v-if="item.CompKey=='DorpDownList'" :CompData="item.CompData" :index='index' @success="datasuccess()"></selectChoice>
</template> <pictureUpload v-if="item.CompKey=='ImageUploadComp'" :CompData="item.CompData" :index='index' @success="datasuccess()"></pictureUpload>
<videoUpload v-if="item.CompKey=='VideoUploadComp'" :CompData="item.CompData" :index='index' @success="datasuccess()"></videoUpload>
</template>
<view class="btn" @click="setapply()">
提交申请
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
...@@ -80,6 +107,14 @@ ...@@ -80,6 +107,14 @@
} }
}) })
}, },
datasuccess(data,index){
console.log(data,index)
this.dataList[index].CompData = data
},
setapply(){
console.log('提交',this.dataList)
}
} }
} }
......
<template> <template>
<view> <view>
<view class="single_Phone"> <view class="single_Phone">
<span style="color:red;margin-right:5rpx;" v-show="CompData.IsRequire">*</span>{{CompData.Name}} <span style="color:red;margin-right:5rpx;" v-show="CompData.IsRequire">*</span>{{CompData.Name}}
</view> </view>
<textarea style="height: 50px;width:100%;" v-model="CompData.TextValue" :maxlength="CompData.WordsLength==0?-1:CompData.WordsLength" class="single_Input" :placeholder="`请输入${CompData.Name}`"/> <textarea style="height: 50px;width:100%;" @input='getvalue' v-model="CompData.TextValue"
<view class="single_Remark" v-if="CompData.Remark">{{CompData.Remark}}</view> :maxlength="CompData.WordsLength==0?-1:CompData.WordsLength" class="single_Input"
</view> :placeholder="`请输入${CompData.Name}`" />
</template> <view class="single_Remark" v-if="CompData.Remark">{{CompData.Remark}}</view>
</view>
<script> </template>
export default {
props: ["CompData"], <script>
data() { export default {
return { props: ["CompData",'index'],
data() {
} return {
},
created() {}, }
mounted() { },
created() {},
}, mounted() {
onLoad() {},
methods: { },
onLoad() {},
} methods: {
} getvalue() {
this.$emit('success', this.CompData, this.index)
}
}
}
</script> </script>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<script> <script>
export default { export default {
props: ["CompData"], props: ["CompData",'index'],
data(){ data(){
return{ return{
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
uploadSuccessHandler(data, index, lists) { uploadSuccessHandler(data, index, lists) {
let r = JSON.parse(data); let r = JSON.parse(data);
this.CompData.FileList.push(r.data); this.CompData.FileList.push(r.data);
console.log(this.CompData.FileList) this.$emit('success', this.CompData, this.index)
}, },
onRemove(index) { onRemove(index) {
this.CompData.FileList.splice(index, 1); this.CompData.FileList.splice(index, 1);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<script> <script>
import ldSelect from '../components/ld-select.vue' import ldSelect from '../components/ld-select.vue'
export default { export default {
props: ["CompData"], props: ["CompData",'index'],
components: { ldSelect}, components: { ldSelect},
data(){ data(){
return{ return{
...@@ -31,12 +31,7 @@ ...@@ -31,12 +31,7 @@
selectChange(e){ selectChange(e){
console.log(e) console.log(e)
this.CompData.OptionValue = e this.CompData.OptionValue = e
console.log(this.CompData) this.$emit('success', this.CompData, this.index)
// this.CompData.OptionList.forEach(x=>{
// if(x.Id == e){
// this.CompData.OptionValue = x.Name
// }
// })
} }
} }
} }
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<view class="single_Phone"> <view class="single_Phone">
<span style="color:red;margin-right:5rpx;" v-show="CompData.IsRequire">*</span>{{CompData.Name}} <span style="color:red;margin-right:5rpx;" v-show="CompData.IsRequire">*</span>{{CompData.Name}}
</view> </view>
<input class="single_Input" v-model="CompData.TextValue" :maxlength="CompData.WordsLength==0?-1:CompData.WordsLength" :placeholder="`请输入${CompData.Name}`" /> <input class="single_Input" @input='getvalue' v-model="CompData.TextValue" :maxlength="CompData.WordsLength==0?-1:CompData.WordsLength" :placeholder="`请输入${CompData.Name}`" />
<view class="single_Remark" v-if="CompData.Remark">{{CompData.Remark}}</view> <view class="single_Remark" v-if="CompData.Remark">{{CompData.Remark}}</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props: ["CompData"], props: ["CompData",'index'],
data() { data() {
return { return {
...@@ -22,7 +22,10 @@ ...@@ -22,7 +22,10 @@
}, },
onLoad() {}, onLoad() {},
methods: { methods: {
getvalue(){
this.$emit('success',this.CompData,this.index)
}
} }
} }
</script> </script>
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
</view> </view>
</view> </view>
<view> <view>
<view slot="addBtn" class="slot-btn" @click="upvideo()"> <view slot="addBtn" class="slot-btn" @click="upvideo()" v-if="FileList.length<CompData.FileCount">
<image class="image" <image class="image"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1616573063000_398.png"
mode="widthFix"></image> mode="widthFix"></image>
</view> </view>
</view> </view>
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
<script> <script>
export default { export default {
props: ["CompData"], props: ["CompData",'index'],
data() { data() {
return { return {
...@@ -109,7 +108,8 @@ ...@@ -109,7 +108,8 @@
// that.model.VideoUrl=data.data // that.model.VideoUrl=data.data
that.FileList.push(data.data) that.FileList.push(data.data)
that.CompData.FileList.push(data.data) that.CompData.FileList.push(data.data)
that.$forceUpdate() that.$forceUpdate()
that.$emit('success', that.CompData, that.index)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment