zhangjie 2 年之前
父節點
當前提交
06dedd2796

+ 10 - 5
src/components/selection/SourceDetailSelect.vue

@@ -82,18 +82,23 @@ export default {
       this.optionList = res.data.content || [];
       this.optionList = res.data.content || [];
     },
     },
     select() {
     select() {
+      let selectVal = null;
       if (this.selected) {
       if (this.selected) {
-        const selectVal = Object.assign({}, this.value, {
+        selectVal = Object.assign({}, this.value, {
           questionType: this.selected.questionType,
           questionType: this.selected.questionType,
           sourceDetailId: this.selected.id,
           sourceDetailId: this.selected.id,
           sourceDetailName: this.selected.name,
           sourceDetailName: this.selected.name,
         });
         });
-        this.$emit("input", selectVal);
-        this.$emit("change", this.selected);
       } else {
       } else {
-        this.$emit("input", this.value);
-        this.$emit("change", null);
+        selectVal = Object.assign({}, this.value, {
+          questionType: "",
+          sourceDetailId: "",
+          sourceDetailName: "",
+        });
       }
       }
+
+      this.$emit("input", selectVal);
+      this.$emit("change", this.selected);
     },
     },
   },
   },
 };
 };

+ 5 - 4
src/modules/paper-export/components/RightClickMenu.vue

@@ -29,7 +29,7 @@
         <li v-if="IS_CONTAINER_ELEMENT" @click="toCopyElementChild">
         <li v-if="IS_CONTAINER_ELEMENT" @click="toCopyElementChild">
           <i class="el-icon-copy-document"></i> 复制元素
           <i class="el-icon-copy-document"></i> 复制元素
         </li>
         </li>
-        <li v-if="IS_CONTAINER && curCopyElement" @click="toPasteElementChild">
+        <li v-if="IS_PANE_BOX && curCopyElement" @click="toPasteElementChild">
           <i class="el-icon-document-copy"></i> 粘贴元素
           <i class="el-icon-document-copy"></i> 粘贴元素
         </li>
         </li>
       </ul>
       </ul>
@@ -62,11 +62,11 @@ export default {
     IS_CONTAINER_ELEMENT() {
     IS_CONTAINER_ELEMENT() {
       return !!this.curElement.container;
       return !!this.curElement.container;
     },
     },
-    IS_CONTAINER() {
+    IS_PANE_BOX() {
       return (
       return (
-        this.curElement.type === "CONTAINER" ||
+        this.curElement.type === "PANE_BOX" ||
         (this.curElement.container &&
         (this.curElement.container &&
-          this.curElement.container.type === "CONTAINER")
+          this.curElement.container.type === "PANE_BOX")
       );
       );
     },
     },
   },
   },
@@ -122,6 +122,7 @@ export default {
           return;
           return;
         }
         }
       } else {
       } else {
+        this.setCurElement(curElement);
         this.isClickSide = false;
         this.isClickSide = false;
       }
       }
       this.show();
       this.show();

+ 1 - 1
src/modules/paper/api.js

@@ -207,7 +207,7 @@ export const submitPaperApi = (paperIds) => {
   return $httpWithMsg.post(
   return $httpWithMsg.post(
     `${QUESTION_API}/paper/submit`,
     `${QUESTION_API}/paper/submit`,
     {},
     {},
-    { params: { paperIds } }
+    { params: { paperIds: paperIds.join() } }
   );
   );
 };
 };
 
 

+ 1 - 0
src/modules/paper/components/AuditPaperApply.vue

@@ -127,6 +127,7 @@ export default {
 
 
       await withdrawPaperApi([row.id]);
       await withdrawPaperApi([row.id]);
       this.$message.success("操作成功!");
       this.$message.success("操作成功!");
+      this.getList();
     },
     },
   },
   },
 };
 };

+ 1 - 0
src/modules/paper/components/AuditPaperUnsubmit.vue

@@ -123,6 +123,7 @@ export default {
 
 
       await submitPaperApi([row.id]);
       await submitPaperApi([row.id]);
       this.$message.success("操作成功!");
       this.$message.success("操作成功!");
+      this.getList();
     },
     },
   },
   },
 };
 };

+ 5 - 5
src/modules/question/components/AuditQuestionApply.vue

@@ -3,11 +3,10 @@
     <el-form class="part-filter-form" :model="filter" inline>
     <el-form class="part-filter-form" :model="filter" inline>
       <el-form-item label="审核状态">
       <el-form-item label="审核状态">
         <el-select v-model="filter.auditStatus" clearable placeholder="请选择">
         <el-select v-model="filter.auditStatus" clearable placeholder="请选择">
-          <el-option label="初级待审" value="FIRST_PENDING_TRIAL"> </el-option>
-          <el-option label="中级待审" value="SECOND_PENDING_TRIAL"> </el-option>
-          <el-option label="高级待审" value="THIRD_PENDING_TRIAL"> </el-option>
-          <el-option label="已撤回" value="WITHDRAW"> </el-option>
-          <el-option label="审核未通过" value="NOT_PASS"> </el-option>
+          <el-option label="待审核" value="WITHDRAW"> </el-option>
+          <el-option label="审核中" value="IN_REVIEW"> </el-option>
+          <el-option label="已入库" value="PASS"> </el-option>
+          <el-option label="已驳回" value="NOT_PASS"> </el-option>
         </el-select>
         </el-select>
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
@@ -138,6 +137,7 @@ export default {
 
 
       await withdrawQuestionApi([row.id]);
       await withdrawQuestionApi([row.id]);
       this.$message.success("操作成功!");
       this.$message.success("操作成功!");
+      this.getList();
     },
     },
   },
   },
 };
 };

+ 1 - 0
src/modules/question/components/AuditQuestionUnsubmit.vue

@@ -151,6 +151,7 @@ export default {
 
 
       await submitQuestionApi([row.id]);
       await submitQuestionApi([row.id]);
       this.$message.success("操作成功!");
       this.$message.success("操作成功!");
+      this.getList();
     },
     },
   },
   },
 };
 };

+ 12 - 0
src/modules/question/components/FolderQuestionManageDialog.vue

@@ -9,6 +9,7 @@
       append-to-body
       append-to-body
       fullscreen
       fullscreen
       custom-class="folder-question-manage-dialog"
       custom-class="folder-question-manage-dialog"
+      @opened="dialogOpened"
     >
     >
       <div class="folder-question">
       <div class="folder-question">
         <div class="folder-list">
         <div class="folder-list">
@@ -242,6 +243,16 @@ export default {
     open() {
     open() {
       this.modalIsShow = true;
       this.modalIsShow = true;
     },
     },
+    dialogOpened() {
+      this.filter = {
+        classifyId: null,
+        courseId: "",
+        questionType: "",
+        sourceDetailId: "",
+        propertyIdList: [],
+      };
+      this.$refs.QuestionFolder.selectDefaultNode();
+    },
     toPage(page) {
     toPage(page) {
       this.currentPage = page;
       this.currentPage = page;
       this.getList();
       this.getList();
@@ -269,6 +280,7 @@ export default {
       this.selectedQuestionIds = selections.map((item) => item.id);
       this.selectedQuestionIds = selections.map((item) => item.id);
     },
     },
     folderFilterSelected(folder) {
     folderFilterSelected(folder) {
+      console.log(folder);
       if (!folder) return;
       if (!folder) return;
 
 
       this.curFolder = folder;
       this.curFolder = folder;

+ 5 - 0
src/modules/question/components/QuestionFolder.vue

@@ -16,6 +16,7 @@
           size="small"
           size="small"
           icon="el-icon-edit"
           icon="el-icon-edit"
           plain
           plain
+          :disabled="!curNodeData.level"
           @click="toEditFolder"
           @click="toEditFolder"
           >编辑</el-button
           >编辑</el-button
         >
         >
@@ -318,6 +319,10 @@ export default {
     getSelectedNode() {
     getSelectedNode() {
       return this.curNodeData;
       return this.curNodeData;
     },
     },
+    selectDefaultNode() {
+      this.curNodeData = this.classifyTree[0];
+      this.$emit("selected", this.curNodeData);
+    },
     // drop
     // drop
     handleDragEnter(draggingNode, dropNode) {
     handleDragEnter(draggingNode, dropNode) {
       this.dragOverClassifyId = dropNode.data.id;
       this.dragOverClassifyId = dropNode.data.id;

+ 43 - 3
src/modules/questions/views/PropertyInfo.vue

@@ -104,8 +104,9 @@
         :default-expanded-keys="ids"
         :default-expanded-keys="ids"
         highlight-current
         highlight-current
         :show-checkbox="!IS_ASSIGN_TEACHER"
         :show-checkbox="!IS_ASSIGN_TEACHER"
+        :check-strictly="true"
         @node-click="handleNodeClick"
         @node-click="handleNodeClick"
-        @check-change="checkChange"
+        @check="checkChange"
         ><span
         ><span
           slot-scope="{ data }"
           slot-scope="{ data }"
           :class="{ 'node-level-one': !data.parentId }"
           :class="{ 'node-level-one': !data.parentId }"
@@ -320,8 +321,47 @@ export default {
       this.showMoveButtton = false;
       this.showMoveButtton = false;
       this.curProperty = Object.assign({}, object);
       this.curProperty = Object.assign({}, object);
     },
     },
-    checkChange() {
-      this.multipleSelection = this.$refs.PropertyTree.getCheckedKeys();
+    checkChange(data, { checkedKeys }) {
+      const checked = checkedKeys.includes(data.id);
+
+      if (!data.propertyList || !data.propertyList.length) {
+        this.multipleSelection = this.$refs.PropertyTree.getCheckedKeys();
+        if (checked) return;
+
+        this.multipleSelection = this.multipleSelection.filter(
+          (id) => id !== data.parentId
+        );
+        this.$refs.PropertyTree.setCheckedKeys(this.multipleSelection);
+        return;
+      }
+
+      let propsIds = [];
+      const getPropIds = (propertyList) => {
+        if (!propertyList || !propertyList.length) return;
+        propertyList.forEach((item) => {
+          propsIds.push(item.id);
+          if (item.propertyList) getPropIds(item.propertyList);
+        });
+      };
+
+      if (data.propertyList && data.propertyList.length) {
+        getPropIds(data.propertyList);
+        if (checked) {
+          let checkedKeys = this.$refs.PropertyTree.getCheckedKeys();
+          checkedKeys.push(...propsIds);
+          const idSet = new Set(checkedKeys);
+          this.multipleSelection = Array.from(idSet);
+          this.$refs.PropertyTree.setCheckedKeys(this.multipleSelection);
+        } else {
+          let checkedKeys = this.$refs.PropertyTree.getCheckedKeys();
+          this.multipleSelection = checkedKeys.filter(
+            (item) => !propsIds.includes(item)
+          );
+          this.$refs.PropertyTree.setCheckedKeys(this.multipleSelection);
+        }
+      } else {
+        this.multipleSelection = this.$refs.PropertyTree.getCheckedKeys();
+      }
     },
     },
     //查询所有课程
     //查询所有课程
     getCourses(query) {
     getCourses(query) {