fix: exam/view 修改删除
This commit is contained in:
parent
a4b7c5f897
commit
e289c3f453
|
@ -201,10 +201,8 @@
|
|||
let that =this;
|
||||
if (res.code == 201){
|
||||
that.impForm.doc_path = res.data.path;
|
||||
console.log(that.impForm)
|
||||
UploadPaper(that.impForm).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log(res.data)
|
||||
that.questions = res.data;
|
||||
|
||||
that.$message({
|
||||
|
@ -258,10 +256,11 @@
|
|||
this.questions.splice(val, 1);
|
||||
},
|
||||
handleDelete2(item, val){
|
||||
let that = this
|
||||
deleteQuestion(item.id).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.questions.splice(val, 1);
|
||||
this.$message({
|
||||
that.questions.splice(val, 1);
|
||||
that.$message({
|
||||
type: "success",
|
||||
message: "删除成功!"
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.db import models
|
||||
from apps.system.models import CommonAModel, CommonBModel, CommonBDModel
|
||||
from apps.system.models import CommonAModel, CommonADModel, CommonBDModel
|
||||
from django.contrib.postgres.fields import JSONField
|
||||
from utils.model import BaseModel
|
||||
from apps.edu.models import Course
|
||||
|
@ -20,7 +20,7 @@ class Questioncat(CommonAModel):
|
|||
return self.questioncat.count()
|
||||
|
||||
|
||||
class Question(CommonAModel):
|
||||
class Question(CommonADModel):
|
||||
type_choices = (
|
||||
('单选', '单选'),
|
||||
('多选', '多选'),
|
||||
|
|
|
@ -94,6 +94,6 @@ def interpret_text(start:int, excel_path:str, doc_path:str, field=None):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
doc_path = "C:\code\data\\test.docx"
|
||||
doc_path = "C:\code\data\\判断题.docx"
|
||||
excel_path = "C:\code\data\question.xlsx"
|
||||
interpret_text(3, excel_path, doc_path)
|
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 3.2.12 on 2024-06-14 05:35
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('information', '0050_alter_qualification_change_date'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='qualification',
|
||||
name='change_date',
|
||||
field=models.DateField(blank=True, default=datetime.datetime(2024, 6, 14, 5, 35, 33, 230280, tzinfo=utc), null=True, verbose_name='变更日期'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 3.2.12 on 2024-06-14 06:51
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('information', '0051_alter_qualification_change_date'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='qualification',
|
||||
name='change_date',
|
||||
field=models.DateField(blank=True, default=datetime.datetime(2024, 6, 14, 6, 51, 53, 747831, tzinfo=utc), null=True, verbose_name='变更日期'),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue