Browse Source

修改内容管理

王新雷 4 năm trước cách đây
mục cha
commit
0bf633ab08

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/index.html


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/chunk-1b1a0575.dbf39409.css


+ 0 - 1
dist/static/css/chunk-2185a843.f97d4f53.css

@@ -1 +0,0 @@
-.content-tooltip[data-v-64596b6c]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}.dialog-footer[data-v-57eb3f4d]{width:100%;text-align:right}.reword-list[data-v-57eb3f4d]{display:-webkit-box;display:-ms-flexbox;display:flex}.reword-list .el-form-item[data-v-57eb3f4d]{-webkit-box-flex:1;-ms-flex:1;flex:1}

+ 1 - 0
dist/static/css/chunk-662adb86.2ea9e3a8.css

@@ -0,0 +1 @@
+.content-tooltip[data-v-64596b6c]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;display:inline-block}.dialog-footer[data-v-a47a4102]{width:100%;text-align:right}.reword-list[data-v-a47a4102]{display:-webkit-box;display:-ms-flexbox;display:flex}.reword-list .el-form-item[data-v-a47a4102]{-webkit-box-flex:1;-ms-flex:1;flex:1}.add-reword[data-v-a47a4102]{margin-bottom:22px;width:250px;border-style:dashed}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/chunk-c8046bd2.90f847b2.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.25af11f6.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/chunk-1b1a0575.b925611f.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/chunk-2185a843.7c6b4910.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/chunk-3db48260.db2aa7db.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/chunk-662adb86.fb333442.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/chunk-c8046bd2.8ed5f2d1.js


+ 14 - 18
src/views/contentManager/contentOperation.vue

@@ -42,23 +42,16 @@
           <el-input v-model.trim="form.linkUrl"></el-input>
         </el-form-item>
 
-        <el-form-item label="上架时间" v-if="type == 5">
+        <el-form-item label="上架时间" v-if="type == 5" prop="actionTime" :rules="[{required: true, message: '请选择上架时间范围', trigger: 'change'}]">
           <el-date-picker style="width:400px;"
-                        v-model="actionTime"
+                        v-model="form.actionTime"
+                        :clearable="false"
                         type="datetimerange"
                         range-separator="至"
                         :picker-options="{ firstDayOfWeek: 1 }"
                         start-placeholder="上架开始日期"
                         end-placeholder="上架结束日期">
                     </el-date-picker>
-          <!-- <el-date-picker v-model.trim="actionTime"
-                          style="width:400px;"
-                          type="daterange"
-                          value-format="yyyy-MM-dd"
-                          range-separator="至"
-                          :picker-options="{ firstDayOfWeek: 1 }"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期"></el-date-picker> -->
         </el-form-item>
         <!-- 广告管理才有类型 -->
         <el-form-item label="广告类型"
@@ -426,6 +419,7 @@ export default {
         content: null,
         tenantId: null,
         subType: null,
+        actionTime: null,
       },
       rules: {
         title: [
@@ -438,7 +432,6 @@ export default {
         tenantId: [{ required: true, message: "请选择适用范围", trigger: "change" }],
       },
       imageSize: null,
-      actionTime: null,
     };
   },
   created () { },
@@ -467,9 +460,9 @@ export default {
         status: 1,
         content: null,
         tenantId: null,
-        subType: null
+        subType: null,
+        actionTime: null
       };
-      this.actionTime = null
       this.$refs["form"].clearValidate();
 
       this.dialogForm = {
@@ -585,11 +578,14 @@ export default {
       this.$refs[formName].validate(valid => {
         if (valid) {
           let form = Object.assign({}, this.form)
-          let actionTime = this.actionTime
+          let actionTime = form.actionTime
           console.log(actionTime)
           if(actionTime && actionTime.length > 0) {
             form.onlineTime = dayjs(actionTime[0]).format('YYYY-MM-DD HH:mm:ss')
             form.offlineTime = dayjs(actionTime[1]).format('YYYY-MM-DD HH:mm:ss')
+          } else {
+            form.onlineTime = null
+            form.offlineTime = null
           }
           if (this.pageType == "create") {
             if (form.id) {
@@ -668,9 +664,9 @@ export default {
         status: 1,
         content: null,
         tenantId: null,
-        subType: null
+        subType: null,
+        actionTime: null
       };
-      this.actionTime = null
       this.$refs[formName].resetFields();
     },
     onLook () {
@@ -726,9 +722,9 @@ export default {
               subType: result.subType ? result.subType : null
             };
             if(result.onlineTime && result.offlineTime) {
-              this.actionTime = [result.onlineTime, result.offlineTime]
+              this.form.actionTime = [result.onlineTime, result.offlineTime]
             } else {
-              this.actionTime = null
+              this.form.actionTime = null
             }
             this.dataInfo.updateTime = result.updateTime
           }

+ 2 - 0
src/views/contentManager/index.vue

@@ -99,6 +99,8 @@ export default {
     handleClick (val, event) {
       this.activeName = val.name
       this.activeStatus[val.name] = true
+      const origin = window.location.origin
+      history.pushState("", "Title", `${origin}/#/contentManager/contentManager?type=${val.name}`)
     }
   }
 }

+ 35 - 50
src/views/luckyDraw/trophyCreate.vue

@@ -3,7 +3,7 @@
     <div>
         <el-form :model="form"
                 :rules="rules"
-                ref="trophyForm">
+                ref="ruleForm">
             <el-form-item label="所属活动" prop="groupId" label-width="100PX">
                 <el-select v-model.trim="form.groupId"
                         style="width: 100% !important"
@@ -11,27 +11,27 @@
                     <el-option v-for="item in groupList" :key="item.id" :value="item.id" :label="item.name"></el-option>
                 </el-select>
             </el-form-item>
-            <el-row>
-                <el-col :span="10">
-                    <el-form-item label="奖品1" prop="name" label-width="100PX">
-                        <el-input v-model.trim="form.name"
+            <el-row :gutter="10" v-for="(item, index) in form.rewordList" :key="index">
+                <el-col :span="12">
+                    <el-form-item :label="`奖品${++index}`" prop="name" label-width="100PX">
+                        <el-input v-model.trim="item.name"
                                 autocomplete="off"
                                 placeholder="请输入奖品名称"></el-input>
                     </el-form-item>
                 </el-col>
                 <el-col :span="7">
                     <el-form-item prop="chances">
-                        <el-input v-model.trim="form.chances"
+                        <el-input v-model.trim="item.chances"
                                 type="number"
                                 autocomplete="off"
                                 placeholder="请输入中奖概率">
-                            <template slot="append">%</template>
+                            <i slot="suffix" class="el-input__icon" style="padding-right: 5px;">%</i>
                         </el-input>
                     </el-form-item>
                 </el-col>
-                <el-col :span="7">
+                <el-col :span="5">
                     <el-form-item prop="stock">
-                        <el-input v-model.trim="form.stock"
+                        <el-input v-model.trim="item.stock"
                                 type="number"
                                 autocomplete="off"
                                 placeholder="请输入库存">
@@ -39,28 +39,9 @@
                     </el-form-item>
                 </el-col>
             </el-row>
-            <!-- <div class="reword-list">
-                <el-form-item label="奖品名称" prop="name">
-                    <el-input v-model.trim="form.name"
-                            autocomplete="off"
-                            placeholder="请输入奖品名称"></el-input>
-                </el-form-item>
-                <el-form-item prop="chances">
-                    <el-input v-model.trim="form.chances"
-                            type="number"
-                            autocomplete="off"
-                            placeholder="请输入中奖概率">
-                        <template slot="append">%</template>
-                    </el-input>
-                </el-form-item>
-                <el-form-item prop="stock">
-                    <el-input v-model.trim="form.stock"
-                            type="number"
-                            autocomplete="off"
-                            placeholder="请输入库存">
-                    </el-input>
-                </el-form-item>
-            </div> -->
+            <div style="text-align: center">
+                <el-button class="add-reword" round icon="el-icon-plus" @click="onAddReword">添加奖品</el-button>
+            </div>
             <el-form-item label="备注" label-width="100PX"
                         prop="memo">
                 <el-input type="textarea" :rows="2" v-model.trim="form.memo"
@@ -69,7 +50,7 @@
             </el-form-item>
         </el-form>
         <div class="dialog-footer">
-            <el-button @click="close">取 消</el-button>
+            <el-button @click="onClose('ruleForm')">取 消</el-button>
             <el-button type="primary" @click="onSubmit('ruleForm')">确 定</el-button>
         </div>
     </div>
@@ -87,10 +68,12 @@ export default {
     data () {
         return {
             form: {
-                name: null,
                 groupId: null,
-                chances: null,
-                stock: null,
+                rewordList: [{
+                    name: null,
+                    chances: null,
+                    stock: null,
+                }],
                 memo: null
             },
             rules: {
@@ -113,21 +96,13 @@ export default {
     mounted () {
     },
     methods: {
-        onOperationTrophy(type, data) {
-            this.formActionTitle = type
-            if(type == 'update') {
-                this.$nextTick(() => {
-                    this.form = {
-                        id: data.id,
-                        name: data.name,
-                        groupId: data.groupId,
-                        chances: data.chances * 100,
-                        stock: data.stock,
-                        memo: data.memo
-                    }
-                })
-            }
-            this.lotteryStatus = true
+        onAddReword() { // 添加奖品
+            let form = this.form
+            form.rewordList.push({
+                name: null,
+                chances: null,
+                stock: null,
+            })
         },
         onSubmit(formName) {
             this.$refs[formName].validate(item => {
@@ -157,6 +132,10 @@ export default {
             } else {
                 this.$message.error(res.msg)
             }
+        },
+        onClose(formName) {
+            this.$refs[formName].resetFields()
+            this.close()
         }
     }
 };
@@ -173,4 +152,10 @@ export default {
         flex: 1;
     }
 }
+
+.add-reword {
+    margin-bottom: 22px;
+    width: 250px;
+    border-style: dashed;
+}
 </style>

+ 1 - 2
src/views/luckyDraw/trophyManager.vue

@@ -75,7 +75,6 @@
 
         <el-dialog :title="formTitle[formActionTitle]"
                 :visible.sync="lotteryCreateStatus"
-                @close="onFormClose('trophyForm')"
                 width="600px">
             <trophy-create :groupList="groupList"
                         :getList="getList"
@@ -109,7 +108,7 @@
                             type="number"
                             autocomplete="off"
                             placeholder="请输入中奖概率">
-                        <template slot="append">%</template>
+                        <i slot="suffix" class="el-input__icon" style="padding-right: 5px;">%</i>
                     </el-input>
                 </el-form-item>
                 <el-form-item label="库存"

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác