文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 75e089fc by Wang Yuhang

跳转传递分片信息

parent f49b7072
......@@ -40,8 +40,7 @@ export default {
dialogVisible: false,
executors: [],
file: undefined,
type: undefined,
pieceId: undefined,
piece: undefined,
loading: false
}
},
......@@ -49,15 +48,15 @@ export default {
this.task = JSON.parse(decodeURIComponent(this.$route.params.task))
},
methods: {
doOption (file, type, pieceId) {
doOption (file, piece) {
// 打开模态框
this.file = file; this.type = type; this.pieceId = pieceId
this.file = file; this.piece = piece
this.dialogVisible = true
},
getExecutors () {
this.loading = true
var self = this, params = {
pieceId: this.pieceId,
pieceId: this.piece.pieceId,
fileId: this.file.id
}
this.axios.get('/file/getExecutors', {
......@@ -67,17 +66,18 @@ export default {
})
},
goto (executor) {
var self = this, {file, type} = this
var self = this, {file, piece} = this
var params = {
file,
task: self.task,
relationId: executor.relation_id,
executor
executor,
piece
}
function goto (path) {
self.$router.push({ name: path, params })
}
switch (type) {
switch (piece.type) {
case '文本':
if (file.url.endsWith('xlsx')) { goto('tabledCheck') }
if (file.url.endsWith('txt')) { goto('SelectedCheck') }
......
......@@ -37,16 +37,17 @@ export default {
this.task = JSON.parse(decodeURIComponent(this.$route.params.task))
},
methods: {
doOption (file, type) {
doOption (file, piece) {
var self = this, params = {
file,
task: this.task,
relationId: file.relation_id
relationId: file.relation_id,
piece
}
function goto (path) {
self.$router.push({ name: path, params })
}
switch (type) {
switch (piece.type) {
case '文本':
if (file.url.endsWith('xlsx')) { goto('tabled') }
if (file.url.endsWith('txt')) { goto('SelectedText') }
......
......@@ -8,10 +8,10 @@
<pieces-table :task-id="task.id" showProgress>
<template v-slot:option="slotProps">
<el-button v-if="!slotProps.file.state" type="primary" size="mini" plain
@click="doOption(slotProps.file,slotProps.type)"
@click="doOption(slotProps.file,slotProps.piece)"
>标注</el-button>
<el-button v-else type="success" size="mini" plain
@click="doOption(slotProps.file,slotProps.type)"
@click="doOption(slotProps.file,slotProps.piece)"
>修改</el-button>
</template>
</pieces-table>
......@@ -36,16 +36,17 @@ export default {
this.task = JSON.parse(decodeURIComponent(this.$route.params.task))
},
methods: {
doOption (file, type) {
doOption (file, piece) {
var self = this, params = {
file,
task: this.task,
relationId: file.relation_id
relationId: file.relation_id,
piece
}
function goto (path) {
self.$router.push({ name: path, params })
}
switch (type) {
switch (piece.type) {
case '文本':
if (file.url.endsWith('xlsx')) { goto('table') }
if (file.url.endsWith('txt')) { goto('SelectText') }
......
......@@ -24,7 +24,7 @@
<div class="file" v-for="item in map[props.row.id]" :key="item.id">
<i class="el-icon-document"></i>
<span class="file-name">{{item.name}}</span>{{item.size}}
<slot name='option' :file='item' :type='props.row.type' :pieceId='props.row.id'></slot>
<slot name='option' :file='item' :piece='props.row'></slot>
</div>
</div>
</template>
......
......@@ -89,52 +89,52 @@ export default new Router({
component: checkdetail
},
{
path: '/select/:file/:task/:relationId/:executor',
path: '/select/:file/:task/:relationId/:piece',
name: 'SelectText',
component: SelectText
},
{
path: '/selected/:file/:task/:relationId/:executor',
path: '/selected/:file/:task/:relationId/:executor/:piece',
name: 'SelectedText',
component: SelectedText
},
{
path: '/selectedCheck/:file/:task/:relationId/:executor',
path: '/selectedCheck/:file/:task/:relationId/:executor/:piece',
name: 'SelectedCheck',
component: SelectedCheck
},
{
path: '/table/:file/:task/:relationId/:executor',
path: '/table/:file/:task/:relationId/:piece',
name: 'table',
component: Table
},
{
path: '/tabled/:file/:task/:relationId/:executor',
path: '/tabled/:file/:task/:relationId/:executor/:piece',
name: 'tabled',
component: Tabled
},
{
path: '/tabledCheck/:file/:task/:relationId/:executor',
path: '/tabledCheck/:file/:task/:relationId/:executor/:piece',
name: 'tabledCheck',
component: TabledCheck
},
{
path: '/image/:file/:task/:relationId/:executor',
path: '/image/:file/:task/:relationId/:piece',
name: 'image',
component: imageAnnotiation
},
{
path: '/layer/:file/:task/:relationId/:executor',
path: '/layer/:file/:task/:relationId/:piece',
name: 'layer',
component: layerAnnotation
},
{
path: '/imageshow',
path: '/imageshow/:file/:task/:relationId/:executor/:piece',
name: 'images',
component: imageShow
},
{
path: '/layershow',
path: '/layershow/:file/:task/:relationId/:executor/:piece',
name: 'layers',
component: layerShow
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment