Selaa lähdekoodia

fix:商品专题页

Tang 3 vuotta sitten
vanhempi
commit
299ef8a1a4

+ 2 - 2
.env.staging

@@ -8,9 +8,9 @@ ENV = 'staging'
 
 
 # 中正云教育管理后台/预发布环境
 # 中正云教育管理后台/预发布环境
 # 测试
 # 测试
-VUE_APP_BASE_API = 'http://120.79.166.78:19013/'
+VUE_APP_BASE_API1 = 'http://120.79.166.78:19013/'
 # 预发布
 # 预发布
-VUE_APP_BASE_API1 = 'http://120.79.166.78:19007/'
+VUE_APP_BASE_API = 'http://120.79.166.78:19007/'
 #图片
 #图片
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 
 

+ 8 - 0
src/newApi/goods.js

@@ -127,4 +127,12 @@ export default {
             params: data
             params: data
         })
         })
     },
     },
+    //商品专题页查询
+    inquirecoursetopiclist(data) {
+        return request({
+            url: '/course/topic/list',
+            method: 'get',
+            params: data
+        })
+    },
 }
 }

+ 1 - 1
src/utils/request.js

@@ -8,7 +8,7 @@ import methods from '@/utils/methodsTool';
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 // 创建axios实例
 export const baseURL = process.env.VUE_APP_BASE_API
 export const baseURL = process.env.VUE_APP_BASE_API
-// export const baseURL = 'http://192.168.1.24:5030/'
+// export const baseURL = 'http://192.168.1.7:5030/'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 const service = axios.create({
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 277 - 0
src/views/Marketing/goods/goodTopic/index.vue

@@ -0,0 +1,277 @@
+<template>
+  <div id="goodTopic">
+    <!-- <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+      :topType="topType"
+    /> -->
+    <table-list
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+    >
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="share(props.scope.row)">分享</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "GoodTopic",
+  components: { searchBoxNew, tableList, pagination },
+  data() {
+    return {
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "商品专题页",
+        index: 0,
+        ch: "条",
+        num: false,
+        border: true,
+        choice: true,
+        addHide: true,
+        changeWidth: "180px",
+        backFatherBtn: {
+          status: false,
+          title: "未定义",
+        },
+      },
+      topType: true,
+      //搜索
+      formList: [],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "教育类型",
+          prop: "educationName",
+          hidden: true,
+        },
+        {
+          label: "业务层次",
+          prop1: "projectName",
+          prop2: "businessName",
+          hidden: true,
+          scope: "InfoMore",
+        },
+        {
+          label: "业务层次别名",
+          prop: "aliasName",
+          hidden: true,
+        },
+        {
+          label: "专题页状态",
+          prop: "status",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "启用",
+              value: 1,
+            },
+            {
+              label: "关闭",
+              value: 0,
+            },
+          ],
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  activated() {
+    this.search();
+  },
+  methods: {
+    share(v) {
+      console.log(v);
+    },
+    search(int) {
+      this.loading = true;
+      if (int === 1) {
+        this.formData.pageNum = 1;
+      }
+      if (int === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+        };
+      }
+      if (int === 3) {
+        this.formData.pageNum = 1;
+      }
+      var data = JSON.parse(JSON.stringify(this.formData));
+      this.$api
+        .inquirecoursetopiclist(data)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    del(v) {
+      this.$api.gradecheckGoodsChange({ goodsId: v.goodsId }).then((res) => {
+        if (res.data > 0) {
+          this.$message.error("已有学员正在学习该商品,无法删除");
+          return;
+        } else {
+          this.$alert(
+            "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
+            "提示",
+            {
+              dangerouslyUseHTMLString: true,
+            }
+          )
+            .then(() => {
+              var data = {
+                goodsId: v.goodsId,
+                status: -1,
+              };
+              this.$api.editGoods(data).then((res) => {
+                this.$message.success("删除成功");
+                this.search();
+              });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消删除",
+              });
+            });
+        }
+      });
+    },
+    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>
+/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>
+

+ 24 - 12
src/views/education/examManagement/examArrangement/applicableProducts/downMaterial.vue

@@ -69,7 +69,10 @@
         <p>
         <p>
           学员信息表 <el-button type="text" @click="userDowm">下载</el-button>
           学员信息表 <el-button type="text" @click="userDowm">下载</el-button>
         </p>
         </p>
-        <p>疫情防控承诺书 <el-button type="text" @click="yqbookDown">下载</el-button></p>
+        <p>
+          疫情防控承诺书
+          <el-button type="text" @click="yqbookDown">下载</el-button>
+        </p>
         <p>
         <p>
           学员签到表 <el-button type="text" @click="userSign">下载</el-button>
           学员签到表 <el-button type="text" @click="userSign">下载</el-button>
         </p>
         </p>
@@ -183,19 +186,28 @@ export default {
     userSign() {
     userSign() {
       var data = JSON.parse(JSON.stringify(this.listData));
       var data = JSON.parse(JSON.stringify(this.listData));
       delete data.index;
       delete data.index;
-      this.$api.inquiresystemsubscribelistSignExport(data).then((res) => {
-        let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
-        let link = document.createElement("a");
-        let fileName = "导入模板" + ".xlsx";
-        document.body.appendChild(link);
-        link.href = url;
-        link.dowmload = fileName;
-        link.click();
-        link.remove();
-      });
+      this.$api
+        .inquiresystemsubscribelistSignExport(data)
+        .then(async (res) => {
+          for (let k in res.data) {
+            if (res.data[k].code === 200) {
+              await this.dowmFunc(res, k);
+            } else {
+              this.$message.error("code值错误:", res.data[k].code);
+            }
+          }
+        })
+        .catch((err) => {
+          let { message } = err;
+          if (message.includes("timeout")) {
+            this.$message.error(
+              "数据体量过大,无法正常导出,请调整导出的日期范围,缩小数据体量"
+            );
+          }
+        });
     },
     },
     //疫情防控承诺书
     //疫情防控承诺书
-    yqbookDown(){
+    yqbookDown() {
       var data = JSON.parse(JSON.stringify(this.listData));
       var data = JSON.parse(JSON.stringify(this.listData));
       delete data.index;
       delete data.index;
       this.$api
       this.$api

+ 2 - 2
src/views/education/studentManageMent/studentXQ/studentBaseManage.vue

@@ -303,8 +303,8 @@ export default {
         }
         }
         return;
         return;
       }
       }
-      if (file.size > 0.3 * 1024 * 1024) {
-        self.$message.error("图片不得大于300kb");
+      if (file.size > 2 * 1024 * 1024) {
+        self.$message.error("图片不得大于2MB");
         return;
         return;
       }
       }
       if (int === 1) {
       if (int === 1) {