|
@@ -9,7 +9,7 @@
|
|
|
<div class="info-row">{{ `项目执行期:${ getXmDateRange || '' }` }}</div>
|
|
<div class="info-row">{{ `项目执行期:${ getXmDateRange || '' }` }}</div>
|
|
|
<div class="info-row">
|
|
<div class="info-row">
|
|
|
<span>填报时间:</span>
|
|
<span>填报时间:</span>
|
|
|
- <span><el-date-picker v-model="formData.tbsj" value-format="yyyy-MM-dd" /></span>
|
|
|
|
|
|
|
+ <span><el-date-picker v-model="formData.fillDate" value-format="yyyy-MM-dd" /></span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -26,6 +26,21 @@
|
|
|
<td class="doc-label">项目申请单位</td>
|
|
<td class="doc-label">项目申请单位</td>
|
|
|
<td class="doc-input">{{ selProject.xmsqdw }}</td>
|
|
<td class="doc-input">{{ selProject.xmsqdw }}</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
|
|
+
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td class="doc-label">项目编号</td>
|
|
|
|
|
+ <td class="doc-input">{{ selProject.xmbh }} </td>
|
|
|
|
|
+ <td class="doc-label">项目实施类型</td>
|
|
|
|
|
+ <td class="doc-input">
|
|
|
|
|
+ <avue-select
|
|
|
|
|
+ v-model="formData.type"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ :dic="typeList"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ ></avue-select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+
|
|
|
<tr>
|
|
<tr>
|
|
|
<td class="doc-label">项目负责人</td>
|
|
<td class="doc-label">项目负责人</td>
|
|
|
<td class="doc-input">{{ selProject.xmfzrxm }} </td>
|
|
<td class="doc-input">{{ selProject.xmfzrxm }} </td>
|
|
@@ -58,11 +73,11 @@
|
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
<avue-form v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
|
|
<avue-form v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
|
|
|
- <template slot="jdbgLabel">
|
|
|
|
|
- <label>季度报告</label>
|
|
|
|
|
|
|
+ <template slot="attachmentLabel">
|
|
|
|
|
+ <label>附件信息</label>
|
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
- <template slot="zqbgLabel">
|
|
|
|
|
|
|
+ <!-- <template slot="zqbgLabel">
|
|
|
<label>中期报告</label>
|
|
<label>中期报告</label>
|
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
</template>
|
|
</template>
|
|
@@ -77,7 +92,7 @@
|
|
|
<template slot="qtjdxzjbgLabel">
|
|
<template slot="qtjdxzjbgLabel">
|
|
|
<label>其他阶段性总结报告</label>
|
|
<label>其他阶段性总结报告</label>
|
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
<el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
</avue-form>
|
|
</avue-form>
|
|
|
<p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
<p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
|
|
|
|
|
|
|
@@ -89,13 +104,14 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import projectSelect from "@/components/project-select";
|
|
import projectSelect from "@/components/project-select";
|
|
|
|
|
+import { getDictionary } from "@/api/system/dictbiz";
|
|
|
import { save, getDetail } from "@/api/projectManage/implement";
|
|
import { save, getDetail } from "@/api/projectManage/implement";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
|
projectId: [String, Number],
|
|
projectId: [String, Number],
|
|
|
- yearAndMonth: [Number, String]
|
|
|
|
|
|
|
+ data: Object,
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
|
projectSelect
|
|
projectSelect
|
|
@@ -105,10 +121,11 @@ export default {
|
|
|
formData: {},
|
|
formData: {},
|
|
|
|
|
|
|
|
loading: false,
|
|
loading: false,
|
|
|
- projectList: [],
|
|
|
|
|
|
|
|
|
|
currProjectId: '',
|
|
currProjectId: '',
|
|
|
selProject: {},
|
|
selProject: {},
|
|
|
|
|
+
|
|
|
|
|
+ typeList: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -126,154 +143,195 @@ export default {
|
|
|
labelWidth: 150,
|
|
labelWidth: 150,
|
|
|
column: [
|
|
column: [
|
|
|
{
|
|
{
|
|
|
- label: "季度报告",
|
|
|
|
|
- prop: "jdbg",
|
|
|
|
|
- type: "upload",
|
|
|
|
|
- multiple: true,
|
|
|
|
|
- span: 24,
|
|
|
|
|
- dataType: "object",
|
|
|
|
|
- propsHttp: {
|
|
|
|
|
- url: "link",
|
|
|
|
|
- name: 'originalName',
|
|
|
|
|
- res: "data",
|
|
|
|
|
- },
|
|
|
|
|
- action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
- uploadPreview: (file, column, done) => {
|
|
|
|
|
- window.open(file.url, "_blank");
|
|
|
|
|
- return;
|
|
|
|
|
- },
|
|
|
|
|
- disabled: !this.currProjectId
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: "中期报告",
|
|
|
|
|
- prop: "zqbg",
|
|
|
|
|
- type: "upload",
|
|
|
|
|
- multiple: true,
|
|
|
|
|
- span: 24,
|
|
|
|
|
- dataType: "object",
|
|
|
|
|
- propsHttp: {
|
|
|
|
|
- url: "link",
|
|
|
|
|
- name: 'originalName',
|
|
|
|
|
- res: "data",
|
|
|
|
|
- },
|
|
|
|
|
- action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
- uploadPreview: (file, column, done) => {
|
|
|
|
|
- window.open(file.url, "_blank");
|
|
|
|
|
- return;
|
|
|
|
|
- },
|
|
|
|
|
- disabled: !this.currProjectId
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: "年度报告",
|
|
|
|
|
- prop: "ndbg",
|
|
|
|
|
|
|
+ label: "附件信息",
|
|
|
|
|
+ prop: "attachment",
|
|
|
type: "upload",
|
|
type: "upload",
|
|
|
multiple: true,
|
|
multiple: true,
|
|
|
span: 24,
|
|
span: 24,
|
|
|
- action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
- uploadPreview: (file, column, done) => {
|
|
|
|
|
- window.open(file.url, "_blank");
|
|
|
|
|
- return;
|
|
|
|
|
- },
|
|
|
|
|
dataType: "object",
|
|
dataType: "object",
|
|
|
propsHttp: {
|
|
propsHttp: {
|
|
|
url: "link",
|
|
url: "link",
|
|
|
name: 'originalName',
|
|
name: 'originalName',
|
|
|
res: "data",
|
|
res: "data",
|
|
|
},
|
|
},
|
|
|
- disabled: !this.currProjectId
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: "里程碑报告",
|
|
|
|
|
- prop: "lcbbg",
|
|
|
|
|
- type: "upload",
|
|
|
|
|
- multiple: true,
|
|
|
|
|
- span: 24,
|
|
|
|
|
action: '/api/kd-resource/oss/endpoint/put-file',
|
|
action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
uploadPreview: (file, column, done) => {
|
|
uploadPreview: (file, column, done) => {
|
|
|
window.open(file.url, "_blank");
|
|
window.open(file.url, "_blank");
|
|
|
return;
|
|
return;
|
|
|
},
|
|
},
|
|
|
- dataType: "object",
|
|
|
|
|
- propsHttp: {
|
|
|
|
|
- url: "link",
|
|
|
|
|
- name: 'originalName',
|
|
|
|
|
- res: "data",
|
|
|
|
|
- },
|
|
|
|
|
- disabled: !this.currProjectId
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: "其他阶段性总结报告",
|
|
|
|
|
- prop: "qtjdxzjbg",
|
|
|
|
|
- type: "upload",
|
|
|
|
|
- multiple: true,
|
|
|
|
|
- span: 24,
|
|
|
|
|
- action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
- uploadPreview: (file, column, done) => {
|
|
|
|
|
- window.open(file.url, "_blank");
|
|
|
|
|
- return;
|
|
|
|
|
- },
|
|
|
|
|
- dataType: "object",
|
|
|
|
|
- propsHttp: {
|
|
|
|
|
- url: "link",
|
|
|
|
|
- name: 'originalName',
|
|
|
|
|
- res: "data",
|
|
|
|
|
- },
|
|
|
|
|
disabled: !this.currProjectId
|
|
disabled: !this.currProjectId
|
|
|
},
|
|
},
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "季度报告",
|
|
|
|
|
+ // prop: "jdbg",
|
|
|
|
|
+ // type: "upload",
|
|
|
|
|
+ // multiple: true,
|
|
|
|
|
+ // span: 24,
|
|
|
|
|
+ // dataType: "object",
|
|
|
|
|
+ // propsHttp: {
|
|
|
|
|
+ // url: "link",
|
|
|
|
|
+ // name: 'originalName',
|
|
|
|
|
+ // res: "data",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
+ // uploadPreview: (file, column, done) => {
|
|
|
|
|
+ // window.open(file.url, "_blank");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // disabled: !this.currProjectId
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "中期报告",
|
|
|
|
|
+ // prop: "zqbg",
|
|
|
|
|
+ // type: "upload",
|
|
|
|
|
+ // multiple: true,
|
|
|
|
|
+ // span: 24,
|
|
|
|
|
+ // dataType: "object",
|
|
|
|
|
+ // propsHttp: {
|
|
|
|
|
+ // url: "link",
|
|
|
|
|
+ // name: 'originalName',
|
|
|
|
|
+ // res: "data",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
+ // uploadPreview: (file, column, done) => {
|
|
|
|
|
+ // window.open(file.url, "_blank");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // disabled: !this.currProjectId
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "年度报告",
|
|
|
|
|
+ // prop: "ndbg",
|
|
|
|
|
+ // type: "upload",
|
|
|
|
|
+ // multiple: true,
|
|
|
|
|
+ // span: 24,
|
|
|
|
|
+ // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
+ // uploadPreview: (file, column, done) => {
|
|
|
|
|
+ // window.open(file.url, "_blank");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // dataType: "object",
|
|
|
|
|
+ // propsHttp: {
|
|
|
|
|
+ // url: "link",
|
|
|
|
|
+ // name: 'originalName',
|
|
|
|
|
+ // res: "data",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // disabled: !this.currProjectId
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "里程碑报告",
|
|
|
|
|
+ // prop: "lcbbg",
|
|
|
|
|
+ // type: "upload",
|
|
|
|
|
+ // multiple: true,
|
|
|
|
|
+ // span: 24,
|
|
|
|
|
+ // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
+ // uploadPreview: (file, column, done) => {
|
|
|
|
|
+ // window.open(file.url, "_blank");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // dataType: "object",
|
|
|
|
|
+ // propsHttp: {
|
|
|
|
|
+ // url: "link",
|
|
|
|
|
+ // name: 'originalName',
|
|
|
|
|
+ // res: "data",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // disabled: !this.currProjectId
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "其他阶段性总结报告",
|
|
|
|
|
+ // prop: "qtjdxzjbg",
|
|
|
|
|
+ // type: "upload",
|
|
|
|
|
+ // multiple: true,
|
|
|
|
|
+ // span: 24,
|
|
|
|
|
+ // action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
|
|
+ // uploadPreview: (file, column, done) => {
|
|
|
|
|
+ // window.open(file.url, "_blank");
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // },
|
|
|
|
|
+ // dataType: "object",
|
|
|
|
|
+ // propsHttp: {
|
|
|
|
|
+ // url: "link",
|
|
|
|
|
+ // name: 'originalName',
|
|
|
|
|
+ // res: "data",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // disabled: !this.currProjectId
|
|
|
|
|
+ // },
|
|
|
],
|
|
],
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
currProjectId() {
|
|
currProjectId() {
|
|
|
- this.getImplementDetail();
|
|
|
|
|
|
|
+ // this.getImplementDetail();
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ detailData: {
|
|
|
|
|
+ handler(newVal) {
|
|
|
|
|
+ this.formData = newVal || {};
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.currProjectId = this.projectId || '';
|
|
this.currProjectId = this.projectId || '';
|
|
|
- if (this.currProjectId) {
|
|
|
|
|
- this.getImplementDetail();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.currProjectId) {
|
|
|
|
|
+ // this.getImplementDetail();
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ this.formData = {
|
|
|
|
|
+ ...this.data,
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ this.getDictList("项目实施-阶段性报告-附件类型", "typeList");
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getImplementDetail() {
|
|
|
|
|
- this.loading = true;
|
|
|
|
|
- getDetail({ xmId: this.currProjectId, yearAndMonth: this.yearAndMonth }).then(({ data }) => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- if (data.code == 200 && data.data && Object.keys(data.data).length) {
|
|
|
|
|
- this.formData = {
|
|
|
|
|
- id: data.data.id,
|
|
|
|
|
- xmId: data.data.xmId,
|
|
|
|
|
- tbsj: data.data.tbsj,
|
|
|
|
|
- jdbg: data.data.jdbg ? JSON.parse(data.data.jdbg) : [],
|
|
|
|
|
- zqbg: data.data.zqbg ? JSON.parse(data.data.zqbg) : [],
|
|
|
|
|
- ndbg: data.data.ndbg ? JSON.parse(data.data.ndbg) : [],
|
|
|
|
|
- lcbbg: data.data.lcbbg ? JSON.parse(data.data.lcbbg) : [],
|
|
|
|
|
- qtjdxzjbg: data.data.qtjdxzjbg ? JSON.parse(data.data.qtjdxzjbg) : [],
|
|
|
|
|
- };
|
|
|
|
|
- } else {
|
|
|
|
|
- this.formData = {
|
|
|
|
|
- tbsj: '',
|
|
|
|
|
- jdbg: [],
|
|
|
|
|
- zqbg: [],
|
|
|
|
|
- ndbg: [],
|
|
|
|
|
- lcbbg: [],
|
|
|
|
|
- qtjdxzjbg: [],
|
|
|
|
|
- };
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
|
+ getDictList(code, toListKey) {
|
|
|
|
|
+ getDictionary({ code }).then((res) => {
|
|
|
|
|
+ this[toListKey] = res.data.data.map((item) => {
|
|
|
|
|
+ return { label: item.dictValue, value: item.dictKey };
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ // getImplementDetail() {
|
|
|
|
|
+ // this.loading = true;
|
|
|
|
|
+ // getDetail({ xmId: this.currProjectId, yearAndMonth: this.yearAndMonth }).then(({ data }) => {
|
|
|
|
|
+ // this.loading = false;
|
|
|
|
|
+ // if (data.code == 200 && data.data && Object.keys(data.data).length) {
|
|
|
|
|
+ // this.formData = {
|
|
|
|
|
+ // id: data.data.id,
|
|
|
|
|
+ // xmId: data.data.xmId,
|
|
|
|
|
+ // tbsj: data.data.tbsj,
|
|
|
|
|
+ // jdbg: data.data.jdbg ? JSON.parse(data.data.jdbg) : [],
|
|
|
|
|
+ // zqbg: data.data.zqbg ? JSON.parse(data.data.zqbg) : [],
|
|
|
|
|
+ // ndbg: data.data.ndbg ? JSON.parse(data.data.ndbg) : [],
|
|
|
|
|
+ // lcbbg: data.data.lcbbg ? JSON.parse(data.data.lcbbg) : [],
|
|
|
|
|
+ // qtjdxzjbg: data.data.qtjdxzjbg ? JSON.parse(data.data.qtjdxzjbg) : [],
|
|
|
|
|
+ // };
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.formData = {
|
|
|
|
|
+ // tbsj: '',
|
|
|
|
|
+ // jdbg: [],
|
|
|
|
|
+ // zqbg: [],
|
|
|
|
|
+ // ndbg: [],
|
|
|
|
|
+ // lcbbg: [],
|
|
|
|
|
+ // qtjdxzjbg: [],
|
|
|
|
|
+ // };
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }).catch(() => {
|
|
|
|
|
+ // this.loading = false;
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
handleProjectChange(data) {
|
|
handleProjectChange(data) {
|
|
|
this.selProject = data;
|
|
this.selProject = data;
|
|
|
},
|
|
},
|
|
|
validForm() {
|
|
validForm() {
|
|
|
let errorText = '';
|
|
let errorText = '';
|
|
|
- if (!this.formData.tbsj) {
|
|
|
|
|
|
|
+ if (!this.formData.fillDate) {
|
|
|
errorText = '请选择填报时间';
|
|
errorText = '请选择填报时间';
|
|
|
} else if (!this.currProjectId) {
|
|
} else if (!this.currProjectId) {
|
|
|
errorText = '请选择填报的项目';
|
|
errorText = '请选择填报的项目';
|
|
|
|
|
+ } else if (!this.formData.type) {
|
|
|
|
|
+ errorText = '请选择项目实施类型'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return errorText;
|
|
return errorText;
|
|
@@ -286,18 +344,19 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const params = { ...this.formData, xmId: this.currProjectId };
|
|
const params = { ...this.formData, xmId: this.currProjectId };
|
|
|
- params.jdbg = JSON.stringify(params.jdbg);
|
|
|
|
|
- params.zqbg = JSON.stringify(params.zqbg);
|
|
|
|
|
- params.ndbg = JSON.stringify(params.ndbg);
|
|
|
|
|
- params.lcbbg = JSON.stringify(params.lcbbg);
|
|
|
|
|
- params.qtjdxzjbg = JSON.stringify(params.qtjdxzjbg);
|
|
|
|
|
|
|
+ params.attachment = JSON.stringify(params.attachment);
|
|
|
|
|
+ // params.zqbg = JSON.stringify(params.zqbg);
|
|
|
|
|
+ // params.ndbg = JSON.stringify(params.ndbg);
|
|
|
|
|
+ // params.lcbbg = JSON.stringify(params.lcbbg);
|
|
|
|
|
+ // params.qtjdxzjbg = JSON.stringify(params.qtjdxzjbg);
|
|
|
|
|
|
|
|
this.saveData(params);
|
|
this.saveData(params);
|
|
|
},
|
|
},
|
|
|
saveData(params) {
|
|
saveData(params) {
|
|
|
save(params).then(({ data }) => {
|
|
save(params).then(({ data }) => {
|
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
|
- this.$message.success('保存成功!');
|
|
|
|
|
|
|
+ this.$message.success(params.id ? '修改成功' : '保存成功!');
|
|
|
|
|
+ this.$emit("success");
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|