| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <view class="marginTop">
- <uni-swipe-action>
- <uni-swipe-action-item v-for="(item,index) in list" :key="item.id" :right-options="options"
- @click="goDetail(item.id)" @change="swipeChange($event, index)">
- <!-- 进度组件 -->
- <view @click="goDetail(item.id)">
- <OrderList
- lable1="" :value1="item.code"
- lable2="" :value2="item.executor.name"
- lable3="" :value3="item.maintainDept"
- lable4="" :value4="item.maintainType == '1' ? '普通保养' : '润滑保养'"
- lable5="" :value5="type == '1'?'待执行' : '已执行'"
- lable6="" :value6="item.appointTime" :type="type"></OrderList>
- </view>
- </uni-swipe-action-item>
- </uni-swipe-action>
- </view>
- </template>
- <script>
- import CellTip from '@/components/CellTip.vue'
- import OrderList from '../components/OrderList.vue'
- export default {
- components: {
- CellTip,
- OrderList
- },
- props:{
- type:{
- type:[String,Number]
- },
- list:{
- type: Array,
- default:[]
- }
- },
- data() {
- return {
- options: [{
- text: '接单',
- style: {
- "backgroundColor": '#157A2C',
- "fontSize": "14px",
- "disableScroll": true,
- "app-plus": {
- "bounce": "none"
- }
- }
- }]
-
- }
- },
- methods: {
- swipeChange(e, index) {
- console.log('当前状态:' + e + ',下标:' + index)
- },
- goDetail(id){
- uni.navigateTo({
- url:'../detail/detail?id=' +id
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .marginTop {
- border-top: 20rpx solid $page-bg;
- }
- </style>
|