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

Commit bd8b5c3b by 李景熙

conflict

parents 638768c1 0d38fb19
......@@ -248,7 +248,7 @@
<el-row :gutter="20">
<el-form-item>
<!-- 采用手风琴实现折叠-->
<el-collapse v-model="activeName" >
<el-collapse v-model="activeNameD" >
<div v-if="dynamicValidateForm.dataFormList.length != 0">
<el-form-item v-for="(domain, index) in dynamicValidateForm.dataFormList"
:key="domain.key"
......@@ -430,7 +430,7 @@
var ins ;
var entityList = [{
id: 1,
label: '实体模板',
label: '实体模板内容',
children: []
}];
return {
......@@ -504,6 +504,7 @@
activeNameF:[],
activeNameP:[],
activeNameL:[],
activeNameD:[0,1,2,3,4,5],
cardName : 'first',
createModeValue:'-1',
createModeLable:'自定义模板',
......
......@@ -25,19 +25,27 @@
<!-- 侧边栏-->
<el-aside class="sidebar" style="height: 130px;background-color: rgba(255,255,255,0);box-shadow: 0px 0px 0px rgba(255,255,255,0);padding: 0px">
</el-aside>
<div class="sidebar2" style="position: absolute;margin-top: 0px;width: 300px" :style="{ height : 185 +'px'}">
<div class="sidebar-box">
<div class="tool-button-left">
<div style="margin-top: 5px"></div>
<el-radio-group v-model="radio1">
<el-radio-button label="矩形标注"></el-radio-button>
<el-radio-button label="多边形标注"></el-radio-button>
</el-radio-group>
<el-button @click="save()" style="font-size: 12px;padding: 10px 20px;">保存</el-button>
<div>
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">工具栏</div>
<div class="tool-button-left" style="margin-left: 10px;margin-top: 10px">
<div style="margin-top: 5px"></div>
<el-radio-group v-model="radio1">
<el-radio-button label="矩形标注"></el-radio-button>
<el-radio-button label="多边形标注"></el-radio-button>
</el-radio-group>
<el-button @click="save()" style="font-size: 12px;padding: 10px 20px;">保存</el-button>
</div>
</div>
</div>
</el-aside>
</div>
<el-aside class="sidebar2" style="position: absolute;margin-top: 55px" :style="{ height : 185 +'px'}">
<div class="sidebar2" style="position: absolute;margin-top: 85px;width: 300px" :style="{ height : 180 +'px'}">
<div class="sidebar-box">
<div>
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注描述</div>
......@@ -49,10 +57,9 @@
<!-- </div>-->
</div>
</div>
</div>
</el-aside>
<el-aside class="sidebar3" style="position: absolute;margin-top: 240px" >
<div class="sidebar3" style="position: absolute;margin-top: 265px;width: 300px" >
<div class="sidebar-box">
<div>
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注列表</div>
......@@ -73,7 +80,7 @@
</div>
</div>
</el-aside>
</div>
<!-- <el-aside class="sidebar2" style="position: absolute;width: 3vh;margin-left: 390px;margin-top:10px;margin-right: 0px">-->
<!-- <div class="tool-button-left">-->
......@@ -308,7 +315,7 @@ export default {
created () {
},
beforeRouteLeave: function(to, from , next){
beforeRouteLeave: function (to, from , next) {
// alert("返回后未保存的标注结果将会消失,请确认已保存!")
let i = 0
this.$confirm('返回后未保存的标注结果将会消失,请确认已保存!', '提示', {
......@@ -322,10 +329,13 @@ export default {
i = 1
})
if (i == 0) {
this.$destroy()
next()
}
// var _this = this;
// setTimeout(function () {
// if (i == 0) {
// _this.$destroy()
// next()
// }
// },500)
// this.$destroy();
// next();
},
......@@ -1250,7 +1260,7 @@ export default {
.sidebar3 {
/*height: calc(97% - 337px);*/
/*height: calc(100vh - 81px - 300px);*/
height: calc(100vh - 81px - 280px);
height: calc(100vh - 81px - 305px);
margin-left: 50px;
/*border: 2px solid #409eff;*/
border-radius: 5px;
......@@ -1278,4 +1288,10 @@ export default {
font-size: 12px;
padding: 10px 20px;
}
/deep/ .el-radio-button__orig-radio:checked+.el-radio-button__inner {
background-color:#ecf5ff;
color: rgba(51, 135, 255, 0.76);
border: 1px solid #cadcee;
}
</style>
......@@ -25,44 +25,64 @@
<!-- 侧边栏-->
<el-aside class="sidebar" style="height: 130px;background-color: rgba(255,255,255,0);box-shadow: 0px 0px 0px rgba(255,255,255,0);padding: 0px">
</el-aside>
<div class="sidebar2" v-if="this.$route.params.operationSign == 1" style="width:300px;position: absolute;margin-top: 0px" :style="{ height : 90 +'px'}">
<div class="sidebar-box">
<div class="tool-button-left">
<div style="margin-top: 5px"></div>
<!-- <el-radio-group v-model="radio1">-->
<!-- <el-radio-button label="矩形标注"></el-radio-button>-->
<!-- <el-radio-button label="多边形标注"></el-radio-button>-->
<!-- </el-radio-group>-->
<el-row :gutter="20">
<el-col span="6">
<!-- <el-button style="font-size: 12px;padding: 10px 20px;" @click="save()">保存</el-button> -->
</el-col>
<el-col span="14" v-if="this.$route.params.operationSign == 1">
<!-- 看注释,打分按钮和提交按钮是对审核结果提交-->
<el-button style="font-size: 12px;padding: 10px 20px;" type="primary" @click="commentScore = true">打分</el-button>
<el-button style="font-size: 12px;padding: 10px 20px;" type="primary" @click="submit()">提交</el-button>
<el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth">
<el-input v-model="scoreForm.accuracy" autocomplete="off" clearable></el-input>
</el-form-item>
<el-form-item label="标注得分" :label-width="formLabelWidth">
<el-input v-model="scoreForm.score" autocomplete="off" clearable></el-input>
</el-form-item>
<el-button type="primary" @click="addScore()">确认</el-button>
</el-form>
</el-dialog>
</el-col>
</el-row>
<!-- -->
<div>
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">工具栏</div>
<div class="tool-button-left" style="margin-left: 10px">
<div style="margin-top: 10px"></div>
<!-- <el-radio-group v-model="radio1">-->
<!-- <el-radio-button label="矩形标注"></el-radio-button>-->
<!-- <el-radio-button label="多边形标注"></el-radio-button>-->
<!-- </el-radio-group>-->
<el-row :gutter="20">
<el-col span="6">
<!-- <el-button style="font-size: 12px;padding: 10px 20px;" @click="save()">保存</el-button> -->
</el-col>
<el-col span="14" v-if="this.$route.params.operationSign == 1">
<!-- 看注释,打分按钮和提交按钮是对审核结果提交-->
<el-button style="font-size: 12px;padding: 10px 20px;" @click="commentScore = true">打分</el-button>
<!-- <el-button style="font-size: 12px;padding: 10px 20px;" @click="submit()">提交</el-button>-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth">
<el-input v-model="scoreForm.accuracy" autocomplete="off" clearable></el-input>
</el-form-item>
<el-form-item label="标注得分" :label-width="formLabelWidth">
<el-input v-model="scoreForm.score" autocomplete="off" clearable></el-input>
</el-form-item>
<el-button type="primary" @click="addScore()">确认</el-button>
</el-form>
</el-dialog>
</el-col>
</el-row>
<!-- -->
</div>
</div>
</div>
</div>
<el-aside class="sidebar2" v-if="this.$route.params.operationSign == 1" style="position: absolute;margin-top: 85px" :style="{ height : 180 +'px'}">
<div class="sidebar-box">
<div>
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注说明</div>
<div style="font-size:14px;margin: 5px;text-align: left">{{this.description}}</div>
<!-- <div class="img-title-list-box">-->
<!-- <div v-for="(item, index) in data" :key="item.id" style="text-align: left" class="listLeft" @click="jumpToImage(index)">-->
<!-- {{index+1}}. &nbsp; {{item.label}}-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</el-aside>
<el-aside class="sidebar2" style="position: absolute;margin-top: 55px" :style="{ height : 185 +'px'}">
<el-aside class="sidebar2" v-if="this.$route.params.operationSign != 1" style="position: absolute;margin-top: 0px" :style="{ height : 185 + 55 +'px'}">
<div class="sidebar-box">
<div>
<div class="img-list-title" style="height: 30px;line-height: 30px;font-size: 14px">标注说明</div>
......@@ -901,7 +921,7 @@ export default {
},
addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -924,36 +944,58 @@ export default {
)
this.$message("得分应该在0~100范围内");
else {
this.commentScore = false;
this.$message("打分成功");
}
},
submit() {
// alert("打分成功");
console.log(this.$route.params)
if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
alert("请打分和填写准确率");
return;
}
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.$route.params.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
// console.log(res);
// console.log("dafennjg");
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
alert("请打分和填写准确率");
return;
}
});
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.$route.params.file.id,
scoreForm: this.scoreForm
},
url: "task/gradePieces"
}).then(res => {
// console.log(res);
// console.log("dafennjg");
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/check" });
}
});
// this.commentScore = false;
// this.$message("打分成功");
}
},
// submit() {
// // alert("打分成功");
// console.log(this.$route.params)
// if(this.scoreForm.score == '' || this.scoreForm.accuracy == ''){
// alert("请打分和填写准确率");
// return;
// }
// this.axios({
// method: "get",
// params: {
// userId: this.$route.params.executor.id,
// fileId: this.$route.params.file.id,
// scoreForm: this.scoreForm
// },
// url: "task/gradePieces"
// }).then(res => {
// // console.log(res);
// // console.log("dafennjg");
// if (res.code == 0) {
// alert("分数提交失败!");
// } else if (res.code == 1) {
// alert("打分成功");
// this.$router.push({ path: "/taskhall" });
// }
// });
// },
// // 监听鼠标事件
// brush_Listener () {
// let r1, r2
......
......@@ -74,7 +74,7 @@
<div class="sidebar" style="position: absolute;margin-top: 0px;height: 170px;width: 300px">
<div class="sidebar-box" style="height: 235px">
<div>
<div class="img-list-title" style="font-size: 14px;height: 30px;line-height: 30px">标注描述</div>
<div class="img-list-title" style="font-size: 14px;height: 30px;line-height: 30px">工具栏</div>
<div style="font-size:14px;margin: 5px;text-align: left">
<div class="tool-button-left" style="text-align: left">
<div style="margin-top: 15px"></div>
......@@ -249,10 +249,14 @@ export default {
i = 1
})
if (i == 0) {
this.$destroy()
next()
}
// var _this = this;
// setTimeout(function () {
// if (i == 0) {
// _this.$destroy()
// next()
// }
// },500)
},
watch: {
radio1: function f () {
......
......@@ -32,7 +32,7 @@
<!--div v-if="this.$route.query.isCheck == '1'"-->
<div class="button1">
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
<!-- <el-button type="primary" @click="submit()">提交</el-button>-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth">
......@@ -217,7 +217,7 @@ export default {
// alert("Inin")
// console.log(this.$route.params.executor.id)
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -240,31 +240,47 @@ export default {
)
this.$message("得分应该在0~100范围内");
else {
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.file.id,
scoreForm: this.scoreForm,
},
url: "task/gradePieces",
}).then((res) => {
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
this.commentScore = false;
this.$message("打分成功");
// this.$message("打分成功");
}
},
submit() {
// alert("打分成功");
// this.$router.push({ path: "/taskhall" });
// alert("inin");
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.file.id,
scoreForm: this.scoreForm,
},
url: "task/gradePieces",
}).then((res) => {
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
},
// submit() {
// // alert("打分成功");
// // this.$router.push({ path: "/taskhall" });
// // alert("inin");
// this.axios({
// method: "get",
// params: {
// userId: this.$route.params.executor.id,
// fileId: this.file.id,
// scoreForm: this.scoreForm,
// },
// url: "task/gradePieces",
// }).then((res) => {
// if (res.code == 0) {
// alert("分数提交失败!");
// } else if (res.code == 1) {
// alert("打分成功");
// this.$router.push({ path: "/taskhall" });
// }
// });
// },
},
mounted: function () {
this.insertDocument();
......
......@@ -70,9 +70,9 @@
<!-- 表格界面 -->
<!-- 打分 -->
<!--div v-if="this.$route.query.isCheck == '1'"-->
<div class="button1">
<div class="button1" >
<el-button type="primary" @click="commentScore = true">打分</el-button>
<el-button type="primary" @click="submit()">提交</el-button>
<!-- <el-button type="primary" @click="submit()">提交</el-button>-->
<el-dialog title="请打分" :visible.sync="commentScore" width="400px">
<el-form :model="scoreForm">
<el-form-item label="标注准确率" :label-width="formLabelWidth">
......@@ -273,7 +273,7 @@ export default {
// 打分
addScore() {
if (this.scoreForm.accuracy == "" || this.scoreForm.score == "")
this.$message("请输入内容");
this.$message("请输入标注准确度和得分");
else if (
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
!/^[0-9]+$/.test(this.scoreForm.accuracy) &&
......@@ -296,31 +296,47 @@ export default {
)
this.$message("分数范围在0~100");
else {
this.commentScore = false;
this.$message("打分成功");
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.file.id,
scoreForm: this.scoreForm,
},
url: "task/gradePieces",
}).then((res) => {
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
// this.commentScore = false;
// this.$message("打分成功");
}
},
submit() {
// alert("打分成功");
// this.$router.push({path: '/taskhall'});
// alert("inin");
this.axios({
method: "get",
params: {
userId: this.$route.params.executor.id,
fileId: this.file.id,
scoreForm: this.scoreForm,
},
url: "task/gradePieces",
}).then((res) => {
if (res.code == 0) {
alert("分数提交失败!");
} else if (res.code == 1) {
alert("打分成功");
this.$router.push({ path: "/taskhall" });
}
});
},
// submit() {
// // alert("打分成功");
// // this.$router.push({path: '/taskhall'});
// // // alert("inin");
// // this.axios({
// // method: "get",
// // params: {
// // userId: this.$route.params.executor.id,
// // fileId: this.file.id,
// // scoreForm: this.scoreForm,
// // },
// // url: "task/gradePieces",
// // }).then((res) => {
// // if (res.code == 0) {
// // alert("分数提交失败!");
// // } else if (res.code == 1) {
// // alert("打分成功");
// // this.$router.push({ path: "/taskhall" });
// // }
// // });
// },
},
mounted: function () {
this.insertDocument();
......
# 工具
# 工具
- putty, 用于连接服务器
- winSCP,用于与服务器传输文件
# 部署方法
## 服务器ip
47.92.1.107
## 端口
http默认端口:80
## 用户名和密码
root
buaaEC001
![image-20200813224011749](deployImages\image-20200813224011749.png)
## 项目
项目涉及两个文件夹
![image-20200813224114649](deployImages\image-20200813224114649.png)
DA-Platform是一个本地git仓库,与gitlab远程仓库相关联,可以使用git命令来拉取新代码,就不用使用winSCP来传文件了,一般情况不需要git push,只要更新本地代码就可以了,但要注意解决冲突。可以使用git stash命令暂存修改,拉取最新代码后再恢复修改,具体用法可自行了解。
![image-20200813224152859](deployImages\image-20200813224152859.png)
da是服务器项目的根目录,基本和flask的目录结构一样
![image-20200813224532086](deployImages\image-20200813224532086.png)
在DA-Platform拉取最新代码后,可以分成两种情况部署
### 前端部署
在DAPlatform-front目录下执行`npm run build`指令,编译后的文件在dist中
dist中有两个文件**index.html****static文件夹**
部署前端需要做的就是用这两个文件分别去替换**da**下面的**static文件夹****templates中的index.html**
> 注意:最好先把原来的文件删除了再把新的文件拷贝过来,否则可能会出现仍然使用旧文件,新文件不生效导致修改不生效的情况
更新之后在da下运行`uwsgi --ini uwsgi.ini &`命令,**如果已有uwsgi运行中导致启动失败,需要先把该进程杀死**
(如果不是在screen中启动uwsgi,那连接断开后,uwsgi服务也会停止)
启动成功后之后就成功部署了
### 后端部署
后端部署比较容易,只要把修改后的文件替换da中对应的文件就可以了
替换完之后同样重新启动uwsgi服务器,操作和前端一样
## 连接断开保持服务运行
参考screen命令的用法
启动、停止uwsgi服务器最好都在screen已有的窗口中操作,可以避免screen中的uwsgi和外部的uwsgi冲突
![image-20200813225726988](deployImages\image-20200813225726988.png)
# 常见问题
## 页面显示502 bad gateway
大概率是uwsgi服务器没在运行,重新在screen中启动uwsgi
\ No newline at end of file
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