From ecdac8a738f254db2b2ea28cbe3248f7a6a7eb2b Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期五, 06 三月 2020 16:18:27 +0800
Subject: [PATCH] 优化采购申请组件

---
 WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js b/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
index c4ebfb4..da63aea 100644
--- a/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
+++ b/WebService/src/main/resources/components/applicationKeyPackage/edit-applicationKey/editApplicationKey.js
@@ -97,7 +97,7 @@
                 vc.component.editApplicationKeyInfo.startTime = vc.dateFormat(new Date().getTime());
                 $('.editApplicationStartTime').datetimepicker({
                     language: 'zh-CN',
-                    format: 'yyyy-mm-dd HH:ii:ss',
+                    format: 'yyyy-mm-dd hh:ii:ss',
                     initTime: true,
                     initialDate: new Date(),
                     autoClose: 1,
@@ -111,7 +111,7 @@
                     });
                 $('.editApplicationEndTime').datetimepicker({
                     language: 'zh-CN',
-                    format: 'yyyy-mm-dd HH:ii:ss',
+                    format: 'yyyy-mm-dd hh:ii:ss',
                     initTime: true,
                     initialDate: new Date(),
                     autoClose: 1,
@@ -254,7 +254,7 @@
                     return;
                 }
                 if (!vc.component.editApplicationKeyValidate()) {
-                    vc.message(vc.validate.errInfo);
+                    vc.toast(vc.validate.errInfo);
                     return;
                 }
 
@@ -327,18 +327,18 @@
                         video: true,
                         audio: false
                     };
-                    var video = document.getElementById('editApplicationKeyPhoto');
+                    var editVideo = document.getElementById('editApplicationKeyPhoto');
                     var media = navigator.getUserMedia(constraints, function (stream) {
                         var url = window.URL || window.webkitURL;
                         //video.src = url ? url.createObjectURL(stream) : stream;
 
                         vc.component.editApplicationKeyInfo.mediaStreamTrack = typeof stream.stop === 'function' ? stream : stream.getTracks()[0];
                         try {
-                            video.src = url ? url.createObjectURL(stream) : stream;
+                            editVideo.src = url ? url.createObjectURL(stream) : stream;
                         } catch (error) {
-                           video.srcObject = stream;
+                            editVideo.srcObject = stream;
                         }
-                        video.play();
+                        editVideo.play();
                         vc.component.editApplicationKeyInfo.videoPlaying = true;
                     }, function (error) {
                         console.log("ERROR");
@@ -351,10 +351,10 @@
             _takeEditPhoto: function () {
                 if (vc.component.editApplicationKeyInfo.videoPlaying) {
                     var canvas = document.getElementById('editApplicationKeyCanvas');
-                    var video = document.getElementById('editApplicationKeyPhoto');
-                    canvas.width = video.videoWidth;
-                    canvas.height = video.videoHeight;
-                    canvas.getContext('2d').drawImage(video, 0, 0);
+                    var takeEditVideo = document.getElementById('editApplicationKeyPhoto');
+                    canvas.width = takeEditVideo.videoWidth;
+                    canvas.height = takeEditVideo.videoHeight;
+                    canvas.getContext('2d').drawImage(takeEditVideo, 0, 0);
                     var data = canvas.toDataURL('image/webp');
                     vc.component.editApplicationKeyInfo.photo = data;
                     //document.getElementById('photo').setAttribute('src', data);

--
Gitblit v1.8.0