add
This commit is contained in:
parent
42d88a9625
commit
275b4aa471
26
src/api/supervision_commencement_report.ts
Normal file
26
src/api/supervision_commencement_report.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--开工报告/开工令列表
|
||||
export function apiSupervisionCommencementReportLists(params: any) {
|
||||
return request.get({ url: '/supervision_const_prepare.supervision_commencement_report/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--开工报告/开工令
|
||||
export function apiSupervisionCommencementReportAdd(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_commencement_report/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--开工报告/开工令
|
||||
export function apiSupervisionCommencementReportEdit(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_commencement_report/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--开工报告/开工令
|
||||
export function apiSupervisionCommencementReportDelete(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_commencement_report/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--开工报告/开工令详情
|
||||
export function apiSupervisionCommencementReportDetail(params: any) {
|
||||
return request.get({ url: '/supervision_const_prepare.supervision_commencement_report/detail', params })
|
||||
}
|
26
src/api/supervision_construction_management_personnel.ts
Normal file
26
src/api/supervision_construction_management_personnel.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--施工管理人员列表
|
||||
export function apiSupervisionConstructionManagementPersonnelLists(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_construction_management_personnel/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--施工管理人员
|
||||
export function apiSupervisionConstructionManagementPersonnelAdd(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_construction_management_personnel/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--施工管理人员
|
||||
export function apiSupervisionConstructionManagementPersonnelEdit(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_construction_management_personnel/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--施工管理人员
|
||||
export function apiSupervisionConstructionManagementPersonnelDelete(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_construction_management_personnel/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--施工管理人员详情
|
||||
export function apiSupervisionConstructionManagementPersonnelDetail(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_construction_management_personnel/detail', params })
|
||||
}
|
26
src/api/supervision_large_equipment.ts
Normal file
26
src/api/supervision_large_equipment.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--大型设备及仪器具列表
|
||||
export function apiSupervisionLargeEquipmentLists(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_large_equipment/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--大型设备及仪器具
|
||||
export function apiSupervisionLargeEquipmentAdd(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_large_equipment/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--大型设备及仪器具
|
||||
export function apiSupervisionLargeEquipmentEdit(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_large_equipment/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--大型设备及仪器具
|
||||
export function apiSupervisionLargeEquipmentDelete(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_large_equipment/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--大型设备及仪器具详情
|
||||
export function apiSupervisionLargeEquipmentDetail(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_large_equipment/detail', params })
|
||||
}
|
26
src/api/supervision_participating_units_qualifications.ts
Normal file
26
src/api/supervision_participating_units_qualifications.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--参建单位资质列表
|
||||
export function apiSupervisionParticipatingUnitsQualificationsLists(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_participating_units_qualifications/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--参建单位资质
|
||||
export function apiSupervisionParticipatingUnitsQualificationsAdd(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_participating_units_qualifications/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--参建单位资质
|
||||
export function apiSupervisionParticipatingUnitsQualificationsEdit(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_participating_units_qualifications/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--参建单位资质
|
||||
export function apiSupervisionParticipatingUnitsQualificationsDelete(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_participating_units_qualifications/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--参建单位资质详情
|
||||
export function apiSupervisionParticipatingUnitsQualificationsDetail(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_participating_units_qualifications/detail', params })
|
||||
}
|
26
src/api/supervision_rules.ts
Normal file
26
src/api/supervision_rules.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--监理细则(文档)列表
|
||||
export function apiSupervisionRulesLists(params: any) {
|
||||
return request.get({ url: '/supervision_const_prepare.supervision_rules/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--监理细则(文档)
|
||||
export function apiSupervisionRulesAdd(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_rules/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--监理细则(文档)
|
||||
export function apiSupervisionRulesEdit(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_rules/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--监理细则(文档)
|
||||
export function apiSupervisionRulesDelete(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_rules/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--监理细则(文档)详情
|
||||
export function apiSupervisionRulesDetail(params: any) {
|
||||
return request.get({ url: '/supervision_const_prepare.supervision_rules/detail', params })
|
||||
}
|
26
src/api/supervision_rules_disclosure.ts
Normal file
26
src/api/supervision_rules_disclosure.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--监理规划/细则交底列表
|
||||
export function apiSupervisionRulesDisclosureLists(params: any) {
|
||||
return request.get({ url: '/supervision_const_prepare.supervision_rules_disclosure/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--监理规划/细则交底
|
||||
export function apiSupervisionRulesDisclosureAdd(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_rules_disclosure/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--监理规划/细则交底
|
||||
export function apiSupervisionRulesDisclosureEdit(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_rules_disclosure/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--监理规划/细则交底
|
||||
export function apiSupervisionRulesDisclosureDelete(params: any) {
|
||||
return request.post({ url: '/supervision_const_prepare.supervision_rules_disclosure/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--监理规划/细则交底详情
|
||||
export function apiSupervisionRulesDisclosureDetail(params: any) {
|
||||
return request.get({ url: '/supervision_const_prepare.supervision_rules_disclosure/detail', params })
|
||||
}
|
26
src/api/supervision_safety_management_personnel.ts
Normal file
26
src/api/supervision_safety_management_personnel.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--安全管理人员列表
|
||||
export function apiSupervisionSafetyManagementPersonnelLists(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_safety_management_personnel/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--安全管理人员
|
||||
export function apiSupervisionSafetyManagementPersonnelAdd(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_safety_management_personnel/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--安全管理人员
|
||||
export function apiSupervisionSafetyManagementPersonnelEdit(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_safety_management_personnel/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--安全管理人员
|
||||
export function apiSupervisionSafetyManagementPersonnelDelete(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_safety_management_personnel/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--安全管理人员详情
|
||||
export function apiSupervisionSafetyManagementPersonnelDetail(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_safety_management_personnel/detail', params })
|
||||
}
|
26
src/api/supervision_special_operation_personnel.ts
Normal file
26
src/api/supervision_special_operation_personnel.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 工程监理--特种作业人员资质列表
|
||||
export function apiSupervisionSpecialOperationPersonnelLists(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_special_operation_personnel/lists', params })
|
||||
}
|
||||
|
||||
// 添加工程监理--特种作业人员资质
|
||||
export function apiSupervisionSpecialOperationPersonnelAdd(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_special_operation_personnel/add', params })
|
||||
}
|
||||
|
||||
// 编辑工程监理--特种作业人员资质
|
||||
export function apiSupervisionSpecialOperationPersonnelEdit(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_special_operation_personnel/edit', params })
|
||||
}
|
||||
|
||||
// 删除工程监理--特种作业人员资质
|
||||
export function apiSupervisionSpecialOperationPersonnelDelete(params: any) {
|
||||
return request.post({ url: '/supervision_qualification_review.supervision_special_operation_personnel/delete', params })
|
||||
}
|
||||
|
||||
// 工程监理--特种作业人员资质详情
|
||||
export function apiSupervisionSpecialOperationPersonnelDetail(params: any) {
|
||||
return request.get({ url: '/supervision_qualification_review.supervision_special_operation_personnel/detail', params })
|
||||
}
|
@ -45,7 +45,8 @@ const props = defineProps({
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
unit_name: '',
|
||||
qualification_grade: ""
|
||||
qualification_grade: "",
|
||||
project_id: props.project_id || ''
|
||||
|
||||
});
|
||||
|
||||
|
@ -377,7 +377,9 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
formData.province = Number(formData.province)
|
||||
formData.city = Number(formData.city)
|
||||
formData.depar = Number(formData.depar)
|
||||
getCityList();
|
||||
deptrmt(formData.org_id)
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
|
@ -191,7 +191,7 @@ const customEvent1 = (e: any) => {
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
cost_budget_code: [{
|
||||
|
@ -85,7 +85,7 @@ const customEvent1 = (e: any) => {
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
cost_budget_id: [{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="费用预算id" prop="cost_budget_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.cost_budget_id" clearable placeholder="请输入费用预算id" />
|
||||
|
@ -194,7 +194,7 @@ const formRules = reactive<any>({
|
||||
}],
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机具预算单号" prop="equipment_budget_code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.equipment_budget_code" clearable
|
||||
|
@ -88,7 +88,7 @@ const getAmout = () => {
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
equipment_budget_id: [{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机具预算id" prop="equipment_budget_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.equipment_budget_id" clearable
|
||||
|
@ -354,7 +354,7 @@ const formRules = reactive<any>({
|
||||
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
reimbursement_type: [{
|
||||
|
@ -200,7 +200,7 @@ const formRules = reactive<any>({
|
||||
}],
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
labor_budget_code: [{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人工预算单号" prop="labor_budget_code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.labor_budget_code" clearable placeholder="请输入人工预算单号" />
|
||||
|
@ -89,7 +89,7 @@ getJobList()
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
labor_budget_id: [{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人工预算id" prop="labor_budget_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.labor_budget_id" clearable placeholder="请输入人工预算id" />
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目id" />
|
||||
<el-input v-model="project_name" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编码">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目id" />
|
||||
<el-input v-model="project_name" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目id" />
|
||||
<el-input v-model="project_name" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
|
@ -139,7 +139,7 @@ const customEvent = (e) => {
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
trip_apply_code: [{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<!-- <el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="申请单号" prop="trip_apply_code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.trip_apply_code" clearable placeholder="请输入申请单号" />
|
||||
|
292
src/views/supervision_commencement_report/edit.vue
Normal file
292
src/views/supervision_commencement_report/edit.vue
Normal file
@ -0,0 +1,292 @@
|
||||
<!-- <template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input v-model="formData.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档简介" prop="doc_desc">
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionCommencementReportEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--开工报告/开工令' : '新增工程监理--开工报告/开工令'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
doc_name: '',
|
||||
doc_desc: '',
|
||||
annex: '',
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
required: true,
|
||||
message: '请输入文档名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_desc: [{
|
||||
required: true,
|
||||
message: '请输入文档简介',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入操作人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionCommencementReportDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionCommencementReportEdit(data)
|
||||
: await apiSupervisionCommencementReportAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script> -->
|
||||
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input v-model="formData.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档简介" prop="doc_desc">
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<supervision_project @customEvent="customEvent"></supervision_project>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionFirstMeetingEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
// import { apiSupervisionRulesDisclosureAdd, apiSupervisionRulesDisclosureEdit, apiSupervisionRulesDisclosureDetail } from '@/api/supervision_rules_disclosure'
|
||||
import { apiSupervisionCommencementReportAdd, apiSupervisionCommencementReportEdit, apiSupervisionCommencementReportDetail } from '@/api/supervision_commencement_report'
|
||||
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
project_name: "",
|
||||
doc_name: '',
|
||||
doc_desc: '',
|
||||
annex: [],
|
||||
create_user: '',
|
||||
})
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
required: true,
|
||||
message: '请输入文档名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_desc: [{
|
||||
required: true,
|
||||
message: '请输入文档简介',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
annex: [{
|
||||
required: true,
|
||||
message: '请输入附件',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入操作人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
if (!Array.isArray(formData.annex)) formData.annex = []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionFirstMeetingDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionCommencementReportEdit(data)
|
||||
: await apiSupervisionCommencementReportAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
|
128
src/views/supervision_commencement_report/index.vue
Normal file
128
src/views/supervision_commencement_report/index.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_commencement_report/add']" type="primary"
|
||||
@click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_commencement_report/delete']"
|
||||
:disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档名称" prop="doc_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档简介" prop="doc_desc" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.annex && row.annex.length > 0">
|
||||
<div v-for="(item, i) in row.annex " :key='i'>
|
||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="create_user_name" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_commencement_report/edit']"
|
||||
type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_commencement_report/delete']"
|
||||
type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionCommencementReportLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionCommencementReportLists, apiSupervisionCommencementReportDelete } from '@/api/supervision_commencement_report'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
doc_name: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionCommencementReportLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionCommencementReportDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
284
src/views/supervision_construction_management_personnel/edit.vue
Normal file
284
src/views/supervision_construction_management_personnel/edit.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="formData.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input v-model="formData.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="id_card">
|
||||
<el-input v-model="formData.id_card" clearable placeholder="请输入身份证" />
|
||||
</el-form-item>
|
||||
<el-form-item label="技术职称" prop="technical_title">
|
||||
<el-input v-model="formData.technical_title" clearable placeholder="请输入技术职称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位" prop="job">
|
||||
<el-input v-model="formData.job" clearable placeholder="请输入岗位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称1" prop="qualification_name_one">
|
||||
<el-input v-model="formData.qualification_name_one" clearable placeholder="请输入资质名称1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证机构1" prop="certification_body_one">
|
||||
<el-input v-model="formData.certification_body_one" clearable placeholder="请输入认证机构1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号1" prop="qualification_number_one">
|
||||
<el-input v-model="formData.qualification_number_one" clearable placeholder="请输入资质编号1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期1" prop="get_date_one">
|
||||
<el-input v-model="formData.get_date_one" clearable placeholder="请输入发证日期1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期1" prop="effective_date_one">
|
||||
<el-input v-model="formData.effective_date_one" clearable placeholder="请输入有效日期1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质1状态 0-有效 1-无效" prop="qualification_one_status">
|
||||
<el-input v-model="formData.qualification_one_status" clearable placeholder="请输入资质1状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称2" prop="qualification_name_two">
|
||||
<el-input v-model="formData.qualification_name_two" clearable placeholder="请输入资质名称2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证机构2" prop="certification_body_two">
|
||||
<el-input v-model="formData.certification_body_two" clearable placeholder="请输入认证机构2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号2" prop="qualification_number_two">
|
||||
<el-input v-model="formData.qualification_number_two" clearable placeholder="请输入资质编号2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期2" prop="get_date_two">
|
||||
<el-input v-model="formData.get_date_two" clearable placeholder="请输入发证日期2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期2" prop="effective_date_two">
|
||||
<el-input v-model="formData.effective_date_two" clearable placeholder="请输入有效日期2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质2状态 0-有效 1-无效" prop="qualification_two_status">
|
||||
<el-input v-model="formData.qualification_two_status" clearable placeholder="请输入资质2状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionConstructionManagementPersonnelEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionConstructionManagementPersonnelAdd, apiSupervisionConstructionManagementPersonnelEdit, apiSupervisionConstructionManagementPersonnelDetail } from '@/api/supervision_construction_management_personnel'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--施工管理人员' : '新增工程监理--施工管理人员'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
name: '',
|
||||
company_id: '',
|
||||
id_card: '',
|
||||
technical_title: '',
|
||||
job: '',
|
||||
qualification_name_one: '',
|
||||
certification_body_one: '',
|
||||
qualification_number_one: '',
|
||||
get_date_one: '',
|
||||
effective_date_one: '',
|
||||
qualification_one_status: '',
|
||||
qualification_name_two: '',
|
||||
certification_body_two: '',
|
||||
qualification_number_two: '',
|
||||
get_date_two: '',
|
||||
effective_date_two: '',
|
||||
qualification_two_status: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
company_id: [{
|
||||
required: true,
|
||||
message: '请输入所属单位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
id_card: [{
|
||||
required: true,
|
||||
message: '请输入身份证',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
technical_title: [{
|
||||
required: true,
|
||||
message: '请输入技术职称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
job: [{
|
||||
required: true,
|
||||
message: '请输入岗位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name_one: [{
|
||||
required: true,
|
||||
message: '请输入资质名称1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
certification_body_one: [{
|
||||
required: true,
|
||||
message: '请输入认证机构1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number_one: [{
|
||||
required: true,
|
||||
message: '请输入资质编号1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date_one: [{
|
||||
required: true,
|
||||
message: '请输入发证日期1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date_one: [{
|
||||
required: true,
|
||||
message: '请输入有效日期1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_one_status: [{
|
||||
required: true,
|
||||
message: '请输入资质1状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name_two: [{
|
||||
required: true,
|
||||
message: '请输入资质名称2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
certification_body_two: [{
|
||||
required: true,
|
||||
message: '请输入认证机构2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number_two: [{
|
||||
required: true,
|
||||
message: '请输入资质编号2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date_two: [{
|
||||
required: true,
|
||||
message: '请输入发证日期2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date_two: [{
|
||||
required: true,
|
||||
message: '请输入有效日期2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_two_status: [{
|
||||
required: true,
|
||||
message: '请输入资质2状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
remark: [{
|
||||
required: true,
|
||||
message: '请输入备注',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入创建人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionConstructionManagementPersonnelDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionConstructionManagementPersonnelEdit(data)
|
||||
: await apiSupervisionConstructionManagementPersonnelAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称1" prop="qualification_name_one">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name_one" clearable placeholder="请输入资质名称1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称2" prop="qualification_name_two">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name_two" clearable placeholder="请输入资质名称2" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_qualification_review.supervision_construction_management_personnel/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_construction_management_personnel/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="所属单位" prop="company_id" show-overflow-tooltip />
|
||||
<el-table-column label="身份证" prop="id_card" show-overflow-tooltip />
|
||||
<el-table-column label="技术职称" prop="technical_title" show-overflow-tooltip />
|
||||
<el-table-column label="岗位" prop="job" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称1" prop="qualification_name_one" show-overflow-tooltip />
|
||||
<el-table-column label="认证机构1" prop="certification_body_one" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号1" prop="qualification_number_one" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期1" prop="get_date_one" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期1" prop="effective_date_one" show-overflow-tooltip />
|
||||
<el-table-column label="资质1状态 0-有效 1-无效" prop="qualification_one_status" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称2" prop="qualification_name_two" show-overflow-tooltip />
|
||||
<el-table-column label="认证机构2" prop="certification_body_two" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号2" prop="qualification_number_two" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期2" prop="get_date_two" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期2" prop="effective_date_two" show-overflow-tooltip />
|
||||
<el-table-column label="资质2状态 0-有效 1-无效" prop="qualification_two_status" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_construction_management_personnel/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_construction_management_personnel/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionConstructionManagementPersonnelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionConstructionManagementPersonnelLists, apiSupervisionConstructionManagementPersonnelDelete } from '@/api/supervision_construction_management_personnel'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
name: '',
|
||||
company_id: '',
|
||||
qualification_name_one: '',
|
||||
qualification_name_two: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionConstructionManagementPersonnelLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionConstructionManagementPersonnelDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -73,7 +73,7 @@ const customEvent = (e) => {
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
|
@ -1,38 +1,36 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input v-model="formData.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档简介" prop="doc_desc">
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" />
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<supervision_project @customEvent="customEvent"></supervision_project>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionDesignDisclosureEdit">
|
||||
<script lang="ts" setup name="supervisionFirstMeetingEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionDesignDisclosureAdd, apiSupervisionDesignDisclosureEdit, apiSupervisionDesignDisclosureDetail } from '@/api/supervision_design_disclosure'
|
||||
import { apiSupervisionDesignDisclosureEdit, apiSupervisionDesignDisclosureAdd } from '@/api/supervision_design_disclosure'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
@ -45,29 +43,35 @@ const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--设计交底与图纸会审' : '新增工程监理--设计交底与图纸会审'
|
||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
project_name: "",
|
||||
doc_name: '',
|
||||
doc_desc: '',
|
||||
annex: '',
|
||||
annex: [],
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
@ -80,6 +84,11 @@ const formRules = reactive<any>({
|
||||
message: '请输入文档简介',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
annex: [{
|
||||
required: true,
|
||||
message: '请输入附件',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入操作人',
|
||||
@ -87,7 +96,14 @@ const formRules = reactive<any>({
|
||||
}]
|
||||
})
|
||||
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
if (!Array.isArray(formData.annex)) formData.annex = []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
@ -101,7 +117,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionDesignDisclosureDetail({
|
||||
const data = await apiSupervisionFirstMeetingDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
@ -111,7 +127,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionDesignDisclosureEdit(data)
|
||||
: await apiSupervisionDesignDisclosureAdd(data)
|
||||
|
@ -1,14 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
@ -19,43 +12,44 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_design_disclosure/add']" type="primary" @click="handleAdd">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_design_disclosure/add']" type="primary"
|
||||
@click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_const_prepare.supervision_design_disclosure/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_design_disclosure/delete']"
|
||||
:disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档名称" prop="doc_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档简介" prop="doc_desc" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="操作人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.annex && row.annex.length > 0">
|
||||
<div v-for="(item, i) in row.annex " :key='i'>
|
||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="create_user_name" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_const_prepare.supervision_design_disclosure/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_design_disclosure/edit']"
|
||||
type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_const_prepare.supervision_design_disclosure/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_design_disclosure/delete']"
|
||||
type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@ -73,7 +67,7 @@
|
||||
<script lang="ts" setup name="supervisionDesignDisclosureLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionDesignDisclosureLists, apiSupervisionDesignDisclosureDelete } from '@/api/supervision_design_disclosure'
|
||||
import { apiSupervisionDesignDisclosureLists, apiSupervisionDesignDisclosureDelete, apiSupervisionDesignDisclosureDetail } from '@/api/supervision_design_disclosure'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -115,10 +109,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiSupervisionDesignDisclosureDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -1,29 +1,27 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input v-model="formData.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档简介" prop="doc_desc">
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" />
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<supervision_project @customEvent="customEvent"></supervision_project>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
@ -45,6 +43,7 @@ const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
@ -56,18 +55,23 @@ const popupTitle = computed(() => {
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
project_name: "",
|
||||
doc_name: '',
|
||||
doc_desc: '',
|
||||
annex: '',
|
||||
annex: [],
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
@ -92,7 +96,14 @@ const formRules = reactive<any>({
|
||||
}]
|
||||
})
|
||||
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
if (!Array.isArray(formData.annex)) formData.annex = []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
@ -116,7 +127,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionFirstMeetingEdit(data)
|
||||
: await apiSupervisionFirstMeetingAdd(data)
|
||||
|
@ -1,14 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
@ -19,43 +12,44 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_first_meeting/add']" type="primary" @click="handleAdd">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_first_meeting/add']" type="primary"
|
||||
@click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_const_prepare.supervision_first_meeting/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_first_meeting/delete']"
|
||||
:disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档名称" prop="doc_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档简介" prop="doc_desc" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="操作人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.annex && row.annex.length > 0">
|
||||
<div v-for="(item, i) in row.annex " :key='i'>
|
||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="create_user_name" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_const_prepare.supervision_first_meeting/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_first_meeting/edit']" type="primary"
|
||||
link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_const_prepare.supervision_first_meeting/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_first_meeting/delete']"
|
||||
type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
257
src/views/supervision_large_equipment/edit.vue
Normal file
257
src/views/supervision_large_equipment/edit.vue
Normal file
@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input v-model="formData.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input v-model="formData.name" clearable placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称1" prop="qualification_name_one">
|
||||
<el-input v-model="formData.qualification_name_one" clearable placeholder="请输入资质名称1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证机构1" prop="certification_body_one">
|
||||
<el-input v-model="formData.certification_body_one" clearable placeholder="请输入认证机构1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号1" prop="qualification_number_one">
|
||||
<el-input v-model="formData.qualification_number_one" clearable placeholder="请输入资质编号1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期1" prop="get_date_one">
|
||||
<el-input v-model="formData.get_date_one" clearable placeholder="请输入发证日期1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期1" prop="effective_date_one">
|
||||
<el-input v-model="formData.effective_date_one" clearable placeholder="请输入有效日期1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质1状态 0-有效 1-无效" prop="qualification_one_status">
|
||||
<el-input v-model="formData.qualification_one_status" clearable placeholder="请输入资质1状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称2" prop="qualification_name_two">
|
||||
<el-input v-model="formData.qualification_name_two" clearable placeholder="请输入资质名称2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证机构2" prop="certification_body_two">
|
||||
<el-input v-model="formData.certification_body_two" clearable placeholder="请输入认证机构2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号2" prop="qualification_number_two">
|
||||
<el-input v-model="formData.qualification_number_two" clearable placeholder="请输入资质编号2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期2" prop="get_date_two">
|
||||
<el-input v-model="formData.get_date_two" clearable placeholder="请输入发证日期2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期2" prop="effective_date_two">
|
||||
<el-input v-model="formData.effective_date_two" clearable placeholder="请输入有效日期2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质2状态 0-有效 1-无效" prop="qualification_two_status">
|
||||
<el-input v-model="formData.qualification_two_status" clearable placeholder="请输入资质2状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionLargeEquipmentEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionLargeEquipmentAdd, apiSupervisionLargeEquipmentEdit, apiSupervisionLargeEquipmentDetail } from '@/api/supervision_large_equipment'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--大型设备及仪器具' : '新增工程监理--大型设备及仪器具'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
company_id: '',
|
||||
name: '',
|
||||
qualification_name_one: '',
|
||||
certification_body_one: '',
|
||||
qualification_number_one: '',
|
||||
get_date_one: '',
|
||||
effective_date_one: '',
|
||||
qualification_one_status: '',
|
||||
qualification_name_two: '',
|
||||
certification_body_two: '',
|
||||
qualification_number_two: '',
|
||||
get_date_two: '',
|
||||
effective_date_two: '',
|
||||
qualification_two_status: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
company_id: [{
|
||||
required: true,
|
||||
message: '请输入所属单位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入设备名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name_one: [{
|
||||
required: true,
|
||||
message: '请输入资质名称1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
certification_body_one: [{
|
||||
required: true,
|
||||
message: '请输入认证机构1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number_one: [{
|
||||
required: true,
|
||||
message: '请输入资质编号1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date_one: [{
|
||||
required: true,
|
||||
message: '请输入发证日期1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date_one: [{
|
||||
required: true,
|
||||
message: '请输入有效日期1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_one_status: [{
|
||||
required: true,
|
||||
message: '请输入资质1状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name_two: [{
|
||||
required: true,
|
||||
message: '请输入资质名称2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
certification_body_two: [{
|
||||
required: true,
|
||||
message: '请输入认证机构2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number_two: [{
|
||||
required: true,
|
||||
message: '请输入资质编号2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date_two: [{
|
||||
required: true,
|
||||
message: '请输入发证日期2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date_two: [{
|
||||
required: true,
|
||||
message: '请输入有效日期2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_two_status: [{
|
||||
required: true,
|
||||
message: '请输入资质2状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
remark: [{
|
||||
required: true,
|
||||
message: '请输入备注',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入创建人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionLargeEquipmentDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionLargeEquipmentEdit(data)
|
||||
: await apiSupervisionLargeEquipmentAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
158
src/views/supervision_large_equipment/index.vue
Normal file
158
src/views/supervision_large_equipment/index.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称1" prop="qualification_name_one">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name_one" clearable placeholder="请输入资质名称1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称2" prop="qualification_name_two">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name_two" clearable placeholder="请输入资质名称2" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_qualification_review.supervision_large_equipment/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_large_equipment/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="所属单位" prop="company_id" show-overflow-tooltip />
|
||||
<el-table-column label="设备名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称1" prop="qualification_name_one" show-overflow-tooltip />
|
||||
<el-table-column label="认证机构1" prop="certification_body_one" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号1" prop="qualification_number_one" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期1" prop="get_date_one" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期1" prop="effective_date_one" show-overflow-tooltip />
|
||||
<el-table-column label="资质1状态 0-有效 1-无效" prop="qualification_one_status" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称2" prop="qualification_name_two" show-overflow-tooltip />
|
||||
<el-table-column label="认证机构2" prop="certification_body_two" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号2" prop="qualification_number_two" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期2" prop="get_date_two" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期2" prop="effective_date_two" show-overflow-tooltip />
|
||||
<el-table-column label="资质2状态 0-有效 1-无效" prop="qualification_two_status" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_large_equipment/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_large_equipment/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionLargeEquipmentLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionLargeEquipmentLists, apiSupervisionLargeEquipmentDelete } from '@/api/supervision_large_equipment'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
company_id: '',
|
||||
name: '',
|
||||
qualification_name_one: '',
|
||||
qualification_name_two: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionLargeEquipmentLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionLargeEquipmentDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input v-model="formData.company_name" clearable placeholder="请输入所属单位" @click="showDialog1 = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称" prop="qualification_name">
|
||||
<el-input v-model="formData.qualification_name" clearable placeholder="请输入资质名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号" prop="qualification_number">
|
||||
<el-input v-model="formData.qualification_number" clearable placeholder="请输入资质编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期" prop="get_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.get_date" clearable value-format="YYYY-MM-DD "
|
||||
placeholder="选择签订日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期" prop="effective_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.effective_date" clearable
|
||||
value-format="YYYY-MM-DD " placeholder="选择签订日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="资质状态 " prop="qualification_status">
|
||||
<el-select class="flex-1" v-model="formData.qualification_status" clearable placeholder="请选择部门">
|
||||
<el-option label="有效" :value="0" />
|
||||
<el-option label="无效" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<supervision_project @customEvent="customEvent"></supervision_project>
|
||||
</el-dialog>
|
||||
<div v-if="showDialog1">
|
||||
<el-dialog v-model="showDialog1" title="选择单位" width="70%">
|
||||
<supervision_participating_units @customEvent="customEvent1" :project_id="formData.project_id">
|
||||
</supervision_participating_units>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionParticipatingUnitsQualificationsEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionParticipatingUnitsQualificationsAdd, apiSupervisionParticipatingUnitsQualificationsEdit, } from '@/api/supervision_participating_units_qualifications'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
if (!Array.isArray(formData.annex)) formData.annex = []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--参建单位资质' : '新增工程监理--参建单位资质'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
project_name: "",
|
||||
company_id: '',
|
||||
company_name: '',
|
||||
qualification_name: '',
|
||||
qualification_number: '',
|
||||
get_date: '',
|
||||
effective_date: '',
|
||||
qualification_status: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
})
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
const customEvent1 = (e) => {
|
||||
console.log(e)
|
||||
formData.company_id = e.id
|
||||
formData.company_name = e.project_name
|
||||
showDialog1.value = false
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
company_id: [{
|
||||
required: true,
|
||||
message: '请输入所属单位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name: [{
|
||||
required: true,
|
||||
message: '请输入资质名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number: [{
|
||||
required: true,
|
||||
message: '请输入资质编号',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date: [{
|
||||
required: true,
|
||||
message: '请输入发证日期',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date: [{
|
||||
required: true,
|
||||
message: '请输入有效日期',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_status: [{
|
||||
required: true,
|
||||
message: '请输入资质状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
remark: [{
|
||||
required: true,
|
||||
message: '请输入备注',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionParticipatingUnitsQualificationsDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionParticipatingUnitsQualificationsEdit(data)
|
||||
: await apiSupervisionParticipatingUnitsQualificationsAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="资质名称" prop="qualification_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name" clearable placeholder="请输入资质名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号" prop="qualification_number">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_number" clearable
|
||||
placeholder="请输入资质编号" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_qualification_review.supervision_participating_units_qualifications/add']"
|
||||
type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_qualification_review.supervision_participating_units_qualifications/delete']"
|
||||
:disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="所属单位" prop="company_id" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称" prop="qualification_name" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号" prop="qualification_number" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期" prop="get_date" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期" prop="effective_date" show-overflow-tooltip />
|
||||
<el-table-column label="资质状态" prop="qualification_status_text" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_participating_units_qualifications/edit']"
|
||||
type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_participating_units_qualifications/delete']"
|
||||
type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionParticipatingUnitsQualificationsLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionParticipatingUnitsQualificationsLists, apiSupervisionParticipatingUnitsQualificationsDelete, apiSupervisionParticipatingUnitsQualificationsDetail } from '@/api/supervision_participating_units_qualifications'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
company_id: '',
|
||||
qualification_name: '',
|
||||
qualification_number: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionParticipatingUnitsQualificationsLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiSupervisionParticipatingUnitsQualificationsDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionParticipatingUnitsQualificationsDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -92,7 +92,7 @@ const customEvent = (e) => {
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
approval_type: [{
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<!-- <el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请选择项目" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="专项审批类型" prop="approval_type">
|
||||
<el-select class="w-[280px]" v-model="queryParams.approval_type" clearable placeholder="请选择专项审批类型">
|
||||
|
157
src/views/supervision_rules/edit.vue
Normal file
157
src/views/supervision_rules/edit.vue
Normal file
@ -0,0 +1,157 @@
|
||||
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input v-model="formData.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档简介" prop="doc_desc">
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<supervision_project @customEvent="customEvent"></supervision_project>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionFirstMeetingEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionRulesAdd, apiSupervisionRulesEdit, apiSupervisionRulesDetail } from '@/api/supervision_rules'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
project_name: "",
|
||||
doc_name: '',
|
||||
doc_desc: '',
|
||||
annex: [],
|
||||
create_user: '',
|
||||
})
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
required: true,
|
||||
message: '请输入文档名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_desc: [{
|
||||
required: true,
|
||||
message: '请输入文档简介',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
annex: [{
|
||||
required: true,
|
||||
message: '请输入附件',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入操作人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
if (!Array.isArray(formData.annex)) formData.annex = []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionFirstMeetingDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionRulesEdit(data)
|
||||
: await apiSupervisionRulesAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
126
src/views/supervision_rules/index.vue
Normal file
126
src/views/supervision_rules/index.vue
Normal file
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档名称" prop="doc_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档简介" prop="doc_desc" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.annex && row.annex.length > 0">
|
||||
<div v-for="(item, i) in row.annex " :key='i'>
|
||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="create_user_name" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules/edit']" type="primary" link
|
||||
@click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionRulesLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionRulesLists, apiSupervisionRulesDelete } from '@/api/supervision_rules'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
doc_name: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionRulesLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionRulesDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
157
src/views/supervision_rules_disclosure/edit.vue
Normal file
157
src/views/supervision_rules_disclosure/edit.vue
Normal file
@ -0,0 +1,157 @@
|
||||
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input v-model="formData.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文档简介" prop="doc_desc">
|
||||
<el-input v-model="formData.doc_desc" clearable placeholder="请输入文档简介" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<supervision_project @customEvent="customEvent"></supervision_project>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionFirstMeetingEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionRulesDisclosureAdd, apiSupervisionRulesDisclosureEdit, apiSupervisionRulesDisclosureDetail } from '@/api/supervision_rules_disclosure'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const showDialog = ref(false)
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
project_name: "",
|
||||
doc_name: '',
|
||||
doc_desc: '',
|
||||
annex: [],
|
||||
create_user: '',
|
||||
})
|
||||
const customEvent = (e) => {
|
||||
formData.project_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请选择项目',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_name: [{
|
||||
required: true,
|
||||
message: '请输入文档名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
doc_desc: [{
|
||||
required: true,
|
||||
message: '请输入文档简介',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
annex: [{
|
||||
required: true,
|
||||
message: '请输入附件',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入操作人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
if (!Array.isArray(formData.annex)) formData.annex = []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionFirstMeetingDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionRulesDisclosureEdit(data)
|
||||
: await apiSupervisionRulesDisclosureAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
128
src/views/supervision_rules_disclosure/index.vue
Normal file
128
src/views/supervision_rules_disclosure/index.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
|
||||
<el-form-item label="文档名称" prop="doc_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.doc_name" clearable placeholder="请输入文档名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules_disclosure/add']" type="primary"
|
||||
@click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules_disclosure/delete']"
|
||||
:disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档名称" prop="doc_name" show-overflow-tooltip />
|
||||
<el-table-column label="文档简介" prop="doc_desc" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.annex && row.annex.length > 0">
|
||||
<div v-for="(item, i) in row.annex " :key='i'>
|
||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="create_user_name" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules_disclosure/edit']"
|
||||
type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['supervision_const_prepare.supervision_rules_disclosure/delete']"
|
||||
type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionRulesDisclosureLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionRulesDisclosureLists, apiSupervisionRulesDisclosureDelete } from '@/api/supervision_rules_disclosure'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
doc_name: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionRulesDisclosureLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionRulesDisclosureDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
284
src/views/supervision_safety_management_personnel/edit.vue
Normal file
284
src/views/supervision_safety_management_personnel/edit.vue
Normal file
@ -0,0 +1,284 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="formData.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input v-model="formData.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="id_card">
|
||||
<el-input v-model="formData.id_card" clearable placeholder="请输入身份证" />
|
||||
</el-form-item>
|
||||
<el-form-item label="技术职称" prop="technical_title">
|
||||
<el-input v-model="formData.technical_title" clearable placeholder="请输入技术职称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位" prop="job">
|
||||
<el-input v-model="formData.job" clearable placeholder="请输入岗位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称1" prop="qualification_name_one">
|
||||
<el-input v-model="formData.qualification_name_one" clearable placeholder="请输入资质名称1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证机构1" prop="certification_body_one">
|
||||
<el-input v-model="formData.certification_body_one" clearable placeholder="请输入认证机构1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号1" prop="qualification_number_one">
|
||||
<el-input v-model="formData.qualification_number_one" clearable placeholder="请输入资质编号1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期1" prop="get_date_one">
|
||||
<el-input v-model="formData.get_date_one" clearable placeholder="请输入发证日期1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期1" prop="effective_date_one">
|
||||
<el-input v-model="formData.effective_date_one" clearable placeholder="请输入有效日期1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质1状态 0-有效 1-无效" prop="qualification_one_status">
|
||||
<el-input v-model="formData.qualification_one_status" clearable placeholder="请输入资质1状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称2" prop="qualification_name_two">
|
||||
<el-input v-model="formData.qualification_name_two" clearable placeholder="请输入资质名称2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证机构2" prop="certification_body_two">
|
||||
<el-input v-model="formData.certification_body_two" clearable placeholder="请输入认证机构2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质编号2" prop="qualification_number_two">
|
||||
<el-input v-model="formData.qualification_number_two" clearable placeholder="请输入资质编号2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期2" prop="get_date_two">
|
||||
<el-input v-model="formData.get_date_two" clearable placeholder="请输入发证日期2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="有效日期2" prop="effective_date_two">
|
||||
<el-input v-model="formData.effective_date_two" clearable placeholder="请输入有效日期2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质2状态 0-有效 1-无效" prop="qualification_two_status">
|
||||
<el-input v-model="formData.qualification_two_status" clearable placeholder="请输入资质2状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionSafetyManagementPersonnelEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionSafetyManagementPersonnelAdd, apiSupervisionSafetyManagementPersonnelEdit, apiSupervisionSafetyManagementPersonnelDetail } from '@/api/supervision_safety_management_personnel'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--安全管理人员' : '新增工程监理--安全管理人员'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
name: '',
|
||||
company_id: '',
|
||||
id_card: '',
|
||||
technical_title: '',
|
||||
job: '',
|
||||
qualification_name_one: '',
|
||||
certification_body_one: '',
|
||||
qualification_number_one: '',
|
||||
get_date_one: '',
|
||||
effective_date_one: '',
|
||||
qualification_one_status: '',
|
||||
qualification_name_two: '',
|
||||
certification_body_two: '',
|
||||
qualification_number_two: '',
|
||||
get_date_two: '',
|
||||
effective_date_two: '',
|
||||
qualification_two_status: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目id',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
company_id: [{
|
||||
required: true,
|
||||
message: '请输入所属单位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
id_card: [{
|
||||
required: true,
|
||||
message: '请输入身份证',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
technical_title: [{
|
||||
required: true,
|
||||
message: '请输入技术职称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
job: [{
|
||||
required: true,
|
||||
message: '请输入岗位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name_one: [{
|
||||
required: true,
|
||||
message: '请输入资质名称1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
certification_body_one: [{
|
||||
required: true,
|
||||
message: '请输入认证机构1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number_one: [{
|
||||
required: true,
|
||||
message: '请输入资质编号1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date_one: [{
|
||||
required: true,
|
||||
message: '请输入发证日期1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date_one: [{
|
||||
required: true,
|
||||
message: '请输入有效日期1',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_one_status: [{
|
||||
required: true,
|
||||
message: '请输入资质1状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_name_two: [{
|
||||
required: true,
|
||||
message: '请输入资质名称2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
certification_body_two: [{
|
||||
required: true,
|
||||
message: '请输入认证机构2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_number_two: [{
|
||||
required: true,
|
||||
message: '请输入资质编号2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
get_date_two: [{
|
||||
required: true,
|
||||
message: '请输入发证日期2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
effective_date_two: [{
|
||||
required: true,
|
||||
message: '请输入有效日期2',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
qualification_two_status: [{
|
||||
required: true,
|
||||
message: '请输入资质2状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
remark: [{
|
||||
required: true,
|
||||
message: '请输入备注',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入创建人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionSafetyManagementPersonnelDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionSafetyManagementPersonnelEdit(data)
|
||||
: await apiSupervisionSafetyManagementPersonnelAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
161
src/views/supervision_safety_management_personnel/index.vue
Normal file
161
src/views/supervision_safety_management_personnel/index.vue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称1" prop="qualification_name_one">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name_one" clearable placeholder="请输入资质名称1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资质名称2" prop="qualification_name_two">
|
||||
<el-input class="w-[280px]" v-model="queryParams.qualification_name_two" clearable placeholder="请输入资质名称2" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_qualification_review.supervision_safety_management_personnel/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_safety_management_personnel/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="所属单位" prop="company_id" show-overflow-tooltip />
|
||||
<el-table-column label="身份证" prop="id_card" show-overflow-tooltip />
|
||||
<el-table-column label="技术职称" prop="technical_title" show-overflow-tooltip />
|
||||
<el-table-column label="岗位" prop="job" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称1" prop="qualification_name_one" show-overflow-tooltip />
|
||||
<el-table-column label="认证机构1" prop="certification_body_one" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号1" prop="qualification_number_one" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期1" prop="get_date_one" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期1" prop="effective_date_one" show-overflow-tooltip />
|
||||
<el-table-column label="资质1状态 0-有效 1-无效" prop="qualification_one_status" show-overflow-tooltip />
|
||||
<el-table-column label="资质名称2" prop="qualification_name_two" show-overflow-tooltip />
|
||||
<el-table-column label="认证机构2" prop="certification_body_two" show-overflow-tooltip />
|
||||
<el-table-column label="资质编号2" prop="qualification_number_two" show-overflow-tooltip />
|
||||
<el-table-column label="发证日期2" prop="get_date_two" show-overflow-tooltip />
|
||||
<el-table-column label="有效日期2" prop="effective_date_two" show-overflow-tooltip />
|
||||
<el-table-column label="资质2状态 0-有效 1-无效" prop="qualification_two_status" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_safety_management_personnel/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_safety_management_personnel/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionSafetyManagementPersonnelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionSafetyManagementPersonnelLists, apiSupervisionSafetyManagementPersonnelDelete } from '@/api/supervision_safety_management_personnel'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
name: '',
|
||||
company_id: '',
|
||||
qualification_name_one: '',
|
||||
qualification_name_two: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionSafetyManagementPersonnelLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionSafetyManagementPersonnelDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
203
src/views/supervision_special_operation_personnel/edit.vue
Normal file
203
src/views/supervision_special_operation_personnel/edit.vue
Normal file
@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input v-model="formData.project_id" clearable placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="formData.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input v-model="formData.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工种" prop="work_type">
|
||||
<el-input v-model="formData.work_type" clearable placeholder="请输入工种" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证" prop="id_card">
|
||||
<el-input v-model="formData.id_card" clearable placeholder="请输入身份证" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资格有效期" prop="validity_period">
|
||||
<el-input v-model="formData.validity_period" clearable placeholder="请输入资格有效期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="进场时间" prop="enter_time">
|
||||
<el-input v-model="formData.enter_time" clearable placeholder="请输入进场时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="离场时间" prop="leave_time">
|
||||
<el-input v-model="formData.leave_time" clearable placeholder="请输入离场时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态 0-有效 1-无效" prop="status">
|
||||
<el-input v-model="formData.status" clearable placeholder="请输入状态 0-有效 1-无效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_user">
|
||||
<el-input v-model="formData.create_user" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionSpecialOperationPersonnelEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiSupervisionSpecialOperationPersonnelAdd, apiSupervisionSpecialOperationPersonnelEdit, apiSupervisionSpecialOperationPersonnelDetail } from '@/api/supervision_special_operation_personnel'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑工程监理--特种作业人员资质' : '新增工程监理--特种作业人员资质'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
project_id: '',
|
||||
name: '',
|
||||
company_id: '',
|
||||
work_type: '',
|
||||
id_card: '',
|
||||
validity_period: '',
|
||||
enter_time: '',
|
||||
leave_time: '',
|
||||
status: '',
|
||||
remark: '',
|
||||
annex: '',
|
||||
create_user: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
project_id: [{
|
||||
required: true,
|
||||
message: '请输入项目名称',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
name: [{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
company_id: [{
|
||||
required: true,
|
||||
message: '请输入所属单位',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
work_type: [{
|
||||
required: true,
|
||||
message: '请输入工种',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
id_card: [{
|
||||
required: true,
|
||||
message: '请输入身份证',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
validity_period: [{
|
||||
required: true,
|
||||
message: '请输入资格有效期',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
enter_time: [{
|
||||
required: true,
|
||||
message: '请输入进场时间',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
leave_time: [{
|
||||
required: true,
|
||||
message: '请输入离场时间',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
status: [{
|
||||
required: true,
|
||||
message: '请输入状态 0-有效 1-无效',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
remark: [{
|
||||
required: true,
|
||||
message: '请输入备注',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
create_user: [{
|
||||
required: true,
|
||||
message: '请输入创建人',
|
||||
trigger: ['blur']
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiSupervisionSpecialOperationPersonnelDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupervisionSpecialOperationPersonnelEdit(data)
|
||||
: await apiSupervisionSpecialOperationPersonnelAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
148
src/views/supervision_special_operation_personnel/index.vue
Normal file
148
src/views/supervision_special_operation_personnel/index.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form-item label="项目名称" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入所属单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_user">
|
||||
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['supervision_qualification_review.supervision_special_operation_personnel/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_special_operation_personnel/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目名称" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="所属单位" prop="company_id" show-overflow-tooltip />
|
||||
<el-table-column label="工种" prop="work_type" show-overflow-tooltip />
|
||||
<el-table-column label="身份证" prop="id_card" show-overflow-tooltip />
|
||||
<el-table-column label="资格有效期" prop="validity_period" show-overflow-tooltip />
|
||||
<el-table-column label="进场时间" prop="enter_time" show-overflow-tooltip />
|
||||
<el-table-column label="离场时间" prop="leave_time" show-overflow-tooltip />
|
||||
<el-table-column label="状态 0-有效 1-无效" prop="status" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_special_operation_personnel/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['supervision_qualification_review.supervision_special_operation_personnel/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="supervisionSpecialOperationPersonnelLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiSupervisionSpecialOperationPersonnelLists, apiSupervisionSpecialOperationPersonnelDelete } from '@/api/supervision_special_operation_personnel'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: '',
|
||||
name: '',
|
||||
company_id: '',
|
||||
create_user: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiSupervisionSpecialOperationPersonnelLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiSupervisionSpecialOperationPersonnelDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly @click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号" prop="project_num">
|
||||
<el-input v-model="formData.project_num" clearable placeholder="请输入项目编号" />
|
||||
<el-input v-model="formData.project_num" clearable readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目负责人" prop="head">
|
||||
<el-input v-model="formData.head" clearable placeholder="请输入项目负责人" />
|
||||
@ -105,17 +105,17 @@
|
||||
<el-input v-model="row.days" :readonly="mode == 'edit'" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始日期" prop="start_date" width="200px">
|
||||
<el-table-column label="开始日期" prop="start_date" width="220px">
|
||||
<template #default="{ row }">
|
||||
<el-date-picker class="flex-1 !flex" v-model="row.start_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="请选择日期">
|
||||
<el-date-picker v-model="row.start_date" clearable type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择日期">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束日期" prop="end_date" width="200px">
|
||||
<el-table-column label="结束日期" prop="end_date" width="220px">
|
||||
<template #default="{ row }">
|
||||
<el-date-picker class="flex-1 !flex" v-model="row.end_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="请选择日期">
|
||||
<el-date-picker v-model="row.end_date" clearable type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择日期">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -269,7 +269,7 @@ const handleAdd = () => {
|
||||
|
||||
|
||||
const handleDelete = (row: any) => {
|
||||
if (formData.task_detail.length = 1) return
|
||||
if (formData.task_detail.length == 1) return
|
||||
const index = formData.task_detail.indexOf(row);
|
||||
formData.task_detail.splice(index, 1);
|
||||
}
|
||||
@ -277,9 +277,9 @@ const handleDelete = (row: any) => {
|
||||
const tableIndex = ref(0)
|
||||
|
||||
const customEvent = (e) => {
|
||||
// formData.project = e.id
|
||||
// formData.project_name = e.project_name
|
||||
// formData.project_num = e.project_num
|
||||
formData.project = e.id
|
||||
formData.project_name = e.project_name
|
||||
formData.project_num = e.project_num
|
||||
|
||||
showDialog.value = false
|
||||
}
|
||||
@ -339,9 +339,6 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
|
||||
|
||||
console.log(formData, 'formdata')
|
||||
return
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
|
Loading…
x
Reference in New Issue
Block a user