<el-table-column label="compid" width="160">
<template slot-scope="scope">
<router-link :to="'/form3/index/'+scope.row.compid" class="link-type"><span class="link-type" @click="handleOpen(scope.row)">{{ scope.row.compid }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="上次更新时间" width="220" align="center">
<template slot-scope="scope">
<mu-linear-progress mode="determinate" :max=24 :min=0 :size=4 :value="(new Date().getTime()-new Date(scope.row.lasttime).getTime())/3600000" color="warning"></mu-linear-progress>
<br/>
<span>{{ new Date(scope.row.lasttime).getUTCFullYear()+'-'+(new Date(scope.row.lasttime).getUTCMonth()+1)+'-'+new Date(scope.row.lasttime).getUTCDate()+' '+new Date(scope.row.lasttime).getHours()+':'+new Date(scope.row.lasttime).getUTCMinutes()+':'+new Date(scope.row.lasttime).getUTCSeconds()}}</span>
</template>
</el-table-column>
<el-table-column label="单位名称" width="110" align="center">
<template slot-scope="scope">
<router-link :to="{path:'/form3/index',query: {id:scope.row.compid}}"><span class="link-type" @click="handleOpen(scope.row)">{{ scope.row.compname }}</span>
</router-link>
</template>
</el-table-column>
第一种需要在路由里配置 path: 'edit/:id(\\d+)',
然后通过 const id = this.$route.params && this.$route.params.id 获取
第二种通过 this.$route.query.id