6 changed files with 2039 additions and 0 deletions
@ -0,0 +1,253 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|||
<el-form-item label="计划的审批时间" prop="approvalTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.approvalTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择计划的审批时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="审批人信息" prop="approvalPerson"> |
|||
<el-input |
|||
v-model="form.approvalPerson" |
|||
placeholder="请输入审批人信息" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="审批意见" prop="approvalOpinion"> |
|||
<el-input v-model="form.approvalOpinion" placeholder="请输入审批意见" /> |
|||
</el-form-item> |
|||
<el-form-item label="意见附件" prop="opinionAttachment"> |
|||
<!-- <el-input |
|||
v-model="form.opinionAttachment" |
|||
placeholder="请输入意见附件" |
|||
/> --> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="http://127.0.0.1/thinking/common/upload" |
|||
:headers="headers" |
|||
:on-preview="handlePreview" |
|||
:on-remove="handleRemove" |
|||
:before-remove="beforeRemove" |
|||
multiple |
|||
:on-exceed="handleExceed" |
|||
:on-success="submitOpinionUpload" |
|||
:file-list="opinionFileList" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过100M |
|||
</div> |
|||
</el-upload> |
|||
</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> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listPlanApproval, |
|||
getPlanApproval, |
|||
delPlanApproval, |
|||
addPlanApproval, |
|||
updatePlanApproval, |
|||
exportPlanApproval, |
|||
} from "@/api/earlyStage/planApproval"; |
|||
import { getToken } from "@/utils/auth"; |
|||
import { getFileStream } from "@/api/system/upload"; |
|||
|
|||
export default { |
|||
name: "PlanApproval", |
|||
props: ["proNo", "planId"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
approvalTime: null, |
|||
approvalPerson: null, |
|||
approvalOpinion: null, |
|||
opinionAttachment: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
// 意见附件 |
|||
opinionFileList: [], |
|||
// 请求头 |
|||
headers: { |
|||
jianwei: "jwtech " + getToken(), |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
// 父组件 利用axios请求得到的值 传送到子组件,要监听,否则初始渲染时为空 |
|||
watch: { |
|||
proNo: function (n, o) { |
|||
this.proNo = n; |
|||
this.getList(); |
|||
}, |
|||
planId: function (n, o) { |
|||
this.planId = n; |
|||
this.getList(); |
|||
}, |
|||
}, |
|||
methods: { |
|||
/** 查询计划编制审批信息列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
// 当planId存在时才发送请求,防止子组件渲染时,一开始planId为空,后面planId才有值 |
|||
if (this.planId) { |
|||
this.queryParams.data.planId = this.planId; |
|||
// console.log("this.planId", this.planId); |
|||
listPlanApproval(this.queryParams).then((response) => { |
|||
// console.log("response", response.records); |
|||
// 当审批存在时,在赋值 |
|||
if (response.records[0]) { |
|||
this.form = response.records[0]; |
|||
if (response.records[0].opinionAttachment) { |
|||
this.opinionFileList = JSON.parse( |
|||
response.records[0].opinionAttachment |
|||
); |
|||
} |
|||
} else { |
|||
this.reset(); |
|||
} |
|||
|
|||
this.loading = false; |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
approvalTime: null, |
|||
approvalPerson: null, |
|||
approvalOpinion: null, |
|||
opinionAttachment: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
this.opinionFileList = []; |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
// 合同附件 |
|||
this.form.opinionAttachment = JSON.stringify(this.opinionFileList); |
|||
// console.log("this.form", this.form); |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updatePlanApproval(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.planId = this.planId; |
|||
this.form.proNo = this.proNo; |
|||
addPlanApproval(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.$router.push("/project/plan"); |
|||
}, |
|||
|
|||
// 上传附件 |
|||
submitOpinionUpload(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.opinionFileList.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.opinionFileList", this.opinionFileList); |
|||
}, |
|||
|
|||
handleRemove(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.opinionFileList.findIndex( |
|||
(item) => item.uid === file.uid |
|||
); |
|||
// 删除文件 |
|||
this.opinionFileList.splice(index, 1); |
|||
}, |
|||
// 点击预览的文件进行下载 |
|||
handlePreview(file) { |
|||
// console.log(file); |
|||
getFileStream({ fileName: file.fileName }).then((res) => { |
|||
const blob = new Blob([res], { |
|||
// type类型后端返回来的数据中会有,根据自己实际进行修改 |
|||
// 表格下载为 application/xlsx,压缩包为 application/zip等, |
|||
type: "application/xlsx", |
|||
}); //excel,pdf等 |
|||
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象 |
|||
const a = document.createElement("a"); //创建a标签 |
|||
a.style.display = "none"; |
|||
a.href = href; // 指定下载链接 |
|||
a.download = file.name; //指定下载文件名 |
|||
a.click(); //触发下载 |
|||
URL.revokeObjectURL(a.href); //释放URL对象 |
|||
}); |
|||
}, |
|||
handleExceed(files, fileList) { |
|||
this.$message.warning( |
|||
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ |
|||
files.length + fileList.length |
|||
} 个文件` |
|||
); |
|||
}, |
|||
beforeRemove(file, fileList) { |
|||
return this.$confirm(`确定移除 ${file.name}?`); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,302 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
|||
<el-form-item label="评价人" prop="evaluator"> |
|||
<el-input v-model="form.evaluator" placeholder="请输入评价人" /> |
|||
</el-form-item> |
|||
<el-form-item label="评价时间" prop="evaluationTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.evaluationTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择评价时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="评价计划名称" prop="planName"> |
|||
<el-input v-model="form.planName" placeholder="请输入评价计划名称" /> |
|||
</el-form-item> |
|||
<el-form-item label="完成进度对比数据" prop="finishProgress"> |
|||
<el-input |
|||
v-model="form.finishProgress" |
|||
placeholder="请输入完成进度对比数据" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="评价内容" prop="evaluationContent"> |
|||
<el-input |
|||
v-model="form.evaluationContent" |
|||
placeholder="请输入评价内容" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="相关文件附件" prop="documentAttachment"> |
|||
<!-- <el-input |
|||
v-model="form.documentAttachment" |
|||
placeholder="请输入相关文件附件" |
|||
/> --> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="http://127.0.0.1/thinking/common/upload" |
|||
:headers="headers" |
|||
:on-preview="handlePreview" |
|||
:on-remove="handleRemove" |
|||
:before-remove="beforeRemove" |
|||
multiple |
|||
:on-exceed="handleExceed" |
|||
:on-success="submitDocumentUpload" |
|||
:file-list="documentFileList" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过100M |
|||
</div> |
|||
</el-upload> |
|||
</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> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listPlanEvalInfo, |
|||
getPlanEvalInfo, |
|||
delPlanEvalInfo, |
|||
addPlanEvalInfo, |
|||
updatePlanEvalInfo, |
|||
exportPlanEvalInfo, |
|||
} from "@/api/earlyStage/planEvalInfo"; |
|||
import { getToken } from "@/utils/auth"; |
|||
import { getFileStream } from "@/api/system/upload"; |
|||
|
|||
export default { |
|||
name: "PlanEvalInfo", |
|||
props: ["proNo", "planId"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
|
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
evaluator: null, |
|||
evaluationTime: null, |
|||
planName: null, |
|||
finishProgress: null, |
|||
evaluationContent: null, |
|||
documentAttachment: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
// 附件 |
|||
documentFileList: [], |
|||
// 请求头 |
|||
headers: { |
|||
jianwei: "jwtech " + getToken(), |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
// 父组件 利用axios请求得到的值 传送到子组件,要监听,否则初始渲染时为空 |
|||
watch: { |
|||
proNo: function (n, o) { |
|||
this.proNo = n; |
|||
this.getList(); |
|||
}, |
|||
planId: function (n, o) { |
|||
this.planId = n; |
|||
this.getList(); |
|||
}, |
|||
}, |
|||
methods: { |
|||
/** 查询计划评价信息列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
if (this.planId) { |
|||
this.queryParams.data.planId = this.planId; |
|||
listPlanEvalInfo(this.queryParams).then((response) => { |
|||
// 当审批存在时,在赋值 |
|||
if (response.records[0]) { |
|||
this.form = response.records[0]; |
|||
if (response.records[0].documentAttachment) { |
|||
this.documentFileList = JSON.parse( |
|||
response.records[0].documentAttachment |
|||
); |
|||
} |
|||
} else { |
|||
this.reset(); |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.$router.push("/project/plan"); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
evaluator: null, |
|||
evaluationTime: null, |
|||
planName: null, |
|||
finishProgress: null, |
|||
evaluationContent: null, |
|||
documentAttachment: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
// 重置存储文件的数组 |
|||
this.documentFileList.splice(0, this.documentFileList.length); |
|||
}, |
|||
|
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getPlanEvalInfo(id).then((response) => { |
|||
this.form = response.data; |
|||
if (response.data.documentAttachment) { |
|||
this.documentFileList = JSON.parse(response.data.documentAttachment); |
|||
} |
|||
this.open = true; |
|||
this.title = "修改计划评价信息"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
this.form.documentAttachment = JSON.stringify(this.documentFileList); |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updatePlanEvalInfo(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.planId = this.planId; |
|||
this.form.proNo = this.proNo; |
|||
addPlanEvalInfo(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 delPlanEvalInfo(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
// 上传附件 |
|||
submitDocumentUpload(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.documentFileList.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
}, |
|||
|
|||
handleRemove(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.documentFileList.findIndex( |
|||
(item) => item.uid === file.uid |
|||
); |
|||
// 删除文件 |
|||
this.documentFileList.splice(index, 1); |
|||
}, |
|||
// 点击预览的文件进行下载 |
|||
handlePreview(file) { |
|||
// console.log(file); |
|||
getFileStream({ fileName: file.fileName }).then((res) => { |
|||
const blob = new Blob([res], { |
|||
// type类型后端返回来的数据中会有,根据自己实际进行修改 |
|||
// 表格下载为 application/xlsx,压缩包为 application/zip等, |
|||
type: "application/xlsx", |
|||
}); //excel,pdf等 |
|||
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象 |
|||
const a = document.createElement("a"); //创建a标签 |
|||
a.style.display = "none"; |
|||
a.href = href; // 指定下载链接 |
|||
a.download = file.name; //指定下载文件名 |
|||
a.click(); //触发下载 |
|||
URL.revokeObjectURL(a.href); //释放URL对象 |
|||
}); |
|||
}, |
|||
handleExceed(files, fileList) { |
|||
this.$message.warning( |
|||
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ |
|||
files.length + fileList.length |
|||
} 个文件` |
|||
); |
|||
}, |
|||
beforeRemove(file, fileList) { |
|||
return this.$confirm(`确定移除 ${file.name}?`); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,707 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
label-width="68px" |
|||
> |
|||
<el-form-item label="计划名称" prop="planningName"> |
|||
<el-input |
|||
v-model="queryParams.cv.value" |
|||
placeholder="请输入计划名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</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="['earlyStage:planImpleInfo: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="['earlyStage:planImpleInfo: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="['earlyStage:planImpleInfo:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
|
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="planImpleInfoList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column label="序号" type="index" width="50" align="center" /> |
|||
|
|||
<el-table-column label="项目名称" align="center" prop="projectName" /> |
|||
<el-table-column |
|||
label="项目开始时间" |
|||
align="center" |
|||
prop="projectStartTime" |
|||
width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ |
|||
parseTime(scope.row.projectStartTime, "{y}-{m}-{d}") |
|||
}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="项目结束时间" |
|||
align="center" |
|||
prop="projectEndTime" |
|||
width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.projectEndTime, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="项目负责人" |
|||
align="center" |
|||
prop="projectLeader" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="项目进度安排" |
|||
align="center" |
|||
prop="projectProgressArrange" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="计划名称" |
|||
align="center" |
|||
prop="planningName" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="计划时间" |
|||
align="center" |
|||
prop="planningTime" |
|||
width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.planningTime, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="计划资金进度安排" |
|||
align="center" |
|||
prop="planningFundProgressArrange" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="计划资金下达进度" |
|||
align="center" |
|||
prop="planningFundIssuedProgress" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="是否到位,0-否,1-是" |
|||
align="center" |
|||
prop="isInPlace" |
|||
:formatter="isInPlaceFormat" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="完成计划单位" |
|||
align="center" |
|||
prop="completedPlanningUnit" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="完成计划开始时间" |
|||
align="center" |
|||
prop="startTime" |
|||
width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="完成计划结束时间" |
|||
align="center" |
|||
prop="endTime" |
|||
width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="完成计划投资使用进度安排" |
|||
align="center" |
|||
prop="investmentProgressArrange" |
|||
width="180" |
|||
/> |
|||
<el-table-column |
|||
label="是否完成计划,0-否,1-是" |
|||
align="center" |
|||
prop="isCompletedPlanning" |
|||
:formatter="isCompletedPlanningFormat" |
|||
width="180" |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
class-name="small-padding fixed-width" |
|||
width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['earlyStage:planImpleInfo:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['earlyStage:planImpleInfo: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="1000px" |
|||
append-to-body |
|||
> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="项目名称" prop="projectName"> |
|||
<el-input |
|||
v-model="form.projectName" |
|||
placeholder="请输入项目名称" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="项目负责人" prop="projectLeader"> |
|||
<el-input |
|||
v-model="form.projectLeader" |
|||
placeholder="请输入项目负责人" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="项目开始时间" prop="projectStartTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.projectStartTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择项目开始时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="项目结束时间" prop="projectEndTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.projectEndTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择项目结束时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="项目进度安排" prop="projectProgressArrange"> |
|||
<el-input |
|||
v-model="form.projectProgressArrange" |
|||
placeholder="请输入项目进度安排" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="计划名称" prop="planningName"> |
|||
<el-input |
|||
v-model="form.planningName" |
|||
placeholder="请输入计划名称" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="计划时间" prop="planningTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.planningTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择计划时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="计划资金进度安排" |
|||
prop="planningFundProgressArrange" |
|||
> |
|||
<el-input |
|||
v-model="form.planningFundProgressArrange" |
|||
placeholder="请输入计划资金进度安排" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="计划资金下达进度" |
|||
prop="planningFundIssuedProgress" |
|||
> |
|||
<el-input |
|||
v-model="form.planningFundIssuedProgress" |
|||
placeholder="请输入计划资金下达进度" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="是否到位,0-否,1-是" prop="isInPlace"> |
|||
<el-select |
|||
v-model="form.isInPlace" |
|||
placeholder="请选择是否到位,0-否,1-是" |
|||
> |
|||
<el-option |
|||
v-for="dict in isInPlaceOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="完成计划单位" prop="completedPlanningUnit"> |
|||
<el-input |
|||
v-model="form.completedPlanningUnit" |
|||
placeholder="请输入完成计划单位" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="完成计划开始时间" prop="startTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.startTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择完成计划开始时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="完成计划结束时间" prop="endTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.endTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择完成计划结束时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="完成计划投资使用进度安排" |
|||
prop="investmentProgressArrange" |
|||
> |
|||
<el-input |
|||
v-model="form.investmentProgressArrange" |
|||
placeholder="请输入完成计划投资使用进度安排" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="是否完成计划,0-否,1-是" |
|||
prop="isCompletedPlanning" |
|||
> |
|||
<el-select |
|||
v-model="form.isCompletedPlanning" |
|||
placeholder="请选择是否完成计划,0-否,1-是" |
|||
> |
|||
<el-option |
|||
v-for="dict in isCompletedPlanningOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</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 { |
|||
listPlanImpleInfo, |
|||
getPlanImpleInfo, |
|||
delPlanImpleInfo, |
|||
addPlanImpleInfo, |
|||
updatePlanImpleInfo, |
|||
exportPlanImpleInfo, |
|||
} from "@/api/earlyStage/planImpleInfo"; |
|||
|
|||
export default { |
|||
name: "PlanImpleInfo", |
|||
props: ["proNo", "planId"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 计划实施信息表格数据 |
|||
planImpleInfoList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 是否到位,0-否,1-是字典 |
|||
isInPlaceOptions: [], |
|||
// 是否完成计划,0-否,1-是字典 |
|||
isCompletedPlanningOptions: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
projectName: null, |
|||
projectStartTime: null, |
|||
projectEndTime: null, |
|||
projectLeader: null, |
|||
projectProgressArrange: null, |
|||
planningName: null, |
|||
planningTime: null, |
|||
planningFundProgressArrange: null, |
|||
planningFundIssuedProgress: null, |
|||
isInPlace: null, |
|||
completedPlanningUnit: null, |
|||
startTime: null, |
|||
endTime: null, |
|||
investmentProgressArrange: null, |
|||
isCompletedPlanning: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}, |
|||
// 模糊查询 |
|||
cv: { |
|||
type: null, |
|||
name: null, |
|||
value: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
this.getDicts("yes_no").then((response) => { |
|||
this.isInPlaceOptions = response.data; |
|||
}); |
|||
this.getDicts("yes_no").then((response) => { |
|||
this.isCompletedPlanningOptions = response.data; |
|||
}); |
|||
}, |
|||
// 父组件 利用axios请求得到的值 传送到子组件,要监听,否则初始渲染时为空 |
|||
watch: { |
|||
proNo: function (n, o) { |
|||
this.proNo = n; |
|||
this.getList(); |
|||
}, |
|||
planId: function (n, o) { |
|||
this.planId = n; |
|||
this.getList(); |
|||
}, |
|||
}, |
|||
methods: { |
|||
/** 查询计划实施信息列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
// 当planId存在时才发送请求,防止子组件渲染时,一开始planId为空,后面planId才有值 |
|||
if (this.planId) { |
|||
this.queryParams.data.planId = this.planId; |
|||
|
|||
listPlanImpleInfo(this.queryParams).then((response) => { |
|||
this.planImpleInfoList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
} |
|||
}, |
|||
// 是否到位,0-否,1-是字典翻译 |
|||
isInPlaceFormat(row, column) { |
|||
return this.selectDictLabel(this.isInPlaceOptions, row.isInPlace); |
|||
}, |
|||
// 是否完成计划,0-否,1-是字典翻译 |
|||
isCompletedPlanningFormat(row, column) { |
|||
return this.selectDictLabel( |
|||
this.isCompletedPlanningOptions, |
|||
row.isCompletedPlanning |
|||
); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
projectName: null, |
|||
projectStartTime: null, |
|||
projectEndTime: null, |
|||
projectLeader: null, |
|||
projectProgressArrange: null, |
|||
planningName: null, |
|||
planningTime: null, |
|||
planningFundProgressArrange: null, |
|||
planningFundIssuedProgress: null, |
|||
isInPlace: null, |
|||
completedPlanningUnit: null, |
|||
startTime: null, |
|||
endTime: null, |
|||
investmentProgressArrange: null, |
|||
isCompletedPlanning: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
id: null, |
|||
projectName: null, |
|||
projectStartTime: null, |
|||
projectEndTime: null, |
|||
projectLeader: null, |
|||
projectProgressArrange: null, |
|||
planningName: null, |
|||
planningTime: null, |
|||
planningFundProgressArrange: null, |
|||
planningFundIssuedProgress: null, |
|||
isInPlace: null, |
|||
completedPlanningUnit: null, |
|||
startTime: null, |
|||
endTime: null, |
|||
investmentProgressArrange: null, |
|||
isCompletedPlanning: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.queryParams.cv.type = "like"; |
|||
this.queryParams.cv.name = "planningName"; |
|||
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; |
|||
getPlanImpleInfo(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) { |
|||
updatePlanImpleInfo(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.planId = this.planId; |
|||
this.form.proNo = this.proNo; |
|||
addPlanImpleInfo(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 delPlanImpleInfo(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,421 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="计划上报的时间" prop="reportTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.reportTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择计划上报的时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="计划的名称" prop="planningName"> |
|||
<el-input |
|||
v-model="form.planningName" |
|||
placeholder="请输入计划的名称" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="所属类别" prop="category"> |
|||
<el-select v-model="form.category" placeholder="请选择所属类别"> |
|||
<el-option |
|||
v-for="dict in categoryOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="预期目标" prop="expectedGoal"> |
|||
<el-input |
|||
v-model="form.expectedGoal" |
|||
placeholder="请输入预期目标" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="12"> |
|||
<el-form-item label="批复时间" prop="replyTime"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.replyTime" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择批复时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="批复人信息" prop="replyPersonInfo"> |
|||
<el-input |
|||
v-model="form.replyPersonInfo" |
|||
placeholder="请输入批复人信息" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item label="批复意见" prop="replyOpinion"> |
|||
<el-input |
|||
v-model="form.replyOpinion" |
|||
type="textarea" |
|||
placeholder="请输入内容" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="计划附件" prop="planningAttachment"> |
|||
<!-- <el-input |
|||
v-model="form.planningAttachment" |
|||
placeholder="请输入计划附件" |
|||
/> --> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="http://127.0.0.1/thinking/common/upload" |
|||
:headers="headers" |
|||
:on-preview="handlePlanningPreview" |
|||
:on-remove="handlePlanningRemove" |
|||
:before-remove="beforePlanningRemove" |
|||
multiple |
|||
:on-exceed="handlePlanningExceed" |
|||
:on-success="submitPlanningUpload" |
|||
:file-list="planningFileList" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过100M |
|||
</div> |
|||
</el-upload> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="意见附件" prop="opinionAttachment"> |
|||
<!-- <el-input |
|||
v-model="form.opinionAttachment" |
|||
placeholder="请输入意见附件" |
|||
/> --> |
|||
<el-upload |
|||
class="upload-demo" |
|||
action="http://127.0.0.1/thinking/common/upload" |
|||
:headers="headers" |
|||
:on-preview="handleOpinionPreview" |
|||
:on-remove="handleOpinionRemove" |
|||
:before-remove="beforeOpinionRemove" |
|||
multiple |
|||
:on-exceed="handleOpinionExceed" |
|||
:on-success="submitOpinionUpload" |
|||
:file-list="opinionFileList" |
|||
> |
|||
<el-button size="small" type="primary" plain> |
|||
<i class="el-icon-upload el-icon--right"></i> |
|||
点击上传 |
|||
</el-button> |
|||
<div slot="tip" class="el-upload__tip"> |
|||
支持jpg/png/pdf/word/excel文件等,不超过100M |
|||
</div> |
|||
</el-upload> |
|||
</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> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listPlanRepInfo, |
|||
getPlanRepInfo, |
|||
delPlanRepInfo, |
|||
addPlanRepInfo, |
|||
updatePlanRepInfo, |
|||
exportPlanRepInfo, |
|||
} from "@/api/earlyStage/PlanRepInfo"; |
|||
import { getToken } from "@/utils/auth"; |
|||
import { getFileStream } from "@/api/system/upload"; |
|||
|
|||
export default { |
|||
name: "PlanRepInfo", |
|||
props: ["proNo", "planId"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
|
|||
// 所属类别字典 |
|||
categoryOptions: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
reportTime: null, |
|||
planningName: null, |
|||
category: null, |
|||
expectedGoal: null, |
|||
planningAttachment: null, |
|||
replyTime: null, |
|||
replyPersonInfo: null, |
|||
replyOpinion: null, |
|||
opinionAttachment: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
// 计划附件 |
|||
planningFileList: [], |
|||
// 意见附件 |
|||
opinionFileList: [], |
|||
// 请求头 |
|||
headers: { |
|||
jianwei: "jwtech " + getToken(), |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
this.getDicts("category").then((response) => { |
|||
this.categoryOptions = response.data; |
|||
}); |
|||
}, |
|||
// 父组件 利用axios请求得到的值 传送到子组件,要监听,否则初始渲染时为空 |
|||
watch: { |
|||
proNo: function (n, o) { |
|||
this.proNo = n; |
|||
this.getList(); |
|||
}, |
|||
planId: function (n, o) { |
|||
this.planId = n; |
|||
this.getList(); |
|||
}, |
|||
}, |
|||
methods: { |
|||
/** 查询计划报批信息列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
// 当planId存在时才发送请求,防止子组件渲染时,一开始planId为空,后面planId才有值 |
|||
if (this.planId) { |
|||
this.queryParams.data.planId = this.planId; |
|||
listPlanRepInfo(this.queryParams).then((response) => { |
|||
// 当审批存在时,在赋值 |
|||
if (response.records[0]) { |
|||
this.form = response.records[0]; |
|||
// console.log("response.records[0]", response.records[0]); |
|||
if (response.records[0].planningAttachment) { |
|||
this.planningFileList = JSON.parse( |
|||
response.records[0].planningAttachment |
|||
); |
|||
} |
|||
if (response.records[0].opinionAttachment) { |
|||
this.opinionFileList = JSON.parse( |
|||
response.records[0].opinionAttachment |
|||
); |
|||
} |
|||
} else { |
|||
this.reset(); |
|||
} |
|||
this.loading = false; |
|||
}); |
|||
} |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
reportTime: null, |
|||
planningName: null, |
|||
category: null, |
|||
expectedGoal: null, |
|||
planningAttachment: null, |
|||
replyTime: null, |
|||
replyPersonInfo: null, |
|||
replyOpinion: null, |
|||
opinionAttachment: null, |
|||
planId: null, |
|||
proNo: null, |
|||
createUid: null, |
|||
createTime: null, |
|||
updateUid: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
this.planningFileList = []; |
|||
this.opinionFileList = []; |
|||
}, |
|||
// 所属类别字典翻译 |
|||
categoryFormat(row, column) { |
|||
return this.selectDictLabel(this.categoryOptions, row.category); |
|||
}, |
|||
|
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
// 合同附件 |
|||
this.form.planningAttachment = JSON.stringify(this.planningFileList); |
|||
this.form.opinionAttachment = JSON.stringify(this.opinionFileList); |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updatePlanRepInfo(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.planId = this.planId; |
|||
this.form.proNo = this.proNo; |
|||
addPlanRepInfo(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
// 取消按钮 |
|||
cancel() { |
|||
this.$router.push("/project/plan"); |
|||
}, |
|||
|
|||
// 上传计划附件 |
|||
submitPlanningUpload(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.planningFileList.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.opinionFileList", this.opinionFileList); |
|||
}, |
|||
|
|||
handlePlanningRemove(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.planningFileList.findIndex( |
|||
(item) => item.uid === file.uid |
|||
); |
|||
// 删除文件 |
|||
this.planningFileList.splice(index, 1); |
|||
}, |
|||
// 点击预览的文件进行下载 |
|||
handlePlanningPreview(file) { |
|||
// console.log(file); |
|||
getFileStream({ fileName: file.fileName }).then((res) => { |
|||
const blob = new Blob([res], { |
|||
// type类型后端返回来的数据中会有,根据自己实际进行修改 |
|||
// 表格下载为 application/xlsx,压缩包为 application/zip等, |
|||
type: "application/xlsx", |
|||
}); //excel,pdf等 |
|||
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象 |
|||
const a = document.createElement("a"); //创建a标签 |
|||
a.style.display = "none"; |
|||
a.href = href; // 指定下载链接 |
|||
a.download = file.name; //指定下载文件名 |
|||
a.click(); //触发下载 |
|||
URL.revokeObjectURL(a.href); //释放URL对象 |
|||
}); |
|||
}, |
|||
handlePlanningExceed(files, fileList) { |
|||
this.$message.warning( |
|||
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ |
|||
files.length + fileList.length |
|||
} 个文件` |
|||
); |
|||
}, |
|||
beforePlanningRemove(file, fileList) { |
|||
return this.$confirm(`确定移除 ${file.name}?`); |
|||
}, |
|||
|
|||
// 上传意见附件 |
|||
submitOpinionUpload(_, fileList) { |
|||
console.log("fileList", fileList); |
|||
this.opinionFileList.push({ |
|||
name: fileList.name, |
|||
fileName: fileList.response.fileName, |
|||
url: fileList.response.url, |
|||
uid: fileList.uid, |
|||
}); |
|||
// console.log("this.opinionFileList", this.opinionFileList); |
|||
}, |
|||
|
|||
handleOpinionRemove(file, fileList) { |
|||
// console.log(file, fileList); |
|||
let index = this.opinionFileList.findIndex( |
|||
(item) => item.uid === file.uid |
|||
); |
|||
// 删除文件 |
|||
this.opinionFileList.splice(index, 1); |
|||
}, |
|||
// 点击预览的文件进行下载 |
|||
handleOpinionPreview(file) { |
|||
// console.log(file); |
|||
getFileStream({ fileName: file.fileName }).then((res) => { |
|||
const blob = new Blob([res], { |
|||
// type类型后端返回来的数据中会有,根据自己实际进行修改 |
|||
// 表格下载为 application/xlsx,压缩包为 application/zip等, |
|||
type: "application/xlsx", |
|||
}); //excel,pdf等 |
|||
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象 |
|||
const a = document.createElement("a"); //创建a标签 |
|||
a.style.display = "none"; |
|||
a.href = href; // 指定下载链接 |
|||
a.download = file.name; //指定下载文件名 |
|||
a.click(); //触发下载 |
|||
URL.revokeObjectURL(a.href); //释放URL对象 |
|||
}); |
|||
}, |
|||
handleOpinionExceed(files, fileList) { |
|||
this.$message.warning( |
|||
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ |
|||
files.length + fileList.length |
|||
} 个文件` |
|||
); |
|||
}, |
|||
beforeOpinionRemove(file, fileList) { |
|||
return this.$confirm(`确定移除 ${file.name}?`); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,132 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- 面包屑 --> |
|||
<el-breadcrumb separator="/" style="margin-bottom: 20px"> |
|||
<el-breadcrumb-item |
|||
v-for="(item, index) in routeList" |
|||
:key="item + index" |
|||
:to="routeList.length !== index + 1 ? { path: item.path } : undefined" |
|||
>{{ item.routeName }}</el-breadcrumb-item |
|||
> |
|||
</el-breadcrumb> |
|||
|
|||
<el-tabs |
|||
v-model="activeName" |
|||
type="card" |
|||
@tab-click="handleClick" |
|||
style="height: 750px; margin-bottom: 20px" |
|||
> |
|||
<el-tab-pane label="计划基本信息" name="planBasePage"> |
|||
<planBasePage ref="basePage" /> |
|||
</el-tab-pane> |
|||
<el-tab-pane |
|||
label="计划编制审批信息" |
|||
name="ApprovalPage" |
|||
:disabled="!routeList[1].isEdit" |
|||
> |
|||
<!-- <ApprovalPage :proNo="formData.proNo" v-if="formData.proNo" /> --> |
|||
<ApprovalPage :proNo="formData.proNo" :planId="formData.id" /> |
|||
</el-tab-pane> |
|||
<el-tab-pane |
|||
label="计划报批信息" |
|||
name="SubmitApprovalPage" |
|||
:disabled="!routeList[1].isEdit" |
|||
> |
|||
<SubmitApprovalPage :proNo="formData.proNo" :planId="formData.id" /> |
|||
</el-tab-pane> |
|||
<el-tab-pane |
|||
label="计划实施信息" |
|||
name="ImplementationPage" |
|||
:disabled="!routeList[1].isEdit" |
|||
> |
|||
<ImplementationPage :proNo="formData.proNo" :planId="formData.id" /> |
|||
</el-tab-pane> |
|||
<el-tab-pane |
|||
label="计划评价信息" |
|||
name="EvaluationPage" |
|||
:disabled="!routeList[1].isEdit" |
|||
> |
|||
<EvaluationPage :proNo="formData.proNo" :planId="formData.id" /> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import planBasePage from "./planBasePage.vue"; |
|||
import ApprovalPage from "./ApprovalPage.vue"; |
|||
import SubmitApprovalPage from "./SubmitApprovalPage.vue"; |
|||
import ImplementationPage from "./ImplementationPage.vue"; |
|||
import EvaluationPage from "./EvaluationPage.vue"; |
|||
import { |
|||
listPlanInfo, |
|||
getPlanInfo, |
|||
delPlanInfo, |
|||
addPlanInfo, |
|||
updatePlanInfo, |
|||
exportPlanInfo, |
|||
} from "@/api/earlyStage/PlanInfo"; |
|||
|
|||
export default { |
|||
components: { |
|||
planBasePage, |
|||
ApprovalPage, |
|||
SubmitApprovalPage, |
|||
ImplementationPage, |
|||
EvaluationPage, |
|||
}, |
|||
data() { |
|||
return { |
|||
activeName: "planBasePage", |
|||
routeList: [], |
|||
formData: {}, |
|||
|
|||
// 计划类型(0:移民资金计划,1:移民安置资金使用计划...)字典 |
|||
planTypeOptions: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
planName: null, |
|||
planType: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.routeList = JSON.parse(this.$store.state.basePageData.routeList); |
|||
this.getList(); |
|||
this.getDicts("project_plan_type").then((response) => { |
|||
this.planTypeOptions = response.data; |
|||
}); |
|||
}, |
|||
methods: { |
|||
/** 查询专题项目前期背景信息列表 */ |
|||
getList() { |
|||
this.queryParams.data.id = this.$route.query.baseDataId; |
|||
listPlanInfo(this.queryParams).then((response) => { |
|||
this.formData = response.records[0]; |
|||
// console.log("this.formData", response.records); |
|||
}); |
|||
}, |
|||
// 切换标签页 |
|||
handleClick(tab, event) { |
|||
// console.log("切换标签页", tab, event); |
|||
// console.log("切换标签页", this.routeList[1].routeName); |
|||
this.routeList[1].routeName = tab.label; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
@ -0,0 +1,224 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- <el-row :gutter="15"> --> |
|||
<el-form |
|||
ref="form" |
|||
:model="baseMsg" |
|||
:rules="rules" |
|||
label-width="110px" |
|||
label-position="left" |
|||
> |
|||
<!-- <el-col :span="12"> --> |
|||
<el-form-item label="计划名称" prop="planName"> |
|||
<el-input |
|||
v-model="baseMsg.planName" |
|||
placeholder="请输入计划名称" |
|||
style="width: 700px" |
|||
/> |
|||
</el-form-item> |
|||
<!-- </el-col> --> |
|||
<el-form-item label="计划类型" prop="planType"> |
|||
<el-select |
|||
v-model="baseMsg.planType" |
|||
placeholder="请选择计划类型" |
|||
style="width: 700px" |
|||
> |
|||
<el-option |
|||
v-for="dict in planTypeOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="归属业务部门" prop="department"> |
|||
<el-input |
|||
v-model="baseMsg.department" |
|||
placeholder="请输入归属业务部门" |
|||
style="width: 700px" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="投资计划" prop="investment"> |
|||
<el-input |
|||
v-model="baseMsg.investment" |
|||
placeholder="请输入投资计划" |
|||
style="width: 700px" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="主要内容" prop="content"> |
|||
<el-input |
|||
v-model="baseMsg.content" |
|||
placeholder="请输入主要内容" |
|||
style="width: 700px" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item |
|||
label="计划关联的项目" |
|||
prop="relatedProjects" |
|||
style="width: 700px" |
|||
> |
|||
<!-- <el-input |
|||
v-model="baseMsg.relatedProjects" |
|||
placeholder="请输入计划关联的项目信息" |
|||
/> --> |
|||
<el-select |
|||
v-model="value" |
|||
filterable |
|||
remote |
|||
reserve-keyword |
|||
placeholder="请搜索项目名称" |
|||
:remote-method="remoteMethod" |
|||
:loading="loading" |
|||
@change="changeProject" |
|||
style="width: 700px" |
|||
> |
|||
<el-option |
|||
v-for="item in options" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<!-- </el-row> --> |
|||
<el-button type="primary" @click="onSubmit">保存</el-button> |
|||
<el-button @click="cancel">取消</el-button> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { |
|||
listPlanInfo, |
|||
getPlanInfo, |
|||
delPlanInfo, |
|||
addPlanInfo, |
|||
updatePlanInfo, |
|||
exportPlanInfo, |
|||
} from "@/api/earlyStage/PlanInfo"; |
|||
import { listProjectinfo } from "@/api/earlyStage/projectinfo"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
// 表单基础信息 |
|||
baseMsg: {}, |
|||
// 规划类型字典 |
|||
planTypeOptions: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
projectName: null, |
|||
projectType: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
// ============项目选择============ |
|||
// 1、选项 |
|||
options: [], |
|||
// 2、选中的值 |
|||
value: "", |
|||
// 3、从后端获取到的所有项目信息 |
|||
list: [], |
|||
// 4、加载 |
|||
loading: false, |
|||
}; |
|||
}, |
|||
created() { |
|||
if (this.$route.query.baseDataId) { |
|||
this.getList(); |
|||
} |
|||
this.getDicts("project_plan_type").then((response) => { |
|||
// 获取规划类型 |
|||
this.planTypeOptions = response.data; |
|||
}); |
|||
}, |
|||
mounted() { |
|||
// this.list = this.states.map(item => { |
|||
// return { value: `value:${item}`, label: `label:${item}` }; |
|||
// }); |
|||
listProjectinfo({}).then((response) => { |
|||
this.list = response.records.map((item) => { |
|||
return { |
|||
value: item.proNo, |
|||
label: item.projectName, |
|||
}; |
|||
}); |
|||
// console.log("this.list", this.list); |
|||
}); |
|||
}, |
|||
methods: { |
|||
/** 查询专题项目前期背景信息列表 */ |
|||
getList() { |
|||
this.queryParams.data.id = this.$route.query.baseDataId; |
|||
listPlanInfo(this.queryParams).then((response) => { |
|||
this.baseMsg = response.records[0]; |
|||
// 当计划有项目编号时,将 关联项目的选择框 赋值为 对应的项目名称 |
|||
if (this.baseMsg.proNo) |
|||
listProjectinfo({ data: { proNo: this.baseMsg.proNo } }).then( |
|||
(response) => { |
|||
this.value = response.records[0].projectName; |
|||
// console.log("response.records", response.records); |
|||
} |
|||
); |
|||
// console.log("formData in planBasePage", this.baseMsg); |
|||
}); |
|||
}, |
|||
// 关联项目选择 |
|||
remoteMethod(query) { |
|||
if (query !== "") { |
|||
this.loading = true; |
|||
setTimeout(() => { |
|||
this.loading = false; |
|||
this.options = this.list.filter((item) => { |
|||
return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1; |
|||
}); |
|||
}, 200); |
|||
} else { |
|||
this.options = []; |
|||
} |
|||
}, |
|||
// 选择关联项目 |
|||
changeProject(value) { |
|||
// console.log("value", value); |
|||
this.baseMsg.proNo = value; |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.$router.push("/project/plan"); |
|||
}, |
|||
onSubmit() { |
|||
// 表单校验方法 |
|||
this.$refs.form.validate((valid) => { |
|||
if (valid) { |
|||
if (this.baseMsg.id != null) { |
|||
updatePlanInfo(this.baseMsg).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
} |
|||
}); |
|||
} else { |
|||
// this.baseMsg.planId = this.baseMsg.id; |
|||
addPlanInfo(this.baseMsg).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.$router.push("/project/plan"); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
Loading…
Reference in new issue