From a52e409f191cb4889c997d3fd7ee1dc0fe5b32c1 Mon Sep 17 00:00:00 2001 From: witersen <1801168257@qq.com> Date: Sun, 1 May 2022 15:05:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84UI=E3=80=81=E4=B8=BA=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=A2=9E=E5=8A=A0loading=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01.web/src/views/advance/index.vue | 4 + 01.web/src/views/index/index.vue | 7 +- 01.web/src/views/layout/basicLayout/index.vue | 3 +- 01.web/src/views/login/index.vue | 4 +- 01.web/src/views/personal/index.vue | 4 + 01.web/src/views/repositoryGroup/index.vue | 50 ++++++- 01.web/src/views/repositoryInfo/index.vue | 136 ++++++++++++++---- 01.web/src/views/repositoryUser/index.vue | 47 +++++- 01.web/src/views/systemLog/index.vue | 10 +- 02.php/api.php | 2 +- 02.php/app/controller/subversion.class.php | 9 +- 11 files changed, 240 insertions(+), 36 deletions(-) diff --git a/01.web/src/views/advance/index.vue b/01.web/src/views/advance/index.vue index 31e284b..3c369b3 100644 --- a/01.web/src/views/advance/index.vue +++ b/01.web/src/views/advance/index.vue @@ -416,6 +416,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -436,6 +437,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -472,6 +474,7 @@ export default { .catch(function (error) { that.loadingSvnserveStart = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, }); @@ -502,6 +505,7 @@ export default { .catch(function (error) { that.loadingSvnserveStop = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, }); diff --git a/01.web/src/views/index/index.vue b/01.web/src/views/index/index.vue index 545a8ed..dc0776a 100644 --- a/01.web/src/views/index/index.vue +++ b/01.web/src/views/index/index.vue @@ -7,7 +7,7 @@

- +
负载状态
分组名只能包含字母、数字、破折号、下划线、点。 + + + +
+ +
分组名只能包含字母、数字、破折号、下划线、点。 + + + +
+ +
@@ -149,7 +175,7 @@
-
@@ -189,6 +215,10 @@ export default { loadingRepAllUser: true, //分组分组成员 loadingRepAllGroup: true, + //创建分组 + loadingCreateGroup: false, + //编辑分组名称 + loadingEditGroupName: false, /** * 临时变量 @@ -366,6 +396,7 @@ export default { .catch(function (error) { that.loadingGroup = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -389,6 +420,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -399,22 +431,27 @@ export default { }, CreateGroup() { var that = this; + that.loadingCreateGroup = true; var data = { svn_group_name: that.formCreateGroup.svn_group_name, }; that.$axios .post("/api.php?c=svngroup&a=CreateGroup&t=web", data) .then(function (response) { + that.loadingCreateGroup = false; var result = response.data; if (result.status == 1) { that.$Message.success(result.message); + that.modalAddGroup = false; that.GetGroupList(); } else { that.$Message.error(result.message); } }) .catch(function (error) { + that.loadingCreateGroup = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -432,6 +469,7 @@ export default { }, EditGroupName() { var that = this; + that.loadingEditGroupName = true; var data = { groupNameOld: that.formEditGroupName.groupNameOld, groupNameNew: that.formEditGroupName.groupNameNew, @@ -439,16 +477,20 @@ export default { that.$axios .post("/api.php?c=svngroup&a=EditGroupName&t=web", data) .then(function (response) { + that.loadingEditGroupName = false; var result = response.data; if (result.status == 1) { that.$Message.success(result.message); + that.modalEditGroupName = false; that.GetGroupList(); } else { that.$Message.error(result.message); } }) .catch(function (error) { + that.loadingEditGroupName = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -476,6 +518,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, }); @@ -522,6 +565,7 @@ export default { that.loadingRepAllUser = false; that.loadingRepAllGroup = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -567,6 +611,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -592,6 +637,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -617,6 +663,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -642,6 +689,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, }, diff --git a/01.web/src/views/repositoryInfo/index.vue b/01.web/src/views/repositoryInfo/index.vue index 988ea10..054d15c 100644 --- a/01.web/src/views/repositoryInfo/index.vue +++ b/01.web/src/views/repositoryInfo/index.vue @@ -147,7 +147,7 @@ - +
@@ -172,7 +172,17 @@ + + +
+
+ +
@@ -223,7 +233,7 @@
- +
@@ -233,10 +243,9 @@ 备份(dump)
@@ -261,7 +270,7 @@
- +
@@ -300,6 +309,7 @@ @@ -321,11 +331,6 @@ - - - @@ -348,6 +353,7 @@ @@ -368,11 +374,6 @@ - - - @@ -380,7 +381,7 @@
- +
@@ -436,9 +437,10 @@ - -
- + + 可以将通过svnadmin dump方式生成的备份文件导入到当前仓库 + + 不了解svnadmin - dump指令的用户建议只将转储文件导入到空仓库而不是已经包含修订版本的非空仓库 +
- + + + + +
+ +
- +
@@ -103,7 +103,20 @@ v-model="formCreateUser.svn_user_pass" > + + + +
+ +
+ + + +
+ +
@@ -147,6 +173,10 @@ export default { */ //用户列表 loadingUser: true, + //创建用户 + loadingCreateUser: false, + //修改用户密码 + loadingEditUserPass:false, /** * 对话框 @@ -277,6 +307,7 @@ export default { .catch(function (error) { that.loadingUser = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -309,6 +340,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -332,6 +364,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -355,6 +388,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -375,6 +409,7 @@ export default { }, CreateUser() { var that = this; + that.loadingCreateUser = true; var data = { svn_user_name: that.formCreateUser.svn_user_name, svn_user_pass: that.formCreateUser.svn_user_pass, @@ -382,16 +417,20 @@ export default { that.$axios .post("/api.php?c=svnuser&a=CreateUser&t=web", data) .then(function (response) { + that.loadingCreateUser = false; var result = response.data; if (result.status == 1) { that.$Message.success(result.message); + that.modalCreateUser = false; that.GetUserList(); } else { that.$Message.error(result.message); } }) .catch(function (error) { + that.loadingCreateUser = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -411,6 +450,7 @@ export default { }, EditUserPass() { var that = this; + that.loadingEditUserPass = true; var data = { svn_user_name: that.formEditUser.svn_user_name, svn_user_pass: that.formEditUser.svn_user_pass, @@ -420,8 +460,10 @@ export default { that.$axios .post("/api.php?c=svnuser&a=EditUserPass&t=web", data) .then(function (response) { + that.loadingEditUserPass = false; var result = response.data; if (result.status == 1) { + that.modalEditUserPass = false; that.$Message.success(result.message); that.GetUserList(); } else { @@ -429,7 +471,9 @@ export default { } }) .catch(function (error) { + that.loadingEditUserPass = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -459,6 +503,7 @@ export default { }) .catch(function (error) { console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, }); diff --git a/01.web/src/views/systemLog/index.vue b/01.web/src/views/systemLog/index.vue index 95f60b2..54445a2 100644 --- a/01.web/src/views/systemLog/index.vue +++ b/01.web/src/views/systemLog/index.vue @@ -14,6 +14,7 @@ icon="ios-trash-outline" type="warning" ghost + :loading="loadingClearLogs" @click="ClearLogs" >清空日志 @@ -80,6 +81,8 @@ export default { * 加载 */ loadingGetLogList: true, + //清空日志 + loadingClearLogs: false, /** * 表格 @@ -153,7 +156,7 @@ export default { var that = this; that.loadingGetLogList = true; that.tableDataLog = []; - that.totalLog = 0; + // that.totalLog = 0; var data = { pageSize: that.pageSizeLog, currentPage: that.pageCurrentLog, @@ -175,6 +178,7 @@ export default { .catch(function (error) { that.loadingGetLogList = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, /** @@ -186,10 +190,12 @@ export default { title: "清空日志", content: "确定要清空日志记录吗?此操作不可逆!", onOk: () => { + that.loadingClearLogs = true; var data = {}; that.$axios .post("/api.php?c=logs&a=ClearLogs&t=web", data) .then(function (response) { + that.loadingClearLogs = false; var result = response.data; if (result.status == 1) { that.$Message.success(result.message); @@ -199,7 +205,9 @@ export default { } }) .catch(function (error) { + that.loadingClearLogs = false; console.log(error); + that.$Message.error("出错了 请联系管理员!"); }); }, }); diff --git a/02.php/api.php b/02.php/api.php index 3c7faf6..184a6ee 100644 --- a/02.php/api.php +++ b/02.php/api.php @@ -3,7 +3,7 @@ * @Author: witersen * @Date: 2022-04-24 23:37:06 * @LastEditors: witersen - * @LastEditTime: 2022-04-28 02:01:51 + * @LastEditTime: 2022-05-01 14:25:05 * @Description: QQ:1801168257 */ diff --git a/02.php/app/controller/subversion.class.php b/02.php/app/controller/subversion.class.php index f47507d..c195956 100644 --- a/02.php/app/controller/subversion.class.php +++ b/02.php/app/controller/subversion.class.php @@ -3,7 +3,7 @@ * @Author: witersen * @Date: 2022-04-24 23:37:05 * @LastEditors: witersen - * @LastEditTime: 2022-04-30 19:24:09 + * @LastEditTime: 2022-05-01 02:25:57 * @Description: QQ:1801168257 */ @@ -145,6 +145,13 @@ class subversion extends controller */ function EditPort() { + //获取现在的端口于与要修改的端口对比检查是否相同 + $result = $this->SVNAdminInfo->GetSubversionListen(SVNSERVE_ENV_FILE, LISTEN_FILE); + + //停止svnserve + FunShellExec("systemctl stop svnserve"); + + //更换端口 } /**