修改EPC、南网标书模板

This commit is contained in:
BianLzhaoMin 2025-06-17 13:38:47 +08:00
parent 2bec785617
commit 0c5066d196
10 changed files with 4707 additions and 635 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,219 @@
<template>
<!-- EPC模板 -->
<div class="app-container">
<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="queryParams.name" placeholder="请输入标书名称" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<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" @click="getEpcTemplateList">查询</el-button>
<el-button @click="resetQueryParams">重置</el-button>
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['epc:template:add']">
新增
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="tableList" stripe style="width: 100%">
<el-table-column label="序号" width="55" type="index" align="center" />
<el-table-column
:key="index"
align="center"
:prop="item.prop"
:label="item.label"
show-overflow-tooltip
v-for="(item, index) in tableColumn"
/>
<el-table-column label="操作" width="auto" align="center">
<template #default="{ row }">
<el-button
style="color: #67c23a"
icon="el-icon-view"
type="text"
size="mini"
@click="onHandleAddOrEdit(row, 2)"
>
详情
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-download"
style="color: #d140ff"
@click="onHandleDownload(row)"
v-hasPermi="['epc:template:download']"
>
下载
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
style="color: #409eff"
@click="onHandleAddOrEdit(row, 3)"
v-hasPermi="['epc:template:edit']"
>
编辑
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
style="color: #f56c6c"
@click="onHandleDelete(row)"
v-hasPermi="['epc:template:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getEpcTemplateList"
/>
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
<template slot="outerContent">
<AddAndEditForm :formType="formType" :queryId="queryId" @closeDialogOuter="closeDialogOuter" />
</template>
</DialogModel>
</div>
</template>
<script>
import DialogModel from '@/components/DialogModel/index'
import AddAndEditForm from './components/addAndEditForm.vue'
import { getEpcTemplateListAPI, deleteEpcTemplateAPI } from '@/api/data-create/epc-template'
export default {
components: {
DialogModel,
AddAndEditForm,
},
data() {
return {
formType: 1, // 1 2 3
total: 0,
queryId: '', // id
dialogConfig: {
outerTitle: '新增EPC模板',
innerTitle: false,
outerWidth: '80%',
outerVisible: false,
innerVisible: false,
},
queryParams: {
name: '',
startDate: '',
endDate: '',
pageNum: 1,
pageSize: 10,
},
timeValue: [],
tableList: [],
tableColumn: [
{ label: '标书名称', prop: 'name' },
{ label: '创建人', prop: 'createUser' },
{ label: '创建时间', prop: 'createTime' },
],
}
},
methods: {
//
closeDialogOuter(isRefresh = false) {
this.dialogConfig.outerVisible = false
if (isRefresh) {
this.getEpcTemplateList()
}
},
//
onHandleDelete(row) {
this.$modal
.confirm('确定删除该模板吗?')
.then(async () => {
const res = await deleteEpcTemplateAPI({ id: row.id })
if (res.code == 200) {
this.$message.success('删除成功')
this.getEpcTemplateList()
}
})
.catch(() => {})
},
//
onHandleAddOrEdit(row, type) {
this.formType = type
if (type === 1) {
this.dialogConfig.outerTitle = '新增EPC模板'
this.queryId = ''
} else if (type === 3) {
this.dialogConfig.outerTitle = '编辑EPC模板'
this.queryId = row.id
} else if (type === 2) {
this.dialogConfig.outerTitle = 'EPC模板详情'
this.queryId = row.id
}
this.dialogConfig.outerVisible = true
},
//
onHandleDownload(row) {
this.downloadNew(
'/epc/downloadEpcTemp',
{
id: row.id,
},
`EPC模板_${row.name}.doc`,
)
},
// EPC
async getEpcTemplateList() {
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 getEpcTemplateListAPI(this.queryParams)
this.tableList = res.rows
this.total = res.total
},
//
resetQueryParams() {
this.timeValue = []
this.queryParams.name = ''
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.getEpcTemplateList()
},
},
created() {
this.getEpcTemplateList()
},
}
</script>

View File

@ -1,5 +1,5 @@
<template>
<!-- EPC模板 -->
<!-- EPC模板 -->
<div class="app-container">
<el-form :model="queryParams" ref="login" label-width="0px" class="ms-content">
<el-row :gutter="20">
@ -25,9 +25,9 @@
<el-col :span="12">
<el-form-item>
<el-button type="primary" @click="getEpcTemplateList">查询</el-button>
<el-button type="primary" @click="getGwTemplateList">查询</el-button>
<el-button @click="resetQueryParams">重置</el-button>
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['epc:template:add']">
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['gw:template:add']">
新增
</el-button>
</el-form-item>
@ -58,32 +58,32 @@
详情
</el-button>
<el-button
style="color: #d140ff"
icon="el-icon-download"
type="text"
size="mini"
icon="el-icon-download"
style="color: #d140ff"
@click="onHandleDownload(row)"
v-hasPermi="['epc:template:download']"
v-hasPermi="['gw:template:download']"
>
下载
</el-button>
<el-button
style="color: #409eff"
icon="el-icon-edit"
type="text"
size="mini"
icon="el-icon-edit"
style="color: #409eff"
@click="onHandleAddOrEdit(row, 3)"
v-hasPermi="['epc:template:edit']"
v-hasPermi="['gw:template:edit']"
>
编辑
</el-button>
<el-button
style="color: #f56c6c"
icon="el-icon-delete"
type="text"
size="mini"
icon="el-icon-delete"
style="color: #f56c6c"
@click="onHandleDelete(row)"
v-hasPermi="['epc:template:delete']"
v-hasPermi="['gw:template:delete']"
>
删除
</el-button>
@ -95,7 +95,7 @@
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getEpcTemplateList"
@pagination="getGwTemplateList"
/>
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
<template slot="outerContent">
@ -108,7 +108,7 @@
<script>
import DialogModel from '@/components/DialogModel/index'
import AddAndEditForm from './components/addAndEditForm.vue'
import { getEpcTemplateListAPI, deleteEpcTemplateAPI } from '@/api/data-create/epc-template'
import { getGwTemplateListAPI, deleteGwTemplateAPI, downloadGwTemplateByIdAPI } from '@/api/data-create/gw-template'
export default {
components: {
DialogModel,
@ -120,7 +120,7 @@ export default {
total: 0,
queryId: '', // id
dialogConfig: {
outerTitle: '新增EPC模板',
outerTitle: '新增国网模板',
innerTitle: false,
outerWidth: '80%',
outerVisible: false,
@ -132,6 +132,7 @@ export default {
endDate: '',
pageNum: 1,
pageSize: 10,
type: 2,
},
timeValue: [],
tableList: [],
@ -147,7 +148,7 @@ export default {
closeDialogOuter(isRefresh = false) {
this.dialogConfig.outerVisible = false
if (isRefresh) {
this.getEpcTemplateList()
this.getGwTemplateList()
}
},
//
@ -155,10 +156,10 @@ export default {
this.$modal
.confirm('确定删除该模板吗?')
.then(async () => {
const res = await deleteEpcTemplateAPI({ id: row.id })
const res = await deleteGwTemplateAPI({ id: row.id })
if (res.code == 200) {
this.$message.success('删除成功')
this.getEpcTemplateList()
this.getGwTemplateList()
}
})
.catch(() => {})
@ -167,31 +168,47 @@ export default {
onHandleAddOrEdit(row, type) {
this.formType = type
if (type === 1) {
this.dialogConfig.outerTitle = '新增EPC模板'
this.dialogConfig.outerTitle = '新增国网模板'
this.queryId = ''
} else if (type === 3) {
this.dialogConfig.outerTitle = '编辑EPC模板'
this.dialogConfig.outerTitle = '编辑国网模板'
this.queryId = row.id
} else if (type === 2) {
this.dialogConfig.outerTitle = 'EPC模板详情'
this.dialogConfig.outerTitle = '国网模板详情'
this.queryId = row.id
}
this.dialogConfig.outerVisible = true
},
//
onHandleDownload(row) {
this.downloadNew(
'/epc/downloadEpcTemp',
{
id: row.id,
},
`EPC模板_${row.name}.doc`,
)
async onHandleDownload(row) {
// downloadStateGridTemp
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
// console.log(res, '')
this.$confirm('请选择下载的模板类型?', '温馨提示', {
distinguishCancelAndClose: true,
confirmButtonText: '表格下载',
cancelButtonText: '普通下载',
})
.then(() => {
//
this.downloadNew(
'/stateGrid/downloadStateGridTemp',
{
id: row.id,
},
`国网模板_${row.name}.doc`,
)
})
.catch((action) => {
//
})
},
// EPC
async getEpcTemplateList() {
//
async getGwTemplateList() {
if (this.timeValue && this.timeValue.length > 0) {
this.queryParams.startDate = this.timeValue[0]
this.queryParams.endDate = this.timeValue[1]
@ -199,7 +216,7 @@ export default {
this.queryParams.startDate = ''
this.queryParams.endDate = ''
}
const res = await getEpcTemplateListAPI(this.queryParams)
const res = await getGwTemplateListAPI(this.queryParams)
this.tableList = res.rows
this.total = res.total
},
@ -209,11 +226,11 @@ export default {
this.queryParams.name = ''
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.getEpcTemplateList()
this.getGwTemplateList()
},
},
created() {
this.getEpcTemplateList()
this.getGwTemplateList()
},
}
</script>

View File

@ -832,7 +832,8 @@ export default {
comPerfList: [], //
comCoreList: [], //
comOtherList: [], //
subList: [], //
subList: [], // ,
type: 1, // type 1. 2. EPC 3.
}
let isError = false

View File

@ -132,6 +132,7 @@ export default {
endDate: '',
pageNum: 1,
pageSize: 10,
type: 1,
},
timeValue: [],
tableList: [],
@ -185,13 +186,25 @@ export default {
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
// console.log(res, '')
this.downloadNew(
'/stateGrid/downloadStateGridTemp',
{
id: row.id,
},
`国网模板_${row.name}.doc`,
)
this.$confirm('请选择下载的模板类型?', '温馨提示', {
distinguishCancelAndClose: true,
confirmButtonText: '表格下载',
cancelButtonText: '普通下载',
})
.then(() => {
//
this.downloadNew(
'/stateGrid/downloadStateGridTemp',
{
id: row.id,
},
`国网模板_${row.name}.doc`,
)
})
.catch((action) => {
//
})
},
//

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,219 @@
<template>
<!-- 南网模板 -->
<div class="app-container">
<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="queryParams.name" placeholder="请输入标书名称" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<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" @click="getNwTemplateList">查询</el-button>
<el-button @click="resetQueryParams">重置</el-button>
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['nw:template:add']">
新增
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="tableList" stripe style="width: 100%">
<el-table-column label="序号" width="55" type="index" align="center" />
<el-table-column
:key="index"
align="center"
:prop="item.prop"
:label="item.label"
show-overflow-tooltip
v-for="(item, index) in tableColumn"
/>
<el-table-column label="操作" width="auto" align="center">
<template #default="{ row }">
<el-button
type="text"
size="mini"
icon="el-icon-view"
style="color: #67c23a"
@click="onHandleAddOrEdit(row, 2)"
>
详情
</el-button>
<el-button
type="text"
size="mini"
style="color: #d140ff"
icon="el-icon-download"
@click="onHandleDownload(row)"
v-hasPermi="['nw:template:download']"
>
下载
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
style="color: #409eff"
@click="onHandleAddOrEdit(row, 3)"
v-hasPermi="['nw:template:edit']"
>
编辑
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-delete"
style="color: #f56c6c"
@click="onHandleDelete(row)"
v-hasPermi="['nw:template:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:total="total"
@pagination="getNwTemplateList"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
/>
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
<template slot="outerContent">
<AddAndEditForm :formType="formType" :queryId="queryId" @closeDialogOuter="closeDialogOuter" />
</template>
</DialogModel>
</div>
</template>
<script>
import DialogModel from '@/components/DialogModel/index'
import AddAndEditForm from './components/addAndEditForm.vue'
import { getNwTemplateListAPI, deleteNwTemplateAPI } from '@/api/data-create/nw-template'
export default {
components: {
DialogModel,
AddAndEditForm,
},
data() {
return {
formType: 1, // 1 2 3
total: 0,
queryId: '', // id
dialogConfig: {
outerTitle: '新增南网模板',
innerTitle: false,
outerWidth: '80%',
outerVisible: false,
innerVisible: false,
},
queryParams: {
name: '',
startDate: '',
endDate: '',
pageNum: 1,
pageSize: 10,
},
timeValue: [],
tableList: [],
tableColumn: [
{ label: '标书名称', prop: 'name' },
{ label: '创建人', prop: 'createUser' },
{ label: '创建时间', prop: 'createTime' },
],
}
},
methods: {
//
closeDialogOuter(isRefresh = false) {
this.dialogConfig.outerVisible = false
if (isRefresh) {
this.getNwTemplateList()
}
},
//
onHandleDelete(row) {
this.$modal
.confirm('确定删除该模板吗?')
.then(async () => {
const res = await deleteNwTemplateAPI({ id: row.id })
if (res.code == 200) {
this.$message.success('删除成功')
this.getNwTemplateList()
}
})
.catch(() => {})
},
//
onHandleAddOrEdit(row, type) {
this.formType = type
if (type === 1) {
this.dialogConfig.outerTitle = '新增南网模板'
this.queryId = ''
} else if (type === 3) {
this.dialogConfig.outerTitle = '编辑南网模板'
this.queryId = row.id
} else if (type === 2) {
this.dialogConfig.outerTitle = '南网模板详情'
this.queryId = row.id
}
this.dialogConfig.outerVisible = true
},
//
onHandleDownload(row) {
this.downloadNew(
'/south/downloadSouthTemp',
{
id: row.id,
},
`南网模板_${row.name}.doc`,
)
},
// NW
async getNwTemplateList() {
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 getNwTemplateListAPI(this.queryParams)
this.tableList = res.rows
this.total = res.total
},
//
resetQueryParams() {
this.timeValue = []
this.queryParams.name = ''
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.getNwTemplateList()
},
},
created() {
this.getNwTemplateList()
},
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template>
<!-- 南网模板 -->
<!-- 南网模板 -->
<div class="app-container">
<el-form :model="queryParams" ref="login" label-width="0px" class="ms-content">
<el-row :gutter="20">
@ -25,9 +25,9 @@
<el-col :span="12">
<el-form-item>
<el-button type="primary" @click="getNwTemplateList">查询</el-button>
<el-button type="primary" @click="getGwTemplateList">查询</el-button>
<el-button @click="resetQueryParams">重置</el-button>
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['nw:template:add']">
<el-button type="primary" @click="onHandleAddOrEdit(null, 1)" v-hasPermi="['gw:template:add']">
新增
</el-button>
</el-form-item>
@ -49,41 +49,41 @@
<el-table-column label="操作" width="auto" align="center">
<template #default="{ row }">
<el-button
style="color: #67c23a"
icon="el-icon-view"
type="text"
size="mini"
icon="el-icon-view"
style="color: #67c23a"
@click="onHandleAddOrEdit(row, 2)"
>
详情
</el-button>
<el-button
type="text"
size="mini"
style="color: #d140ff"
icon="el-icon-download"
type="text"
size="mini"
@click="onHandleDownload(row)"
v-hasPermi="['nw:template:download']"
v-hasPermi="['gw:template:download']"
>
下载
</el-button>
<el-button
style="color: #409eff"
icon="el-icon-edit"
type="text"
size="mini"
icon="el-icon-edit"
style="color: #409eff"
@click="onHandleAddOrEdit(row, 3)"
v-hasPermi="['nw:template:edit']"
v-hasPermi="['gw:template:edit']"
>
编辑
</el-button>
<el-button
style="color: #f56c6c"
icon="el-icon-delete"
type="text"
size="mini"
icon="el-icon-delete"
style="color: #f56c6c"
@click="onHandleDelete(row)"
v-hasPermi="['nw:template:delete']"
v-hasPermi="['gw:template:delete']"
>
删除
</el-button>
@ -93,9 +93,9 @@
<pagination
:total="total"
@pagination="getNwTemplateList"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getGwTemplateList"
/>
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
<template slot="outerContent">
@ -108,7 +108,7 @@
<script>
import DialogModel from '@/components/DialogModel/index'
import AddAndEditForm from './components/addAndEditForm.vue'
import { getNwTemplateListAPI, deleteNwTemplateAPI } from '@/api/data-create/nw-template'
import { getGwTemplateListAPI, deleteGwTemplateAPI, downloadGwTemplateByIdAPI } from '@/api/data-create/gw-template'
export default {
components: {
DialogModel,
@ -120,7 +120,7 @@ export default {
total: 0,
queryId: '', // id
dialogConfig: {
outerTitle: '新增网模板',
outerTitle: '新增网模板',
innerTitle: false,
outerWidth: '80%',
outerVisible: false,
@ -132,6 +132,7 @@ export default {
endDate: '',
pageNum: 1,
pageSize: 10,
type: 3,
},
timeValue: [],
tableList: [],
@ -147,7 +148,7 @@ export default {
closeDialogOuter(isRefresh = false) {
this.dialogConfig.outerVisible = false
if (isRefresh) {
this.getNwTemplateList()
this.getGwTemplateList()
}
},
//
@ -155,10 +156,10 @@ export default {
this.$modal
.confirm('确定删除该模板吗?')
.then(async () => {
const res = await deleteNwTemplateAPI({ id: row.id })
const res = await deleteGwTemplateAPI({ id: row.id })
if (res.code == 200) {
this.$message.success('删除成功')
this.getNwTemplateList()
this.getGwTemplateList()
}
})
.catch(() => {})
@ -167,31 +168,47 @@ export default {
onHandleAddOrEdit(row, type) {
this.formType = type
if (type === 1) {
this.dialogConfig.outerTitle = '新增网模板'
this.dialogConfig.outerTitle = '新增网模板'
this.queryId = ''
} else if (type === 3) {
this.dialogConfig.outerTitle = '编辑网模板'
this.dialogConfig.outerTitle = '编辑网模板'
this.queryId = row.id
} else if (type === 2) {
this.dialogConfig.outerTitle = '网模板详情'
this.dialogConfig.outerTitle = '网模板详情'
this.queryId = row.id
}
this.dialogConfig.outerVisible = true
},
//
onHandleDownload(row) {
this.downloadNew(
'/south/downloadSouthTemp',
{
id: row.id,
},
`南网模板_${row.name}.doc`,
)
async onHandleDownload(row) {
// downloadStateGridTemp
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
// console.log(res, '')
this.$confirm('请选择下载的模板类型?', '温馨提示', {
distinguishCancelAndClose: true,
confirmButtonText: '表格下载',
cancelButtonText: '普通下载',
})
.then(() => {
//
this.downloadNew(
'/stateGrid/downloadStateGridTemp',
{
id: row.id,
},
`国网模板_${row.name}.doc`,
)
})
.catch((action) => {
//
})
},
// NW
async getNwTemplateList() {
//
async getGwTemplateList() {
if (this.timeValue && this.timeValue.length > 0) {
this.queryParams.startDate = this.timeValue[0]
this.queryParams.endDate = this.timeValue[1]
@ -199,7 +216,7 @@ export default {
this.queryParams.startDate = ''
this.queryParams.endDate = ''
}
const res = await getNwTemplateListAPI(this.queryParams)
const res = await getGwTemplateListAPI(this.queryParams)
this.tableList = res.rows
this.total = res.total
},
@ -209,11 +226,11 @@ export default {
this.queryParams.name = ''
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.getNwTemplateList()
this.getGwTemplateList()
},
},
created() {
this.getNwTemplateList()
this.getGwTemplateList()
},
}
</script>