|
@@ -1290,7 +1290,57 @@ export default {
|
|
|
_this.pageStatus = 2;
|
|
|
// _this.transcriptionData.content += _res.data;
|
|
|
_this.editorBarData.type = "0";
|
|
|
- _this.editorBarData.content = _res.data;
|
|
|
+ let _textData = _res.data;
|
|
|
+ let _result = `<table
|
|
|
+ border="0"
|
|
|
+ width="100%"
|
|
|
+ cellpadding="0"
|
|
|
+ cellspacing="0"
|
|
|
+ style="text-align: center"
|
|
|
+ >
|
|
|
+ <tbody>`
|
|
|
+ _textData.split("\n").forEach((item,index)=>{
|
|
|
+ if(index==_textData.split("\n").length-1)return;
|
|
|
+ if(index==0){
|
|
|
+ _result+=`<tr>`
|
|
|
+ if(item.split('').filter(char=>char===',').length>=6){
|
|
|
+ item.split(',').forEach((item2,index2)=>{
|
|
|
+ _result += `
|
|
|
+ <th>${item2}</th>
|
|
|
+ `;
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ item.trim().split(/\s+/).forEach((item2,index2)=>{
|
|
|
+ _result += `
|
|
|
+ <th>${item2}</td>
|
|
|
+ `;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ _result+=`</tr>`
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ _result+=`<tr>`
|
|
|
+ if(item.split('').filter(char=>char===',').length>=6){
|
|
|
+ item.split(',').forEach((item2,index2)=>{
|
|
|
+ _result += `
|
|
|
+ <td>${item2}</td>
|
|
|
+ `;
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ item.trim().split(/\s+/).forEach((item2,index2)=>{
|
|
|
+ _result += `
|
|
|
+ <td>${item2}</td>
|
|
|
+ `;
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ _result+=`</tr>`
|
|
|
+ })
|
|
|
+ _result += `
|
|
|
+ </tbody>
|
|
|
+ </table>`;
|
|
|
+ console.log(_result)
|
|
|
+ _this.editorBarData.content = _result;
|
|
|
// _this.transcriptionData.content = _res.data;
|
|
|
_this.editorBarData.url = "";
|
|
|
_this.saveEditorBar();
|