123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <template>
-
- <uni-check-list :listData="list" :defValue="value" types="radio" @ok="chooseOk" @rightClick="viewDetail">
- <view slot="right">
- 详情
- </view>
- </uni-check-list>
- </template>
- <script>
- import {findScheme} from '@/api/assess'
- export default {
- data() {
- return {
- list: [],
- value: [],
- types: ''
- }
- },
- onLoad(opts) {
- this.value[0]=opts.id
- this.types = opts.types
- let t = {'video':'VIDEO_INSPECTION','scene':'SPOT_INSPECTION'}
-
- findScheme({status:1,scopeType:t[opts.types]}).then(res=>{
- console.log(res)
- if(res.status == 200){
- this.list = res.data
- }
- })
- },
- methods: {
-
- chooseOk(item) {
- console.log(item)
- if(item.length==0){
- uni.showToast({
- icon:'none',
- title:'请选择考评方案'
- })
- }else{
-
- let row = this.list.find(k=> k.id == item[0])
- uni.$emit("resetTaskKpItem",row)
- uni.navigateBack()
- }
- },
-
- viewDetail(item){
- uni.navigateTo({
- url:"/pages/evaluatePlan/planDetail?item="+encodeURIComponent(JSON.stringify(item))
- })
- }
- }
- }
- </script>
- <style lang="scss">
- page{
- height: 100%;
- }
- </style>
|