feat: base 优化ticket组件
This commit is contained in:
		
							parent
							
								
									dcd82aba7b
								
							
						
					
					
						commit
						6da3bb96e0
					
				| 
						 | 
				
			
			@ -90,19 +90,18 @@
 | 
			
		|||
	
 | 
			
		||||
	const ticket_f = ref({});
 | 
			
		||||
	const isOwn = ref(false);
 | 
			
		||||
	watch(
 | 
			
		||||
	  () => props.ticket_,
 | 
			
		||||
	  async (newVal) => {
 | 
			
		||||
	    if (newVal && Object.keys(newVal).length > 0) {
 | 
			
		||||
	      if(props.ticket_.create_by === uni.getStorageSync("userInfo").id){
 | 
			
		||||
	      	isOwn.value = true;
 | 
			
		||||
	      }
 | 
			
		||||
	    }
 | 
			
		||||
	  },
 | 
			
		||||
	  { immediate: false }
 | 
			
		||||
	)
 | 
			
		||||
	onMounted(() => {
 | 
			
		||||
		
 | 
			
		||||
		watch(
 | 
			
		||||
		  () => props.ticket_,
 | 
			
		||||
		  async (newVal) => {
 | 
			
		||||
		    if (newVal && Object.keys(newVal).length > 0) {
 | 
			
		||||
		      if(props.ticket_.create_by === uni.getStorageSync("userInfo").id){
 | 
			
		||||
		      	isOwn.value = true;
 | 
			
		||||
		      }
 | 
			
		||||
		    }
 | 
			
		||||
		  },
 | 
			
		||||
		  { immediate: false, deep: true }
 | 
			
		||||
		)
 | 
			
		||||
	})
 | 
			
		||||
	
 | 
			
		||||
	const popup = ref(null);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,8 +36,17 @@ const props = defineProps({
 | 
			
		|||
const workflow = ref(null);
 | 
			
		||||
const transitions = ref([]);
 | 
			
		||||
onMounted(async () => {
 | 
			
		||||
    await getUser()
 | 
			
		||||
	setTimeout(()=>{init()}, 500)
 | 
			
		||||
	// setTimeout(()=>{init()}, 500)
 | 
			
		||||
	await init();
 | 
			
		||||
	watch(
 | 
			
		||||
	  () => props.ticket_,
 | 
			
		||||
	  async (newVal) => {
 | 
			
		||||
	    if (newVal && Object.keys(newVal).length > 0) {
 | 
			
		||||
			await init();
 | 
			
		||||
	    }
 | 
			
		||||
	  },
 | 
			
		||||
	  { deep: true }
 | 
			
		||||
	)
 | 
			
		||||
})
 | 
			
		||||
const actionShow = ref(false);
 | 
			
		||||
const suggestion = ref("")
 | 
			
		||||
| 
						 | 
				
			
			@ -66,10 +75,6 @@ const init = async () => {
 | 
			
		|||
		})
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
const currentUser = ref(null);
 | 
			
		||||
const getUser = async() =>{
 | 
			
		||||
	currentUser.value = uni.getStorageSync("userInfo").id
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const isSaveing = ref(false);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue