12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
-
- <uni-check-list
- :listData="list"
- checkIconPositon="right"
- :showArrow="false"
- :defValue="value"
- :types="type"
- :status="status"
- :noDataText="noDataText"
- backValue="objArr"
- @ok="chooseOk">
- </uni-check-list>
- </template>
- <script>
- import {findUserList} from '@/api/user.js'
- export default {
- data() {
- return {
- list: [],
- value: [],
- noDataText: '暂无抄送人数据',
- type: '',
- status: 'loading'
- }
- },
- onLoad(opts) {
- this.value = opts.item&&JSON.parse(opts.item)||[]
- this.type = opts.type && opts.type || 'checkbox'
- console.log(this.value)
-
- this.status = 'loading'
- uni.showLoading({
- title: '加载中...'
- })
-
- const loginUserId = this.$store.state.vuex_userData.userid
-
- findUserList({loginFlag:'1'}).then(res=>{
- if(res.status == 200){
- this.list = res.data || []
- this.list.map(item=>{
- if (item.id==loginUserId) {
- item.disabled = true
- }
- })
- console.log(this.list,'this.list')
- } else {
- this.noDataText = res.message
- }
- this.status = 'nomore'
- uni.hideLoading()
- })
- },
- methods: {
-
- chooseOk(item) {
- console.log(item)
-
- uni.$emit("selKpUsers",item)
- uni.navigateBack()
- },
- }
- }
- </script>
- <style lang="scss">
- page{
- height: 100%;
- }
- </style>
|