|
@@ -16,10 +16,8 @@ class QuestionnaireService extends CrudService {
|
|
|
|
|
|
// 插入问卷
|
|
|
async create(data) {
|
|
|
- const { name, num, type, question } = data;
|
|
|
+ const { name, question } = data;
|
|
|
assert(name, '问卷名称不能为空');
|
|
|
- assert(num, '问卷序号不能为空');
|
|
|
- assert(type, '问卷类型不能为空');
|
|
|
const quedata = [];
|
|
|
for (const elm of question) {
|
|
|
const ques = await this.questionmodel.findById(elm);
|