Prechádzať zdrojové kódy

fix:安管三类禁用简答题,退款优化

Tang 2 rokov pred
rodič
commit
600d092fd5

+ 13 - 0
src/components/busIns.vue

@@ -191,6 +191,19 @@ export default {
       // 立即处理 进入页面就触发
       immediate: true,
     },
+    newSujectApis: {
+      handler(newVal, oldVal) {
+        if (newVal && newVal.length > 0) {
+          const finds = newVal.findIndex((item) => {
+            return item.businessName === "安管三类";
+          });
+          this.$emit("disableType", finds);
+        }else{
+          this.$emit("disableType", -1);
+        }
+      },
+      immediate: true,
+    },
   },
   created() {
     this.localData = this.$methodsTools.getBusinessList();

+ 19 - 11
src/components/questionBank.vue

@@ -25,9 +25,9 @@
           <span class="spans">题目类型:</span>
           <el-radio-group v-model="dingForm.type" @change="changeTypes">
             <el-radio
-              :disabled="statusPop === 2 || statusPop === 0"
               v-for="(item, index) in radioArrays"
               :key="index"
+              :disabled="computedDisabled(item)"
               :label="item.value"
               >{{ item.label }}</el-radio
             >
@@ -75,9 +75,7 @@
         </div> -->
         <div
           class="marg_play"
-          v-if="
-            dingForm.type === 1 || dingForm.type === 2
-          "
+          v-if="dingForm.type === 1 || dingForm.type === 2"
         >
           <span class="spans"
             ><span style="color: red" v-if="dingForm.type !== 5">* </span
@@ -199,7 +197,7 @@
                     v-for="(tng, nindex) in radioArray"
                     :key="nindex"
                     :label="tng.value"
-                    :disabled="statusPop === 2"
+                    :disabled="computedDisabled(tng)"
                     >{{ tng.label }}</el-radio
                   >
                 </el-radio-group>
@@ -245,10 +243,7 @@
                   </p>
                 </div>
               </div> -->
-              <div
-                class="marg_play"
-                v-if="ans.type === 1 || ans.type === 2"
-              >
+              <div class="marg_play" v-if="ans.type === 1 || ans.type === 2">
                 <span class="spans"
                   ><span style="color: red" v-if="ans.type !== 5">* </span
                   >选项:</span
@@ -487,7 +482,7 @@ import Editor from "@/components/Editor";
 export default {
   components: { Editor },
   name: "questionBank",
-  props: ["nums", "dingFormInfo"],
+  props: ["nums", "dingFormInfo", "disableTypeStatus"],
   data() {
     return {
       dingForm: {},
@@ -548,13 +543,26 @@ export default {
   watch: {
     dingFormInfo: {
       handler(newVal, oldVal) {
-        console.log(newVal)
+        console.log(newVal);
         this.dingForm = newVal;
       },
       // 立即处理 进入页面就触发
       immediate: true,
     },
   },
+  computed: {
+    computedDisabled: function () {
+      return function (item) {
+        if (this.statusPop === 2 || this.statusPop === 0) {
+          return true;
+        } else if (this.disableTypeStatus && item.value === 5) {
+          return true;
+        } else {
+          return false;
+        }
+      };
+    },
+  },
   methods: {
     changeTypes(int) {
       var data = {

+ 1 - 0
src/layout/components/Navbar.vue

@@ -678,6 +678,7 @@ export default {
   width: 400px !important;
   padding: 0px !important;
   & > .el-notification__group {
+  width: 100%;
     margin: 0px;
     & > .el-notification__title {
       text-align: center;

+ 6 - 6
src/views/2Cport/pageSettings/H5_small.vue

@@ -61,13 +61,13 @@
         </div>
       </el-form-item>
       <el-form-item label="H5域名" prop="hostH5">
-        <el-input v-model="moveInfo.hostH5"></el-input>
+        <el-input v-model="moveInfo.hostH5" disabled></el-input>
       </el-form-item>
       <el-form-item label="Live域名" prop="hostLive">
-        <el-input v-model="moveInfo.hostLive"></el-input>
+        <el-input v-model="moveInfo.hostLive" disabled></el-input>
       </el-form-item>
       <el-form-item label="Pc域名" prop="hostPc">
-        <el-input v-model="moveInfo.hostPc"></el-input>
+        <el-input v-model="moveInfo.hostPc" disabled></el-input>
       </el-form-item>
       <el-form-item>
         <el-button
@@ -103,11 +103,11 @@ export default {
             trigger: ["blur", "change"],
           },
         ],
-        hostH5: [{ required: true, message: "请输入hostH5", trigger: "blur" }],
+        hostH5: [{ required: false, message: "请输入hostH5", trigger: "blur" }],
         hostLive: [
-          { required: true, message: "请输入hostLive", trigger: "blur" },
+          { required: false, message: "请输入hostLive", trigger: "blur" },
         ],
-        hostPc: [{ required: true, message: "请输入hostPc", trigger: "blur" }],
+        hostPc: [{ required: false, message: "请输入hostPc", trigger: "blur" }],
       },
     };
   },

+ 31 - 17
src/views/Marketing/order/pendingRefundOrder/index.vue

@@ -56,7 +56,7 @@
         :key="index"
         :width="item.width"
         :label="item.label"
-        :align="index === 1 ? 'left' : 'center'"
+        :align="index === 0 ? 'left' : 'center'"
       >
         <template slot-scope="scope">
           <span v-if="item.scope === 'aTimeList'">{{
@@ -294,6 +294,10 @@ export default {
       prop: { hasChildren: "hasChildren", children: "children" },
     };
   },
+  created() {
+    this.formData.searchKey = this.$route.params.orderSn || "";
+    this.formData.periodStatus = this.$route.params.type === "1,2" ? "1,2" : 0;
+  },
   mounted() {
     this.search();
   },
@@ -441,8 +445,6 @@ export default {
       if (int === 4) {
         this.formData.pageNum = 1;
       }
-      this.allCheckData = [];
-      this.$refs.tableList.clearSelection();
       var data = JSON.parse(JSON.stringify(this.formData));
       data.inputOrderSn = this.$route.query.inputOrderSn;
       if (this.formData.searchStartTime) {
@@ -466,8 +468,20 @@ export default {
         })
         .finally(() => {
           this.loading = false;
+          this.$nextTick(() => {
+            this.allCheckData = [];
+            this.$refs.tableList.clearSelection();
+            this.expandAll();
+          });
         });
     },
+    expandAll() {
+      // 获取点击的箭头元素
+      let els = document.getElementsByClassName("el-table__expand-icon");
+      for (let i = 0; i < els.length; i++) {
+        els[i].click();
+      }
+    },
     init() {
       this.search(2);
     },
@@ -495,19 +509,19 @@ export default {
 </script>
 
 <style lang="less" scoped>
-::v-deep .el-table .backGround {
-  td {
-    background-color: rgb(252, 248, 229);
-  }
-}
-::v-deep .el-table .childrenGround {
-  td {
-    background-color: rgb(252, 238, 238);
-    &:nth-of-type(2) {
-      background: rgb(237, 246, 245);
-    }
-  }
-}
+// ::v-deep .el-table .backGround {
+//   td {
+//     background-color: rgb(252, 248, 229);
+//   }
+// }
+// ::v-deep .el-table .childrenGround {
+//   td {
+//     background-color: rgb(252, 238, 238);
+//     &:nth-of-type(2) {
+//       background: rgb(237, 246, 245);
+//     }
+//   }
+// }
 // el-table表格对齐
 ::v-deep .el-table__row:not([class*="el-table__row--level-"]) {
   td:nth-of-type(2) {
@@ -515,7 +529,7 @@ export default {
   }
 }
 ::v-deep .el-table__placeholder {
-  margin-left: 3px; //子节点无Child缩进
+  margin-left: 20px; //子节点无Child缩进
 }
 /deep/.el-button {
   border-radius: 8px;

+ 4 - 0
src/views/Marketing/order/pendingRefundOrder/refundDia.vue

@@ -72,6 +72,8 @@
               <span class="spanSty">审核意见:</span>
               <el-input
                 type="textarea"
+                maxlength="800"
+                show-word-limit
                 v-model="item.periodReason"
                 :size="size"
               ></el-input>
@@ -129,6 +131,8 @@
               <span class="spanSty">审核意见:</span>
               <el-input
                 type="textarea"
+                maxlength="800"
+                show-word-limit
                 v-model="item.periodReviewReason"
                 :size="size"
               ></el-input>

+ 77 - 25
src/views/education/notificationManageMent/stationLetter/index.vue

@@ -8,7 +8,12 @@
       <div>
         <el-button size="mini" type="primary" plain @click="haveRead"
           >标记为已读</el-button
-        ><el-button v-if="false" size="mini" type="primary" plain @click="notHaveRead"
+        ><el-button
+          v-if="false"
+          size="mini"
+          type="primary"
+          plain
+          @click="notHaveRead"
           >标记为未读</el-button
         ><span style="font-size: 14px; margin-left: 10px">状态:</span
         ><el-select
@@ -121,7 +126,19 @@
       <p>{{ newData.text }}</p>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogCG = false">关闭</el-button>
-        <el-button type="primary" @click="submitChecks">查看学员</el-button>
+        <el-button
+          type="primary"
+          @click="
+            submitChecks(
+              newData.type === 2 || newData.type === 3 ? 2 : 1
+            )
+          "
+          >{{
+            newData.type === 2 || newData.type === 3
+              ? "查看订单"
+              : "查看学员"
+          }}</el-button
+        >
       </span>
     </el-dialog>
   </div>
@@ -134,7 +151,7 @@ export default {
   components: { pagination },
   data() {
     return {
-      newData: {}, //当前数据
+      newData: { remind: "" }, //当前数据
       options: [
         {
           label: "全部",
@@ -245,32 +262,67 @@ export default {
     /**
      * 查看学员
      */
-    submitChecks() {
+    submitChecks(int) {
       this.dialogCG = false;
-      const jump = () => {
-        //学员详情
-        this.$router.push({
-          name: "StudentXQ",
-          query: {
-            id: this.newData.studentUserId,
-          },
-        });
-      };
-      const statusPage = this.$store.state.tagsView.visitedViews.some(
-        (item) => {
-          return item.name == "StudentXQ";
+      if (int === 2) {
+        const jump = () => {
+          //退款订单列表
+          this.$router.push({
+            name: "PendingRefundOrder",
+            params: {
+              orderSn: this.newData.orderSn,
+              type:
+                this.newData.type === 3
+                  ? "1,2"
+                  : this.newData.type === 2
+                  ? "0"
+                  : "",
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "PendingRefundOrder";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "PendingRefundOrder",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
         }
-      );
-      if (statusPage) {
-        this.$store
-          .dispatch("tagsView/delCachedView", {
+      }
+      if (int === 1) {
+        const jump = () => {
+          //学员详情
+          this.$router.push({
             name: "StudentXQ",
-          })
-          .then((res) => {
-            jump();
+            query: {
+              id: this.newData.studentUserId,
+            },
           });
-      } else {
-        jump();
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "StudentXQ";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "StudentXQ",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
       }
     },
     /**

+ 18 - 4
src/views/resource/bankManagement/testPaperManagement/PaperSort.vue

@@ -29,7 +29,7 @@
           controls-position="right"
           @blur="blur(form[item.key], 'orderNum')"
           :min="1"
-          :max="3"
+          :max="4"
           size="mini"
         ></el-input-number>
         <el-radio
@@ -59,7 +59,13 @@
           size="mini"
           @click="handelClick(item.key)"
           >更多</el-button
-        ><p style="color: red;padding-left:76px;" v-if="item.key === 'caseQuestion'">案例题是主观题,不算作分数,所以会随机切换</p>
+        >
+        <p
+          style="color: red; padding-left: 76px"
+          v-if="item.key === 'caseQuestion'"
+        >
+          案例题是主观题,不算作分数,所以会随机切换
+        </p>
       </li>
     </ul>
     <Base-dialog
@@ -123,6 +129,7 @@ export default {
       list: [
         { name: "单选题", key: "singleChoice" },
         { name: "多选题", key: "multipleChoice" },
+        { name: "判断题", key: "trueFalseQuestion" },
         { name: "案例题", key: "caseQuestion" },
       ],
       tableData: [{ name: 1 }],
@@ -198,13 +205,20 @@ export default {
           qnum: 0,
           randomNum: 1,
         },
-        caseQuestion: {
+        trueFalseQuestion: {
           knowledIds: [],
           knum: 0,
           orderNum: 3,
           qnum: 0,
           randomNum: 1,
         },
+        caseQuestion: {
+          knowledIds: [],
+          knum: 0,
+          orderNum: 4,
+          qnum: 0,
+          randomNum: 1,
+        },
         type: 1,
       };
     },
@@ -257,4 +271,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 19 - 2
src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue

@@ -145,7 +145,7 @@
                 v-else
               ></el-input> </el-form-item
           ></el-form>
-          <questionBank :dingFormInfo="listNums" :nums="1" ref="child" />
+          <questionBank :dingFormInfo="listNums" :nums="1" ref="child" :disableTypeStatus="disableTypeStatus"/>
         </div>
         <span slot="footer" class="dialog-footer">
           <el-button @click="closeBefore">关 闭</el-button>
@@ -969,6 +969,7 @@ export default {
       uploadStatus: false, //是否同步预览
       simulateConfigJson: "", //随机抽题目分组排序
       simulateStatus: 1,
+      disableTypeStatus: false, //安管禁用简答题
     };
   },
   computed: {
@@ -1110,7 +1111,8 @@ export default {
     },
     getInfos() {
       this.$api.obtainbankexam(this.$route.query.id).then((res) => {
-        console.log(res, "res");
+        this.disableTypeStatus =
+          res.data.businessName === "安管三类" ? true : false;
         this.businObj = {
           businessId: res.data.businessId,
           businessName: res.data.businessName,
@@ -1522,6 +1524,14 @@ export default {
           //   return;
           // }
           var data = this.$refs.child.getInfosPage();
+
+          if (self.disableTypeStatus && data.type == 5) {
+            //安管三类禁止简答题录入
+            self.$message.error(
+              "当前业务层次存在安管三类,禁止录入简答题,请手动修改"
+            );
+            return;
+          }
           if (!data.content || data.content == "<p><br></p>") {
             self.$message.error("请填写题目内容");
             return;
@@ -1551,6 +1561,13 @@ export default {
           }
           if (data.type == 4 && data.optionsList.length) {
             for (let i = 0; i < data.optionsList.length; i++) {
+              if (self.disableTypeStatus && data.optionsList[i].type == 5) {
+                //安管三类禁止简答题录入
+                self.$message.error(
+                  "当前业务层次存在安管三类,禁止录入简答题,请手动修改"
+                );
+                return;
+              }
               if (
                 !data.optionsList[i].content ||
                 data.optionsList[i].content == "<p><br></p>"

+ 24 - 1
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -149,7 +149,12 @@
                 v-else
               ></el-input> </el-form-item
           ></el-form>
-          <questionBank :dingFormInfo="listNums" :nums="1" ref="child" />
+          <questionBank
+            :dingFormInfo="listNums"
+            :nums="1"
+            ref="child"
+            :disableTypeStatus="disableTypeStatus"
+          />
         </div>
         <span slot="footer" class="dialog-footer">
           <el-button @click="closeBefore">关 闭</el-button>
@@ -981,6 +986,7 @@ export default {
       uploadStatus: false, //是否同步预览
       simulateConfigJson: "",
       simulateStatus: 1,
+      disableTypeStatus:false,//安管三类 禁用简答题
     };
   },
   computed: {
@@ -1123,6 +1129,8 @@ export default {
     },
     getInfos() {
       this.$api.obtainbankexam(this.$route.query.id).then((res) => {
+        this.disableTypeStatus =
+          res.data.businessName === "安管三类" ? true : false;
         this.businObj = {
           businessId: res.data.businessId,
           businessName: res.data.businessName,
@@ -1568,6 +1576,14 @@ export default {
           //   return;
           // }
           var data = this.$refs.child.getInfosPage();
+          
+          if (self.disableTypeStatus && data.type == 5) {
+            //安管三类禁止简答题录入
+            self.$message.error(
+              "当前业务层次存在安管三类,禁止录入简答题,请手动修改"
+            );
+            return;
+          }
           if (!data.content || data.content == "<p><br></p>") {
             self.$message.error("请填写题目内容");
             return;
@@ -1597,6 +1613,13 @@ export default {
           }
           if (data.type == 4 && data.optionsList.length) {
             for (let i = 0; i < data.optionsList.length; i++) {
+              if (self.disableTypeStatus && data.optionsList[i].type == 5) {
+                //安管三类禁止简答题录入
+                self.$message.error(
+                  "当前业务层次存在安管三类,禁止录入简答题,请手动修改"
+                );
+                return;
+              }
               if (
                 !data.optionsList[i].content ||
                 data.optionsList[i].content == "<p><br></p>"

+ 20 - 0
src/views/resource/bankManagement/topicManagement/index.vue

@@ -103,6 +103,7 @@
           :sujectApisTable="sujectApis"
           :newSujectApisTable="newSujectApis"
           :typeBus="typeBus"
+          @disableType="disableType"
         />
         <el-form
           label-position="right"
@@ -168,6 +169,7 @@
           :dingFormInfo="item"
           :nums="index"
           ref="child"
+          :disableTypeStatus="disableTypeStatus"
         />
       </div>
       <span slot="footer" class="dialog-footer">
@@ -452,6 +454,7 @@ export default {
           { required: true, message: "请选择发布状态", trigger: "change" },
         ],
       },
+      disableTypeStatus: false, //是否安管三类 如果是 禁用简答题目
     };
   },
   mounted() {
@@ -463,6 +466,9 @@ export default {
     this.search();
   },
   methods: {
+    disableType(e) {
+      this.disableTypeStatus = e !== -1 ? true : false;
+    },
     batchDel() {
       if (!this.$refs.tableList.allCheckData.length) {
         this.$message.warning("请勾选需要删除的题目");
@@ -815,6 +821,13 @@ export default {
             return;
           }
           var data = this.$refs.child[0].getInfosPage();
+          if (self.disableTypeStatus && data.type == 5) {
+            //安管三类禁止简答题录入
+            self.$message.error(
+              "当前业务层次存在安管三类,禁止录入简答题,请手动修改"
+            );
+            return;
+          }
           if (!data.content || data.content == "<p><br></p>") {
             self.$message.error("请填写题目内容");
             return;
@@ -844,6 +857,13 @@ export default {
           }
           if (data.type == 4 && data.optionsList.length) {
             for (let i = 0; i < data.optionsList.length; i++) {
+              if (self.disableTypeStatus && data.optionsList[i].type == 5) {
+                //安管三类禁止简答题录入
+                self.$message.error(
+                  "当前业务层次存在安管三类,禁止录入简答题,请手动修改"
+                );
+                return;
+              }
               if (
                 !data.optionsList[i].content ||
                 data.optionsList[i].content == "<p><br></p>"

+ 2 - 2
src/views/resource/baseManageInfos/resource/businessLevel/index.vue

@@ -219,7 +219,7 @@
         <el-radio-group v-model="learningOrder">
           <el-radio :label="0">不限制顺序</el-radio>
           <!-- <el-radio :label="1">限制顺序1</el-radio> -->
-          <el-radio :label="2">限制顺序2</el-radio>
+          <el-radio :label="2">限制顺序</el-radio>
         </el-radio-group>
         <p v-if="learningOrder === 1 || learningOrder === 2" style="color: red">
           {{
@@ -361,7 +361,7 @@ export default {
               value: 1,
             },
             {
-              label: "限制顺序2",
+              label: "限制顺序",
               value: 2,
             },
           ],