master
xy 2 years ago
parent d90bfed299
commit 855df48e57

@ -149,7 +149,7 @@ export default {
},
btnWidth: {
type: Number,
default: 140,
default: 200,
},
//

@ -0,0 +1,30 @@
<template>
<div>
<el-page-header
:content="$route.meta.title"
style="
padding: 1em;
font-size: 1em;
background: #fff;
margin: 1.67em 0;
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
border-radius: 5px;
"
@back="$router.back()"
>
</el-page-header>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {}
}
</script>
<style scoped lang="scss">
</style>

@ -13,15 +13,15 @@ export default {
},
render(h) {
return h(
"el-dialog",
"Modal",
{
props: {
title: "新增",
visible: this.dialogVisible,
width: "600px",
value: this.dialogVisible,
width: 80,
},
on: {
"update:visible": (val) => {
"on-visible-change": (val) => {
this.dialogVisible = val;
},
},
@ -30,6 +30,7 @@ export default {
h(
"el-form",
{
class: "form-body",
ref: "elForm",
props: {
model: this.form,
@ -46,6 +47,7 @@ export default {
h(
"el-form-item",
{
class: "form-body__item",
ref: `elFormItem${i.field}`,
style: {
width: "100%",
@ -154,6 +156,9 @@ export default {
h(
"el-button",
{
props: {
size: "mini"
},
on: {
click: () => (this.dialogVisible = false),
},
@ -166,6 +171,7 @@ export default {
props: {
type: "warning",
plain: true,
size: 'mini'
},
on: {
click: () => this.init(),
@ -178,6 +184,7 @@ export default {
{
props: {
type: "primary",
size: 'mini'
},
on: {
click: this.submit,
@ -429,6 +436,8 @@ export default {
}
}
});
document.documentElement.style.setProperty('--column-num', Math.floor(newVal.length / 8).toString())
},
//immediate: true,
},
@ -450,7 +459,13 @@ export default {
};
</script>
<style>
:root {
--column-num: 2;
}
</style>
<style scoped lang="scss">
.uploaded-a {
color: red;
text-decoration: none;
@ -461,4 +476,10 @@ export default {
color: red;
text-decoration: underline;
}
.form-body {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(var(--column-num), 1fr);
}
</style>

@ -4,7 +4,7 @@
<div>
<div ref="lxHeader">
<LxHeader
:icon="$route.meta.icon || 'md-apps'"
icon="md-apps"
:text="$route.meta.title"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
@ -411,6 +411,16 @@ export default {
['admins',[]]
])
let { fields, relation } = res;
let fieldRes = (await fieldIndex(
{
page: 1,
page_size: 999,
custom_form_id: this.customForm.customFormId,
sort_name: "sort",
sort_type: "asc",
},
false
)).data;
if (
!fields ||
!relation ||
@ -419,7 +429,8 @@ export default {
) {
throw new Error("fields或relation格式错误");
}
fields.forEach((i, index) => {
console.log(fieldRes)
fieldRes?.forEach((i, index) => {
i._relations = relation.find((j) => j.local_key === i.field);
if (i.select_item && typeof i.select_item === 'object') {
let keys = Object.keys(i.select_item)
@ -468,7 +479,7 @@ export default {
return (
<span>
{ paramMap.get(row[i.field].toString()) }
{ paramMap.get(row[i.field]?.toString()) }
</span>
)
}

@ -58,7 +58,7 @@ export default {
}
}}>
{
this.localFields.map(i => {
[{field:'id',name:'id'},...this.localFields].map(i => {
return (
<el-option value={ i.field } label={ i.name }></el-option>
)

Loading…
Cancel
Save