<template>
  <i-frame :src="url" />
</template>
<script lang="ts" setup name="wf-start">
  import iFrame from '/@/components/iFrame/index.vue';
  import { ref,onMounted,toRaw } from 'vue';
  import { useUserStoreWithOut } from '/@/store/modules/user';
   import { useRoute } from 'vue-router';
   import { defHttp } from '/@/utils/http/axios';
import { getToken } from '/@/utils/auth';
  const user = useUserStoreWithOut();
  const route = useRoute();
  const paramval = ref('');

  const url = ref('');


 // http://47.98.203.68:82/#/WF/MyFlow?WorkID=215631418&FK_Flow=093&PWorkID=0&PFlowNo=&FK_Node=9302&FID=0&Token=8671b894b2ae4861af9849e83bafbe34&win=true
  
onMounted(() => {
  let  WorkID = toRaw(route.query).WorkID;
  let  FK_Flow = toRaw(route.query).FK_Flow;
  let  PWorkID = toRaw(route.query).PWorkID;
  let  FK_Node = toRaw(route.query).FK_Node;
  let  FID = toRaw(route.query).FID;
 
  let token=user.getJflowToken;


  paramval.value='WorkID='+WorkID+'&FK_Flow='+FK_Flow+
                 '&PWorkID='+PWorkID+'&FK_Node='+FK_Node+'&FID='+FID+'&PFlowNo='+
                  '&Token='+token+'&win=true';

  
  

  url.value=import.meta.env.VITE_APP_JFLOW_CORE_ADDR+'/#/WF/MyFlow?'+paramval.value;



  console.log('why faqi----------------- url.value: ',  url.value);
  })

/**
  const url = ref(
    `${import.meta.env.VITE_APP_JFLOW_CORE_ADDR}/#/WF/MyFlow?DoWhat=Start&Token=${
      user.getJflowToken
    }`
  );
  */
//const url = ref("http://127.0.0.1:82/#/WF/MyFlow?FlowNo=093&RouteFrom=MyFlow&visible=false&No=093&Name=%E6%8A%A5%E9%80%81%E5%86%85%E5%AE%B9%E5%AE%A1%E6%89%B9&IsBatchStart=0&Icon=icon-plane&FK_FlowSort=101&FK_FlowSortText=%E6%B5%81%E7%A8%8B%E5%9F%BA%E7%A1%80&DomainExt=&MobileColorType=0&IsStartInMobile=1&Idx=0&WorkModel=0&SortIdx=0&FlowMark=&FlowSortIcon=icon-social-github&Btns=%E6%B5%81%E7%A8%8B%E5%88%97%E8%A1%A8&Token=c7695f5c3c664d3c8cd63f521ef39d9d&win=true");
                  


  

</script>
