<template>
|
<PageWrapper
|
class="high-form"
|
title="低代码页面管理"
|
content="这是低代码页面管理,在这能够根据实体类配置增删改功能页面。"
|
@back="goBack"
|
>
|
<a-card title="查询条件配置" :bordered="false">
|
<BasicForm @register="register">
|
<template #add="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="handleSelecNew"
|
preIcon="search|svg"
|
/>
|
<EntityModal @register="registerNewAdd" @success="handleNewSuccess" />
|
</template>
|
<template #condAdd="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="condAdd"
|
preIcon="add_blue|svg"
|
/>
|
</template>
|
<template #subtract="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="del(field)"
|
preIcon="subtract|svg"
|
/>
|
</template>
|
<template #[item]="{ model, field }" v-for="(item, index) in searchSlots" :key="item">
|
<a-input-group compact>
|
<ApiSelect
|
style="width: 25%"
|
:api="getEntityPropertieList"
|
:params="{ StartWith: getFieldsValue().ASSEMBLY_NAME, Namespace: 'Tiger.Model' }"
|
v-model:value="model[field]"
|
resultField="items"
|
label-field="DisplayName"
|
valueField="Name"
|
@change="(value, option) => change(value, option, field)"
|
/>
|
<a-input v-model:value="objInputs[field]" style="width: 55%" />
|
<Select
|
ref="select"
|
v-model:value="searchSelectVals[field]"
|
style="width: 20%"
|
:options="options"
|
:readonly="true"
|
/>
|
</a-input-group>
|
</template>
|
<template #[item]="{ model, field }" v-for="item in swSlots" :key="item">
|
<a-switch v-model:checked="model[field]" />
|
</template>
|
</BasicForm>
|
</a-card>
|
<a-card title="主表格配置" :bordered="false" class="!mt-5">
|
<div>
|
<BasicForm @register="registerMain">
|
<template #add="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="mainSelectAssy"
|
preIcon="search|svg"
|
/>
|
<EntityModal @register="registerMainAdd" @success="mainAssySuccess" />
|
</template>
|
<template #mainCondAdd="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="mainCondAdd"
|
preIcon="add_blue|svg"
|
/>
|
</template>
|
<template #mainSubtract="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="mainDel(field)"
|
preIcon="subtract|svg"
|
/>
|
</template>
|
<template #[item]="{ model, field }" v-for="(item, index) in mainSlots" :key="item">
|
<a-input-group compact>
|
<ApiSelect
|
style="width: 30%"
|
:api="getEntityPropertieList"
|
:params="{
|
StartWith: getFieldsValueMain().MainAssemblyName,
|
Namespace: 'Tiger.Model',
|
}"
|
v-model:value="model[field]"
|
resultField="items"
|
label-field="DisplayName"
|
valueField="Name"
|
@change="(value, option) => mainChange(value, option, field)"
|
/>
|
<a-input v-model:value="mainInputs[field]" style="width: 70%" />
|
</a-input-group>
|
</template>
|
<template #[item]="{ model, field }" v-for="item in mainSwSlots" :key="item">
|
<a-switch v-model:checked="model[field]" />
|
</template>
|
<template #[item]="{ model, field }" v-for="item in mainsSwSlots" :key="item">
|
<a-switch v-model:checked="model[field]" />
|
</template>
|
<template #[item]="{ model, field }" v-for="item in mainwSwSlots" :key="item">
|
<a-switch v-model:checked="model[field]" />
|
</template>
|
</BasicForm>
|
</div>
|
</a-card>
|
<a-card title="增删改配置" :bordered="false" class="!mt-5">
|
<BasicForm @register="registerCrud">
|
<template #add="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="handleSelectCrud"
|
preIcon="search|svg"
|
/>
|
<EntityModal @register="registerCrudAdd" @success="handleCrudSuccess" />
|
</template>
|
<template #crudCondAdd="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="crudCondAdd"
|
preIcon="add_blue|svg"
|
/>
|
</template>
|
<template #crudSubtract="{ field }">
|
<a-button
|
v-if="field"
|
class="mt-1 ml-1"
|
size="small"
|
@click="crudDel(field)"
|
preIcon="subtract|svg"
|
/>
|
</template>
|
<template #[item]="{ model, field }" v-for="(item, index) in crudSlots" :key="item">
|
<a-input-group compact>
|
<ApiSelect
|
style="width: 25%"
|
:api="getEntityPropertieList"
|
:params="{
|
StartWith: getFieldsValueCrud().crudAssemblyName,
|
Namespace: 'Tiger.Model',
|
}"
|
v-model:value="model[field]"
|
resultField="items"
|
label-field="DisplayName"
|
valueField="Name"
|
@change="(value, option) => crudChange(value, option, field)"
|
/>
|
<a-input v-model:value="crudInputs[field]" style="width: 55%" />
|
<Select
|
ref="select"
|
v-model:value="crudSelectVals[field]"
|
style="width: 20%"
|
:options="options"
|
:readonly="true"
|
/>
|
</a-input-group>
|
</template>
|
<template #[item]="{ model, field }" v-for="item in crudSwSlots" :key="item">
|
<a-switch v-model:checked="model[field]" />
|
</template>
|
<template #[item]="{ model, field }" v-for="item in crudrSwSlots" :key="item">
|
<a-switch v-model:checked="model[field]" />
|
</template>
|
</BasicForm>
|
</a-card>
|
|
<template #rightFooter>
|
<a-button class="mr-4" type="info" @click="cancel"> 取消 </a-button>
|
<a-button type="primary" @click="submitAll"> 生成 </a-button>
|
</template>
|
</PageWrapper>
|
</template>
|
<script lang="ts" setup>
|
import { BasicForm, useForm } from '/@/components/Form';
|
import { onMounted, ref, unref } from 'vue';
|
import { Card, InputGroup, Select, Input, Switch } from 'ant-design-vue';
|
import { ApiSelect } from '/@/components/Form/index';
|
import { useRoute, useRouter } from 'vue-router';
|
import { PageWrapper } from '/@/components/Page';
|
import { useGo } from '/@/hooks/web/usePage';
|
import { newFormSchema, crudSchemas, mainSchemas } from './setting.data';
|
import { useTabs } from '/@/hooks/web/useTabs';
|
import EntityModal from '/@/views/components/EntityModal.vue';
|
import { buildUUID } from '/@/utils/uuid';
|
import { SelectTypes } from 'ant-design-vue/es/select';
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
import { useModal } from '/@/components/Modal';
|
import { SaveEntity, getEntityPropertieList } from '/@/api/tigerapi/system';
|
import { EntityPropertie, SYS_LOW_CODE } from '/@/api/tigerapi/model/systemModel';
|
import { isNullOrEmpty } from '/@/utils/is';
|
import { useUserStore } from '/@/store/modules/user';
|
|
const ACard = Card;
|
const AInputGroup = InputGroup;
|
const AInput = Input;
|
const ASwitch = Switch;
|
const route = useRoute();
|
const go = useGo();
|
const objParams = ref(JSON.parse(decodeURI(route.params?.id as string)));
|
const { setTitle } = useTabs();
|
const tabStore = useMultipleTabStore();
|
const router = useRouter();
|
|
const { currentRoute } = router;
|
function getCurrentTab() {
|
const route = unref(currentRoute);
|
return tabStore.getTabList.find((item) => item.fullPath === route.fullPath)!;
|
}
|
const currentTab = getCurrentTab();
|
var _title =
|
objParams.value.Update == '0'
|
? '低代码页面详情新增'
|
: `低代码页面详情编辑:${objParams.value.Name}`;
|
setTitle(_title);
|
const [registerCrudAdd, { openModal: openCrudModal }] = useModal();
|
const [registerNewAdd, { openModal: openNewModal }] = useModal();
|
const [registerMainAdd, { openModal: openMainModal }] = useModal();
|
const [
|
register,
|
{
|
resetFields,
|
setFieldsValue,
|
getFieldsValue,
|
appendSchemaByField,
|
removeSchemaByField,
|
validate,
|
},
|
] = useForm({
|
labelWidth: 120,
|
baseColProps: {
|
span: 24,
|
},
|
schemas: newFormSchema,
|
showActionButtonGroup: false,
|
});
|
const [
|
registerCrud,
|
{
|
setFieldsValue: setFieldsValueCrud,
|
getFieldsValue: getFieldsValueCrud,
|
appendSchemaByField: appendSchemaByFieldCrud,
|
removeSchemaByField: removeSchemaByFieldCrud,
|
validate: crudvalidate,
|
},
|
] = useForm({
|
labelWidth: 120,
|
baseColProps: {
|
span: 24,
|
},
|
schemas: crudSchemas,
|
showActionButtonGroup: false,
|
});
|
const [
|
registerMain,
|
{
|
setFieldsValue: setFieldsValueMain,
|
getFieldsValue: getFieldsValueMain,
|
appendSchemaByField: appendSchemaByFieldMain,
|
removeSchemaByField: removeSchemaByFieldMain,
|
validate: validateMainForm,
|
},
|
] = useForm({
|
labelWidth: 120,
|
baseColProps: {
|
span: 24,
|
},
|
schemas: mainSchemas,
|
showActionButtonGroup: false,
|
});
|
const objInputs = ref({} as { [key: string]: any });
|
const mainInputs = ref({} as { [key: string]: any });
|
const crudInputs = ref({} as { [key: string]: any });
|
const searchProperties = ref([] as EntityPropertie[]);
|
const mainProperties = ref([] as EntityPropertie[]);
|
const crudProperties = ref([] as EntityPropertie[]);
|
const searchSlots = ref([] as string[]);
|
const mainSlots = ref([] as string[]);
|
const crudSlots = ref([] as string[]);
|
const swSlots = ref([] as string[]);
|
const mainSwSlots = ref([] as string[]);
|
const crudSwSlots = ref([] as string[]);
|
const mainsSwSlots = ref([] as string[]);
|
const mainwSwSlots = ref([] as string[]);
|
const crudrSwSlots = ref([] as string[]);
|
const searchSelectVals = ref({} as { [key: string]: any });
|
const mainSelectVals = ref({} as { [key: string]: any });
|
const crudSelectVals = ref({} as { [key: string]: any });
|
const options = ref<SelectTypes['options']>([
|
{
|
value: 'Input',
|
label: '输入框',
|
},
|
{
|
value: 'InputPassword',
|
label: '输入密码框',
|
},
|
{
|
value: 'InputNumber',
|
label: '输入数字框',
|
},
|
{
|
value: 'Select',
|
label: '下拉框',
|
},
|
{
|
value: 'ApiSelect',
|
label: 'Api下拉框',
|
},
|
{
|
value: 'Checkbox',
|
label: 'Checkbox',
|
},
|
{
|
value: 'TimePicker',
|
label: '时间选择器',
|
},
|
{
|
value: 'Switch',
|
label: '开关',
|
},
|
]);
|
onMounted(async () => {
|
|
|
});
|
|
async function submitAll() {
|
try {
|
const [values, crudvalues, mainvalues] = await Promise.all([
|
validate(),
|
crudvalidate(),
|
validateMainForm(),
|
]);
|
/* 查询条件Json */
|
const Keys = Object.getOwnPropertyNames(values);
|
var searchjsons = [];
|
var _json = {};
|
var _n = 0;
|
for (const k in Keys) {
|
console.log(`${k}:${Keys[k]}`);
|
if (Keys[k].toString().startsWith(getFieldsValue().ASSEMBLY_NAME)) {
|
_json['field'] = isNullOrEmpty(values[Keys[k]]) ? '' : values[Keys[k]];
|
_json['label'] = objInputs.value[Keys[k]];
|
_json['defaultValue'] = '';
|
_json['component'] = searchSelectVals.value[Keys[k]];
|
_n = _n + 4;
|
}
|
if (Keys[k].toString().startsWith('InputNumber')) {
|
_json['colProps'] = { span: values[Keys[k]] };
|
_n++;
|
}
|
if (Keys[k].toString().startsWith('Switch')) {
|
_json['ifShow'] = isNullOrEmpty(values[Keys[k]]) ? false : (values[Keys[k]] as boolean);
|
_n++;
|
}
|
if (!isNullOrEmpty(_json) && _n == 6) {
|
searchjsons.push(_json);
|
_json = {};
|
_n = 0;
|
}
|
}
|
console.log(JSON.stringify(searchjsons));
|
/* 主表格Json */
|
const mKeys = Object.getOwnPropertyNames(mainvalues);
|
var mjsons = [];
|
var mjson = {};
|
var i = 0;
|
for (const k in mKeys) {
|
console.log(`${k}:${mKeys[k]}`);
|
if (mKeys[k].toString().startsWith(getFieldsValueMain().MainAssemblyName)) {
|
mjson['dataIndex'] = isNullOrEmpty(mainvalues[mKeys[k]]) ? '' : mainvalues[mKeys[k]];
|
mjson['title'] = isNullOrEmpty(mainvalues[mKeys[k]]) ? '' : mainInputs.value[mKeys[k]];
|
i = i + 2;
|
}
|
if (mKeys[k].toString().startsWith('Switch')) {
|
mjson['ifShow'] = isNullOrEmpty(mainvalues[mKeys[k]])
|
? false
|
: (mainvalues[mKeys[k]] as boolean);
|
i++;
|
}
|
if (mKeys[k].toString().startsWith('sSwitch')) {
|
mjson['sorter'] = isNullOrEmpty(mainvalues[mKeys[k]])
|
? false
|
: (mainvalues[mKeys[k]] as boolean);
|
i++;
|
}
|
if (mKeys[k].toString().startsWith('wSwitch')) {
|
mjson['resizable'] = isNullOrEmpty(mainvalues[mKeys[k]])
|
? false
|
: (mainvalues[mKeys[k]] as boolean);
|
i++;
|
}
|
if (!isNullOrEmpty(mjson) && i == 5) {
|
mjsons.push(mjson);
|
i = 0;
|
mjson = {};
|
}
|
}
|
console.log(JSON.stringify(mjsons));
|
/* 增删改Json */
|
const cKeys = Object.getOwnPropertyNames(crudvalues);
|
var cjsons = [];
|
var cjson = {};
|
var c = 0;
|
for (const k in cKeys) {
|
console.log(`${k}:${cKeys[k]}`);
|
if (cKeys[k].toString().startsWith(getFieldsValueCrud().crudAssemblyName)) {
|
cjson['field'] = isNullOrEmpty(crudvalues[mKeys[k]]) ? '' : crudvalues[cKeys[k]];
|
cjson['label'] = isNullOrEmpty(crudvalues[mKeys[k]]) ? '' : crudInputs.value[cKeys[k]];
|
cjson['component'] = crudSelectVals.value[cKeys[k]];
|
c = c + 3;
|
}
|
if (cKeys[k].toString().startsWith('Switch')) {
|
cjson['show'] = isNullOrEmpty(crudvalues[mKeys[k]])
|
? false
|
: (crudvalues[cKeys[k]] as boolean);
|
c++;
|
}
|
if (cKeys[k].toString().startsWith('rSwitch')) {
|
cjson['required'] = isNullOrEmpty(crudvalues[mKeys[k]])
|
? false
|
: (crudvalues[cKeys[k]] as boolean);
|
c++;
|
}
|
if (cKeys[k].toString().startsWith('InputNumber')) {
|
cjson['colProps'] = { span: crudvalues[cKeys[k]] };
|
c++;
|
}
|
if (!isNullOrEmpty(cjson) && c == 6) {
|
cjsons.push(cjson);
|
c = 0;
|
cjson = {};
|
}
|
}
|
console.log(JSON.stringify(cjsons));
|
var entity: SYS_LOW_CODE = {
|
CREATE_USER: useUserStore().getUserInfo.userId as string,
|
UPDATE_USER: useUserStore().getUserInfo.userId as string,
|
SEARCH_FORM_JSON: JSON.stringify(searchjsons),
|
BASE_FORM_JSON: JSON.stringify(mjsons),
|
FORM_JSON: JSON.stringify(cjsons),
|
ASSEMBLY_NAME: getFieldsValueMain().MainAssemblyName,
|
CRUD_ASSY_NAME: getFieldsValueCrud().crudAssemblyName,
|
SEARCH_ASSY_NAME: getFieldsValue().ASSEMBLY_NAME,
|
};
|
SaveEntity(entity, unref(objParams.value.Update) == '1', 'SYS_LOW_CODE').then((action) => {
|
if (action.IsSuccessed) {
|
cancel();
|
}
|
});
|
} catch (error) {
|
console.log(error);
|
}
|
}
|
|
async function cancel() {
|
try {
|
tabStore.closeTab(currentTab, router);
|
} catch (error) {}
|
}
|
async function handleCreate() {
|
await validate();
|
}
|
|
function handleEdit(record: Recordable) {}
|
//点击打开物料列表框
|
function handleSelecNew() {
|
openNewModal(true, {
|
data: 'content',
|
info: 'Info',
|
});
|
}
|
|
function mainSelectAssy() {
|
openMainModal(true, {
|
data: 'content',
|
info: 'Info',
|
});
|
}
|
|
function handleSelectCrud() {
|
openCrudModal(true, {
|
data: 'content',
|
info: 'Info',
|
});
|
}
|
|
async function mainAssySuccess(d, u) {
|
setFieldsValueMain({
|
MainAssemblyName: d.values.values,
|
});
|
var data = await getEntityPropertieList({
|
StartWith: d.values.values,
|
Namespace: 'Tiger.Model',
|
});
|
mainProperties.value = data.items;
|
}
|
|
async function handleNewSuccess(d, u) {
|
setFieldsValue({
|
ASSEMBLY_NAME: d.values.values,
|
});
|
var data = await getEntityPropertieList({
|
StartWith: d.values.values,
|
Namespace: 'Tiger.Model',
|
});
|
searchProperties.value = data.items;
|
}
|
|
function handleCrudSuccess(d, u) {
|
setFieldsValueCrud({
|
crudAssemblyName: d.values.values,
|
});
|
}
|
function change(value, option, field) {
|
console.log(value, option, field);
|
objInputs.value[field] = option.label;
|
}
|
function mainChange(value, option, field) {
|
console.log(value, option, field);
|
mainInputs.value[field] = option.label;
|
}
|
function crudChange(value, option, field) {
|
console.log(value, option, field);
|
crudInputs.value[field] = option.label;
|
}
|
const n = ref(1);
|
const m = ref(1);
|
const j = ref(1);
|
/**
|
* @description: 批量添加 查询配置
|
*/
|
function condAdd() {
|
appendSchemaByField(
|
[
|
{
|
field: `${getFieldsValue().ASSEMBLY_NAME}${n.value}a`,
|
component: 'InputGroup',
|
label: '字段' + n.value,
|
// required: true,
|
slot: 'fac' + n.value,
|
colProps: { span: 14 },
|
},
|
{
|
field: `Switch${n.value}`,
|
component: 'Switch',
|
label: '是否显示',
|
slot: `sw${n.value}`,
|
colProps: { span: 3 },
|
},
|
{
|
field: `InputNumber${n.value}`,
|
component: 'InputNumber',
|
label: '列宽',
|
colProps: { span: 3 },
|
},
|
{
|
field: `${n.value}`,
|
component: 'Input',
|
label: ' ',
|
slot: 'subtract',
|
colProps: { span: 4 },
|
},
|
],
|
'',
|
);
|
searchSlots.value.push('fac' + n.value);
|
swSlots.value.push(`sw${n.value}`);
|
objInputs.value[`${getFieldsValue().ASSEMBLY_NAME}${n.value}a`] = '';
|
searchSelectVals.value[`${getFieldsValue().ASSEMBLY_NAME}${n.value}a`] = '';
|
console.log(searchSlots.value);
|
n.value++;
|
}
|
|
function del(field) {
|
removeSchemaByField([
|
`${getFieldsValue().ASSEMBLY_NAME}${field}a`,
|
`Switch${field}`,
|
`InputNumber${field}`,
|
`${field}`,
|
]);
|
swSlots.value.splice(swSlots.value.indexOf(`sw${field}`), 1);
|
searchSlots.value.splice(searchSlots.value.indexOf(`fac${field}`), 1);
|
if (searchSlots.value.length == 0) {
|
n.value = 1;
|
}
|
}
|
|
/* 主表配置 */
|
function mainCondAdd() {
|
appendSchemaByFieldMain(
|
[
|
{
|
field: `${getFieldsValueMain().MainAssemblyName}${m.value}a`,
|
component: 'InputGroup',
|
label: '字段' + m.value,
|
// required: true,
|
slot: 'mainfac' + m.value,
|
colProps: { span: 12 },
|
},
|
{
|
field: `Switch${m.value}`,
|
component: 'Switch',
|
label: '是否显示',
|
slot: `mainSw${m.value}`,
|
colProps: { span: 4 },
|
},
|
{
|
field: `sSwitch${m.value}`,
|
component: 'Switch',
|
label: '是否排序',
|
slot: `mainsSw${m.value}`,
|
colProps: { span: 4 },
|
},
|
{
|
field: `wSwitch${m.value}`,
|
component: 'Switch',
|
label: '是否可调宽',
|
slot: `mainwSw${m.value}`,
|
colProps: { span: 4 },
|
},
|
{
|
field: `InputTextArea${m.value}`,
|
component: 'InputTextArea',
|
label: '自定义渲染',
|
colProps: { span: 21 },
|
},
|
{
|
field: `${m.value}`,
|
component: 'Input',
|
label: ' ',
|
slot: 'mainSubtract',
|
colProps: { span: 3 },
|
},
|
],
|
'',
|
);
|
mainSlots.value.push('mainfac' + m.value);
|
mainSwSlots.value.push(`mainSw${m.value}`);
|
mainsSwSlots.value.push(`mainsSw${m.value}`);
|
mainwSwSlots.value.push(`mainwSw${m.value}`);
|
mainInputs.value[`${getFieldsValueMain().MainAssemblyName}${m.value}a`] = '';
|
mainSelectVals.value[`${getFieldsValueMain().MainAssemblyName}${m.value}a`] = '';
|
console.log(mainSlots.value);
|
m.value++;
|
}
|
|
function mainDel(field) {
|
removeSchemaByFieldMain([
|
`${getFieldsValueMain().MainAssemblyName}${field}a`,
|
`Switch${field}`,
|
`sSwitch${field}`,
|
`wSwitch${field}`,
|
`InputTextArea${field}`,
|
`${field}`,
|
]);
|
mainSwSlots.value.splice(mainSwSlots.value.indexOf(`mainSw${field}`), 1);
|
mainsSwSlots.value.splice(mainsSwSlots.value.indexOf(`mainsSw${field}`), 1);
|
mainwSwSlots.value.splice(mainwSwSlots.value.indexOf(`mainwSw${field}`), 1);
|
mainSlots.value.splice(mainSlots.value.indexOf(`mainfac${field}`), 1);
|
if (mainSlots.value.length == 0) {
|
m.value = 1;
|
}
|
}
|
|
/* 增删改配置 */
|
function crudCondAdd() {
|
appendSchemaByFieldCrud(
|
[
|
{
|
field: `${getFieldsValueCrud().crudAssemblyName}${j.value}a`,
|
component: 'InputGroup',
|
label: '字段' + j.value,
|
// required: true,
|
slot: 'crudfac' + j.value,
|
colProps: { span: 12 },
|
},
|
{
|
field: `Switch${j.value}`,
|
component: 'Switch',
|
label: '是否显示',
|
slot: `crudSw${j.value}`,
|
colProps: { span: 3 },
|
},
|
{
|
field: `rSwitch${j.value}`,
|
component: 'Switch',
|
label: '是否必填',
|
slot: `crudrSw${j.value}`,
|
colProps: { span: 3 },
|
},
|
{
|
field: `InputNumber${j.value}`,
|
component: 'InputNumber',
|
label: '列宽',
|
colProps: { span: 3 },
|
},
|
{
|
field: `${j.value}`,
|
component: 'Input',
|
label: ' ',
|
slot: 'crudSubtract',
|
colProps: { span: 3 },
|
},
|
],
|
'',
|
);
|
crudSlots.value.push('crudfac' + j.value);
|
crudSwSlots.value.push(`crudSw${j.value}`);
|
crudrSwSlots.value.push(`crudrSw${j.value}`);
|
crudInputs.value[`${getFieldsValueCrud().crudAssemblyName}${j.value}a`] = '';
|
crudSelectVals.value[`${getFieldsValueCrud().crudAssemblyName}${j.value}a`] = '';
|
console.log(crudSlots.value);
|
j.value++;
|
}
|
|
function crudDel(field) {
|
removeSchemaByFieldCrud([
|
`${getFieldsValueCrud().crudAssemblyName}${field}a`,
|
`Switch${field}`,
|
`rSwitch${field}`,
|
`InputNumber${field}`,
|
`${field}`,
|
]);
|
crudSwSlots.value.splice(crudSwSlots.value.indexOf(`crudSw${field}`), 1);
|
crudrSwSlots.value.splice(crudrSwSlots.value.indexOf(`crudrSw${field}`), 1);
|
crudSlots.value.splice(crudSlots.value.indexOf(`crudfac${field}`), 1);
|
if (crudSlots.value.length == 0) {
|
j.value = 1;
|
}
|
}
|
|
function goBack() {
|
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
|
go('/LowCodePage');
|
}
|
</script>
|
<style lang="less" scoped>
|
.high-form {
|
padding-bottom: 48px;
|
}
|
</style>: { values: any[]; }: any: { values: any[]; }: any: { values: any[]; }: any: any: any: any: any: any: any
|