| | |
| | | <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> |
| | |
| | | class="w-full" |
| | | :options="state.regionList" |
| | | :props="{ |
| | | value: 'id', |
| | | value: 'code', |
| | | label: 'name', |
| | | emitPath: false, |
| | | children: 'regions' |
| | | }" |
| | | clearable |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> </el-col |
| | | ><el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> |
| | | <el-form-item label="质疑:"> |
| | | <el-checkbox-group |
| | | v-model="form.zhiyi" |
| | |
| | | /> |
| | | </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-col> |
| | | <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4"> |
| | | <el-form-item label-width="40"> |
| | | <el-button |
| | | type="primary" |
| | | :icon="useRenderIcon('ri/search-line')" |
| | | :loading="loading" |
| | | @click="onSearch" |
| | | > |
| | | <el-button type="primary" :loading="loading" @click="onSearch"> |
| | | 搜索 |
| | | </el-button> |
| | | <!-- <el-button |
| | |
| | | > |
| | | 重置 |
| | | </el-button> --> |
| | | <el-button |
| | | type="primary" |
| | | :icon="useRenderIcon(AddFill)" |
| | | @click="openDialog()" |
| | | > |
| | | 新增 |
| | | </el-button> |
| | | <el-button type="primary" @click="openDialog()"> 新增 </el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </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 |
| | | :adaptiveConfig="{ offsetBottom: 45 }" |
| | | :adaptiveConfig="{ offsetBottom: 105 }" |
| | | align-whole="center" |
| | | row-key="id" |
| | | showOverflowTooltip |
| | |
| | | :size="size" |
| | | :icon="useRenderIcon(EditPen)" |
| | | @click="openDialog('修改', row)" |
| | | > |
| | | 修改 |
| | | </el-button> |
| | | /> |
| | | <!-- <el-button |
| | | class="reset-margin" |
| | | link |
| | |
| | | 新增 |
| | | </el-button> --> |
| | | <el-popconfirm |
| | | :title="`是否确认删除部门名称为${row.projectName}的这条数据`" |
| | | :title="`是否确认删除项目名称为${row.projectName}的这条数据`" |
| | | @confirm="handleDelete(row)" |
| | | > |
| | | <template #reference> |
| | |
| | | type="primary" |
| | | :size="size" |
| | | :icon="useRenderIcon(Delete)" |
| | | > |
| | | 删除 |
| | | </el-button> |
| | | /> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |