Explorar o código

修改打包路径及输入框代码

[plg137200.] hai 1 ano
pai
achega
c20d39f943

+ 4 - 4
src/main/index.js

@@ -58,11 +58,11 @@ let loadingWindow
 //设置访问路径
 //打包访问的路径
 
-let serveUrl = "./resources/exe"
-let serveUrlJar = '\\resources\\exe'
+// let serveUrl = "./resources/exe"
+// let serveUrlJar = '\\resources\\exe'
 //本地访问的路径
-// let serveUrl = "./exe"
-// let serveUrlJar = '\\exe'
+let serveUrl = "./exe"
+let serveUrlJar = '\\exe'
 /**
  * Set `__static` path to static files in production
  * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html

+ 5 - 5
src/renderer/components/AnimationDes.vue

@@ -385,10 +385,10 @@ export default {
       focusNao: [],
       // 全量
       focusNaoAll: [],
-      // urlThreeP: "../../../static/candle/index.html",
-      urlThreeP: __static + "/candle/index.html",
-      // pubSrc: "../../../static",
-      pubsrc: __static,
+      urlThreeP: "../../../static/candle/index.html",
+      // urlThreeP: __static + "/candle/index.html",
+      pubSrc: "../../../static",
+      // pubsrc: __static,
       userLink: {
         num: "",
         mac: "",
@@ -467,7 +467,7 @@ export default {
     setTimeout(() => {
       that.changeGame(parseInt(that.$route.query.gameType));
       console.log(that.$route.query.gameType);
-    }, 2000);
+    }, 3000);
     that.singleFlag = that.$route.query.single;
     console.log(that.singleFlag);
 

+ 57 - 14
src/renderer/components/Menu.vue

@@ -318,7 +318,7 @@
               </el-form-item>
               <el-form-item label="编号" prop="num">
                 <el-input
-                  type="password"
+                  :disabled="true"
                   v-model="ruleUserForm.num"
                   placeholder="请输入编号"
                 ></el-input>
@@ -479,6 +479,9 @@ export default {
       }
     };
     return {
+      id: "",
+      role: "",
+      queryPassword: "",
       //人机对话
       rjdhUrl: "rjdh1.png",
       rjdh: true,
@@ -590,8 +593,30 @@ export default {
     this.userType = parseInt(this.userType);
 
     this.$root.topPageFlag = true;
+    //根据用户编号查询用户信息
   },
   methods: {
+    //根据用户编号查询用户信息
+    // queryUserMessage(){
+    //   let that=this;
+    //   that.$http.get(
+    //         `v1/user/getUser/${that.acount}`,
+    //         {
+    //           identifier: that.acount,
+
+    //         },
+    //         (res) => {
+    //           if (res.data.code == 200) {
+    //             that.centerDialogPass = false;
+    //             that.$message.success("修改成功");
+    //             that.$router.push("/");
+    //           } else {
+    //             this.$message.error("访问服务器失败!");
+    //           }
+    //         }
+    //       );
+    // },
+
     menuManageClick(val) {
       if (val == "yhgl") {
         this.yhglUrl = "yhgl1.png";
@@ -796,20 +821,23 @@ export default {
         if (valid) {
           //修改个人信息
           that.$http.post(
-            `v1/user/change/user`,
+            `v1/user/update`,
             {
-              name: that.ruleUserForm.name,
-              num: that.ruleUserForm.num,
-              unit: that.ruleUserForm.unit,
+              userName: that.ruleUserForm.name,
+              identifier: that.ruleUserForm.num,
+              profession: that.ruleUserForm.unit,
               age: that.ruleUserForm.age,
-              sex: that.ruleUserForm.sex,
+              gender: that.ruleUserForm.sex == "男" ? "1" : "0",
               marriageSituation: that.ruleUserForm.marriageSituation,
+              id: that.id,
+              role: that.role + "",
+              password: that.queryPassword,
             },
             (res) => {
               if (res.data.code == 200) {
                 that.centerDialogPass = false;
                 that.$message.success("修改成功");
-                that.$router.push("/");
+                // that.$router.push("/");
               } else {
                 this.$message.error("访问服务器失败!");
               }
@@ -821,16 +849,25 @@ export default {
       });
     },
     queryUserInfo() {
-      let that =this;
-      that.$http.post(
-        `v1/user/change/user`,
+      let that = this;
+      that.$http.get(
+        `v1/user/getUser/${that.acount}`,
         {
-          num: that.ruleUserForm.num,
+          identifier: that.acount,
         },
         (res) => {
-          if (res.data.code == 200) {
-             //修改文本
-             //将data赋予给数据
+          if (res.code == 200) {
+            that.ruleUserForm.name = res.data.userName;
+            that.ruleUserForm.num = res.data.identifier;
+            that.ruleUserForm.age = res.data.age;
+            that.ruleUserForm.unit = res.data.profession;
+            that.ruleUserForm.sex = res.data.gender == "1" ? "男" : "女";
+            that.ruleUserForm.marriageSituation = res.data.marriageSituation;
+            that.id = res.data.id;
+            that.role = res.data.role;
+            that.queryPassword = res.data.password;
+            //修改文本
+            //将data赋予给数据
           } else {
             this.$message.error("访问服务器失败!");
           }
@@ -839,8 +876,14 @@ export default {
     },
     updatePass() {
       //调用查询用户信息的方法
+      let that = this;
       this.queryUserInfo();
+      //将校验去掉
       this.centerDialogPass = true;
+      this.$nextTick(() => {
+        that.$refs["ruleUserForm"].resetFields();
+        that.$refs["ruleForm"].resetFields();
+      });
     },
     //销毁所有定时器
     desTimer() {