|
|
@ -7,10 +7,10 @@ |
|
|
|
<div class="per_title" v-preventReClick @click="goback()"> |
|
|
|
<div class="per_title" v-preventReClick @click="goback()"> |
|
|
|
<i class="el-icon-arrow-left"></i> |
|
|
|
<i class="el-icon-arrow-left"></i> |
|
|
|
<span class="per_back">返回</span> |
|
|
|
<span class="per_back">返回</span> |
|
|
|
<span class="per_school">查看报告</span> |
|
|
|
<span class="per_school">{{edit ? '批阅' : '查看报告'}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div v-if="edit"> |
|
|
|
<el-button type="primary" size="small" round v-preventReClick @click="saveAdd('form')">保存</el-button> |
|
|
|
<el-button type="primary" size="small" round v-preventReClick @click="saveAdd('form')">发布成绩</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
@ -175,52 +175,51 @@ |
|
|
|
<div class="meta-title-wrap"> |
|
|
|
<div class="meta-title-wrap"> |
|
|
|
<p class="meta-title"><i class="el-icon-discount"></i> 老师评语</p> |
|
|
|
<p class="meta-title"><i class="el-icon-discount"></i> 老师评语</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-input type="textarea" rows="5" v-model="form.comment" disabled></el-input> |
|
|
|
<el-input type="textarea" rows="5" v-model="form.comment" :disabled="!edit"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<el-card shadow="hover" class="mgb20" v-if="edit"> |
|
|
|
<p class="mgb20">教师签名</p> |
|
|
|
<p class="mgb20">教师签名</p> |
|
|
|
<template v-if="edit"> |
|
|
|
<div class="mgb20"> |
|
|
|
<div class="mgb20"> |
|
|
|
<el-radio v-model="isSignature" label="0">不使用</el-radio> |
|
|
|
<el-radio v-model="autograph" label="1">不使用</el-radio> |
|
|
|
<el-radio v-model="isSignature" label="1">已有签名</el-radio> |
|
|
|
<el-radio v-model="autograph" label="2">已有签名</el-radio> |
|
|
|
<el-radio v-model="isSignature" label="2">重新上传</el-radio> |
|
|
|
<el-radio v-model="autograph" label="3">重新上传</el-radio> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<template v-if="isSignature == 1"> |
|
|
|
<template v-if="autograph == 2"> |
|
|
|
<el-select v-model="signId" placeholder="请选择签名" size="mini" @change="signChange"> |
|
|
|
<el-select v-model="signId" placeholder="请选择签名" size="mini" @change="signChange"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in signList" |
|
|
|
v-for="item in signList" |
|
|
|
:key="item.id" |
|
|
|
:key="item.id" |
|
|
|
:label="item.signatureName" |
|
|
|
:label="item.signatureName" |
|
|
|
:value="item.id" |
|
|
|
:value="item.id" |
|
|
|
> |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
<img class="sign-img" :src="signSrc" alt="" style="max-width: 400px;margin: 10px 0;"> |
|
|
|
<img class="sign-img" :src="signSrc" alt="" style="max-width: 400px;margin: 10px 0;"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button size="mini" type="danger" @click="delSign">删除</el-button> |
|
|
|
<el-button size="mini" type="danger" @click="delSign">删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else-if="isSignature == 2"> |
|
|
|
<template v-else-if="autograph == 3"> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
:data="{userId: userId,reportId: id}" |
|
|
|
:data="{userId: userId,reportId: id}" |
|
|
|
:limit="1" |
|
|
|
:limit="1" |
|
|
|
:action="api.uploadSignature" |
|
|
|
:action="api.uploadSignature" |
|
|
|
list-type="picture-card" |
|
|
|
list-type="picture-card" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:on-success="uploadSuccess"> |
|
|
|
:on-success="uploadSuccess"> |
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</el-card> |
|
|
|
</template> |
|
|
|
<el-card shadow="hover" class="mgb20" v-else-if="!edit && form.isSignature"> |
|
|
|
<template v-else> |
|
|
|
<p class="mgb20">教师签名</p> |
|
|
|
<img :src="signSrc" alt="" style="max-width: 400px;"> |
|
|
|
<img :src="signSrc" alt="" style="max-width: 400px;"> |
|
|
|
</template> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -266,7 +265,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
signId: '', |
|
|
|
signId: '', |
|
|
|
signSrc: '', |
|
|
|
signSrc: '', |
|
|
|
autograph: '1', |
|
|
|
isSignature: '0', |
|
|
|
signList: [], |
|
|
|
signList: [], |
|
|
|
sjData: [], |
|
|
|
sjData: [], |
|
|
|
infoData: [], |
|
|
|
infoData: [], |
|
|
@ -278,7 +277,6 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted(){ |
|
|
|
mounted(){ |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
this.getSgin() |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getData(){ |
|
|
|
getData(){ |
|
|
@ -293,6 +291,7 @@ |
|
|
|
if(i.includes('steps') && report[i]) steps.push(JSON.parse(report[i])) |
|
|
|
if(i.includes('steps') && report[i]) steps.push(JSON.parse(report[i])) |
|
|
|
} |
|
|
|
} |
|
|
|
this.form = report |
|
|
|
this.form = report |
|
|
|
|
|
|
|
this.isSignature = '' + report.isSignature |
|
|
|
if(report.steps9){ |
|
|
|
if(report.steps9){ |
|
|
|
let steps9 = JSON.parse(report.steps9) |
|
|
|
let steps9 = JSON.parse(report.steps9) |
|
|
|
this.goodsData = steps9.goodsData ? steps9.goodsData: [] |
|
|
|
this.goodsData = steps9.goodsData ? steps9.goodsData: [] |
|
|
@ -339,6 +338,7 @@ |
|
|
|
score: report.score, |
|
|
|
score: report.score, |
|
|
|
userName: this.userName |
|
|
|
userName: this.userName |
|
|
|
}] |
|
|
|
}] |
|
|
|
|
|
|
|
this.getSgin() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//合并行 |
|
|
|
//合并行 |
|
|
@ -374,6 +374,16 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getSgin(){ |
|
|
|
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){ |
|
|
|
if(this.edit){ |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
reportId: this.id |
|
|
|
reportId: this.id |
|
|
@ -381,24 +391,16 @@ |
|
|
|
this.$get(this.api.querySignature,data).then(res => { |
|
|
|
this.$get(this.api.querySignature,data).then(res => { |
|
|
|
this.signList = res.data |
|
|
|
this.signList = res.data |
|
|
|
if(res.data.length){ |
|
|
|
if(res.data.length){ |
|
|
|
this.signId = res.data[0].id |
|
|
|
if(!this.signId){ |
|
|
|
this.signSrc = this.signList.find(n => n.id == this.signId).signatureUrl |
|
|
|
this.signId = res.data[0].id |
|
|
|
|
|
|
|
this.signSrc = this.signList.find(n => n.id == this.signId).signatureUrl |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}else{ |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
reportId: this.id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$get(this.api.reportSignature,data).then(res => { |
|
|
|
|
|
|
|
this.signSrc = res.data.signatureUrl |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
signChange(){ |
|
|
|
signChange(){ |
|
|
|
this.signSrc = this.signList.find(n => n.id == this.signId).signatureUrl |
|
|
|
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(){ |
|
|
|
delSign(){ |
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
@ -445,12 +447,14 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
saveAdd(){ |
|
|
|
saveAdd(){ |
|
|
|
|
|
|
|
this.$post(`${this.api.selectSignature}?reportId=${this.id}&id=${this.signId}`).then(res => {}).catch(res => {}) |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
comment: this.configId, |
|
|
|
comment: this.form.comment, |
|
|
|
id: this.id, |
|
|
|
reportId: Number(this.id), |
|
|
|
level: this.form.systemType, |
|
|
|
isSignature: Number(this.isSignature) |
|
|
|
} |
|
|
|
} |
|
|
|
this.$post(this.api.updateComment,data).then((res) => { |
|
|
|
this.$post(this.api.updateComment,data).then((res) => { |
|
|
|
|
|
|
|
this.$message.success('保存成功') |
|
|
|
this.$router.back() |
|
|
|
this.$router.back() |
|
|
|
}).catch((res) => {}) |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|