优化了表格及路由功能,提升了用户体验,提高了操作效率。

This commit is contained in:
zmj 2024-06-03 11:50:15 +08:00
parent 01679da86e
commit cde45cf5ee
5 changed files with 233 additions and 742 deletions

View File

@ -1,204 +1,68 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-card>
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="考核类别" prop="type">
<el-select class="flex-1" v-model="formData.type" clearable placeholder="请选择考核类别">
<el-option v-for="(item, index) in dictData.jxgl_check_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模版名称" prop="name">
<el-input v-model="formData.name" clearable placeholder="请输入模版名称" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="industry">
<el-input v-model="formData.admin_user" readonly />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<el-row>
<el-col :span="8">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="请输入项目名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性质" prop="nature">
<el-select class="flex-1" v-model="formData.nature" clearable placeholder="请选择性质">
<el-option v-for="(item, index) in dictData.supervision_project_nature" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="行业" prop="industry">
<el-select class="flex-1" v-model="formData.industry" clearable placeholder="请选择行业">
<el-option v-for="(item, index) in dictData.industry" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设单位" prop="build_unit">
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位"
@click="showDialog1 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设区域" prop="build_area">
<el-select class="flex-1" v-model="formData.build_area" clearable placeholder="请选择建设区域">
<el-option v-for="(item, index) in dictData.const_area" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目地址" prop="address">
<el-input v-model="formData.address" clearable placeholder="请输入项目地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目级别" prop="project_level">
<el-select class="flex-1" v-model="formData.project_level" clearable placeholder="请选择项目级别">
<el-option v-for="(item, index) in dictData.supervision_project_level" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总投资(元)" prop="total_investment">
<el-input v-model="formData.total_investment" clearable placeholder="请输入总投资(元)" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工程状态" prop="engineering_status">
<el-select class="flex-1" v-model="formData.engineering_status" clearable placeholder="请选择工程状态">
<el-option v-for="(item, index) in dictData.engineering_status" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同服务内容" prop="contract_content">
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容"
type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目概况" prop="project_overview">
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目概况" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目要求" prop="project_requirements">
<el-input v-model="formData.project_requirements" clearable placeholder="请输入项目要求" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开工日期" prop="planned_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划竣工日期" prop="planned_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际开工日期" prop="actual_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际竣工日期" prop="actual_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实施部门" prop="implementation_department">
<el-select v-model="formData.implementation_department" placeholder="请选择实施部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="监管部门" prop="supervision_department">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目经理" prop="project_manager">
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目经理"
@click="userclick('project_manager')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="立项日期" prop="initiation_date">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目负责人" prop="project_leader">
<el-input v-model="formData.project_leader_name" clearable placeholder="请输入项目负责人"
@click="userclick('project_leader')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目部" prop="project_department">
<el-select v-model="formData.project_department" placeholder="请选择项目部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联合同" prop="contract">
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" v-type="'code'" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="甲方单位" prop="part_a_unit">
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位"
@click="showDialog2 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="create_user">
<el-input v-model="formData.create_user" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="create_time">
<el-date-picker class="flex-1 !flex" v-model="formData.create_time" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附件" prop="annex">
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
</el-col>
<el-table :data="formData.detail">
<template #empty>
暂无数据点击 <el-button @click="handleAdd" size="small">添加</el-button>
</template>
<el-table-column label="考核项" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入考核项" />
</template>
</el-table-column>
<el-table-column label="分数" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入分数" />
</template>
</el-table-column>
<el-table-column label="考核说明" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入考核说明" />
</template>
</el-table-column>
<el-table-column label="操作" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-button @click="handleAdd" size="small">+</el-button>
<el-button @click="handleAdd" size="small">-</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-form>
<div v-if="showDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
<el-dialog v-model="showDialog1" title="选择建设单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent1"> </dialogTable>
</el-dialog>
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent2"> </dialogTable>
</el-dialog>
</el-card>
<el-card>
<el-descriptions :column="3" border>
<el-descriptions-item label="考核总分" label-align="left" align="left">
{ formData.org_name }
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
@ -219,16 +83,14 @@ defineProps({
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
},
deptList: Array
})
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 showDialog2 = ref(false)
const personnel = ref(null)
const useStore = useUserStore().userInfo
//
const popupTitle = computed(() => {
@ -238,39 +100,17 @@ const popupTitle = computed(() => {
//
const formData = reactive({
id: '',
project_name: '',
nature: '',
industry: '',
build_unit: '',
build_unit_name: '',
build_area: '',
address: '',
project_level: '',
total_investment: '',
engineering_status: '',
contract_content: '',
project_overview: '',
project_requirements: '',
planned_start_date: '',
planned_end_date: '',
actual_start_date: '',
actual_end_date: '',
implementation_department: '',
supervision_department: '',
project_manager: '',
project_manager_name: '',
initiation_date: '',
project_leader: '',
project_leader_name: '',
project_department: '',
remark: '',
contract: '',
contract_name: '',
part_a_unit: '',
part_a: '',
annex: [],
name: '',
admin: useStore.id,
admin_user: useStore.name,
detail: []
})
const handleAdd = () => {
formData.detail.push({})
}
//
@ -332,21 +172,6 @@ const handleClose = () => {
}
let value
const userclick = async (val) => {
showDialog.value = true
value = val
await nextTick()
personnel.value.open()
}
const submituser = (e: any) => {
formData[value + '_name'] = e.name
formData[value] = e.id
showDialog.value = false
}
defineExpose({
open,
setFormData,

View File

@ -1,204 +1,68 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-card>
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="考核类别" prop="type">
<el-select class="flex-1" v-model="formData.type" clearable placeholder="请选择考核类别">
<el-option v-for="(item, index) in dictData.jxgl_check_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模版名称" prop="name">
<el-input v-model="formData.name" clearable placeholder="请输入模版名称" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="industry">
<el-input v-model="formData.admin_user" readonly />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<el-row>
<el-col :span="8">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="请输入项目名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性质" prop="nature">
<el-select class="flex-1" v-model="formData.nature" clearable placeholder="请选择性质">
<el-option v-for="(item, index) in dictData.supervision_project_nature" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="行业" prop="industry">
<el-select class="flex-1" v-model="formData.industry" clearable placeholder="请选择行业">
<el-option v-for="(item, index) in dictData.industry" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设单位" prop="build_unit">
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位"
@click="showDialog1 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设区域" prop="build_area">
<el-select class="flex-1" v-model="formData.build_area" clearable placeholder="请选择建设区域">
<el-option v-for="(item, index) in dictData.const_area" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目地址" prop="address">
<el-input v-model="formData.address" clearable placeholder="请输入项目地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目级别" prop="project_level">
<el-select class="flex-1" v-model="formData.project_level" clearable placeholder="请选择项目级别">
<el-option v-for="(item, index) in dictData.supervision_project_level" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总投资(元)" prop="total_investment">
<el-input v-model="formData.total_investment" clearable placeholder="请输入总投资(元)" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工程状态" prop="engineering_status">
<el-select class="flex-1" v-model="formData.engineering_status" clearable placeholder="请选择工程状态">
<el-option v-for="(item, index) in dictData.engineering_status" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同服务内容" prop="contract_content">
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容"
type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目概况" prop="project_overview">
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目概况" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目要求" prop="project_requirements">
<el-input v-model="formData.project_requirements" clearable placeholder="请输入项目要求" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开工日期" prop="planned_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划竣工日期" prop="planned_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际开工日期" prop="actual_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际竣工日期" prop="actual_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实施部门" prop="implementation_department">
<el-select v-model="formData.implementation_department" placeholder="请选择实施部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="监管部门" prop="supervision_department">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目经理" prop="project_manager">
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目经理"
@click="userclick('project_manager')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="立项日期" prop="initiation_date">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目负责人" prop="project_leader">
<el-input v-model="formData.project_leader_name" clearable placeholder="请输入项目负责人"
@click="userclick('project_leader')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目部" prop="project_department">
<el-select v-model="formData.project_department" placeholder="请选择项目部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联合同" prop="contract">
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" v-type="'code'" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="甲方单位" prop="part_a_unit">
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位"
@click="showDialog2 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="create_user">
<el-input v-model="formData.create_user" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="create_time">
<el-date-picker class="flex-1 !flex" v-model="formData.create_time" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附件" prop="annex">
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
</el-col>
<el-table :data="formData.detail">
<template #empty>
暂无数据点击 <el-button @click="handleAdd" size="small">添加</el-button>
</template>
<el-table-column label="考核项" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入考核项" />
</template>
</el-table-column>
<el-table-column label="分数" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入分数" />
</template>
</el-table-column>
<el-table-column label="考核说明" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入考核说明" />
</template>
</el-table-column>
<el-table-column label="操作" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-button @click="handleAdd" size="small">+</el-button>
<el-button @click="handleAdd" size="small">-</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-form>
<div v-if="showDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
<el-dialog v-model="showDialog1" title="选择建设单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent1"> </dialogTable>
</el-dialog>
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent2"> </dialogTable>
</el-dialog>
</el-card>
<el-card>
<el-descriptions :column="3" border>
<el-descriptions-item label="考核总分" label-align="left" align="left">
{ formData.org_name }
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
@ -219,16 +83,14 @@ defineProps({
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
},
deptList: Array
})
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 showDialog2 = ref(false)
const personnel = ref(null)
const useStore = useUserStore().userInfo
//
const popupTitle = computed(() => {
@ -238,39 +100,17 @@ const popupTitle = computed(() => {
//
const formData = reactive({
id: '',
project_name: '',
nature: '',
industry: '',
build_unit: '',
build_unit_name: '',
build_area: '',
address: '',
project_level: '',
total_investment: '',
engineering_status: '',
contract_content: '',
project_overview: '',
project_requirements: '',
planned_start_date: '',
planned_end_date: '',
actual_start_date: '',
actual_end_date: '',
implementation_department: '',
supervision_department: '',
project_manager: '',
project_manager_name: '',
initiation_date: '',
project_leader: '',
project_leader_name: '',
project_department: '',
remark: '',
contract: '',
contract_name: '',
part_a_unit: '',
part_a: '',
annex: [],
name: '',
admin: useStore.id,
admin_user: useStore.name,
detail: []
})
const handleAdd = () => {
formData.detail.push({})
}
//
@ -332,21 +172,6 @@ const handleClose = () => {
}
let value
const userclick = async (val) => {
showDialog.value = true
value = val
await nextTick()
personnel.value.open()
}
const submituser = (e: any) => {
formData[value + '_name'] = e.name
formData[value] = e.id
showDialog.value = false
}
defineExpose({
open,
setFormData,

View File

@ -66,7 +66,7 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="success()"
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="showEdit = false"
:deptList="deptList" />
</div>
@ -109,7 +109,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('supervision_project_nature,industry,const_area,supervision_project_level,engineering_status')
const { dictData } = useDictData('jxgl_check_type')
//
const { pager, getLists, resetParams, resetPage } = usePaging({

View File

@ -1,204 +1,83 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-card>
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="自评人" prop="industry">
<el-input v-model="formData.admin_user" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="考核类别" prop="type">
<el-select class="flex-1" v-model="formData.type" clearable placeholder="请选择考核类别">
<el-option v-for="(item, index) in dictData.jxgl_check_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模版名称" prop="name">
<el-input v-model="formData.name" clearable placeholder="请输入模版名称" readonly
:disabled="!formData.type" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="考核月份" prop="name">
<el-date-picker v-model="formData.month" type="month" value-format="YYYY-MM"
placeholder="请选择考核月份" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<el-row>
<el-col :span="8">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="请输入项目名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性质" prop="nature">
<el-select class="flex-1" v-model="formData.nature" clearable placeholder="请选择性质">
<el-option v-for="(item, index) in dictData.supervision_project_nature" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="行业" prop="industry">
<el-select class="flex-1" v-model="formData.industry" clearable placeholder="请选择行业">
<el-option v-for="(item, index) in dictData.industry" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设单位" prop="build_unit">
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位"
@click="showDialog1 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设区域" prop="build_area">
<el-select class="flex-1" v-model="formData.build_area" clearable placeholder="请选择建设区域">
<el-option v-for="(item, index) in dictData.const_area" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目地址" prop="address">
<el-input v-model="formData.address" clearable placeholder="请输入项目地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目级别" prop="project_level">
<el-select class="flex-1" v-model="formData.project_level" clearable placeholder="请选择项目级别">
<el-option v-for="(item, index) in dictData.supervision_project_level" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总投资(元)" prop="total_investment">
<el-input v-model="formData.total_investment" clearable placeholder="请输入总投资(元)" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工程状态" prop="engineering_status">
<el-select class="flex-1" v-model="formData.engineering_status" clearable placeholder="请选择工程状态">
<el-option v-for="(item, index) in dictData.engineering_status" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同服务内容" prop="contract_content">
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容"
type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目概况" prop="project_overview">
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目概况" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目要求" prop="project_requirements">
<el-input v-model="formData.project_requirements" clearable placeholder="请输入项目要求" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开工日期" prop="planned_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划竣工日期" prop="planned_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际开工日期" prop="actual_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际竣工日期" prop="actual_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实施部门" prop="implementation_department">
<el-select v-model="formData.implementation_department" placeholder="请选择实施部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="监管部门" prop="supervision_department">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目经理" prop="project_manager">
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目经理"
@click="userclick('project_manager')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="立项日期" prop="initiation_date">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目负责人" prop="project_leader">
<el-input v-model="formData.project_leader_name" clearable placeholder="请输入项目负责人"
@click="userclick('project_leader')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目部" prop="project_department">
<el-select v-model="formData.project_department" placeholder="请选择项目部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联合同" prop="contract">
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" v-type="'code'" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="甲方单位" prop="part_a_unit">
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位"
@click="showDialog2 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="create_user">
<el-input v-model="formData.create_user" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="create_time">
<el-date-picker class="flex-1 !flex" v-model="formData.create_time" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附件" prop="annex">
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
</el-col>
<el-table :data="formData.detail">
<template #empty>
暂无数据点击 <el-button @click="handleAdd" size="small">添加</el-button>
</template>
<el-table-column label="考核项" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入考核项" />
</template>
</el-table-column>
<el-table-column label="分数" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入分数" />
</template>
</el-table-column>
<el-table-column label="考核说明" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入考核说明" />
</template>
</el-table-column>
<el-table-column label="自评得分" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-input v-model="row.admin_user" placeholder="请输入自评得分" />
</template>
</el-table-column>
<el-table-column label="操作" prop="progress" show-overflow-tooltip>
<template #default="{ row }">
<el-button @click="handleAdd" size="small">+</el-button>
<el-button @click="handleAdd" size="small">-</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-form>
<div v-if="showDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
<el-dialog v-model="showDialog1" title="选择建设单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent1"> </dialogTable>
</el-dialog>
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent2"> </dialogTable>
</el-dialog>
</el-card>
<el-card>
<el-descriptions :column="3" border>
<el-descriptions-item label="考核总分" label-align="left" align="left">
{ formData.org_name }
</el-descriptions-item>
<el-descriptions-item label="自评得分" label-align="left" align="left">
{ formData.org_name }
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
</template>
@ -219,16 +98,14 @@ defineProps({
type: Object as PropType<Record<string, any[]>>,
default: () => ({})
},
deptList: Array
})
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 showDialog2 = ref(false)
const personnel = ref(null)
const useStore = useUserStore().userInfo
//
const popupTitle = computed(() => {
@ -238,39 +115,18 @@ const popupTitle = computed(() => {
//
const formData = reactive({
id: '',
project_name: '',
nature: '',
industry: '',
build_unit: '',
build_unit_name: '',
build_area: '',
address: '',
project_level: '',
total_investment: '',
engineering_status: '',
contract_content: '',
project_overview: '',
project_requirements: '',
planned_start_date: '',
planned_end_date: '',
actual_start_date: '',
actual_end_date: '',
implementation_department: '',
supervision_department: '',
project_manager: '',
project_manager_name: '',
initiation_date: '',
project_leader: '',
project_leader_name: '',
project_department: '',
remark: '',
contract: '',
contract_name: '',
part_a_unit: '',
part_a: '',
annex: [],
name: '',
admin: useStore.id,
admin_user: useStore.name,
month: "",
detail: []
})
const handleAdd = () => {
formData.detail.push({})
}
//
@ -332,21 +188,6 @@ const handleClose = () => {
}
let value
const userclick = async (val) => {
showDialog.value = true
value = val
await nextTick()
personnel.value.open()
}
const submituser = (e: any) => {
formData[value + '_name'] = e.name
formData[value] = e.id
showDialog.value = false
}
defineExpose({
open,
setFormData,

View File

@ -71,7 +71,7 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="success()"
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="showEdit = false"
:deptList="deptList" />
</div>
@ -114,7 +114,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('supervision_project_nature,industry,const_area,supervision_project_level,engineering_status')
const { dictData } = useDictData('jxgl_check_type')
//
const { pager, getLists, resetParams, resetPage } = usePaging({