22 changed files with 5412 additions and 182 deletions
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询进度计划列表
|
|||
export function listPlan(query) { |
|||
return request({ |
|||
url: '/progress/plan/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询进度计划详细
|
|||
export function getPlan(id) { |
|||
return request({ |
|||
url: '/progress/plan/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增进度计划
|
|||
export function addPlan(data) { |
|||
return request({ |
|||
url: '/progress/plan', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改进度计划
|
|||
export function updatePlan(data) { |
|||
return request({ |
|||
url: '/progress/plan', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除进度计划
|
|||
export function delPlan(id) { |
|||
return request({ |
|||
url: '/progress/plan/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出进度计划
|
|||
export function exportPlan(query) { |
|||
return request({ |
|||
url: '/progress/plan/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询进度填报详情列表
|
|||
export function listInfo(query) { |
|||
return request({ |
|||
url: '/progress/info/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询进度填报详情详细
|
|||
export function getInfo(id) { |
|||
return request({ |
|||
url: '/progress/info/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增进度填报详情
|
|||
export function addInfo(data) { |
|||
return request({ |
|||
url: '/progress/info', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改进度填报详情
|
|||
export function updateInfo(data) { |
|||
return request({ |
|||
url: '/progress/info', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除进度填报详情
|
|||
export function delInfo(id) { |
|||
return request({ |
|||
url: '/progress/info/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出进度填报详情
|
|||
export function exportInfo(query) { |
|||
return request({ |
|||
url: '/progress/info/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询维权公示牌列表
|
|||
export function listPublicity(query) { |
|||
return request({ |
|||
url: '/system/publicity/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询维权公示牌详细
|
|||
export function getPublicity(id) { |
|||
return request({ |
|||
url: '/system/publicity/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增维权公示牌
|
|||
export function addPublicity(data) { |
|||
return request({ |
|||
url: '/system/publicity', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改维权公示牌
|
|||
export function updatePublicity(data) { |
|||
return request({ |
|||
url: '/system/publicity', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除维权公示牌
|
|||
export function delPublicity(id) { |
|||
return request({ |
|||
url: '/system/publicity/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出维权公示牌
|
|||
export function exportPublicity(query) { |
|||
return request({ |
|||
url: '/system/publicity/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,54 @@ |
|||
<template> |
|||
<img ref="img" /> |
|||
</template> |
|||
<script> |
|||
import { getToken } from "@/utils/auth"; |
|||
export default { |
|||
name: "authImg", |
|||
props: { |
|||
authSrc: { |
|||
type: String, |
|||
required: false, |
|||
default: "", |
|||
}, |
|||
}, |
|||
data() { |
|||
return { |
|||
headers: "jwtech " + getToken(), |
|||
imgSrc: "", |
|||
}; |
|||
}, |
|||
mounted() { |
|||
//这是区分开发环境和生产环境,视情况而定 |
|||
this.imgSrc = this.authSrc; |
|||
this.imgSrc = process.env.VUE_APP_BASE_API + this.imgSrc; |
|||
// this.imgSrc = |
|||
// (process.env.NODE_ENV == "development" |
|||
// ? "/think" |
|||
// : process.env.VUE_APP_BASE_API) + this.imgSrc; |
|||
// console.log(88888888, this.authSrc); |
|||
// console.log("99999999", this.imgSrc); |
|||
Object.defineProperty(Image.prototype, "authsrc", { |
|||
writable: true, |
|||
enumerable: true, |
|||
configurable: true, |
|||
}); |
|||
|
|||
let img = this.$refs.img; |
|||
let request = new XMLHttpRequest(); |
|||
request.responseType = "blob"; |
|||
request.open("get", this.imgSrc, true); |
|||
//这里带上请求头 |
|||
request.setRequestHeader("jianwei", this.headers); |
|||
request.onreadystatechange = (e) => { |
|||
if (request.readyState == XMLHttpRequest.DONE && request.status == 200) { |
|||
img.src = URL.createObjectURL(request.response); |
|||
img.onload = () => { |
|||
URL.revokeObjectURL(img.src); |
|||
}; |
|||
} |
|||
}; |
|||
request.send(null); |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,450 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
> |
|||
<el-form-item label="是否公示" prop="isPublicity"> |
|||
<el-select |
|||
v-model="queryParams.data.isPublicity" |
|||
placeholder="请选择是否公示" |
|||
clearable |
|||
size="small" |
|||
@change="handleQuery" |
|||
> |
|||
<el-option |
|||
v-for="dict in isPublicityOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<!-- <el-button |
|||
type="cyan" |
|||
icon="el-icon-search" |
|||
size="mini" |
|||
@click="handleQuery" |
|||
>搜索</el-button |
|||
> --> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
|||
>重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="primary" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['system:publicity:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['system:publicity:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['system:publicity:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['system:publicity:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> --> |
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="publicityList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" fixed /> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="是否公示" |
|||
align="center" |
|||
prop="isPublicity" |
|||
:formatter="isPublicityFormat" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column label="附件" align="center" prop="annex" min-width="120"> |
|||
<template slot-scope="scope" v-if="scope.row.annex"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse(scope.row.annex)" |
|||
:key="item + index" |
|||
> |
|||
<i class="el-icon-document"></i> |
|||
{{ item.name }} |
|||
<i |
|||
class="el-icon-download" |
|||
@click="$myDownLoadFile(item)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
class-name="small-padding fixed-width" |
|||
width="180" |
|||
fixed="right" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['system:publicity:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['system:publicity:remove']" |
|||
>删除</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
|
|||
<!-- 添加或修改维权公示牌对话框 --> |
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="是否公示" prop="isPublicity"> |
|||
<el-select |
|||
v-model="form.isPublicity" |
|||
placeholder="请选择是否公示" |
|||
style="width: 100%" |
|||
> |
|||
<el-option |
|||
v-for="dict in isPublicityOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="附件" prop="annex"> |
|||
<!-- <el-input v-model="form.annex" placeholder="请输入附件" /> --> |
|||
<myUpload :fileList="fileList" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listPublicity, |
|||
getPublicity, |
|||
delPublicity, |
|||
addPublicity, |
|||
updatePublicity, |
|||
exportPublicity, |
|||
} from "@/api/build/publicity"; |
|||
|
|||
export default { |
|||
name: "Publicity", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 维权公示牌表格数据 |
|||
publicityList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 是否公示字典 |
|||
isPublicityOptions: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
proCode: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
isPublicity: null, |
|||
annex: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
fileList: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
this.getDicts("whether").then((response) => { |
|||
this.isPublicityOptions = response.data; |
|||
}); |
|||
}, |
|||
methods: { |
|||
/** 查询维权公示牌列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
this.queryParams.data.proCode = this.proCode; |
|||
this.queryParams.data.proNo = this.proNo; |
|||
listPublicity(this.queryParams).then((response) => { |
|||
this.publicityList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 是否公示字典翻译 |
|||
isPublicityFormat(row, column) { |
|||
return this.selectDictLabel(this.isPublicityOptions, row.isPublicity); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
proCode: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
remark: null, |
|||
id: null, |
|||
isPublicity: null, |
|||
annex: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
proCode: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
remark: null, |
|||
id: null, |
|||
isPublicity: null, |
|||
annex: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.id); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加维权公示牌"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getPublicity(id).then((response) => { |
|||
this.form = response.data; |
|||
if (this.form.annex) { |
|||
this.fileList = JSON.parse(this.form.annex); |
|||
} |
|||
this.open = true; |
|||
this.title = "修改维权公示牌"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.form.annex = |
|||
this.fileList.length > 0 ? JSON.stringify(this.fileList) : null; |
|||
|
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updatePublicity(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.proNo = this.proNo; |
|||
this.form.proCode = this.proCode; |
|||
addPublicity(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delPublicity(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportPublicity(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
//::v-deep { |
|||
// .el-dialog { |
|||
// margin-top: 10vh !important; |
|||
// } |
|||
//} |
|||
</style> |
@ -1,3 +1,976 @@ |
|||
<template> |
|||
<div>计划管理</div> |
|||
<div class="app-container"> |
|||
<!-- 计划管理 --> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
> |
|||
<el-form-item label="类型" prop="projectType"> |
|||
<el-cascader |
|||
v-model="queryParams.data.projectType" |
|||
:options="projectTypeoptions" |
|||
:props="projectTypeOptionProps" |
|||
placeholder="请选择项目类型" |
|||
clearable |
|||
@change="handleQuery" |
|||
size="small" |
|||
style="width: 100%" |
|||
></el-cascader> |
|||
</el-form-item> |
|||
<el-form-item label="年份" prop="planYear"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="queryParams.data.planYear" |
|||
type="year" |
|||
value-format="yyyy" |
|||
placeholder="选择年份" |
|||
@change="handleQuery" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<!-- <el-form-item label="计划状态" prop="planStatus"> |
|||
<el-select |
|||
v-model="queryParams.data.planStatus" |
|||
placeholder="请选择计划状态" |
|||
clearable |
|||
size="small" |
|||
> |
|||
<el-option label="请选择字典生成" value="" /> |
|||
</el-select> |
|||
</el-form-item> --> |
|||
|
|||
<el-form-item> |
|||
<!-- <el-button |
|||
type="cyan" |
|||
icon="el-icon-search" |
|||
size="mini" |
|||
@click="handleQuery" |
|||
>搜索</el-button |
|||
> --> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
|||
>重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="primary" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['progress:plan:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['progress:plan:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['progress:plan:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['progress:plan:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> --> |
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="planList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" fixed /> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
<el-table-column |
|||
label="项目名称" |
|||
align="center" |
|||
prop="projectName" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="项目类型" |
|||
align="center" |
|||
prop="projectType" |
|||
:formatter="projectTypeFormat" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="年份" |
|||
align="center" |
|||
prop="planYear" |
|||
min-width="120" |
|||
> |
|||
<!-- <template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.planYear, "{y}-{m}-{d}") }}</span> |
|||
</template> --> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
label="合计(万元)" |
|||
align="center" |
|||
prop="p4" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scoped"> |
|||
{{ sumAmount(scoped.row) }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="1-3月(万元)" |
|||
align="center" |
|||
prop="p1" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scoped"> |
|||
{{ (scoped.row.p1 + scoped.row.p2 + scoped.row.p3).toFixed(2) }} |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- </el-table-column> |
|||
<el-table-column |
|||
label="2月(万元)" |
|||
align="center" |
|||
prop="p2" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="3月(万元)" |
|||
align="center" |
|||
prop="p3" |
|||
min-width="120" |
|||
/> --> |
|||
<el-table-column |
|||
label="4月(万元)" |
|||
align="center" |
|||
prop="p4" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="5月(万元)" |
|||
align="center" |
|||
prop="p5" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="6月(万元)" |
|||
align="center" |
|||
prop="p6" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="7月(万元)" |
|||
align="center" |
|||
prop="p7" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="8月(万元)" |
|||
align="center" |
|||
prop="p8" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="9月(万元)" |
|||
align="center" |
|||
prop="p9" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="10月(万元)" |
|||
align="center" |
|||
prop="p10" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="11月(万元)" |
|||
align="center" |
|||
prop="p11" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="12月(万元)" |
|||
align="center" |
|||
prop="p12" |
|||
min-width="120" |
|||
/> |
|||
|
|||
<!-- <el-table-column |
|||
label="计划状态" |
|||
align="center" |
|||
prop="planStatus" |
|||
min-width="120" |
|||
/> --> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
class-name="small-padding fixed-width" |
|||
width="180" |
|||
fixed="right" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['progress:plan:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['progress:plan:remove']" |
|||
>删除</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
|
|||
<!-- 添加或修改进度计划对话框 --> |
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="项目名称" prop="projectName"> |
|||
<el-input |
|||
v-model="form.projectName" |
|||
placeholder="请输入项目名称" |
|||
readonly |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item label="项目类型" prop="projectType"> |
|||
<el-input |
|||
v-model="form.projectType" |
|||
placeholder="请输入项目类型" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
<el-col :span="12"> |
|||
<el-form-item label="年份" prop="planYear"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 100%" |
|||
v-model="form.planYear" |
|||
type="year" |
|||
value-format="yyyy" |
|||
placeholder="选择年份" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="1月计划投资" prop="p1"> |
|||
<el-input v-model="form.p1" placeholder="请输入1月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="2月计划投资" prop="p2"> |
|||
<el-input v-model="form.p2" placeholder="请输入2月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="3月计划投资" prop="p3"> |
|||
<el-input v-model="form.p3" placeholder="请输入3月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="4月计划投资" prop="p4"> |
|||
<el-input v-model="form.p4" placeholder="请输入4月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="5月计划投资" prop="p5"> |
|||
<el-input v-model="form.p5" placeholder="请输入5月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="6月计划投资" prop="p6"> |
|||
<el-input v-model="form.p6" placeholder="请输入6月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="7月计划投资" prop="p7"> |
|||
<el-input v-model="form.p7" placeholder="请输入7月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="8月计划投资" prop="p8"> |
|||
<el-input v-model="form.p8" placeholder="请输入8月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="9月计划投资" prop="p9"> |
|||
<el-input v-model="form.p9" placeholder="请输入9月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="10月计划投资" prop="p10"> |
|||
<el-input v-model="form.p10" placeholder="请输入10月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="11月计划投资" prop="p11"> |
|||
<el-input v-model="form.p11" placeholder="请输入11月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="12月计划投资" prop="p12"> |
|||
<el-input v-model="form.p12" placeholder="请输入12月计划投资"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-form> |
|||
</el-row> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listPlan, |
|||
getPlan, |
|||
delPlan, |
|||
addPlan, |
|||
updatePlan, |
|||
exportPlan, |
|||
} from "@/api/build/plan"; |
|||
|
|||
export default { |
|||
name: "Plan", |
|||
props: ["proNo", "proCode", "formData"], |
|||
data() { |
|||
return { |
|||
projectTypeOptionProps: { |
|||
emitPath: false, |
|||
checkStrictly: true, //选择任意一级 |
|||
}, |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 进度计划表格数据 |
|||
planList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
proCode: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
remark: null, |
|||
projectName: null, |
|||
projectType: null, |
|||
p1: null, |
|||
p2: null, |
|||
p3: null, |
|||
p4: null, |
|||
p5: null, |
|||
p6: null, |
|||
p7: null, |
|||
p8: null, |
|||
p9: null, |
|||
p10: null, |
|||
p11: null, |
|||
p12: null, |
|||
planYear: null, |
|||
planStatus: null, |
|||
v1: null, |
|||
v2: null, |
|||
v3: null, |
|||
v4: null, |
|||
v5: null, |
|||
v6: null, |
|||
v7: null, |
|||
v8: null, |
|||
v9: null, |
|||
v10: null, |
|||
v11: null, |
|||
v12: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
projectName: [ |
|||
{ required: true, message: "请输入项目名称", trigger: "blur" }, |
|||
], |
|||
planYear: [{ required: true, message: "请输入年份", trigger: "blur" }], |
|||
p1: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入1月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p2: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入2月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p3: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入3月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p4: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入4月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p5: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入5月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p6: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入6月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p7: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入7月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p8: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入8月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p9: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入9月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p10: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入10月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p11: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入11月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
p12: [ |
|||
{ |
|||
required: true, |
|||
pattern: /./, |
|||
message: "请输入12月计划投资金额", |
|||
trigger: "blur", |
|||
}, |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
|||
message: "请输入数字,整数7位,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
}, |
|||
// 重大项目字典 |
|||
zd_projectTypeOptions: [], |
|||
// 面上项目字典 |
|||
ms_projectTypeOptions: [], |
|||
}; |
|||
}, |
|||
computed: { |
|||
projectTypeoptions() { |
|||
let op = [ |
|||
{ |
|||
label: "重大项目", |
|||
value: "zd, ", |
|||
children: this.zd_projectTypeOptions.map((item) => { |
|||
return { |
|||
label: item.dictLabel, |
|||
value: "zd," + item.dictValue, |
|||
}; |
|||
}), |
|||
}, |
|||
{ |
|||
label: "面上项目", |
|||
value: "ms, ", |
|||
children: this.ms_projectTypeOptions.map((item) => { |
|||
return { |
|||
label: item.dictLabel, |
|||
value: "ms," + item.dictValue, |
|||
}; |
|||
}), |
|||
}, |
|||
]; |
|||
// console.log(3333, op); |
|||
return op; |
|||
}, |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
this.getDicts("major_project").then((response) => { |
|||
// console.log("4444444444444444", response.data); |
|||
this.zd_projectTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("general_project").then((response) => { |
|||
// console.log("5555555555555", response.data); |
|||
this.ms_projectTypeOptions = response.data; |
|||
}); |
|||
}, |
|||
methods: { |
|||
sumAmount(row) { |
|||
return ( |
|||
row.p1 + |
|||
row.p2 + |
|||
row.p3 + |
|||
row.p4 + |
|||
row.p5 + |
|||
row.p6 + |
|||
row.p7 + |
|||
row.p8 + |
|||
row.p9 + |
|||
row.p10 + |
|||
row.p11 + |
|||
row.p12 |
|||
).toFixed(2); |
|||
}, |
|||
/** 查询进度计划列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listPlan(this.queryParams).then((response) => { |
|||
this.planList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 项目类型字典翻译 |
|||
projectTypeFormat(row, column) { |
|||
if (row.isMajor == "zd") { |
|||
return this.selectDictLabel( |
|||
this.zd_projectTypeOptions, |
|||
row.projectType |
|||
); |
|||
} else if (row.isMajor == "ms") { |
|||
return this.selectDictLabel( |
|||
this.ms_projectTypeOptions, |
|||
row.projectType |
|||
); |
|||
} |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
remark: null, |
|||
projectName: null, |
|||
projectType: null, |
|||
p1: null, |
|||
p2: null, |
|||
p3: null, |
|||
p4: null, |
|||
p5: null, |
|||
p6: null, |
|||
p7: null, |
|||
p8: null, |
|||
p9: null, |
|||
p10: null, |
|||
p11: null, |
|||
p12: null, |
|||
planYear: null, |
|||
planStatus: null, |
|||
v1: null, |
|||
v2: null, |
|||
v3: null, |
|||
v4: null, |
|||
v5: null, |
|||
v6: null, |
|||
v7: null, |
|||
v8: null, |
|||
v9: null, |
|||
v10: null, |
|||
v11: null, |
|||
v12: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
id: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
remark: null, |
|||
projectName: null, |
|||
projectType: null, |
|||
p1: null, |
|||
p2: null, |
|||
p3: null, |
|||
p4: null, |
|||
p5: null, |
|||
p6: null, |
|||
p7: null, |
|||
p8: null, |
|||
p9: null, |
|||
p10: null, |
|||
p11: null, |
|||
p12: null, |
|||
planYear: null, |
|||
planStatus: null, |
|||
v1: null, |
|||
v2: null, |
|||
v3: null, |
|||
v4: null, |
|||
v5: null, |
|||
v6: null, |
|||
v7: null, |
|||
v8: null, |
|||
v9: null, |
|||
v10: null, |
|||
v11: null, |
|||
v12: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.id); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.form.projectName = this.formData.projectName; |
|||
this.form.projectType = this.formData.projectType; |
|||
this.form.isMajor = this.formData.isMajor; |
|||
|
|||
this.open = true; |
|||
this.title = "添加进度计划"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getPlan(id).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改进度计划"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updatePlan(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.proNo = this.proNo; |
|||
this.form.proCode = this.proCode; |
|||
addPlan(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delPlan(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportPlan(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
//::v-deep { |
|||
// .el-dialog { |
|||
// margin-top: 10vh !important; |
|||
// } |
|||
//} |
|||
</style> |
|||
|
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue