| | |
| | | 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"; |
| | | |
| | | defineOptions({ |
| | | name: "SystemDept" |
| | | }); |
| | | |
| | | import Detail from "./detail.vue"; |
| | | const formRef = ref(); |
| | | const tableRef = ref(); |
| | | |
| | | const isList = ref(true); |
| | | const nowItem = ref({}); |
| | | const { |
| | | form, |
| | | state, |
| | |
| | | const nowRole = computed(() => { |
| | | return useUserStoreHook().nowRole; |
| | | }); |
| | | |
| | | const enterDetail = item => { |
| | | isList.value = false; |
| | | nowItem.value = item; |
| | | }; |
| | | const backListPage = () => { |
| | | isList.value = true; |
| | | }; |
| | | onMounted(() => {}); |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main"> |
| | | <!-- class="search-form bg-bg_color w-full pl-8 pt-[12px] overflow-auto" --> |
| | | <template v-if="isList"> |
| | | <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> |
| | | <el-form ref="formRef" :model="form" labelWidth="100"> |
| | | <el-row> |
| | |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
| | | :default-time="[ |
| | | new Date('1 00:00:00'), |
| | | new Date('1 23:59:59') |
| | | ]" |
| | | class="w-[100%]!" |
| | | /> |
| | | <!-- start-placeholder="开始日期" |
| | |
| | | > |
| | | 重置 |
| | | </el-button> --> |
| | | <el-button type="primary" @click="openDialog()"> 新增 </el-button> |
| | | <el-button type="primary" @click="openDialog()"> |
| | | 新增 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | <el-popconfirm title="是否确认删除?" @confirm="onbatchDel"> |
| | | <template #reference> |
| | | <el-button type="danger" text class="mr-1!"> 批量删除 </el-button> |
| | | <el-button type="danger" text class="mr-1!"> |
| | | 批量删除 |
| | | </el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </div> |
| | |
| | | @page-current-change="handleCurrentChange" |
| | | > |
| | | <template #operation="{ row }"> |
| | | <el-button |
| | | <!-- <el-button |
| | | class="reset-margin" |
| | | link |
| | | type="primary" |
| | | :size="size" |
| | | :icon="useRenderIcon(EditPen)" |
| | | @click="openDialog('修改', row)" |
| | | /> |
| | | <!-- <el-button |
| | | /> --> |
| | | <el-button |
| | | class="reset-margin" |
| | | link |
| | | type="primary" |
| | | :size="size" |
| | | :icon="useRenderIcon(AddFill)" |
| | | @click="openDialog('新增', { parentId: row.id } as any)" |
| | | > |
| | | 新增 |
| | | </el-button> --> |
| | | <el-popconfirm |
| | | :icon="useRenderIcon(IonEnterOutline)" |
| | | @click="enterDetail(row)" |
| | | /> |
| | | <!-- <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" /> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |