rollback
xy 1 year ago
parent 62cec2d363
commit 3e26a1ba29

@ -11,7 +11,7 @@
transition: width 0.28s;
width: $sideBarWidth !important;
background-color: $menuBg;
position: absolute;
position: fixed;
font-size: 0px;
top: 0;
bottom: 0;

@ -241,6 +241,7 @@ export default function (device, info,h ) {
headers: {
Authorization: `Bearer ${getToken()}`,
},
accept: "application/msword,image/jpeg,application/pdf,image/png,application/vnd.ms-powerpoint,text/plain,application/x-zip-compressed,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
multiple: true,
fileList: this.file[info.name],
beforeUpload: (file) => {
@ -339,6 +340,78 @@ export default function (device, info,h ) {
"文件不超过20Mb"
)
])
break;
case 'label':
formItem = h(formBuilderMap(device).get(info.type),{
props: {
type: 'primary'
}
},info.label)
break;
case 'static':
formItem = h(formBuilderMap(device).get(info.type),{
props: {
type: 'primary'
},
attrs: {
href: this.form[info.name],
target: "_blank"
}
},info.label)
break;
case 'hr':
formItem = h(formBuilderMap(device).get(info.type),{
},info.label)
break;
case 'choice':
formItem = h(formBuilderMap(device).get(info.type),{
props: {
value: this.form[info.name],
clearable: true,
placeholder: info.help_text
},
attrs: {
placeholder: info.help_text
},
on: {
input: e => {
this.$set(this.form,info.name,e)
}
}
},[1,2,3].map(option => (
h('el-option',{
props: {
label: option,
value: option
}
})
)))
break;
case 'choices':
formItem = h(formBuilderMap(device).get(info.type),{
props: {
value: this.form[info.name],
clearable: true,
placeholder: info.help_text,
multiple: true
},
attrs: {
placeholder: info.help_text
},
on: {
input: e => {
this.$set(this.form,info.name,e)
}
}
},[1,2,3].map(option => (
h('el-option',{
props: {
label: option,
value: option
}
})
)))
break;
}
return h('el-form-item',{
props: {

@ -88,6 +88,56 @@ export default {
label: "ggg",
help_text: 'write ggg'
},
{
id: 8,
type: "label",
gs_x: 1,
gs_y: 6,
gs_height: 1,
gs_width: 6,
name: "hhh",
label: "hhh",
},
{
id: 9,
type: "static",
gs_x: 1,
gs_y: 7,
gs_height: 1,
gs_width: 6,
name: "iii",
label: "iii",
},
{
id: 10,
type: "hr",
gs_x: 1,
gs_y: 8,
gs_height: 1,
gs_width: 6,
name: "jjj",
label: "jjj",
},
{
id: 11,
type: "choice",
gs_x: 1,
gs_y: 9,
gs_height: 1,
gs_width: 6,
name: "kkk",
label: "kkk",
},
{
id: 12,
type: "choices",
gs_x: 1,
gs_y: 10,
gs_height: 1,
gs_width: 6,
name: "lll",
label: "lll",
},
],
form: {
aaa: "",

@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {},
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save