|
|
|
@ -1,167 +1,195 @@
|
|
|
|
|
<template> |
|
|
|
|
<ContentWrap> |
|
|
|
|
<section class="flex flex-col gap-20px"> |
|
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
|
<el-form |
|
|
|
|
:model="queryParams" |
|
|
|
|
ref="queryFormRef" |
|
|
|
|
:inline="true" |
|
|
|
|
label-width="108px" |
|
|
|
|
size="large" |
|
|
|
|
class="formClass" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="" prop="enterprisesName"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.enterprisesName" |
|
|
|
|
placeholder="请输入企业名称" |
|
|
|
|
clearable |
|
|
|
|
@keyup.enter="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="type"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.type" |
|
|
|
|
placeholder="请选择企业类型" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_TYPE)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="region"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.region" |
|
|
|
|
placeholder="请选择企业所属区域" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_AREA)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
|
<el-form |
|
|
|
|
:model="queryParams" |
|
|
|
|
ref="queryFormRef" |
|
|
|
|
:inline="true" |
|
|
|
|
label-width="108px" |
|
|
|
|
size="large" |
|
|
|
|
class="formClass" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="" prop="enterprisesName"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.enterprisesName" |
|
|
|
|
placeholder="请输入企业名称" |
|
|
|
|
clearable |
|
|
|
|
@keyup.enter="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="" prop="registrationNumber"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.registrationNumber" |
|
|
|
|
placeholder="请输入企业注册号" |
|
|
|
|
clearable |
|
|
|
|
@keyup.enter="handleQuery" |
|
|
|
|
class="!w-240px" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="establishmentDate"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="queryParams.establishmentDate" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
type="daterange" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
|
|
|
class="!w-220px" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="type"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.type" |
|
|
|
|
placeholder="请选择企业类型" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_TYPE)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="region"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.region" |
|
|
|
|
placeholder="请选择企业所属区域" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_AREA)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="" prop="enterprisesStatus"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.enterprisesStatus" |
|
|
|
|
placeholder="请选择企业状态" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_STATUS)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
<el-form-item label="" prop="registrationNumber"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.registrationNumber" |
|
|
|
|
placeholder="请输入企业注册号" |
|
|
|
|
clearable |
|
|
|
|
@keyup.enter="handleQuery" |
|
|
|
|
class="!w-240px" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item class="btnClass"> |
|
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 查詢</el-button> |
|
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
|
|
|
|
<el-button type="primary" plain v-hasPermi="['system:enterprise:create']" |
|
|
|
|
@click="push({ path: 'update' }) |
|
|
|
|
"> |
|
|
|
|
<Icon icon="ep:circle-plus" class="mr-5px" @click=" |
|
|
|
|
push({ |
|
|
|
|
path: 'update', |
|
|
|
|
query: { |
|
|
|
|
id: scope.row.id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
" /> 新增 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="success" plain @click="handleExport" :loading="exportLoading" v-hasPermi="['system:enterprise:export']"> |
|
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出 |
|
|
|
|
</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :cell-style="{'text-align': 'left'}"> |
|
|
|
|
<el-table-column label="企业名称" align="left" fixed="left" prop="enterprisesName" width="200" /> |
|
|
|
|
<el-table-column label="专管员" align="left" prop="inviterName" fixed="left" /> |
|
|
|
|
<el-table-column label="企业所属区域" align="left" prop="region" fixed="left"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<dict-tag :type="DICT_TYPE.ENTERPRISES_AREA" :value="scope.row.region" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="establishmentDate"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="queryParams.establishmentDate" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
type="daterange" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
|
|
|
class="!w-220px" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-table-column label="企业地址" align="left" prop="address" /> |
|
|
|
|
<el-table-column label="负责人姓名" align="left" prop="contactName" /> |
|
|
|
|
<el-table-column |
|
|
|
|
label="联系电话" |
|
|
|
|
align="center" |
|
|
|
|
prop="environmentalContactPhone" |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="企业注册号" align="left" prop="registrationNumber" /> |
|
|
|
|
<el-table-column label="企业图文介绍" align="left" prop="introduction" /> |
|
|
|
|
<!-- <el-table-column label="企业成立时间" align="center" prop="establishmentDate" /> |
|
|
|
|
<el-table-column label="企业经纬度" align="center" prop="gpsLocation" />--> |
|
|
|
|
<el-table-column |
|
|
|
|
label="创建时间" |
|
|
|
|
align="left" |
|
|
|
|
prop="createTime" |
|
|
|
|
:formatter="dateFormatter" |
|
|
|
|
width="180px" |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="操作" align="left" min-width="120px"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
|
|
|
|
<el-form-item label="" prop="enterprisesStatus"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.enterprisesStatus" |
|
|
|
|
placeholder="请选择企业状态" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.ENTERPRISES_STATUS)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item class="btnClass"> |
|
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 查詢</el-button> |
|
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="primary" |
|
|
|
|
@click=" |
|
|
|
|
push({ |
|
|
|
|
path: 'update', |
|
|
|
|
query: { |
|
|
|
|
id: scope.row.id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
" |
|
|
|
|
v-hasPermi="['system:enterprise:update']" |
|
|
|
|
plain |
|
|
|
|
v-hasPermi="['system:enterprise:create']" |
|
|
|
|
@click="push({ path: 'update' })" |
|
|
|
|
> |
|
|
|
|
详情 |
|
|
|
|
<Icon |
|
|
|
|
icon="ep:circle-plus" |
|
|
|
|
class="mr-5px" |
|
|
|
|
@click=" |
|
|
|
|
push({ |
|
|
|
|
path: 'update', |
|
|
|
|
query: { |
|
|
|
|
id: scope.row.id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
" |
|
|
|
|
/> |
|
|
|
|
新增 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['system:enterprise:delete']"> 删除 </el-button> |
|
|
|
|
<!-- |
|
|
|
|
<el-button |
|
|
|
|
type="success" |
|
|
|
|
plain |
|
|
|
|
@click="handleExport" |
|
|
|
|
:loading="exportLoading" |
|
|
|
|
v-hasPermi="['system:enterprise:export']" |
|
|
|
|
> |
|
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出 |
|
|
|
|
</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table |
|
|
|
|
v-loading="loading" |
|
|
|
|
:data="list" |
|
|
|
|
:stripe="true" |
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
:cell-style="{ 'text-align': 'left' }" |
|
|
|
|
> |
|
|
|
|
<el-table-column |
|
|
|
|
label="企业名称" |
|
|
|
|
align="left" |
|
|
|
|
fixed="left" |
|
|
|
|
prop="enterprisesName" |
|
|
|
|
width="200" |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="专管员" align="left" prop="inviterName" fixed="left" /> |
|
|
|
|
<el-table-column label="企业所属区域" align="left" prop="region" fixed="left"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<dict-tag :type="DICT_TYPE.ENTERPRISES_AREA" :value="scope.row.region" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column label="企业地址" align="left" prop="address" /> |
|
|
|
|
<el-table-column label="负责人姓名" align="left" prop="contactName" /> |
|
|
|
|
<el-table-column label="联系电话" align="center" prop="environmentalContactPhone" /> |
|
|
|
|
<el-table-column label="企业注册号" align="left" prop="registrationNumber" /> |
|
|
|
|
<el-table-column label="企业图文介绍" align="left" prop="introduction" /> |
|
|
|
|
<!-- <el-table-column label="企业成立时间" align="center" prop="establishmentDate" /> |
|
|
|
|
<el-table-column label="企业经纬度" align="center" prop="gpsLocation" />--> |
|
|
|
|
<el-table-column |
|
|
|
|
label="创建时间" |
|
|
|
|
align="left" |
|
|
|
|
prop="createTime" |
|
|
|
|
:formatter="dateFormatter" |
|
|
|
|
width="180px" |
|
|
|
|
/> |
|
|
|
|
<el-table-column label="操作" align="left" min-width="120px"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="primary" |
|
|
|
|
@click=" |
|
|
|
|
push({ |
|
|
|
|
path: 'update', |
|
|
|
|
query: { |
|
|
|
|
id: scope.row.id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
" |
|
|
|
|
v-hasPermi="['system:enterprise:update']" |
|
|
|
|
> |
|
|
|
|
详情 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="danger" |
|
|
|
|
@click="handleDelete(scope.row.id)" |
|
|
|
|
v-hasPermi="['system:enterprise:delete']" |
|
|
|
|
> |
|
|
|
|
删除 |
|
|
|
|
</el-button> |
|
|
|
|
<!-- |
|
|
|
|
<el-button link type="danger" @click="detailformRef(scope.row.id)"> 详情 </el-button> --> |
|
|
|
|
|
|
|
|
|
<!-- <router-link :to="'/enterprises/detailEnterprises/' + scope.row.type">--> |
|
|
|
|
<!-- <el-button link type="primary">详情</el-button>--> |
|
|
|
|
<!-- </router-link>--> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<!-- 分页 --> |
|
|
|
|
<el-pagination |
|
|
|
|
|
|
|
|
|
<!-- <router-link :to="'/enterprises/detailEnterprises/' + scope.row.type">--> |
|
|
|
|
<!-- <el-button link type="primary">详情</el-button>--> |
|
|
|
|
<!-- </router-link>--> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<!-- 分页 --> |
|
|
|
|
<el-pagination |
|
|
|
|
:total="total" |
|
|
|
|
:show-page-size="false" |
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
@ -170,12 +198,10 @@
|
|
|
|
|
@change="getList" |
|
|
|
|
class="ml-auto" |
|
|
|
|
/> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
@ -202,7 +228,7 @@ const queryParams = reactive({
|
|
|
|
|
region: undefined, |
|
|
|
|
enterprisesName: undefined, |
|
|
|
|
address: undefined, |
|
|
|
|
enterprisesStatus:undefined, |
|
|
|
|
enterprisesStatus: undefined, |
|
|
|
|
contactName: undefined, |
|
|
|
|
environmentalContactPhone: undefined, |
|
|
|
|
registrationNumber: undefined, |
|
|
|
@ -257,9 +283,6 @@ const { push } = useRouter() // 路由
|
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
|
const handleDelete = async (id: number) => { |
|
|
|
|
try { |
|
|
|
@ -293,21 +316,21 @@ onMounted(() => {
|
|
|
|
|
getList() |
|
|
|
|
}) |
|
|
|
|
</script> |
|
|
|
|
<style lang="css" > |
|
|
|
|
:deep(.el-card__body) { |
|
|
|
|
padding: 0 !important; |
|
|
|
|
<style lang="css"> |
|
|
|
|
:deep(.el-card__body) { |
|
|
|
|
padding: 0 !important; |
|
|
|
|
} |
|
|
|
|
.formClass { |
|
|
|
|
display: grid; |
|
|
|
|
grid-template-columns: 1fr 1fr 1fr 1fr; |
|
|
|
|
grid-template-rows: 1fr 1fr; |
|
|
|
|
align-items: center; |
|
|
|
|
:deep(.el-form-item) { |
|
|
|
|
margin: 0 !important; |
|
|
|
|
} |
|
|
|
|
.formClass { |
|
|
|
|
display: grid; |
|
|
|
|
grid-template-columns: 1fr 1fr 1fr 1fr; |
|
|
|
|
grid-template-rows: 1fr 1fr; |
|
|
|
|
align-items: center; |
|
|
|
|
:deep(.el-form-item) { |
|
|
|
|
margin: 0 !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.btnClass { |
|
|
|
|
grid-column: span 2; |
|
|
|
|
} |
|
|
|
|
.btnClass { |
|
|
|
|
grid-column: span 2; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|