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

Commit 2014c1a9 by 李景熙

add ongoingtask,update other tasklist

parent 079a51a5
......@@ -10,7 +10,7 @@
active-text-color="#fff"
router="true">
<el-menu-item index="/taskhall">任务大厅</el-menu-item>
<el-menu-item index="2">我的任务</el-menu-item>
<el-menu-item index="/ongoing">我的任务</el-menu-item>
<el-menu-item index="/releasetask">发布任务</el-menu-item>
<el-menu-item index="/completed">已完成任务</el-menu-item>
<el-menu-item index="/check">待审核任务</el-menu-item>
......
<template>
<div id="mission">
<el-container>
<!-- 头,用作导航栏-->
<!-- 头,用作导航栏-->
<el-header></el-header>
<el-main>
<el-form>
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm" class="demo-dynamic">
<el-form-item>
<el-button @click="addDomain">添加分片</el-button><el-button type="primary" @click="submitForm('dynamicValidateForm')">创建任务</el-button>
<el-input v-model="taskName" @input="change($event)" placeholder="输入任务名称" style="width: 200px"></el-input>
<el-button type="primary" @click="submitForm('dynamicValidateForm')">创建任务</el-button>
<el-button @click="addDomain">添加分片</el-button>
</el-form-item>
<el-form-item>
<!-- 采用手风琴实现折叠-->
<!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" accordion>
<el-collapse-item title="分片1" name="1" >
<!-- 上传图片-->
<el-row :gutter="20">
<el-col span="6">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
list-type="picture">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
</el-upload>
</el-col>
<el-col span="6" offset="2">
<el-upload
class="upload-demo"
ref="upload"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传文本文件</div>
</el-upload>
</el-col>
<el-col span="2" offset="2">
<el-button type="primary" plain @click.prevent="removeDomain(domain)">删除分片</el-button>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item title="分片2" name="2" >
<el-form-item v-for="(domain, index) in dynamicValidateForm.domains"
:key="domain.key"
:prop="'domains.' + index + '.value'">
<el-collapse-item
:title="'分片'+(++index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white">
<!-- 上传图片-->
<el-row :gutter="20">
<el-col span="6">
<el-row :gutter="20" >
<el-col span="8">
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
......@@ -60,26 +33,21 @@
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
</el-upload>
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col span="6" offset="2">
<el-upload
class="upload-demo"
ref="upload"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传文本文件</div>
</el-upload>
</el-col>
<el-col span="2" offset="2">
<el-col span="2" offset="4">
<el-button type="primary" plain @click.prevent="removeDomain(domain)">删除分片</el-button>
</el-col>
</el-row>
</el-collapse-item>
</el-form-item>
</el-collapse>
</el-form-item>
</el-form>
......@@ -90,11 +58,10 @@
</template>
<script>
//export default {
// }
export default {
data() {
return {
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
};
},
methods: {
handleRemove(file, fileList) {
......@@ -114,4 +81,63 @@
background-color: #409eff;
}
.el-main{
width: 90vw;
min-width: 800px;
/* border: solid; */
margin-left: auto;
margin-right: auto;
margin-top: 40px;
}
</style>
<script>
export default {
data() {
return {
dynamicValidateForm: {
domains: [{
value: ''
}],
},
options: [{
value: '1',
label: '文本分片'
}, {
value: '2',
label: '图像分片'
}],
value:'1'
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
removeDomain(item) {
var index = this.dynamicValidateForm.domains.indexOf(item)
if (index !== -1) {
this.dynamicValidateForm.domains.splice(index, 1)
}
},
addDomain() {
this.dynamicValidateForm.domains.push({
value: '',
key: Date.now()
});
},
change(e){
this.$forceUpdate();
}
}
}
</script>
<template>
<div class="taskhall">
<el-container>
<el-aside width="300px" background-color="#FFFFFF">
<el-aside width="300px">
<div>
<img src ="../assets/logo.png">
</div>
......@@ -51,12 +54,20 @@
</el-row>
</el-main>
</el-container>
</div>
</template>
<style>
/* .taskhall{
width: 90vw;
min-width: 800px;
border: solid;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
}*/
.el-aside {
background-color: #8EC3F9 !important;
background-color: #e1f2fb !important;/*#8EC3F9 !important;*/
color: #FFFFFF;
text-align: center;
line-height: 200px;
......@@ -67,10 +78,11 @@
height: 200px;
}
.el-main {
background-color: #e1f2fb !important;
background-color: #ffffff !important;
color: #FFFFFF;
text-align: center;
line-height: 40px;
width: 80%;
}
body > .el-container {
......@@ -91,10 +103,10 @@
background: #769fcd;
}
.bg-blue {
background: #8EC3F9;
background: #CAE4FF;/*#8EC3F9;*/
}
.bg-blue-light {
background: #CAE4FF;
background: #e1f2fb !important;
}
.grid-content {
border-radius: 4px;
......
<template>
<div class="taskhall">
<el-container>
<el-main style="background-color: #FFFFFF">
<el-table
:data="tableData"
:header-cell-style="{color:'#409EFF'}"
height="570"
border
style="width: 100%">
<el-table-column
prop="taskId"
label="任务ID"
width="180">
</el-table-column>
<el-table-column
prop="splitNum"
label="分片数量"
width="180">
</el-table-column>
<el-table-column
prop="date"
label="发布时间"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.date }}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="任务名称"
>
</el-table-column>
<el-table-column
prop="status"
label="任务状态"
width="180"
>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="180">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">修改</el-button>
<el-button @click.native.prevent="deleteRow(scope.$index, tableData)" type="text" size="small"> 删除 </el-button>
</template>
</el-table-column>
</el-table>
</el-main>
</el-container>
</div>
</template>
<script>
export default {
data() {
return {
tableData: [{
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '单物体语义分割',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '人脸质量判断',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status:'已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status:'已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status:'已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status: '已发布'
}, {
taskId:'1',
author:'小明',
splitNum:'3',
date: '2016-05-03',
name: '图片属性标注',
status:'已发布'
}]
}
},
methods: {
deleteRow(index, rows) {//删除改行
rows.splice(index, 1);
},
}
}
</script>
<style>
.el-header, .el-footer {
background-color: #B3C0D1;
color: #333;
text-align: center;
line-height: 60px;
}
.el-aside {
background-color: #D3DCE6;
color: #333;
text-align: center;
line-height: 200px;
}
.el-main {
background-color: #E9EEF3;
color: #333;
text-align: center;
line-height: 36px;
}
body > .el-container {
margin-bottom: 40px;
}
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
line-height: 260px;
}
.el-container:nth-child(7) .el-aside {
line-height: 320px;
}
</style>
......@@ -8,6 +8,7 @@ import completed from '../components/CompletedTask'
import check from '../components/CheckTask'
import release from '../components/ReleaseTask'
import publishtask from '../components/PublishTask'
import ongoingtask from '../components/ongoingtask'
Vue.use(Router)
......@@ -48,6 +49,11 @@ export default new Router({
path: '/publishtask',
name: publishtask,
component: publishtask
},
{
path: '/ongoing',
name: ongoingtask,
component: ongoingtask
}
]
},
......
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