|
|
@@ -42,12 +42,63 @@
|
|
|
>
|
|
|
打印
|
|
|
</el-button>
|
|
|
+
|
|
|
+ <div class="tip">提示:企业可自行上传全部历史专利信息和资料,如专利与系统中已建档的研究项目无关,则研发项目编号和研发项目名称非必填。</div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="kfwcrqSearch">
|
|
|
+ <span>开发完成时间:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="params.kfwcrq"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ value-format="yyyy-MM-DD"
|
|
|
+ style="width: 220px !important;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="scfbrqSearch">
|
|
|
+ <span>首次发布时间:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="params.scfbrq"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ style="width: 220px !important;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="djpzrqSearch">
|
|
|
+ <span>登记批准日期:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="params.djpzrq"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ style="width: 220px !important;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="xmIdForm">
|
|
|
+ <project-select v-model="form.xmId" @change="handleProjectChange"></project-select>
|
|
|
</template>
|
|
|
- <template slot="menuLeft">
|
|
|
|
|
|
+ <template slot="attachment" slot-scope="{ row }">
|
|
|
+ <div v-for="(file, index) of row.attachment" :key="index">
|
|
|
+ <el-link @click="handleDownFile(file)">{{ file.label }}</el-link>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
+
|
|
|
<upload-excel-dialog ref="uploadExcelDialog" :uploadAfter="uploadAfter"/>
|
|
|
+
|
|
|
<WideTablePrinter
|
|
|
ref="printWideTable"
|
|
|
:columns="wideTableColumns"
|
|
|
@@ -66,55 +117,109 @@ import NProgress from 'nprogress';
|
|
|
import 'nprogress/nprogress.css';
|
|
|
import {getToken} from "@/util/auth";
|
|
|
import {downloadXls} from "@/util/util";
|
|
|
+import projectSelect from "@/components/project-select";
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
|
components: {
|
|
|
UploadExcelDialog,
|
|
|
+ projectSelect
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- params: {},
|
|
|
wideTableColumns: [],
|
|
|
printTitle: "",
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ getSearchParams() {
|
|
|
+ const newParams = { ...this.params };
|
|
|
+ if (newParams.kfwcrq && newParams.kfwcrq.length) {
|
|
|
+ newParams.kfwcrqStart = newParams.kfwcrq[0];
|
|
|
+ newParams.kfwcrqEnd = newParams.kfwcrq[1];
|
|
|
+ }
|
|
|
+ if (newParams.scfbrq && newParams.scfbrq.length) {
|
|
|
+ newParams.scfbrqStart = newParams.scfbrq[0];
|
|
|
+ newParams.scfbrqEnd = newParams.scfbrq[1];
|
|
|
+ }
|
|
|
+ if (newParams.djpzrq && newParams.djpzrq.length) {
|
|
|
+ newParams.djpzrqStart = newParams.djpzrq[0];
|
|
|
+ newParams.djpzrqEnd = newParams.djpzrq[1];
|
|
|
+ }
|
|
|
+ delete newParams.kfwcrq;
|
|
|
+ delete newParams.scfbrq;
|
|
|
+ delete newParams.djpzrq;
|
|
|
+ return newParams;
|
|
|
+ },
|
|
|
+ searchChange(params, done, type) {
|
|
|
+ if (done) done();
|
|
|
+ if (this.validatenull(params)) {
|
|
|
+ Object.keys(this.params).forEach(ele => {
|
|
|
+ if (!['createTime_dategt', 'createTime_datelt', 'kfwcrq', 'scfbrq', 'djpzrq'].includes(ele)) {
|
|
|
+ delete this.params[ele];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ Object.keys(params).forEach(ele => {
|
|
|
+ if (this.validatenull(params[ele])) {
|
|
|
+ delete this.params[ele];
|
|
|
+ delete params[ele];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.params = Object.assign(this.params, params);
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ getFormData() {
|
|
|
+ let newFormData = { ...this.form };
|
|
|
+ if (!!newFormData.attachment) {
|
|
|
+ newFormData.attachment = JSON.stringify(newFormData.attachment);
|
|
|
+ }
|
|
|
+ return newFormData;
|
|
|
+ },
|
|
|
+ handleProjectChange(data){
|
|
|
+ this.form = {
|
|
|
+ ...this.form,
|
|
|
+ xmmc: data.xmmc,
|
|
|
+ xmbh: data.xmbh
|
|
|
+ }
|
|
|
+ },
|
|
|
handleImport() {
|
|
|
- // let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
|
this.$refs.uploadExcelDialog.open('/api/kd-scientific/kycg/rjzzq/import', {});
|
|
|
},
|
|
|
uploadAfter() {
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "导入成功!"
|
|
|
- });
|
|
|
this.page.currentPage = 1;
|
|
|
this.getList(this.page);
|
|
|
},
|
|
|
handleExport() {
|
|
|
- this.$confirm("是否导出吗?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- NProgress.start();
|
|
|
- exportBlob(`/api/kd-scientific/kycg/rjzzq/export?${this.website.tokenHeader}=${getToken()}`, {}).then(res => {
|
|
|
- downloadXls(res.data, `软件著作.xlsx`);
|
|
|
- NProgress.done();
|
|
|
- })
|
|
|
- });
|
|
|
+ exportBlob(`/api/kd-scientific/kycg/rjzzq/export?${this.website.tokenHeader}=${getToken()}`, {}).then(res => {
|
|
|
+ downloadXls(res.data, `软件著作列表.xlsx`);
|
|
|
+ NProgress.done();
|
|
|
+ })
|
|
|
},
|
|
|
printTable() {
|
|
|
this.wideTableColumns = this.$refs.crud.columnOption;
|
|
|
- this.printTitle = `科研成果`;
|
|
|
+ this.printTitle = `软件著作列表`;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.printWideTable.printTable(false);
|
|
|
})
|
|
|
},
|
|
|
+ handleDownFile(file) {
|
|
|
+ window.open(file.value, "_blank");
|
|
|
+ }
|
|
|
},
|
|
|
}, {
|
|
|
// 模块路径
|
|
|
- name: 'achievement/softWorks'
|
|
|
+ name: 'achievement/softWorks',
|
|
|
+ res: ({ data }) => {
|
|
|
+ data.records = data.records.map(item => {
|
|
|
+ item.xmId = item.xmId === 0 ? '' : item.xmId;
|
|
|
+ item.attachment = !!item.attachment ? JSON.parse(item.attachment) : [];
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+
|
|
|
+ return data;
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|