This commit is contained in:
zmj 2024-03-11 18:04:05 +08:00
parent 2217f5c813
commit 49f1f1f72b
11 changed files with 583 additions and 261 deletions

View File

@ -23,4 +23,22 @@ export function apiConsultNewStartProjectDelete(params: any) {
// 项目咨询--新开工项目管理详情
export function apiConsultNewStartProjectDetail(params: any) {
return request.get({ url: '/consult_basic.consult_new_start_project/detail', params })
}
}
// 项目咨询--新开工项目管理详情
export function apiconsult_project_evolve(params: any) {
return request.get({ url: '/consult_basic.consult_project_evolve/lists', params })
}
// 项目咨询--新开工项目管理详情
export function apiconsult_project_evolve_delete(params: any) {
return request.post({ url: '/consult_basic.consult_project_evolve/delete', params })
}
export function apiconsult_project_preparation(params: any) {
return request.get({ url: '/consult_basic.consult_project_preparation/lists', params })
}
export function apiconsult_project_preparation_delete(params: any) {
return request.post({ url: '/consult_basic.consult_project_preparation/delete', params })
}

View File

@ -23,6 +23,7 @@ import { apiCostApprovedProjectLists } from '@/api/cost_approved_project'
import { apiCostProjectLists } from '@/api/cost_project'
import { apiTaskTypeLists } from '@/api/task_type'
import {apiSupervisionMaterialEquipmentInfoLists}from "@/api/supervision_material_equipment_info"
import { apiConsultProjectLists} from '@/api/consult_project'
@ -364,6 +365,32 @@ export const task_type:Iconfig = {
]
}
export const consult_project:Iconfig = {
fetchFn: apiConsultProjectLists,
dictData:"",
serchList: [
{
label: '项目名称',
value: "project_name"
},
{
label:"项目编号",
value:'project_code',
},
],
tableList: [
{ project_name: "项目名称" },
{ project_code: "项目编号" },
{ company: "委托单位" },
{ total_investment: "总投资" },
{ contract: "关联合同" },
{ engineering_status_text: "工程状态" },
{ consult_type_text: "咨询类型" },
{ supervision_department: "监管部门" },
{ implementation_department: "实施部门" },
{ project_manager: "项目负责人员" },
]
}

View File

@ -23,11 +23,16 @@
</el-dropdown>
</div>
</template>
<script setup lang="ts">
import useMultipleTabs from "@/hooks/useMultipleTabs";
import { useWatchRoute } from "@/hooks/useWatchRoute";
import useTabsStore, { getRouteParams } from "@/stores/modules/multipleTabs";
import useSettingStore from '@/stores/modules/setting'
const settingStore = useSettingStore()
const themeColor = computed(() => settingStore.theme || '#4A5DFF')
const router = useRouter();
const route = useRoute();
const tabsStore = useTabsStore();
@ -43,10 +48,7 @@ useWatchRoute(() => {
addTab();
});
const handleChange = (fullPath: any) => {
const tabItem = tabsStore.tasMap[fullPath];
router.push(getRouteParams(tabItem));
};
const handleChanges = (fullPath: any) => {
const tabItem = tabsStore.tasMap[fullPath];
router.push(getRouteParams(tabItem));
@ -83,6 +85,8 @@ const handleCommand = (command: any) => {
break;
}
};
// console.log(useSetting, 'useSetting')
</script>
<style lang="scss" scoped>
.menu {
@ -100,17 +104,16 @@ const handleCommand = (command: any) => {
.act {
background-color: #edefff;
color: rgb(128, 142, 255);
color: v-bind(themeColor);
}
.dot {
display: inline-block;
width: 5px;
height: 5px;
background-color: #4a5dff;
background-color: v-bind(themeColor);
border-radius: 5px;
margin-right: 5px;
// font-size: 30px;
}
</style>
</style>

View File

@ -24,18 +24,13 @@ const { menuList, menuIndex, handleAddMenu } = useMenuOa(useMenuOa)
<template v-for="(menuItem, i) in menuList" :key="i">
<div class="relative flex-1" @click="menuIndex = i">
<!-- 一级菜单 -->
<div
class="flex items-center justify-center flex-1 text-sm oa-phone-menu-item"
:class="{ 'active-menu': menuIndex === i }"
>
<div class="flex items-center justify-center flex-1 text-sm oa-phone-menu-item"
:class="{ 'active-menu': menuIndex === i }">
{{ menuItem.name }}
</div>
<!-- 二级菜单 -->
<div
class="oa-phone-menu-subitem"
v-show="menuItem.sub_button.length && menuItem.has_menu"
>
<div class="oa-phone-menu-subitem" v-show="menuItem.sub_button.length && menuItem.has_menu">
<template v-for="(subItem, index2) in menuItem.sub_button" :key="index2">
<div class="oa-phone-menu-subitem-title">
{{ subItem.name }}
@ -62,6 +57,7 @@ const { menuList, menuIndex, handleAddMenu } = useMenuOa(useMenuOa)
height: 461px;
border: 1px solid #e5e5ea;
flex: none;
&-content {
height: 420px;
border-bottom: 1px solid #e5e5ea;

View File

@ -1,84 +1,204 @@
<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="address">
<el-input v-model="formData.address" clearable placeholder="请输入工程地点" />
</el-form-item>
<el-form-item label="服务范围" prop="service_scope">
<el-input v-model="formData.service_scope" clearable placeholder="请输入服务范围" />
</el-form-item>
<el-form-item label="建筑面积" prop="area">
<el-input v-model="formData.area" clearable placeholder="请输入建筑面积" />
</el-form-item>
<el-form-item label="投资(万元)" prop="invest">
<el-input v-model="formData.invest" clearable placeholder="请输入投资(万元)" />
</el-form-item>
<el-form-item label="基础类型" prop="basic_type">
<el-input v-model="formData.basic_type" clearable placeholder="请输入基础类型" />
</el-form-item>
<el-form-item label="工期" prop="duration">
<el-input v-model="formData.duration" clearable placeholder="请输入工期" />
</el-form-item>
<el-form-item label="结构类型" prop="structure_type">
<el-input v-model="formData.structure_type" clearable placeholder="请输入结构类型" />
</el-form-item>
<el-form-item label="地上层数" prop="land_floors">
<el-input v-model="formData.land_floors" clearable placeholder="请输入地上层数" />
</el-form-item>
<el-form-item label="地下层数" prop="underground_floors">
<el-input v-model="formData.underground_floors" clearable placeholder="请输入地下层数" />
</el-form-item>
<el-form-item label="业主单位" prop="owner_unit">
<el-input v-model="formData.owner_unit" clearable placeholder="请输入业主单位" />
</el-form-item>
<el-form-item label="业主单位联系人及电话" prop="owner_unit_contact">
<el-input v-model="formData.owner_unit_contact" clearable placeholder="请输入业主单位联系人及电话" />
</el-form-item>
<el-form-item label="设计单位" prop="design_unit">
<el-input v-model="formData.design_unit" clearable placeholder="请输入设计单位" />
</el-form-item>
<el-form-item label="设计单位联系人及电话" prop="design_unit_contact">
<el-input v-model="formData.design_unit_contact" clearable placeholder="请输入设计单位联系人及电话" />
</el-form-item>
<el-form-item label="勘察单位" prop="survey_unit">
<el-input v-model="formData.survey_unit" clearable placeholder="请输入勘察单位" />
</el-form-item>
<el-form-item label="勘察单位联系人及电话" prop="survey_unit_contact">
<el-input v-model="formData.survey_unit_contact" clearable placeholder="请输入勘察单位联系人及电话" />
</el-form-item>
<el-form-item label="施工单位" prop="build_unit">
<el-input v-model="formData.build_unit" clearable placeholder="请输入施工单位" />
</el-form-item>
<el-form-item label="施工单位联系人及电话" prop="build_unit_contact">
<el-input v-model="formData.build_unit_contact" clearable placeholder="请输入施工单位联系人及电话" />
</el-form-item>
<el-form-item label="项目经理" prop="project_manager">
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目经理" />
</el-form-item>
<el-form-item label="项目副经理" prop="deputy_project_manager">
<el-input v-model="formData.deputy_project_manager" clearable placeholder="请输入项目副经理" />
</el-form-item>
<el-form-item label="专业工程师" prop="engineer">
<el-input v-model="formData.engineer" 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="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入填表人" />
</el-form-item>
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="190px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目"
@click="showDialog = true" readonly />
</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="service_scope">
<el-input v-model="formData.service_scope" clearable placeholder="请输入服务范围" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建筑面积" prop="area">
<el-input v-model="formData.area" clearable placeholder="请输入建筑面积" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="投资(万元)" prop="invest">
<el-input v-model="formData.invest" clearable placeholder="请输入投资(万元)" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="基础类型">
<el-input v-model="formData.basic_type" clearable placeholder="请输入基础类型" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工期">
<el-input v-model="formData.duration" clearable placeholder="请输入工期" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结构类型">
<el-input v-model="formData.structure_type" clearable placeholder="请输入结构类型" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="地上层数">
<el-input v-model="formData.land_floors" clearable placeholder="请输入地上层数" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="地下层数">
<el-input v-model="formData.underground_floors" clearable placeholder="请输入地下层数"
type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业主单位">
<el-input v-model="formData.owner_unit" clearable placeholder="请输入业主单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业主单位联系人及电话">
<el-input v-model="formData.owner_unit_contact" clearable placeholder="请输入业主单位联系人及电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="设计单位">
<el-input v-model="formData.design_unit" clearable placeholder="请输入设计单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="设计单位联系人及电话">
<el-input v-model="formData.design_unit_contact" clearable placeholder="请输入设计单位联系人及电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="勘察单位">
<el-input v-model="formData.survey_unit" clearable placeholder="请输入勘察单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="勘察单位联系人及电话">
<el-input v-model="formData.survey_unit_contact" clearable placeholder="请输入勘察单位联系人及电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="施工单位">
<el-input v-model="formData.build_unit" clearable placeholder="请输入施工单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="施工单位联系人及电话">
<el-input v-model="formData.build_unit_contact" clearable placeholder="请输入施工单位联系人及电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目经理">
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目经理" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目副经理">
<el-input v-model="formData.deputy_project_manager" clearable placeholder="请输入项目副经理" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="专业工程师">
<el-input v-model="formData.engineer" clearable placeholder="请输入专业工程师" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="其他事项情况说明">
<el-input v-model="formData.content" clearable placeholder="请输入其他事项情况说明" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="填表人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入填表人" />
</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" placeholder="选择创建时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
项目组工作开展情况
<el-button @click="handleAdd()" v-if="!formData.evolve.length">+</el-button>
</div>
<div style="margin-bottom: 30px;">
<el-table :data="formData.evolve">
<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="name">
<template #default="scope">
<el-input v-model="scope.row.name" />
</template>
</el-table-column>
<el-table-column label="进展状态" prop="progress_status">
<template #default="{ row }">
<el-input v-model="row.progress_status" />
</template>
</el-table-column>
<el-table-column label="项目组跟踪责任人" prop="resp_user">
<template #default="{ row }">
<el-input v-model="row.resp_user" />
</template>
</el-table-column>
</el-table>
</div>
<div>
项目组后勤准备工作
<el-button @click="handleAdd1" v-if="!formData.preparation.length">+</el-button>
</div>
<div style="margin-bottom: 30px;">
<el-table :data="formData.preparation">
<el-table-column label="序号" width="150px">
<template #default="{ row }">
<el-button @click="handleAdd1">+</el-button>
<el-button @click="handleDelete1(row)">-</el-button>
</template>
</el-table-column>
<el-table-column label="名称" prop="name">
<template #default="scope">
<el-input v-model="scope.row.name" />
</template>
</el-table-column>
<el-table-column label="进展状态" prop="progress_status">
<template #default="{ row }">
<el-input v-model="row.progress_status" />
</template>
</el-table-column>
<el-table-column label="项目组跟踪责任人" prop="resp_user">
<template #default="{ row }">
<el-input v-model="row.resp_user" />
</template>
</el-table-column>
</el-table>
</div>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<dialogTable @customEvent="customEvent" :config="consult_project" />
</el-dialog>
</popup>
</div>
</template>
@ -86,9 +206,15 @@
<script lang="ts" setup name="consultNewStartProjectEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiConsultNewStartProjectAdd, apiConsultNewStartProjectEdit, apiConsultNewStartProjectDetail } from '@/api/consult_new_start_project'
import { apiConsultNewStartProjectAdd, apiConsultNewStartProjectEdit, apiConsultNewStartProjectDetail, apiconsult_project_evolve, apiconsult_project_evolve_delete, apiconsult_project_preparation, apiconsult_project_preparation_delete } from '@/api/consult_new_start_project'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { consult_project } from "@/components/dialogTable/dialogTableConfig"
import useUserStore from "@/stores/modules/user";
const userStore = useUserStore().userInfo;
const showDialog = ref(false)
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -110,6 +236,7 @@ const popupTitle = computed(() => {
const formData = reactive({
id: '',
project_id: '',
project_name: '',
address: '',
service_scope: '',
area: '',
@ -131,10 +258,67 @@ const formData = reactive({
deputy_project_manager: '',
engineer: '',
content: '',
create_user: '',
create_user: userStore.account,
create_time: timeFormat('', 'yyyy-mm-dd hh:MM:ss'),
"evolve": [
{
"name": "",
"progress_status": "",
"resp_user": ""
},
],
"preparation": [
{
"name": "",
"progress_status": "",
"resp_user": ""
},
]
})
const handleAdd = () => {
formData.evolve.push({
"name": "",
"progress_status": "",
"resp_user": ""
})
}
const handleDelete = async (row: any) => {
if (row.id) {
await apiconsult_project_evolve_delete({ id: row.id })
}
const index = formData.evolve.indexOf(row);
formData.evolve.splice(index, 1);
}
const handleAdd1 = () => {
formData.preparation.push({
"name": "",
"progress_status": "",
"resp_user": ""
})
}
const handleDelete1 = async (row: any) => {
if (row.id) {
await apiconsult_project_preparation_delete({ id: row.id })
}
const index = formData.preparation.indexOf(row);
formData.preparation.splice(index, 1);
}
const customEvent = (e: any) => {
formData.project_id = e.id
formData.project_name = e.project_name
showDialog.value = false
}
//
const formRules = reactive<any>({
project_id: [{
@ -263,8 +447,11 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
let res1 = await apiconsult_project_evolve({ new_start_project_id: formData.id })
formData.evolve = res1.lists
let res2 = await apiconsult_project_preparation({ new_start_project_id: formData.id })
formData.preparation = res2.lists
}
const getDetail = async (row: Record<string, any>) => {
@ -278,9 +465,9 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiConsultNewStartProjectEdit(data)
const data = { ...formData, }
mode.value == 'edit'
? await apiConsultNewStartProjectEdit(data)
: await apiConsultNewStartProjectAdd(data)
popupRef.value?.close()
emit('success')

View File

@ -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="address">
<el-input class="w-[280px]" v-model="queryParams.address" clearable placeholder="请输入工程地点" />
</el-form-item>
@ -34,17 +27,14 @@
</template>
新增
</el-button>
<el-button
v-perms="['consult_basic.consult_new_start_project/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['consult_basic.consult_new_start_project/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="address" show-overflow-tooltip />
<el-table-column label="服务范围" prop="service_scope" show-overflow-tooltip />
<el-table-column label="建筑面积" prop="area" show-overflow-tooltip />
@ -53,20 +43,12 @@
<el-table-column label="工期" prop="duration" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['consult_basic.consult_new_start_project/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['consult_basic.consult_new_start_project/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['consult_basic.consult_new_start_project/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['consult_basic.consult_new_start_project/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
</template>
@ -84,7 +66,7 @@
<script lang="ts" setup name="consultNewStartProjectLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiConsultNewStartProjectLists, apiConsultNewStartProjectDelete } from '@/api/consult_new_start_project'
import { apiConsultNewStartProjectLists, apiConsultNewStartProjectDelete, apiConsultNewStartProjectDetail } from '@/api/consult_new_start_project'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
@ -129,10 +111,11 @@ const handleAdd = async () => {
//
const handleEdit = async (data: any) => {
let res = await apiConsultNewStartProjectDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
editRef.value?.setFormData(res)
}
//
@ -144,4 +127,3 @@ const handleDelete = async (id: number | any[]) => {
getLists()
</script>

View File

@ -1,101 +1,208 @@
<template>
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
<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="project_name">
<el-input v-model="formData.project_name" clearable placeholder="请输入项目名称" />
</el-form-item>
<el-form-item label="项目编号" prop="project_code">
<el-input v-model="formData.project_code" clearable placeholder="请输入项目编号" />
</el-form-item>
<el-form-item label="行业" prop="industry">
<el-input v-model="formData.industry" clearable placeholder="请输入行业" />
</el-form-item>
<el-form-item label="性质" prop="nature">
<el-input v-model="formData.nature" clearable placeholder="请输入性质" />
</el-form-item>
<el-form-item label="委托单位" prop="company">
<el-input v-model="formData.company" clearable placeholder="请输入委托单位" />
</el-form-item>
<el-form-item label="建设区域" prop="build_area">
<el-input v-model="formData.build_area" clearable placeholder="请输入建设区域" />
</el-form-item>
<el-form-item label="项目地址" prop="address">
<el-input v-model="formData.address" clearable placeholder="请输入项目地址" />
</el-form-item>
<el-form-item label="项目级别" prop="project_level">
<el-input v-model="formData.project_level" clearable placeholder="请输入项目级别" />
</el-form-item>
<el-form-item label="总投资(万元)" prop="total_investment">
<el-input v-model="formData.total_investment" clearable placeholder="请输入总投资(万元)" />
</el-form-item>
<el-form-item label="立项日期" prop="initiation_date">
<el-input v-model="formData.initiation_date" clearable placeholder="请输入立项日期" />
</el-form-item>
<el-form-item label="关联合同" prop="contract">
<el-input v-model="formData.contract" clearable placeholder="请输入关联合同" />
</el-form-item>
<el-form-item label="合同金额" prop="contract_amount">
<el-input v-model="formData.contract_amount" clearable placeholder="请输入合同金额" />
</el-form-item>
<el-form-item label="合同服务内容" prop="contract_content">
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容" />
</el-form-item>
<el-form-item label="项目规模及概况" prop="project_overview">
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目规模及概况" />
</el-form-item>
<el-form-item label="咨询范围" prop="consult_content">
<el-input v-model="formData.consult_content" clearable placeholder="请输入咨询范围" />
</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="consult_start_date">
<el-input v-model="formData.consult_start_date" clearable placeholder="请输入咨询开始日期" />
</el-form-item>
<el-form-item label="咨询结束日期" prop="consult_end_date">
<el-input v-model="formData.consult_end_date" clearable placeholder="请输入咨询结束日期" />
</el-form-item>
<el-form-item label="工程状态" prop="engineering_status">
<el-input v-model="formData.engineering_status" clearable placeholder="请输入工程状态" />
</el-form-item>
<el-form-item label="咨询类型" prop="consult_type">
<el-input v-model="formData.consult_type" clearable placeholder="请输入咨询类型" />
</el-form-item>
<el-form-item label="联系电话" prop="telephone">
<el-input v-model="formData.telephone" clearable placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="委托联系人" prop="consult_user">
<el-input v-model="formData.consult_user" clearable placeholder="请输入委托联系人" />
</el-form-item>
<el-form-item label="监管部门" prop="supervision_department">
<el-input v-model="formData.supervision_department" clearable placeholder="请输入监管部门" />
</el-form-item>
<el-form-item label="实施部门" prop="implementation_department">
<el-input v-model="formData.implementation_department" clearable placeholder="请输入实施部门" />
</el-form-item>
<el-form-item label="项目部" prop="project_department">
<el-input v-model="formData.project_department" clearable placeholder="请输入项目部" />
</el-form-item>
<el-form-item label="项目负责人员" prop="project_manager">
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目负责人员" />
</el-form-item>
<el-form-item label="甲方单位" prop="part_a_unit">
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位" />
</el-form-item>
<el-form-item label="项目归档" prop="project_archiving">
<el-input v-model="formData.project_archiving" clearable placeholder="请输入项目归档" />
</el-form-item>
<el-form-item label="归档目录" prop="archiving_directory">
<el-input v-model="formData.archiving_directory" 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 ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<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="项目编号">
<el-input v-model="formData.project_code" clearable placeholder="系统自动生成" disabled />
</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.supervision_project_industry" :key="index"
:label="item.name" :value="item.value" />
</el-select>
</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="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="委托单位">
<el-input v-model="formData.company" clearable placeholder="请输入委托单位" />
</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="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目地址">
<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="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="立项日期">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable
value-format="YYYY-MM-DD" placeholder="选择咨询结束日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联合同">
<el-input v-model="formData.contract" clearable placeholder="请输入关联合同" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同金额">
<el-input v-model="formData.contract_amount" clearable placeholder="请输入合同金额"
type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同服务内容">
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目规模及概况">
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目规模及概况" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="咨询范围">
<el-input v-model="formData.consult_content" clearable placeholder="请输入咨询范围" />
</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="咨询开始日期">
<el-date-picker class="flex-1 !flex" v-model="formData.consult_start_date" clearable
value-format="YYYY-MM-DD" placeholder="选择咨询开始日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="咨询结束日期">
<el-date-picker class="flex-1 !flex" v-model="formData.consult_end_date" clearable
value-format="YYYY-MM-DD" placeholder="选择咨询结束日期">
</el-date-picker>
</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="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="咨询类型" prop="consult_type">
<el-select class="flex-1" v-model="formData.consult_type" clearable placeholder="请选择建设区域">
<el-option v-for="(item, index) in dictData.consult_type" :key="index"
:label="item.name" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话">
<el-input v-model="formData.telephone" clearable placeholder="请输入联系电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="委托联系人">
<el-input v-model="formData.consult_user" clearable placeholder="请输入委托联系人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="监管部门">
<el-input v-model="formData.supervision_department" clearable placeholder="请输入监管部门" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实施部门">
<el-input v-model="formData.implementation_department" clearable placeholder="请输入实施部门" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目部">
<el-input v-model="formData.project_department" clearable placeholder="请输入项目部" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目负责人员">
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目负责人员" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="甲方单位">
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目归档">
<el-checkbox-group v-model="formData.project_archiving">
<el-checkbox :label="item.value" :key="i"
v-for="(item, i) in dictData.project_archiving">
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归档目录">
<el-input v-model="formData.archiving_directory" clearable placeholder="请输入归档目录" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附件">
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
@delFile="delFileFn" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入创建人" />
</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" placeholder="选择创建时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</popup>
</div>
@ -107,6 +214,9 @@ import Popup from '@/components/popup/index.vue'
import { apiConsultProjectAdd, apiConsultProjectEdit, apiConsultProjectDetail } from '@/api/consult_project'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import useUserStore from "@/stores/modules/user";
const userStore = useUserStore().userInfo;
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -154,12 +264,21 @@ const formData = reactive({
project_department: '',
project_manager: '',
part_a_unit: '',
project_archiving: '',
project_archiving: [],
archiving_directory: '',
annex: '',
create_user: '',
annex: [],
create_user: userStore.account,
create_time: timeFormat('', 'yyyy-mm-dd hh:MM:ss'),
})
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>({
@ -320,6 +439,11 @@ const setFormData = async (data: Record<any, any>) => {
}
}
let toStringList = ['industry', 'nature', 'build_area', 'project_level', 'engineering_status', 'consult_type']
toStringList.forEach(item => {
formData[item] = String(formData[item])
})
}

View File

@ -1,11 +1,7 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="项目名称" prop="project_name">
<el-input class="w-[280px]" v-model="queryParams.project_name" clearable placeholder="请输入项目名称" />
</el-form-item>
@ -31,11 +27,8 @@
</template>
新增
</el-button>
<el-button
v-perms="['consult_basic.consult_project/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['consult_basic.consult_project/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -46,27 +39,19 @@
<el-table-column label="委托单位" prop="company" show-overflow-tooltip />
<el-table-column label="总投资(万元)" prop="total_investment" show-overflow-tooltip />
<el-table-column label="关联合同" prop="contract" show-overflow-tooltip />
<el-table-column label="工程状态" prop="engineering_status" show-overflow-tooltip />
<el-table-column label="咨询类型" prop="consult_type" show-overflow-tooltip />
<el-table-column label="工程状态" prop="engineering_status_text" show-overflow-tooltip />
<el-table-column label="咨询类型" prop="consult_type_text" show-overflow-tooltip />
<el-table-column label="监管部门" prop="supervision_department" show-overflow-tooltip />
<el-table-column label="实施部门" prop="implementation_department" show-overflow-tooltip />
<el-table-column label="项目负责人员" prop="project_manager" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['consult_basic.consult_project/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['consult_basic.consult_project/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['consult_basic.consult_project/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['consult_basic.consult_project/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
</template>
@ -84,7 +69,7 @@
<script lang="ts" setup name="consultProjectLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiConsultProjectLists, apiConsultProjectDelete } from '@/api/consult_project'
import { apiConsultProjectLists, apiConsultProjectDelete, apiConsultProjectDetail } from '@/api/consult_project'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
@ -111,7 +96,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('')
const { dictData } = useDictData('supervision_project_industry,const_area,supervision_project_nature,supervision_project_level,engineering_status,consult_type,project_archiving')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
@ -128,10 +113,11 @@ const handleAdd = async () => {
//
const handleEdit = async (data: any) => {
let res = await apiConsultProjectDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
editRef.value?.setFormData(res)
}
//
@ -143,4 +129,3 @@ const handleDelete = async (id: number | any[]) => {
getLists()
</script>

View File

@ -25,7 +25,7 @@
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
<el-table-column label="合同名称" prop="cost_project_contract" show-overflow-tooltip />
<el-table-column label="所属部门" prop="depar" show-overflow-tooltip />
<el-table-column label="项目负责人" prop="" show-overflow-tooltip />
<el-table-column label="项目负责人" prop="principal" show-overflow-tooltip />
<el-table-column label="开票金额" prop="has_invoice_amount" show-overflow-tooltip />
<el-table-column label="收款金额" prop="amount_Collected" show-overflow-tooltip />
</el-table>

View File

@ -31,7 +31,7 @@ var option: any;
var myChart: any
const chartWitdth = ref(500)
const chartHeight = ref(800)
const chartHeight = ref(500)
const chartType = ref(3)
const chartTypeList = reactive([
{

View File

@ -35,7 +35,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
<el-input v-model="formData.check_remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">