浏览代码

add:新需求

Tang 3 年之前
父节点
当前提交
078e0ff095

+ 194 - 0
src/components/quickLogin/index.vue

@@ -0,0 +1,194 @@
+<template>
+  <div id="quickLogin">
+    <el-dialog
+      @closed="loadingClose"
+      :visible.sync="dialogVisible"
+      width="500px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">快捷验证登录:</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogVisible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <el-form
+          label-position="right"
+          label-width="100px"
+          :model="formLabelAlign"
+          :rules="rules"
+          ref="formLabelAlign"
+        >
+          <el-form-item label="验证码:" prop="yzm">
+            <el-input v-model="formLabelAlign.yzm"
+              ><el-button
+                type="text"
+                slot="append"
+                @click="getCode"
+                :disabled="changeStatus"
+                >{{
+                  changeStatus ? `倒计时${time}秒` : "获取验证码"
+                }}</el-button
+              ></el-input
+            >
+          </el-form-item>
+          <el-form-item label="密码:" prop="password">
+            <el-input v-model="formLabelAlign.password"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('formLabelAlign')"
+          :loading="disabledBtn"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      loading: false,
+      size: "small",
+      dialogVisible: false,
+      disabledBtn: false,
+      list: [],
+      formLabelAlign: {},
+      time: 120,
+      setFunc: null,
+      changeStatus: false,
+      rules: {
+        yzm: [{ required: true, message: "请输入验证码", trigger: "blur" }],
+        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
+      },
+    };
+  },
+  methods: {
+    /**
+     * 获取验证码
+     */
+    getCode() {
+      this.changeStatus = true;
+      this.$api
+        .gradesendCode()
+        .then((res) => {
+          this.$message.success("验证码已发送");
+          this.setFunc = setInterval(() => {
+            this.time--;
+            if (this.time <= 0) {
+              clearInterval(this.setFunc);
+              this.time = 120;
+              this.changeStatus = false;
+            }
+          }, 1000);
+        })
+        .finally(() => {
+          this.changeStatus = false;
+        });
+    },
+    loadingClose() {
+      this.$refs.formLabelAlign.resetFields();
+      this.disabledBtn = false;
+      this.list = [];
+    },
+    /**
+     * status 从有接口数据标记进来 false 班级学员进来 true
+     */
+    openBoxs(arr, goodsId, status = true) {
+      if (status) {
+        this.$api.obtainGoods(goodsId).then((res) => {
+          if (res.data.categoryName) {
+            this.list = arr.map((item) => {
+              return {
+                id: item.id,
+                realname: item.realname,
+                idCard: item.idCard,
+                telphone: item.telPhone,
+                workTypeName: res.data.categoryName,
+              };
+            });
+            this.dialogVisible = true;
+          } else {
+            this.$message.error("请前往商品列表编辑设置该商品专业");
+            return;
+          }
+        });
+      } else {
+        const CHECKNAME = arr.every((item) => {
+          return item.categoryName != null;
+        });
+        if (!CHECKNAME) {
+          this.$message.error("勾选的商品必须设置专业");
+          return;
+        }
+        const GFSTATUS = arr.every((item) => {
+          return item.learnStatus !== 1;
+        });
+        if (!GFSTATUS) {
+          this.$message.error("勾选的数据不能包含账号标记已开通的数据");
+          return;
+        }
+        this.list = arr.map((item) => {
+          return {
+            id: item.id,
+            realname: item.realname,
+            idCard: item.idCard,
+            telphone: item.telPhone,
+            workTypeName: item.categoryName,
+          };
+        });
+        this.dialogVisible = true;
+      }
+    },
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.submitApi();
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    submitApi() {
+      this.disabledBtn = true;
+      let data = {
+        studyAccountStatusQueryBos: this.list,
+        trainYear: new Date().getFullYear(),
+      };
+      data = Object.assign(data, this.formLabelAlign);
+      this.$api
+        .gradeOpenQdyAccount(data)
+        .then((res) => {
+          this.$message.success("开通成功");
+          this.$emit("backData");
+          this.dialogVisible = false;
+        })
+        .finally(() => {
+          this.disabledBtn = false;
+        });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/ .el-input-group__append {
+  background-color: #fff;
+  width: 100px;
+  text-align: center;
+  color: #409eff;
+}
+</style>

+ 10 - 0
src/components/tableList.vue

@@ -982,6 +982,9 @@
                 : ""
             }}
           </span>
+          <div v-else-if="item.scope === 'openBox'" class="open_style" @click="openBoxData(scope.row)">
+            {{ scope.row[item.prop] }}
+          </div>
           <div v-else-if="item.scope === 'changeCLS'">
             <div
               v-if="!scope.row['interfacePushId'] && !scope.row['periodPlush']"
@@ -2239,6 +2242,9 @@ export default {
         }
       }
     },
+    openBoxData(row){
+      this.$emit("openBoxFun",row)
+    },
     diaviosTK(ids) {
       this.$api.inquireGoodsbanklist({ goodsId: ids }).then((res) => {
         res.data.forEach((item) => {
@@ -2608,6 +2614,10 @@ export default {
 };
 </script>
 <style lang="less">
+.open_style {
+  cursor: pointer;
+  color: blue;
+}
 .el-table .cell.el-tooltip {
   transition: all 0.3s;
 }

+ 16 - 0
src/newApi/classTab.js

@@ -240,4 +240,20 @@ export default {
             params: data
         })
     },
+    //批量官方信息推送
+    gradesendCode(data) {
+        return request({
+            url: '/grade/grade/sendCode',
+            method: 'post',
+            data
+        })
+    },
+    //数据批量同步到官方系统
+    gradeOpenQdyAccount(data) {
+        return request({
+            url: '/grade/grade/OpenQdyAccount',
+            method: 'post',
+            data
+        })
+    },
 }

+ 16 - 0
src/newApi/examapply.js

@@ -79,4 +79,20 @@ export default {
             method: 'get',
         })
     },
+    //批量新增前培绑定考试计划
+    addexamapply(data) {
+        return request({
+            url: '/exam/apply',
+            method: 'post',
+            data
+        })
+    },
+    //查询前培绑定考试计划列表
+    inquireexamapplyList(data) {
+        return request({
+            url: '/exam/apply/list',
+            method: 'get',
+            params: data
+        })
+    },
 }

+ 13 - 1
src/views/education/classManageMent/learningAccoutTags/noInterface.vue

@@ -68,7 +68,10 @@
         <el-button type="primary" @click="moreActive(1)">学完</el-button>
       </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="moreActive(4, props.scope.row)"
+        <el-button
+          type="text"
+          @click="moreActive(4, props.scope.row)"
+          :disabled="props.scope.row.learnStatus === 1"
           >账号标记</el-button
         >
         <el-button type="text" @click="moreActive(1, props.scope.row)"
@@ -337,6 +340,15 @@ export default {
         return;
       }
       if (int === 1 || int === 3 || int === 4) {
+        if (int === 4) {
+          const GFSTATUS = this.$refs.tableList.allCheckData.every((item) => {
+            return item.learnStatus !== 1;
+          });
+          if (!GFSTATUS) {
+            this.$message.error("勾选的数据不能包含账号标记已开通的数据");
+            return;
+          }
+        }
         if (obj) {
           this.$refs.accountTag.openBox(int, [obj], true);
         } else {

+ 35 - 4
src/views/education/classManageMent/learningAccoutTags/withInterface.vue

@@ -62,14 +62,19 @@
       row-key="id"
     >
       <template slot="customize">
-        <el-button type="danger">【数据同步到官方系统】开通账号</el-button>
+        <el-button type="danger" @click="moreActive(5)"
+          >【数据同步到官方系统】开通账号</el-button
+        >
         <el-button type="warning" @click="moreActive(4)"
           >账号状态标记</el-button
         >
         <el-button type="primary" @click="moreActive(1)">学完</el-button>
       </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="moreActive(4, props.scope.row)"
+        <el-button
+          type="text"
+          @click="moreActive(4, props.scope.row)"
+          :disabled="props.scope.row.learnStatus === 1"
           >账号标记</el-button
         >
         <el-button type="text" @click="moreActive(1, props.scope.row)"
@@ -134,6 +139,7 @@
       </span>
     </el-dialog>
     <account-tag ref="accountTag" @successFuncBack="successFuncBack" />
+    <quick-login ref="quickLogin" @backData="backData" />
   </div>
 </template>
 
@@ -142,9 +148,10 @@ import searchBoxNew from "@/components/searchBoxNew";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 import accountTag from "@/components/AccountTag";
+import quickLogin from "@/components/quickLogin";
 export default {
   name: "WithInterface",
-  components: { searchBoxNew, tableList, pagination, accountTag },
+  components: { searchBoxNew, tableList, pagination, accountTag, quickLogin },
   data() {
     return {
       loading: false, //当前表单加载是否加载动画
@@ -331,13 +338,37 @@ export default {
     topSearch(id, label) {
       this.formData[label] = id;
       this.search();
-    }, //1学完 3移除 4账号状态标记
+    },
+    /**
+     * 开通账号弹窗成功返回数据
+     */
+    backData() {
+      this.$refs.tableList.clearMoreActive();
+      this.search();
+    },
+    //1学完 3移除 4账号状态标记 5【数据同步到官方系统】开通账号
     moreActive(int, obj) {
       if (!this.$refs.tableList.allCheckData.length && !obj) {
         this.$message.warning("请勾选需要操作的学员");
         return;
       }
+      if (int === 5) {
+        this.$refs.quickLogin.openBoxs(
+          this.$refs.tableList.allCheckData,
+          null,
+          false
+        );
+      }
       if (int === 1 || int === 3 || int === 4) {
+        if (int === 4) {
+          const GFSTATUS = this.$refs.tableList.allCheckData.every((item) => {
+            return item.learnStatus !== 1;
+          });
+          if (!GFSTATUS) {
+            this.$message.error("勾选的数据不能包含账号标记已开通的数据");
+            return;
+          }
+        }
         if (obj) {
           this.$refs.accountTag.openBox(int, [obj], true);
         } else {

+ 27 - 2
src/views/education/classManageMent/studentMenu/index.vue

@@ -31,6 +31,7 @@
           type="primary"
           size="small"
           v-if="statusShow.indexOf(3) !== -1"
+          @click="moreActive(5)"
           >【数据同步到官方系统】开通账号</el-button
         >
         <el-button
@@ -547,6 +548,7 @@
       </span>
     </el-dialog>
     <account-tag ref="accountTag" @successFuncBack="successFuncBack" />
+    <quick-login ref="quickLogin" @backData="backData" />
   </div>
 </template>
 
@@ -554,8 +556,10 @@
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 import accountTag from "@/components/AccountTag";
+import quickLogin from "@/components/quickLogin";
+
 export default {
-  components: { tableList, pagination, accountTag },
+  components: { tableList, pagination, accountTag, quickLogin },
   data() {
     return {
       options: [
@@ -886,15 +890,36 @@ export default {
         this.$refs.tableList.clearMoreActive();
       });
     },
-    //1结业 2选班 3移除 4账号状态标记
+    /**
+     * 开通账号弹窗成功返回数据
+     */
+    backData() {
+      this.search(3);
+    },
+    //1结业 2选班 3移除 4账号状态标记 5【数据同步到官方系统】开通账号
     moreActive(int) {
       if (!this.$refs.tableList.allCheckData.length) {
         this.$message.warning("请勾选需要操作的学员");
         return;
       }
       if (int === 1 || int === 3 || int === 4) {
+        if (int === 4) {
+          const GFSTATUS = this.$refs.tableList.allCheckData.every((item) => {
+            return item.learnStatus !== 1;
+          });
+          if (!GFSTATUS) {
+            this.$message.error("勾选的数据不能包含账号标记已开通的数据");
+            return;
+          }
+        }
         this.$refs.accountTag.openBox(int, this.$refs.tableList.allCheckData);
       }
+      if (int === 5) {
+        this.$refs.quickLogin.openBoxs(
+          this.$refs.tableList.allCheckData,
+          this.$route.query.goodsId
+        );
+      }
       if (int === 2) {
         var newTime = Date.parse(new Date()) / 1000;
         var itemsq = JSON.parse(

+ 194 - 0
src/views/education/examManagement/qianpeiArrange/allAssociatedExamPlans.vue

@@ -0,0 +1,194 @@
+<template>
+  <div id="allAssociatedExamPlans">
+    <el-dialog
+      @closed="loadingClose"
+      :visible.sync="dialogVisible"
+      width="1200px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">所有关联的考试计划</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogVisible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <el-table
+          v-loading="loading"
+          border
+          :data="tableData"
+          style="width: 100%; margin-top: 16px"
+          ref="elTable"
+          max-height="680px"
+        >
+          <el-table-column
+            align="center"
+            v-for="(item, index) in tableSet"
+            :key="index"
+            :prop="item.prop"
+            :label="item.label"
+            :width="item.width"
+          >
+            <template slot-scope="scope">
+              <div v-if="item.scope === 'morePeople'">
+                <span
+                  v-for="(itm, idm) in scope.row[item.prop]
+                    .split(',')
+                    .map(Number)"
+                  :key="idm"
+                >
+                  {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
+                </span>
+              </div>
+              <el-button
+                type="text"
+                v-else-if="item.scope === 'btn'"
+                @click="del(scope.row)"
+                >删除</el-button
+              >
+              <span v-else-if="item.scope === 'TimeLists'"
+                >{{
+                  $methodsTools.onlyForma(scope.row[item.prop1], item.Diszing)
+                }}
+                至
+                {{
+                  $methodsTools.onlyForma(scope.row[item.prop2], item.Diszing)
+                }}</span
+              >
+              <span v-else>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm" :loading="disabledBtn"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      loading: false,
+      size: "small",
+      dialogVisible: false,
+      disabledBtn: false,
+      total: 0,
+      tableSet: [
+        {
+          label: "考试编码",
+          prop: "code",
+          width: "160px",
+        },
+        {
+          label: "考试标题",
+          prop: "applyName",
+        },
+        {
+          label: "可报学员",
+          prop: "applyStatus",
+          scope: "morePeople",
+          width: "170px",
+        },
+        {
+          label: "学员端报名开放时间",
+          prop1: "applyStartTime",
+          prop2: "applyEndTime",
+          scope: "TimeLists",
+          Diszing: false,
+          width: "240px",
+        },
+        {
+          label: "操作",
+          scope: "btn",
+          width: "120px",
+        },
+      ],
+      tableData: [],
+      formData: {},
+      beforeId: "",
+    };
+  },
+  methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
+    openBoxs(arr) {
+      this.beforeId = arr.beforeId;
+      this.search();
+      this.dialogVisible = true;
+    },
+    search(v) {
+      this.loading = true;
+      this.$api
+        .inquireexamapplyList({ beforeId: this.beforeId })
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    submitForm() {
+      this.disabledBtn = true;
+      let lists = this.tableData.map((item) => {
+        return item.applyId;
+      });
+      this.$api
+        .addexamapply({ beforeId: this.beforeId, applyIds: lists })
+        .then((res) => {
+          this.$message.success("修改成功");
+          this.$emit("backData");
+          this.dialogVisible = false;
+        })
+        .finally(() => {
+          this.disabledBtn = false;
+        });
+    },
+    del(row) {
+      this.tableData = this.tableData.filter((item) => {
+        return item.applyId !== row.applyId;
+      });
+      this.$message.success("删除成功");
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_box {
+  background-color: #eee;
+  padding: 10px 10px 0px;
+  display: flex;
+  margin-bottom: 16px;
+  .left_box {
+    flex: 1;
+  }
+  .clear_style {
+    flex-shrink: 0;
+    width: 80px;
+    vertical-align: top;
+    text-align: center;
+  }
+}
+.elform_style {
+  max-height: 620px;
+  overflow: auto;
+}
+.p_style {
+  font-size: 12px;
+  color: #a4a4a4;
+  margin: 0;
+}
+</style>

+ 269 - 0
src/views/education/examManagement/qianpeiArrange/assExamPlan.vue

@@ -0,0 +1,269 @@
+<template>
+  <div id="assExamPlan">
+    <el-dialog
+      @closed="loadingClose"
+      :visible.sync="dialogVisible"
+      width="1000px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">关联考试计划</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogVisible = false"
+          />
+        </div>
+      </div>
+      <div>
+        <div>
+          <el-input
+            v-model="formData.searchKey"
+            placeholder="请输入考试计划编码/考试计划标题"
+            style="width: 260px"
+          ></el-input
+          ><el-button
+            style="margin-left: 10px"
+            type="primary"
+            @click="search(1)"
+            >查询</el-button
+          ><el-button @click="init">重置</el-button>
+        </div>
+        <p style="color: red">注:打勾,即代表选中;可单选、多选。</p>
+        <el-table
+          v-loading="loading"
+          border
+          :data="tableData"
+          row-key="applyId"
+          @selection-change="selectionChange"
+          style="width: 100%; margin-top: 16px"
+          ref="elTable"
+          max-height="529px"
+          ><el-table-column
+            type="selection"
+            width="55"
+            align="center"
+            reserve-selection
+            :selectable="selectableFunc"
+          >
+          </el-table-column>
+          <el-table-column
+            align="center"
+            v-for="(item, index) in tableSet"
+            :key="index"
+            :prop="item.prop"
+            :label="item.label"
+            :width="item.width"
+          >
+            <template slot-scope="scope">
+              <div v-if="item.scope === 'morePeople'">
+                <span
+                  v-for="(itm, idm) in scope.row[item.prop]
+                    .split(',')
+                    .map(Number)"
+                  :key="idm"
+                >
+                  {{ itm === 1 ? "非补考学员" : itm === 2 ? "补考学员" : "" }}
+                </span>
+              </div>
+              <span v-else-if="item.scope === 'TimeLists'"
+                >{{
+                  $methodsTools.onlyForma(scope.row[item.prop1], item.Diszing)
+                }}
+                至
+                {{
+                  $methodsTools.onlyForma(scope.row[item.prop2], item.Diszing)
+                }}</span
+              >
+              <span v-else>{{ scope.row[item.prop] }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          :total="total"
+          :pageSize="formData.pageSize"
+          :currentPage="formData.pageNum"
+          @handleSizeChange="handleSizeChange"
+          @handleCurrentChange="handleCurrentChange"
+        />
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm"
+          :loading="disabledBtn"
+          :disabled="!selectArr.length"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      loading: false,
+      size: "small",
+      dialogVisible: false,
+      disabledBtn: false,
+      disActiveList: [], //禁止选择列表
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        status: "0,1,2",
+      },
+      total: 0,
+      tableSet: [
+        {
+          label: "考试编码",
+          prop: "code",
+        },
+        {
+          label: "考试标题",
+          prop: "applyName",
+        },
+        {
+          label: "可报学员",
+          prop: "applyStatus",
+          scope: "morePeople",
+        },
+        {
+          label: "学员端报名开放时间",
+          prop1: "applyStartTime",
+          prop2: "applyEndTime",
+          scope: "TimeLists",
+          Diszing: false,
+        },
+      ],
+      tableData: [],
+      selectArr: [],
+      beforeId: "",
+    };
+  },
+  methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
+    openBoxs(arr) {
+      this.beforeId = arr.beforeId;
+      this.search(2);
+      this.selectArr = [];
+      this.dialogVisible = true;
+      this.$nextTick(() => {
+        this.$api
+          .inquireexamapplyList({ beforeId: this.beforeId })
+          .then((res) => {
+            this.disActiveList = res.rows.map((item) => {
+              return item.applyId;
+            });
+          });
+        this.$refs.elTable.clearSelection();
+      });
+    },
+    search(v) {
+      this.loading = true;
+      if (v === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (v === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          status: "0,1,2",
+        };
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquiresystemapplyList(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    submitForm() {
+      this.disabledBtn = true;
+      let lists = this.selectArr.map((item) => {
+        return item.applyId;
+      });
+      this.$api
+        .addexamapply({
+          beforeId: this.beforeId,
+          applyIds: lists.concat(this.disActiveList),
+        })
+        .then((res) => {
+          this.$message.success("关联成功");
+          this.$emit("backData");
+          this.dialogVisible = false;
+        })
+        .finally(() => {
+          this.disabledBtn = false;
+        });
+    },
+    /**
+     * 判断当前行是否允许勾选
+     */
+    selectableFunc(row, index) {
+      if (this.disActiveList.indexOf(row.applyId) !== -1) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    /**
+     * 多选框变化触发
+     */
+    selectionChange(arr) {
+      this.selectArr = arr;
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.dis_box {
+  background-color: #eee;
+  padding: 10px 10px 0px;
+  display: flex;
+  margin-bottom: 16px;
+  .left_box {
+    flex: 1;
+  }
+  .clear_style {
+    flex-shrink: 0;
+    width: 80px;
+    vertical-align: top;
+    text-align: center;
+  }
+}
+.elform_style {
+  max-height: 620px;
+  overflow: auto;
+}
+.p_style {
+  font-size: 12px;
+  color: #a4a4a4;
+  margin: 0;
+}
+</style>

+ 40 - 2
src/views/education/examManagement/qianpeiArrange/index.vue

@@ -7,6 +7,7 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      @openBoxFun="openBoxFun"
     >
       <template slot="btn" slot-scope="props">
         <el-button
@@ -15,11 +16,17 @@
           :disabled="props.scope.row.status === 1"
           >修改计划</el-button
         >
-        <el-button
+        <!-- <el-button
           type="text"
           @click="editGoods(props.scope.row)"
           :disabled="props.scope.row.status === 1"
           >适用商品</el-button
+        > -->
+        <el-button
+          type="text"
+          @click="associatedExamPlan(props.scope.row)"
+          :disabled="props.scope.row.status === 1"
+          >关联考试计划</el-button
         >
         <el-button type="text" @click="watchs(props.scope.row)">预览</el-button>
         <el-button
@@ -318,6 +325,8 @@
         <el-button @click="dialoginfoWatch = false">取 消</el-button>
       </span>
     </el-dialog>
+    <ass-exam-plan ref="assExamPlan" @backData="backData" />
+    <all-associated-exam-plans ref="allAssociatedExamPlans" @backData="backData" />
   </div>
 </template>
 
@@ -326,9 +335,17 @@ import { mapGetters } from "vuex";
 import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
+import assExamPlan from "./assExamPlan.vue";
+import allAssociatedExamPlans from "./allAssociatedExamPlans.vue";
 export default {
   name: "QianpeiArrange",
-  components: { searchBox, tableList, pagination },
+  components: {
+    searchBox,
+    tableList,
+    pagination,
+    assExamPlan,
+    allAssociatedExamPlans,
+  },
   data() {
     return {
       disabledBtn: false,
@@ -392,6 +409,12 @@ export default {
             },
           ],
         },
+        {
+          label: "关联考试计划",
+          prop: "applyNum",
+          scope: "openBox",
+          hidden: true,
+        },
         {
           label: "符合条件的学员(人次)",
           prop: "people",
@@ -534,6 +557,21 @@ export default {
   },
   computed: { ...mapGetters(["educationType"]) },
   methods: {
+    /**
+     * 打开关联考试计划
+     */
+    associatedExamPlan(row) {
+      this.$refs.assExamPlan.openBoxs(row);
+    },
+    /**
+     * 返回数据
+     */
+    backData() {
+      this.search();
+    },
+    openBoxFun(row) {
+      this.$refs.allAssociatedExamPlans.openBoxs(row);
+    },
     loadingClose() {
       this.disabledBtn = false;
     },