yurk 2 yıl önce
ebeveyn
işleme
2e17b40b5c

+ 27 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -352,6 +352,9 @@
             <van-tag size="large" style="text-align:center;margin:10px;padding:12px;margin-bottom:120px;border: 1px solid #20a0ff;"
                  @click="addNewPro" 
                 icon="plus" color="#ffffff" ><span style="color:#999;text-align:center;padding: 0 50px;"> + 新增{{user.companyId==781?'任务':'项目'}}  </span></van-tag>
+                <!-- <van-button id="btn-start-recording" @click="startRecording">录音</van-button>
+                <van-button id="btn-stop-recording" @click="stopRecording">停止</van-button>
+                <van-button id="btn-play-recording" @click="getRecording">获取文件</van-button> -->
             </div>  
             <div class="form_btn" style="position:fixed; bottom:0px;width:100%;">
                 <div style="padding-bottom:10px;">
@@ -402,6 +405,8 @@
 <script>
 import timetoolVue from '../timetool/timetool.vue';
     // Vue.prototype.$wx = wx
+// import { Recorder } from '../../assets/record/recorder'
+// var recorder = null
     export default {
         data() {
             return {
@@ -493,8 +498,10 @@ import timetoolVue from '../timetool/timetool.vue';
                     list: [],
                     searchList: []
                 },
-                vacationTime: {},
-                totalReportHours: 0
+                // vacationTime: {},
+                // totalReportHours: 0,
+                // leftDataList:[],
+                // rightDataList:[],
             };
         },
 
@@ -2121,7 +2128,24 @@ import timetoolVue from '../timetool/timetool.vue';
                         alert(JSON.stringify(res));
                     }
                 });
-            }
+            },
+            // startRecording: function () {
+            //     Recorder.get(function (rec) {
+            //     recorder = rec
+            //     recorder.start()
+            // })
+            // },
+            // stopRecording: function () {
+            //     recorder.stop()
+            // },
+            // getRecording: function () {
+            //     var file =  new File([recorder.getBlob()], new Date().getTime() + '.pcm',{type:recorder.getBlob().type});  //得到需要的pcm文件
+            //     // var file =  recorder.getBlob();  //得到需要的pcm文件
+            //     let param = new FormData();
+            //     param.append("file", file);
+            //     this.$axios.post('/report/record', param).then(res => {})
+            //     console.log(file)
+            // },
         },
         
         mounted() {