Commit 359d1b7d authored by zhengke's avatar zhengke

修改

parent 3c28d1c4
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
<el-form label-width="90px"> <el-form label-width="90px">
<el-form-item :label="searchData.CompData.Name" :required="searchData.CompData.IsRequire" <el-form-item :label="searchData.CompData.Name" :required="searchData.CompData.IsRequire"
style="margin-bottom:0"> style="margin-bottom:0">
<el-select v-model="defaultValue" disabled style="width:328px;"></el-select> <el-select v-model="defaultValue" style="width:328px;">
<el-option v-for="item in searchData.CompData.OptionList" :key="item.Id" :label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<div class="tradeRemark">{{searchData.CompData.Remark}}</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -23,6 +28,18 @@ ...@@ -23,6 +28,18 @@
<el-form-item label="名称" required> <el-form-item label="名称" required>
<el-input v-model="searchData.CompData.Name" size="small"></el-input> <el-input v-model="searchData.CompData.Name" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提示文字">
<el-input type="textarea" v-model="searchData.CompData.Remark" size="small"></el-input>
</el-form-item>
<el-form-item label="增加选项">
<el-tag :key="index" v-for="(item,index) in searchData.CompData.OptionList" style="margin-right:5px;" closable :disable-transitions="false" @close="handleClose(index)">
{{item.Name}}
</el-tag>
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" style="width:80px;" ref="saveTagInput" size="small"
@keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">增加选项</el-button>
</el-form-item>
<el-form-item label="是否多选"> <el-form-item label="是否多选">
<el-switch v-model="searchData.CompData.IsMultiple"> <el-switch v-model="searchData.CompData.IsMultiple">
</el-switch> </el-switch>
...@@ -40,7 +57,9 @@ ...@@ -40,7 +57,9 @@
props: ["searchData", "index", "dataLeng"], props: ["searchData", "index", "dataLeng"],
data() { data() {
return { return {
defaultValue:'' defaultValue: '',
inputVisible: false,
inputValue: ''
}; };
}, },
created() {}, created() {},
...@@ -52,6 +71,34 @@ ...@@ -52,6 +71,34 @@
//点击触发父组件删除 //点击触发父组件删除
delPlugin() { delPlugin() {
this.$emit('comDelPlugin', this.index); this.$emit('comDelPlugin', this.index);
},
handleClose(index) {
this.searchData.CompData.OptionList.splice(index, 1);
this.searchData.CompData.OptionList.forEach((x,index)=>{
x.Id=index
})
},
showInput() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue;
let obj={
Id:0,
Name:inputValue
}
if (inputValue) {
this.searchData.CompData.OptionList.push(obj);
}
this.inputVisible = false;
this.inputValue = '';
this.searchData.CompData.OptionList.forEach((x,index)=>{
x.Id=index
})
} }
}, },
mounted() {} mounted() {}
......
<style>
.diy-component-edit .goods-add {
width: 50px;
height: 50px;
position: relative;
margin-right: 15px;
margin-bottom: 15px;
}
.diy-component-edit .goods-add .el-button {
width: 100%;
height: 100%;
border-radius: 0;
padding: 0;
}
</style>
<template> <template>
<div :class="{'active':searchData.isCked}"> <div :class="{'active':searchData.isCked}">
<div class="diy-component-options" v-if="searchData.isCked"> <div class="diy-component-options" v-if="searchData.isCked">
...@@ -16,6 +32,7 @@ ...@@ -16,6 +32,7 @@
<template v-for="(item,index) in imgNum"> <template v-for="(item,index) in imgNum">
<img :key="index" src="../../../assets/img/default.png" style="width:80px;margin-right:20px;" alt=""> <img :key="index" src="../../../assets/img/default.png" style="width:80px;margin-right:20px;" alt="">
</template> </template>
<div class="tradeRemark" style="margin-top:0;">{{searchData.CompData.Remark}}</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -30,10 +47,20 @@ ...@@ -30,10 +47,20 @@
<el-input v-model="searchData.CompData.FileCount" <el-input v-model="searchData.CompData.FileCount"
@keyup.native="checkInteger(searchData.CompData,'FileCount')" size="small"></el-input> @keyup.native="checkInteger(searchData.CompData,'FileCount')" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="选择文件" v-if="searchData.CompData.FileCount>0">
<div style="display:flex;">
<div class="goods-add" style="width:50px;height:50px;" v-for="(item,index) in imgNum" :key="index">
<el-button size="small" icon="el-icon-plus"></el-button>
</div>
</div>
</el-form-item>
<el-form-item label="上传文件大小"> <el-form-item label="上传文件大小">
<el-input v-model="searchData.CompData.FileSizeLimit" <el-input v-model="searchData.CompData.FileSizeLimit"
@keyup.native="checkInteger(searchData.CompData,'FileSizeLimit')" size="small"></el-input> @keyup.native="checkInteger(searchData.CompData,'FileSizeLimit')" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提示文字">
<el-input type="textarea" v-model="searchData.CompData.Remark" size="small"></el-input>
</el-form-item>
</el-form> </el-form>
</div> </div>
</div> </div>
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<div class="diy-search"> <div class="diy-search">
<el-form label-width="90px"> <el-form label-width="90px">
<el-form-item :label="searchData.CompData.Name" :required="searchData.CompData.IsRequire" style="margin-bottom:0"> <el-form-item :label="searchData.CompData.Name" :required="searchData.CompData.IsRequire" style="margin-bottom:0">
<el-input disabled type="textarea" v-model="defaultValue" :placeholder="`最多输入${searchData.CompData.WordsLength}个字`"></el-input> <el-input type="textarea" v-model="searchData.CompData.TextValue" :placeholder="`最多输入${searchData.CompData.WordsLength}个字`"></el-input>
<div class="tradeRemark">{{searchData.CompData.Remark}}</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -25,6 +26,9 @@ ...@@ -25,6 +26,9 @@
<el-form-item label="字数"> <el-form-item label="字数">
<el-input type="text" v-model="searchData.CompData.WordsLength" @keyup.native="checkInteger(searchData.CompData,'WordsLength')" size="small"></el-input> <el-input type="text" v-model="searchData.CompData.WordsLength" @keyup.native="checkInteger(searchData.CompData,'WordsLength')" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提示文字">
<el-input type="textarea" v-model="searchData.CompData.Remark" size="small"></el-input>
</el-form-item>
<el-form-item label="是否必填"> <el-form-item label="是否必填">
<el-switch v-model="searchData.CompData.IsRequire"> <el-switch v-model="searchData.CompData.IsRequire">
</el-switch> </el-switch>
...@@ -38,7 +42,6 @@ ...@@ -38,7 +42,6 @@
props: ["searchData", "index", "dataLeng"], props: ["searchData", "index", "dataLeng"],
data() { data() {
return { return {
defaultValue:''
}; };
}, },
created() {}, created() {},
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<div class="diy-search"> <div class="diy-search">
<el-form label-width="90px"> <el-form label-width="90px">
<el-form-item :label="searchData.CompData.Name" :required="searchData.CompData.IsRequire" style="margin-bottom:0"> <el-form-item :label="searchData.CompData.Name" :required="searchData.CompData.IsRequire" style="margin-bottom:0">
<el-input disabled v-model="defaultValue" :placeholder="`最多输入${searchData.CompData.WordsLength}个字`"></el-input> <el-input v-model="searchData.CompData.TextValue" :placeholder="`最多输入${searchData.CompData.WordsLength}个字`"></el-input>
<div class="tradeRemark">{{searchData.CompData.Remark}}</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -26,6 +27,9 @@ ...@@ -26,6 +27,9 @@
<el-input type="text" v-model="searchData.CompData.WordsLength" <el-input type="text" v-model="searchData.CompData.WordsLength"
@keyup.native="checkInteger(searchData.CompData,'WordsLength')" size="small"></el-input> @keyup.native="checkInteger(searchData.CompData,'WordsLength')" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提示文字">
<el-input type="textarea" v-model="searchData.CompData.Remark" size="small"></el-input>
</el-form-item>
<el-form-item label="是否必填"> <el-form-item label="是否必填">
<el-switch v-model="searchData.CompData.IsRequire"> <el-switch v-model="searchData.CompData.IsRequire">
</el-switch> </el-switch>
...@@ -39,7 +43,6 @@ ...@@ -39,7 +43,6 @@
props: ["searchData", "index", "dataLeng"], props: ["searchData", "index", "dataLeng"],
data() { data() {
return { return {
defaultValue:''
}; };
}, },
created() {}, created() {},
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<template v-for="(item,index) in imgNum"> <template v-for="(item,index) in imgNum">
<img :key="index" src="../../../assets/img/default.png" style="width:80px;margin-right:20px;" alt=""> <img :key="index" src="../../../assets/img/default.png" style="width:80px;margin-right:20px;" alt="">
</template> </template>
<div class="tradeRemark" style="margin-top:0;">{{searchData.CompData.Remark}}</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -34,6 +35,9 @@ ...@@ -34,6 +35,9 @@
<el-input v-model="searchData.CompData.FileSizeLimit" <el-input v-model="searchData.CompData.FileSizeLimit"
@keyup.native="checkInteger(searchData.CompData,'FileSizeLimit')" size="small"></el-input> @keyup.native="checkInteger(searchData.CompData,'FileSizeLimit')" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="提示文字">
<el-input type="textarea" v-model="searchData.CompData.Remark" size="small"></el-input>
</el-form-item>
</el-form> </el-form>
</div> </div>
</div> </div>
......
...@@ -268,6 +268,11 @@ ...@@ -268,6 +268,11 @@
.commonDisName{ .commonDisName{
min-width: 80px; min-width: 80px;
} }
.tradeRemark{
color:#c0c4cc;
line-height: 1.5;
margin-top:5px;
}
</style> </style>
<template> <template>
<div class="registrationAdd"> <div class="registrationAdd">
...@@ -421,7 +426,9 @@ ...@@ -421,7 +426,9 @@
CompData: { CompData: {
Name: "", //名字 Name: "", //名字
WordsLength: "", //字数 WordsLength: "", //字数
IsRequire: false TextValue:'',
IsRequire: false,
Remark:''
}, },
}; };
this.addMsg.FormData.push(singleObj); this.addMsg.FormData.push(singleObj);
...@@ -434,7 +441,9 @@ ...@@ -434,7 +441,9 @@
CompData: { CompData: {
Name: "", //名字 Name: "", //名字
WordsLength: "", //字数 WordsLength: "", //字数
IsRequire: false TextValue:'',
IsRequire: false,
Remark:''
}, },
}; };
this.addMsg.FormData.push(multiObj); this.addMsg.FormData.push(multiObj);
...@@ -448,7 +457,9 @@ ...@@ -448,7 +457,9 @@
Name: "", //名字 Name: "", //名字
IsMultiple: false, //是否多选 IsMultiple: false, //是否多选
OptionValue: '', //选项值 OptionValue: '', //选项值
IsRequire: false //是否必填 IsRequire: false, //是否必填
OptionList:[],
Remark:''
}, },
}; };
this.addMsg.FormData.push(dorpObj); this.addMsg.FormData.push(dorpObj);
...@@ -461,7 +472,8 @@ ...@@ -461,7 +472,8 @@
CompData: { CompData: {
Name: "", //名字 Name: "", //名字
FileCount: '', //上传文件数量 FileCount: '', //上传文件数量
FileSizeLimit: '' //上传文件大小 FileSizeLimit: '', //上传文件大小
Remark:''
}, },
}; };
this.addMsg.FormData.push(imgObj); this.addMsg.FormData.push(imgObj);
...@@ -474,7 +486,8 @@ ...@@ -474,7 +486,8 @@
CompData: { CompData: {
Name: "", //名字 Name: "", //名字
FileCount: '', //上传文件数量 FileCount: '', //上传文件数量
FileSizeLimit: '' //上传文件大小 FileSizeLimit: '', //上传文件大小
Remark:''
}, },
}; };
this.addMsg.FormData.push(videoObj); this.addMsg.FormData.push(videoObj);
...@@ -525,6 +538,8 @@ ...@@ -525,6 +538,8 @@
return return
} }
} }
console.log(this.addMsg,'addMgs');
return
this.apipost("/api/CustomForm/SetCustomForm", this.addMsg, (res) => { this.apipost("/api/CustomForm/SetCustomForm", this.addMsg, (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var tempData = res.data.data; var tempData = res.data.data;
......
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