Browse Source

阿宇加的

master
zy 2 months ago
parent
commit
44c3a39039
  1. 2
      src/api/enterprises/index.ts
  2. 1
      src/utils/dict.ts
  3. 14
      src/utils/formatTime.ts
  4. 7
      src/views/enterprises/index.vue
  5. 16
      src/views/qualification/index.vue
  6. 50
      src/views/task/index.vue

2
src/api/enterprises/index.ts

@ -22,7 +22,7 @@ export interface EnterprisesVO {
export const EnterprisesApi = {
// 查询企业分页
getEnterprisesPage: async (params: any) => {
return await request.get({ url: `/system/enterprise/page`, params })
return await request.get({ url: `/system/enterprise/pcpage`, params })
},
// 查询企业详情

1
src/utils/dict.ts

@ -138,6 +138,7 @@ export enum DICT_TYPE {
TASK_TYPE_PARENT = 'task_type_parent',
TASK_PRIORITY = 'task_priority',
TASK_EXEC_TIME = 'task_exec_time',
TASK_STATE = 'task_state',
// ========== INFRA 模块 ==========
INFRA_BOOLEAN_STRING = 'infra_boolean_string',
INFRA_JOB_STATUS = 'infra_job_status',

14
src/utils/formatTime.ts

@ -212,6 +212,20 @@ export function dateFormatter2(_row: any, _column: TableColumnCtx<any>, cellValu
return cellValue ? formatDate(cellValue, 'YYYY-MM-DD') : ''
}
/**
* element plus Formatter 使 YYYY年MM月DD日
*
* @param row
* @param column
* @param cellValue
*/
export function dateFormatter3(_row: any, _column: TableColumnCtx<any>, cellValue: any): string {
return cellValue ? formatDate(cellValue, 'YYYY年MM月DD日') : ''
}
/**
* 时间为00:00:00
* @param param

7
src/views/enterprises/index.vue

@ -96,13 +96,13 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="企业名称" align="center" fixed="left" prop="enterprisesName" />
<el-table-column label="邀请人" align="center" prop="userId" />
<el-table-column label="企业类型" align="center" prop="type">
<el-table-column label="邀请人" align="center" prop="inviterName" fixed="left" />
<el-table-column label="企业类型" align="center" prop="type" fixed="left" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.ENTERPRISES_TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="企业所属区域" align="center" prop="region">
<el-table-column label="企业所属区域" align="center" prop="region" fixed="left">
<template #default="scope">
<dict-tag :type="DICT_TYPE.ENTERPRISES_AREA" :value="scope.row.region" />
</template>
@ -126,7 +126,6 @@
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="管理部门" align="center" prop="managerDeptId" />
<el-table-column label="操作" align="center" min-width="120px">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">

16
src/views/qualification/index.vue

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
label-width="98px"
>
<el-form-item label="企业ID" prop="enterpriseId">
<el-input
@ -17,7 +17,7 @@
class="!w-240px"
/>
</el-form-item>
<el-form-item label="资质名称,例如:排污许可证、环保合格证" prop="qualificationName">
<el-form-item label="资质名称" prop="qualificationName">
<el-input
v-model="queryParams.qualificationName"
placeholder="请输入资质名称,例如:排污许可证、环保合格证"
@ -93,7 +93,7 @@
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['system:enterprises-qualification:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
@ -102,7 +102,7 @@
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['system:enterprises-qualification:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
@ -114,8 +114,8 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="企业ID" align="center" prop="enterpriseId" />
<el-table-column label="资质名称,例如:排污许可证、环保合格证" align="center" prop="qualificationName" />
<el-table-column label="企业名称" align="center" prop="enterpriseName" />
<el-table-column label="资质名称" align="center" prop="qualificationName" />
<el-table-column label="资质到期日期" align="center" prop="expiryDate" />
<el-table-column label="资质描述,详细说明资质信息" align="center" prop="qualificationDescription" />
<el-table-column
@ -135,7 +135,7 @@
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['system:enterprises-qualification:update']"
>
编辑
</el-button>
@ -143,7 +143,7 @@
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['system:enterprises-qualification:delete']"
>
删除
</el-button>

50
src/views/task/index.vue

@ -70,12 +70,18 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="任务标题" align="center" prop="title" />
<el-table-column label="执行周期" align="center" prop="execCycle">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="任务状态" align="center" prop="status" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.TASK_STATE" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="任务名称" align="center" prop="title" />
<!-- <el-table-column label="执行周期" align="center" prop="execCycle">
<template #default="scope">
<dict-tag :type="DICT_TYPE.TASK_EXEC_TIME" :value="scope.row.execCycle" />
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="任务类型" align="center" prop="taskType">
<template #default="scope">
<dict-tag :type="DICT_TYPE.TASK_TYPE" :value="scope.row.taskType" />
@ -86,18 +92,20 @@
<dict-tag :type="DICT_TYPE.TASK_PRIORITY" :value="scope.row.priority" />
</template>
</el-table-column>
<el-table-column label="任务状态" align="center" prop="status" />
<el-table-column label="发布部门" align="center" prop="publishDep" />
<el-table-column
label="计划开始时间"
align="center"
prop="startDate"
:formatter="dateFormatter"
:formatter="dateFormatter3"
/>
<el-table-column
label="计划结束时间"
align="center"
prop="endDate"
:formatter="dateFormatter"
:formatter="dateFormatter3"
/>
<!-- <el-table-column
label="任务创建时间"
@ -114,12 +122,19 @@
</template>
</el-table-column> -->
<!-- <el-table-column label="执行到第几" align="center" prop="taskStep" /> -->
<el-table-column label="操作" align="center" min-width="120px">
<el-table-column label="执法对象" align="center" min-width="120px">
<template #default="scope">
<el-button link type="danger" @click="selectEnterprise(scope.row.id)">
企业范围
<el-button link type="primary" @click="selectEnterprise(scope.row.id)">
已选&nbsp;0
</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120px">
<template #default="scope">
<el-button
link
type="primary"
@ -136,8 +151,23 @@
>
删除
</el-button>
<el-button
link
type="primary"
@click="openForm(scope.row.id)"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
@ -154,7 +184,7 @@
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import { dateFormatter3 } from '@/utils/formatTime'
import download from '@/utils/download'
import { TaskInfoApi, TaskInfoVO } from '@/api/system/taskinfo'
import TaskInfoForm from './TaskInfoForm.vue'

Loading…
Cancel
Save