mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
投票导出
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
v-if="datasource.type !== 6 && datasource.type !== 9"
|
||||
class="endtime"
|
||||
>
|
||||
|
||||
|
||||
<!-- 起止时间:—-->
|
||||
</div>
|
||||
<div v-else class="endtime">
|
||||
@@ -48,7 +48,7 @@
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
|
||||
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,13 +112,13 @@
|
||||
</div>-->
|
||||
</div>
|
||||
</a-drawer>
|
||||
<CVote
|
||||
<CVote
|
||||
v-model:CVvisible="CVvisible"
|
||||
:voteID="voteID"
|
||||
:courseID="courseID"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -159,7 +159,7 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
visible: props.ProjectVoteModelVisible,
|
||||
@@ -170,7 +170,7 @@
|
||||
tableDataTotal: 0,
|
||||
projectName: undefined,
|
||||
projectNameList: [
|
||||
|
||||
|
||||
{
|
||||
id: 1,
|
||||
value: "1",
|
||||
@@ -238,7 +238,7 @@
|
||||
key: "studentDepartName",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
|
||||
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
customRender: (text) => {
|
||||
@@ -332,7 +332,7 @@
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:ProjectVoteModelVisible", false);
|
||||
state.currentPage = 1;
|
||||
@@ -358,7 +358,7 @@
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
};
|
||||
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if(props.datasource.type == 12){
|
||||
@@ -390,9 +390,9 @@
|
||||
// 处理在线课字段和表格中字段保持一致
|
||||
let obj = {
|
||||
studentUserNo: res.data.data.rows[i].studentCode,
|
||||
studentName: res.data.data.rows[i].studentName,
|
||||
studentDepartName: res.data.data.rows[i].studentDepartName,
|
||||
studentJobName: res.data.data.rows[i].studentJobName,
|
||||
studentName: res.data.data.rows[i].studentName,
|
||||
studentDepartName: res.data.data.rows[i].studentDepartName,
|
||||
studentJobName: res.data.data.rows[i].studentJobName,
|
||||
lastStudyTime: res.data.data.rows[i].submitTime,
|
||||
finishStatus: res.data.data.rows[i].status?res.data.data.rows[i].status:0,
|
||||
voteSubmitId: res.data.data.rows[i].voteSubmitId
|
||||
@@ -412,7 +412,7 @@
|
||||
state.tabledata = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 搜索按钮
|
||||
function searchTaskList() {
|
||||
state.currentPage = 1;
|
||||
@@ -427,20 +427,21 @@
|
||||
state.projectName = undefined;
|
||||
getData();
|
||||
}
|
||||
|
||||
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
state.tableDataTotalLoading = true;
|
||||
state.currentPage = page;
|
||||
getData();
|
||||
};
|
||||
|
||||
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.projectTaskId}`)
|
||||
console.log("导出数据")
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.projectTaskId}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${2}&voteId=${props.datasource.projectTaskId}`)
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -459,7 +460,7 @@
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
// .drawerStyle {
|
||||
// .ant-drawer-content-wrapper {
|
||||
@@ -531,7 +532,7 @@
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
.sealeft {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -548,7 +549,7 @@
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
@@ -572,15 +573,15 @@
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
@@ -589,7 +590,7 @@
|
||||
.btnss {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
@@ -613,15 +614,15 @@
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
@@ -630,7 +631,7 @@
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
@@ -657,7 +658,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
@@ -692,5 +693,4 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
v-if="datasource.type !== 6 && datasource.type !== 9"
|
||||
class="endtime"
|
||||
>
|
||||
|
||||
|
||||
<!-- 起止时间:—-->
|
||||
</div>
|
||||
<div v-else class="endtime">
|
||||
@@ -48,7 +48,7 @@
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
|
||||
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,13 +112,13 @@
|
||||
</div>-->
|
||||
</div>
|
||||
</a-drawer>
|
||||
<CVote
|
||||
<CVote
|
||||
v-model:CVvisible="CVvisible"
|
||||
:voteID="voteID"
|
||||
:courseID="courseID"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -163,7 +163,7 @@
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
visible: props.VoteModelVisible,
|
||||
@@ -174,7 +174,7 @@
|
||||
tableDataTotal: 0,
|
||||
projectName: undefined,
|
||||
projectNameList: [
|
||||
|
||||
|
||||
{
|
||||
id: 1,
|
||||
value: "1",
|
||||
@@ -242,7 +242,7 @@
|
||||
key: "studentDepartName",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
|
||||
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
customRender: (text) => {
|
||||
@@ -352,7 +352,7 @@
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:VoteModelVisible", false);
|
||||
state.currentPage = 1;
|
||||
@@ -378,7 +378,7 @@
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
};
|
||||
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if(props.datasource.type == 12){
|
||||
@@ -410,9 +410,9 @@
|
||||
// 处理在线课字段和表格中字段保持一致
|
||||
let obj = {
|
||||
studentUserNo: res.data.data.rows[i].studentCode,
|
||||
studentName: res.data.data.rows[i].studentName,
|
||||
studentDepartName: res.data.data.rows[i].studentDepartName,
|
||||
studentJobName: res.data.data.rows[i].studentJobName,
|
||||
studentName: res.data.data.rows[i].studentName,
|
||||
studentDepartName: res.data.data.rows[i].studentDepartName,
|
||||
studentJobName: res.data.data.rows[i].studentJobName,
|
||||
lastStudyTime: res.data.data.rows[i].submitTime,
|
||||
finishStatus: res.data.data.rows[i].status?res.data.data.rows[i].status:0,
|
||||
voteSubmitId: res.data.data.rows[i].voteSubmitId
|
||||
@@ -432,7 +432,7 @@
|
||||
state.tabledata = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 搜索按钮
|
||||
function searchTaskList() {
|
||||
state.currentPage = 1;
|
||||
@@ -447,20 +447,20 @@
|
||||
state.projectName = undefined;
|
||||
getData();
|
||||
}
|
||||
|
||||
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
state.tableDataTotalLoading = true;
|
||||
state.currentPage = page;
|
||||
getData();
|
||||
};
|
||||
|
||||
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.routerTaskId}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.routerTaskId}`)
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.courseId}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.courseId}`)
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -479,7 +479,7 @@
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
// .drawerStyle {
|
||||
// .ant-drawer-content-wrapper {
|
||||
@@ -551,7 +551,7 @@
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
.sealeft {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -568,7 +568,7 @@
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
@@ -592,15 +592,15 @@
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
@@ -609,7 +609,7 @@
|
||||
.btnss {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
@@ -633,15 +633,15 @@
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
@@ -650,7 +650,7 @@
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
@@ -677,7 +677,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
@@ -712,4 +712,3 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -547,7 +547,7 @@ function exportTaskStu() {
|
||||
window.open(
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?type=${1}&pid=${props.id}`
|
||||
}/admin/student/exportTaskStudent?type=${1}&pid=${props.targetId}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user