Format Code

This commit is contained in:
naibo 2023-12-27 20:49:24 +08:00
parent 0ded0fb67c
commit 4e53596680
8 changed files with 459 additions and 384 deletions

View File

@ -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"}
{"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"}

View File

@ -41,14 +41,17 @@
<p><a @click="changeLang('en')" class="btn btn-outline-primary btn-lg"
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;">English</a></p>
<p style="font-size: 17px">当前版本/Current Version: <b>v0.6.0</b></p>
<p style="font-size: 17px"><a href="https://github.com/NaiboWang/EasySpider/releases" target="_blank">Github</a>最新版本/Newest Version<b>{{newest_version}}</b></p>
<p style="font-size: 17px"><a href="https://github.com/NaiboWang/EasySpider/releases"
target="_blank">Github</a>最新版本/Newest Version<b>{{newest_version}}</b></p>
<!-- <p>如发现新版本更新可从以下Github仓库下载最新版本使用/If a new version is found, you can download the latest version from the following Github repository:</p>-->
<!-- <p></p>-->
<div class="img-container">
<!-- <h5>出品方/Producer</h5>-->
<a href="https://www.zju.edu.cn" alt="浙江大学 Zhejiang University" target="_blank"><img src="img/zju.png"></a>
<a href="https://www.nus.edu.sg" alt="新加坡国立大学 National University of Singpaore" target="_blank"><img src="img/nuslogo.png"></a>
<a href="https://www.xidian.edu.cn" alt="西安电子科技大学 Xidian University" target="_blank"><img src="img/xidian.png"></a>
<a href="https://www.nus.edu.sg" alt="新加坡国立大学 National University of Singpaore" target="_blank"><img
src="img/nuslogo.png"></a>
<a href="https://www.xidian.edu.cn" alt="西安电子科技大学 Xidian University" target="_blank"><img
src="img/xidian.png"></a>
</div>
</div>
@ -58,7 +61,9 @@
<div v-if="step == -1">
<h4 style="margin-top: 20px">Copyright and Disclaimer</h4>
<p>Please carefully read the following instructions regarding the use of the software and commercial payments. If you agree, please accept the agreement.</p>
<textarea class="form-control" style="margin:0 auto;width:90%; color:black; height: 450px; min-height: 200px; background: white" readonly>
<textarea class="form-control"
style="margin:0 auto;width:90%; color:black; height: 450px; min-height: 200px; background: white"
readonly>
This software is intended for educational and communication purposes only. It is strictly prohibited to use the software for any illegal activities or operations, such as crawling government/military websites that are not allowed to be crawled. The user bears all consequences resulting from the use of this software and the author shall not be held responsible or liable in any way. Furthermore, the software is protected by patent rights. If you intend to use it for commercial purposes or profit-making activities, such as using the software for client orders, selling the collected data, please contact author: naibowang@foxmail.com for patent authorization and payment operations: https://www.patentguru.com/cn/search?q=一种自定义提取流程的服务封装系统
For individual users, EasySpider is a completely free and ad-free open-source software. The development and maintenance of the software rely solely on the author's voluntary efforts. Therefore, you can choose to support the author, allowing them to have more enthusiasm and energy to maintain this software. Alternatively, if you have profited from using this software, you are welcome to support the author through the following methods:
@ -68,7 +73,8 @@ For individual users, EasySpider is a completely free and ad-free open-source so
</textarea>
<p><a @click="acceptAgreement" class="btn btn-primary btn-lg"
style="margin-top: 30px; width: 300px;height:60px;padding-top:12px;color:white">Agree and Start</a></p>
style="margin-top: 30px; width: 300px;height:60px;padding-top:12px;color:white">Agree and Start</a>
</p>
</div>
<div v-if="step == 0">
<p style="margin-top: 20px">Hint: Click Button below to start.</p>
@ -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</a></p>
<p>
<a href="https://www.easyspider.cn/index_english.html" target="_blank" style="text-align: center; font-size: 18px">Browse official website to watch tutorials</a>
<a href="https://www.easyspider.cn/index_english.html" target="_blank"
style="text-align: center; font-size: 18px">Browse official website to watch tutorials</a>
</p>
<div class="img-container">
<!-- <h5>Producer</h5>-->
<a href="https://www.zju.edu.cn" alt="Zhejiang University" target="_blank"><img src="img/zju.png"></a>
<a href="https://www.nus.edu.sg" alt="National University of Singapore" target="_blank"><img src="img/nuslogo.png"></a>
<a href="https://www.xidian.edu.cn" alt="Xidian University" target="_blank"><img src="img/xidian.png"></a>
<a href="https://www.zju.edu.cn" alt="Zhejiang University" target="_blank"><img
src="img/zju.png"></a>
<a href="https://www.nus.edu.sg" alt="National University of Singapore" target="_blank"><img
src="img/nuslogo.png"></a>
<a href="https://www.xidian.edu.cn" alt="Xidian University" target="_blank"><img
src="img/xidian.png"></a>
</div>
</div>
<div v-else-if="step == 1">
@ -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</a>
</p>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 302px;height:45px;padding-top:5px">Go to Home Page</a>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"
style="margin-top: 10px; width: 302px;height:45px;padding-top:5px">Go to Home Page</a>
</div>
<div v-else-if="step == 2">
@ -121,7 +132,11 @@ For individual users, EasySpider is a completely free and ad-free open-source so
<div style="margin: 0 auto; width:90%">
<p style="margin-top: 20px; text-align: justify">
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. </p>
<p style="text-align: justify">For example, if the <b>./user_data</b> folder is set and you log in at <b>ebay.com</b> during the design process, then the previous login status will still be retained when you specify the <b>./user_data</b> folder again for the next design or task execution when you open <b>ebay.com</b>.</p>
<p style="text-align: justify">For example, if the
<b>./user_data</b> folder is set and you log in at
<b>ebay.com</b> during the design process, then the previous login status will still be retained when you specify the
<b>./user_data</b> folder again for the next design or task execution when you open
<b>ebay.com</b>.</p>
<p style="text-align: justify">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.</p>
<p><textarea class="form-control" style="min-height: 50px;"
v-model="user_data_folder"></textarea>
@ -129,13 +144,16 @@ For individual users, EasySpider is a completely free and ad-free open-source so
</div>
<p><a @click="startDesign('en', true)"
class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design</a></p>
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design</a>
</p>
<p>
<p><a @click="startDesign('en', true, true)"
class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design (Mobile)</a></p>
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">Start Design (Mobile)</a>
</p>
<p>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 302px;height:45px;padding-top:5px">Go to Home Page</a>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"
style="margin-top: 10px; width: 302px;height:45px;padding-top:5px">Go to Home Page</a>
</p>
</div>
</div>
@ -143,7 +161,9 @@ For individual users, EasySpider is a completely free and ad-free open-source so
<div v-if="step == -1">
<h4 style="margin-top: 20px">版权声明和注意事项</h4>
<p>请接受下方使用协议以使用软件,不同意请退出。</p>
<textarea class="form-control" style="margin:0 auto;width:90%; color:black; height: 480px; min-height: 200px; background: white" readonly>
<textarea class="form-control"
style="margin:0 auto;width:90%; color:black; height: 480px; min-height: 200px; background: white"
readonly>
本软件仅供学习交流使用,严禁使用软件进行任何违法违规的操作,如爬取不允许爬取的政府/军事机关网站等。使用本软件所造成的一切后果由使用者自负与作者本人无关作者不会承担任何责任。同时软件受到专利权保护如要用于商业用途如使用软件进行盈利接单用于公司业务或出售采集到的数据等请邮件联系作者naibowang@foxmail.com进行专利授权等付费操作https://www.patentguru.com/cn/search?q=一种自定义提取流程的服务封装系统
对于个人使用者来说易采集EasySpider是一款完全免费无广告的开源软件软件开发和维护全靠作者用爱发电因此您可以选择支持作者让作者有更多的热情和精力维护此软件或者您使用了此软件进行了盈利欢迎您通过下面的方式支持作者
@ -153,26 +173,31 @@ For individual users, EasySpider is a completely free and ad-free open-source so
3、PayPal账号naibowang或扫描软件包中带的二维码。
</textarea>
<p><a @click="acceptAgreement" class="btn btn-primary btn-lg"
style="margin-top: 30px; width: 300px;height:60px;padding-top:12px;color:white">同意并开始使用</a></p>
style="margin-top: 30px; width: 300px;height:60px;padding-top:12px;color:white">同意并开始使用</a>
</p>
</div>
<div v-if="step == 0">
<p style="margin-top: 20px">提示:点击下方按钮开始使用。</p>
<p><a @click="step = 1" class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">设计/修改任务</a></p>
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">设计/修改任务</a>
</p>
<p><a @click="startInvoke('zh')"
@click class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">查看/管理/执行任务</a>
</p>
<p>
<a href="https://www.easyspider.cn?lang=zh" target="_blank" style="text-align: center; font-size: 18px">点此访问官网查看文档/视频教程</a>
<a href="https://www.easyspider.cn?lang=zh" target="_blank"
style="text-align: center; font-size: 18px">点此访问官网查看文档/视频教程</a>
</p>
<div class="img-container">
<!-- <h5>出品方</h5>-->
<a href="https://www.zju.edu.cn" alt="浙江大学" target="_blank"><img src="img/zju.png"></a>
<a href="https://www.nus.edu.sg" alt= "新加坡国立大学" target="_blank"><img src="img/nuslogo.png"></a>
<a href="https://www.xidian.edu.cn" alt="西安电子科技大学" target="_blank"><img src="img/xidian.png"></a>
<a href="https://www.nus.edu.sg" alt="新加坡国立大学" target="_blank"><img
src="img/nuslogo.png"></a>
<a href="https://www.xidian.edu.cn" alt="西安电子科技大学" target="_blank"><img
src="img/xidian.png"></a>
</div>
</div>
<div v-else-if="step == 1">
@ -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">使用带用户信息浏览器设计</a>
</p>
<p>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 322px;height:45px;padding-top:5px">返回首页</a>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"
style="margin-top: 10px; width: 322px;height:45px;padding-top:5px">返回首页</a>
</p>
@ -216,9 +242,11 @@ For individual users, EasySpider is a completely free and ad-free open-source so
<p>
<p><a @click="startDesign('zh', true, true)"
class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 320px;height:60px;padding-top:12px;color:white">开始设计(手机模式)</a></p>
style="margin-top: 15px; width: 320px;height:60px;padding-top:12px;color:white">开始设计(手机模式)</a>
</p>
<p>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"style="margin-top: 10px; width: 322px;height:45px;padding-top:5px">返回首页</a>
<a @click="step = 0" class="btn btn-outline-primary btn-lg"
style="margin-top: 10px; width: 322px;height:45px;padding-top:5px">返回首页</a>
</p>
</div>

View File

@ -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;

View File

@ -31,12 +31,14 @@
.ID {
width: 10%;
}
.excel th, .excel td {
text-align: center;
font-size: 13px;
padding: 10px;
max-width: 200px !important;
}
.tip {
position: fixed;
width: 100%;
@ -59,27 +61,36 @@
提示任务执行ID对应配置文件已更新您可使用任务ID<span id="newID_ZH"></span>来执行加载了新配置的任务。
</div>
<div id="tipID_EN" class="alert alert-info alert-dismissible fade show tip">
Hint: The task execution ID corresponds to the configuration file has been updated, you can use the task ID <span id="newID_EN"></span> to execute the task with the new configuration.</div>
Hint: The task execution ID corresponds to the configuration file has been updated, you can use the task ID
<span id="newID_EN"></span> to execute the task with the new configuration.
</div>
</div>
</div>
<div class="row" style="margin-top: 40px;">
<div class="col-md-7" id="taskInfo" style="margin:0 auto" v-if="show">
<div id="tipCustom" class="alert alert-success alert-dismissible fade show" style="display: none; z-index: 1000">
{{tip | lang}}</div>
<div id="tipCustom" class="alert alert-success alert-dismissible fade show"
style="display: none; z-index: 1000">
{{tip | lang}}
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">{{"Task Execution Instruction~执行任务说明" | lang}}</h4>
<h4 class="modal-title"
id="myModalLabel">{{"Task Execution Instruction~执行任务说明" | lang}}</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<input onkeydown="inputDelete(event)" id="serviceId" type="hidden" name="serviceId" value="-1"></input>
<input onkeydown="inputDelete(event)" id="url" type="hidden" name="url" value="about:blank"></input>
<label><a href="https://github.com/NaiboWang/EasySpider/wiki/Argument-Instruction" target="_blank">{{`Click Here~点击这里` | lang}}</a> {{`Here to see argument instruction.~这里查看参数配置说明。` | lang}}</label>
<input onkeydown="inputDelete(event)" id="serviceId" type="hidden" name="serviceId"
value="-1"></input>
<input onkeydown="inputDelete(event)" id="url" type="hidden" name="url"
value="about:blank"></input>
<label><a href="https://github.com/NaiboWang/EasySpider/wiki/Argument-Instruction"
target="_blank">{{`Click Here~点击这里` | lang}}</a> {{`Here to see argument instruction.~这里查看参数配置说明。` | lang}}</label>
<label v-if="OS=='darwin'">{{`对于MacOS系统EasySpider提供了两个不同的执行程序分别为easyspider_executestage和easyspider_executestage_full前者执行时加载速度较快并提供了除OCR识别和数据去重以外的全部功能后者则提供了包括OCR识别和数据去重在内的全部功能但运行时加载速度较慢需要等待2-10分钟才能执行程序请根据自己的需求选择执行哪个程序。~For MacOS system, EasySpider provides two different execution programs, 'easyspider_executestage' and 'easyspider_executestage_full', the former loads faster when executing, and provides all functions except OCR recognition and data deduplication; the latter provides all functions including OCR recognition and data deduplication, but the loading speed is slower when running, and it takes 2-10 minutes to wait for the program to execute, please choose which program to execute according to your needs.` | lang}}</label>
<label>{{ `Please open a terminal (For Windows, please use PowerShell instead of CMD), go to EasySpider's folder, and then copy (Command/Ctrl + c) the following command to run the task (EasySpider can quit when executing command for ease of timed execution, and you can set --read_type to "remote" for remote execution):~请在EasySpider目录下打开命令行工具Terminal Windows请使用PowerShell而不是CMD然后复制Command/Ctrl + c和运行以下命令以执行任务执行命令时可以退出EasySpider以方便定时执行如需要远程调用则需要将--read_type设置为remote并设置远程地址` | lang }}</label>
<textarea class="form-control" style="height:150px">cd {{easyspider_location}}
@ -94,11 +105,13 @@
</div>
</div>
<div class="modal fade" id="excelModal" tabindex="-1" role="dialog" aria-labelledby="excelModalLabel" aria-hidden="true">
<div class="modal fade" id="excelModal" tabindex="-1" role="dialog" aria-labelledby="excelModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="excelModalLabel">{{"Read from Excel~从Excel文件读取输入参数" | lang}}</h4>
<h4 class="modal-title"
id="excelModalLabel">{{"Read from Excel~从Excel文件读取输入参数" | lang}}</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
@ -110,7 +123,9 @@
<label style="display: block; margin-top:10px;margin-bottom: 0">{{fileUploadStatus | lang}}</label>
</div>
<button @click="submitFile" class="btn btn-primary" style="min-width: 100px;margin-bottom:10px">{{"Upload~上传" | lang}}</button>
<button @click="submitFile" class="btn btn-primary"
style="min-width: 100px;margin-bottom:10px">{{"Upload~上传" | lang}}
</button>
<!-- </form>-->
</div>
@ -146,14 +161,16 @@
<table class="table table-bordered excel">
<thead>
<tr>
<th v-for="i in Math.min(3, task.inputParameters.length)" v-if="task.inputParameters.length>0">
<th v-for="i in Math.min(3, task.inputParameters.length)"
v-if="task.inputParameters.length>0">
{{task.inputParameters[i-1]["name"]}}
</th>
</tr>
</thead>
<tbody>
<tr>
<td v-for="i in Math.min(3, task.inputParameters.length)" v-if="task.inputParameters.length>0">
<td v-for="i in Math.min(3, task.inputParameters.length)"
v-if="task.inputParameters.length>0">
{{getLine(i,0)}}
</td>
<tr>
@ -171,8 +188,10 @@
<tr>
</tbody>
</table>
<label v-if='lang == "zh"' style="width: 95%">对于循环输入文字的参数loopText需要配置索引值的情况即输入文字操作用了相对循环内的索引值您可以在Excel文件中写同一个参数名写多列程序将自动合并。 例如,想要设置'loopText_1'参数值两行,分别为"A~B~C"和"D~E~F"则Excel文件可以这样设置</label>
<label v-else style="width: 95%"> For parameters that need to configure the index value of the loop text (loopText), that is, the input text operation uses the index value relative to the loop, you can write multiple columns with the same parameter name in the Excel file, and the program will automatically merge. For example, if you want to set the parameter value of 'loopText_1' to two rows, which are "A~B~C" and "D~E~F", the Excel file can be set like this:</label>
<label v-if='lang == "zh"'
style="width: 95%">对于循环输入文字的参数loopText需要配置索引值的情况即输入文字操作用了相对循环内的索引值您可以在Excel文件中写同一个参数名写多列程序将自动合并。 例如,想要设置'loopText_1'参数值两行,分别为"A~B~C"和"D~E~F"则Excel文件可以这样设置</label>
<label v-else
style="width: 95%"> For parameters that need to configure the index value of the loop text (loopText), that is, the input text operation uses the index value relative to the loop, you can write multiple columns with the same parameter name in the Excel file, and the program will automatically merge. For example, if you want to set the parameter value of 'loopText_1' to two rows, which are "A~B~C" and "D~E~F", the Excel file can be set like this:</label>
<table class="table table-bordered excel" style="text-align: center; font-size: 13px">
<thead>
<tr>
@ -204,7 +223,8 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb" style="padding-left:0;background-color: white">
<li @click="gotoHome" class="breadcrumb-item"><a href="#">{{"Home~首页" | lang}}</a></li>
<li @click="gotoInfo" aria-current="page" class="breadcrumb-item" style="color: black"><a href="#">{{"Task Information~任务信息" | lang}}</a></li>
<li @click="gotoInfo" aria-current="page" class="breadcrumb-item" style="color: black"><a
href="#">{{"Task Information~任务信息" | lang}}</a></li>
<li aria-current="page" class="breadcrumb-item active" style="color: black">{{"Task Execution~任务执行"
| lang}}
</li>
@ -215,10 +235,15 @@
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Task Description:~任务描述:" | lang}} {{task["desc"]}}</p>
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"API URL (POST):~API 调用网址POST" |
lang}} {{backEndAddressServiceWrapper}}/invokeTask?id={{task["id"]}}</p>
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"URL of how to invoke task by API via POST request (Postman or JavaScript): ~通过POST方式进行API调用的示例教程Postman或JS代码" | lang}}<a target="_blank" href="https://github.com/NaiboWang/EasySpider/wiki/API-Invoke-Example">https://github.com/NaiboWang/EasySpider/wiki/API-Invoke-Example</a></p>
<p><button class="btn btn-primary" @click="readFromExcel">{{"Read parameters from Excel file~从Excel文件读取输入参数"
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"URL of how to invoke task by API via POST request (Postman or JavaScript): ~通过POST方式进行API调用的示例教程Postman或JS代码" | lang}}<a
target="_blank"
href="https://github.com/NaiboWang/EasySpider/wiki/API-Invoke-Example">https://github.com/NaiboWang/EasySpider/wiki/API-Invoke-Example</a>
</p>
<p>
<button class="btn btn-primary" @click="readFromExcel">{{"Read parameters from Excel file~从Excel文件读取输入参数"
| lang}}
</button></p>
</button>
</p>
<p>{{"Please Input Parameters:~请输入参数值:" | lang}}</p>
<form id="form">
<table class="table table-bordered">
@ -237,7 +262,8 @@
<td style="text-align: center; max-width: 250px;white-space: initial">{{task.inputParameters[i-1]["name"]}}</td>
<td style="max-width: 100px; text-align: center">{{task.inputParameters[i-1]["type"]}}</td>
<td><textarea class="form-control"
style="min-height: 50px;min-width: 300px;" v-bind:name="task.inputParameters[i-1]['name']"
style="min-height: 50px;min-width: 300px;"
v-bind:name="task.inputParameters[i-1]['name']"
v-model="task.inputParameters[i-1]['value']"></textarea></td>
</tr>
</tbody>
@ -255,10 +281,12 @@
</div>
</form>
<label style="display: block">{{"Click the button below to execute the task. Long press the pause button (default: p) on the keyboard to pause the task. Manual intervention is possible during the task execution process, ~点击以下按钮执行任务任务执行过程中可以长按暂停键默认p键暂停任务的执行以便" | lang }}<b>{{"~人工干预," | lang}}</b>{{"such as manually input a password or captcha: ~如手动输入密码,验证码等。" | lang}}</label>
<button class="btn btn-primary" v-on:click="localExecuteInstant(false)">{{"Directly Run Locally (Clean Mode)~本地直接执行(纯净模式)" |
<button class="btn btn-primary"
v-on:click="localExecuteInstant(false)">{{"Directly Run Locally (Clean Mode)~本地直接执行(纯净模式)" |
lang}}
</button>
<button class="btn btn-primary" v-on:click="localExecuteInstant(true)">{{"Directly Run Locally (Data Mode)~本地直接执行(带用户信息模式)" |
<button class="btn btn-primary"
v-on:click="localExecuteInstant(true)">{{"Directly Run Locally (Data Mode)~本地直接执行(带用户信息模式)" |
lang}}
</button>
<!-- <button style="margin-left: 5px;" v-on:click="remoteExcuteInstant" class="btn btn-primary">Directly Run Remotely</button> -->
@ -267,16 +295,21 @@
</label>
<div style="margin-bottom: 10px;">
<label style="margin-top: 10px;">{{"Execution ID (EID), execution files are stored in 'execution_instances' folder, you can write EID by yourself and the set the filename other than 'current_time to append content to the existing file from the EID to achieve incremental collection:~执行ID执行文件存放在execution_instances文件夹内提前在下方写好执行ID且文件名不为current_time时可以追加文件内容以实现增量采集" | lang}}</label>
<input class="form-control" v-model="ID" :placeholder="LANG('如果已在此处写/生成了ID号则点击执行或获得ID按钮后任务ID将保持不变且原任务文件将会被新配置覆盖','If already have ID here, the task ID will remain unchanged and the original task file will be overwritten by the new configuration after click buttons')"></input>
<input class="form-control" v-model="ID"
:placeholder="LANG('如果已在此处写/生成了ID号则点击执行或获得ID按钮后任务ID将保持不变且原任务文件将会被新配置覆盖','If already have ID here, the task ID will remain unchanged and the original task file will be overwritten by the new configuration after click buttons')"></input>
<p></p>
<!-- <p>提示点击下方按钮获得任务ID然后根据此ID进行服务执行也可自己POST调用接口得到ID具体参照POST调用文档。</p> -->
<p>{{"Hint: Click the \"Get Execution ID\" button at the bottom to get the task ID, and click the \"Execute task by commandline\" button at the back to get the prompt command on how to run this task using the command line.~提示点击下方“获得任务执行ID”按钮得到任务ID点击后面的“使用命令行执行任务”按钮获得如何使用命令行运行任务的提示命令。" | lang}}</p>
<button class="btn btn-primary" href="javascript:void(0)" v-on:click="invokeTask">{{"Get Execution ID~获得任务执行ID" |
lang}}</button>
<button class="btn btn-primary" style="margin-left: 8px;" v-on:click="localExecute(false)">{{"Execute task by commandline (Clean Mode)~使用命令行执行任务(纯净模式)"
<button class="btn btn-primary" href="javascript:void(0)"
v-on:click="invokeTask">{{"Get Execution ID~获得任务执行ID" |
lang}}
</button>
<button class="btn btn-primary" style="margin-left: 8px;"
v-on:click="localExecute(false)">{{"Execute task by commandline (Clean Mode)~使用命令行执行任务(纯净模式)"
| lang}}
</button>
<button class="btn btn-primary" style="margin-left: 8px;" v-on:click="localExecute(true)">{{"Execute task by commandline (Data Mode)~使用命令行执行任务(带用户信息模式)"
<button class="btn btn-primary" style="margin-left: 8px;"
v-on:click="localExecute(true)">{{"Execute task by commandline (Data Mode)~使用命令行执行任务(带用户信息模式)"
| lang}}
</button>
<!-- <button v-on:click="remoteExcute" style="margin-left: 8px;" class="btn btn-primary">Run remotely</button></div> -->
@ -296,8 +329,8 @@
</style>
<script src="global.js"></script>
<script>
var sId = getUrlParam('id');
var app = new Vue({
let sId = getUrlParam('id');
let app = new Vue({
el: '#taskInfo',
data: {
task: {},

View File

@ -4,7 +4,8 @@
<head>
<script src="jquery-3.4.1.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="vue.js"></script>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css"></link>
@ -40,7 +41,9 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb" style="padding-left:0;background-color: white">
<li class="breadcrumb-item" @click="gotoHome"><a href="#">{{"Home~首页" | lang}}</a></li>
<li class="breadcrumb-item active" aria-current="page" style="color: black">{{"Task Information~任务信息" | lang}}</li>
<li class="breadcrumb-item active" aria-current="page"
style="color: black">{{"Task Information~任务信息" | lang}}
</li>
</ol>
</nav>
<h4 style="text-align: center;">{{"Task Information~任务信息" | lang}}</h4>
@ -50,8 +53,10 @@
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Create Time:~创建时间:" | lang}} {{dateFormat(task["create_time"])}}</p>
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Update Time:~更新时间:" | lang}} {{dateFormat(task["update_time"])}}</p>
<p>{{"Operations (Please close this window and select 'Design Task' button if you want to modify task with a browser)~操作(如要带浏览器修改任务流程请关闭此窗口并选择设计任务)" | lang}}</p>
<p><a style="margin-top: 5px" href="javascript:void(0)" v-on:click="modifyTask(task['id'],task['url'])" class="btn btn-primary">{{"Modify Task~修改任务" | lang}}</a>
<a style="margin-top: 5px" href="javascript:void(0)" v-on:click="invokeTask(task['id'],task['url'])" class="btn btn-primary">{{"Execute Task~执行任务" | lang}}</a></p>
<p><a style="margin-top: 5px" href="javascript:void(0)" v-on:click="modifyTask(task['id'],task['url'])"
class="btn btn-primary">{{"Modify Task~修改任务" | lang}}</a>
<a style="margin-top: 5px" href="javascript:void(0)" v-on:click="invokeTask(task['id'],task['url'])"
class="btn btn-primary">{{"Execute Task~执行任务" | lang}}</a></p>
<p>{{"Input Parameters~输入参数" | lang}}</p>
<table class="table table-bordered">
<tbody>
@ -98,7 +103,8 @@
<td style="text-align: center">{{task.outputParameters[i-1]["type"]}}</td>
<td>{{task.outputParameters[i-1]["exampleValue"]}}</td>
<td>{{task.outputParameters[i-1]["desc"]}}</td>
<td style="text-align: center">{{task.outputParameters[i-1]["recordASField"] == 1? "Yes~是": "No~否" | lang}}</td>
<td style="text-align: center">{{task.outputParameters[i-1]["recordASField"] == 1? "Yes~是": "No~否" | lang}}
</td>
</tr>
<tr v-if="task.outputParameters.length==0">
<td style="min-width: 50px;text-align: center">{{"Empty~无" | lang}}</td>
@ -162,5 +168,4 @@
app.$data.task = result;
app.$data.show = true;
});
</script>

View File

@ -4,7 +4,8 @@
<head>
<script src="jquery-3.4.1.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="vue.js"></script>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css"></link>
@ -17,12 +18,14 @@
text-align: left;
vertical-align: middle !important;
}
@media (max-width: 500px) {
.tasklist {
margin-left: 10% !important;
}
}
.search-header {
display: flex;
justify-content: flex-end; /* Right align the search box */
@ -42,13 +45,19 @@
<div class="row" style="margin-top: 40px;">
<div style="margin:0 auto; min-width: 70%;" id="taskList" class="tasklist">
<h4 style="text-align: center;">{{"Task List~任务列表" | lang}}</h4>
<h5 style="text-align: center;" v-if="mobile==1">{{"View this table by direction keys on keyboard~按键盘方向键浏览此表格" | lang}}</h5>
<p><a v-if="type==3" href="javascript:void(0)" v-on:click="newTask" class="btn btn-primary">{{"New Task~创建新任务" | lang}}</a></p>
<h5 style="text-align: center;"
v-if="mobile==1">{{"View this table by direction keys on keyboard~按键盘方向键浏览此表格" | lang}}</h5>
<p><a v-if="type==3" href="javascript:void(0)" v-on:click="newTask"
class="btn btn-primary">{{"New Task~创建新任务" | lang}}</a></p>
<div v-if="type != 3" style="margin-bottom: 20px">
<div style="margin-bottom: 5px">{{"提示下方的官方教程和答疑平台均在Github可能出现访问速度慢的问题请耐心等待。~" | lang}}</div>
<a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/wiki" target="_blank">{{"Software Documentation~软件使用说明文档" | lang}}</a>
<a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/issues?q=is%3Aissue" target="_blank">{{"Ask questions here~官方答疑平台" | lang}}</a>
<a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/issues/22" target="_blank">{{"See how to run task by schedule~定时执行任务教程" | lang}}</a>
<div style="margin-bottom: 5px">{{"提示下方的官方教程和答疑平台均在Github可能出现访问速度慢的问题请耐心等待。~" | lang}}
</div>
<a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/wiki"
target="_blank">{{"Software Documentation~软件使用说明文档" | lang}}</a>
<a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/issues?q=is%3Aissue"
target="_blank">{{"Ask questions here~官方答疑平台" | lang}}</a>
<a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/issues/22"
target="_blank">{{"See how to run task by schedule~定时执行任务教程" | lang}}</a>
<!-- <a class="btn btn-primary" href="https://github.com/NaiboWang/EasySpider/wiki/Run-multiple-tasks-in-parallel" target="_blank">{{"See how to run multiple tasks in parallel~同时执行多个任务教程" | lang}}</a>-->
</div>
<el-table
@ -106,9 +115,12 @@
<template slot-scope="scope">
<!-- Use flex container to justify content space-around -->
<div class="task-links">
<a href="javascript:void(0)" v-on:click="browseTask(scope.$index, scope.row)">{{ "View~任务信息" | lang }}</a>
<a href="javascript:void(0)" v-if="type==3" v-on:click="modifyTask(scope.$index, scope.row)">{{ "Modify~修改任务" | lang }}</a>
<a href="javascript:void(0)" v-on:dblclick="deleteTask(scope.$index, scope.row)">{{ "Delete (Double Click)~删除任务(双击)" | lang }}</a>
<a href="javascript:void(0)" v-on:click="browseTask(scope.$index, scope.row)">{{ "View~任务信息"
| lang }}</a>
<a href="javascript:void(0)" v-if="type==3" v-on:click="modifyTask(scope.$index, scope.row)">{{
"Modify~修改任务" | lang }}</a>
<a href="javascript:void(0)"
v-on:dblclick="deleteTask(scope.$index, scope.row)">{{ "Delete (Double Click)~删除任务(双击)" | lang }}</a>
</div>
</template>
</el-table-column>