动态数据增加地区查询
This commit is contained in:
@@ -59,6 +59,11 @@
|
||||
<option value="-1">无</option>
|
||||
</select>
|
||||
</div>
|
||||
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="partitionId" id="partitionId" class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
@@ -194,6 +199,8 @@
|
||||
<script>
|
||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
import { showLoading, hideLoading } from '@/utils/maintainer';
|
||||
import { getPartitionInfoList } from '@/api/partition/partitionInfo';
|
||||
import { buildSelectOption } from '@/utils/system-helper';
|
||||
|
||||
|
||||
var picker1 = $("#beginDate").datetimepicker({
|
||||
@@ -257,6 +264,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
@@ -383,7 +391,8 @@ export default {
|
||||
dynamicLab: $('#dynamicLab').val(),
|
||||
/*hotValueStart : $('#hotValueStart').val(),
|
||||
hotValueEnd : $('#hotValueEnd').val(),*/
|
||||
topStatus: $('#topStatus').val()
|
||||
topStatus: $('#topStatus').val(),
|
||||
partitionId: $('#partitionId').val(),
|
||||
};
|
||||
return param;
|
||||
},
|
||||
@@ -696,7 +705,25 @@ export default {
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
initPartition() {
|
||||
getPartitionInfoList().then(res => {
|
||||
let data = res.data;
|
||||
buildSelectOption(
|
||||
"#partitionId",
|
||||
null,
|
||||
[{
|
||||
value: '',
|
||||
text: '全部'
|
||||
}].concat(data.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
text: v.desc,
|
||||
};
|
||||
}))
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user