145 lines
4.9 KiB
Vue
Raw Normal View History

2023-08-01 09:33:03 +08:00
<template>
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" inline>
<el-form-item label="公司名称" prop="company_id">
2023-08-03 17:34:37 +08:00
<el-input
class="w-[280px]"
v-model="queryParams.name"
clearable
placeholder="请输入公司"
/>
2023-08-01 09:33:03 +08:00
</el-form-item>
2023-08-03 17:34:37 +08:00
2023-08-01 09:33:03 +08:00
<el-form-item>
2023-08-03 17:34:37 +08:00
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
2023-08-01 09:33:03 +08:00
</el-form-item>
</el-form>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
2023-08-07 17:08:41 +08:00
<el-table-column label="编号" prop="id" show-overflow-tooltip />
<el-table-column label="镇公司" show-overflow-tooltip >
<template #default="{ row }">
{{row.extend?.company_name}}
</template>
</el-table-column>
<el-table-column label="所属地区" show-overflow-tooltip>
2023-08-02 09:09:24 +08:00
<template #default="{ row }">
<!-- <dict-value :options="dictData.show_status" :value="row.status" /> -->
{{
row.area_name +
row.street_name +
row.village_name +
row.brigade_name
}}
</template>
</el-table-column>
2023-08-07 17:08:41 +08:00
<el-table-column label="队长姓名" prop="phone" show-overflow-tooltip>
<template #default="{ row }">
{{row.extend?.nickname}}
</template>
</el-table-column>
<el-table-column label="档案名称" prop="name" show-overflow-tooltip />
<el-table-column label="联系电话" prop="phone" show-overflow-tooltip />
<el-table-column label="更新时间" prop="update_time" show-overflow-tooltip />
<el-table-column label="建档时间" prop="create_time" show-overflow-tooltip />
<!-- <el-table-column label="所属生产队队长" prop="type_name" show-overflow-tooltip />
2023-08-02 20:04:26 +08:00
<el-table-column label="所属镇管理" prop="type_name" show-overflow-tooltip />
<el-table-column label="所属区域经理" prop="type_name" show-overflow-tooltip />
2023-08-07 17:08:41 +08:00
<el-table-column label="最近更新时间" prop="type_name" show-overflow-tooltip /> -->
2023-08-02 20:04:26 +08:00
<el-table-column label="操作" align="center" width="auto" fixed="right">
2023-08-01 09:33:03 +08:00
<template #default="{ row }">
2023-08-02 09:09:24 +08:00
<el-button v-perms="['flow/edit']" type="primary" link>
<router-link
:to="{
2023-08-07 17:08:41 +08:00
path: 'user_informationg/details',
2023-08-02 09:09:24 +08:00
query: {
id: row.id,
},
}"
>
详情
</router-link>
2023-08-01 09:33:03 +08:00
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex mt-4 justify-end">
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
2023-08-02 20:04:26 +08:00
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
2023-08-01 09:33:03 +08:00
</div>
</template>
<script lang="ts" setup name="flowTypeLists">
import { usePaging } from "@/hooks/usePaging";
import { useDictData } from "@/hooks/useDictOptions";
2023-08-03 17:34:37 +08:00
// import { apiCateLists, apiCateStatus } from "@/api/examined";
2023-08-02 09:09:24 +08:00
import { fileManagelist, fileManageDetil } from "@/api/informationg";
import { getRoutePath } from "@/router";
2023-08-03 17:34:37 +08:00
// import { timeFormat } from "@/utils/util";
// import feedback from "@/utils/feedback";
2023-08-01 09:33:03 +08:00
// import { getRoutePath } from "router";
import EditPopup from "./editCate.vue";
2023-08-03 17:34:37 +08:00
console.log(getRoutePath);
2023-08-01 09:33:03 +08:00
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
// 是否显示编辑框
const showEdit = ref(false);
// 查询条件
const queryParams = reactive({
name: "",
});
// 选中数据
const selectData = ref<any[]>([]);
// 表格选择后回调事件
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id);
};
// 获取字典数据
const { dictData } = useDictData("");
// 分页相关
const { pager, getLists, resetParams, resetPage } = usePaging({
2023-08-02 09:09:24 +08:00
fetchFun: fileManagelist,
2023-08-01 09:33:03 +08:00
params: queryParams,
});
2023-08-03 17:34:37 +08:00
2023-08-01 09:33:03 +08:00
// 添加
2023-08-03 17:34:37 +08:00
// const handleAdd = async () => {
// showEdit.value = true;
// await nextTick();
// editRef.value?.open("add");
// };
2023-08-01 09:33:03 +08:00
2023-08-03 17:34:37 +08:00
// // 编辑
// const handleEdit = async (data: any) => {
// showEdit.value = true;
// await nextTick();
// editRef.value?.open("edit");
// editRef.value?.setFormData(data);
// };
2023-08-01 09:33:03 +08:00
// 删除
2023-08-02 09:09:24 +08:00
// const handleDelete = async (id: number | any[]) => {
// await feedback.confirm("确定要删除?");
// await apiFlowTypeDelete({ id });
// getLists();
// };
2023-08-01 09:33:03 +08:00
// 状态
2023-08-03 17:34:37 +08:00
// const changeStatus = (row: any) => {
// apiCateStatus({ id: row.id, status: row.status });
// };
2023-08-01 09:33:03 +08:00
getLists();
</script>