dev_2022-05-11
luoJunYong.123 3 years ago
parent bd210f309f
commit fb0a6bcb4d
  1. 122
      src/pages/assessment/add/index.vue
  2. 1
      src/pages/project/list/index.vue

@ -73,6 +73,14 @@
:value="item.cid"> :value="item.cid">
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-select v-model="form.curriculumId" @change="initData">
<el-option
v-for="item in systemList"
:key="item.id"
:label="item.label"
:value="item.id">
</el-option>
</el-select> -->
</div> </div>
</div> </div>
</el-card> </el-card>
@ -245,7 +253,8 @@ export default {
page: 1, page: 1,
pageSize: 5, pageSize: 5,
total: 0, total: 0,
isToProject: false isToProject: false,
systemList: []
}; };
}, },
computed: { computed: {
@ -311,7 +320,7 @@ export default {
}); });
// //
this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes]; this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes];
console.log(this.allCheckedNodes) // console.log(this.allCheckedNodes)
}, },
filterNode(value, data) { // filterNode(value, data) { //
if (!value) return true; if (!value) return true;
@ -379,61 +388,72 @@ export default {
}); });
}, },
getProjectData() { getProjectData() {
// this.$get(`${this.api.projectListByCourseId}?cid=${this.form.curriculumId}&permissions=1&projectName=${this.keyword}`).then(res => { this.$get(`${this.api.projectListByCourseId}?cid=${this.form.curriculumId}&permissions=1&projectName=${this.keyword}`).then(res => {
// let { status, data } = res; let { status, data } = res;
// console.log(data) if (status === 200 && data) {
// if (status === 200 && data) { let list = data;
// let list = data; let result = [];
// let result = []; list.map(n => {
// list.map(n => { n.enable || result.push(n);
// n.enable || result.push(n); });
// }); this.projectDataAll = result;
// this.projectDataAll = result; console.log(result)
// console.log(result) this.total = result.length;
// this.total = result.length; this.handlePage();
// // this.handlePage(); }
// } }).catch(err => {
// }).catch(err => { });
// });
// test
// for(let i=0; i<this.cidList.length; i++) {
// this.$get(`${this.api.projectListByCourseId}?cid=${this.cidList[i]}&permissions=1&projectName=${this.keyword}`).then(res => {
// let { status, data } = res;
// console.log('---')
// console.log(data)
// if (status === 200 && data) {
// let list = data;
// let result = [];
// list.map(n => {
// n.enable || result.push(n);
// });
// this.projectDataAll = result;
// console.log(result)
// this.total = result.length;
// this.handlePage();
// }
// }).catch(err => {
// });
// }
this.$get(this.api.getSystemIdBySchool).then(res => { // this.$get(this.api.getSystemIdBySchool).then(res => {
if (res.status == 200){ // if (res.status == 200){
const systemList = res.data; // this.systemList = res.data;
// systemIdsystemIdsystemId // // systemIdsystemIdsystemId
const systemId = systemList[0].id; // const systemId = this.systemList[0].id;
console.log(this.keyword, // let data = {
this.page, // platformId: 1, // :1 :3
this.pageSize) // founder: 2, // (0: 1: 2:)
console.log(systemId) // state: "", // (0:稿 1:)
let data = { // permissions: 1, // (0: 1: 2:)
platformId: 1, // :1 :3 // projectName: this.keyword,
founder: 2, // (0: 1: 2:) // pageNum: this.page,
state: "", // (0:稿 1:) // pageSize: this.pageSize,
permissions: 1, // (0: 1: 2:) // systemId
projectName: this.keyword, // };
pageNum: this.page, // this.$post(this.api.queryProjectManage, data).then(res => {
pageSize: this.pageSize, // const { data: { records } } = res
systemId // this.projectDataAll = records;
}; // this.total = records.length;
this.$post(this.api.queryProjectManage, data).then(res => { // this.handlePage();
// this.listData = res.data.records; // }).catch(err => {
// this.total = res.data.total; // });
console.log(res.data) // }else{
const { data: { records } } = res // }
this.projectDataAll = records;
this.total = records.length;
console.log(this.projectDataAll)
this.handlePage();
}).catch(err => {
});
}else{
}
}); // });
}, },
handlePage() { handlePage() {
let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize); let result = this.projectDataAll.slice((this.page - 1) * this.pageSize, this.page * this.pageSize);

@ -254,6 +254,7 @@ export default {
if (res.status == 200){ if (res.status == 200){
this.systemList = res.data; this.systemList = res.data;
console.log(this.systemList)
// systemIdsystemIdsystemId // systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : this.systemList[0].id; this.systemId = this.lastSystemId ? this.lastSystemId : this.systemList[0].id;
this.getData(); this.getData();

Loading…
Cancel
Save