|
@@ -179,7 +179,7 @@
|
|
|
></i>
|
|
|
|
|
|
<i
|
|
|
- v-clipboard:copy="scope.row.extractCode"
|
|
|
+ v-clipboard:copy="scope.row.extractCode"
|
|
|
v-clipboard:success="copySuc"
|
|
|
v-clipboard:error="copyFail"
|
|
|
title="复制文本"
|
|
@@ -189,7 +189,6 @@
|
|
|
scope.row.extractCode != null &&
|
|
|
scope.row.extractCode != ''
|
|
|
"
|
|
|
-
|
|
|
class="el-icon-copy-document"
|
|
|
></i>
|
|
|
<i
|
|
@@ -212,7 +211,6 @@
|
|
|
scope.row.extractCode != null &&
|
|
|
scope.row.extractCode != ''
|
|
|
"
|
|
|
-
|
|
|
class="el-icon-copy-document"
|
|
|
></i>
|
|
|
</div>
|
|
@@ -222,7 +220,10 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div
|
|
|
class="detail_button_out"
|
|
|
- v-if="(userInfo.roleType=='5'&&scope.row.planStatus == '3')||(scope.row.planStatus == '3' && scope.row.enable == '1')"
|
|
|
+ v-if="
|
|
|
+ (userInfo.roleType == '5' && scope.row.planStatus == '3') ||
|
|
|
+ (scope.row.planStatus == '3' && scope.row.enable == '1')
|
|
|
+ "
|
|
|
>
|
|
|
<div class="detail_button" @click="addUser(scope.row)">
|
|
|
<img src="../../../assets/img/table/search.png" />
|
|
@@ -230,12 +231,18 @@
|
|
|
</div>
|
|
|
<div class="detail_button" @click="downloadButton(scope.row)">
|
|
|
<img src="../../../assets/img/table/xiafa1.png" />
|
|
|
+ <!-- <img src="../../../assets/img/table/xiafaz.gif" /> -->
|
|
|
<span> 下载报告</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
class="detail_button_out_dis"
|
|
|
- v-if="!((userInfo.roleType=='5'&&scope.row.planStatus == '3')||(scope.row.planStatus == '3' && scope.row.enable == '1'))"
|
|
|
+ v-if="
|
|
|
+ !(
|
|
|
+ (userInfo.roleType == '5' && scope.row.planStatus == '3') ||
|
|
|
+ (scope.row.planStatus == '3' && scope.row.enable == '1')
|
|
|
+ )
|
|
|
+ "
|
|
|
>
|
|
|
<div class="detail_button_dis" :title="titleFormatter(scope.row)">
|
|
|
<img src="../../../assets/img/table/search_dis.png" />
|
|
@@ -305,7 +312,7 @@
|
|
|
<el-option
|
|
|
v-for="item in gradeList"
|
|
|
:key="item.id"
|
|
|
- :label="item + '级'"
|
|
|
+ :label="item == -1 ? '教师组' : item + '级'"
|
|
|
:value="item"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
@@ -356,9 +363,47 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="margin-left:10%" v-show="downList.length>0">
|
|
|
+ 待下载列表
|
|
|
+ </div>
|
|
|
+ <el-table :data="downList" style="width: 80%; margin-left: 10%" max-height="250" v-show="downList.length>0">
|
|
|
+ <el-table-column type="index" align="center" label="序号"> </el-table-column>
|
|
|
+ <el-table-column prop="createTime" align="center" label="生成时间">
|
|
|
+ </el-table-column>
|
|
|
|
|
|
+ <el-table-column fixed="right" align="center" label="操作" width="60px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="downNewFun(scope.row)" type="text" size="small">
|
|
|
+ 下载
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<span slot="footer" class="dialog-footer"> </span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ class="dig_update ts_li"
|
|
|
+ :visible.sync="resetVisible"
|
|
|
+ width="30%"
|
|
|
+ center
|
|
|
+ style="border-radius: 40px"
|
|
|
+ >
|
|
|
+ <div slot="title">
|
|
|
+ <div class="demo-ruleForm">
|
|
|
+ <p class="dig_title">提示</p>
|
|
|
+
|
|
|
+ <p>正在下载中,请勿操作</p>
|
|
|
+
|
|
|
+ <div class="dig_button">
|
|
|
+ <el-button type="info" round @click="cancle()">关闭</el-button>
|
|
|
+ <!-- <el-button type="success" round @click="submitForm('ruleForm')"
|
|
|
+ >提交</el-button
|
|
|
+ > -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -468,6 +513,8 @@ export default {
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
},
|
|
|
loadingInstance: null,
|
|
|
+ downList: [],
|
|
|
+ timeFlag: null,
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
@@ -482,31 +529,31 @@ export default {
|
|
|
this.searchTarget();
|
|
|
},
|
|
|
methods: {
|
|
|
- copySuc(){
|
|
|
- this.$message.success("复制成功")
|
|
|
-},
|
|
|
+ copySuc() {
|
|
|
+ this.$message.success("复制成功");
|
|
|
+ },
|
|
|
|
|
|
-copyFail(){
|
|
|
- this.$message.success("复制失败")
|
|
|
-},
|
|
|
+ copyFail() {
|
|
|
+ this.$message.success("复制失败");
|
|
|
+ },
|
|
|
onCopy(row) {
|
|
|
if (navigator.clipboard && window.isSecureContext) {
|
|
|
navigator.clipboard.writeText(row.extractCode).then(() => {
|
|
|
this.$message.success("复制成功");
|
|
|
});
|
|
|
- }else {
|
|
|
- const textArea = document.createElement('textarea')
|
|
|
- textArea.value = val
|
|
|
+ } else {
|
|
|
+ const textArea = document.createElement("textarea");
|
|
|
+ textArea.value = val;
|
|
|
// 使text area不在viewport,同时设置不可见
|
|
|
- document.body.appendChild(textArea)
|
|
|
- textArea.focus()
|
|
|
- textArea.select()
|
|
|
- this.$message.success('复制成功')
|
|
|
+ document.body.appendChild(textArea);
|
|
|
+ textArea.focus();
|
|
|
+ textArea.select();
|
|
|
+ this.$message.success("复制成功");
|
|
|
return new Promise((res, rej) => {
|
|
|
// 执行复制命令并移除文本框
|
|
|
- document.execCommand('copy') ? res() : rej()
|
|
|
- textArea.remove()
|
|
|
- })
|
|
|
+ document.execCommand("copy") ? res() : rej();
|
|
|
+ textArea.remove();
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
titleFormatter(val) {
|
|
@@ -521,6 +568,7 @@ copyFail(){
|
|
|
}
|
|
|
},
|
|
|
handleClose() {
|
|
|
+ clearInterval(this.timeFlag);
|
|
|
this.downloadVisible = false;
|
|
|
},
|
|
|
//根据计划查询院
|
|
@@ -550,6 +598,7 @@ copyFail(){
|
|
|
},
|
|
|
//下载报告
|
|
|
downloadFun() {
|
|
|
+ //在这里调用接口
|
|
|
//判断当前选择是院还是届--还是班级
|
|
|
let params = {};
|
|
|
if (this.dimensionality == 0) {
|
|
@@ -579,24 +628,21 @@ copyFail(){
|
|
|
classIds: this.orgName,
|
|
|
};
|
|
|
}
|
|
|
+ this.downloadVisible = false;
|
|
|
+ this.resetVisible = true;
|
|
|
+ //需要传输
|
|
|
|
|
|
- this.loadingInstance = Loading.service(this.optionsLoad);
|
|
|
this.$http.post(`/generate/report/v2`, params, (res) => {
|
|
|
if (res && res.code == 200) {
|
|
|
// this.currentDownFun(res.data);
|
|
|
let a = document.createElement("a");
|
|
|
document.body.appendChild(a);
|
|
|
- a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
|
|
|
+ a.setAttribute("href", basePath + `/plan/download?recordId=${res.data.id}`);
|
|
|
a.click();
|
|
|
this.$nextTick(() => {
|
|
|
// 以服务的方式调用的 Loading 需要异步关闭
|
|
|
- this.loadingInstance.close();
|
|
|
+ this.resetVisible = false;
|
|
|
});
|
|
|
- // this.currentDownFun(res.data)
|
|
|
- // this.grade = res.data[0];
|
|
|
- // this.gradeList = res.data;
|
|
|
- // this.orgName = [res.data[0].orgNo];
|
|
|
- // this.orgList = res.data;
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
@@ -630,17 +676,18 @@ copyFail(){
|
|
|
flag: 2,
|
|
|
classIds: orgNameList,
|
|
|
};
|
|
|
- Loading.service(options);
|
|
|
+ this.downloadVisible = false;
|
|
|
+ this.resetVisible = true;
|
|
|
// Loading.service(options);
|
|
|
this.$http.post(`/plan/generate/report/v2`, params, (res) => {
|
|
|
if (res && res.code == 200) {
|
|
|
let a = document.createElement("a");
|
|
|
document.body.appendChild(a);
|
|
|
- a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
|
|
|
+ a.setAttribute("href", basePath + `/plan/download?recordId=${res.data.id}`);
|
|
|
a.click();
|
|
|
this.$nextTick(() => {
|
|
|
// 以服务的方式调用的 Loading 需要异步关闭
|
|
|
- this.loadingInstance.close();
|
|
|
+ this.resetVisible = false;
|
|
|
});
|
|
|
// this.currentDownFun(res.data);
|
|
|
} else {
|
|
@@ -648,6 +695,18 @@ copyFail(){
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ downNewFun(val) {
|
|
|
+ //返回这个路径要如何用
|
|
|
+ let a = document.createElement("a");
|
|
|
+ document.body.appendChild(a);
|
|
|
+ a.setAttribute("href", basePath + `/plan/download?recordId=${val.id}`);
|
|
|
+ a.click();
|
|
|
+ //开始调用刷新按钮
|
|
|
+ clearInterval(this.timeFlag);
|
|
|
+ this.timeFlag = setInterval(() => {
|
|
|
+ this.getPlanFileList();
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
//组织架构选择--
|
|
|
getOrgList() {
|
|
|
this.$http.get(`/planOrg/findAllByPlanId?planId=${this.planId}`, {}, (res) => {
|
|
@@ -661,11 +720,13 @@ copyFail(){
|
|
|
},
|
|
|
//下载标志
|
|
|
downloadButton(row) {
|
|
|
+ //在这里记录一下---数据
|
|
|
+ //当查看报告时--如果显示的是
|
|
|
if (this.userInfo.roleType != 5) {
|
|
|
if (row.enable == "0") {
|
|
|
//提示暂未授权
|
|
|
this.$message({
|
|
|
- message: "暂未授权",
|
|
|
+ message: "正在下载中",
|
|
|
type: "warning",
|
|
|
});
|
|
|
return;
|
|
@@ -676,6 +737,22 @@ copyFail(){
|
|
|
this.getOrgList();
|
|
|
this.queryCourt();
|
|
|
this.queryGrade();
|
|
|
+ this.getPlanFileList();
|
|
|
+ //调用接口
|
|
|
+ //查询下载计划的列表
|
|
|
+ },
|
|
|
+ //查询计划列表
|
|
|
+ getPlanFileList() {
|
|
|
+ this.$http.get(`/downRecord/findDownRecord?planId=${this.planId}`, {}, (res) => {
|
|
|
+ // this.$toast.success({message:'成功'});
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ //将值赋值给list
|
|
|
+ this.downList = res.data;
|
|
|
+ // this.channelList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
forMaPlan(val) {
|
|
|
if (val.planStatus == "1") {
|
|
@@ -958,6 +1035,9 @@ copyFail(){
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+.ts_li >>> .el-dialog__body {
|
|
|
+ padding: 0px !important;
|
|
|
+}
|
|
|
.form-plan >>> .el-form-item__label {
|
|
|
width: 100px !important;
|
|
|
}
|