<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';
  const user = useUserStoreWithOut();
  const route = useRoute();
  const paramval = ref('');

  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=cafc72ad2ac74391a413a7fd5b485b74&win=true
  
onMounted(() => {
  let  No = toRaw(route.query).No;
  let  Name = toRaw(route.query).Name;
  let  IsBatchStart = toRaw(route.query).IsBatchStart;
  let  Icon = toRaw(route.query).Icon;
  let  FK_FlowSort = toRaw(route.query).FK_FlowSort;
  let  FK_FlowSortText = toRaw(route.query).FK_FlowSortText;
  let  MobileColorType = toRaw(route.query).MobileColorType;
  let  IsStartInMobile = toRaw(route.query).IsStartInMobile;
  let  Idx = toRaw(route.query).Idx;
  let  WorkModel = toRaw(route.query).WorkModel;
  let  SortIdx = toRaw(route.query).SortIdx;
  let token=user.getJflowToken;

   console.log('why faqi----------------- token: user.getJflowToken',  token);
  


  paramval.value='FlowNo='+No+'&RouteFrom=MyFlow&visible=false&No='+No+'&Name='+Name+'&IsBatchStart='+IsBatchStart+
                 '&Icon='+Icon+'&FK_FlowSort='+FK_FlowSort+'&FK_FlowSortText='+FK_FlowSortText+'&DomainExt='+
                 '&MobileColorType='+MobileColorType+'&IsStartInMobile='+IsStartInMobile+'&Idx='+Idx+
                 '&WorkModel='+WorkModel+'&SortIdx='+SortIdx+'&FlowMark=&FlowSortIcon=icon-frame&Btns=流程列表'+
                 '&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>
