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

Commit c16f9aad by 李严凡

创建任务页面布局以及模板创建英文替代

parent 70e0e201
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-form-item> <el-form-item>
<!-- 采用手风琴实现折叠--> <!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" accordion> <el-collapse v-model="activeNameF" >
<el-form-item v-for="(domain, index) in dynamicValidateForm.domains" <el-form-item v-for="(domain, index) in dynamicValidateForm.domains"
:key="domain.key" :key="domain.key"
:prop="'domains.' + index + '.value'"> :prop="'domains.' + index + '.value'">
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
:title="'文本任务分片'+(1+index)" :title="'文本任务分片'+(1+index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px"> :name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px">
<!-- 上传图片--> <!-- 上传图片-->
<el-row :gutter="20" > <el-row :gutter="4" >
<el-col span="8"> <el-col span="8" >
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
...@@ -38,27 +38,33 @@ ...@@ -38,27 +38,33 @@
:data="'3:'+(index)" :data="'3:'+(index)"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="dynamicValidateForm.domains[index].fileList"> :file-list="dynamicValidateForm.domains[index].fileList">
<el-button size="small" type="primary" @click="setIndex(index)">点击上传</el-button> <el-button size="small" type="primary" @click="setIndex(index)">点击上传文本文件</el-button>
<div slot="tip" class="el-upload__tip">上传要求:txt/xlsx/json格式文件</div>
</el-upload> </el-upload>
</el-col> </el-col>
<el-col span="6"> <el-col offset="5" span="8" >
<el-select v-model="domain.templateId" placeholder="模板选择" > <el-row>
<el-option <el-col offset="7" span="9">
v-for="i in pOptions" <el-button style="width: 99%;" type="primary" icon="el-icon-delete" plain @click.prevent="removeDomain(1,domain)">删除分片</el-button>
:key="i.templateId" </el-col>
:label="i.templateName" </el-row>
:value="i.templateId"> <el-row style="margin-top: 5px">
</el-option> <el-col offset="7" span="9" >
<el-option> <el-select v-model="domain.templateId" placeholder="模板选择" >
<el-button type="text" @click="dialogFormVisible = true">自定义模板</el-button> <el-option
v-for="i in pOptions"
</el-option> :key="i.templateId"
</el-select> :label="i.templateName"
:value="i.templateId">
</el-option>
<el-option>
<el-button type="text" @click="dialogFormVisible = true">自定义模板</el-button>
</el-option>
</el-select>
</el-col>
</el-row>
<!-- 创建文本模板--> <!-- 创建文本模板-->
</el-col> </el-col>
<el-col span="2" offset="2">
<el-button type="primary" plain @click.prevent="removeDomain(1,domain)">删除分片</el-button>
</el-col>
</el-row> </el-row>
</el-collapse-item> </el-collapse-item>
</el-form-item> </el-form-item>
...@@ -132,7 +138,7 @@ ...@@ -132,7 +138,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-form-item> <el-form-item>
<!-- 采用手风琴实现折叠--> <!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" > <el-collapse v-model="activeNameP" >
<el-form-item v-for="(domain, index) in dynamicValidateForm.pictureDomains" <el-form-item v-for="(domain, index) in dynamicValidateForm.pictureDomains"
:key="domain.key" :key="domain.key"
:prop="'pictureDomains.' + index + '.value'"> :prop="'pictureDomains.' + index + '.value'">
...@@ -140,8 +146,8 @@ ...@@ -140,8 +146,8 @@
:title="'图片任务分片'+(1+index)" :title="'图片任务分片'+(1+index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px; "> :name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px; ">
<!-- 上传图片--> <!-- 上传图片-->
<el-row :gutter="20" style="min-height: 75px"> <el-row :gutter="4" style="min-height: 75px">
<el-col span="6"> <el-col span="8">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
...@@ -154,16 +160,23 @@ ...@@ -154,16 +160,23 @@
:limit="7" :limit="7"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="dynamicValidateForm.pictureDomains[index].fileList"> :file-list="dynamicValidateForm.pictureDomains[index].fileList">
<el-button size="small" type="primary" @click="setIndex(index)">点击上传</el-button> <el-button size="small" type="primary" @click="setIndex(index)">点击上传图像文件</el-button>
<div slot="tip" class="el-upload__tip">上传要求:jpg/jpeg/png/gif格式文件</div>
</el-upload> </el-upload>
</el-col> </el-col>
<el-col span="10"> <el-col span="12" offset="4">
<el-input type="textarea" :autosize="{minRows: 2, maxRows: 4}" placeholder="请输入分片描述" @input="change($event)" v-model="domain.description" style="resize:none;overflow:hidden ;margin-bottom: 10px;min-height:65px" maxlength="150" show-word-limit="150"> <el-row>
</el-input> <el-col span="20">
</el-col> <el-input type="textarea" :autosize="{minRows: 2, maxRows: 4}" placeholder="请输入分片描述" @input="change($event)" v-model="domain.description" style="resize:none;overflow:hidden ;margin-bottom: 10px;min-height:65px" maxlength="150" show-word-limit="150">
<el-col span="2" offset="2"> </el-input>
<el-button type="primary" plain @click.prevent="removeDomain(2,domain)">删除分片</el-button> </el-col>
</el-row>
<el-row>
<el-col span="6" offset="14">
<el-button style="width: 99%" type="primary" icon="el-icon-delete" plain @click.prevent="removeDomain(2,domain)">删除分片</el-button>
</el-col>
</el-row>
</el-col> </el-col>
</el-row> </el-row>
</el-collapse-item> </el-collapse-item>
...@@ -180,7 +193,7 @@ ...@@ -180,7 +193,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-form-item> <el-form-item>
<!-- 采用手风琴实现折叠--> <!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" accordion> <el-collapse v-model="activeNameL" >
<el-form-item v-for="(domain, index) in dynamicValidateForm.layerDomains" <el-form-item v-for="(domain, index) in dynamicValidateForm.layerDomains"
:key="domain.key" :key="domain.key"
:prop="'layerDomains.' + index + '.value'"> :prop="'layerDomains.' + index + '.value'">
...@@ -188,8 +201,8 @@ ...@@ -188,8 +201,8 @@
:title="'图层任务分片'+(1+index)" :title="'图层任务分片'+(1+index)"
:name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px;"> :name="index" style="border-bottom: 1px solid;border-bottom-color:white;font-size: 14px;">
<!-- 上传图片--> <!-- 上传图片-->
<el-row :gutter="20" > <el-row :gutter="4" style="min-height: 75px">
<el-col span="6"> <el-col span="8">
<!-- 上传文件传参3表示图层分片,index表示第几个分片,用“:”分割--> <!-- 上传文件传参3表示图层分片,index表示第几个分片,用“:”分割-->
<el-upload <el-upload
class="upload-demo" class="upload-demo"
...@@ -202,15 +215,22 @@ ...@@ -202,15 +215,22 @@
:limit="7" :limit="7"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:file-list="dynamicValidateForm.layerDomains[index].fileList"> :file-list="dynamicValidateForm.layerDomains[index].fileList">
<el-button size="small" type="primary" @click="setIndex(index)">点击上传</el-button> <el-button size="small" type="primary" @click="setIndex(index)">点击上传图层文件</el-button>
<div slot="tip" class="el-upload__tip">上传要求:kml格式文件</div>
</el-upload> </el-upload>
</el-col> </el-col>
<el-col span="10"> <el-col offset="4" span="12">
<el-input type="textarea" :autosize="{minRows: 2, maxRows: 4}" placeholder="请输入分片描述" @input="change($event)" v-model="domain.description" style="resize: none;overflow:hidden ;margin-bottom: 10px;min-height:65px" maxlength="150" show-word-limit="150"> <el-row>
</el-input> <el-col span="20">
</el-col> <el-input type="textarea" :autosize="{minRows: 2, maxRows: 4}" placeholder="请输入分片描述" @input="change($event)" v-model="domain.description" style="resize: none;overflow:hidden ;margin-bottom: 10px;min-height:65px" maxlength="150" show-word-limit="150">
<el-col span="2" offset="2"> </el-input>
<el-button type="primary" plain @click.prevent="removeDomain(3,domain)">删除分片</el-button> </el-col>
</el-row>
<el-row>
<el-col span="6" offset="14">
<el-button style="width: 99%" type="primary" icon="el-icon-delete" plain @click.prevent="removeDomain(3,domain)">删除分片</el-button>
</el-col>
</el-row>
</el-col> </el-col>
</el-row> </el-row>
</el-collapse-item> </el-collapse-item>
...@@ -228,7 +248,7 @@ ...@@ -228,7 +248,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-form-item> <el-form-item>
<!-- 采用手风琴实现折叠--> <!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" accordion> <el-collapse v-model="activeName" >
<div v-if="dynamicValidateForm.dataFormList.length != 0"> <div v-if="dynamicValidateForm.dataFormList.length != 0">
<el-form-item v-for="(domain, index) in dynamicValidateForm.dataFormList" <el-form-item v-for="(domain, index) in dynamicValidateForm.dataFormList"
:key="domain.key" :key="domain.key"
...@@ -265,10 +285,20 @@ ...@@ -265,10 +285,20 @@
<el-dialog title="自定义模板" :visible.sync="dialogFormVisible"> <el-dialog title="自定义模板" :visible.sync="dialogFormVisible">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="模板名称" :label-width="formLabelWidth">
<el-input v-model="form.name" autocomplete="off"></el-input> <el-row :gutter="2">
</el-form-item> <el-col span="11">
<input v-model="mm" placeholder=" 输入实体或属性名称"> <el-form-item label="模板名称" :label-width="formLabelWidth">
<el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col offset="" span="11">
<el-form-item label="实体/属性名称" :label-width="formLabelWidth">
<el-input v-model="form.mm" autocomplete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 树状结构--> <!-- 树状结构-->
<div class="block"> <div class="block">
<el-tree <el-tree
...@@ -282,7 +312,7 @@ ...@@ -282,7 +312,7 @@
<el-button <el-button
type="text" type="text"
size="mini" size="mini"
@click="() => append(data,mm)"> @click="() => append(data,form.mm)">
添加 添加
</el-button> </el-button>
<el-button <el-button
...@@ -400,7 +430,7 @@ ...@@ -400,7 +430,7 @@
var ins ; var ins ;
var entityList = [{ var entityList = [{
id: 1, id: 1,
label: 'entityList', label: '实体模板',
children: [] children: []
}]; }];
return { return {
...@@ -423,7 +453,8 @@ ...@@ -423,7 +453,8 @@
delivery: false, delivery: false,
type: [], type: [],
resource: '', resource: '',
desc: '' desc: '',
mm:''
}, },
formLabelWidth: '120px', formLabelWidth: '120px',
pOptions: [{ pOptions: [{
...@@ -470,11 +501,13 @@ ...@@ -470,11 +501,13 @@
// description:'', // description:'',
// } // }
}, },
activeNameF:[],
activeNameP:[],
activeNameL:[],
cardName : 'first', cardName : 'first',
createModeValue:'-1', createModeValue:'-1',
createModeLable:'自定义模板', createModeLable:'自定义模板',
entityList: JSON.parse(JSON.stringify(entityList)), entityList: JSON.parse(JSON.stringify(entityList)),
entityList: JSON.parse(JSON.stringify(entityList)),
fName:'', fName:'',
url:'', url:'',
taskName:'', taskName:'',
...@@ -876,6 +909,7 @@ ...@@ -876,6 +909,7 @@
createMode:false, createMode:false,
key: Date.now() key: Date.now()
}); });
this.activeNameF.push(this.dynamicValidateForm.domains.length-1)
} }
// //添加表格分片 // //添加表格分片
// if(ptype == 2){ // if(ptype == 2){
...@@ -894,6 +928,7 @@ ...@@ -894,6 +928,7 @@
description:'', description:'',
key: Date.now() key: Date.now()
}); });
this.activeNameP.push(this.dynamicValidateForm.pictureDomains.length-1)
} }
//添加图层分片 //添加图层分片
else if(ptype == 3){ else if(ptype == 3){
...@@ -902,6 +937,7 @@ ...@@ -902,6 +937,7 @@
description:'', description:'',
key: Date.now() key: Date.now()
}); });
this.activeNameL.push(this.dynamicValidateForm.layerDomains.length-1)
} }
}, },
change(e){ change(e){
...@@ -923,7 +959,7 @@ ...@@ -923,7 +959,7 @@
append(data,mm) { append(data,mm) {
// console.log("MM") // console.log("MM")
// console.log(mm) // console.log(mm)
if(mm == undefined){ if(mm == ''){
this.$message({ this.$message({
type: 'info', type: 'info',
message: '请输入模板名称或者实体名称' message: '请输入模板名称或者实体名称'
...@@ -950,8 +986,6 @@ ...@@ -950,8 +986,6 @@
children.splice(index, 1); children.splice(index, 1);
}, },
rePage(ins){ rePage(ins){
// console.log(this.entityList);
// console.log("111");
// 确定创建模板 // 确定创建模板
var max = -1; var max = -1;
for(var i = 0 ; i < this.pOptions.length ; i++){ for(var i = 0 ; i < this.pOptions.length ; i++){
...@@ -968,6 +1002,14 @@ ...@@ -968,6 +1002,14 @@
}) })
return return
} }
// if(this.entityList.children.length == 0){
// this.$message({
// type: 'info',
// message: '创建无效空模板'
// })
// return
// }
this.axios({ this.axios({
method:'POST', method:'POST',
url:'/textAnnotation/createTemplated', url:'/textAnnotation/createTemplated',
......
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