|
@@ -0,0 +1,586 @@
|
|
|
+<template>
|
|
|
+ <div id="noInterface">
|
|
|
+ <div class="inputListBox">
|
|
|
+ <div class="fon_s">专业类型:</div>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ style="margin-bottom: 6px"
|
|
|
+ size="small"
|
|
|
+ v-for="(item, index) in Professional"
|
|
|
+ :type="formData.majorId === item.id ? 'primary' : ''"
|
|
|
+ :key="index"
|
|
|
+ @click="topSearch(item.id, 'majorId')"
|
|
|
+ >{{ item.categoryName }}</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="inputListBox">
|
|
|
+ <div class="fon_s">账号状态:</div>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ style="margin-bottom: 6px"
|
|
|
+ size="small"
|
|
|
+ v-for="(item, index) in accountList"
|
|
|
+ :type="formData.learnStatus === item.value ? 'primary' : ''"
|
|
|
+ :key="index"
|
|
|
+ @click="topSearch(item.value, 'learnStatus')"
|
|
|
+ >{{ item.label }}</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="inputListBox">
|
|
|
+ <div class="fon_s">学完状态:</div>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ style="margin-bottom: 6px"
|
|
|
+ size="small"
|
|
|
+ v-for="(item, index) in studyStatus"
|
|
|
+ :type="formData.finishStatus === item.value ? 'primary' : ''"
|
|
|
+ :key="index"
|
|
|
+ @click="topSearch(item.value, 'finishStatus')"
|
|
|
+ >{{ item.label }}</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <search-box-new
|
|
|
+ ref="searchBox"
|
|
|
+ :formData="formData"
|
|
|
+ :formList="formList"
|
|
|
+ @search="search"
|
|
|
+ @init="init"
|
|
|
+ :advanced="true"
|
|
|
+ @Advanced="advanced"
|
|
|
+ advancedName="高级输入"
|
|
|
+ />
|
|
|
+ <table-list
|
|
|
+ :tableSets="tableSet"
|
|
|
+ :tableData="tableData"
|
|
|
+ :navText="navText"
|
|
|
+ @addClick="addClick"
|
|
|
+ :loading="loading"
|
|
|
+ ref="tableList"
|
|
|
+ row-key="id"
|
|
|
+ >
|
|
|
+ <template slot="customize">
|
|
|
+ <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
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="moreActive(1, props.scope.row)"
|
|
|
+ >学完标记</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </table-list>
|
|
|
+ <pagination
|
|
|
+ :total="total"
|
|
|
+ :pageSize="formData.pageSize"
|
|
|
+ :currentPage="formData.pageNum"
|
|
|
+ @handleSizeChange="handleSizeChange"
|
|
|
+ @handleCurrentChange="handleCurrentChange"
|
|
|
+ />
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="dialogPLS"
|
|
|
+ width="660px"
|
|
|
+ :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="dialogPLS = false"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12"
|
|
|
+ ><h4>请输入学员的身份证号码,换行隔开,每行一个</h4>
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="10"
|
|
|
+ placeholder="请输入身份证"
|
|
|
+ v-model="idcordList"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <h4>快捷导入</h4>
|
|
|
+ <el-link type="primary" @click="getDowm">下载模板</el-link>
|
|
|
+ <label
|
|
|
+ for="mobles"
|
|
|
+ class="el-button el-button--primary"
|
|
|
+ style="margin-left: 14px; padding: 10px 20px"
|
|
|
+ >上传学员名单</label
|
|
|
+ ><input
|
|
|
+ style="display: none"
|
|
|
+ type="file"
|
|
|
+ id="mobles"
|
|
|
+ ref="input1"
|
|
|
+ @change="importMobleadd"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogPLS = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitChecksPals">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <account-tag ref="accountTag" @successFuncBack="successFuncBack" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import searchBoxNew from "@/components/searchBoxNew";
|
|
|
+import tableList from "@/components/tableList";
|
|
|
+import pagination from "@/components/pagination";
|
|
|
+import accountTag from "@/components/AccountTag";
|
|
|
+export default {
|
|
|
+ name: "NoInterface",
|
|
|
+ components: { searchBoxNew, tableList, pagination, accountTag },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading: false, //当前表单加载是否加载动画
|
|
|
+ navText: {
|
|
|
+ title: "无接口数据标记",
|
|
|
+ index: 0,
|
|
|
+ ch: "条",
|
|
|
+ num: false,
|
|
|
+ border: true,
|
|
|
+ choice: true,
|
|
|
+ addHide: true,
|
|
|
+ openCheckMore: true,
|
|
|
+ backFatherBtn: {
|
|
|
+ status: false,
|
|
|
+ title: "未定义",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ accountList: [
|
|
|
+ {
|
|
|
+ label: "全部",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "未开通",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已开通",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "标记失败",
|
|
|
+ value: 2,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ studyStatus: [
|
|
|
+ {
|
|
|
+ label: "全部",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "未学完",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已学完",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ dialogPLS: false,
|
|
|
+ //搜索
|
|
|
+ formList: [
|
|
|
+ {
|
|
|
+ prop: "realname",
|
|
|
+ placeholder: "请输入学员姓名",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "idCard",
|
|
|
+ placeholder: "请输入学员身份证",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "orderSn",
|
|
|
+ placeholder: "请输入订单编码",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "goodsName",
|
|
|
+ placeholder: "请输入商品名称",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop1: "validityStartTime",
|
|
|
+ prop2: "validityEndTime",
|
|
|
+ placeholder1: "查询开始时间",
|
|
|
+ placeholder2: "查询结束时间",
|
|
|
+ scope: "moreDataPicker",
|
|
|
+ Diszing: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "idCards",
|
|
|
+ placeholder: "请输入学员身份证",
|
|
|
+ scope: "textarea",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ formData: {
|
|
|
+ majorId: "",
|
|
|
+ learnStatus: "",
|
|
|
+ finishStatus: "",
|
|
|
+ idCards: "",
|
|
|
+ status: "0,1",
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ },
|
|
|
+ // 表单
|
|
|
+ tableSet: [
|
|
|
+ {
|
|
|
+ label: "订单编码",
|
|
|
+ prop: "orderSn",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "学员姓名",
|
|
|
+ prop: "realname",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "学员身份证",
|
|
|
+ prop: "idCard",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "绑定手机号码",
|
|
|
+ prop: "telPhone",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "专业名称",
|
|
|
+ prop: "categoryName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商品名称",
|
|
|
+ prop: "goodsName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "官方账号开通状态",
|
|
|
+ prop: "learnStatus",
|
|
|
+ scope: "learnStatus",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "学完状态",
|
|
|
+ prop: "finishStatus",
|
|
|
+ hidden: true,
|
|
|
+ scope: "isOptions",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: "未学完",
|
|
|
+ value: 0,
|
|
|
+ style: "color:red",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已学完",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ idcordList: "",
|
|
|
+ tableData: [], //表单数据
|
|
|
+ total: 0, //一共多少条
|
|
|
+ Professional: [],
|
|
|
+ titleObj: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$api.obtainbusiness(this.$route.query.businessId).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ this.navText.title = `有接口数据标记(${res.data.projectName} - ${res.data.businessName})`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$api
|
|
|
+ .inquireCourseMajor({
|
|
|
+ status: 1,
|
|
|
+ businessId: this.$route.query.businessId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.Professional = res.rows;
|
|
|
+ this.shiftPushData();
|
|
|
+ });
|
|
|
+
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * 组件成功回调
|
|
|
+ */
|
|
|
+ successFuncBack() {
|
|
|
+ this.search();
|
|
|
+ this.$refs.tableList.clearMoreActive();
|
|
|
+ },
|
|
|
+ topSearch(id, label) {
|
|
|
+ this.formData[label] = id;
|
|
|
+ this.search();
|
|
|
+ }, //1学完 3移除 4账号状态标记
|
|
|
+ moreActive(int, obj) {
|
|
|
+ if (!this.$refs.tableList.allCheckData.length && !obj) {
|
|
|
+ this.$message.warning("请勾选需要操作的学员");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (int === 1 || int === 3 || int === 4) {
|
|
|
+ if (obj) {
|
|
|
+ this.$refs.accountTag.openBox(int, [obj], true);
|
|
|
+ } else {
|
|
|
+ this.$refs.accountTag.openBox(int, this.$refs.tableList.allCheckData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ advanced(datas) {
|
|
|
+ this.dialogPLS = true;
|
|
|
+ this.idcordList = this.formData.idCards;
|
|
|
+ },
|
|
|
+ submitChecksPals() {
|
|
|
+ this.formData.idCards = this.idcordList;
|
|
|
+ this.dialogPLS = false;
|
|
|
+ },
|
|
|
+ search(int) {
|
|
|
+ this.loading = true;
|
|
|
+ if (int === 1) {
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ }
|
|
|
+ if (int === 2) {
|
|
|
+ this.formData = {
|
|
|
+ status: "0,1",
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ idCards: "",
|
|
|
+ canCancel: 1,
|
|
|
+ majorId: "",
|
|
|
+ learnStatus: "",
|
|
|
+ finishStatus: "",
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if (int === 3) {
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ }
|
|
|
+ var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
+ data.businessId = this.$route.query.businessId;
|
|
|
+ data.hasInterface = 2;
|
|
|
+ if (this.formData.idCards) {
|
|
|
+ data.idCards = this.formData.idCards.split("\n");
|
|
|
+ }
|
|
|
+ if (this.formData.validityStartTime) {
|
|
|
+ data.searchStartTime = data.validityStartTime / 1000;
|
|
|
+ }
|
|
|
+ if (this.formData.validityEndTime) {
|
|
|
+ data.searchEndTime = data.validityEndTime / 1000;
|
|
|
+ }
|
|
|
+ this.$api
|
|
|
+ .inquireGradegradelistGrade(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.navText.index = res.total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ init() {
|
|
|
+ this.search(2);
|
|
|
+ this.$refs.tableList.clearMoreActive();
|
|
|
+ },
|
|
|
+ addClick(v, int) {},
|
|
|
+ handleSizeChange(v) {
|
|
|
+ this.formData.pageSize = v;
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ handleCurrentChange(v) {
|
|
|
+ this.formData.pageNum = v;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 下载模板
|
|
|
+ */
|
|
|
+ getDowm() {
|
|
|
+ let url =
|
|
|
+ baseUrls.BASE_IMG_URL +
|
|
|
+ "/oss/images/file/20220214.xls" +
|
|
|
+ `?time=${this.$methodsTools.getNewTime()}`;
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let fileName = "导入模板" + ".xlsx";
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.href = url;
|
|
|
+ link.dowmload = fileName;
|
|
|
+ link.click();
|
|
|
+ link.remove();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 导入
|
|
|
+ */
|
|
|
+ importMobleadd(e) {
|
|
|
+ var self = this;
|
|
|
+ var file = e.target.files[0];
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append("file", file);
|
|
|
+ this.$api
|
|
|
+ .editsystemimportIdsData(formData)
|
|
|
+ .then((res) => {
|
|
|
+ if (!res.data.length) {
|
|
|
+ this.$message.warning("未检测到上传学员数据,请检查上传文件");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let idList = res.data.map((item) => {
|
|
|
+ return item.idCard.toString();
|
|
|
+ });
|
|
|
+ if (this.idcordList) {
|
|
|
+ var arr = this.idcordList.split("\n");
|
|
|
+ var arrs = arr.concat(idList);
|
|
|
+ var newArr = arrs.filter(function (value, index, self) {
|
|
|
+ return self.indexOf(value) === index;
|
|
|
+ });
|
|
|
+ this.idcordList = newArr.join("\n");
|
|
|
+ } else {
|
|
|
+ var newArr = idList.filter(function (value, index, self) {
|
|
|
+ return self.indexOf(value) === index;
|
|
|
+ });
|
|
|
+ this.idcordList = newArr.join("\n");
|
|
|
+ }
|
|
|
+ this.$message.success("上传成功");
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ e.target.value = "";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 加入"全部选项"
|
|
|
+ */
|
|
|
+ shiftPushData() {
|
|
|
+ const FINDID = this.Professional.findIndex((item) => {
|
|
|
+ return item.categoryName === "全部" && item.id === "";
|
|
|
+ });
|
|
|
+ if (FINDID === -1) {
|
|
|
+ this.Professional.unshift({
|
|
|
+ categoryName: "全部",
|
|
|
+ id: "",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.fon_s {
|
|
|
+ margin-top: 4px;
|
|
|
+ align-self: start;
|
|
|
+ flex-shrink: 0;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #6b6b6b;
|
|
|
+}
|
|
|
+.inputListBox {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 12px;
|
|
|
+}
|
|
|
+/deep/.el-button {
|
|
|
+ border-radius: 8px;
|
|
|
+}
|
|
|
+/deep/.el-dialog {
|
|
|
+ border-radius: 8px;
|
|
|
+ .el-dialog__header {
|
|
|
+ padding: 0;
|
|
|
+ .hearders {
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0px 18px 0px 20px;
|
|
|
+ border-bottom: 1px solid #e2e2e2;
|
|
|
+ .leftTitle {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #2f4378;
|
|
|
+ }
|
|
|
+ .rightBoxs {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ img {
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ margin-left: 13px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-dialog__footer {
|
|
|
+ padding: 0;
|
|
|
+ .dialog-footer {
|
|
|
+ padding: 0px 40px;
|
|
|
+ height: 70px;
|
|
|
+ border-top: 1px solid #e2e2e2;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.imgBox {
|
|
|
+ width: 100%;
|
|
|
+ // height: 210px;
|
|
|
+ border: 1px solid #e2e2e2;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 8px 8px 3px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ .imgLabel {
|
|
|
+ flex: 1;
|
|
|
+ width: 100%;
|
|
|
+ border: 1px dotted #e2e2e2;
|
|
|
+ color: #999;
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ border-radius: 8px;
|
|
|
+ .msPhoto {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 270px;
|
|
|
+ img {
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 270px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .imgbbx {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ i {
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 14px 0;
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ p {
|
|
|
+ margin: 5px 0px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|