| | |
| | | <script setup lang="ts"> |
| | | import { ref, reactive, onMounted } from "vue"; |
| | | import { ref, reactive, onMounted, computed } from "vue"; |
| | | import { useDept } from "./utils/hook"; |
| | | import { PureTableBar } from "@/components/RePureTableBar"; |
| | | import { useRenderIcon } from "@/components/ReIcon/src/hooks"; |
| | |
| | | import EditPen from "~icons/ep/edit-pen"; |
| | | import Refresh from "~icons/ep/refresh"; |
| | | import AddFill from "~icons/ri/add-circle-line"; |
| | | import { useUserStoreHook } from "@/store/modules/user"; |
| | | |
| | | defineOptions({ |
| | | name: "SystemDept" |
| | |
| | | |
| | | const formRef = ref(); |
| | | const tableRef = ref(); |
| | | |
| | | const { |
| | | form, |
| | | state, |
| | | loading, |
| | | columns, |
| | | CGRcolumns, |
| | | selectedNum, |
| | | dataList, |
| | | onSearch, |
| | | resetForm, |
| | |
| | | handleSizeChange, |
| | | handleCurrentChange, |
| | | pagination, |
| | | checkboxAsRadio |
| | | } = useDept(); |
| | | checkboxAsRadio, |
| | | onSelectionCancel, |
| | | onbatchDel |
| | | } = useDept(tableRef); |
| | | |
| | | function onFullscreen() { |
| | | // 重置表格高度 |
| | | tableRef.value.setAdaptive(); |
| | | } |
| | | const nowRole = computed(() => { |
| | | return useUserStoreHook().nowRole; |
| | | }); |
| | | |
| | | onMounted(() => {}); |
| | | </script> |
| | |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> |
| | | <el-col |
| | | v-if="nowRole.code == 'CGR'" |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="8" |
| | | :lg="6" |
| | | :xl="4" |
| | | > |
| | | <el-form-item label="代理机构:"> |
| | | <el-input |
| | | v-model="form.dailijigoumingcheng" |
| | | placeholder="请输入代理机构" |
| | | clearable |
| | | class="w-[100%]!" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col |
| | | v-if="nowRole.code == 'DLJG'" |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="8" |
| | | :lg="6" |
| | | :xl="4" |
| | | > |
| | | <el-form-item label="采购人:"> |
| | | <el-input |
| | | v-model="form.caigourenmingcheng" |
| | | placeholder="请输入采购人" |
| | | clearable |
| | | class="w-[100%]!" |
| | | /> |
| | |
| | | </el-card> |
| | | <PureTableBar |
| | | title="" |
| | | :columns="columns" |
| | | :columns="nowRole.code == 'CGR' ? CGRcolumns : columns" |
| | | :tableRef="tableRef?.getTableRef()" |
| | | @refresh="onSearch" |
| | | @fullscreen="onFullscreen" |
| | |
| | | </el-button> |
| | | </template> --> |
| | | <template v-slot="{ size, dynamicColumns }"> |
| | | <div |
| | | v-if="selectedNum > 0" |
| | | v-motion-fade |
| | | class="bg-[var(--el-fill-color-light)] w-full h-[46px] mb-2 pl-4 flex items-center" |
| | | > |
| | | <div class="flex-auto"> |
| | | <span |
| | | style="font-size: var(--el-font-size-base)" |
| | | class="text-[rgba(42,46,54,0.5)] dark:text-[rgba(220,220,242,0.5)]" |
| | | > |
| | | 已选 {{ selectedNum }} 项 |
| | | </span> |
| | | <el-button type="primary" text @click="onSelectionCancel"> |
| | | 取消选择 |
| | | </el-button> |
| | | </div> |
| | | <el-popconfirm title="是否确认删除?" @confirm="onbatchDel"> |
| | | <template #reference> |
| | | <el-button type="danger" text class="mr-1!"> 批量删除 </el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </div> |
| | | <pure-table |
| | | ref="tableRef" |
| | | adaptive |