| | |
| | | import { useDept } from "./utils/hook"; |
| | | import { PureTableBar } from "@/components/RePureTableBar"; |
| | | import { useRenderIcon } from "@/components/ReIcon/src/hooks"; |
| | | import { type CusExtendDto } from "@/utils/auth"; |
| | | |
| | | import Delete from "~icons/ep/delete"; |
| | | import EditPen from "~icons/ep/edit-pen"; |
| | | import Refresh from "~icons/ep/refresh"; |
| | | import AddFill from "~icons/ri/add-circle-line"; |
| | | import IonEnterOutline from "~icons/ion/enter-outline"; |
| | | import { useUserStoreHook } from "@/store/modules/user"; |
| | | import IconamoonEnterDuotone from "~icons/iconamoon/enter-duotone"; |
| | | |
| | | defineOptions({ |
| | | name: "SystemDept" |
| | |
| | | const formRef = ref(); |
| | | const tableRef = ref(); |
| | | const isList = ref(true); |
| | | const nowItem = ref({}); |
| | | const nowItem = ref({ |
| | | id: "" |
| | | }); |
| | | const { |
| | | form, |
| | | state, |
| | |
| | | pagination, |
| | | checkboxAsRadio, |
| | | onSelectionCancel, |
| | | onbatchDel |
| | | onbatchDel, |
| | | nowRole |
| | | } = useDept(tableRef); |
| | | |
| | | function onFullscreen() { |
| | | // 重置表格高度 |
| | | tableRef.value.setAdaptive(); |
| | | } |
| | | const nowRole = computed(() => { |
| | | return useUserStoreHook().nowRole; |
| | | }); |
| | | |
| | | const enterDetail = item => { |
| | | isList.value = false; |
| | | nowItem.value = item; |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | v-if="nowRole.code == 'CGR'" |
| | | v-if="nowRole.code == 'DLJG'" |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="8" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | v-if="nowRole.code == 'DLJG'" |
| | | v-if="nowRole.code == 'CGR'" |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="8" |
| | |
| | | <el-button type="primary" :loading="loading" @click="onSearch"> |
| | | 搜索 |
| | | </el-button> |
| | | <!-- <el-button |
| | | :icon="useRenderIcon(Refresh)" |
| | | @click="resetForm(formRef)" |
| | | > |
| | | 重置 |
| | | </el-button> --> |
| | | <!-- <el-button :icon="useRenderIcon(Refresh)" @click="resetForm"> |
| | | 重置 |
| | | </el-button> --> |
| | | <el-button type="primary" @click="openDialog()"> |
| | | 新增 |
| | | </el-button> |
| | |
| | | link |
| | | type="primary" |
| | | :size="size" |
| | | :icon="useRenderIcon(IonEnterOutline)" |
| | | :icon="useRenderIcon(IconamoonEnterDuotone)" |
| | | @click="enterDetail(row)" |
| | | /> |
| | | <!-- <el-popconfirm |
| | | <el-popconfirm |
| | | :title="`是否确认删除项目名称为${row.projectName}的这条数据`" |
| | | @confirm="handleDelete(row)" |
| | | > |
| | |
| | | :icon="useRenderIcon(Delete)" |
| | | /> |
| | | </template> |
| | | </el-popconfirm> --> |
| | | </el-popconfirm> |
| | | </template> |
| | | </pure-table> |
| | | </template> |
| | | </PureTableBar> |
| | | </template> |
| | | <template v-else> |
| | | <detail :now-info="nowItem" @backListPage="backListPage" /> |
| | | <detail :nowID="nowItem?.id" @backListPage="backListPage" /> |
| | | </template> |
| | | </div> |
| | | </template> |