标书材料生成 国网模板接口调试完成

This commit is contained in:
BianLzhaoMin 2025-04-28 18:02:33 +08:00
parent bf98af0358
commit e85ba62ec8
6 changed files with 732 additions and 226 deletions

View File

@ -16,10 +16,11 @@ export function getKeyPersonListAPI() {
})
}
// 关键人员下拉数据 (分包商管理人员)
export function getSubKeyPersonListAPI() {
export function getSubKeyPersonListAPI(data) {
return request({
url: '/tbSubPeople/getTbSubPeopleAll',
method: 'get',
params: data,
})
}
// 分包商下拉数据

View File

@ -0,0 +1,47 @@
import request from '@/utils/request'
// 标书材料生成 ---- 国网模板
// 获取国网模板列表
export function getGwTemplateListAPI(data) {
return request({
url: '/stateGrid/getStateGridList',
method: 'get',
params: data,
})
}
// 根据id获取国网模板详情
export function getGwTemplateByIdAPI(data) {
return request({
url: '/stateGrid/getStateGridTempById',
method: 'post',
data: data,
})
}
// 新增国网模板
export function addGwTemplateAPI(data) {
return request({
url: '/stateGrid/addStateGridTemp',
method: 'post',
data: data,
})
}
// 编辑国网模板
export function editGwTemplateAPI(data) {
return request({
url: '/stateGrid/updateStateGridTemp',
method: 'post',
data: data,
})
}
// 删除国网模板
export function deleteGwTemplateAPI(data) {
return request({
url: '/stateGrid/delStateGridTemp',
method: 'post',
data: data,
})
}

View File

@ -10,6 +10,14 @@ export function getSubPerformanceManageListAPI(data) {
params: data,
})
}
// 根据人员id查询分包业绩管理列表
export function getSubPerformanceManageListByPersonIdAPI(data) {
return request({
url: '/tbSubPerf/getTbSubPerfListByPersonId',
method: 'get',
params: data,
})
}
// 新增分包业绩管理
export function addSubPerformanceManageAPI(data) {

View File

@ -1,23 +1,32 @@
<template>
<!-- 公司业绩管理 -->
<div class="app-container">
<el-form :model="queryParam" ref="login" label-width="0px" class="ms-content">
<el-form :model="queryParams" ref="login" label-width="0px" class="ms-content">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item>
<el-input v-model="queryParam.projectName" placeholder="请输入标书名称" clearable> </el-input>
<el-input v-model="queryParams.name" placeholder="请输入标书名称" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input v-model="queryParam.projectName" placeholder="请输入职称" clearable> </el-input>
<el-date-picker
clearable
type="daterange"
style="width: 100%"
v-model="timeValue"
range-separator="至"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
start-placeholder="开始日期"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<el-button type="primary">查询</el-button>
<el-button>重置</el-button>
<el-button type="primary" @click="getGwTemplateList">查询</el-button>
<el-button @click="resetQueryParams">重置</el-button>
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)">新增</el-button>
</el-form-item>
</el-col>
@ -76,9 +85,16 @@
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getGwTemplateList"
/>
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
<template slot="outerContent">
<AddAndEditForm :formType="formType" @closeDialogOuter="closeDialogOuter" />
<AddAndEditForm :formType="formType" :queryId="queryId" @closeDialogOuter="closeDialogOuter" />
</template>
</DialogModel>
</div>
@ -87,6 +103,7 @@
<script>
import DialogModel from '@/components/DialogModel/index'
import AddAndEditForm from './components/addAndEditForm.vue'
import { getGwTemplateListAPI, deleteGwTemplateAPI } from '@/api/data-create/gw-template'
export default {
components: {
DialogModel,
@ -95,49 +112,50 @@ export default {
data() {
return {
formType: 1, // 1 2 3
total: 0,
queryId: '', // id
dialogConfig: {
outerTitle: '新增',
outerTitle: '新增国网模板',
innerTitle: false,
outerWidth: '80%',
outerVisible: false,
innerVisible: false,
},
queryParam: {
projectName: '',
startTime: '',
endTime: '',
queryParams: {
name: '',
startDate: '',
endDate: '',
pageNum: 1,
pageSize: 10,
},
timeValue: [],
tableList: [
{
projectName: '测试工程1',
},
{
projectName: '测试工程2',
},
{
projectName: '测试工程3',
},
],
tableList: [],
tableColumn: [
{ label: '标书名称', prop: 'projectName' },
{ label: '创建人', prop: '' },
{ label: '创建时间', prop: '' },
{ label: '标书名称', prop: 'name' },
{ label: '创建人', prop: 'createUser' },
{ label: '创建时间', prop: 'createTime' },
],
}
},
methods: {
//
closeDialogOuter() {
closeDialogOuter(isRefresh = false) {
this.dialogConfig.outerVisible = false
if (isRefresh) {
this.getGwTemplateList()
}
},
//
onHandleDelete(row) {
console.log(row)
this.$modal
.confirm('确定删除该业绩吗?')
.then(() => {
console.log('确定')
.then(async () => {
const res = await deleteGwTemplateAPI({ id: row.id })
if (res.code == 200) {
this.$message.success('删除成功')
this.getGwTemplateList()
}
})
.catch(() => {
console.log('取消')
@ -145,16 +163,16 @@ export default {
},
//
onHandleAddOrEdit(row, type) {
console.log(row, type)
this.formType = type
if (type === 1) {
this.dialogConfig.outerTitle = '新增人员'
this.formType = 1
this.dialogConfig.outerTitle = '新增国网模板'
this.queryId = ''
} else if (type === 3) {
this.dialogConfig.outerTitle = '编辑人员'
this.formType = 3
this.dialogConfig.outerTitle = '编辑国网模板'
this.queryId = row.id
} else if (type === 2) {
this.dialogConfig.outerTitle = '人员详情'
this.formType = 2
this.dialogConfig.outerTitle = '国网模板详情'
this.queryId = row.id
}
this.dialogConfig.outerVisible = true
@ -163,6 +181,32 @@ export default {
onHandleDownload(row) {
console.log(row)
},
//
async getGwTemplateList() {
if (this.timeValue && this.timeValue.length > 0) {
this.queryParams.startDate = this.timeValue[0]
this.queryParams.endDate = this.timeValue[1]
} else {
this.queryParams.startDate = ''
this.queryParams.endDate = ''
}
const res = await getGwTemplateListAPI(this.queryParams)
this.tableList = res.rows
this.total = res.total
console.log(res, 'res')
},
//
resetQueryParams() {
this.timeValue = []
this.queryParams.name = ''
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.getGwTemplateList()
},
},
created() {
this.getGwTemplateList()
},
}
</script>

View File

@ -70,7 +70,7 @@
<el-row :gutter="20">
<el-col :span="24">
<div style="display: flex; align-items: center; padding: 8px 0">
<div> 项目关键人员 </div>
<div>分包人员 </div>
<el-button icon="el-icon-circle-plus" type="text" @click="onHandleAdd" v-if="formType !== 2">
添加
</el-button>