4 次代码提交 fd4b98266f ... 180f9d054f

作者 SHA1 备注 提交日期
  Administrator 180f9d054f 活动页面 5 月之前
  Administrator 694aa39038 活动页面bug 5 月之前
  Administrator a05ae11fb1 活动修改 7 月之前
  Administrator ab353ed900 活动开发 7 月之前
共有 1 个文件被更改,包括 17 次插入27 次删除
  1. 17 27
      src/views/activity/rule/index.vue

+ 17 - 27
src/views/activity/rule/index.vue

@@ -96,7 +96,7 @@
           <el-col :span="11">
             <el-form-item prop="startTime">
               <el-date-picker v-model="ruleForm.startTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
-                placeholder="选择开启时间" style="width: 100%" :change="onStartTimeChange(ruleForm.startTime)"/>
+                placeholder="选择开启时间" style="width: 100%" @change="onStartTimeChange(ruleForm.startTime)"/>
             </el-form-item>
           </el-col>
           <el-col class="text-center" :span="2" style="text-align: center">
@@ -236,10 +236,7 @@ const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
 
 const data = ref([])
 const templateData = ref([])
-const templateOptionData = ref([{
-  "value":"number",
-  "label":"string"
-}])
+const templateOptionData = reactive([])
 let currPageNum = 1;
 const pageSize = 1000;
 onBeforeMount(() => {
@@ -250,9 +247,9 @@ onBeforeMount(() => {
 const loadActivityTemplateInfo = () => {
   activityTemplateApi.all().then(res => {
     templateData.value = res.data.result;
-    for (var i=0; i < templateData.value.length; i++) {
-      templateOptionData.value[i].value = templateData.value[i].id
-      templateOptionData.value[i].label = templateData.value[i].id +"-"+templateData.value[i].name
+    for (var i = 0; i < templateData.value.length; i++) {
+      let val = {"value" : templateData.value[i].id, "label" : templateData.value[i].id + "-" + templateData.value[i].name}
+      templateOptionData.push(val)
     }
     console.log(templateData)
     console.log(templateOptionData)
@@ -357,7 +354,7 @@ const onTypeChange = (val) => {
 const onStartTimeChange = (val) => {
   if (val != null && val != "") {
     let startDate = new Date(val)
-    for (var i=0; i < templateData.value.length; i++) {
+    for (var i = 0; i < templateData.value.length; i++) {
       if (templateData.value[i].id == ruleForm.actTemId) {
         const dayOfMs = 24 * 60 * 60 * 1000;
         let endTimeMs = startDate.getTime() + templateData.value[i].keepDay * dayOfMs
@@ -385,7 +382,7 @@ const ruleForm = reactive({
   startTime: null,
   endTime: null,
   stayTime: null,
-  lpActTemList: null,
+  lpActTemList: null,                                                       
   lpActInterval: null,
 })
 
@@ -397,33 +394,26 @@ const rules = reactive({
       trigger: 'change',
     },
   ],
-  startTime: [
+  gameIds: [
     {
       required: true,
-      type: 'date',
-      message: '请选择活动开始时间',
+      message: '请填写生效服务器',
       trigger: 'change',
     },
   ],
-  endTime: [
+  startTime: [
     {
       required: true,
       type: 'date',
-      message: '请选择活动结束时间',
-      trigger: 'change',
-    },
-  ],
-  lpActTemList: [
-    {
-      required: true,
-      message: '请输入循环模版列表',
+      message: '请选择活动开始时间',
       trigger: 'change',
     },
   ],
-  lpActInterval: [
+  endTime: [
     {
       required: true,
-      message: '请输入循环间隔天数',
+      type: 'date',
+      message: '请选择活动结束时间',
       trigger: 'change',
     },
   ]
@@ -556,12 +546,12 @@ const batchDelete = () => {
     draggable: true,
   })
     .then(() => {
-      let selectGmMaliIds = reactive([])
+      let selectActRuleIds = reactive([])
       for (let value of selectObj.value) {
-        selectGmMaliIds.push(value.id)
+        selectActRuleIds.push(value.id)
       }
       let deleteParams = reactive({
-        gmMaliIds: selectGmMaliIds
+        actRuleIds: selectActRuleIds
       })
       activityRuleApi.deleteBatch(deleteParams).then(res => {
         loadActivityRuleInfo()