@@ -252,8 +254,7 @@
return {
pickerOptions: {
disabledDate(time) {
- return
- time.getTime() > (Date.now() - 8.64e6)
+ return time.getTime() <= Date.now() - 1 * 24 * 3600 * 1000
}
},
active: 1,
@@ -368,7 +369,7 @@
],
-
+
CustomName: [
{
required: true,
@@ -428,9 +429,20 @@
mounted() {
//计算页面内容区域的高度
this.contentHeight = window.innerHeight - 90;
- //this.GetList();
+ this.GetList();
},
methods: {
+ changeTab(a, b) {
+ if (a.index == "1") {
+ this.randomQuestionTypeList[0].disabled = true;
+ this.randomQuestionTypeList[1].disabled = false;
+ }
+ else {
+
+ this.randomQuestionTypeList[1].disabled = true;
+ this.randomQuestionTypeList[0].disabled = false;
+ }
+ },
removeItem(item, index) {
this.arr2.splice(index, 1);
},
@@ -490,6 +502,54 @@
getQuestionClassList().then((res) => {
let alllist = res.data.data;
this.typelist = alllist;
+
+ let zylist = [], cplist = [];
+ let zylistSource = alllist.filter(o => { return o.ClassType == 0; });
+ let cplistSource = alllist.filter(o => { return o.ClassType == 2; });
+
+ zylist = zylistSource.filter(t => !t.ParentId);
+ zylist = zylist.map((t) => {
+ t.value = t.id;
+ t.label = t.ClassificationName;
+ t.children = this.getSubTree(t.id, zylistSource);
+ if (!t.children || !t.children.length) {
+ delete t.children;
+ }
+ return t;
+ });
+
+ cplist = cplistSource.filter(t => !t.ParentId);
+ cplist = cplist.map((t) => {
+ t.value = t.id;
+ t.label = t.ClassificationName;
+ t.children = this.getSubTree(t.id, cplistSource);
+ if (!t.children || !t.children.length) {
+ delete t.children;
+ }
+ return t;
+ });
+ var list = [{
+ value: '-1',
+ label: '专业类',
+ children: zylist,
+ disabled: false
+ },
+ {
+ value: '-2',
+ label: '测评类',
+ children: cplist,
+ disabled: true,
+ }
+ ];
+ this.randomQuestionTypeList = list;
+ });
+ },
+
+ getQuestionClassListHeadler2bk() {
+ let _this = this;
+ getQuestionClassList().then((res) => {
+ let alllist = res.data.data;
+ this.typelist = alllist;
let list = alllist.filter(t => !t.ParentId);
list = list.map((t) => {
t.value = t.id;
@@ -500,6 +560,7 @@
}
return t;
});
+
this.randomQuestionTypeList = list;
});
},
@@ -507,7 +568,6 @@
this.dialogTableVisible = false;
},
randomSubmit() {
-
var _this = this;
if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) {
this.$notify({
@@ -517,7 +577,7 @@
});
return;
}
-
+
var list = JSON.parse(JSON.stringify(this.randomSubjectList));
if (list.findIndex((t) => !t.QuestionClassId || !t.QuestionClassId.length || !t.Count) > -1) {
this.$message.warning("参数不完整");
@@ -529,7 +589,7 @@
return t;
});
var count = 0;
- list.forEach(o=>{ count+=o.Count;});
+ list.forEach(o => { count += o.Count; });
if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && (_this.arr2.length + count) > _this.TestPaper.FLevelCount) {
this.$notify({
title: '题目数量已经达到级别最大',
@@ -601,7 +661,7 @@
},
SubmitTestPaper() {
var _this = this;
- if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) {
+ if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length > _this.TestPaper.FLevelCount) {
this.$notify({
title: '题目数量已经达到级别最大',
// message: res.data.message,
@@ -643,13 +703,10 @@
this.$confirm("试题没有题目!", "消息");
}
} else {
-
return false;
}
});
-
-
-
+
},
load() {
this.loading = true;
@@ -670,7 +727,8 @@
});
this.loadingType = true;
});
- } else {
+ }
+ else {
getQuestionList(this.parameter).then((res) => {
if (this.parameter.pageIndex == 1) {
this.arr1 = [];
@@ -680,8 +738,10 @@
});
this.count = res.data.data.total;
this.$forceUpdate();
+ this.loadingType=true;
});
}
+
},
end1(e) {
var that = this;
@@ -723,6 +783,12 @@
ComeHere(e) {
var _this = this;
if (_this.TestPaper.FLevelCount && _this.TestPaper.FLevelCount > 0 && _this.arr2.length >= _this.TestPaper.FLevelCount) {
+ this.$notify({
+ title: '题目数量已经达到级别最大',
+ // message: res.data.message,
+ type: 'warning'
+ });
+ return;
return;
}
var d = e.item._underlying_vm_;
diff --git a/src/views/TestPaper/TestPaperList.vue b/src/views/TestPaper/TestPaperList.vue
index d070a73..1ec4e33 100644
--- a/src/views/TestPaper/TestPaperList.vue
+++ b/src/views/TestPaper/TestPaperList.vue
@@ -33,7 +33,7 @@
搜索
- 添加试卷
+
@@ -121,6 +121,11 @@
{{ scope.row.Describe }}
+
+
+ {{ scope.row.EffectiveStartTime | timeF }} - {{ scope.row.EffectiveEndTime | timeF }}
+
+
{handleCommand(e,scope.row)}">
@@ -361,6 +366,13 @@
console.log(e);
return '未知'
}
+ },
+ timeF(val) {
+ try {
+ return val.split('T')[0];
+ } catch (e) {
+ return val
+ }
}
},
beforeCreate() {
diff --git a/src/views/user/userlist.vue b/src/views/user/userlist.vue
index c3e95fc..0b79f39 100644
--- a/src/views/user/userlist.vue
+++ b/src/views/user/userlist.vue
@@ -8,20 +8,23 @@
-
-
-
+
+
+
+
+
+
-
+
-
+
@@ -31,7 +34,7 @@
+ :allow-half="true" :max="7" :score-template="(!query.stars || query.stars<1) ?'无':query.stars+' 星' ">
@@ -289,6 +292,7 @@
+
@@ -1157,6 +1161,13 @@
// this.$loading({lock:true,text:'保存中...'});
if (this.loading) {
return;
+ }
+ if(!this.temp.ClassTitle){
+ this.$message({
+ message: "请填写分类名称!",
+ type: "warning",
+ });
+ return;
}
this.loading = true;
var postData = this.temp;
diff --git a/vue.config.js b/vue.config.js
index ab8ce42..b377e73 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -39,7 +39,7 @@ module.exports = {
proxy: {
'/development': {
// target: `http://admin.7-stars.com.cn/`, //后台服务地址
- target:'http://localhost:8877',
+ target:'https://localhost:44399/',
// target:'http://localhost:8009',
changeOrigin: true,
pathRewrite: {
@@ -47,7 +47,9 @@ module.exports = {
}
},
'/api': {
- target: `http://admin.7-stars.com.cn/`, //后台服务地址
+ target:'https://localhost:44399/',
+
+ // target: `http://admin.7-stars.com.cn/`, //后台服务地址
// target: 'http://localhost:8877',
changeOrigin: true,
pathRewrite: {}