dev_2022-05-11
e 3 years ago
parent 8d63dec4bd
commit 5ae4356cab
  1. 3
      src/pages/achievement/list/index.vue
  2. 125
      src/pages/assessment/list/index.vue
  3. 2
      src/pages/student/list/index.vue
  4. 7
      src/pages/system/list/staff.vue
  5. 4
      src/setting.js

@ -87,7 +87,8 @@
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="auth('练习成绩管理') || auth('考核成绩管理')" type="text" @click="entry(scope.row)">成绩管理</el-button>
<el-button v-if="auth('删除')" type="text" :disabled="scope.row.isDel !== 0" @click="handleDelete(scope.row)" >删除</el-button>
<el-button type="text" v-if="scope.row.isDel == 1" @click="handleDelete(scope.row)" >删除</el-button>
<el-button type="text" v-else style='color:#999' >删除</el-button>
</template>
</el-table-column>
</el-table>

@ -91,7 +91,9 @@
</el-table-column>
<el-table-column label="实验状态" align="center">
<template slot-scope="scope" v-if="scope.row.show">
<span>{{ status[scope.row.status] }}</span>
<span>
{{ status[scope.row.status] }}
</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
@ -126,12 +128,10 @@ export default {
{
value: "",
name: "不限"
},
{
}, {
value: 1,
name: "手动发布"
},
{
}, {
value: 2,
name: "定时发布"
}
@ -141,17 +141,14 @@ export default {
{
value: "",
name: "不限"
},
{
value: 1,
}, {
value: 0,
name: "待开始"
},
{
value: 2,
}, {
value: 1,
name: "进行中"
},
{
value: 3,
}, {
value: 2,
name: "已结束"
}
],
@ -160,16 +157,13 @@ export default {
{
id: "",
name: "不限"
},
{
}, {
id: 1,
name: "近一个月"
},
{
}, {
id: 3,
name: "近三个月"
},
{
}, {
id: 6,
name: "近六个月"
}
@ -250,11 +244,12 @@ export default {
if (item.countDown > 0) {
item.countDown--;
} else {
if (item.status === 0 && item.type === 2) { // -
if (item.status == 0 && item.type == 2) { // -
item.status = 1;
item.countDown = (new Date(item.stopTime).getTime() - new Date().getTime()) / 1000;
} else if (item.status === 1) {
item.status = 2;
// }
} else if (item.status == 1) {
// item.status = 2;
}
}
item.show = true;
@ -277,25 +272,26 @@ export default {
};
this.$post(this.api.pageByCondition, data).then(res => {
this.listData = res.list;
console.log(this.listData)
this.total = res.total;
this.listData.forEach(i => {
i.show = false;
if (i.status === 2) { //
if (i.status == 2) { //
i.countDown = 0;
} else {
if (i.type === 2) { //
if (i.status === 0) {
if (i.type == 2) { //
if (i.status == 0) {
//
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; //
} else if (i.status === 1) {
} else if (i.status == 1) {
//
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000;
}
} else if (i.type === 1) { //
if (i.status === 0) {
} else if (i.type == 1) { //
if (i.status == 0) {
//
i.countDown = 0;
} else if (i.status === 1) {
} else if (i.status == 1) {
//
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000;
}
@ -331,10 +327,7 @@ export default {
this.$router.push(`/achievement/ass?id=${row.id}&classId=${row.classId}&projectId=${row.projectId}&classInfo=${JSON.stringify(row.classInfo)}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`);
},
start(row) {
let data = {
id: row.id,
};
this.$post(this.api.enableAssessment, data).then(res => {
this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(res => {
util.successMsg("启动成功!");
this.getData();
}).catch(err => {
@ -344,36 +337,32 @@ export default {
finish(row) {
this.$confirm("确定要提前结束吗?", "提示", {
type: "warning"
})
.then(() => {
let data = {
id: row.id,
endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()),
status: 2
};
this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => {
util.successMsg("提前结束成功!");
this.getData();
}).catch(err => {
console.log(err);
});
})
.catch(() => {
}).then(() => {
let data = {
id: row.id,
endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()),
status: 2
};
this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => {
util.successMsg("提前结束成功!");
this.getData();
}).catch(err => {
console.log(err);
});
}).catch(() => {
});
},
delData(row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(this.api.deleteAssessment, [row.id]).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {
}).then(() => {
this.$post(this.api.deleteAssessment, [row.id]).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {
});
},
delAllData() {
if (this.multipleSelection.length) {
@ -382,18 +371,16 @@ export default {
});
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(this.api.deleteAssessment, ids).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {
}).then(() => {
this.$post(this.api.deleteAssessment, ids).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => {
});
} else {
util.errorMsg("请先选择数据 !");
}

@ -1018,6 +1018,8 @@ export default {
this.importVisible = false;
this.studentType = 1;
this.keyWord = "";
this.handleClose();
this.handleRefresh();
this.initData();
}
}

@ -45,7 +45,7 @@
<el-dialog :title="isDetail ? '查看员工' : (isAdd ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible"
width="30%" @close="closeTeacher" class="dialog" :close-on-click-modal="false">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="65px" :disabled="isDetail">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="150px" :disabled="isDetail">
<el-form-item prop="account" label="账号">
<el-input v-model.trim="teacherForm.account" placeholder="请输入职工账号"></el-input>
</el-form-item>
@ -53,7 +53,7 @@
<el-input v-model.trim="teacherForm.userName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item prop="roleValue" label="账号角色">
<el-select v-model="teacherForm.roleValue" @change="roleChange" @remove-tag="roleRemove" multiple style="width: 100%">
<el-select v-model="teacherForm.roleValue" @change="roleChange" @remove-tag="roleRemove" multiple style="width: 100%;height: 32px">
<el-option
v-for="item in roleList"
:key="item.id"
@ -637,4 +637,7 @@ export default {
padding: 24px;
}
}
.el-input__inner{
height: 32px;
}
</style>

@ -4,7 +4,7 @@
const url = location.host;
const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //是否河海版本
const isCH = url.includes("120.78.127.12"); //是否巢湖版本
const isCH = url.includes("124.71.12.62"); //是否巢湖版本
const isBeta = url.includes("120.78.198.231"); //是否职站测试
const isPro = url.includes("occupationlab.com"); //是否职站生产
const isTest = url.includes('39.108.250.202'); //是否中台测试服
@ -19,7 +19,7 @@ if (isHh) {
title = "教师管理端";
} else if (isCH) {
// 巢湖
host = "http://120.78.127.12/";
host = "http://124.71.12.62/";
title = "教师管理端";
} else if (isBeta) {
// 职站测试

Loading…
Cancel
Save