Browse Source

Merge remote-tracking branch 'origin/master'

master
DX 2 months ago
parent
commit
86e470d4f8
  1. 3
      src/utils/dict.ts
  2. 16
      src/views/qualification/EnterpriseQualificationForm.vue
  3. 9
      src/views/qualification/index.vue
  4. 10
      src/views/task/create.vue
  5. 50
      src/views/task/index.vue

3
src/utils/dict.ts

@ -115,6 +115,9 @@ export enum DICT_TYPE {
//========== 企业 ==========
ENTERPRISES_AREA = 'enterprises_area',
ENTERPRISES_TYPE = 'enterprises_type',
//========== 资质 ==========
ENTERPRISES_QUA = 'enterprise_qua',
// ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX = 'system_user_sex',
SYSTEM_MENU_TYPE = 'system_menu_type',

16
src/views/qualification/EnterpriseQualificationForm.vue

@ -7,11 +7,19 @@
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="企业ID" prop="enterpriseId">
<el-form-item label="选择企业" prop="enterpriseId">
<el-input v-model="formData.enterpriseId" placeholder="请输入企业ID" />
</el-form-item>
<el-form-item label="资质名称,例如:排污许可证、环保合格证" prop="qualificationName">
<el-input v-model="formData.qualificationName" placeholder="请输入资质名称,例如:排污许可证、环保合格证" />
<el-form-item label="资质名称" prop="qualificationName">
<el-select v-model="formData.qualificationName" placeholder="请选择资质名称">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISES_QUA)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="资质到期日期" prop="expiryDate">
<el-date-picker
@ -53,7 +61,7 @@ import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qua
/** 企业资质 表单 */
defineOptions({ name: 'EnterpriseQualificationForm' })
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() //
const message = useMessage() //

9
src/views/qualification/index.vue

@ -115,7 +115,13 @@
<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="企业名称" align="center" prop="enterpriseName" />
<el-table-column label="资质名称" align="center" prop="qualificationName" />
<el-table-column label="资质名称" align="center" prop="qualificationName" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.ENTERPRISES_QUA" :value="scope.row.qualificationName" />
</template>
</el-table-column>
<el-table-column label="资质到期日期" align="center" prop="expiryDate" />
<el-table-column label="资质描述,详细说明资质信息" align="center" prop="qualificationDescription" />
<el-table-column
@ -168,6 +174,7 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qualification'
import EnterpriseQualificationForm from './EnterpriseQualificationForm.vue'
import {DICT_TYPE} from "@/utils/dict";
/** 企业资质 列表 */
defineOptions({ name: 'EnterpriseQualification' })

10
src/views/task/create.vue

@ -241,7 +241,7 @@ const formData = ref({
taskTotal: undefined,
planTime: [] as any,
tags: [],
enterprises: ref<any>([])
enterprises: [] as any
})
const router=useRouter()
const route=useRoute()
@ -378,6 +378,11 @@ async function submitForm() {
data.startDate = data.planTime[0]
data.endDate = data.planTime[1]
if (data.id) {
TaskInfoApi.updateTaskInfo(data).then(() => {
message.success('操作成功')
tagView.delView(route)
router.go(-1)
})
} else {
TaskInfoApi.createTaskInfo(data).then(() => {
message.success('操作成功')
@ -393,7 +398,8 @@ function init(){
TaskInfoApi.getTaskInfo(query.id).then(res=>{
formData.value=res
formData.value.planTime=[formData.value.startDate,formData.value.endDate]
formData.value.enterprises=res.enterpriseInspectionsIdes
formData.value.enterprises=res.enterpriseIdes
formData.value.tags=res.taskTagIdes.map(t=>t.tagId)
})
}
}

50
src/views/task/index.vue

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
label-width="108px"
>
<el-form-item label="任务标题" prop="title">
<el-input
@ -16,7 +16,27 @@
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="任务状态" prop="taskType">
<el-select
v-model="queryParams.status"
placeholder="请选择任务状态"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.TASK_STATE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务类型" prop="taskType">
<el-select
v-model="queryParams.taskType"
@ -70,7 +90,7 @@
<!-- 列表 -->
<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="任务编号" align="center" width="150px" prop="taskNumber" />
<el-table-column label="任务状态" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.TASK_STATE" :value="scope.row.status" />
@ -125,10 +145,20 @@
<el-table-column label="执法对象" align="center" min-width="120px">
<template #default="scope">
<el-button link type="primary" @click="selectEnterprise(scope.row.id)">
已选&nbsp;0
</el-button>
<el-button link type="primary" @click="
push({
path: 'create',
query: {
id: scope.row.id
}
})
">
<el-Tag type="success">{{scope.row.enterpriseIdes.length}}</el-Tag>&nbsp;
</el-button>&nbsp;
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120px">
@ -145,19 +175,20 @@
})
"
v-hasPermi="['system:task-info:update']"
>
编辑
详情
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['system:task-info:delete']"
v-if="scope.row.status == 1"
>
删除
</el-button>
<el-button link type="primary" @click="openForm(scope.row.id)"> 详情 </el-button>
<!-- <el-button link type="primary" @click="openForm(scope.row.id)"> 详情 </el-button> -->
</template>
</el-table-column>
</el-table>
@ -172,6 +203,9 @@
<!-- 表单弹窗添加/修改 -->
<TaskInfoForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">

Loading…
Cancel
Save