<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://127.0.0.1:82/#/WF/MyCC?WorkID=1922325470&visible=false&MyPK=1922325470_9703_test1&FK_Flow=097
//&Doc=&Rec=ccflow3&RecName=ccflow3&FID=0&NodeName=二级审核&Sta=1&NodeID=9703&FK_Node=9703&NodeIDCC=9703&NodeIDCCName=二级审核&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  MyPK = toRaw(route.query).MyPK;
  let  Sta = toRaw(route.query).Sta;
  let  Rec = toRaw(route.query).Rec;
  let  NodeName = toRaw(route.query).NodeName;
  
  
 
  let token=user.getJflowToken;


  paramval.value='WorkID='+WorkID+'&visible=false&MyPK='+MyPK+'&FK_Flow='+FK_Flow+
                 '&Doc=&Rec='+Rec+'&RecName='+Rec+'&Sta='+Sta+'&FID='+FID+
                 '&NodeName='+NodeName+'&NodeID='+FK_Node+'&FK_Node='+FK_Node+
                 '&NodeIDCC='+FK_Node+'&NodeIDCCName='+NodeName+
                  '&Token='+token+'&win=true';

  
  

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



  console.log('why cc 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");
                  

const ccList = '/api/jflow/ccList';
defHttp.get({ url: ccList, params: {token: user.getJflowToken} })
  

</script>
