|
@@ -1,12 +1,21 @@
|
|
|
<template>
|
|
<template>
|
|
|
<basic-container>
|
|
<basic-container>
|
|
|
|
|
+ <div style="margin-top: 6px;">
|
|
|
|
|
+ <el-form :inline="true">
|
|
|
|
|
+ <el-form-item label="研发项目名称">
|
|
|
|
|
+ <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="研发项目编号">
|
|
|
|
|
+ {{ selProject.xmbh }}
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<avue-crud
|
|
<avue-crud
|
|
|
|
|
+ ref="crud"
|
|
|
v-bind="bindVal"
|
|
v-bind="bindVal"
|
|
|
v-on="onEvent"
|
|
v-on="onEvent"
|
|
|
- v-model="form"
|
|
|
|
|
:page.sync="page"
|
|
:page.sync="page"
|
|
|
- :before-open="handleBeforeOpen"
|
|
|
|
|
- :permission="permissionList"
|
|
|
|
|
>
|
|
>
|
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -31,32 +40,53 @@
|
|
|
:rows-per-page="30"
|
|
:rows-per-page="30"
|
|
|
:default-landscape="true"
|
|
:default-landscape="true"
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
</basic-container>
|
|
</basic-container>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {exportBloByPost} from "@/api/common";
|
|
|
|
|
|
|
+import {exportBlob} from "@/api/common";
|
|
|
import {getToken} from "@/util/auth";
|
|
import {getToken} from "@/util/auth";
|
|
|
|
|
+import projectSelect from "@/components/project-select";
|
|
|
import {downloadXls} from "@/util/util";
|
|
import {downloadXls} from "@/util/util";
|
|
|
-import changeForm from "./components/change-form.vue";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
export default window.$crudCommon({
|
|
|
|
|
+ props: {
|
|
|
|
|
+ projectId: [String, Number]
|
|
|
|
|
+ },
|
|
|
components: {
|
|
components: {
|
|
|
- changeForm
|
|
|
|
|
|
|
+ projectSelect
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- drawerVisible: false,
|
|
|
|
|
|
|
+ params: {
|
|
|
|
|
+ xmId: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ selProject: {},
|
|
|
|
|
|
|
|
wideTableColumns: [],
|
|
wideTableColumns: [],
|
|
|
printTitle: "",
|
|
printTitle: "",
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ "params.xmId"() {
|
|
|
|
|
+ this.page.currentPage = 1;
|
|
|
|
|
+ this.getList(this.page);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.params.xmId = this.projectId;
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ loadData() {},
|
|
|
|
|
+ handleProjectChange(data) {
|
|
|
|
|
+ this.selProject = data;
|
|
|
|
|
+ },
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
- exportBloByPost(`/api/kd-scientific/xm-bgrz/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
|
|
- downloadXls(res.data, `项目变更列表.xlsx`);
|
|
|
|
|
|
|
+ exportBlob(`/api/kd-scientific/xm-bgrz/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
|
|
+ downloadXls(res.data, `${this.selProject.xmmc}项目成果.xlsx`);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -65,14 +95,11 @@ export default window.$crudCommon({
|
|
|
*/
|
|
*/
|
|
|
printTable(isLandscape) {
|
|
printTable(isLandscape) {
|
|
|
this.wideTableColumns = this.$refs.crud.columnOption;
|
|
this.wideTableColumns = this.$refs.crud.columnOption;
|
|
|
- this.printTitle = `项目变更列表`;
|
|
|
|
|
|
|
+ this.printTitle = `${this.selProject.xmmc}项目成果`;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.printWideTable.printTable(isLandscape);
|
|
this.$refs.printWideTable.printTable(isLandscape);
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleAddChange() {
|
|
|
|
|
- this.drawerVisible = true;
|
|
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
}, {
|
|
}, {
|
|
|
// 模块路径
|
|
// 模块路径
|