-
- Back
-
-
-
- {{ systemName }} 判分点设置
-
-
-
-
- 判分点列表
-
-
-
-
-
- 新增
- 批量删除
- 批量复制
+
+
+
+
-
-
+
+
@@ -100,7 +77,7 @@ export default {
keyword: '',
searchTimer: null,
tableData: [],
- dataTotal: 0, // 总条数,根据接口获取数据长度(注意:这里不能为空)
+ dataTotal: 0,
pageNum: 1,
pageSize: 10,
currentPage: 1,
@@ -124,7 +101,8 @@ export default {
keyword: function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
- this.pageNum = 1;
+ this.$refs.table.clearSelection()
+ this.pageNum = 1
this.initData()
}, 500)
},
@@ -142,6 +120,7 @@ export default {
},
methods: {
handleCurrentChange (val) { // 切换页码
+ this.$refs.table.clearSelection()
this.pageNum = val;
this.initData();
},
@@ -172,17 +151,14 @@ export default {
} else {
this.$message.error(res.message);
}
- }).catch(err => {
- console.log(err);
- });
+ }).catch(err => { });
},
//
handleSelectionChange (val) {
- console.log(val)
this.multipleSelection = val;
},
//批量删除
- deletes () {
+ batchDel () {
let bcIdList = [];
let nameList = [];
let lcIdList = [];
@@ -226,16 +202,9 @@ export default {
if (this.nameList.length === this.tableData.length && this.pageNum > 1) {
this.handleCurrentChange(this.pageNum - 1)
}
- }).catch(() => {
- this.$message.info("已取消删除");
- });
+ }).catch(() => { });
} else {
- this.$alert('请选择需要删除的判分点', '提示', {
- confirmButtonText: '好的',
- callback: action => {
-
- }
- });
+ this.$message.error('请选择数据')
}
},
getProgrammingClassData (params) { // 获取编程类判分点列表数据
@@ -246,31 +215,20 @@ export default {
});
},
getCHProgrammingClassData () {
- let systemId = this.$route.query.systemId
- let userId = this.$route.query.userId
- let pageNum = this.$route.query.pageNum
- let pageSize = this.$route.query.pageSize
- let queryName = this.$route.query.queryName
- let userIdList = this.$route.query.userIdList
- this.$post(`${this.api.QueryPointOfJudgement}?systemId=${systemId}&userId=${userId}&pageNum=${pageNum}&pageSize=${pageSize}&queryName=${queryName}&userIdList=${userIdList}`).then(res => {
+ const { query } = this.$route
+ this.$post(`${this.api.QueryPointOfJudgement}?systemId=${query.systemId}&userId=${query.userId}&pageNum=${query.pageNum}&pageSize=${query.pageSize}&queryName=${query.queryName}&userIdList=${query.userIdList}`).then(res => {
this.tableData = res.message.records;
this.dataTotal = res.message.total;
- }).catch(err => {
- console.log(err);
- });
+ }).catch(err => { });
},
- HomepageJump () { //新增
- if (this.isProcess) {
- // 交易类
- this.$router.push(`Transaction?isAdd=true&systemId=${this.systemId}`);
- } else {
- // 编程类
- this.$router.push(`program?isAdd=true&systemId=${this.systemId}`);
- }
+ //新增
+ toAdd () {
+ this.$router.push(`${this.isProcess ? 'Transaction' : 'program'}?isAdd=true&systemId=${this.systemId}`)
},
// 批量复制
batchCopy () {
if (this.multipleSelection.length) {
+ // 有选中的情况下直接打开复制弹框
this.form = {
name: '',
checkpointId: '',
@@ -278,7 +236,21 @@ export default {
this.curRow = null
this.copyVisible = true
} else {
- this.$message.warning("请先选择数据 !");
+ // 没选中就提示是否要复制全部数据
+ this.$confirm('当前未选中任何数据,是否需要复制当前列表的全部数据?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(async () => {
+ const res = await this.$post(this.api.queryAllJudgmentPoint, {
+ name: this.keyword,
+ pageNum: 1,
+ pageSize: 1000,
+ systemId: this.systemId
+ })
+ this.multipleSelection = res.message.records
+ this.batchCopy()
+ }).catch(() => { })
}
},
// 复制
@@ -430,182 +402,40 @@ export default {
diff --git a/src/views/Program.vue b/src/views/Program.vue
index ff252fa..51c8a22 100644
--- a/src/views/Program.vue
+++ b/src/views/Program.vue
@@ -1,179 +1,106 @@
-
+
+
-
+ 新增
+ 批量删除
+ 批量复制
-
-
-
-
-
-
-
- {{ scope.$index + (pageNum - 1) * pageSize + 1 }}
-
-
-
-
-
-
-
-
- 复制
- 编辑
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ {{ scope.$index + (pageNum - 1) * pageSize + 1 }}
+
+
+
+
+
+
+
+ 复制
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
- Back
-
- 判分点设置
-
-
- 保存
+
+
+
+
-
+
-
+
+
+
+ 保存
+
+
-
+
+
-
-
-
+
+
+
-
-
+ 基本信息
- 基本信息
判分点
- 实验要求
-
-
+
-
-
+ 实验代码
- 实验代码
参考答案
-
+
-
+
+
+
+
+ {{ scope.row.isSubject && scope.row.index + 1 }}
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.resultOperation === 0 ? '且' : '或' }}
+
+
+ {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 保存
+ 取消
+ 删除
+
+
+
+
@@ -224,7 +151,7 @@ export default {
}
},
methods: {
- Back () { // 返回
+ back () { // 返回
this.$router.back();
},
getInfoData (bcId) { // 获取判分点详细信息
@@ -368,7 +295,7 @@ export default {
this.$post(this.api.addBcJudgmentPoint, this.formData).then(res => {
if (res.status === 200) {
this.$message.success("新增判分点成功");
- this.Back();
+ this.back();
} else {
this.$message.warning(res.message);
}
@@ -379,7 +306,7 @@ export default {
this.$post(this.api.updateBcJudgmentPoint, this.formData).then(res => {
if (res.status === 200) {
this.$message.success("更新判分点成功");
- this.Back();
+ this.back();
} else {
this.$message.warning(res.message);
}
@@ -537,35 +464,12 @@ export default {
-
+
+
+
-
-
- 判分规则
-
- 批量删除
- 一键保存
- 新增
-
+
+
+
-
-
-
-
-
- {{ scope.row.isSubject && scope.row.index + 1 }}
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.resultOperation === 0 ? '且' : '或' }}
-
-
- {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
-
-
-
-
-
-
-
-
-
-
- 编辑
- 保存
- 取消
- 删除
-
-
-
-
- 判分规则
+
+ 批量删除
+ 一键保存
+ 新增
-
- 字段一致性规则:用户编辑器中至少出现如下语句
-运行结果一致性规则:用户运行结果需要与下方代码运行结果一致
-字段一致性规则:用户编辑器中至少出现如下语句
+运行结果一致性规则:用户运行结果需要与下方代码运行结果一致
+