qiushang 3 月之前
父节点
当前提交
c681f94451
共有 3 个文件被更改,包括 44 次插入9 次删除
  1. 3 3
      nsis/test.nsi
  2. 1 1
      package.json
  3. 40 5
      src/renderer/components/home.vue

+ 3 - 3
nsis/test.nsi

@@ -1,16 +1,16 @@
 # ====================== 自定义宏 产品信息==============================
 !define PRODUCT_MID        		    "JyW8sIXfYSbu"
-!define PRODUCT_VERSION        		"2.1.0.0"
+!define PRODUCT_VERSION        		"2.1.1.0"
 !define PRODUCT_NAME           		"星优文件检索大师"
 !define INSTALL_OUTPUT_NAME    		"XYFile_XY.exe" 
 !define EXE_NAME               		"XYFile.exe"
 !define PRODUCT_PATHNAME           	"XYFile"     #安装卸载项用到的KEY,注册表
 !define INSTALL_APPEND_PATH         "XYFile"     #安装路径追加的名称 
-!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYFile/lastest2.1.0.0.7z"
+!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYFile/lastest2.1.1.0.7z"
 !define PRODUCT_PUBLISHER      	    "苏州星优办公软件有限公司"
 !define PRODUCT_LEGAL          	    "苏州星优办公软件有限公司"
 !define STATISTICS_url              "https://www.xingyousoft.com/api/index/user_log"   # 统计网址
-!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYFile/uninstallWeb/?v=2.1.0.0"   # 接卸优惠网址
+!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYFile/uninstallWeb/?v=2.1.1.0"   # 接卸优惠网址
 
 # ====================== 自定义宏 安装信息==============================
 !define INSTALL_7Z_NAME 	   		"app.7z"

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "XYFile",
-  "version": "2.1.0.0",
+  "version": "2.1.1.0",
   "author": "苏州星优办公软件有限公司",
   "description": "An electron-vue project",
   "license": "rename",

+ 40 - 5
src/renderer/components/home.vue

@@ -290,6 +290,7 @@ export default {
 			
 			execlimit: 5,
 			xlsxLoading: false,
+			timeInt: '',
 			
 			suffixList: [
 				['txt', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf', 'csv'],
@@ -420,11 +421,18 @@ export default {
 			(async () => {
 				let startTime = new Date().getTime();
 				this.searchLoading = true;
+				clearInterval(this.timeInt);
+				this.timeInt = null;
+				this.timeInt = setInterval(() => {
+					let endTime = new Date().getTime();
+					this.times = endTime - startTime;
+				}, 1000);
 				setTimeout(() => {
 					this.searchLoading = false;
-				}, 5000)
+				}, 30000)
 				let findText = this.handleData.findText.split('\n');
 				let searchDir = this.searchDir.replace(/\\/g, '/');
+				searchDir = searchDir.replace(/[{}()\[\]]/g, '\\$&'); // 转义所有特殊字符
 				let ruleStr = [];
 				let subStr = '/';
 				if(this.subFolder){ // 是否匹配子文件夹内文件
@@ -557,10 +565,15 @@ export default {
 						});
 					});
 					this.searchLoading = false;
+					clearInterval(this.timeInt);
+					this.timeInt = null;
 					let endTime = new Date().getTime();
 					this.times = endTime - startTime;
 					// console.log('----查找结果----', files);
 				}catch(e){
+					this.searchLoading = false;
+					clearInterval(this.timeInt);
+					this.timeInt = null;
 					this.showError(e);
 				}
 				
@@ -576,11 +589,18 @@ export default {
 			(async () => {
 				let startTime = new Date().getTime();
 				this.searchLoading = true;
+				clearInterval(this.timeInt);
+				this.timeInt = null;
+				this.timeInt = setInterval(() => {
+					let endTime = new Date().getTime();
+					this.times = endTime - startTime;
+				}, 1000);
 				setTimeout(() => {
 					this.searchLoading = false;
-				}, 5000);
+				}, 30000);
 				
 				let searchDir = this.searchDir.replace(/\\/g, '/');
+				searchDir = searchDir.replace(/[{}()\[\]]/g, '\\$&'); // 转义所有特殊字符
 				let ruleStr = [];
 				let subStr = '/';
 				if(this.subFolder){ // 是否匹配子文件夹内文件
@@ -635,10 +655,15 @@ export default {
 					}
 					
 					this.searchLoading = false;
+					clearInterval(this.timeInt);
+					this.timeInt = null;
 					let endTime = new Date().getTime();
 					this.times = endTime - startTime;
 					// console.log('----查找结果----', files);
 				}catch(e){
+					this.searchLoading = false;
+					clearInterval(this.timeInt);
+					this.timeInt = null;
 					this.showError(e);
 				}
 				
@@ -654,12 +679,17 @@ export default {
 			(async () => {
 				let startTime = new Date().getTime();
 				this.searchLoading = true;
+				clearInterval(this.timeInt);
+				this.timeInt = null;
+				this.timeInt = setInterval(() => {
+					let endTime = new Date().getTime();
+					this.times = endTime - startTime;
+				}, 1000);
 				setTimeout(() => {
 					this.searchLoading = false;
-				}, 5000)
+				}, 30000)
 				let searchDir = this.searchDir.replace(/\\/g, '/');
-				
-				
+				searchDir = searchDir.replace(/[{}()\[\]]/g, '\\$&'); // 转义所有特殊字符
 				let ruleStr = [];
 				let subStr = '/';
 				if(this.subFolder){ // 是否匹配子文件夹内文件
@@ -703,10 +733,15 @@ export default {
 						});
 					});
 					this.searchLoading = false;
+					clearInterval(this.timeInt);
+					this.timeInt = null;
 					let endTime = new Date().getTime();
 					this.times = endTime - startTime;
 					// console.log('----查找结果----', files);
 				}catch(e){
+					this.searchLoading = false;
+					clearInterval(this.timeInt);
+					this.timeInt = null;
 					this.showError(e);
 				}