Parcourir la source

账号复制添加数据库支持

Administrator il y a 2 semaines
Parent
commit
8632e4bf55
1 fichiers modifiés avec 20 ajouts et 7 suppressions
  1. 20 7
      src/views/player/index.vue

+ 20 - 7
src/views/player/index.vue

@@ -48,18 +48,25 @@
   </div>
 
   <!-- 模态框 -->
-  <el-dialog title="复制账号" v-model="showModal" @close="closeModal" width="350px">
+  <el-dialog title="复制账号" v-model="showModal" @close="closeModal" width="400px">
     <el-form-item label="复制玩家">
       <el-input v-model="fromPlayerID" placeholder="输入复制玩家ID" :maxlength="8"
-        style="width: 200px;position: relative; left: 20px;" />
+        style="width: 250px;position: relative; left: 20px;" />
     </el-form-item>
     <el-form-item label="目标玩家">
-      <el-input v-model="toPlayerID" placeholder="输入目标玩家ID" :maxlength="8"
-        style="width: 200px;position: relative; left: 20px;" />
+      <el-input v-model="toPlayerID" placeholder="输入目标玩家ID,0代表创建新号" :maxlength="8"
+        style="width: 250px;position: relative; left: 20px;" />
     </el-form-item>
-
-
-    <span slot="footer" class="dialog-footer" style="position: absolute; right: 20px; bottom: 10px;">
+    <el-form-item label="数据库URL">
+      <el-input v-model="toConnectUrl" type = "password" placeholder="输入数据库链接URL,可选项,默认内网数据库" :maxlength="8"
+        style="width: 250px;position: relative; left: 8px;" />
+    </el-form-item>
+    <el-form-item label="数据库名">
+      <el-input v-model="toDBName" type = "password" placeholder="输入数据库名,可选项,默认内网数据库" :maxlength="8"
+        style="width: 250px;position: relative; left: 20px;" />
+    </el-form-item>
+    <el-form-item></el-form-item>
+    <span slot="footer" class="dialog-footer" style="position: absolute; right: 120px; bottom: 10px;">
       <el-button type="primary" @click="savePlayer">复制</el-button>
       <el-button @click="closeModal">关闭</el-button>
     </span>
@@ -86,6 +93,8 @@ const formInline1 = reactive({
 
 const fromPlayerID = ref("");
 const toPlayerID = ref("");
+const toConnectUrl = ref("mongodb://root:fanbao2020HwCsf@119.3.32.162:28107/?maxIdleTimeMS=60000");
+const toDBName = ref("fb010");
 const collapse = ref('0');
 const showModal = ref<Boolean>(false);
 
@@ -235,6 +244,8 @@ const savePlayer = () => {
   let data = {
     fromPlayerID: fromPlayerID.value,
     toPlayerID: toPlayerID.value,
+    toConnectUrl: toConnectUrl.value,
+    toDBName: toDBName.value,
     srvI: ruleForm.gId
   }
 
@@ -260,6 +271,8 @@ const savePlayer = () => {
 const closeModal = () => {
   fromPlayerID.value = "";
   toPlayerID.value = "";
+  toConnectUrl.value = "mongodb://root:fanbao2020HwCsf@119.3.32.162:28107/?maxIdleTimeMS=60000";
+  toDBName.value = "fb010";
   showModal.value = false;
 }