Переглянути джерело

公共选择生效服务器

Administrator 2 місяців тому
батько
коміт
66c5346345

+ 15 - 1
src/views/operation/announcement/index.vue

@@ -73,6 +73,9 @@
           <el-button type="primary" @click="valid15Day">15天</el-button>
           <el-button type="primary" @click="valid30Day">30天</el-button>
         </el-form-item>
+        <el-form-item label="生效服务器" prop="gameIds">
+          <el-input v-model="ruleForm.gameIds" placeholder="0代表全服,支持数组,格式:1,2,3..."/>
+        </el-form-item>
         <el-form-item label="能否关闭" prop="isCanSkip">
           <el-radio-group v-model="ruleForm.isCanSkip">
             <el-radio :label="0">否</el-radio>
@@ -243,6 +246,7 @@ const column = [
   { name: 'validTime', label: '公告开始时间', slot: true, valueType: 'datetime'},
   { name: 'invalidTime', label: '公告截止时间', slot: true, valueType: 'datetime'},
   { name: 'content', label: '公告内容'},
+  { name: 'gameIds', label: '生效服务器', inSearch: true, valueType: 'input' },
   { name: 'isCanSkip', label: '能否关闭', slot: true},
   { name: 'createTime', label: '公告创建时间', slot: true },
   { name: 'operation', slot: true, fixed: 'right', width: 200, label: '操作' },
@@ -280,7 +284,8 @@ const ruleForm = reactive({
     validTime: null,
     invalidTime: null,
     content: null,
-    isCanSkip:null
+    isCanSkip:null,
+    gameIds: null,
 })
 
 const rules = reactive({
@@ -328,6 +333,13 @@ const rules = reactive({
       trigger: 'change',
     },
   ],
+  gameIds: [
+    {
+      required: true,
+      message: '请填写生效服务器',
+      trigger: 'change',
+    },
+  ]
 })
 
 
@@ -364,6 +376,7 @@ const add = () => {
   ruleForm.invalidTime = null
   ruleForm.content = null
   ruleForm.isCanSkip = null
+  ruleForm.gameIds = null
 }
 
 const valid7Day = () => {
@@ -492,6 +505,7 @@ const edit = (row) => {
   ruleForm.invalidTime = dateUtils.getDate(row.invalidTime)
   ruleForm.content = row.content
   ruleForm.isCanSkip = row.isCanSkip == true ? 1 : 0
+  ruleForm.gameIds = row.gameIds.toString()
 }
 
 const del = (row) => {

+ 2 - 2
src/views/player/index.vue

@@ -108,7 +108,7 @@ const ruleForm = reactive({
   ctm: '',
   llTm: '',
   luTm: '',
-  lps:''
+  msg:''
 });
 
 const its = reactive([]);
@@ -150,7 +150,7 @@ const onSubmit = async () => {
     ruleForm.aby = jsonData.aby == null ? 0 : jsonData.aby;
     ruleForm.ctm = jsonData.ctm == null ? '无' : formatDate(new Date(jsonData.ctm * 1000), 'yyyy-MM-dd hh:mm:ss');
     ruleForm.llTm = jsonData.llTm == null ? '无' : formatDate(new Date(jsonData.llTm * 1000), 'yyyy-MM-dd hh:mm:ss');
-    ruleForm.lps = jsonData.lps;
+    ruleForm.msg = jsonData.msg;
     if (jsonData.luTm == 0) {
       ruleForm.luTm = '在线'
     } else {