Commit 8bb6b317 authored by 徐俊's avatar 徐俊

xujun

parent cb5dec1b
<template> <template>
<div> <div>
<a-select placeholder="输入学科代码名称" :default-active-first-option="false" showSearch <a-select v-model="selected" placeholder="输入学科代码名称" :default-active-first-option="false" showSearch
:show-arrow="false" :filter-option="false" @search="onSearch" @change="handleChange" :style="{width: width + 'px'}"> :show-arrow="false" :filter-option="false" @search="onSearch" @change="handleChange" :style="{width: width + 'px'}" allowClear>
<a-select-option v-for="item in selectArray" :key="item.key" :value="item.key"> <a-select-option v-for="item in selectArray" :key="item.key" :value="item.key">
{{ item.title }} {{ item.title }}
</a-select-option> </a-select-option>
...@@ -40,7 +40,8 @@ export default { ...@@ -40,7 +40,8 @@ export default {
}; };
}, },
created() { created() {
//this.loadValue() if (this.value)
this.selected = this.value
}, },
methods: { methods: {
onSearch(value) { onSearch(value) {
...@@ -87,18 +88,28 @@ export default { ...@@ -87,18 +88,28 @@ export default {
} }
} }
this.$emit("input", this.selected) this.$emit("input", this.selected)
},
reset() {
this.selected = undefined
this.selectArray = []
this.$nextTick(() => {
this.$emit('input', undefined)
this.$emit('change')
})
} }
}, },
watch: { watch: {
value: { value: {
handler (value) { handler (value) {
if (!!!value) { if (!value) {
this.selected = null this.selected = undefined
} this.selectArray = []
else } else {
this.selected = value + '' this.selected = value + ''
}
this.$emit("input", this.selected) this.$emit("input", this.selected)
}, },
immediate: true
}, },
} }
}; };
......
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
<a-input placeholder="申请编号" v-model="searchForm.appNo" :maxLength="100" style="width: 120px" /> <a-input placeholder="申请编号" v-model="searchForm.appNo" :maxLength="100" style="width: 120px" />
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<!-- <para-multi-select v-model="searchForm.knowledgeId" @parentChange="parChange" :typeId="57" :width="120" /> --> <knowledge-select ref="knowledgeSelectRef" v-model="searchForm.knowledgeId"></knowledge-select>
<knowledge-select v-model="searchForm.knowledgeId"></knowledge-select>
</a-form-item> </a-form-item>
<!-- <br /> -->
<a-form-item> <a-form-item>
<a-input v-model="searchForm.certId" placeholder="申报人证件号" :maxLength="100" style="width: 160px" /> <a-input v-model="searchForm.certId" placeholder="申报人证件号" :maxLength="100" style="width: 160px" />
</a-form-item> </a-form-item>
...@@ -94,7 +92,6 @@ export default { ...@@ -94,7 +92,6 @@ export default {
getListByPage () { getListByPage () {
this.loading = true this.loading = true
this.searchForm.knowledgeCode = this.searchForm.knowledgeId this.searchForm.knowledgeCode = this.searchForm.knowledgeId
this.searchForm.knowledgeId = null
let pars = isEmptyParams(this.searchForm) let pars = isEmptyParams(this.searchForm)
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize } let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.projectAssign.getUnAssignProjectListByPage(par).then(({ data = {} }) => { this.$api.projectAssign.getUnAssignProjectListByPage(par).then(({ data = {} }) => {
...@@ -116,7 +113,15 @@ export default { ...@@ -116,7 +113,15 @@ export default {
reset () { reset () {
this.searchForm.projName = '' this.searchForm.projName = ''
this.searchForm.appNo = '' this.searchForm.appNo = ''
this.searchForm.knowledgeId = '' this.searchForm.knowledgeId = undefined
this.searchForm.certId = ''
this.searchForm.appPersonName = ''
this.searchForm.appUnitName = ''
if (this.$refs.knowledgeSelectRef) {
this.$refs.knowledgeSelectRef.reset()
}
this.pagination.pageIndex = 1 this.pagination.pageIndex = 1
this.getListByPage() 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