| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view class="mainBox">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="转派" @clickLeft="backAdd">
- <template slot="right">
- <u-button type="success" size="small" class="u-reset-button" @click="classification"
- text="选择分类"></u-button>
- </template>
- </uni-nav-bar>
- <view class="top-wrapper">
- <button class="search_btn" @click="getData()">搜索</button>
- <image class="menu_icon" src="~@/static/pda/menu.svg"></image>
- </view>
- <ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
- :selectedData="selectedData" :localdata="classificationList" valueKey="id" textKey="name"
- childrenKey="children" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- selectedData: ['1'],
- }
- },
- onLoad(params) {
- },
- methods: {
- getData() {
- },
- //返回添加页
- backAdd() {
- uni.navigateBack();
- },
- classification() {
- this.$refs.treePicker._show();
- },
- confirm(id, name, rootCategoryLevelId) {
- this.categoryLevelId = id;
- this.tableList = [];
- this.getData();
- },
- getTreeList() {
- treeByPid({
- ids: [1]
- }).then(res => {
- this.classificationList = res;
- this.confirm(res[0].id, res[0].name)
- })
- },
- }
- }
- </script>
- <style>
- </style>
|