Commit 0e2a854d authored by 徐俊's avatar 徐俊

xujun

parent f381232f
<template>
<div>
<a-select v-model="selected" showSearch placeholder="学科代码或学科名称" :default-active-first-option="false"
:show-arrow="false"
:filter-option="false" @search="onSearch" @change="handleChange" :style="{width: width + 'px'}">
<a-select placeholder="输入学科代码名称" :default-active-first-option="false" showSearch
:show-arrow="false" :filter-option="false" @search="onSearch" @change="handleChange" :style="{width: width + 'px'}">
<a-select-option v-for="item in selectArray" :key="item.key" :value="item.key">
{{ item.title }}
</a-select-option>
......@@ -30,7 +29,7 @@ export default {
data() {
return {
selectArray: [],
selected: '',
selected: null,
defaultValue: {
title: "--请选择" + this.title + "--",
key: "",
......@@ -41,8 +40,7 @@ export default {
};
},
created() {
this.se
this.loadValue()
//this.loadValue()
},
methods: {
onSearch(value) {
......@@ -54,7 +52,7 @@ export default {
// 模拟从数据库查询数据
if (data && data.length > 0) {
this.selectArray = data
}
}
// else {
// this.selectArray.push({ title: value, key: "00000000-0000-0000-0000-000000000000" })
// }
......@@ -95,11 +93,10 @@ export default {
value: {
handler (value) {
if (!!!value)
this.selected = ''
this.selected = null
else
this.selected = value + ''
this.$emit("input", this.selected)
console.log(this.selected)
},
},
}
......
......@@ -5,7 +5,7 @@
<a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 120px" />
</a-form-item>
<a-form-item>
<a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 120px" />
<a-input placeholder="申请编号" v-model="searchForm.appNo" :maxLength="100" style="width: 120px" />
</a-form-item>
<a-form-item>
<!-- <para-multi-select v-model="searchForm.knowledgeId" @parentChange="parChange" :typeId="57" :width="120" /> -->
......@@ -23,7 +23,7 @@
</a-form-item>
<a-form-item>
<a-button type="primary" icon="search" @click="search">搜索</a-button>
<!-- <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> -->
<a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
</a-form-item>
</a-form>
<a-divider style="height: 1px; background-color: #e8e8e8;" />
......@@ -60,13 +60,14 @@ export default {
columns: [
// { title: "项目名称", scopedSlots: { customRender: 'projName' } },
{ title: "项目名称", dataIndex: 'projName', align: 'left', width: 200, ellipsis: true },
{ title: '项目编号', dataIndex: 'projNo', align: 'center', width: 160 },
//{ title: '项目编号', dataIndex: 'projNo', align: 'center', width: 160 },
{ title: '申请编号', dataIndex: 'appNo', align: 'center', width: 160 },
{ title: '学科', dataIndex: 'knowledgeName', align: 'center', width: 100 },
{ title: '申报单位', dataIndex: 'appUnitName', align: 'center', width: 160, ellipsis: true },
{ title: '证件号', dataIndex: 'certId', align: 'center', width: 150 },
{ title: '申报人', dataIndex: 'appPersonName', align: 'center', width: 80 }
],
searchForm: { groupId: null, appPersonName: null, reportYear: null, knowledgeId: null, knowledgeParentId: null, projName: null, projNo: null, projType: getType(), appUnitName: null },
searchForm: { groupId: null, appPersonName: null, reportYear: null, knowledgeCode: null, knowledgeId: null, knowledgeParentId: null, projName: null, appNo: null, projType: getType(), appUnitName: null },
pagination: {
pageIndex: 1,
pageSize: this.$defaultPageSize,
......@@ -92,6 +93,8 @@ export default {
},
getListByPage () {
this.loading = true
this.searchForm.knowledgeCode = this.searchForm.knowledgeId
this.searchForm.knowledgeId = null
let pars = isEmptyParams(this.searchForm)
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.projectAssign.getUnAssignProjectListByPage(par).then(({ data = {} }) => {
......@@ -112,6 +115,7 @@ export default {
},
reset () {
this.searchForm.projName = ''
this.searchForm.appNo = ''
this.pagination.pageIndex = 1
this.getListByPage()
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment