|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="card-search">
|
|
|
- <a-form ref="formRef" name="advanced_search" class="ant-advanced-search-form" :model="searchParams" >
|
|
|
+ <a-form ref="formRef" name="advanced_search" class="ant-advanced-search-form" :model="searchParams">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="企业名称" :label-col="{span:6}" name="CompanyName">
|
|
@@ -17,7 +17,7 @@
|
|
|
<a-input v-model:value="searchParams.recordStatus" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="5" style="text-align: right">
|
|
|
+ <a-col :span="5" style="text-align: right">
|
|
|
<a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -39,9 +39,9 @@
|
|
|
</a-row>
|
|
|
<a-row class="edit-operation">
|
|
|
<a-col :span="24" style="text-align: right">
|
|
|
- <a-button type="primary" html-type="submit" @click='onOperates(null,"新增",false)' >新增</a-button>
|
|
|
- <a-button type="primary" html-type="submit" @click='onOperates(null,"导入",false)' >导入</a-button>
|
|
|
- <a-button type="primary" html-type="submit" @click='onOperates(null,"导出",false)' >导出</a-button>
|
|
|
+ <a-button type="primary" html-type="submit" @click='onAdd'>新增</a-button>
|
|
|
+ <a-button type="primary" html-type="submit" >导入</a-button>
|
|
|
+ <a-button type="primary" html-type="submit" >导出</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -55,8 +55,8 @@
|
|
|
<template #bodyCell="{ column, text, record }">
|
|
|
<template v-if="column.key === 'operation'">
|
|
|
<div class="table-operation">
|
|
|
- <a-button type="link" size="small" @click='onOperates(record.companyID,"修改",false)' >编辑</a-button>
|
|
|
- <a-button type="link" size="small" @click="onDel(record)" >删除</a-button>
|
|
|
+ <a-button type="link" size="small" @click='onEdit(record)'>编辑</a-button>
|
|
|
+ <a-button type="link" size="small" @click="onDel(record)">删除</a-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</template>
|
|
@@ -76,6 +76,8 @@ import InstitutionEditForm from "@/views/baseSettings/institution/edit.vue";
|
|
|
import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
|
|
|
import {getPaginationTotalTitle} from "@/utils/common";
|
|
|
import {message, Modal} from "ant-design-vue";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import { useTabsViewStore } from '@/store/modules/tabsView';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'CompanyList',
|
|
@@ -85,12 +87,12 @@ export default defineComponent({
|
|
|
const searchParams = reactive({
|
|
|
pageIndex: 1,
|
|
|
pageSize: 20,
|
|
|
- primaryKey:'',
|
|
|
+ primaryKey: '',
|
|
|
companyName: '',
|
|
|
companyCode: '',
|
|
|
- recordStatus:'',
|
|
|
- regionCode:'',
|
|
|
- streetCode:''
|
|
|
+ recordStatus: '',
|
|
|
+ regionCode: '',
|
|
|
+ streetCode: ''
|
|
|
});
|
|
|
const formState = reactive({
|
|
|
total: 0,
|
|
@@ -98,9 +100,14 @@ export default defineComponent({
|
|
|
loading: false
|
|
|
});
|
|
|
const columns: TableColumnsType = [
|
|
|
- {title: '序号', align: "center",key: 'companyID',customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`},
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ align: "center",
|
|
|
+ key: 'companyID',
|
|
|
+ customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
|
|
|
+ },
|
|
|
{title: '企业名称', dataIndex: 'companyName', key: 'companyName', align: "center"},
|
|
|
- {title: '所属县区', dataIndex: 'regionCode', key: 'regionCode',width:120, align: "center"},
|
|
|
+ {title: '所属县区', dataIndex: 'regionCode', key: 'regionCode', width: 120, align: "center"},
|
|
|
{title: '所属街道', dataIndex: 'streetCode', key: 'streetCode', align: "center"},
|
|
|
{title: '统一信用代码', dataIndex: 'companyCode', key: 'companyCode', align: "center"},
|
|
|
{title: '企业状态', dataIndex: 'recordStatus', key: 'recordStatus', align: "center"},
|
|
@@ -108,8 +115,12 @@ export default defineComponent({
|
|
|
{title: '企业规模', dataIndex: 'companyModel', key: 'companyModel', align: "center"},
|
|
|
{title: '当前岗位数量', dataIndex: 'positionCount', key: 'positionCount', align: "center"},
|
|
|
{title: '录入人', dataIndex: 'createUser', key: 'createUser', align: "center"},
|
|
|
- {title: '录入时间 ', dataIndex: 'createTime', key: 'createTime', align: "center"},
|
|
|
- {title: '操作', key: 'operation', fixed: 'right',width:170, align: "center"},
|
|
|
+ {
|
|
|
+ title: '录入时间 ', dataIndex: 'createTime', key: 'createTime', align: "center", customRender: (item) => {
|
|
|
+ return item.record.createTime == null ? "" : (dayjs(item.record.createTime).format('YYYY-MM-DD'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {title: '操作', key: 'operation', fixed: 'right', width: 170, align: "center"},
|
|
|
];
|
|
|
const pagination = computed(() => ({
|
|
|
total: formState.total,
|
|
@@ -121,7 +132,7 @@ export default defineComponent({
|
|
|
|
|
|
const dataList = ref([]);
|
|
|
const institutionEditModelRef = ref();
|
|
|
-
|
|
|
+ const tabsViewStore = useTabsViewStore();
|
|
|
|
|
|
const loadData = async function () {
|
|
|
formState.loading = true;
|
|
@@ -145,7 +156,7 @@ export default defineComponent({
|
|
|
loadData();
|
|
|
}
|
|
|
|
|
|
- const onDel= (item: any) => {
|
|
|
+ const onDel = (item: any) => {
|
|
|
if (item) {
|
|
|
formState.selectedRowKeys.push(item.InstitutionID as never)
|
|
|
}
|
|
@@ -174,8 +185,15 @@ export default defineComponent({
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- const onOperates = (id: string,operation:string,isDetail:boolean) => {
|
|
|
- institutionEditModelRef.value.show(id,operation,isDetail);
|
|
|
+ // const onOperates = (id: string, operation: string, isDetail: boolean) => {
|
|
|
+ // institutionEditModelRef.value.show(id, operation, isDetail);
|
|
|
+ // };
|
|
|
+
|
|
|
+ const onAdd = () => {
|
|
|
+ tabsViewStore.addTabByPath('/companyService/company/add', null);
|
|
|
+ };
|
|
|
+ const onEdit = (item: any) => {
|
|
|
+ tabsViewStore.addTabByPath('/companyService/company/edit', { id: item.CompanyID });
|
|
|
};
|
|
|
|
|
|
return {
|
|
@@ -189,8 +207,9 @@ export default defineComponent({
|
|
|
handleTableChange,
|
|
|
onSelectChange,
|
|
|
onSearch,
|
|
|
- onOperates,
|
|
|
onDel,
|
|
|
+ onAdd,
|
|
|
+ onEdit,
|
|
|
loadData
|
|
|
};
|
|
|
},
|