|
@@ -553,7 +553,7 @@ export default {
|
|
|
let data = [
|
|
|
...info,
|
|
|
...headers,
|
|
|
- ...this.PageBaseData.flatMap(parent =>
|
|
|
+ ...this.PageBaseData.flatMap(parent =>
|
|
|
parent.children.map(child => [
|
|
|
parent.name, // 一级指标
|
|
|
child.name, // 二级指标
|
|
@@ -823,7 +823,7 @@ ws['!rows'] = [
|
|
|
});
|
|
|
},
|
|
|
// 撤回
|
|
|
- withdraw(id) {
|
|
|
+ async withdraw(id) {
|
|
|
let params = [
|
|
|
{
|
|
|
tid: id
|
|
@@ -835,11 +835,47 @@ ws['!rows'] = [
|
|
|
cancelButtonText: "取消",
|
|
|
type: " info"
|
|
|
})
|
|
|
- .then(() => {
|
|
|
+ .then(async () => {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + "updateExamineState", params)
|
|
|
- .then(res => {
|
|
|
- this.getData();
|
|
|
+ .then(async res => {
|
|
|
+ let _testList = [];
|
|
|
+ this.tabLoading = true;
|
|
|
+ let _test = this.tableData.find(i=>i.id==id);
|
|
|
+ _test.json.forEach(i=>{
|
|
|
+ if(i.children.length>0){
|
|
|
+ i.children.forEach(i2=>{
|
|
|
+ if(i2.testid.test.length>0){
|
|
|
+ _testList.push(...i2.testid.test)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ let _time = _test.timeValue?JSON.parse(_test.timeValue):{};
|
|
|
+
|
|
|
+ let allTestData = await this.computedTest(_testList,_test.userid,_time)
|
|
|
+
|
|
|
+
|
|
|
+ let allTestList = []
|
|
|
+ allTestData.forEach(i=>{
|
|
|
+ if(i.testId){
|
|
|
+ let _sp = i.testId.split(',')
|
|
|
+ allTestList.push(..._sp)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ let promise = []
|
|
|
+
|
|
|
+ allTestList.forEach(i=>{
|
|
|
+ promise.push(this.reviewChangeFn(i))
|
|
|
+ })
|
|
|
+
|
|
|
+ Promise.all(promise).then(res=>{
|
|
|
+ this.$message.success("退回成功")
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+
|
|
|
})
|
|
|
.catch(error => {
|
|
|
console.log(error);
|
|
@@ -852,6 +888,42 @@ ws['!rows'] = [
|
|
|
// });
|
|
|
});
|
|
|
},
|
|
|
+ returnTestFn(id){
|
|
|
+ let params = [{
|
|
|
+ id:id,
|
|
|
+ type:"4"
|
|
|
+ }];
|
|
|
+
|
|
|
+ return new Promise((resolve)=>{
|
|
|
+ this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
|
|
|
+ if(res.data==1){
|
|
|
+ resolve(1)
|
|
|
+ }else{
|
|
|
+ resolve(0)
|
|
|
+ }
|
|
|
+ }).catch(e=>{
|
|
|
+ console.log(e);
|
|
|
+ resolve(0)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reviewChangeFn(id){
|
|
|
+ let params = [{
|
|
|
+ id:id,
|
|
|
+ isReview:0
|
|
|
+ }]
|
|
|
+
|
|
|
+ return new Promise((resolve)=>{
|
|
|
+ this.ajax.post(this.$store.state.api+"update_testCourseWorks_isReviewById",params).then(res=>{
|
|
|
+ resolve(1)
|
|
|
+ }).catch(e=>{
|
|
|
+ resolve(0)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // console.log(row);
|
|
|
+ // this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
|
|
|
+ // this.$forceUpdate()
|
|
|
+ },
|
|
|
recordBtn(val) {
|
|
|
this.RecordList = [];
|
|
|
this.recordVisible = true;
|
|
@@ -880,11 +952,11 @@ ws['!rows'] = [
|
|
|
remindExamine() {
|
|
|
this.remDig = true;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 下载excel
|
|
|
getExcel() {
|
|
|
var res = this.tableData;
|
|
|
-
|
|
|
+
|
|
|
// console.log('导出数据',res);
|
|
|
//如果value的json字段的key值和想要的headers值不一致时,可做如下更改
|
|
|
//将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值
|