diff --git a/src/components/page/ShowExperiment.vue b/src/components/page/ShowExperiment.vue index aafe807..60bf296 100644 --- a/src/components/page/ShowExperiment.vue +++ b/src/components/page/ShowExperiment.vue @@ -7,10 +7,10 @@
返回 - 查看报告 + {{edit ? '批阅' : '查看报告'}}
-
- 保存 +
+ 发布成绩
@@ -175,52 +175,51 @@

老师评语

- + - +

教师签名

- - +
+ 不使用 + 已有签名 + 重新上传 +
+ + + + + + +
+ +

教师签名

+
@@ -266,7 +265,7 @@ }, signId: '', signSrc: '', - autograph: '1', + isSignature: '0', signList: [], sjData: [], infoData: [], @@ -278,7 +277,6 @@ }, mounted(){ this.getData() - this.getSgin() }, methods: { getData(){ @@ -293,6 +291,7 @@ if(i.includes('steps') && report[i]) steps.push(JSON.parse(report[i])) } this.form = report + this.isSignature = '' + report.isSignature if(report.steps9){ let steps9 = JSON.parse(report.steps9) this.goodsData = steps9.goodsData ? steps9.goodsData: [] @@ -339,6 +338,7 @@ score: report.score, userName: this.userName }] + this.getSgin() }).catch(res => {}) }, //合并行 @@ -374,6 +374,16 @@ } }, getSgin(){ + if(this.form.isSignature){ + let data = { + reportId: this.id + } + this.$get(this.api.reportSignature,data).then(res => { + this.signId = res.data.id + this.signSrc = res.data.signatureUrl + }).catch(res => {}) + } + if(this.edit){ let data = { reportId: this.id @@ -381,24 +391,16 @@ this.$get(this.api.querySignature,data).then(res => { this.signList = res.data if(res.data.length){ - this.signId = res.data[0].id - this.signSrc = this.signList.find(n => n.id == this.signId).signatureUrl + if(!this.signId){ + this.signId = res.data[0].id + this.signSrc = this.signList.find(n => n.id == this.signId).signatureUrl + } } }).catch(res => {}) - }else{ - let data = { - reportId: this.id - } - this.$get(this.api.reportSignature,data).then(res => { - this.signSrc = res.data.signatureUrl - }).catch(res => {}) } }, signChange(){ this.signSrc = this.signList.find(n => n.id == this.signId).signatureUrl - this.$post(`${this.api.selectSignature}?reportId=${this.id}&id=${this.signId}`).then(res => { - - }).catch(res => {}) }, delSign(){ this.$confirm('确定要删除吗?', '提示', { @@ -445,12 +447,14 @@ } }, saveAdd(){ + this.$post(`${this.api.selectSignature}?reportId=${this.id}&id=${this.signId}`).then(res => {}).catch(res => {}) let data = { - comment: this.configId, - id: this.id, - level: this.form.systemType, + comment: this.form.comment, + reportId: Number(this.id), + isSignature: Number(this.isSignature) } this.$post(this.api.updateComment,data).then((res) => { + this.$message.success('保存成功') this.$router.back() }).catch((res) => {}) }, diff --git a/src/utils/api.js b/src/utils/api.js index 620a676..5579d12 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,7 +1,7 @@ // let host = 'http://192.168.31.152:8090' // let host = 'http://192.168.31.152:1010' // let host = 'http://192.168.31.125:9090'//林 -// let host = 'http://192.168.31.152:1010'//榕 +// let host = 'http://192.168.31.152:9090'//榕 // let host = 'http://192.168.31.137:9090'//陈 // let host = 'http://192.168.31.140:9090'//7 @@ -137,9 +137,9 @@ export default { editScore: `${host}/evaluation/Achievement/editScore`, // 教师评语 - addComment: `${host}/evaluation/comment/addComment`, - queryComment: `${host}/evaluation/comment/queryComment`, - updateComment:`${host}/evaluation/comment/updateComment`, + addComment: `${host}/evaluation/Achievement/addComment`, + queryComment: `${host}/evaluation/Achievement/queryComment`, + updateComment:`${host}/evaluation/Achievement/updateComment`, // 老师签名照 daleteSignature: `${host}/evaluation/signature/deleteSignature`,