Commit 66748ead authored by 邓春圆's avatar 邓春圆

搜索调整

parent 290255a4
......@@ -4,13 +4,13 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-select v-model="query.sourceCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-option v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('币种2')" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-select v-model="query.targetCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-option v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
......@@ -178,6 +178,19 @@ export default {
components: {
Template
},
watch:{
'query.targetCurrencyId'(val){
if(!val){
this.queryParams.targetCurrencyId = undefined
}
},
'query.sourceCurrencyId'(val){
if(!val){
this.queryParams.sourceCurrencyId = undefined
}
}
},
data() {
return {
status:0,
......@@ -207,6 +220,10 @@ export default {
sourceCurrencyId: null,
targetCurrencyId: null,
},
query:{
sourceCurrencyId:null,
targetCurrencyId:null,
},
// 表单参数
form: {},
// 表单校验
......@@ -306,16 +323,25 @@ export default {
};
this.resetForm("form");
},
secondarySelection(){
this.queryParams.targetCurrencyId = this.query.targetCurrencyId
this.queryParams.sourceCurrencyId = this.query.sourceCurrencyId
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.secondarySelection()
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
// this.dateRangeCreateTime = [];
// this.resetForm("queryForm");
// this.handleQuery();
this.query.targetCurrencyId = undefined
this.query.sourceCurrencyId = undefined
this.secondarySelection() //清空选中目标
this.getList();
},
/** 新增按钮操作 */
handleAdd() {
......
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