|
|
@ -9,7 +9,7 @@ |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>创建人</label> |
|
|
|
<label>创建人</label> |
|
|
|
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="initData"> |
|
|
|
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="founderChange"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="(item,index) in founderList" |
|
|
|
v-for="(item,index) in founderList" |
|
|
|
:key="index" |
|
|
|
:key="index" |
|
|
@ -148,7 +148,7 @@ export default { |
|
|
|
curriculumList: [], |
|
|
|
curriculumList: [], |
|
|
|
queryData: { |
|
|
|
queryData: { |
|
|
|
platformId: 1, // 平台:职站:1 中台:3 |
|
|
|
platformId: 1, // 平台:职站:1 中台:3 |
|
|
|
founder: 2, // 创建人角色(0:系统 1:老师 2:全部) |
|
|
|
founder: +this.$route.query.founder || 2, // 创建人角色(0:系统 1:老师 2:全部) |
|
|
|
state: "", // 状态(0:草稿箱 1:已发布) |
|
|
|
state: "", // 状态(0:草稿箱 1:已发布) |
|
|
|
permissions: "", // 项目权限(0:练习 1:考核 2:竞赛) |
|
|
|
permissions: "", // 项目权限(0:练习 1:考核 2:竞赛) |
|
|
|
cid: '' |
|
|
|
cid: '' |
|
|
@ -209,13 +209,14 @@ export default { |
|
|
|
0: "草稿箱", |
|
|
|
0: "草稿箱", |
|
|
|
1: "已发布" |
|
|
|
1: "已发布" |
|
|
|
}, |
|
|
|
}, |
|
|
|
page: 1, |
|
|
|
page: +this.$route.query.page || 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
|
multipleSelection: [], |
|
|
|
multipleSelection: [], |
|
|
|
copyVisible: false, |
|
|
|
copyVisible: false, |
|
|
|
projectName: "", |
|
|
|
projectName: "", |
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
currentRow: {}, // 复制之后,提交到后台的数据 |
|
|
|
listDataAll: [] |
|
|
|
listDataAll: [], |
|
|
|
|
|
|
|
isFirst: true |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -247,11 +248,6 @@ export default { |
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
if(this.queryDataStatus.platformId) { |
|
|
|
this.queryData = this.queryDataStatus |
|
|
|
this.queryData = this.queryDataStatus |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.$route.query.founder && this.$route.query.founder != 'undefined'){ |
|
|
|
|
|
|
|
this.queryData.founder = +this.$route.query.founder |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.queryData.founder = 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
...mapActions("project", [ |
|
|
|
...mapActions("project", [ |
|
|
@ -266,13 +262,12 @@ export default { |
|
|
|
this.systemListAll = res.data; |
|
|
|
this.systemListAll = res.data; |
|
|
|
// 如果systemId有历史记录,就取历史记录里的systemId,否则就取默认的systemId |
|
|
|
// 如果systemId有历史记录,就取历史记录里的systemId,否则就取默认的systemId |
|
|
|
this.getschoolCourse() |
|
|
|
this.getschoolCourse() |
|
|
|
}else{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
getData() { |
|
|
|
this.setSystemId(this.systemId); |
|
|
|
this.setSystemId(this.systemId); |
|
|
|
|
|
|
|
if (this.isFirst) this.page = +this.$route.query.page || 1 |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
...this.queryData, |
|
|
|
...this.queryData, |
|
|
|
projectName: this.keyword, |
|
|
|
projectName: this.keyword, |
|
|
@ -281,6 +276,7 @@ export default { |
|
|
|
systemId: this.systemId |
|
|
|
systemId: this.systemId |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(this.api.queryProjectManage, data).then(res => { |
|
|
|
this.$post(this.api.queryProjectManage, data).then(res => { |
|
|
|
|
|
|
|
this.isFirst = false |
|
|
|
this.listData = res.data.records; |
|
|
|
this.listData = res.data.records; |
|
|
|
this.total = res.data.total; |
|
|
|
this.total = res.data.total; |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
@ -301,9 +297,19 @@ export default { |
|
|
|
courseChange(val) { |
|
|
|
courseChange(val) { |
|
|
|
const systemIds = this.curriculumList.find(e => e.cid == this.queryData.cid).systemId.split(',') // 获取选取的课程的systemId |
|
|
|
const systemIds = this.curriculumList.find(e => e.cid == this.queryData.cid).systemId.split(',') // 获取选取的课程的systemId |
|
|
|
this.systemList = this.systemListAll.filter(e => systemIds.includes(e.id + '')) // 筛选出该课程下的系统 |
|
|
|
this.systemList = this.systemListAll.filter(e => systemIds.includes(e.id + '')) // 筛选出该课程下的系统 |
|
|
|
this.systemId = this.systemList[0].id |
|
|
|
if (this.systemList.length) this.systemId = this.systemList[0].id |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 创建人选择回调 |
|
|
|
|
|
|
|
founderChange(val) { |
|
|
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
|
|
path: 'list', |
|
|
|
|
|
|
|
query: { |
|
|
|
|
|
|
|
...this.$route.query, |
|
|
|
|
|
|
|
founder: val |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData() { |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
@ -315,6 +321,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { // 切换页码 |
|
|
|
handleCurrentChange(val) { // 切换页码 |
|
|
|
this.page = val; |
|
|
|
this.page = val; |
|
|
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
|
|
path: 'list', |
|
|
|
|
|
|
|
query: { |
|
|
|
|
|
|
|
...this.$route.query, |
|
|
|
|
|
|
|
page: val |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
add() { // 新增项目 |
|
|
|
add() { // 新增项目 |
|
|
|