@@ -116,7 +116,7 @@ import util from '@/js/util';
116116import title from ' ./title.vue' ;
117117import body from ' ./body.vue' ;
118118import saveAs from ' ./script/saveAs.vue' ;
119- import {Work } from ' ./modal.js' ;
119+ import { Work } from ' ./modal.js' ;
120120import _ from ' lodash' ;
121121
122122export default {
@@ -148,7 +148,7 @@ export default {
148148 rightTab: 0 ,
149149 },
150150 isControlBtnShow: false ,
151- tips: ' 什么是Scriptis(意书)?\n 意书是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiDB等 )、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。\n 如何使用Scriptest(意书)?\n 1. 选中工作空间的目录,创建文件夹;\n 2. 右键某个文件夹 =>新建脚本;\n 3. 选择脚本类型,如:SQL、Pyspark、HQL等;\n 4. 书写脚本,点击执行,生成结果集; \n 5. 结果集左上角,点击【可视化】,生成可视化的图报表 。' ,
151+ tips: ' 什么是Scriptis(意书)?\n 意书是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等 )、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。\n 如何使用Scriptest(意书)?\n 1. 选中工作空间的目录,创建文件夹;\n 2. 右键某个文件夹 =>新建脚本;\n 3. 选择脚本类型,如:SQL、Pyspark、HQL等;\n 4. 书写脚本,点击执行,生成结果集。' ,
152152 isTopPanelFull: false ,
153153 loading: false ,
154154 };
@@ -161,7 +161,7 @@ export default {
161161 watch: {
162162 current (val , oldVal ) {
163163 if (oldVal) {
164- this .dispatch (' Workbench:setResultCache' , {id: oldVal});
164+ this .dispatch (' Workbench:setResultCache' , { id: oldVal });
165165 this .revealInSidebar ();
166166 }
167167 },
@@ -217,7 +217,7 @@ export default {
217217 });
218218 });
219219 // 在获取到hive信息后再打开缓存的tab页信息
220- this .getWorkList ({list: []}).then (() => {
220+ this .getWorkList ({ list: [] }).then (() => {
221221 this .openQueryTab ();
222222 this .$nextTick (() => {
223223 this .loading = false ;
@@ -268,7 +268,7 @@ export default {
268268 }
269269 // 这种情况适用于初始化系统是/consle,然后打开全局历史的查看
270270 // 必须打开缓存的tab后再打开从全局历史传递来的query,否在无法被选中
271- this .getWorkList ({list: cache .tabList }).then (() => {
271+ this .getWorkList ({ list: cache .tabList }).then (() => {
272272 this .openQueryTab ();
273273 this .$nextTick (() => {
274274 this .loading = false ;
@@ -280,7 +280,7 @@ export default {
280280 }
281281 });
282282 },
283- getWorkList ({list}) {
283+ getWorkList ({ list }) {
284284 return new Promise ((resolve , reject ) => {
285285 this .dispatch (' IndexedDB:getTabs' , (worklist ) => {
286286 worklist .forEach ((work ) => {
@@ -329,7 +329,7 @@ export default {
329329 });
330330 }
331331 // 如果已经在tabs中,则打开
332- let repeatWork = _ .find (this .worklist , (work ) => work .id == option .id );
332+ let repeatWork = _ .find (this .worklist , (work ) => work .id == option .id );
333333 let work = null ;
334334 if (! repeatWork) {
335335 if (this .worklist .length >= 10 ) {
@@ -438,17 +438,17 @@ export default {
438438 ' Workbench:saveAs' (work) {
439439 this .$refs .saveAs .open (work);
440440 },
441- ' Workbench:updateTab' ({newNode, findWork, oldLabel}, cb) {
441+ ' Workbench:updateTab' ({ newNode, findWork, oldLabel }, cb) {
442442 const work = findWork || _ .find (this .worklist , (work ) => {
443443 return work .filename === oldLabel;
444444 });
445445 if (work) {
446446 const newKey = util .md5 (newNode .path );
447- const modifyLog = this .dispatch (' IndexedDB:changeLogKey' , {oldKey: work .id , newKey});
448- const modifyHistory = this .dispatch (' IndexedDB:changeHistoryKey' , {oldKey: work .id , newKey});
449- const modifyResult = this .dispatch (' IndexedDB:changResultKey' , {oldKey: work .id , newKey});
450- const modifyProgress = this .dispatch (' IndexedDB:changProgressKey' , {oldKey: work .id , newKey});
451- const modifyTab = this .dispatch (' IndexedDB:changeTabKey' , {oldKey: work .id , newKey});
447+ const modifyLog = this .dispatch (' IndexedDB:changeLogKey' , { oldKey: work .id , newKey });
448+ const modifyHistory = this .dispatch (' IndexedDB:changeHistoryKey' , { oldKey: work .id , newKey });
449+ const modifyResult = this .dispatch (' IndexedDB:changResultKey' , { oldKey: work .id , newKey });
450+ const modifyProgress = this .dispatch (' IndexedDB:changProgressKey' , { oldKey: work .id , newKey });
451+ const modifyTab = this .dispatch (' IndexedDB:changeTabKey' , { oldKey: work .id , newKey });
452452 Promise .all ([modifyLog, modifyHistory, modifyResult, modifyProgress, modifyTab]).then (() => {
453453 setTimeout (() => {
454454 // 在重命名成功后重新打开tab;
@@ -518,8 +518,8 @@ export default {
518518 * @return {Promise}
519519 */
520520 removeWork (work ) {
521- return new Promise ((resolve , reject )=> {
522- let doRemove = ()=> {
521+ return new Promise ((resolve , reject ) => {
522+ let doRemove = () => {
523523 let index = this .worklist .indexOf (work);
524524 if (index != - 1 ) {
525525 this .worklist .splice (index, 1 );
@@ -565,20 +565,20 @@ export default {
565565 if (work .unsave ) {
566566 this .chooseWork (work);
567567 this .showCloseModal = true ;
568- this .closeModal .cancel = ()=> {
568+ this .closeModal .cancel = () => {
569569 this .showCloseModal = false ;
570570 this .close = new Function ();
571571 this .save = new Function ();
572572 this .saveAs = new Function ();
573573 resolve ();
574574 },
575- this .closeModal .close = ()=> {
575+ this .closeModal .close = () => {
576576 this .showCloseModal = false ;
577577 doRemove ();
578578 };
579579 if (! work .saveAs ) {
580580 this .closeModal .text = ` 脚本 ${ work .filename } 已发生改变,是否保存?` ;
581- this .closeModal .save = ()=> {
581+ this .closeModal .save = () => {
582582 this .showCloseModal = false ;
583583 this .dispatch (' Workbench:save' , work);
584584 doRemove ();
@@ -588,7 +588,7 @@ export default {
588588 const scriptText = work .type === ' hdfsScript' ? ` 只读脚本 ${ work .filename } 已发生改变,是否另存至工作空间?` : ` 临时脚本 ${ work .filename } 已发生改变,是否另存为文件?` ;
589589 this .closeModal .text = scriptText;
590590 this .closeModal .save = null ;
591- this .closeModal .saveAs = ()=> {
591+ this .closeModal .saveAs = () => {
592592 this .dispatch (' Workbench:saveAs' , work);
593593 };
594594 }
@@ -615,7 +615,7 @@ export default {
615615 needCloseTabs = this .worklist .slice (0 );
616616 break ;
617617 case ' left' :
618- for (let i= 0 ; i< this .workListLength ; i++ ) {
618+ for (let i = 0 ; i < this .workListLength ; i++ ) {
619619 if (this .worklist [i].id != this .current ) {
620620 needCloseTabs .push (this .worklist [i]);
621621 } else {
@@ -624,7 +624,7 @@ export default {
624624 }
625625 break ;
626626 case ' right' :
627- for (let i= this .workListLength - 1 ; i> 0 ; i-- ) {
627+ for (let i = this .workListLength - 1 ; i > 0 ; i-- ) {
628628 if (this .worklist [i].id != this .current ) {
629629 needCloseTabs .push (this .worklist [i]);
630630 } else {
@@ -667,7 +667,7 @@ export default {
667667
668668 // 获取高亮的方法名
669669 getMethodName (args ) {
670- let {type, isInvert} = args;
670+ let { type, isInvert } = args;
671671 const lib = {
672672 workspaceScript: ' WorkSidebar:setHighLight' ,
673673 hdfsScript: ' HdfsSidebar:setHighLight' ,
@@ -767,7 +767,7 @@ export default {
767767 }
768768 },
769769 revealInSidebar (work ) {
770- let currentWork = work || this .worklist .find ((item )=> item .id === this .current );
770+ let currentWork = work || this .worklist .find ((item ) => item .id === this .current );
771771 if (currentWork) {
772772 this .dispatch (' WorkSidebar:revealInSideBar' , currentWork);
773773 }
@@ -776,4 +776,3 @@ export default {
776776};
777777 </script >
778778<style src="./index.scss " lang="scss"></style >
779-
0 commit comments