From 4e535966807e7b0c0061e6388df4f950276a8662 Mon Sep 17 00:00:00 2001 From: naibo Date: Wed, 27 Dec 2023 20:49:24 +0800 Subject: [PATCH] Format Code --- ElectronJS/config.json | 2 +- ElectronJS/src/index.html | 84 ++++-- ElectronJS/src/taskGrid/FlowChart.js | 13 +- ElectronJS/src/taskGrid/executeTask.html | 313 +++++++++++++---------- ElectronJS/src/taskGrid/global.js | 14 +- ElectronJS/src/taskGrid/logic.js | 8 +- ElectronJS/src/taskGrid/taskInfo.html | 195 +++++++------- ElectronJS/src/taskGrid/taskList.html | 214 ++++++++-------- 8 files changed, 459 insertions(+), 384 deletions(-) diff --git a/ElectronJS/config.json b/ElectronJS/config.json index 0d7be07..252c802 100644 --- a/ElectronJS/config.json +++ b/ElectronJS/config.json @@ -1 +1 @@ -{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","debug":false,"copyright":1,"sys_version":"x64","mysql_config_path":"./mysql_config.json","absolute_user_data_folder":"/Users/naibo/Documents/EasySpider/ElectronJS/user_data"} \ No newline at end of file +{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","debug":false,"copyright":1,"sys_version":"x64","mysql_config_path":"./mysql_config.json","absolute_user_data_folder":"D:\\Documents\\Projects\\EasySpider\\ElectronJS\\user_data"} \ No newline at end of file diff --git a/ElectronJS/src/index.html b/ElectronJS/src/index.html index 3a06dc9..55472f2 100644 --- a/ElectronJS/src/index.html +++ b/ElectronJS/src/index.html @@ -41,14 +41,17 @@

English

当前版本/Current Version: v0.6.0

-

Github最新版本/Newest Version:{{newest_version}}

- - +

Github最新版本/Newest Version:{{newest_version}}

+ +
- + - - + +
@@ -58,7 +61,9 @@

Copyright and Disclaimer

Please carefully read the following instructions regarding the use of the software and commercial payments. If you agree, please accept the agreement.

-

Agree and Start

+ style="margin-top: 30px; width: 300px;height:60px;padding-top:12px;color:white">Agree and Start +

Hint: Click Button below to start.

@@ -83,13 +89,17 @@ For individual users, EasySpider is a completely free and ad-free open-source so style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">View/Manage/Execute Tasks

- Browse official website to watch tutorials + Browse official website to watch tutorials

- - - - + + + +
@@ -113,7 +123,8 @@ For individual users, EasySpider is a completely free and ad-free open-source so style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Data Mode

- Go to Home Page + Go to Home Page
@@ -121,7 +132,11 @@ For individual users, EasySpider is a completely free and ad-free open-source so

Please specify the directory of user data below. Once set, the browser will load cookies and other contents such as user login information from this directory. The browser will load data from this directory every time it is designed and executed, as long as the directory remains the same.

-

For example, if the ./user_data folder is set and you log in at ebay.com during the design process, then the previous login status will still be retained when you specify the ./user_data folder again for the next design or task execution when you open ebay.com.

+

For example, if the + ./user_data folder is set and you log in at + ebay.com during the design process, then the previous login status will still be retained when you specify the + ./user_data folder again for the next design or task execution when you open + ebay.com.

If there are multiple configurations, different directories can be set for each configuration. Each directory will be treated as a separate configuration set, and if a directory does not exist, it will be created automatically.

@@ -129,13 +144,16 @@ For individual users, EasySpider is a completely free and ad-free open-source so

Start Design

+ style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design +

Start Design (Mobile)

+ style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design (Mobile) +

- Go to Home Page + Go to Home Page

@@ -143,7 +161,9 @@ For individual users, EasySpider is a completely free and ad-free open-source so

版权声明和注意事项

请接受下方使用协议以使用软件,不同意请退出。

-

同意并开始使用

+ style="margin-top: 30px; width: 300px;height:60px;padding-top:12px;color:white">同意并开始使用 +

提示:点击下方按钮开始使用。

设计/修改任务

+ style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">设计/修改任务 +

查看/管理/执行任务

- 点此访问官网查看文档/视频教程 + 点此访问官网查看文档/视频教程

- + - - + +
@@ -194,7 +219,8 @@ For individual users, EasySpider is a completely free and ad-free open-source so style="margin-top: 15px; width: 320px;height:60px;padding-top:12px;color:white">使用带用户信息浏览器设计

- 返回首页 + 返回首页

@@ -216,9 +242,11 @@ For individual users, EasySpider is a completely free and ad-free open-source so

开始设计(手机模式)

+ style="margin-top: 15px; width: 320px;height:60px;padding-top:12px;color:white">开始设计(手机模式) +

- 返回首页 + 返回首页

diff --git a/ElectronJS/src/taskGrid/FlowChart.js b/ElectronJS/src/taskGrid/FlowChart.js index 41c68b3..19f83c9 100644 --- a/ElectronJS/src/taskGrid/FlowChart.js +++ b/ElectronJS/src/taskGrid/FlowChart.js @@ -143,7 +143,7 @@ let app = new Vue({ methods: { getFinalXPath: function (xpath, useLoop) { //获取最终的xpath // console.log(xpath, useLoop, this.parentNode); - if(this.parentNode == null || this.parentNode.parameters == null || this.parentNode.parameters.xpath == null){ + if (this.parentNode == null || this.parentNode.parameters == null || this.parentNode.parameters.xpath == null) { return xpath; } else if (useLoop) { let parent_xpath = this.parentNode.parameters.xpath; @@ -543,8 +543,7 @@ function toolBoxKernel(e, param = null) { // let tarrow = DeepClone(app.$data.nowArrow); // refresh(); // app._data.nowArrow =tarrow; - } - else if (option == 11) { //复制操作 + } else if (option == 11) { //复制操作 if (nowNode == null) { e.stopPropagation(); //防止冒泡 } else if (nowNode.getAttribute("dataType") > 0) { @@ -566,8 +565,7 @@ function toolBoxKernel(e, param = null) { $("#" + t["id"]).click(); //复制后点击复制后的元素 e.stopPropagation(); //防止冒泡 } - } - else if (option == 10) { //剪切操作 + } else if (option == 10) { //剪切操作 if (nowNode == null) { e.stopPropagation(); //防止冒泡 } else if ($(nowNode).is(".branch")) { @@ -612,8 +610,7 @@ function toolBoxKernel(e, param = null) { e.stopPropagation(); //防止冒泡 } } - } - else if (option > 0) { //新增操作 + } else if (option > 0) { //新增操作 let l = nodeList.length; let nt = null; let nt2 = null; @@ -714,7 +711,7 @@ function toolBoxKernel(e, param = null) { } else { $("#" + t["id"]).click(); } - if (e != null){ + if (e != null) { e.stopPropagation(); //防止冒泡 } option = 0; diff --git a/ElectronJS/src/taskGrid/executeTask.html b/ElectronJS/src/taskGrid/executeTask.html index 3c07792..b59c914 100644 --- a/ElectronJS/src/taskGrid/executeTask.html +++ b/ElectronJS/src/taskGrid/executeTask.html @@ -31,18 +31,20 @@ .ID { width: 10%; } - .excel th,.excel td { + + .excel th, .excel td { text-align: center; font-size: 13px; padding: 10px; - max-width: 200px!important; + max-width: 200px !important; } + .tip { position: fixed; - width:100%; + width: 100%; display: none; z-index: 1000; - top:0; + top: 0; } @@ -59,27 +61,36 @@ 提示:任务执行ID对应配置文件已更新,您可使用任务ID:来执行加载了新配置的任务。
- Hint: The task execution ID corresponds to the configuration file has been updated, you can use the task ID to execute the task with the new configuration.
+ Hint: The task execution ID corresponds to the configuration file has been updated, you can use the task ID + to execute the task with the new configuration. +
- + -