Browse Source

优化代码

wangwei 3 years ago
parent
commit
184404b0f2
35 changed files with 39 additions and 46 deletions
  1. 1 1
      .vscode/settings.json
  2. 1 1
      src/views/activity/activity/customCom/member/customCom/person/popup.vue
  3. 1 1
      src/views/activity/activity/customCom/member/customCom/unit/popup.vue
  4. 1 1
      src/views/activity/activity/customCom/member/popup.vue
  5. 1 1
      src/views/activity/activity/popup.vue
  6. 1 1
      src/views/activity/meeting/customCom/member/customCom/person/popup.vue
  7. 1 1
      src/views/activity/meeting/customCom/member/customCom/unit/popup.vue
  8. 1 1
      src/views/activity/meeting/customCom/member/popup.vue
  9. 1 1
      src/views/activity/meeting/popup.vue
  10. 1 1
      src/views/admin/admin/popup.vue
  11. 1 1
      src/views/admin/group/popup.vue
  12. 1 1
      src/views/admin/rule/popup.vue
  13. 1 1
      src/views/bill/account/info.vue
  14. 1 1
      src/views/bill/account/popup.vue
  15. 1 1
      src/views/bill/bill/customCom/account/popup.vue
  16. 1 1
      src/views/bill/bill/customCom/member/customCom/person/popup.vue
  17. 1 1
      src/views/bill/bill/customCom/member/customCom/unit/popup.vue
  18. 1 1
      src/views/bill/bill/customCom/member/popup.vue
  19. 1 1
      src/views/bill/bill/customCom/type/popup.vue
  20. 1 1
      src/views/bill/bill/popup.vue
  21. 1 1
      src/views/bill/dues/popup.vue
  22. 1 1
      src/views/bill/type/popup.vue
  23. 1 1
      src/views/department/department/customCom/member/customCom/person/popup.vue
  24. 1 1
      src/views/department/department/customCom/member/customCom/unit/popup.vue
  25. 1 1
      src/views/department/department/customCom/member/popup.vue
  26. 1 1
      src/views/department/department/popup.vue
  27. 1 1
      src/views/member/member/customCom/person/popup.vue
  28. 1 1
      src/views/member/member/customCom/unit/popup.vue
  29. 1 1
      src/views/member/member/popup.vue
  30. 1 1
      src/views/member/person/popup.vue
  31. 1 1
      src/views/member/unit/popup.vue
  32. 2 4
      src/views/news/news/index.vue
  33. 4 9
      src/views/news/news/popup.vue
  34. 1 1
      src/views/news/notice/popup.vue
  35. 1 1
      src/views/news/type/popup.vue

+ 1 - 1
.vscode/settings.json

@@ -124,7 +124,7 @@
     "editor.codeActionsOnSave": {
       "source.fixAll.eslint": false
     },
-    "editor.defaultFormatter": "johnsoncodehk.volar"
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
   },
   "i18n-ally.localesPaths": ["src/locales/lang"],
   "i18n-ally.keystyle": "nested",

+ 1 - 1
src/views/activity/activity/customCom/member/customCom/person/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/activity/activity/customCom/member/customCom/unit/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/activity/activity/customCom/member/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/activity/activity/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/activity/meeting/customCom/member/customCom/person/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/activity/meeting/customCom/member/customCom/unit/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/activity/meeting/customCom/member/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/activity/meeting/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/admin/admin/popup.vue

@@ -27,7 +27,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/admin/group/popup.vue

@@ -57,7 +57,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/admin/rule/popup.vue

@@ -28,7 +28,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/bill/account/info.vue

@@ -17,7 +17,7 @@
 
   export default defineComponent({
     components: { BasicModal, BasicTable },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup() {
       const modelRef = ref({});
       const reactData = reactive({

+ 1 - 1
src/views/bill/account/popup.vue

@@ -24,7 +24,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/bill/bill/customCom/account/popup.vue

@@ -15,7 +15,7 @@
 
   export default defineComponent({
     components: { BasicModal, BasicForm },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(_, { emit }) {
       const modelRef = ref({});
       const role = reactive<Role>({

+ 1 - 1
src/views/bill/bill/customCom/member/customCom/person/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/bill/bill/customCom/member/customCom/unit/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/bill/bill/customCom/member/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/bill/bill/customCom/type/popup.vue

@@ -16,7 +16,7 @@
 
   export default defineComponent({
     components: { BasicModal, BasicForm },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(_, { emit }) {
       const modelRef = ref({});
       const role = reactive<Role>({

+ 1 - 1
src/views/bill/bill/popup.vue

@@ -24,7 +24,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/bill/dues/popup.vue

@@ -24,7 +24,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/bill/type/popup.vue

@@ -24,7 +24,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/department/department/customCom/member/customCom/person/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/department/department/customCom/member/customCom/unit/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/department/department/customCom/member/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/department/department/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/member/member/customCom/person/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/member/member/customCom/unit/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/member/member/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/member/person/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const popupData = props.popupData as PopupData;
       const modelRef = ref({});

+ 1 - 1
src/views/member/unit/popup.vue

@@ -25,7 +25,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 2 - 4
src/views/news/news/index.vue

@@ -70,7 +70,7 @@
       const tableRef = ref<Nullable<TableActionType>>(null);
       const currentEditKeyRef = ref('');
       const popupData = reactive<PopupData>({
-        title: '添加',
+        title: '',
       });
       const btn = reactive<Btn>({
         disable_btn: true,
@@ -100,7 +100,6 @@
         showIndexColumn: false,
         bordered: true,
       });
-      const [register, { openModal }] = useModal();
       const [addRegister, { openModal: openPopup }] = useModal();
       function getTableAction() {
         // 获取组件
@@ -250,6 +249,7 @@
           },
         ];
       }
+      console.log(`addRegister`, addRegister);
       return {
         popupData,
         tableRef,
@@ -263,8 +263,6 @@
         selectionChange,
         addRegister,
         saveData,
-        openModal,
-        register,
         ...toRefs(btn),
       };
     },

+ 4 - 9
src/views/news/news/popup.vue

@@ -8,11 +8,9 @@
     :title="title"
   >
     <BasicForm @register="registerForm" :model="model" />
-    <!-- <MenuTree /> -->
   </BasicModal>
 </template>
 <script lang="ts">
-  import { Tree } from 'ant-design-vue';
   import { defineComponent, PropType, reactive, ref, toRefs } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { useMessage } from '/@/hooks/web/useMessage';
@@ -26,14 +24,15 @@
   }
 
   export default defineComponent({
-    components: { BasicModal, BasicForm, [Tree.name]: Tree },
+    name: 'DeptModal',
+    components: { BasicModal, BasicForm },
     props: {
       popupData: {
         type: Object as PropType<PopupData>,
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;
@@ -52,11 +51,6 @@
           span: 24,
         },
       });
-      //   const [register, { closeModal }] = useModalInner((data) => {
-      //     modelRef.value = data;
-
-      //
-      //   });
       const [register, { closeModal }] = useModalInner((data) => {
         resetFields();
         if (data) {
@@ -87,6 +81,7 @@
           error(err.errorFields[0].errors[0]);
         }
       }
+      console.log(`register`, register);
       return {
         register,
         schemas,

+ 1 - 1
src/views/news/notice/popup.vue

@@ -33,7 +33,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;

+ 1 - 1
src/views/news/type/popup.vue

@@ -26,7 +26,7 @@
         default: () => {},
       },
     },
-    emits: ['saveData'],
+    emits: ['register', 'saveData'],
     setup(props, { emit }) {
       const { createMessage } = useMessage();
       const { error } = createMessage;