|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
const doSearch = (_formData: { page: number; limit: number }, onSuccess: Function) => { |
|
|
|
const doSearch = (_formData : { page : number; limit : number }, onSuccess : Function) => { |
|
|
|
// const submitData = { ...formData } |
|
|
|
// listApi(submitData, userStore.useType).then((res) => { |
|
|
|
// const { data } = res as { data: { data: any; total: number } } |
|
|
|
@ -47,10 +47,10 @@ const doSearch = (_formData: { page: number; limit: number }, onSuccess: Functio |
|
|
|
total: 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const selectIndex = ref(0) |
|
|
|
const buttlist = ref([ |
|
|
|
const selectIndex = ref(0) |
|
|
|
const buttlist = ref([ |
|
|
|
{ |
|
|
|
type: 'agree', |
|
|
|
butname: '同意' |
|
|
|
@ -63,14 +63,25 @@ const buttlist = ref([ |
|
|
|
type: 'neutral', |
|
|
|
butname: '弃权' |
|
|
|
} |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
const selectBut = (data: any, cardid: any,type: string) => { |
|
|
|
const target = data.find((card: { id: any; }) => card.id === cardid); |
|
|
|
const selectBut = (data : any, cardid : any, type : string, butname: string) => { |
|
|
|
const target = data.find((card : { id : any; }) => card.id === cardid); |
|
|
|
uni.showModal({ |
|
|
|
title: '您本轮选举投' + butname + '票', |
|
|
|
content: '确定吗?', |
|
|
|
success: function (res) { |
|
|
|
if (res.confirm) { |
|
|
|
if (target) { |
|
|
|
target.yijian = target.yijian === type ? null : type; |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('用户点击取消'); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
|
@ -97,13 +108,8 @@ const selectBut = (data: any, cardid: any,type: string) => { |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="bottomp"> |
|
|
|
<view |
|
|
|
class="minbut" |
|
|
|
v-for="(item, ele) in buttlist" |
|
|
|
:key="ele" |
|
|
|
@click="selectBut(data,row.id,item.type)" |
|
|
|
:class="{ active: row.yijian === item.type }" |
|
|
|
> |
|
|
|
<view class="minbut" v-for="(item, ele) in buttlist" :key="ele" |
|
|
|
@click="selectBut(data,row.id,item.type,item.butname)" :class="{ active: row.yijian === item.type }"> |
|
|
|
{{ item.butname }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -119,7 +125,7 @@ const selectBut = (data: any, cardid: any,type: string) => { |
|
|
|
</template> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
.box { |
|
|
|
.box { |
|
|
|
width: 100%; |
|
|
|
background-color: #f9fafb; |
|
|
|
|
|
|
|
@ -349,5 +355,5 @@ const selectBut = (data: any, cardid: any,type: string) => { |
|
|
|
bottom: 0; |
|
|
|
border-top: 2rpx solid #ebebec; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |