YY il y a 2 ans
Parent
commit
855d592e93

+ 11 - 7
src/views/platActivi/act/index.vue

@@ -1,7 +1,13 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight">
+      <el-col
+        :span="24"
+        class="main animate__animated animate__backInRight"
+        v-loading="loadings"
+        element-loading-text="拼命加载中"
+        element-loading-spinner="el-icon-loading"
+      >
         <span v-show="view === 'list'">
           <el-col :span="24" class="one"> <span>活动标题</span> </el-col>
           <el-col :span="24" class="two">
@@ -37,6 +43,7 @@ export default {
   data: function () {
     const that = this;
     return {
+      loadings: true,
       view: 'list',
       // 列表
       opera: [
@@ -102,6 +109,7 @@ export default {
         this.$set(this, 'list', res.data);
         this.$set(this, 'total', res.total);
       }
+      this.loadings = false;
     },
     // 新增
     toAdd() {
@@ -139,14 +147,10 @@ export default {
       let res;
       // 是否使用
       res = await this.dictQuery({ code: 'use' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `isuseList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `isuseList`, res.data);
       // 活动类型
       res = await this.dictQuery({ code: 'act_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `act_typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `act_typeList`, res.data);
     },
   },
   computed: {

+ 11 - 7
src/views/platActivi/act/parts/detail.vue

@@ -1,7 +1,13 @@
 <template>
   <div id="form-1">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight">
+      <el-col
+        :span="24"
+        class="main animate__animated animate__backInRight"
+        v-loading="loadings"
+        element-loading-text="拼命加载中"
+        element-loading-spinner="el-icon-loading"
+      >
         <el-col>
           <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
         </el-col>
@@ -49,6 +55,7 @@ export default {
   },
   data: function () {
     return {
+      loadings: true,
       url: '/files/point/platformAct/upload',
       form: {},
       rules: {},
@@ -107,6 +114,7 @@ export default {
         this.$set(this.act_time, `is_use`, '0');
         this.$set(this.content, `is_use`, '0');
       }
+      this.loadings = false;
     },
     async onSubmit(formName) {
       let form = this.form;
@@ -135,14 +143,10 @@ export default {
       let res;
       // 是否使用
       res = await this.dictQuery({ code: 'use' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `isuseList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `isuseList`, res.data);
       // 活动类型
       res = await this.dictQuery({ code: 'act_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `act_typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `act_typeList`, res.data);
     },
     // 返回
     toBack() {

+ 10 - 10
src/views/platActivi/act/parts/goods.vue

@@ -1,7 +1,13 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight">
+      <el-col
+        :span="24"
+        class="main animate__animated animate__backInRight"
+        v-loading="loadings"
+        element-loading-text="拼命加载中"
+        element-loading-spinner="el-icon-loading"
+      >
         <span v-show="view === 'list'">
           <el-col class="top-btn">
             <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
@@ -56,6 +62,7 @@ export default {
   data: function () {
     const that = this;
     return {
+      loadings: true,
       view: 'list',
       // 列表
       opera: [
@@ -75,8 +82,6 @@ export default {
       plusList: [],
       // 查询
       searchForm: {},
-      // 多选值
-      selected: [],
       // 状态
       statusList: [],
       ids: '',
@@ -106,6 +111,7 @@ export default {
           this.$set(this, 'plusTotal', arr.total);
         }
       }
+      this.loadings = false;
     },
     // 活动设置
     toSet({ data }) {
@@ -131,18 +137,12 @@ export default {
       this.searchForm = {};
       this.search();
     },
-    // 多选
-    handleSelect(data) {
-      this.$set(this, `selected`, data);
-    },
     // 查询其他信息
     async searchOther() {
       let res;
       // 审核状态
       res = await this.dictQuery({ code: 'platformAct_goods_status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
     // 返回
     toBack() {

+ 9 - 2
src/views/platActivi/act/parts/goods/goodsEdit.vue

@@ -1,7 +1,13 @@
 <template>
   <div id="goodsEdit">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight">
+      <el-col
+        :span="24"
+        class="main animate__animated animate__backInRight"
+        v-loading="loadings"
+        element-loading-text="拼命加载中"
+        element-loading-spinner="el-icon-loading"
+      >
         <el-col class="top-btn">
           <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
         </el-col>
@@ -110,6 +116,7 @@ export default {
   components: {},
   data: function () {
     return {
+      loadings: true,
       form: {},
       list: [],
       // 操作
@@ -164,6 +171,7 @@ export default {
         if (res.data.config) this.$set(this, `config`, res.data.config);
         if (res.data.platform_act_type == '2') this.$set(this, `list`, res.data.config.gift);
       }
+      this.loadings = false;
     },
     // 远程查询
     async querySearch(value) {
@@ -223,7 +231,6 @@ export default {
       let newList = this.list.filter((i) => i.id != data.id);
       this.$set(this, `list`, newList);
     },
-
     // 提交
     async onSubmit(formName) {
       this.$refs[formName].validate(async (valid) => {