Showing
5 changed files
with
17 additions
and
8 deletions
| ... | ... | @@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = / |
| 6 | 6 | |
| 7 | 7 | # Cross-domain proxy, you can configure multiple |
| 8 | 8 | # Please note that no line breaks |
| 9 | -VITE_PROXY = [["/api","http://192.168.10.117:8082/api"],["/upload","http://192.168.10.116:3300/upload"]] | |
| 9 | +VITE_PROXY = [["/api","http://192.168.10.123:8082/api"],["/upload","http://192.168.10.134:3300/upload"]] | |
| 10 | 10 | # VITE_PROXY=[["/api","https://vvbin.cn/test"]] |
| 11 | 11 | |
| 12 | 12 | # Delete console | ... | ... |
| ... | ... | @@ -12,10 +12,10 @@ |
| 12 | 12 | export default defineComponent({ |
| 13 | 13 | name: 'index', |
| 14 | 14 | components: { BasicForm, CollapseContainer }, |
| 15 | - emits: ['success', 'register'], | |
| 15 | + emits: ['success', 'register', 'funcResetFields'], | |
| 16 | 16 | setup() { |
| 17 | 17 | const getValueData: any = ref({}); |
| 18 | - const [registerForm, { getFieldsValue }] = useForm({ | |
| 18 | + const [registerForm, { getFieldsValue, resetFields }] = useForm({ | |
| 19 | 19 | schemas: formSchema, |
| 20 | 20 | showActionButtonGroup: false, |
| 21 | 21 | }); |
| ... | ... | @@ -26,7 +26,11 @@ |
| 26 | 26 | getV = getValueData.value; |
| 27 | 27 | return getV; |
| 28 | 28 | } |
| 29 | + function funcResetFields() { | |
| 30 | + resetFields(); | |
| 31 | + } | |
| 29 | 32 | return { |
| 33 | + funcResetFields, | |
| 30 | 34 | getAllFields, |
| 31 | 35 | registerForm, |
| 32 | 36 | }; | ... | ... |
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | /> |
| 31 | 31 | </template> |
| 32 | 32 | </BasicTable> |
| 33 | - <SceneLinkAgeDrawer | |
| 33 | + <TenantSettingDrawer | |
| 34 | 34 | :getChildrenData="echoEditData" |
| 35 | 35 | @register="registerDrawer" |
| 36 | 36 | @success="handleSuccess" |
| ... | ... | @@ -41,14 +41,14 @@ |
| 41 | 41 | import { defineComponent, reactive } from 'vue'; |
| 42 | 42 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
| 43 | 43 | import { useDrawer } from '/@/components/Drawer'; |
| 44 | - import SceneLinkAgeDrawer from './useDrawer.vue'; | |
| 44 | + import TenantSettingDrawer from './useDrawer.vue'; | |
| 45 | 45 | import { columns } from './config'; |
| 46 | 46 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 47 | 47 | import { screenLinkPageGetApi, screenLinkPageDeleteApi } from '/@/api/ruleengine/ruleengineApi'; |
| 48 | 48 | |
| 49 | 49 | export default defineComponent({ |
| 50 | 50 | name: 'index', |
| 51 | - components: { BasicTable, SceneLinkAgeDrawer, TableAction }, | |
| 51 | + components: { BasicTable, TenantSettingDrawer, TableAction }, | |
| 52 | 52 | setup() { |
| 53 | 53 | let selectedRowKeys: Array<string> = []; |
| 54 | 54 | let echoEditData = reactive({}); | ... | ... |
| ... | ... | @@ -26,17 +26,20 @@ |
| 26 | 26 | name: 'ConfigDrawer', |
| 27 | 27 | components: { BasicDrawer, BasicForm, CpnsTenantSet }, |
| 28 | 28 | emits: ['success', 'register'], |
| 29 | - setup() { | |
| 29 | + setup(_, { emit }) { | |
| 30 | 30 | const { createMessage } = useMessage(); |
| 31 | 31 | const isUpdate = ref(true); |
| 32 | 32 | let postAllData: any = reactive({}); |
| 33 | 33 | let getValuesFormData: any = reactive({}); |
| 34 | 34 | const { proxy } = getCurrentInstance(); |
| 35 | + const getChildData = ref(null); | |
| 35 | 36 | const [registerForm, { validateFields, getFieldsValue, resetFields }] = useForm({ |
| 36 | 37 | schemas: formSchema, |
| 37 | 38 | showActionButtonGroup: false, |
| 38 | 39 | }); |
| 39 | 40 | const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { |
| 41 | + //清除表单值 | |
| 42 | + proxy.$refs.getChildData.funcResetFields(); | |
| 40 | 43 | await resetFields(); |
| 41 | 44 | setDrawerProps({ confirmLoading: false }); |
| 42 | 45 | isUpdate.value = !!data?.isUpdate; |
| ... | ... | @@ -61,8 +64,11 @@ |
| 61 | 64 | await saveTenantProfileApi(postAllData); |
| 62 | 65 | createMessage.success('租户配置新增成功'); |
| 63 | 66 | closeDrawer(); |
| 67 | + emit('success'); | |
| 68 | + resetFields(); | |
| 64 | 69 | } |
| 65 | 70 | return { |
| 71 | + getChildData, | |
| 66 | 72 | registerDrawer, |
| 67 | 73 | registerForm, |
| 68 | 74 | getTitle, | ... | ... |