Browse Source

fiex:新需求

Tang 3 years ago
parent
commit
60df8798fd

+ 73 - 7
src/components/searchBoxNew.vue

@@ -234,7 +234,21 @@
               :value="item.getType === 1 ? items.siteAddress : items.siteId"
             ></el-option>
           </el-select>
-          <!-- 前培标题 -->
+          <!-- 考试地点:手动过滤 -->
+          <el-select
+            v-else-if="item.scope === 'applySiteAddressX'"
+            v-model="formData[item.prop]"
+            :placeholder="item.placeholder"
+            :size="size"
+          >
+            <el-option
+              v-for="(items, indexs) in applySiteAddressX"
+              :key="indexs"
+              :label="items.siteAddress"
+              :value="item.getType === 1 ? items.siteAddress : items.siteId"
+            ></el-option>
+          </el-select>
+          <!-- 前培标题:只显示启用 -->
           <el-select
             v-else-if="item.scope === 'beforeList'"
             v-model="formData[item.prop]"
@@ -248,6 +262,20 @@
               :value="items.beforeId"
             ></el-option>
           </el-select>
+          <!-- 前培标题 -->
+          <el-select
+            v-else-if="item.scope === 'beforeLists'"
+            v-model="formData[item.prop]"
+            :placeholder="item.placeholder"
+            :size="size"
+          >
+            <el-option
+              v-for="(items, indexs) in beforeLists"
+              :key="indexs"
+              :label="items.beforeName"
+              :value="items.beforeId"
+            ></el-option>
+          </el-select>
           <!-- 自定义select -->
           <el-select
             :clearable="item.noClear === false ? false : true"
@@ -403,6 +431,7 @@
 
 <script>
 import { mapGetters } from "vuex";
+import handout from "../newApi/handout";
 export default {
   props: [
     "formList",
@@ -511,6 +540,7 @@ export default {
       newSchoolList: [], //院校-筛选后的数据
       newProfessional: [], //专业-筛选后的数据
       newSujectType: [], //科目-筛选后的数据
+      applySiteAddressX: [], //考试地点-根据考试计划过滤而来
       pickerOptions: {
         //日期选择器近期功能
         shortcuts: [
@@ -552,6 +582,7 @@ export default {
       "examList",
       "examLists",
       "beforeList",
+      "beforeLists",
       "applySiteAddress",
       "certificate",
     ]),
@@ -605,6 +636,10 @@ export default {
               if (this.formData["studyStatus"] == 2) {
                 return items;
               }
+            } else if (items.diff === "ksdd") {
+              if (this.formData["applyId"]) {
+                return items;
+              }
             } else {
               return items;
             }
@@ -614,7 +649,38 @@ export default {
       };
     },
   },
+  watch: {
+    /**
+     *
+     * @param {Number} val
+     * @remards 考试计划监听-获取对应考试地点
+     */
+    "formData.applyId"(val) {
+      const Astatus = this.formList.some((item) => {
+        return item.scope === "applySiteAddressX";
+      });
+      if (Astatus) {
+        this.getChangeAdress(val);
+        if (this.formData.applySiteAddress) {
+          this.formData.applySiteAddress = "";
+        }
+      }
+    },
+  },
   methods: {
+    /**
+     * 手动过滤考试地点
+     */
+    getChangeAdress(id) {
+      this.$api
+        .inquirepayservesiteInfo({
+          applyId: id,
+          addressStatus: 1,
+        })
+        .then((res) => {
+          this.applySiteAddressX = res.rows;
+        });
+    },
     /**
      * @remark 高级搜索
      */
@@ -757,14 +823,14 @@ export default {
      * @remark 点击业务层次触发事件
      */
     changeBusinessLevel(v) {
-      if(this.formData.subjectId){
-        this.formData.subjectId = ''
+      if (this.formData.subjectId) {
+        this.formData.subjectId = "";
       }
       this.$api
-          .inquireCourseSubject({ status: 1, businessId: v })
-          .then((res) => {
-            this.newSujectType = res.rows;
-          });
+        .inquireCourseSubject({ status: 1, businessId: v })
+        .then((res) => {
+          this.newSujectType = res.rows;
+        });
     },
     /**
      * 外部调用-商品新增编辑页

+ 8 - 0
src/store/getters.js

@@ -241,5 +241,13 @@ const getters = {
     }
     return state.dict.beforeList
   },
+  beforeLists(state) {
+    if (!state.dict.beforeLists) {
+      api.inquiresystembefore({ status: '0,1,2' }).then(res => {
+        state.dict.beforeLists = res.rows
+      })
+    }
+    return state.dict.beforeLists
+  },
 }
 export default getters

+ 5 - 1
src/store/modules/dict.js

@@ -27,7 +27,8 @@ const state = {
   examList: null,//考试安排过滤
   examLists: null,//考试安排
   applySiteAddress: null,//考试地点
-  beforeList: null,//前培安排
+  beforeList: null,//前培安排过滤
+  beforeLists: null,//前培安排
   indexnum: null,//模拟
 }
 const mutations = {
@@ -186,6 +187,9 @@ const mutations = {
     api.inquiresystembefore({ status: 1 }).then(res => {
       state.beforeList = res.rows
     })
+    api.inquiresystembefore({ status: '0,1,2' }).then(res => {
+      state.beforeLists = res.rows
+    })
   },
   //更新试卷类型
   EXAMTYPE(state) {

+ 39 - 23
src/views/education/classManageMent/classList/addClass/index.vue

@@ -19,27 +19,6 @@
               listData.classGradeGoodsAddBos.length ? "更换商品" : "添加商品"
             }}</el-button>
           </el-form-item>
-          <el-form-item label="班级号">
-            <el-button
-              style="margin-right: 14px"
-              size="mini"
-              v-if="listData.classStatus || listData.classStatus === 0"
-              @click="listData.classStatus = ''"
-              >清除选择</el-button
-            >
-            <el-radio-group
-              v-model="listData.classStatus"
-              @change="changeClassStatus"
-            >
-              <el-radio :label="0">未开班</el-radio>
-              <el-radio :label="1">已开班</el-radio>
-            </el-radio-group>
-            <el-input
-              placeholder="请填写继教二建官方班级"
-              v-if="listData.classStatus === 1"
-              v-model="listData.officialName"
-            ></el-input>
-          </el-form-item>
           <el-form-item label="班级名称" prop="className">
             <el-input
               v-model="listData.className"
@@ -92,7 +71,37 @@
               <el-radio :label="0">无效</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item label="班级有效期" prop="timeList">
+          <el-form-item label="班级号">
+            <el-button
+              style="margin-right: 14px"
+              size="mini"
+              v-if="listData.classStatus || listData.classStatus === 0"
+              @click="clearClassNumber"
+              >清除选择</el-button
+            >
+            <el-radio-group
+              v-model="listData.classStatus"
+              @change="changeClassStatus"
+            >
+              <el-radio :label="0">未开班</el-radio>
+              <el-radio :label="1">已开班</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item
+            label=""
+            prop="officialName"
+            v-if="listData.classStatus === 1"
+          >
+            <el-input
+              placeholder="请填写继教二建官方班级"
+              v-model="listData.officialName"
+            ></el-input>
+          </el-form-item>
+          <el-form-item
+            label="班级有效期"
+            prop="timeList"
+            v-if="listData.classStatus"
+          >
             <el-date-picker
               style="width: 90%"
               v-model="listData.timeList"
@@ -390,6 +399,9 @@ export default {
         className: [
           { required: true, message: "请填写班级名称", trigger: "blur" },
         ],
+        officialName: [
+          { required: true, message: "请填写官方班级", trigger: "blur" },
+        ],
         studentUpper: [
           { required: true, message: "请填写学员上限", trigger: "blur" },
           {
@@ -483,6 +495,10 @@ export default {
     this.getGFList();
   },
   methods: {
+    clearClassNumber() {
+      this.listData.classStatus = "";
+      this.changeClassStatus();
+    },
     changeDataTimeStudy(arr) {
       if (arr) {
         if (
@@ -561,7 +577,6 @@ export default {
     },
     //单选触发
     getTemplateRow(index, row) {
-      console.log(row);
       this.templateRadio = row.goodsId;
       this.goodsName = row.goodsName;
     },
@@ -624,6 +639,7 @@ export default {
     //改变班级号状态-清空输入框
     changeClassStatus() {
       this.listData.officialName = "";
+      this.listData.timeList = [];
     },
     //返回
     backPage() {

+ 0 - 1
src/views/education/classManageMent/classList/index.vue

@@ -275,7 +275,6 @@ export default {
         });
     },
     addClick(v, int) {
-      console.log(v);
       // int = 2详情 3学员管理
       if (v === undefined) {
         // 添加班级

+ 58 - 30
src/views/education/classManageMent/classList/manageClass/baseInfo.vue

@@ -13,10 +13,13 @@
             <el-form-item label="所属商品课程">
               <div class="flex_s">
                 <div>商品编码:{{ listData.goodsList[0].code }}</div>
-                <div style="display:flex;">
-                  <div>商品业务层级:</div><div style="flex:1">{{
-                    `${listData.goodsList[0].educationName}-${listData.goodsList[0].projectName}-${listData.goodsList[0].businessName}`
-                  }}</div>
+                <div style="display: flex">
+                  <div>商品业务层级:</div>
+                  <div style="flex: 1">
+                    {{
+                      `${listData.goodsList[0].educationName}-${listData.goodsList[0].projectName}-${listData.goodsList[0].businessName}`
+                    }}
+                  </div>
                 </div>
                 <div>学时:{{ listData.goodsList[0].classHours }}</div>
                 <div>年份:{{ listData.goodsList[0].year }}</div>
@@ -48,27 +51,6 @@
                 placeholder="请填写班级编码"
               ></el-input>
             </el-form-item>
-            <el-form-item label="班级号">
-              <el-button
-                style="margin-right: 14px"
-                size="mini"
-                v-if="listData.classStatus || listData.classStatus === 0"
-                @click="listData.classStatus = ''"
-                >清除选择</el-button
-              >
-              <el-radio-group
-                v-model="listData.classStatus"
-                @change="changeClassStatus"
-              >
-                <el-radio :label="0">未开班</el-radio>
-                <el-radio :label="1">已开班</el-radio>
-              </el-radio-group>
-              <el-input
-                placeholder="请填写继教二建官方班级"
-                v-if="listData.classStatus === 1"
-                v-model="listData.officialName"
-              ></el-input>
-            </el-form-item>
             <el-form-item label="班级名称" prop="className">
               <el-input
                 v-model="listData.className"
@@ -131,7 +113,38 @@
                 <el-radio :label="0">无效</el-radio>
               </el-radio-group>
             </el-form-item>
-            <el-form-item label="班级有效期">
+            <el-form-item label="班级号">
+              <el-button
+                style="margin-right: 14px"
+                size="mini"
+                v-if="
+                  (listData.classStatus || listData.classStatus === 0) &&
+                  !classStatusDis
+                "
+                @click="clearClassNumber"
+                >清除选择</el-button
+              >
+              <el-radio-group
+                v-model="listData.classStatus"
+                @change="changeClassStatus"
+                :disabled="classStatusDis"
+              >
+                <el-radio :label="0">未开班</el-radio>
+                <el-radio :label="1">已开班</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item
+              label=""
+              prop="officialName"
+              v-if="listData.classStatus === 1"
+            >
+              <el-input
+                :disabled="classStatusDis"
+                placeholder="请填写继教二建官方班级"
+                v-model="listData.officialName"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="班级有效期" v-if="listData.classStatus === 1">
               <el-date-picker
                 v-model="listData.classStartTime"
                 type="datetime"
@@ -319,6 +332,9 @@ export default {
         className: [
           { required: true, message: "请填写班级名称", trigger: "blur" },
         ],
+        officialName: [
+          { required: true, message: "请填写官方班级", trigger: "blur" },
+        ],
         studentUpper: [
           { required: true, message: "请填写学员上限", trigger: "blur" },
           {
@@ -354,6 +370,7 @@ export default {
         ],
       },
       cityList: [],
+      classStatusDis: false,
       newCityList: [],
       //	1官方推送 2官方学习账号开通 3官方学时推送
       type1List: [],
@@ -373,6 +390,10 @@ export default {
     this.search();
   },
   methods: {
+    clearClassNumber() {
+      this.listData.classStatus = "";
+      this.changeClassStatus();
+    },
     changeTimeList1(arr) {
       if (!arr) {
         return;
@@ -408,6 +429,9 @@ export default {
       this.$api
         .obtainGradegrade(this.$route.query.id)
         .then((res) => {
+          if (res.data.classStatus === 1) {
+            this.classStatusDis = true;
+          }
           if (res.data.areasId) {
             this.newCityList = this.cityList.filter((item) => {
               return item.parentId == res.data.areasId;
@@ -452,7 +476,6 @@ export default {
             ];
           }
           this.minNums = res.data.studentNum;
-          console.log(res.data);
           this.listData = res.data;
         })
         .finally(() => {
@@ -467,9 +490,11 @@ export default {
         }
         this.statusShow = res.data;
       });
-      this.$api.obtainUserList({ status: 1, roleName: "班主任" }).then((res) => {
-        this.teacherList = res.rows;
-      });
+      this.$api
+        .obtainUserList({ status: 1, roleName: "班主任" })
+        .then((res) => {
+          this.teacherList = res.rows;
+        });
     },
     //获取官方接口
     getGFList() {
@@ -507,6 +532,8 @@ export default {
     //改变班级号状态-清空输入框
     changeClassStatus() {
       this.listData.officialName = "";
+      this.listData.classStartTime = "";
+      this.listData.classEndTime = "";
     },
     //返回
     backPage() {
@@ -548,6 +575,7 @@ export default {
       delete data.goodsList;
       this.$api.editGradegrade(data).then((res) => {
         this.$message.success("修改成功");
+        this.search()
       });
     },
   },

+ 18 - 5
src/views/education/examManagement/applicationData/bulkImportPlan/newRegister.vue

@@ -8,9 +8,10 @@
         filterable
         v-model="formData.applyId"
         placeholder="请选择考试计划(必填)"
+        @change="getSXAddress"
       >
         <el-option
-          v-for="item in examList"
+          v-for="item in examLists"
           :key="item.applyId"
           :label="item.applyName"
           :value="item.applyId"
@@ -18,6 +19,7 @@
         </el-option>
       </el-select>
       <el-select
+        v-if="formData.applyId"
         :style="marSty"
         :size="size"
         filterable
@@ -231,6 +233,7 @@ export default {
         applySiteAddress: "",
         idCards: "",
       },
+      applySiteAddress: [],
       idcordList: "",
       tableDataSuccess: [],
       tableDataError: [],
@@ -302,7 +305,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["examList", "applySiteAddress"]),
+    ...mapGetters(["examLists"]),
     computedForm: function () {
       return function (tabs, int) {
         if (int === 1) {
@@ -317,6 +320,14 @@ export default {
     },
   },
   methods: {
+    getSXAddress(int) {
+      this.formData.applySiteAddress = "";
+      this.$api
+        .inquirepayservesiteInfo({ applyId: int, addressStatus: 1 })
+        .then((res) => {
+          this.applySiteAddress = res.rows;
+        });
+    },
     /**
      * 转换时间格式
      */
@@ -378,9 +389,11 @@ export default {
             this.dialogPLS = false;
           });
         } else {
-          this.idcordList = ''
-          this.$message.warning("已删除重复身份证号码和无效身份证号码,请重新输入有效身份证号码")
-          return
+          this.idcordList = "";
+          this.$message.warning(
+            "已删除重复身份证号码和无效身份证号码,请重新输入有效身份证号码"
+          );
+          return;
         }
       } else {
         this.formData.idCards = this.idcordList;

+ 22 - 3
src/views/education/examManagement/applicationData/bulkImportPlan/newYY.vue

@@ -8,9 +8,10 @@
         filterable
         v-model="formData.applyId"
         placeholder="请选择考试计划(必填)"
+        @change="getSXAddress"
       >
         <el-option
-          v-for="item in examList"
+          v-for="item in examLists"
           :key="item.applyId"
           :label="item.applyName"
           :value="item.applyId"
@@ -18,6 +19,7 @@
         </el-option>
       </el-select>
       <el-select
+        v-if="formData.applyId"
         :style="marSty"
         :size="size"
         filterable
@@ -41,6 +43,7 @@
         >下载模板(不含考培)</el-button
       >
       <el-select
+        v-if="formData.applyId"
         :style="marSty"
         :size="size"
         clearable
@@ -49,7 +52,7 @@
         placeholder="请选择考培地点(必填)"
       >
         <el-option
-          v-for="item in applySiteAddress"
+          v-for="item in applySiteAddressTrain"
           :key="item.siteId"
           :label="item.siteAddress"
           :value="item.siteAddress"
@@ -210,6 +213,8 @@ export default {
         applySiteAddress: "",
         applySiteAddressTrain: "",
       },
+      applySiteAddress: [],
+      applySiteAddressTrain: [],
       tableDataSuccess: [],
       tableDataError: [],
       tableSet: [
@@ -262,7 +267,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["examList", "applySiteAddress"]),
+    ...mapGetters(["examLists"]),
     computedForm: function () {
       return function (tabs, int) {
         if (int === 1) {
@@ -290,6 +295,20 @@ export default {
     },
   },
   methods: {
+    getSXAddress(int) {
+      this.formData.applySiteAddress = "";
+      this.formData.applySiteAddressTrain = "";
+      this.$api
+        .inquirepayservesiteInfo({ applyId: int, addressStatus: 1 })
+        .then((res) => {
+          this.applySiteAddress = res.rows;
+        });
+      this.$api
+        .inquirepayservesiteInfo({ applyId: int, addressStatus: 2 })
+        .then((res) => {
+          this.applySiteAddressTrain = res.rows;
+        });
+    },
     /**
      * 转换时间格式
      */

+ 8 - 7
src/views/education/examManagement/applicationData/cancelAppointMent/index.vue

@@ -154,13 +154,14 @@ export default {
         {
           prop: "applyId",
           placeholder: "考试标题",
-          scope: "examList",
+          scope: "examLists",
         },
         {
           prop: "applySiteAddress",
           placeholder: "考试地点",
-          scope: "applySiteAddress",
+          scope: "applySiteAddressX",
           getType: 1,
+          diff: "ksdd",
         },
         {
           prop: "searchKey",
@@ -403,7 +404,7 @@ export default {
     getFirstOptions() {
       return new Promise((resolve, reject) => {
         this.$api
-          .inquiresystemapplyList({ status: 1, pageSize: 1, pageNum: 1 })
+          .inquiresystemapplyList({ status: "0,1,2", pageSize: 1, pageNum: 1 })
           .then((res) => {
             if (res.rows.length) {
               this.copyAppid = res.rows[0].applyId;
@@ -466,10 +467,10 @@ export default {
       if (this.formData.idCards) {
         data.idCards = this.formData.idCards.split("\n");
       }
-      if(this.formData.searchKey && this.formData.idCards){
-        data.searchType = 1
-      }else{
-        data.searchType = 0
+      if (this.formData.searchKey && this.formData.idCards) {
+        data.searchType = 1;
+      } else {
+        data.searchType = 0;
       }
       this.$api
         .inquiresystemsubscribelist(data)

+ 8 - 7
src/views/education/examManagement/applicationData/examRegistration/index.vue

@@ -198,13 +198,14 @@ export default {
         {
           prop: "applyId",
           placeholder: "考试标题",
-          scope: "examList",
+          scope: "examLists",
         },
         {
           prop: "applySiteAddress",
           placeholder: "考试地点",
-          scope: "applySiteAddress",
+          scope: "applySiteAddressX",
           getType: 1,
+          diff: "ksdd",
         },
         {
           prop: "searchKey",
@@ -513,7 +514,7 @@ export default {
     getFirstOptions() {
       return new Promise((resolve, reject) => {
         this.$api
-          .inquiresystemapplyList({ status: 1, pageSize: 1, pageNum: 1 })
+          .inquiresystemapplyList({ status: "0,1,2", pageSize: 1, pageNum: 1 })
           .then((res) => {
             if (res.rows.length) {
               this.copyAppid = res.rows[0].applyId;
@@ -549,10 +550,10 @@ export default {
       if (this.formData.idCards) {
         data.idCards = this.formData.idCards.split("\n");
       }
-      if(this.formData.searchKey && this.formData.idCards){
-        data.searchType = 1
-      }else{
-        data.searchType = 0
+      if (this.formData.searchKey && this.formData.idCards) {
+        data.searchType = 1;
+      } else {
+        data.searchType = 0;
       }
       this.$api
         .inquiresystemsubscribelist(data)

+ 9 - 9
src/views/education/examManagement/applicationData/formerAccount/index.vue

@@ -159,12 +159,12 @@ export default {
         {
           prop: "beforeId",
           placeholder: "前培计划",
-          scope: "beforeList",
+          scope: "beforeLists",
         },
         {
           prop: "applyId",
           placeholder: "考试计划",
-          scope: "examList",
+          scope: "examLists",
         },
         {
           prop: "beforeStatus",
@@ -193,7 +193,7 @@ export default {
       ],
       formData: {
         beforeId: "",
-        applyId:"",
+        applyId: "",
         pageSize: 10,
         pageNum: 1,
         idCards: "",
@@ -424,7 +424,7 @@ export default {
     getFirstOptions() {
       return new Promise((resolve, reject) => {
         this.$api
-          .inquiresystembefore({ status: 1, pageSize: 1, pageNum: 1 })
+          .inquiresystembefore({ status: "0,1,2", pageSize: 1, pageNum: 1 })
           .then((res) => {
             if (res.rows.length) {
               this.copyAppid = res.rows[0].beforeId;
@@ -493,7 +493,7 @@ export default {
           idCards: "",
           canBefore: 1,
           beforeId: this.copyAppid,
-          applyId:"",
+          applyId: "",
           beforeStatus: "",
         };
       }
@@ -501,10 +501,10 @@ export default {
       if (this.formData.idCards) {
         data.idCards = this.formData.idCards.split("\n");
       }
-      if(this.formData.searchKey && this.formData.idCards){
-        data.searchType = 1
-      }else{
-        data.searchType = 0
+      if (this.formData.searchKey && this.formData.idCards) {
+        data.searchType = 1;
+      } else {
+        data.searchType = 0;
       }
       this.$api
         .inquiresystemsubscribelist(data)

+ 14 - 10
src/views/education/notificationManageMent/notificationList/info/notificationDetailsList.vue

@@ -44,7 +44,7 @@
       v-if="
         listData.informCourseAddBo.length || listData.informExamAddBo.length
       "
-      style="padding: 5px 20px; background-color: #eee;margin-left:160px;"
+      style="padding: 5px 20px; background-color: #eee; margin-left: 160px"
     >
       <div
         class="dis_flex"
@@ -59,13 +59,17 @@
           {{ item.sectionName ? item.sectionName : "" }}
         </div>
         <div class="dis_flex">
-          <div style="margin-right: 15px">
+          <div style="margin-left: 15px">
             <i class="el-icon-video-play"></i
-            ><span>第{{ item.topicNum }}分钟</span>
+            ><span
+              >{{
+                $methodsTools.secondToDate(item.topicNum, false)
+              }}</span
+            >
           </div>
-          <div>
+          <!-- <div>
             <el-button type="text">预览</el-button>
-          </div>
+          </div> -->
         </div>
       </div>
       <div
@@ -90,7 +94,7 @@
         </div>
       </div>
     </div>
-    <div style="text-align: center;margin-top:20px;">
+    <div style="text-align: center; margin-top: 20px">
       <el-button @click="backPage">返回</el-button>
     </div>
     <bankInfo ref="bankInfo" />
@@ -98,9 +102,9 @@
 </template>
 
 <script>
-import bankInfo from "@/components/bankInfo"
+import bankInfo from "@/components/bankInfo";
 export default {
-  components:{bankInfo},
+  components: { bankInfo },
   data() {
     return {
       options: [],
@@ -127,8 +131,8 @@ export default {
     });
   },
   methods: {
-    seeBank(item){
-      this.$refs.bankInfo.$emit("childmethod",item)
+    seeBank(item) {
+      this.$refs.bankInfo.$emit("childmethod", item);
     },
     getGoodsName(v) {
       var str = "";