From af10c85c8f71ccdf2f60989a067804dd8b3aa667 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期三, 26 六月 2024 19:21:13 +0800
Subject: [PATCH] 产品工艺路线更新

---
 src/views/demo/system/dept/index.vue |  114 ++++++++++++++++++++++++--------------------------------
 1 files changed, 49 insertions(+), 65 deletions(-)

diff --git a/src/views/demo/system/dept/index.vue b/src/views/demo/system/dept/index.vue
index 56cbc6f..0b30ee7 100644
--- a/src/views/demo/system/dept/index.vue
+++ b/src/views/demo/system/dept/index.vue
@@ -16,8 +16,7 @@
                 icon: 'ant-design:delete-outlined',
                 color: 'error',
                 popConfirm: {
-                  title: '鏄惁纭鍒犻櫎?',
-              placement: 'left',
+                  title: '鏄惁纭鍒犻櫎',
                   placement: 'left',
                   confirm: handleDelete.bind(null, record),
                 },
@@ -30,75 +29,60 @@
     <DeptModal @register="registerModal" @success="handleSuccess" />
   </div>
 </template>
-<script lang="ts">
-  import { defineComponent } from 'vue';
+<script lang="ts" setup>
+  import { BasicTable, useTable, TableAction } from '@/components/Table';
+  import { getDeptList } from '@/api/demo/system';
 
-  import { BasicTable, useTable, TableAction } from '/@/components/Table';
-  import { getDeptList } from '/@/api/demo/system';
-
-  import { useModal } from '/@/components/Modal';
+  import { useModal } from '@/components/Modal';
   import DeptModal from './DeptModal.vue';
 
   import { columns, searchFormSchema } from './dept.data';
 
-  export default defineComponent({
-    name: 'DeptManagement',
-    components: { BasicTable, DeptModal, TableAction },
-    setup() {
-      const [registerModal, { openModal }] = useModal();
-      const [registerTable, { reload }] = useTable({
-        title: '閮ㄩ棬鍒楄〃',
-        api: getDeptList,
-        columns,
-        formConfig: {
-          labelWidth: 120,
-          schemas: searchFormSchema,
-        },
-        pagination: false,
-        striped: false,
-        useSearchForm: true,
-        showTableSetting: true,
-        bordered: true,
-        showIndexColumn: false,
-        canResize: false,
-        actionColumn: {
-          width: 80,
-          title: '鎿嶄綔',
-          dataIndex: 'action',
-          // slots: { customRender: 'action' },
-          fixed: undefined,
-        },
-      });
+  defineOptions({ name: 'DeptManagement' });
 
-      function handleCreate() {
-        openModal(true, {
-          isUpdate: false,
-        });
-      }
-
-      function handleEdit(record: Recordable) {
-        openModal(true, {
-          record,
-          isUpdate: true,
-        });
-      }
-
-      function handleDelete(record: Recordable) {
-        console.log(record);
-      }
-
-      function handleSuccess() {
-        reload();
-      }
-
-      return {
-        registerTable,
-        registerModal,
-        handleCreate,
-        handleEdit,
-        handleDelete,
-        handleSuccess,
-      };
+  const [registerModal, { openModal }] = useModal();
+  const [registerTable, { reload }] = useTable({
+    title: '閮ㄩ棬鍒楄〃',
+    api: getDeptList,
+    columns,
+    formConfig: {
+      labelWidth: 120,
+      schemas: searchFormSchema,
+    },
+    pagination: false,
+    striped: false,
+    useSearchForm: true,
+    showTableSetting: true,
+    bordered: true,
+    showIndexColumn: false,
+    canResize: false,
+    actionColumn: {
+      width: 80,
+      title: '鎿嶄綔',
+      dataIndex: 'action',
+      // slots: { customRender: 'action' },
+      fixed: undefined,
     },
   });
+
+  function handleCreate() {
+    openModal(true, {
+      isUpdate: false,
+    });
+  }
+
+  function handleEdit(record: Recordable) {
+    openModal(true, {
+      record,
+      isUpdate: true,
+    });
+  }
+
+  function handleDelete(record: Recordable) {
+    console.log(record);
+  }
+
+  function handleSuccess() {
+    reload();
+  }
 </script>

--
Gitblit v1.9.3