Browse Source

阿宇一顿改

master
zy 2 months ago
parent
commit
f937e25693
  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. 42
      src/views/task/index.vue

3
src/utils/dict.ts

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

16
src/views/qualification/EnterpriseQualificationForm.vue

@ -7,11 +7,19 @@
label-width="100px" label-width="100px"
v-loading="formLoading" 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-input v-model="formData.enterpriseId" placeholder="请输入企业ID" />
</el-form-item> </el-form-item>
<el-form-item label="资质名称,例如:排污许可证、环保合格证" prop="qualificationName"> <el-form-item label="资质名称" prop="qualificationName">
<el-input v-model="formData.qualificationName" placeholder="请输入资质名称,例如:排污许可证、环保合格证" /> <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>
<el-form-item label="资质到期日期" prop="expiryDate"> <el-form-item label="资质到期日期" prop="expiryDate">
<el-date-picker <el-date-picker
@ -53,7 +61,7 @@ import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qua
/** 企业资质 表单 */ /** 企业资质 表单 */
defineOptions({ name: 'EnterpriseQualificationForm' }) defineOptions({ name: 'EnterpriseQualificationForm' })
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // 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 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="id" />
<el-table-column label="企业名称" align="center" prop="enterpriseName" /> <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="expiryDate" />
<el-table-column label="资质描述,详细说明资质信息" align="center" prop="qualificationDescription" /> <el-table-column label="资质描述,详细说明资质信息" align="center" prop="qualificationDescription" />
<el-table-column <el-table-column
@ -168,6 +174,7 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qualification' import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qualification'
import EnterpriseQualificationForm from './EnterpriseQualificationForm.vue' import EnterpriseQualificationForm from './EnterpriseQualificationForm.vue'
import {DICT_TYPE} from "@/utils/dict";
/** 企业资质 列表 */ /** 企业资质 列表 */
defineOptions({ name: 'EnterpriseQualification' }) defineOptions({ name: 'EnterpriseQualification' })

10
src/views/task/create.vue

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

42
src/views/task/index.vue

@ -6,7 +6,7 @@
:model="queryParams" :model="queryParams"
ref="queryFormRef" ref="queryFormRef"
:inline="true" :inline="true"
label-width="68px" label-width="108px"
> >
<el-form-item label="任务标题" prop="title"> <el-form-item label="任务标题" prop="title">
<el-input <el-input
@ -16,7 +16,27 @@
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
class="!w-240px" 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>
<el-form-item label="任务类型" prop="taskType"> <el-form-item label="任务类型" prop="taskType">
<el-select <el-select
v-model="queryParams.taskType" v-model="queryParams.taskType"
@ -70,7 +90,7 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <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"> <el-table-column label="任务状态" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.TASK_STATE" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.TASK_STATE" :value="scope.row.status" />
@ -125,12 +145,16 @@
<el-table-column label="执法对象" align="center" min-width="120px"> <el-table-column label="执法对象" align="center" min-width="120px">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="selectEnterprise(scope.row.id)">
已选&nbsp;0 <el-button link type="primary" @click="dialogVisible ">
已选&nbsp;<el-Tag>{{scope.row.enterpriseIdes.length}}</el-Tag>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="120px"> <el-table-column label="操作" align="center" min-width="120px">
<template #default="scope"> <template #default="scope">
<el-button <el-button
@ -145,19 +169,20 @@
}) })
" "
v-hasPermi="['system:task-info:update']" v-hasPermi="['system:task-info:update']"
> >
编辑 详情
</el-button> </el-button>
<el-button <el-button
link link
type="danger" type="danger"
@click="handleDelete(scope.row.id)" @click="handleDelete(scope.row.id)"
v-hasPermi="['system:task-info:delete']" v-hasPermi="['system:task-info:delete']"
v-if="scope.row.status == 1"
> >
删除 删除
</el-button> </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -180,10 +205,11 @@ import { dateFormatter3 } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { TaskInfoApi, TaskInfoVO } from '@/api/system/taskinfo' import { TaskInfoApi, TaskInfoVO } from '@/api/system/taskinfo'
import TaskInfoForm from './TaskInfoForm.vue' import TaskInfoForm from './TaskInfoForm.vue'
import Tag from '../ai/write/index/components/Tag.vue'
/** 任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。 列表 */ /** 任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。 列表 */
defineOptions({ name: 'TaskList' }) defineOptions({ name: 'TaskList' })
const dialogVisible = ref(false);
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const { push } = useRouter() const { push } = useRouter()

Loading…
Cancel
Save