feat: 优化大屏
This commit is contained in:
@@ -7,7 +7,7 @@ import { carChargeAdd } from '#/api/property/carCharge';
|
||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||
import { addModalSchema } from './data';
|
||||
import { communityTree } from '#/api/property/community';
|
||||
import { cloneDeep,handleNode,getPopupContainer } from '@vben/utils';
|
||||
import { cloneDeep, handleNode, getPopupContainer } from '@vben/utils';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
@@ -41,11 +41,11 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
onConfirm: handleConfirm,
|
||||
onOpenChange: async (isOpen) => {
|
||||
if (!isOpen) return null;
|
||||
setupCommunitySelect()
|
||||
setupCommunitySelect();
|
||||
modalApi.modalLoading(true);
|
||||
await formApi.resetForm();
|
||||
await markInitialized();
|
||||
await formApi.setValues({costType:'2'});
|
||||
await formApi.setValues({ costType: '2' });
|
||||
modalApi.modalLoading(false);
|
||||
},
|
||||
});
|
||||
@@ -72,12 +72,12 @@ async function handleClosed() {
|
||||
resetInitialized();
|
||||
}
|
||||
async function setupCommunitySelect() {
|
||||
const areaList = await communityTree(4);
|
||||
const areaList = await communityTree(3);
|
||||
// 选中后显示在输入框的值 即父节点 / 子节点
|
||||
// addFullName(areaList, 'areaName', ' / ');
|
||||
const splitStr = '/';
|
||||
handleNode(areaList, 'label', splitStr, function (node: any) {
|
||||
if (node.level != 4) {
|
||||
if (node.level != 3) {
|
||||
node.disabled = true;
|
||||
}
|
||||
});
|
||||
@@ -112,7 +112,7 @@ async function setupCommunitySelect() {
|
||||
<BasicModal :title="title">
|
||||
<BasicForm />
|
||||
</BasicModal>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 使用 :deep() 穿透 scoped 样式,影响子组件 */
|
||||
@@ -126,4 +126,4 @@ async function setupCommunitySelect() {
|
||||
/* 有些浏览器需要这个来覆盖默认颜色 */
|
||||
-webkit-text-fill-color: rgb(0 0 0 / 65%) !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user