Selaa lähdekoodia

完善细节,修改BUG

huangtao 4 vuotta sitten
vanhempi
commit
9ac87108d2

+ 23 - 9
src/views/articleManagement/articleCreate.vue

@@ -30,7 +30,7 @@
               v-decorator="[
                 'description',
                 {
-                  rules: [{ required: true, message: '请输入文章描述' }],
+                  rules: [{ message: '请输入文章描述' }],
                   initialValue: description,
                 },
               ]"
@@ -48,7 +48,7 @@
                       message: '请选择文章分类父类',
                     },
                   ],
-                  initialValue: articleChildClass.name,
+                  initialValue: articleParentClass.name,
                 },
               ]"
               @change="articleClassParentChange"
@@ -72,10 +72,10 @@
                       message: '请选择文章分类子类',
                     },
                   ],
-                  initialValue: articleParentClass.name,
+                  initialValue: articleChildClass.name,
                 },
               ]"
-              :disabled="!articleParentClass || !articleParentClass.id"
+              :disabled="!articleChildClass || !articleChildClass.id"
               @change="articleClassChildChange"
             >
               <a-select-option
@@ -104,10 +104,21 @@
             </a-select>
           </a-form-item>
           <a-form-item label="必学日期:">
-            <a-date-picker
+            <!-- <a-date-picker
               :defaultValue="learnDate"
               @change="learnDateChoose"
               style="width:100%;"
+            /> -->
+            <a-date-picker
+              placeholder="请选择日期"
+              @change="learnDateChoose"
+              v-decorator="[
+                'learnDate',
+                {
+                  initialValue: learnDate,
+                },
+              ]"
+              style="width:100%;"
             />
           </a-form-item>
           <a-form-item v-show="false" :wrapper-col="{ span: 20, offset: 10 }">
@@ -209,6 +220,9 @@ export default {
     },
     // 查询文章分类子集
     getArticleChildClass() {
+      if (!this.articleParentClass.id) {
+        return;
+      }
       let pathParamsData = { categoryId: this.articleParentClass.id };
       this.$_http
         .get(
@@ -262,7 +276,6 @@ export default {
     },
     // 必学日期选择
     learnDateChoose(date, dateString) {
-      console.log(dateString);
       this.learnDate = dateString;
     },
     handleSubmitBtnFun() {
@@ -292,10 +305,11 @@ export default {
       });
       //   文章描述
       this.description = item.description ? item.description : '';
-      // 文章分类-父类
-      this.articleChildClass = item.rootMaterialCategory;
+      // 文章分类-父类:
+      this.articleParentClass = item.rootMaterialCategory;
+      this.getArticleChildClass(); // 获取子类列表的值
       // 文章分类-子类
-      this.articleParentClass = item.materialCategory;
+      this.articleChildClass = item.materialCategory;
       //   选中工种
       if (item.engineerTypes.length !== 0) {
         let engineerId = item.engineerTypes[0];

+ 1 - 1
src/views/engineeringWorkManagement/engineeringWorkList.vue

@@ -135,7 +135,7 @@ export default {
       let that = this;
       that.$confirm({
         title: '删除',
-        content: `确认删除 ${record.name} 吗?`,
+        content: `删除工种会使属于该工种的文章试题和考试变为不限工种,确认删除 ${record.name} 吗?`,
         okText: '确认',
         cancelText: '取消',
         onOk() {

+ 1 - 1
src/views/examManagement/examManualVolumeFormation.vue

@@ -934,7 +934,7 @@ export default {
         type: this.bank_checkedQuestionType,
         categoryid: this.bank_checkedQuestionTypeConditionChildren,
         engineertypeid: this.bank_engineeringWorkChooseValue,
-        name: this.searchInputVal,
+        content: this.searchInputVal,
       };
       this.$_http
         .get(this.$_API.INTERFACE_GET_EXAMS_QUESTION_LIST, { params })

+ 1 - 1
src/views/examQuestionManagement/examQuestionList.vue

@@ -336,7 +336,7 @@ export default {
         type: this.checkedExamQuestionType,
         categoryid: this.checkedQuestionConditionChildrenType,
         engineertypeid: this.engineeringWorkChoose,
-        name: this.searchInputVal,
+        content: this.searchInputVal,
       };
       this.$_http
         .get(this.$_API.INTERFACE_GET_EXAMS_QUESTION_LIST, { params })

+ 1 - 1
src/views/examQuestionManagement/examQuestionTypeCondition.vue

@@ -261,7 +261,7 @@ export default {
       let that = this;
       this.$confirm({
         title: '删除',
-        content: `确认删除试题类型 ${record.name} 吗?`,
+        content: `删除试题类型会使属于该类型的试题变为不限试题类型,确认删除试题类型 ${record.name} 吗?`,
         okText: '确认',
         cancelText: '取消',
         onOk() {

+ 7 - 5
src/views/examQuestionManagement/examQusetionCreateGapFilling.vue

@@ -210,7 +210,7 @@ export default {
         this.getExamQuestionDetailFun(this.$route.query.id); // 查询:试题的详情
       } else {
         this.typeConditionParentValue = this.typeConditionParentList[0].id; // 所选试题类型-父类
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       }
     },
     // 查询:试题的详情
@@ -242,7 +242,7 @@ export default {
           // 试题类型-父类
           this.typeConditionParentValue =
             this.examQuestionDetail.rootQuestionCategory.id || '';
-          this.selectTypeConditionParent(); // 查询:试题类型列表-子类
+          this.getTableChildrenListFun(); // 查询:试题类型列表-子类
           // 试题类型-子类
           this.typeConditionChildrenValue =
             this.examQuestionDetail.questionCategory.id || '';
@@ -255,7 +255,7 @@ export default {
         });
     },
     // 查询:试题类型列表-子类
-    getTableChildrenListFun() {
+    getTableChildrenListFun(isNeedReset) {
       this.loading = true;
       let params = {
         categoryId: this.typeConditionParentValue,
@@ -269,7 +269,9 @@ export default {
         )
         .then((res) => {
           this.typeConditionChildrenList = res.data;
-          this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          if (isNeedReset) {
+            this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          }
           this.loading = false;
         })
         .catch(() => {
@@ -287,7 +289,7 @@ export default {
     // 操作:选择了父类
     selectTypeConditionParent() {
       if (this.typeConditionParentValue) {
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       } else {
         this.typeConditionChildrenList = [];
         this.typeConditionChildrenValue = '';

+ 7 - 5
src/views/examQuestionManagement/examQusetionCreateMultiple.vue

@@ -236,7 +236,7 @@ export default {
         this.getExamQuestionDetailFun(this.$route.query.id); // 查询:试题的详情
       } else {
         this.typeConditionParentValue = this.typeConditionParentList[0].id; // 所选试题类型-父类
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       }
     },
     // 查询:试题的详情
@@ -268,7 +268,7 @@ export default {
           // 试题类型-父类
           this.typeConditionParentValue =
             this.examQuestionDetail.rootQuestionCategory.id || '';
-          this.selectTypeConditionParent(); // 查询:试题类型列表-子类
+          this.getTableChildrenListFun(); // 查询:试题类型列表-子类
           // 试题类型-子类
           this.typeConditionChildrenValue =
             this.examQuestionDetail.questionCategory.id || '';
@@ -281,7 +281,7 @@ export default {
         });
     },
     // 查询:试题类型列表-子类
-    getTableChildrenListFun() {
+    getTableChildrenListFun(isNeedReset) {
       this.loading = true;
       let params = {
         categoryId: this.typeConditionParentValue,
@@ -295,7 +295,9 @@ export default {
         )
         .then((res) => {
           this.typeConditionChildrenList = res.data;
-          this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          if (isNeedReset) {
+            this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          }
           this.loading = false;
         })
         .catch(() => {
@@ -313,7 +315,7 @@ export default {
     // 操作:选择了父类
     selectTypeConditionParent() {
       if (this.typeConditionParentValue) {
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       } else {
         this.typeConditionChildrenList = [];
         this.typeConditionChildrenValue = '';

+ 7 - 6
src/views/examQuestionManagement/examQusetionCreateSingle.vue

@@ -252,7 +252,7 @@ export default {
         this.getExamQuestionDetailFun(this.$route.query.id); // 查询:试题的详情
       } else {
         this.typeConditionParentValue = this.typeConditionParentList[0].id; // 所选试题类型-父类
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       }
     },
     // 查询:试题的详情
@@ -272,7 +272,6 @@ export default {
           )
         )
         .then((res) => {
-          console.log(res);
           this.examQuestionDetail = { ...res.data };
           // 选项
           this.optionsList = this.examQuestionDetail.answers.map((item) => {
@@ -285,7 +284,7 @@ export default {
           // 试题类型-父类
           this.typeConditionParentValue =
             this.examQuestionDetail.rootQuestionCategory.id || '';
-          this.selectTypeConditionParent(); // 查询:试题类型列表-子类
+          this.getTableChildrenListFun(); // 查询:试题类型列表-子类
           // 试题类型-子类
           this.typeConditionChildrenValue =
             this.examQuestionDetail.questionCategory.id || '';
@@ -298,7 +297,7 @@ export default {
         });
     },
     // 查询:试题类型列表-子类
-    getTableChildrenListFun() {
+    getTableChildrenListFun(isNeedReset) {
       this.loading = true;
       let params = {
         categoryId: this.typeConditionParentValue,
@@ -312,7 +311,9 @@ export default {
         )
         .then((res) => {
           this.typeConditionChildrenList = res.data;
-          this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          if (isNeedReset) {
+            this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          }
           this.loading = false;
         })
         .catch(() => {
@@ -338,7 +339,7 @@ export default {
     // 操作:选择了父类
     selectTypeConditionParent() {
       if (this.typeConditionParentValue) {
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       } else {
         this.typeConditionChildrenList = [];
         this.typeConditionChildrenValue = '';

+ 7 - 5
src/views/examQuestionManagement/examQusetionCreateTrueOrFalse.vue

@@ -227,7 +227,7 @@ export default {
         this.getExamQuestionDetailFun(this.$route.query.id); // 查询:试题的详情
       } else {
         this.typeConditionParentValue = this.typeConditionParentList[0].id; // 所选试题类型-父类
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       }
     },
     // 查询:试题的详情
@@ -259,7 +259,7 @@ export default {
           // 试题类型-父类
           this.typeConditionParentValue =
             this.examQuestionDetail.rootQuestionCategory.id || '';
-          this.selectTypeConditionParent(); // 查询:试题类型列表-子类
+          this.getTableChildrenListFun(); // 查询:试题类型列表-子类
           // 试题类型-子类
           this.typeConditionChildrenValue =
             this.examQuestionDetail.questionCategory.id || '';
@@ -272,7 +272,7 @@ export default {
         });
     },
     // 查询:试题类型列表-子类
-    getTableChildrenListFun() {
+    getTableChildrenListFun(isNeedReset) {
       this.loading = true;
       let params = {
         categoryId: this.typeConditionParentValue,
@@ -286,7 +286,9 @@ export default {
         )
         .then((res) => {
           this.typeConditionChildrenList = res.data;
-          this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          if (isNeedReset) {
+            this.typeConditionChildrenValue = this.typeConditionChildrenList[0].id;
+          }
           this.loading = false;
         })
         .catch(() => {
@@ -296,7 +298,7 @@ export default {
     // 操作:选择了父类
     selectTypeConditionParent() {
       if (this.typeConditionParentValue) {
-        this.getTableChildrenListFun(); // 查询:试题类型列表-子类
+        this.getTableChildrenListFun(true); // 查询:试题类型列表-子类
       } else {
         this.typeConditionChildrenList = [];
         this.typeConditionChildrenValue = '';