|
@@ -25,12 +25,13 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-row>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
<el-table v-loading="loading" :data="firstplanList" @selection-change="handleSelectionChange" :height="clientHeight"
|
|
|
border>
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
- <el-table-column label="计划培训日期" align="center" prop="trainingPlanDate" :show-overflow-tooltip="true" width="180"/>
|
|
|
+ <el-table-column label="计划培训日期" align="center" prop="trainingPlanDate" :show-overflow-tooltip="true"
|
|
|
+ width="180"/>
|
|
|
<el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true" width="180"/>
|
|
|
<el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true" width="180"/>
|
|
|
<el-table-column label="材料版本" align="center" prop="materialVer" :show-overflow-tooltip="true" width="180"/>
|
|
@@ -46,10 +47,12 @@
|
|
|
<el-table-column label="评估结果" align="center" prop="assess" :show-overflow-tooltip="true" width="180"/>
|
|
|
<el-table-column label="学员签名" align="center" prop="studentConfirm" :show-overflow-tooltip="true" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="scope.row.studentConfirm==null&&scope.row.trainerConfirm!=null&&(scope.row.planStatus==3||scope.row.planStatus==4||scope.row.planStatus==5)" type="text" @click="sign(scope.row)">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.studentConfirm==null&&scope.row.trainerConfirm!=null&&(scope.row.planStatus==3||scope.row.planStatus==4||scope.row.planStatus==5)"
|
|
|
+ type="text" @click="sign(scope.row)">
|
|
|
签名
|
|
|
</el-button>
|
|
|
- <span v-else >{{scope.row.studentConfirm}}</span>
|
|
|
+ <span v-else>{{ scope.row.studentConfirm }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="培训状态" align="center" prop="planStatus" :show-overflow-tooltip="true" width="180">
|
|
@@ -65,23 +68,25 @@
|
|
|
<el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true" width="180"/>
|
|
|
<el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-zhuangzhi1')" circle></el-button>
|
|
|
+ <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-zhuangzhi1')"
|
|
|
+ circle></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true" width="180"/>
|
|
|
- <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">
|
|
|
+ <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-zhuangzhi2')" circle></el-button>
|
|
|
+ <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-zhuangzhi2')"
|
|
|
+ circle></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180"/>-->
|
|
|
-<!-- <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">-->
|
|
|
-<!-- <template slot-scope="scope">-->
|
|
|
-<!-- <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-zhuangzhi3')" circle></el-button>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
+ <!-- <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180"/>-->
|
|
|
+ <!-- <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">-->
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
+ <!-- <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-zhuangzhi3')" circle></el-button>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
<el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
|
|
|
- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="230">
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="230">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -103,7 +108,7 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改进组培训对话框 -->
|
|
|
- <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="700px" append-to-body>
|
|
|
+ <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="700px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
<el-form-item label="课程编号" prop="courseCode">
|
|
|
<el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
|
|
@@ -158,7 +163,8 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 用户导入对话框 -->
|
|
|
- <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
+ <el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
|
|
|
+ append-to-body>
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
:limit="1"
|
|
@@ -189,8 +195,8 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
|
|
|
- <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
|
|
|
+ <el-dialog :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
|
|
|
+ <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
|
|
|
<el-descriptions-item label-style="width:180px">
|
|
|
<template slot="label">
|
|
|
<i class="el-icon-user"></i>
|
|
@@ -218,7 +224,7 @@
|
|
|
<i class="el-icon-mobile-phone"></i>
|
|
|
已学习时长(分)
|
|
|
</template>
|
|
|
- {{ file.data.timer }}
|
|
|
+ {{ learnTime }}
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
<el-button
|
|
@@ -243,7 +249,7 @@
|
|
|
:visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
|
|
|
@close="handleClose">
|
|
|
<div style="margin-top: -60px;float: right;margin-right: 40px;">
|
|
|
- <br/>累计学习时长:{{learnTime}} min
|
|
|
+ <br/>累计学习时长:{{ learnTime == null ? "0" : learnTime }} min
|
|
|
</div>
|
|
|
<div style="margin-top: -30px">
|
|
|
<iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
|
|
@@ -253,7 +259,8 @@
|
|
|
|
|
|
|
|
|
<!-- 报告附件对话框 -->
|
|
|
- <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
|
|
|
+ <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
|
|
|
+ append-to-body>
|
|
|
<el-upload
|
|
|
ref="doc"
|
|
|
:limit="50"
|
|
@@ -274,14 +281,16 @@
|
|
|
<el-table :data="doc.commonfileList" border>
|
|
|
<el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <a class="link-type" @click="handleDownload(scope.row)">
|
|
|
+ <a class="link-type" @click="handleDownload(scope.row)">
|
|
|
<span>{{ scope.row.fileName }}</span>
|
|
|
</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
|
|
|
+ <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"
|
|
|
+ width="80"/>
|
|
|
<el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
|
|
|
- <el-table-column :label="$t('上传日期')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120">
|
|
|
+ <el-table-column :label="$t('上传日期')" align="center" prop="createdate" :show-overflow-tooltip="true"
|
|
|
+ width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
@@ -294,19 +303,23 @@
|
|
|
type="text"
|
|
|
icon="el-icon-view"
|
|
|
@click="handleSee(scope.row)"
|
|
|
- >{{ $t('预览') }}</el-button>
|
|
|
+ >{{ $t('预览') }}
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-download"
|
|
|
@click="handleDownload(scope.row)"
|
|
|
- >{{ $t('下载') }}</el-button>
|
|
|
+ >{{ $t('下载') }}
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
|
|
|
+ <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
|
|
|
+ append-to-body>
|
|
|
<div style="margin-top: -60px;float: right;margin-right: 40px;">
|
|
|
- <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
|
|
|
+ <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
|
|
|
+ </div>
|
|
|
<div style="margin-top: -30px">
|
|
|
<iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
|
|
|
</div>
|
|
@@ -367,7 +380,7 @@ export default {
|
|
|
// 报告附件上传位置编号
|
|
|
ids: 0,
|
|
|
// 设置上传的请求头部
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ headers: {Authorization: "Bearer " + getToken()},
|
|
|
// 上传的地址
|
|
|
url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
|
|
|
commonfileList: null,
|
|
@@ -478,7 +491,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- sign(row){
|
|
|
+ sign(row) {
|
|
|
this.$confirm('签名即代表您已确认此项课程的成绩', "注意", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -486,9 +499,9 @@ export default {
|
|
|
}).then(function () {
|
|
|
return updateFirstplan({
|
|
|
id: row.id,
|
|
|
- studentConfirm:"1",
|
|
|
- score1:row.score1,
|
|
|
- score2:row.score2,
|
|
|
+ studentConfirm: "1",
|
|
|
+ score1: row.score1,
|
|
|
+ score2: row.score2,
|
|
|
newId: row.newId
|
|
|
});
|
|
|
}).then(() => {
|
|
@@ -496,17 +509,17 @@ export default {
|
|
|
this.msgSuccess("签名成功");
|
|
|
})
|
|
|
},
|
|
|
- handleSee (row){
|
|
|
+ handleSee(row) {
|
|
|
// window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
|
|
|
- this.pdf.open =true
|
|
|
+ this.pdf.open = true
|
|
|
this.pdf.title = row.fileName
|
|
|
- this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
+ this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
},
|
|
|
- handleDoc(row , fileType) {
|
|
|
+ handleDoc(row, fileType) {
|
|
|
this.doc.pType = fileType
|
|
|
this.doc.queryParams.pType = fileType
|
|
|
this.doc.id = row.id;
|
|
|
- this.doc.title = this.$t('附件') ;
|
|
|
+ this.doc.title = this.$t('附件');
|
|
|
this.doc.open = true;
|
|
|
this.doc.queryParams.pId = row.id
|
|
|
this.doc.pId = row.id
|
|
@@ -515,8 +528,8 @@ export default {
|
|
|
this.$refs.doc.clearFiles()
|
|
|
})
|
|
|
},
|
|
|
- hanldeExam(row){
|
|
|
- this.$router.push({ name: 'paper', params: { examId: row.examId }})
|
|
|
+ hanldeExam(row) {
|
|
|
+ this.$router.push({name: 'paper', params: {examId: row.examId}})
|
|
|
},
|
|
|
handleClose() {
|
|
|
window.clearInterval(timer);
|
|
@@ -530,7 +543,7 @@ export default {
|
|
|
this.pdf.pdfUrl = ""
|
|
|
this.ppt = true
|
|
|
//如果是PDF等直接可以打开的就不调接口,否则调用接口
|
|
|
- if (row.fileName!=null && row.fileName.endsWith('pdf')) {
|
|
|
+ if (row.fileName != null && row.fileName.endsWith('pdf')) {
|
|
|
this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
this.loadingFlash = false
|
|
|
}
|
|
@@ -538,7 +551,7 @@ export default {
|
|
|
let _this = this;
|
|
|
timer = window.setInterval(function () {
|
|
|
updateFirstLearnTime(row).then(res => {
|
|
|
-
|
|
|
+ _this.learnTime = res.data
|
|
|
});
|
|
|
this.$nextTick(() => {
|
|
|
getFirstplan(row.id).then(res => {
|
|
@@ -550,18 +563,18 @@ export default {
|
|
|
getCountTime() {
|
|
|
if (this.file.data.timerNeed === 0)
|
|
|
return 0;
|
|
|
- return parseInt((this.file.data.timer / this.file.data.timerNeed * 100).toFixed(2))
|
|
|
+ return parseInt((this.learnTime / this.file.data.timerNeed * 100).toFixed(2))
|
|
|
},
|
|
|
openFileDialog(row) {
|
|
|
- for (let i=0;i<this.firstplanList.length;i++) {
|
|
|
- if (i===0){
|
|
|
+ for (let i = 0; i < this.firstplanList.length; i++) {
|
|
|
+ if (i === 0) {
|
|
|
continue;
|
|
|
}
|
|
|
let item = this.firstplanList[i];
|
|
|
console.log(item.id)
|
|
|
- if (item.id===row.id){
|
|
|
- if (this.firstplanList[i-1].planStatus!==5&&this.firstplanList[i-1].planStatus!==3){
|
|
|
- this.$alert('您必须完成上一项考试才可学习当前资料!', "注意", { dangerouslyUseHTMLString: true });
|
|
|
+ if (item.id === row.id) {
|
|
|
+ if (this.firstplanList[i - 1].planStatus !== 5 && this.firstplanList[i - 1].planStatus !== 3) {
|
|
|
+ this.$alert('您必须完成上一项考试才可学习当前资料!', "注意", {dangerouslyUseHTMLString: true});
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -569,15 +582,16 @@ export default {
|
|
|
this.file.open = true;
|
|
|
this.file.data = row
|
|
|
console.log(row)
|
|
|
+ this.learnTime = row.timer;
|
|
|
if (row.timer === '' || row.timer == null) {
|
|
|
- this.file.data.timer = 0
|
|
|
+ this.learnTime = 0
|
|
|
}
|
|
|
if (row.timerNeed === '' || row.timerNeed == null) {
|
|
|
this.file.data.timerNeed = 0
|
|
|
}
|
|
|
console.log(this.file.data)
|
|
|
},
|
|
|
- /** 查询进组培训列表 */
|
|
|
+ /** 查询进组培训列表*/
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listFirstplan(this.queryParams).then(response => {
|
|
@@ -727,7 +741,7 @@ export default {
|
|
|
// 提交上传文件
|
|
|
submitFileForm() {
|
|
|
this.$refs.upload.submit();
|
|
|
- },getFileList (){
|
|
|
+ }, getFileList() {
|
|
|
allFileList(this.doc.queryParams).then(response => {
|
|
|
response.forEach(element => {
|
|
|
element["isEdit"] = false
|
|
@@ -746,7 +760,7 @@ export default {
|
|
|
//附件上传成功处理
|
|
|
handleFileDocSuccess(response, file, fileList) {
|
|
|
this.doc.isUploading = false;
|
|
|
- this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
+ this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
|
|
|
this.getFileList()
|
|
|
},
|
|
|
// 文件下载处理
|
|
@@ -767,14 +781,14 @@ export default {
|
|
|
confirmButtonText: this.$t('确定'),
|
|
|
cancelButtonText: this.$t('取消'),
|
|
|
type: "warning"
|
|
|
- }).then(function() {
|
|
|
+ }).then(function () {
|
|
|
return delCommonfile(ids);
|
|
|
}).then(() => {
|
|
|
this.getFileList()
|
|
|
this.msgSuccess(this.$t('删除成功'));
|
|
|
})
|
|
|
},
|
|
|
- openPdf(){
|
|
|
+ openPdf() {
|
|
|
window.open(this.pdf.pdfUrl);//path是文件的全路径地址
|
|
|
},
|
|
|
}
|