This commit is contained in:
zmj 2024-03-05 17:12:21 +08:00
parent 359e8b9ec7
commit 070e343c51
14 changed files with 1278 additions and 8 deletions

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 工程监理--项目验收报告列表
export function apiSupervisionProjectAcceptanceReportLists(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_acceptance_report/lists', params })
}
// 添加工程监理--项目验收报告
export function apiSupervisionProjectAcceptanceReportAdd(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_acceptance_report/add', params })
}
// 编辑工程监理--项目验收报告
export function apiSupervisionProjectAcceptanceReportEdit(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_acceptance_report/edit', params })
}
// 删除工程监理--项目验收报告
export function apiSupervisionProjectAcceptanceReportDelete(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_acceptance_report/delete', params })
}
// 工程监理--项目验收报告详情
export function apiSupervisionProjectAcceptanceReportDetail(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_acceptance_report/detail', params })
}

View File

@ -0,0 +1,36 @@
import request from '@/utils/request'
// 工程监理--项目竣工资料归档列表
export function apiSupervisionProjectDataArchivingLists(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_data_archiving/lists', params })
}
// 添加工程监理--项目竣工资料归档
export function apiSupervisionProjectDataArchivingAdd(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_data_archiving/add', params })
}
// 编辑工程监理--项目竣工资料归档
export function apiSupervisionProjectDataArchivingEdit(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_data_archiving/edit', params })
}
// 删除工程监理--项目竣工资料归档
export function apiSupervisionProjectDataArchivingDelete(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_data_archiving/delete', params })
}
// 工程监理--项目竣工资料归档详情
export function apiSupervisionProjectDataArchivingDetail(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_data_archiving/detail', params })
}
// 工程监理--项目竣工资料归档详情
export function apisupervision_project_data_archiving_detail(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_data_archiving_detail/lists', params })
}
// 工程监理--项目竣工资料归档详情
export function apisupervision_project_data_archiving_detail_delete(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_data_archiving_detail/delete', params })
}

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 工程监理--业主评价列表
export function apiSupervisionProjectOwnerEvaluationLists(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_owner_evaluation/lists', params })
}
// 添加工程监理--业主评价
export function apiSupervisionProjectOwnerEvaluationAdd(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_owner_evaluation/add', params })
}
// 编辑工程监理--业主评价
export function apiSupervisionProjectOwnerEvaluationEdit(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_owner_evaluation/edit', params })
}
// 删除工程监理--业主评价
export function apiSupervisionProjectOwnerEvaluationDelete(params: any) {
return request.post({ url: '/supervision_ending.supervision_project_owner_evaluation/delete', params })
}
// 工程监理--业主评价详情
export function apiSupervisionProjectOwnerEvaluationDetail(params: any) {
return request.get({ url: '/supervision_ending.supervision_project_owner_evaluation/detail', params })
}

View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 工程监理--人员管理明细列表
export function apiSupervisionProjectPersonnelLists(params: any) {
return request.get({ url: '/supervision_team.supervision_project_personnel/lists', params })
}
// 添加工程监理--人员管理明细
export function apiSupervisionProjectPersonnelAdd(params: any) {
return request.post({ url: '/supervision_team.supervision_project_personnel/add', params })
}
// 编辑工程监理--人员管理明细
export function apiSupervisionProjectPersonnelEdit(params: any) {
return request.post({ url: '/supervision_team.supervision_project_personnel/edit', params })
}
// 删除工程监理--人员管理明细
export function apiSupervisionProjectPersonnelDelete(params: any) {
return request.post({ url: '/supervision_team.supervision_project_personnel/delete', params })
}
// 工程监理--人员管理明细详情
export function apiSupervisionProjectPersonnelDetail(params: any) {
return request.get({ url: '/supervision_team.supervision_project_personnel/detail', params })
}

View File

@ -2,7 +2,7 @@ const defaultSetting = {
showCrumb: true, // 是否显示面包屑
showLogo: true, // 是否显示logo
isUniqueOpened: false, //只展开一个一级菜单
sideWidth: 200, //侧边栏宽度
sideWidth: 250, //侧边栏宽度
sideTheme: 'light', //侧边栏主题
sideDarkColor: '#1d2124', //侧边栏深色主题颜色
openMultipleTabs: true, // 是否开启多标签tab栏

View File

@ -0,0 +1,150 @@
<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_name">
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目"
@click="showDialog = true" />
</el-form-item>
<el-form-item label="文档名称" prop="title">
<el-input v-model="formData.title" clearable placeholder="请输入文档名称" />
</el-form-item>
<el-form-item label="文档简介" prop="content">
<el-input v-model="formData.content" clearable placeholder="请输入文档简介" />
</el-form-item>
<el-form-item label="附件" prop="annex">
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
@delFile="delFileFn" />
</el-form-item>
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<supervision_project @customEvent="customEvent"></supervision_project>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="supervisionProjectAcceptanceReportEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiSupervisionProjectAcceptanceReportAdd, apiSupervisionProjectAcceptanceReportEdit, apiSupervisionProjectAcceptanceReportDetail } from '@/api/supervision_project_acceptance_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: "",
title: '',
content: '',
annex: [],
})
const customEvent = (e) => {
formData.project_id = e.id
formData.project_name = e.project_name
showDialog.value = false
}
const handleAvatarSuccess_four = (response: any) => {
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 formRules = reactive<any>({
project_id: [{
required: true,
message: '请输入项目id',
trigger: ['blur']
}],
title: [{
required: true,
message: '请输入文档名称',
trigger: ['blur']
}],
content: [{
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 apiSupervisionProjectAcceptanceReportDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiSupervisionProjectAcceptanceReportEdit(data)
: await apiSupervisionProjectAcceptanceReportAdd(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>

View File

@ -0,0 +1,115 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="文档名称" prop="title">
<el-input class="w-[280px]" v-model="queryParams.title" 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_ending.supervision_project_acceptance_report/add']" type="primary"
@click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['supervision_ending.supervision_project_acceptance_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="title" show-overflow-tooltip />
<el-table-column label="文档简介" prop="content" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-perms="['supervision_ending.supervision_project_acceptance_report/edit']"
type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['supervision_ending.supervision_project_acceptance_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="supervisionProjectAcceptanceReportLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiSupervisionProjectAcceptanceReportLists, apiSupervisionProjectAcceptanceReportDelete, apiSupervisionProjectAcceptanceReportDetail } from '@/api/supervision_project_acceptance_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: '',
title: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiSupervisionProjectAcceptanceReportLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
let res = await apiSupervisionProjectAcceptanceReportDetail({ 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 apiSupervisionProjectAcceptanceReportDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -0,0 +1,197 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="130px" :rules="formRules">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目"
@click="showDialog = true" />
</el-form-item>
<el-form-item label="项目总监意见" prop="opinion">
<el-input v-model="formData.opinion" clearable placeholder="请输入项目总监意见" type="textarea" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-form>
<div style="margin-bottom: 30px;">资料归档目录</div>
<div style="margin-bottom: 30px;">
<el-table :data="formData.detail">
<el-table-column label="序号" width="150px">
<template #default="{ row }">
<el-button @click="handleAdd()">+</el-button>
<el-button @click="handleDelete(row)">-</el-button>
</template>
</el-table-column>
<el-table-column label="监理项目竣工资料归档目录" prop="data_catalog">
<template #default="{ row }">
<el-input v-model="row.data_catalog" />
</template>
</el-table-column>
<el-table-column label="项目部提交资料(份数)" prop="submit_by_project_dept">
<template #default="{ row }">
<el-input v-model="row.submit_by_project_dept" type="number" />
</template>
</el-table-column>
<el-table-column label="生产管理部核实情况(份数)" prop="submit_by_production_dept">
<template #default="{ row }">
<el-input v-model="row.submit_by_production_dept" type="number" />
</template>
</el-table-column>
</el-table>
</div>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<supervision_project @customEvent="customEvent"></supervision_project>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="supervisionProjectDataArchivingEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiSupervisionProjectDataArchivingAdd, apiSupervisionProjectDataArchivingEdit, apiSupervisionProjectDataArchivingDetail, apisupervision_project_data_archiving_detail, apisupervision_project_data_archiving_detail_delete } from '@/api/supervision_project_data_archiving'
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: "",
opinion: '',
remark: '',
"detail": [
{
"data_catalog": "",
"submit_by_project_dept": "",
"submit_by_production_dept": ""
}
]
})
const handleAdd = () => {
formData.detail.push({
"data_catalog": "",
"submit_by_project_dept": "",
"submit_by_production_dept": ""
})
}
const handleDelete = async (row: any) => {
if (row.id) {
await apisupervision_project_data_archiving_detail_delete({ id: row.id })
}
const index = formData.detail.indexOf(row);
formData.detail.splice(index, 1);
}
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',
trigger: ['blur']
}],
opinion: [{
required: true,
message: '请输入项目总监意见',
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]
}
}
let res = await apisupervision_project_data_archiving_detail({ data_archiving_id: formData.id })
formData.detail = res.lists
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiSupervisionProjectDataArchivingDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiSupervisionProjectDataArchivingEdit(data)
: await apiSupervisionProjectDataArchivingAdd(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>

View File

@ -0,0 +1,116 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="项目总监意见" prop="opinion">
<el-input class="w-[280px]" v-model="queryParams.opinion" 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_ending.supervision_project_data_archiving/add']" type="primary"
@click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['supervision_ending.supervision_project_data_archiving/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="opinion" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" 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_ending.supervision_project_data_archiving/edit']"
type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['supervision_ending.supervision_project_data_archiving/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="supervisionProjectDataArchivingLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiSupervisionProjectDataArchivingLists, apiSupervisionProjectDataArchivingDelete, apiSupervisionProjectDataArchivingDetail } from '@/api/supervision_project_data_archiving'
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: '',
opinion: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiSupervisionProjectDataArchivingLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
let res = await apiSupervisionProjectDataArchivingDetail({ 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 apiSupervisionProjectDataArchivingDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -0,0 +1,153 @@
<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_name">
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目"
@click="showDialog = true" />
</el-form-item>
<el-form-item label="文档名称" prop="title">
<el-input v-model="formData.title" clearable placeholder="请输入文档名称" />
</el-form-item>
<el-form-item label="文档简介" prop="content">
<el-input v-model="formData.content" clearable placeholder="请输入文档简介" />
</el-form-item>
<el-form-item label="附件" prop="annex">
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
@delFile="delFileFn" />
</el-form-item>
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<supervision_project @customEvent="customEvent"></supervision_project>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="supervisionProjectOwnerEvaluationEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiSupervisionProjectOwnerEvaluationAdd, apiSupervisionProjectOwnerEvaluationEdit, apiSupervisionProjectOwnerEvaluationDetail } from '@/api/supervision_project_owner_evaluation'
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: "",
title: '',
content: '',
annex: [],
create_user: '',
})
const handleAvatarSuccess_four = (response: any) => {
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 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',
trigger: ['blur']
}],
title: [{
required: true,
message: '请输入文档名称',
trigger: ['blur']
}],
content: [{
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 apiSupervisionProjectOwnerEvaluationDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiSupervisionProjectOwnerEvaluationEdit(data)
: await apiSupervisionProjectOwnerEvaluationAdd(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>

View File

@ -0,0 +1,118 @@
<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="title">
<el-input class="w-[280px]" v-model="queryParams.title" 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_ending.supervision_project_owner_evaluation/add']" type="primary"
@click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['supervision_ending.supervision_project_owner_evaluation/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="title" show-overflow-tooltip />
<el-table-column label="文档简介" prop="content" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-perms="['supervision_ending.supervision_project_owner_evaluation/edit']"
type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['supervision_ending.supervision_project_owner_evaluation/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="supervisionProjectOwnerEvaluationLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiSupervisionProjectOwnerEvaluationLists, apiSupervisionProjectOwnerEvaluationDelete, apiSupervisionProjectOwnerEvaluationDetail } from '@/api/supervision_project_owner_evaluation'
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: '',
title: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiSupervisionProjectOwnerEvaluationLists,
params: queryParams
})
//
const handleAdd = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('add')
}
//
const handleEdit = async (data: any) => {
let res = await apiSupervisionProjectOwnerEvaluationDetail({ 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 apiSupervisionProjectOwnerEvaluationDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -0,0 +1,158 @@
<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="120px" :rules="formRules">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目"
@click="showDialog = true" />
</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="dept">
<el-input v-model="formData.dept" clearable placeholder="请输入部门" />
</el-form-item>
<el-form-item label="项目调入时间" prop="start_time">
<el-date-picker class="flex-1 !flex" v-model="formData.start_time" clearable
value-format="YYYY-MM-DD " placeholder="选择项目调入时间">
</el-date-picker>
</el-form-item>
<el-form-item label="项目调出时间" prop="end_time">
<el-date-picker class="flex-1 !flex" v-model="formData.end_time" clearable
value-format="YYYY-MM-DD " placeholder="选择项目调出时间">
</el-date-picker>
</el-form-item>
<el-form-item label="负责岗位" prop="job">
<el-input v-model="formData.job" clearable placeholder="请输入负责岗位" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
</el-form-item>
</el-form>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<supervision_project @customEvent="customEvent"></supervision_project>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="supervisionProjectPersonnelEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiSupervisionProjectPersonnelAdd, apiSupervisionProjectPersonnelEdit, apiSupervisionProjectPersonnelDetail } from '@/api/supervision_project_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 showDialog = ref(false)
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑工程监理--人员管理明细' : '新增工程监理--人员管理明细'
})
//
const formData = reactive({
id: '',
project_id: '',
project_name: "",
name: '',
dept: '',
start_time: '',
end_time: '',
job: '',
remark: '',
})
//
const formRules = reactive<any>({
project_id: [{
required: true,
message: '请输入项目id',
trigger: ['blur']
}],
name: [{
required: true,
message: '请输入姓名',
trigger: ['blur']
}],
start_time: [{
required: true,
message: '请输入项目调入时间',
trigger: ['blur']
}],
end_time: [{
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 customEvent = (e) => {
formData.project_id = e.id
formData.project_name = e.project_name
showDialog.value = false
}
const getDetail = async (row: Record<string, any>) => {
const data = await apiSupervisionProjectPersonnelDetail({
id: row.id
})
setFormData(data)
}
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiSupervisionProjectPersonnelEdit(data)
: await apiSupervisionProjectPersonnelAdd(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>

View 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="name">
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="部门" prop="dept">
<el-input class="w-[280px]" v-model="queryParams.dept" clearable placeholder="请输入部门" />
</el-form-item>
<el-form-item label="负责岗位" prop="job">
<el-input class="w-[280px]" v-model="queryParams.job" 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_team.supervision_project_personnel/add']" type="primary"
@click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['supervision_team.supervision_project_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_name" show-overflow-tooltip />
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
<el-table-column label="部门" prop="dept" show-overflow-tooltip />
<el-table-column label="项目调入时间" prop="start_time" show-overflow-tooltip />
<el-table-column label="项目调出时间" prop="end_time" show-overflow-tooltip />
<el-table-column label="负责岗位" prop="job" 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_team.supervision_project_personnel/edit']" type="primary"
link @click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['supervision_team.supervision_project_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="supervisionProjectPersonnelLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiSupervisionProjectPersonnelLists, apiSupervisionProjectPersonnelDelete } from '@/api/supervision_project_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: '',
dept: '',
job: ''
})
//
const selectData = ref<any[]>([])
//
const handleSelectionChange = (val: any[]) => {
selectData.value = val.map(({ id }) => id)
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiSupervisionProjectPersonnelLists,
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 apiSupervisionProjectPersonnelDelete({ id })
getLists()
}
getLists()
</script>

View File

@ -1,6 +1,7 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="单据编号" prop="num">
<el-input v-model="formData.num" clearable placeholder="系统自动生成" disabled />
@ -46,6 +47,7 @@
</template>
</el-table-column>
<el-table-column label="任务名称" prop="task_name" width="200px">
<template #default="scope">
<el-input v-model="scope.row.task_name" readonly
@click="showDialog1 = true, tableIndex = scope.$index" placeholder="点击选择"
@ -53,63 +55,73 @@
</template>
</el-table-column>
<el-table-column label="任务次级" prop="level" width="200px">
<template #default="{ row }">
<el-input v-model="row.level" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="工序" prop="process" width="200px">
<template #default="{ row }">
<el-input v-model="row.process" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="任务类型" prop="task_type_id" width="200px">
<template #default="{ row }">
<el-select class="flex-1" v-model="row.task_type_id" clearable placeholder="请选择任务类型"
:disabled="mode != 'add'">
<el-option v-for="(item, index) in dictData.task_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
<el-option v-for="(item, index) in dictData.task_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</template>
</el-table-column>
<el-table-column label="专业类型" prop="professional_type" width="200px">
<template #default="{ row }">
<el-select class="flex-1" v-model="row.professional_type" clearable placeholder="请选择专业类型"
:disabled="mode != 'add'">
<el-option v-for="(item, index) in dictData.major_type" :key="index" :label="item.name"
:value="item.value" />
<el-select class="flex-1" v-model="row.professional_type" clearable
placeholder="请选择专业类型" :disabled="mode != 'add'">
<el-option v-for="(item, index) in dictData.major_type" :key="index"
:label="item.name" :value="item.value" />
</el-select>
</template>
</el-table-column>
<el-table-column label="工程师" prop="engineer" width="200px">
<template #default="scope">
<el-input v-model="scope.row.engineer" :disabled="mode != 'add'"
@click="userclick(scope.$index, 'engineer')" />
</template>
</el-table-column>
<el-table-column label="一级审核人" prop="first_reviewer" width="200px">
<template #default="scope">
<el-input v-model="scope.row.first_reviewer" :disabled="mode != 'add'"
@click="userclick(scope.$index, 'first_reviewer')" />
</template>
</el-table-column>
<el-table-column label="二级审核人" prop="secondary_reviewer" width="200px">
<template #default="scope">
<el-input v-model="scope.row.secondary_reviewer" :disabled="mode != 'add'"
@click="userclick(scope.$index, 'secondary_reviewer')" />
</template>
</el-table-column>
<el-table-column label="三级审核人" prop="third_level_reviewer" width="200px">
<template #default="scope">
<el-input v-model="scope.row.third_level_reviewer" :disabled="mode != 'add'"
@click="userclick(scope.$index, 'third_level_reviewer')" />
</template>
</el-table-column>
<el-table-column label="天数" prop="days" width="200px">
<template #default="{ row }">
<el-input v-model="row.days" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="开始日期" prop="start_date" width="220px">
<template #default="{ row }">
<el-date-picker v-model="row.start_date" clearable type="date" value-format="YYYY-MM-DD"
:disabled="mode != 'add'" placeholder="请选择日期">
@ -117,6 +129,7 @@
</template>
</el-table-column>
<el-table-column label="结束日期" prop="end_date" width="220px">
<template #default="{ row }">
<el-date-picker v-model="row.end_date" clearable type="date" value-format="YYYY-MM-DD"
:disabled="mode != 'add'" placeholder="请选择日期">
@ -124,42 +137,52 @@
</template>
</el-table-column>
<el-table-column label="中标金额(元)" prop="bid_winning_amount" width="200px">
<template #default="{ row }">
<el-input v-model="row.bid_winning_amount" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="送审造价(元)" prop="cost" width="200px">
<template #default="{ row }">
<el-input v-model="row.cost" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="第三方核定金额(元)" prop="approved_amount" width="200px">
<template #default="{ row }">
<el-input v-model="row.approved_amount" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="施工单位" prop="construction_unit" width="200px">
<template #default="{ row }">
<el-input v-model="row.construction_unit" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="联系人" prop="contact" width="200px">
<template #default="{ row }">
<el-input v-model="row.contact" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="联系电话" prop="contact_phone" width="200px">
<template #default="{ row }">
<el-input v-model="row.contact_phone" :disabled="mode != 'add'" />
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="200px">
<template #default="{ row }">
<el-input v-model="row.remark" :disabled="mode != 'add'" />
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</popup>
</div>