马宇豪
2024-11-13 12a7587eb12e3d33809ef9c169dd76b20ac707c4
src/views/system/dept/index.vue
@@ -26,26 +26,26 @@
         </el-form-item>
      </el-form>
      <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
            <el-button
               type="primary"
               plain
               icon="Plus"
               @click="handleAdd"
               v-hasPermi="['system:dept:add']"
            >新增</el-button>
         </el-col>
         <el-col :span="1.5">
            <el-button
               type="info"
               plain
               icon="Sort"
               @click="toggleExpandAll"
            >展开/折叠</el-button>
         </el-col>
         <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
<!--      <el-row :gutter="10" class="mb8">-->
<!--         <el-col :span="1.5">-->
<!--            <el-button-->
<!--               type="primary"-->
<!--               plain-->
<!--               icon="Plus"-->
<!--               @click="handleAdd"-->
<!--               v-hasPermi="['system:dept:add']"-->
<!--            >新增</el-button>-->
<!--         </el-col>-->
<!--         <el-col :span="1.5">-->
<!--            <el-button-->
<!--               type="info"-->
<!--               plain-->
<!--               icon="Sort"-->
<!--               @click="toggleExpandAll"-->
<!--            >展开/折叠</el-button>-->
<!--         </el-col>-->
<!--         <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
<!--      </el-row>-->
      <el-table
         v-if="refreshTable"
@@ -142,13 +142,14 @@
<script setup name="Dept">
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import {onMounted,ref} from "vue";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
// const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const deptList = ref([]);
const open = ref(false);
const loading = ref(true);
const loading = ref(false);
const showSearch = ref(true);
const title = ref("");
const deptOptions = ref([]);
@@ -171,6 +172,10 @@
});
const { queryParams, form, rules } = toRefs(data);
onMounted(()=>{
  // getList()
})
/** 查询部门列表 */
function getList() {
@@ -269,6 +274,4 @@
    proxy.$modal.msgSuccess("删除成功");
  }).catch(() => {});
}
getList();
</script>