修改EPC、南网标书模板
This commit is contained in:
parent
2bec785617
commit
0c5066d196
File diff suppressed because it is too large
Load Diff
|
|
@ -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>
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- EPC模板 -->
|
<!-- EPC模板 新 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" 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-row :gutter="20">
|
||||||
|
|
@ -25,9 +25,9 @@
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<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 @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-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -58,32 +58,32 @@
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="color: #d140ff"
|
||||||
|
icon="el-icon-download"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-download"
|
|
||||||
style="color: #d140ff"
|
|
||||||
@click="onHandleDownload(row)"
|
@click="onHandleDownload(row)"
|
||||||
v-hasPermi="['epc:template:download']"
|
v-hasPermi="['gw:template:download']"
|
||||||
>
|
>
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="color: #409eff"
|
||||||
|
icon="el-icon-edit"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-edit"
|
|
||||||
style="color: #409eff"
|
|
||||||
@click="onHandleAddOrEdit(row, 3)"
|
@click="onHandleAddOrEdit(row, 3)"
|
||||||
v-hasPermi="['epc:template:edit']"
|
v-hasPermi="['gw:template:edit']"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="color: #f56c6c"
|
||||||
|
icon="el-icon-delete"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-delete"
|
|
||||||
style="color: #f56c6c"
|
|
||||||
@click="onHandleDelete(row)"
|
@click="onHandleDelete(row)"
|
||||||
v-hasPermi="['epc:template:delete']"
|
v-hasPermi="['gw:template:delete']"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getEpcTemplateList"
|
@pagination="getGwTemplateList"
|
||||||
/>
|
/>
|
||||||
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
|
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
<script>
|
<script>
|
||||||
import DialogModel from '@/components/DialogModel/index'
|
import DialogModel from '@/components/DialogModel/index'
|
||||||
import AddAndEditForm from './components/addAndEditForm.vue'
|
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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
DialogModel,
|
DialogModel,
|
||||||
|
|
@ -120,7 +120,7 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
queryId: '', // 详情或编辑的id
|
queryId: '', // 详情或编辑的id
|
||||||
dialogConfig: {
|
dialogConfig: {
|
||||||
outerTitle: '新增EPC模板',
|
outerTitle: '新增国网模板',
|
||||||
innerTitle: false,
|
innerTitle: false,
|
||||||
outerWidth: '80%',
|
outerWidth: '80%',
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
|
|
@ -132,6 +132,7 @@ export default {
|
||||||
endDate: '',
|
endDate: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
type: 2,
|
||||||
},
|
},
|
||||||
timeValue: [],
|
timeValue: [],
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
|
@ -147,7 +148,7 @@ export default {
|
||||||
closeDialogOuter(isRefresh = false) {
|
closeDialogOuter(isRefresh = false) {
|
||||||
this.dialogConfig.outerVisible = false
|
this.dialogConfig.outerVisible = false
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
this.getEpcTemplateList()
|
this.getGwTemplateList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
|
|
@ -155,10 +156,10 @@ export default {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('确定删除该模板吗?')
|
.confirm('确定删除该模板吗?')
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const res = await deleteEpcTemplateAPI({ id: row.id })
|
const res = await deleteGwTemplateAPI({ id: row.id })
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.getEpcTemplateList()
|
this.getGwTemplateList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
|
@ -167,31 +168,47 @@ export default {
|
||||||
onHandleAddOrEdit(row, type) {
|
onHandleAddOrEdit(row, type) {
|
||||||
this.formType = type
|
this.formType = type
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
this.dialogConfig.outerTitle = '新增EPC模板'
|
this.dialogConfig.outerTitle = '新增国网模板'
|
||||||
this.queryId = ''
|
this.queryId = ''
|
||||||
} else if (type === 3) {
|
} else if (type === 3) {
|
||||||
this.dialogConfig.outerTitle = '编辑EPC模板'
|
this.dialogConfig.outerTitle = '编辑国网模板'
|
||||||
this.queryId = row.id
|
this.queryId = row.id
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
this.dialogConfig.outerTitle = 'EPC模板详情'
|
this.dialogConfig.outerTitle = '国网模板详情'
|
||||||
this.queryId = row.id
|
this.queryId = row.id
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
onHandleDownload(row) {
|
async onHandleDownload(row) {
|
||||||
this.downloadNew(
|
// downloadStateGridTemp
|
||||||
'/epc/downloadEpcTemp',
|
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
|
||||||
{
|
// console.log(res, '下载结果')
|
||||||
id: row.id,
|
|
||||||
},
|
this.$confirm('请选择下载的模板类型?', '温馨提示', {
|
||||||
`EPC模板_${row.name}.doc`,
|
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) {
|
if (this.timeValue && this.timeValue.length > 0) {
|
||||||
this.queryParams.startDate = this.timeValue[0]
|
this.queryParams.startDate = this.timeValue[0]
|
||||||
this.queryParams.endDate = this.timeValue[1]
|
this.queryParams.endDate = this.timeValue[1]
|
||||||
|
|
@ -199,7 +216,7 @@ export default {
|
||||||
this.queryParams.startDate = ''
|
this.queryParams.startDate = ''
|
||||||
this.queryParams.endDate = ''
|
this.queryParams.endDate = ''
|
||||||
}
|
}
|
||||||
const res = await getEpcTemplateListAPI(this.queryParams)
|
const res = await getGwTemplateListAPI(this.queryParams)
|
||||||
this.tableList = res.rows
|
this.tableList = res.rows
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
},
|
},
|
||||||
|
|
@ -209,11 +226,11 @@ export default {
|
||||||
this.queryParams.name = ''
|
this.queryParams.name = ''
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.queryParams.pageSize = 10
|
this.queryParams.pageSize = 10
|
||||||
this.getEpcTemplateList()
|
this.getGwTemplateList()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getEpcTemplateList()
|
this.getGwTemplateList()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -832,7 +832,8 @@ export default {
|
||||||
comPerfList: [], // 公司业绩列表
|
comPerfList: [], // 公司业绩列表
|
||||||
comCoreList: [], // 关键人员列表
|
comCoreList: [], // 关键人员列表
|
||||||
comOtherList: [], // 其他人员列表
|
comOtherList: [], // 其他人员列表
|
||||||
subList: [], // 分包商列表
|
subList: [], // 分包商列表,
|
||||||
|
type: 1, // type 1. 国网 2. EPC 3. 南网
|
||||||
}
|
}
|
||||||
|
|
||||||
let isError = false
|
let isError = false
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ export default {
|
||||||
endDate: '',
|
endDate: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
type: 1,
|
||||||
},
|
},
|
||||||
timeValue: [],
|
timeValue: [],
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
|
@ -185,13 +186,25 @@ export default {
|
||||||
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
|
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
|
||||||
// console.log(res, '下载结果')
|
// console.log(res, '下载结果')
|
||||||
|
|
||||||
this.downloadNew(
|
this.$confirm('请选择下载的模板类型?', '温馨提示', {
|
||||||
'/stateGrid/downloadStateGridTemp',
|
distinguishCancelAndClose: true,
|
||||||
{
|
confirmButtonText: '表格下载',
|
||||||
id: row.id,
|
cancelButtonText: '普通下载',
|
||||||
},
|
})
|
||||||
`国网模板_${row.name}.doc`,
|
.then(() => {
|
||||||
)
|
// 表格下载
|
||||||
|
|
||||||
|
this.downloadNew(
|
||||||
|
'/stateGrid/downloadStateGridTemp',
|
||||||
|
{
|
||||||
|
id: row.id,
|
||||||
|
},
|
||||||
|
`国网模板_${row.name}.doc`,
|
||||||
|
)
|
||||||
|
})
|
||||||
|
.catch((action) => {
|
||||||
|
// 普通下载
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取国网模板列表列表
|
// 获取国网模板列表列表
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 南网模板 -->
|
<!-- 南网模板 新 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" 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-row :gutter="20">
|
||||||
|
|
@ -25,9 +25,9 @@
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item>
|
<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 @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-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -49,41 +49,41 @@
|
||||||
<el-table-column label="操作" width="auto" align="center">
|
<el-table-column label="操作" width="auto" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
|
style="color: #67c23a"
|
||||||
|
icon="el-icon-view"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-view"
|
|
||||||
style="color: #67c23a"
|
|
||||||
@click="onHandleAddOrEdit(row, 2)"
|
@click="onHandleAddOrEdit(row, 2)"
|
||||||
>
|
>
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
|
||||||
size="mini"
|
|
||||||
style="color: #d140ff"
|
style="color: #d140ff"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
@click="onHandleDownload(row)"
|
@click="onHandleDownload(row)"
|
||||||
v-hasPermi="['nw:template:download']"
|
v-hasPermi="['gw:template:download']"
|
||||||
>
|
>
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="color: #409eff"
|
||||||
|
icon="el-icon-edit"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-edit"
|
|
||||||
style="color: #409eff"
|
|
||||||
@click="onHandleAddOrEdit(row, 3)"
|
@click="onHandleAddOrEdit(row, 3)"
|
||||||
v-hasPermi="['nw:template:edit']"
|
v-hasPermi="['gw:template:edit']"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="color: #f56c6c"
|
||||||
|
icon="el-icon-delete"
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-delete"
|
|
||||||
style="color: #f56c6c"
|
|
||||||
@click="onHandleDelete(row)"
|
@click="onHandleDelete(row)"
|
||||||
v-hasPermi="['nw:template:delete']"
|
v-hasPermi="['gw:template:delete']"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -93,9 +93,9 @@
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
@pagination="getNwTemplateList"
|
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getGwTemplateList"
|
||||||
/>
|
/>
|
||||||
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
|
<DialogModel :dialogConfig="dialogConfig" @closeDialogOuter="closeDialogOuter">
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
<script>
|
<script>
|
||||||
import DialogModel from '@/components/DialogModel/index'
|
import DialogModel from '@/components/DialogModel/index'
|
||||||
import AddAndEditForm from './components/addAndEditForm.vue'
|
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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
DialogModel,
|
DialogModel,
|
||||||
|
|
@ -120,7 +120,7 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
queryId: '', // 详情或编辑的id
|
queryId: '', // 详情或编辑的id
|
||||||
dialogConfig: {
|
dialogConfig: {
|
||||||
outerTitle: '新增南网模板',
|
outerTitle: '新增国网模板',
|
||||||
innerTitle: false,
|
innerTitle: false,
|
||||||
outerWidth: '80%',
|
outerWidth: '80%',
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
|
|
@ -132,6 +132,7 @@ export default {
|
||||||
endDate: '',
|
endDate: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
type: 3,
|
||||||
},
|
},
|
||||||
timeValue: [],
|
timeValue: [],
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
|
@ -147,7 +148,7 @@ export default {
|
||||||
closeDialogOuter(isRefresh = false) {
|
closeDialogOuter(isRefresh = false) {
|
||||||
this.dialogConfig.outerVisible = false
|
this.dialogConfig.outerVisible = false
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
this.getNwTemplateList()
|
this.getGwTemplateList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
|
|
@ -155,10 +156,10 @@ export default {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('确定删除该模板吗?')
|
.confirm('确定删除该模板吗?')
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const res = await deleteNwTemplateAPI({ id: row.id })
|
const res = await deleteGwTemplateAPI({ id: row.id })
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.getNwTemplateList()
|
this.getGwTemplateList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
|
@ -167,31 +168,47 @@ export default {
|
||||||
onHandleAddOrEdit(row, type) {
|
onHandleAddOrEdit(row, type) {
|
||||||
this.formType = type
|
this.formType = type
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
this.dialogConfig.outerTitle = '新增南网模板'
|
this.dialogConfig.outerTitle = '新增国网模板'
|
||||||
this.queryId = ''
|
this.queryId = ''
|
||||||
} else if (type === 3) {
|
} else if (type === 3) {
|
||||||
this.dialogConfig.outerTitle = '编辑南网模板'
|
this.dialogConfig.outerTitle = '编辑国网模板'
|
||||||
this.queryId = row.id
|
this.queryId = row.id
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
this.dialogConfig.outerTitle = '南网模板详情'
|
this.dialogConfig.outerTitle = '国网模板详情'
|
||||||
this.queryId = row.id
|
this.queryId = row.id
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dialogConfig.outerVisible = true
|
this.dialogConfig.outerVisible = true
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
onHandleDownload(row) {
|
async onHandleDownload(row) {
|
||||||
this.downloadNew(
|
// downloadStateGridTemp
|
||||||
'/south/downloadSouthTemp',
|
// const res = await downloadGwTemplateByIdAPI({ id: row.id })
|
||||||
{
|
// console.log(res, '下载结果')
|
||||||
id: row.id,
|
|
||||||
},
|
this.$confirm('请选择下载的模板类型?', '温馨提示', {
|
||||||
`南网模板_${row.name}.doc`,
|
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) {
|
if (this.timeValue && this.timeValue.length > 0) {
|
||||||
this.queryParams.startDate = this.timeValue[0]
|
this.queryParams.startDate = this.timeValue[0]
|
||||||
this.queryParams.endDate = this.timeValue[1]
|
this.queryParams.endDate = this.timeValue[1]
|
||||||
|
|
@ -199,7 +216,7 @@ export default {
|
||||||
this.queryParams.startDate = ''
|
this.queryParams.startDate = ''
|
||||||
this.queryParams.endDate = ''
|
this.queryParams.endDate = ''
|
||||||
}
|
}
|
||||||
const res = await getNwTemplateListAPI(this.queryParams)
|
const res = await getGwTemplateListAPI(this.queryParams)
|
||||||
this.tableList = res.rows
|
this.tableList = res.rows
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
},
|
},
|
||||||
|
|
@ -209,11 +226,11 @@ export default {
|
||||||
this.queryParams.name = ''
|
this.queryParams.name = ''
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.queryParams.pageSize = 10
|
this.queryParams.pageSize = 10
|
||||||
this.getNwTemplateList()
|
this.getGwTemplateList()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getNwTemplateList()
|
this.getGwTemplateList()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue