<template>
	<view class="page">
		<navbar title="合同模板"
		leftClick 
		@leftClick="$utils.navigateBack"/>
		
		<uv-swipe-action>
			<view class="content">
				
				<view class="projectContent"
				v-for="(item, index) in list"
				:key="item.id"
				>
					<uv-swipe-action-item
					@click="e => clickSwipeAction(e, item)"
					:options="options">
						<contractManageItem 
						@click="$utils.navigateTo('/pages_order/contract/contractManageEdit?id=' + item.id)"
						:item="item"/>
					</uv-swipe-action-item>
				</view>
				
			</view>
		</uv-swipe-action>
		
		<view class="plus-contract"
		@click="$utils.navigateTo('/pages_order/contract/contractManageEdit')">
			<uv-icon size="40rpx" color="#fff" name="plus" />
		</view>
		
	</view>
</template>

<script>
	import mixinList from '@/mixins/list.js'
	import contractManageItem from '@/components/list/contract/contractManageItem.vue'
	export default {
		components : {
			contractManageItem,
		},
		mixins : [mixinList],
		data() {
			return {
				mixinsListApi : 'queryContractTemplateList',
				options : [
					{
						text: '删除',
						style: {
							backgroundColor: '#FA5A0A'
						}
					}, 
				],
			}
		},
		methods: {
			clickSwipeAction(e, item){
				this.$api('', {
					
				}).then(res => {
					if(res.code == 200){
						this.getData()
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.page{
		.content {
			width: 100%;
			height: 100%;
			
		}
		.plus-contract{
			position: fixed;
			top: 55%;
			right: 80rpx;
			display: flex;
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			align-items: center;
			justify-content: center;
			background-color: $uni-color;
			z-index: 999;
		}
	}
</style>
