1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
-
- <uni-check-list
- :listData="list"
- checkIconPositon="right"
- :showArrow="false"
- :defValue="value"
- :types="type"
- :noDataText="noDataText"
- backValue="objArr"
- @ok="chooseOk">
- </uni-check-list>
- </template>
- <script>
- import {findStoreList} from '@/api/store'
- export default {
- data() {
- return {
- list: [],
- value: [],
- noDataText: '暂无考评门店',
- type: ''
- }
- },
- onUnload() {
- this.value = []
- this.list = []
- },
- onLoad(opts) {
- this.value = opts.item&&JSON.parse(opts.item)||[]
- this.value.map(item=>{
- item.id = item.storeId || item.id
- })
- this.type = opts.type || 'checkbox'
-
- findStoreList({}).then(res=>{
- if(res.status == 200){
- this.list = res.data || []
- } else {
- this.noDataText = res.message
- }
- })
- },
- methods: {
-
- chooseOk(item) {
- console.log(item)
-
- uni.$emit("selKpStores",item)
- uni.navigateBack()
- },
- }
- }
- </script>
- <style lang="scss">
- page{
- height: 100%;
- }
- </style>
|