修改页面显示逻辑
parent
30738a8c7f
commit
2d6113590c
|
|
@ -20,6 +20,9 @@
|
||||||
<template v-else-if="diy_data.key == 'panel'">
|
<template v-else-if="diy_data.key == 'panel'">
|
||||||
<model-panel-style :key="key" v-model:height="center_height" :options="options" :value="diy_data"></model-panel-style>
|
<model-panel-style :key="key" v-model:height="center_height" :options="options" :value="diy_data"></model-panel-style>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="diy_data.key == 'custom-group'">
|
||||||
|
<model-custom-group-style :key="key" v-model:height="center_height" :options="options" :value="diy_data" @custom_edit="custom_edit"></model-custom-group-style>
|
||||||
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="w h flex align-c bg-f">
|
<div class="w h flex align-c bg-f">
|
||||||
<no-data></no-data>
|
<no-data></no-data>
|
||||||
|
|
@ -84,14 +87,16 @@ const right_update = (item: any) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const draglist = ref<diy_data | null>(null);
|
const draglist = ref<diy_data | null>(null);
|
||||||
const emits = defineEmits(['accomplish']);
|
const emits = defineEmits(['accomplish', 'custom_edit']);
|
||||||
const accomplish = () => {
|
const accomplish = () => {
|
||||||
if (!draglist.value) {
|
if (!draglist.value) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
emits('accomplish', draglist.value.diy_data);
|
emits('accomplish', draglist.value.diy_data);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
const custom_edit = (list: diy, height: number) => {
|
||||||
|
emits('custom_edit', list, height);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,13 @@
|
||||||
<div class="divider-line"></div>
|
<div class="divider-line"></div>
|
||||||
<card-container>
|
<card-container>
|
||||||
<div class="mb-20">内容设置</div>
|
<div class="mb-20">内容设置</div>
|
||||||
<el-button class="w" size="large" @click="custom_edit"><icon name="edit" size="12"></icon>自定义编辑</el-button>
|
<el-button class="w" size="large" @click="custom_edit('custom')"><icon name="edit" size="12"></icon>自定义编辑</el-button>
|
||||||
</card-container>
|
</card-container>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 自定义内容处理 -->
|
<!-- 自定义内容处理 -->
|
||||||
<custom-config v-model:visible="dialogVisible" v-model:width="custom_width" v-model:height="center_height" :dragkey="dragkey" :options="model_data_source" :source-list="!isEmpty(data_source_content_list) ? data_source_content_list[0] : {}" :is-custom="form.is_custom_data == '1'" :show-data="form?.show_data || { data_key: 'id', data_name: 'name' }" :custom-list="custom_list" @accomplish="accomplish"></custom-config>
|
<custom-config v-model:visible="dialogVisible" v-model:width="custom_width" v-model:height="center_height" :dragkey="dragkey" :options="model_data_source" :source-list="!isEmpty(data_source_content_list) ? data_source_content_list[0] : {}" :is-custom="form.is_custom_data == '1'" :show-data="form?.show_data || { data_key: 'id', data_name: 'name' }" :custom-list="custom_list" @accomplish="accomplish"></custom-config>
|
||||||
|
<!-- 自定义内部数据内容处理 -->
|
||||||
|
<custom-config v-model:visible="dialogVisible" v-model:width="custom_width" v-model:height="center_height" :dragkey="dragkey" :options="model_data_source" :source-list="!isEmpty(data_source_content_list) ? data_source_content_list[0] : {}" :is-custom="form.is_custom_data == '1'" :show-data="form?.show_data || { data_key: 'id', data_name: 'name' }" :custom-list="custom_list" @accomplish="accomplish"></custom-config>
|
||||||
<!-- 手动筛选数据弹出框 -->
|
<!-- 手动筛选数据弹出框 -->
|
||||||
<custom-dialog v-model:dialog-visible="url_value_dialog_visible" :data-list-key="form.show_data?.data_key || 'id'" :config="default_type_data.appoint_config" :multiple="url_value_multiple_bool" @confirm_event="url_value_dialog_call_back"></custom-dialog>
|
<custom-dialog v-model:dialog-visible="url_value_dialog_visible" :data-list-key="form.show_data?.data_key || 'id'" :config="default_type_data.appoint_config" :multiple="url_value_multiple_bool" @confirm_event="url_value_dialog_call_back"></custom-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -93,17 +95,31 @@ const custom_width = computed(() => {
|
||||||
return center_width.value;
|
return center_width.value;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// 外层自定义的弹出框
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
|
// 自定义组的弹出框
|
||||||
|
const dialogVisible_group = ref(false);
|
||||||
const form = ref(props.value);
|
const form = ref(props.value);
|
||||||
|
// 外层的内容
|
||||||
|
let custom_list = reactive([]);
|
||||||
|
const center_height = ref(0);
|
||||||
|
// 自定义组的内容
|
||||||
|
let custom_group_list = reactive([]);
|
||||||
|
const center_group_height = ref(0);
|
||||||
const dragkey = ref('');
|
const dragkey = ref('');
|
||||||
// 自定义编辑的逻辑
|
// 自定义编辑的逻辑
|
||||||
const custom_edit = () => {
|
const custom_edit = (type: string, list?: any, height?: number) => {
|
||||||
dialogVisible.value = true;
|
|
||||||
dragkey.value = Math.random().toString(36).substring(2);
|
dragkey.value = Math.random().toString(36).substring(2);
|
||||||
custom_list = cloneDeep(form.value.custom_list);
|
if (type == 'custom') {
|
||||||
center_height.value = cloneDeep(form.value.height);
|
dialogVisible.value = true;
|
||||||
|
custom_list = cloneDeep(form.value.custom_list);
|
||||||
|
center_height.value = cloneDeep(form.value.height);
|
||||||
|
} else {
|
||||||
|
dialogVisible_group.value = true;
|
||||||
|
custom_group_list = list;
|
||||||
|
|
||||||
|
center_group_height.value = height || 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
// 点击完成的处理逻辑
|
// 点击完成的处理逻辑
|
||||||
const accomplish = (list: any) => {
|
const accomplish = (list: any) => {
|
||||||
|
|
@ -112,8 +128,6 @@ const accomplish = (list: any) => {
|
||||||
};
|
};
|
||||||
//#endregion
|
//#endregion
|
||||||
// 弹出框里的内容
|
// 弹出框里的内容
|
||||||
let custom_list = reactive([]);
|
|
||||||
const center_height = ref(0);
|
|
||||||
interface custom_config {
|
interface custom_config {
|
||||||
show_type: string[],
|
show_type: string[],
|
||||||
show_number: number[],
|
show_number: number[],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue