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

Commit 18600f23 by 李严凡

模板创建

parent c058bf2a
......@@ -5,12 +5,14 @@
<div class="tasklist">
<div class="task-item" v-for="(item, index) in tasks" :key='index'>
<div>{{item.name}}</div>
<div>发布者:{{item.creator}}&emsp;&emsp;发布时间:{{item.date|formatDate}}&emsp;&emsp;任务状态:已发布
<div>发布者:{{item.creator}}&emsp;&emsp;发布时间:{{item.date|formatDate}}&emsp;&emsp;任务状态:{{item.state}}
</div>
<div>
<el-button class="task-enter-btn2" type="primary" plain @click="revise(item.id)">修改</el-button>
<el-button class="task-enter-btn1" @click="deleteRow(index, item.id)" type="primary" plain>删除</el-button>
</div>
</div>
</div>
<navigator v-model="tasks" :condition="condition"></navigator>
</div>
</div>
......
......@@ -42,9 +42,9 @@
<el-select v-model="domain.piecesOptions" placeholder="模板选择" >
<el-option
v-for="i in pOptions"
:key="i.pvalue"
:label="i.plabel"
:value="i.pvalue">
:key="i.templateId"
:label="i.templateName"
:value="i.templateId">
</el-option>
<el-option>
<el-button type="text" @click="dialogFormVisible = true">自定义模板</el-button>
......@@ -174,7 +174,7 @@
<el-dialog title="自定义模板" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label="模板名称" :label-width="formLabelWidth">
<el-input v-model="this.templateName" autocomplete="off"></el-input>
<el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item>
<input v-model="mm" placeholder="输入实体或属性">
<!-- 树状结构-->
......@@ -205,8 +205,8 @@
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="rePage">取 消</el-button>
<el-button type="primary" @click="rePage">确 定</el-button>
<el-button @click="rePage(0)">取 消</el-button>
<el-button type="primary" @click="rePage(1)">确 定</el-button>
</div>
</el-dialog>
</el-main>
......@@ -293,14 +293,14 @@
},
formLabelWidth: '120px',
pOptions: [{
pvalue: '1',
plabel: '模板1'
templateId: '1',
templateName: '模板1'
}, {
pvalue: '2',
plabel: '模板2'
templateId: '2',
templateName: '模板2'
}, {
pvalue: '3',
plabel: '模板3'
templateId: '3',
templateName: '模板3'
}],
dynamicValidateForm: {
//domains--文本信息
......@@ -361,6 +361,20 @@
}
})
}
// this.axios({
// method:"GET",
// url:'/textAnnotation/getTemplated',
// params:{
// userId:this.uesrInfo.userId;
// }
// }).then(res=>{
// if(res.code == 1){
// this.pOptions = res.message;
// }
// else{
// alert("加载错误!!!");
// }
// })
},200);
},
computed:{
......@@ -601,7 +615,7 @@
if(ptype == 1){
this.dynamicValidateForm.domains.push({
fileList:new Array(),
pvalue:'1',
templateId:'1',
pname:'',
createMode:false,
key: Date.now()
......@@ -652,32 +666,40 @@
const parent = node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex(d => d.id === data.id);
if(index == 0){
if(node.id == 1){
alert("无法删除根模板");
return;
}
children.splice(index, 1);
},
rePage(ins){
console.log("inin");
//确定创建模板
if(ins == 1){
this.axios({
methode:'post',
url:'http://127.0.0.1:9100/api/textAnnotation/createTemplated',
method:'POST',
url:'/textAnnotation/createTemplated',
data:{
templateId:this.pOptions.length,
templateName:this.tempalteName,
templateName:this.form.name,
templateType:0,
createrId:this.userInfo.userId,
creatorId:this.userInfo.userId,
entityList:this.entityList,
},
}).then(res=>{
console.log(res);
if(res.code == 1){
this.pOptions = res.message;
}
else{
alert("模板创建失败");
}
this.dialogFormVisible = false;
})
}
console(this.pOptions);
// // alert("111");
dialogFormVisible :false;
location.reload();
//location.reload();
},
}
}
......
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