|
@@ -87,9 +87,9 @@
|
|
|
@change="getData"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
- <el-option label="所有状态" value=""/>
|
|
|
+ <el-option label="所有状态" value="" />
|
|
|
<el-option
|
|
|
- v-for="(item,index) in classType"
|
|
|
+ v-for="(item, index) in classType"
|
|
|
:key="item.index"
|
|
|
:label="item.title"
|
|
|
:value="item.value"
|
|
@@ -97,7 +97,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <div class="selectsBlock">
|
|
|
+ <div class="selectsBlock">
|
|
|
<span class="selectLabel">年份</span>
|
|
|
<el-select
|
|
|
v-model="selectInp.year"
|
|
@@ -116,19 +116,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ProjectManagementQuery">
|
|
|
- <el-input v-model="input" placeholder="请输入项目名称/编号"></el-input>
|
|
|
+ <el-input v-model="input" placeholder="输入项目名称/负责人/老师"></el-input>
|
|
|
<el-button type="primary" class="btn" size="mini" @click="getData"
|
|
|
>查询</el-button
|
|
|
>
|
|
|
</div>
|
|
|
- <div class="ProjectManagementQuery" style="margin-top: 60px;" v-if="$store.state.userInfo.type == 0">
|
|
|
- <el-button type="primary" class="btn" @click.stop="exportExcel">导出EXCEL</el-button>
|
|
|
+ <div
|
|
|
+ class="ProjectManagementQuery"
|
|
|
+ style="margin-top: 60px"
|
|
|
+ v-if="$store.state.userInfo.type == 0"
|
|
|
+ >
|
|
|
+ <el-button type="primary" class="btn" @click.stop="exportExcel"
|
|
|
+ >导出EXCEL</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 搜索框结束 -->
|
|
|
<!-- 表格开始 -->
|
|
|
<div>
|
|
|
+ <span style="font-size: 12px;">共 {{ table.total }} 条</span>
|
|
|
<el-table
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
@@ -137,7 +144,7 @@
|
|
|
class="fontSize"
|
|
|
:header-cell-style="{ background: '#f2f2f2', color: '#000' }"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
- @cell-click="cellProjectClick"
|
|
|
+ @cell-click="cellProjectClick"
|
|
|
>
|
|
|
<!-- selection-change批量选择功能后续可能用到 -->
|
|
|
<!--
|
|
@@ -158,7 +165,7 @@
|
|
|
prop="title"
|
|
|
label="项目名称"
|
|
|
align="center"
|
|
|
- min-width="35%"
|
|
|
+ min-width="35%"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -233,11 +240,15 @@
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<div>
|
|
|
- <!-- {{ scope.row.isupload+"-"+scope.row.isReturn }} -->
|
|
|
- <span v-if="scope.row.isReturn!=0">{{ isReturnType[scope.row.isReturn] }}</span>
|
|
|
+ <!-- {{ scope.row.isupload+"-"+scope.row.isReturn }} -->
|
|
|
+ <span v-if="scope.row.isReturn != 0">{{
|
|
|
+ isReturnType[scope.row.isReturn]
|
|
|
+ }}</span>
|
|
|
<!-- {{scope.row.name + (scope.row.status==0?"":"(已屏蔽)")}} -->
|
|
|
<!-- {{ (scope.row.isupload==0?"未审核": scope.row.data==1?"正在审核":"已审核") }} -->
|
|
|
- <span v-else>{{ classType.find(i=>i.value==scope.row.isupload)["title"] }}</span>
|
|
|
+ <span v-else>{{
|
|
|
+ classType.find((i) => i.value == scope.row.isupload)["title"]
|
|
|
+ }}</span>
|
|
|
|
|
|
<!-- <span v-if="scope.row.isupload == 0">未审核</span>
|
|
|
<span v-if="scope.row.isupload == 1">审核中</span>
|
|
@@ -281,34 +292,38 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
v-if="
|
|
|
- [5,6,7].includes(scope.row.isupload) && ![0,3].includes($store.state.userInfo.type)
|
|
|
+ [5, 6, 7].includes(scope.row.isupload) &&
|
|
|
+ ![0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
class="disa btnClass"
|
|
|
size="mini"
|
|
|
>审核中</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
v-if="
|
|
|
- scope.row.isupload == 2 && ![0,3].includes($store.state.userInfo.type)
|
|
|
+ scope.row.isupload == 2 &&
|
|
|
+ ![0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
class="disa btnClass"
|
|
|
size="mini"
|
|
|
>待结项</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
v-if="
|
|
|
- scope.row.isupload == 3 && ![0,3].includes($store.state.userInfo.type)
|
|
|
+ scope.row.isupload == 3 &&
|
|
|
+ ![0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
class="disa btnClass"
|
|
|
size="mini"
|
|
|
>结项中</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
v-if="
|
|
|
- scope.row.isupload == 4 && ![0,3].includes($store.state.userInfo.type)
|
|
|
+ scope.row.isupload == 4 &&
|
|
|
+ ![0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
class="disa btnClass"
|
|
|
size="mini"
|
|
@@ -316,15 +331,19 @@
|
|
|
>
|
|
|
|
|
|
<!--1管理员审核与院长 -->
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
- v-if="scope.row.isupload > 1 && [0,3].includes($store.state.userInfo.type)"
|
|
|
+ v-if="
|
|
|
+ scope.row.isupload > 1 &&
|
|
|
+ [0, 3].includes($store.state.userInfo.type)
|
|
|
+ "
|
|
|
class="disa btnClass"
|
|
|
>已提交</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
v-if="
|
|
|
- scope.row.isupload == 0 && [0,3].includes($store.state.userInfo.type)
|
|
|
+ scope.row.isupload == 0 &&
|
|
|
+ [0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
type="primary"
|
|
|
class="disa btnClass"
|
|
@@ -334,7 +353,8 @@
|
|
|
|
|
|
<el-button
|
|
|
v-if="
|
|
|
- scope.row.isupload == 1 && [0,3].includes($store.state.userInfo.type)
|
|
|
+ scope.row.isupload == 1 &&
|
|
|
+ [0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
type="primary"
|
|
|
size="mini"
|
|
@@ -345,25 +365,28 @@
|
|
|
|
|
|
<el-button
|
|
|
v-if="
|
|
|
- [3,5,6,7].includes(scope.row.isupload) && [0,3].includes($store.state.userInfo.type)
|
|
|
+ [3, 5, 6, 7].includes(scope.row.isupload) &&
|
|
|
+ [0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
type="primary"
|
|
|
class="disa btnClass"
|
|
|
size="mini"
|
|
|
>审核中</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
v-if="
|
|
|
- scope.row.isupload == 2 && [0,3].includes($store.state.userInfo.type)
|
|
|
+ scope.row.isupload == 2 &&
|
|
|
+ [0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
type="primary"
|
|
|
class="disa btnClass"
|
|
|
size="mini"
|
|
|
>待结项</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
v-if="
|
|
|
- [4].includes(scope.row.isupload) && [0,3].includes($store.state.userInfo.type)
|
|
|
+ [4].includes(scope.row.isupload) &&
|
|
|
+ [0, 3].includes($store.state.userInfo.type)
|
|
|
"
|
|
|
type="primary"
|
|
|
class="disa btnClass"
|
|
@@ -478,18 +501,20 @@
|
|
|
>立项通过</el-button
|
|
|
>
|
|
|
|
|
|
-
|
|
|
- <el-tooltip v-if="isManager == 1" effect="light" content="(直接进入学校终审状态)" placement="top">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
-
|
|
|
- @click="ManagerCommit2"
|
|
|
- class="AllDialogBtn"
|
|
|
- >
|
|
|
- 二次审核通过
|
|
|
- </el-button>
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip
|
|
|
+ v-if="isManager == 1"
|
|
|
+ effect="light"
|
|
|
+ content="(直接进入学校终审状态)"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="ManagerCommit2"
|
|
|
+ class="AllDialogBtn"
|
|
|
+ >
|
|
|
+ 二次审核通过
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -528,7 +553,6 @@
|
|
|
// import MakerSpaceWordPreview from '@/components/MakerSpaceWordPreview.vue';
|
|
|
// import studentMakerProjectPreview from '@/components/studentMakerProjectPreview.vue'
|
|
|
export default {
|
|
|
-
|
|
|
// components:{MakerSpaceWordPreview,studentMakerProjectPreview},
|
|
|
data() {
|
|
|
return {
|
|
@@ -552,29 +576,29 @@ export default {
|
|
|
currentPage: 1,
|
|
|
},
|
|
|
tableData: [], //列表数据
|
|
|
- classType:[
|
|
|
- {index:0,value:'0',title:"未提交"},
|
|
|
- {index:1,value:'1',title:"已提交"},
|
|
|
- {index:2,value:'5',title:"所在学院/部门审核中"},
|
|
|
- {index:3,value:'6',title:"双创学院审核中"},
|
|
|
- {index:4,value:'7',title:"学校终审中"},
|
|
|
- {index:5,value:'2',title:"待结项"},
|
|
|
- {index:6,value:'3',title:"提交结项中"},
|
|
|
- {index:7,value:'4',title:"已结项"},
|
|
|
- ],
|
|
|
- // "0":'未提交',
|
|
|
- // '1':"已提交",
|
|
|
- // '5':'所在学院/部门审核中',
|
|
|
- // '6':'双创学院审核中',
|
|
|
- // '7':'学校终审中',
|
|
|
- // '2':"待结项",
|
|
|
- // '3':"提交结项中",
|
|
|
- // '4':'已结项',
|
|
|
- isReturnType:{
|
|
|
- '5':'所在学院/部门审核驳回',
|
|
|
- '6':'双创学院审核驳回',
|
|
|
- '7':'学校终审驳回',
|
|
|
- },
|
|
|
+ classType: [
|
|
|
+ { index: 0, value: "0", title: "未提交" },
|
|
|
+ { index: 1, value: "1", title: "已提交" },
|
|
|
+ { index: 2, value: "5", title: "所在学院/部门审核中" },
|
|
|
+ { index: 3, value: "6", title: "双创学院审核中" },
|
|
|
+ { index: 4, value: "7", title: "学校终审中" },
|
|
|
+ { index: 5, value: "2", title: "待结项" },
|
|
|
+ { index: 6, value: "3", title: "提交结项中" },
|
|
|
+ { index: 7, value: "4", title: "已结项" },
|
|
|
+ ],
|
|
|
+ // "0":'未提交',
|
|
|
+ // '1':"已提交",
|
|
|
+ // '5':'所在学院/部门审核中',
|
|
|
+ // '6':'双创学院审核中',
|
|
|
+ // '7':'学校终审中',
|
|
|
+ // '2':"待结项",
|
|
|
+ // '3':"提交结项中",
|
|
|
+ // '4':'已结项',
|
|
|
+ isReturnType: {
|
|
|
+ 5: "所在学院/部门审核驳回",
|
|
|
+ 6: "双创学院审核驳回",
|
|
|
+ 7: "学校终审驳回",
|
|
|
+ },
|
|
|
|
|
|
selectInp: {
|
|
|
// 头部搜索框的内容
|
|
@@ -583,7 +607,7 @@ export default {
|
|
|
sort: "",
|
|
|
person: "",
|
|
|
state: "",
|
|
|
- year:"",
|
|
|
+ year: "",
|
|
|
},
|
|
|
options: {
|
|
|
//头部搜索框下拉框数据
|
|
@@ -618,7 +642,7 @@ export default {
|
|
|
// label: "已结项",
|
|
|
// },
|
|
|
],
|
|
|
- year:[],
|
|
|
+ year: [],
|
|
|
},
|
|
|
auditDialog: {
|
|
|
//审核对话框数据
|
|
@@ -753,9 +777,9 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
- ManagerCommit2(){
|
|
|
- //先判断项目有没有被驳回
|
|
|
- // let param = {
|
|
|
+ ManagerCommit2() {
|
|
|
+ //先判断项目有没有被驳回
|
|
|
+ // let param = {
|
|
|
// pid: this.iid.courseId,
|
|
|
// };
|
|
|
// return console.log(param);
|
|
@@ -776,34 +800,34 @@ export default {
|
|
|
// this.$message.warning(text);
|
|
|
// return;
|
|
|
// } else {
|
|
|
- //立项审核对话框里面的管理员通过按钮
|
|
|
- // console.log(this.iid);
|
|
|
- let param = {
|
|
|
- uid: this.$store.state.userInfo.userid,
|
|
|
- pid: this.iid.courseId,
|
|
|
- num: 7,
|
|
|
- };
|
|
|
- this.ajax
|
|
|
- // .post(this.$store.state.api+"/ApproveProject",param)
|
|
|
- .post(this.$store.state.api + "/updateIsupload", param)
|
|
|
- .then(
|
|
|
- (res) => {
|
|
|
- // console.log(res);
|
|
|
- this.dialogVisible = false;
|
|
|
- this.$message.success("已通过");
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- console.log(err);
|
|
|
- }
|
|
|
- );
|
|
|
- // }
|
|
|
+ //立项审核对话框里面的管理员通过按钮
|
|
|
+ // console.log(this.iid);
|
|
|
+ let param = {
|
|
|
+ uid: this.$store.state.userInfo.userid,
|
|
|
+ pid: this.iid.courseId,
|
|
|
+ num: 7,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ // .post(this.$store.state.api+"/ApproveProject",param)
|
|
|
+ .post(this.$store.state.api + "/updateIsupload", param)
|
|
|
+ .then(
|
|
|
+ (res) => {
|
|
|
+ // console.log(res);
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.$message.success("已通过");
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ // }
|
|
|
// },
|
|
|
// (err) => {
|
|
|
// console.log(err);
|
|
|
// }
|
|
|
// );
|
|
|
- },
|
|
|
+ },
|
|
|
ApplyPersonCommit() {
|
|
|
//先判断项目有没有被驳回
|
|
|
let param = {
|
|
@@ -874,12 +898,12 @@ export default {
|
|
|
// console.log(val);
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
- // 单元格被点击
|
|
|
- cellProjectClick(row, column, cell, event){
|
|
|
- if(column.property!="operation"){
|
|
|
- this.lookDetail(row.courseId,row.typeid)
|
|
|
- }
|
|
|
- },
|
|
|
+ // 单元格被点击
|
|
|
+ cellProjectClick(row, column, cell, event) {
|
|
|
+ if (column.property != "operation") {
|
|
|
+ this.lookDetail(row.courseId, row.typeid);
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
lookDetail(val, tid) {
|
|
|
this.$router.push(`/projectApplicationDetailMain?tid=${tid}&pid=${val}`);
|
|
@@ -888,7 +912,7 @@ export default {
|
|
|
// this.$router.push('/projectApplicationApplyMain')
|
|
|
// },
|
|
|
getData() {
|
|
|
- if(this.loading)return;
|
|
|
+ if (this.loading) return;
|
|
|
//获取表格数据
|
|
|
this.loading = true;
|
|
|
let param = {
|
|
@@ -905,14 +929,14 @@ export default {
|
|
|
};
|
|
|
// return console.log(param);
|
|
|
// console.log(param)
|
|
|
- this.tableData = [];
|
|
|
+ this.tableData = [];
|
|
|
this.ajax.get(this.$store.state.api + "/SelectAllProject", param).then(
|
|
|
(res) => {
|
|
|
let data = res.data;
|
|
|
console.log(data);
|
|
|
if (data[0].length == 0 && data[5][0]["total"] != 0) {
|
|
|
this.table.currentPage = 1;
|
|
|
- this.loading =false;
|
|
|
+ this.loading = false;
|
|
|
return this.getData();
|
|
|
}
|
|
|
let a = this.options;
|
|
@@ -921,10 +945,14 @@ export default {
|
|
|
a.department = data[2];
|
|
|
a.sort = data[3];
|
|
|
a.person = data[4];
|
|
|
- a.year = data[6]
|
|
|
- if(a.year.filter(item=>item['time']==new Date().getFullYear().toString()).length==0){
|
|
|
- a.year.push({time:new Date().getFullYear().toString()});
|
|
|
- }
|
|
|
+ a.year = data[6];
|
|
|
+ if (
|
|
|
+ a.year.filter(
|
|
|
+ (item) => item["time"] == new Date().getFullYear().toString()
|
|
|
+ ).length == 0
|
|
|
+ ) {
|
|
|
+ a.year.push({ time: new Date().getFullYear().toString() });
|
|
|
+ }
|
|
|
this.table.total = data[5][0].total;
|
|
|
// this.tableData.forEach(item=>{
|
|
|
// if(item['time']!=null&&item['time']!=''){
|
|
@@ -979,89 +1007,98 @@ export default {
|
|
|
this.table.currentPage = val;
|
|
|
this.getData();
|
|
|
},
|
|
|
- // 导出Excel表格
|
|
|
- exportExcel(){
|
|
|
- this.$confirm("是否导出Excel?", "提示", {
|
|
|
+ // 导出Excel表格
|
|
|
+ exportExcel() {
|
|
|
+ this.$confirm("是否导出Excel?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消"
|
|
|
+ cancelButtonText: "取消",
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.loading = true;
|
|
|
- let param = {
|
|
|
- uid: this.$store.state.userInfo.userid,
|
|
|
- pid: this.selectInp.filter, //筛选
|
|
|
- did: this.selectInp.department, //部门
|
|
|
- tid: this.selectInp.sort, //分类
|
|
|
- leader: this.selectInp.person, //负责人
|
|
|
- st: this.selectInp.state, //审核状态
|
|
|
- year: this.selectInp.year,
|
|
|
- textInp: encodeURIComponent(this.input),
|
|
|
- page: 1, //当前页
|
|
|
- lim: 99999999, //限制获取几条数据
|
|
|
- };
|
|
|
- this.ajax.get(this.$store.state.api + "/SelectAllProject", param).then(res=>{
|
|
|
- let _data = res.data[0];
|
|
|
- let _array = [];
|
|
|
+ let param = {
|
|
|
+ uid: this.$store.state.userInfo.userid,
|
|
|
+ pid: this.selectInp.filter, //筛选
|
|
|
+ did: this.selectInp.department, //部门
|
|
|
+ tid: this.selectInp.sort, //分类
|
|
|
+ leader: this.selectInp.person, //负责人
|
|
|
+ st: this.selectInp.state, //审核状态
|
|
|
+ year: this.selectInp.year,
|
|
|
+ textInp: encodeURIComponent(this.input),
|
|
|
+ page: 1, //当前页
|
|
|
+ lim: 99999999, //限制获取几条数据
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "/SelectAllProject", param)
|
|
|
+ .then((res) => {
|
|
|
+ let _data = res.data[0];
|
|
|
+ let _array = [];
|
|
|
+
|
|
|
+ _data.forEach((item, index) => {
|
|
|
+ let _json = {};
|
|
|
+ let teacher = item.course_teacher
|
|
|
+ ? JSON.parse(item.course_teacher)
|
|
|
+ : [];
|
|
|
+ _json["项目编号"] = item.ProjectNo;
|
|
|
+ _json["项目名称"] = item.title;
|
|
|
+ _json["项目负责人"] = item.pro_leader;
|
|
|
+ _json["所在部门"] = item.name;
|
|
|
+ _json["分类"] = item.sort;
|
|
|
+ _json["预算(万)"] = item.fund / 10000;
|
|
|
+ _json["创建时间"] = item.createTime;
|
|
|
+ _json["联系电话"] = item.phone;
|
|
|
+ _json["项目状态"] =
|
|
|
+ item.isReturn == 0
|
|
|
+ ? this.classType.find((i) => i.value == item.isupload)[
|
|
|
+ "title"
|
|
|
+ ]
|
|
|
+ : this.isReturnType[item.isReturn];
|
|
|
+ for (let i = 0; i < teacher.length; i++) {
|
|
|
+ _json["指导老师" + (i + 1)] = teacher[i].name;
|
|
|
+ }
|
|
|
|
|
|
- _data.forEach((item, index)=>{
|
|
|
- let _json = {};
|
|
|
- let teacher = item.course_teacher?JSON.parse(item.course_teacher):[]
|
|
|
- _json["项目编号"] = item.ProjectNo;
|
|
|
- _json["项目名称"] = item.title;
|
|
|
- _json["项目负责人"] = item.pro_leader;
|
|
|
- _json["所在部门"] = item.name;
|
|
|
- _json["分类"] = item.sort;
|
|
|
- _json["预算(万)"] = item.fund / 10000;
|
|
|
- _json["创建时间"] = item.createTime;
|
|
|
- _json["联系电话"] = item.phone;
|
|
|
- _json["项目状态"] = item.isReturn==0?this.classType.find(i=>i.value==item.isupload)['title']:this.isReturnType[item.isReturn];
|
|
|
- for(let i =0;i<teacher.length;i++){
|
|
|
- _json["指导老师"+(i+1)] = teacher[i].name;
|
|
|
- }
|
|
|
+ _array.push(_json);
|
|
|
+ });
|
|
|
|
|
|
- _array.push(_json)
|
|
|
- })
|
|
|
+ let XLSX = require("xlsx");
|
|
|
+ const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
|
|
|
+ let ws = XLSX.utils.json_to_sheet(_array); //将json对象数组转化成工作表
|
|
|
+ ws["!cols"] = [
|
|
|
+ //设置每一列的宽度
|
|
|
+ { wch: 15 },
|
|
|
+ { wch: 50 },
|
|
|
+ { wch: 15 },
|
|
|
+ { wch: 20 },
|
|
|
+ { wch: 20 },
|
|
|
+ { wch: 10 },
|
|
|
+ +{ wch: 30 },
|
|
|
+ { wch: 20 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ { wch: 10 },
|
|
|
+ ];
|
|
|
+ XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
|
|
|
+ XLSX.writeFile(workbook, "项目列表.xlsx");
|
|
|
|
|
|
- let XLSX = require("xlsx");
|
|
|
- const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
|
|
|
- let ws = XLSX.utils.json_to_sheet(_array); //将json对象数组转化成工作表
|
|
|
- ws["!cols"] = [
|
|
|
- //设置每一列的宽度
|
|
|
- { wch: 15 },
|
|
|
- { wch: 50 },
|
|
|
- { wch: 15 },
|
|
|
- { wch: 20 },
|
|
|
- { wch: 20 },
|
|
|
- { wch: 10 },
|
|
|
- + { wch: 30 },
|
|
|
- { wch: 20 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- { wch: 10 },
|
|
|
- ];
|
|
|
- XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
|
|
|
- XLSX.writeFile(workbook,"项目列表.xlsx");
|
|
|
-
|
|
|
- this.loading = false;
|
|
|
- console.log(_data)
|
|
|
- });
|
|
|
+ this.loading = false;
|
|
|
+ console.log(_data);
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
- }
|
|
|
+ },
|
|
|
// getUser() {
|
|
|
// var request = new XMLHttpRequest();
|
|
|
// request.open("get", "http://10.16.30.130/sso/api", true);
|
|
@@ -1084,16 +1121,16 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
mounted() {
|
|
|
- // 默认选择当前年份
|
|
|
- this.selectInp.year = new Date().getFullYear().toString();
|
|
|
+ // 默认选择当前年份
|
|
|
+ this.selectInp.year = new Date().getFullYear().toString();
|
|
|
//跳转到此页面立刻获取数据
|
|
|
// this.getData(); //获取表格数据
|
|
|
// this.getUser();
|
|
|
// console.log(this.$store.state.userInfo.type);
|
|
|
},
|
|
|
- activated(){
|
|
|
- this.getData()
|
|
|
- }
|
|
|
+ activated() {
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -1108,13 +1145,13 @@ export default {
|
|
|
max-width: 70px;
|
|
|
min-width: 70px;
|
|
|
}
|
|
|
- /deep/.el-table__row{
|
|
|
- .el-table__cell{
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .el-table__cell:nth-last-child(1){
|
|
|
- cursor: default;
|
|
|
- }
|
|
|
- }
|
|
|
+ /deep/.el-table__row {
|
|
|
+ .el-table__cell {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .el-table__cell:nth-last-child(1) {
|
|
|
+ cursor: default;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|