|
|
@@ -43,6 +43,9 @@
|
|
|
>
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
</el-button>
|
|
|
+ <el-button type="info" plain @click="handleImport">
|
|
|
+ <Icon icon="ep:upload" class="mr-5px" /> 导入
|
|
|
+ </el-button>
|
|
|
<el-button type="danger" plain @click="toggleExpandAll">
|
|
|
<Icon icon="ep:sort" class="mr-5px" /> 展开/折叠
|
|
|
</el-button>
|
|
|
@@ -103,6 +106,8 @@
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
<DeptForm ref="formRef" @success="getList" />
|
|
|
+ <!-- 导入弹窗 -->
|
|
|
+ <DeptImportForm ref="importFormRef" @success="getList" />
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
|
@@ -110,6 +115,7 @@ import { dateFormatter } from '@/utils/formatTime'
|
|
|
import { handleTree } from '@/utils/tree'
|
|
|
import * as DeptApi from '@/api/system/dept'
|
|
|
import DeptForm from './DeptForm.vue'
|
|
|
+import DeptImportForm from './DeptImportForm.vue'
|
|
|
import * as UserApi from '@/api/system/user'
|
|
|
|
|
|
defineOptions({ name: 'SystemDept' })
|
|
|
@@ -168,6 +174,12 @@ const openForm = (type: string, id?: number) => {
|
|
|
formRef.value.open(type, id)
|
|
|
}
|
|
|
|
|
|
+/** 导入操作 */
|
|
|
+const importFormRef = ref()
|
|
|
+const handleImport = () => {
|
|
|
+ importFormRef.value.open()
|
|
|
+}
|
|
|
+
|
|
|
/** 删除按钮操作 */
|
|
|
const handleDelete = async (id: number) => {
|
|
|
try {
|