Browse Source

修改权限修改的UI、为所有操作增加loading动画

docker-svn
witersen 3 years ago
parent
commit
a52e409f19
  1. 4
      01.web/src/views/advance/index.vue
  2. 7
      01.web/src/views/index/index.vue
  3. 3
      01.web/src/views/layout/basicLayout/index.vue
  4. 4
      01.web/src/views/login/index.vue
  5. 4
      01.web/src/views/personal/index.vue
  6. 50
      01.web/src/views/repositoryGroup/index.vue
  7. 136
      01.web/src/views/repositoryInfo/index.vue
  8. 47
      01.web/src/views/repositoryUser/index.vue
  9. 10
      01.web/src/views/systemLog/index.vue
  10. 2
      02.php/api.php
  11. 9
      02.php/app/controller/subversion.class.php

4
01.web/src/views/advance/index.vue

@ -416,6 +416,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -436,6 +437,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -472,6 +474,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingSvnserveStart = false; that.loadingSvnserveStart = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });
@ -502,6 +505,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingSvnserveStop = false; that.loadingSvnserveStop = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });

7
01.web/src/views/index/index.vue

@ -7,7 +7,7 @@
</p> </p>
<div> <div>
<Row> <Row>
<Col span="4" > <Col span="4">
<div class="statusTop">负载状态</div> <div class="statusTop">负载状态</div>
<Tooltip placement="bottom" max-width="200"> <Tooltip placement="bottom" max-width="200">
<Circle <Circle
@ -207,7 +207,7 @@ export default {
repUser: 0, repUser: 0,
repGroup: 0, repGroup: 0,
logCount: 0, logCount: 0,
backupSize:0, backupSize: 0,
}, },
}; };
}, },
@ -247,6 +247,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -268,6 +269,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -289,6 +291,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}, },

3
01.web/src/views/layout/basicLayout/index.vue

@ -27,7 +27,7 @@
style="line-height: 64px; position: absolute; top: 12px; left: 1%" style="line-height: 64px; position: absolute; top: 12px; left: 1%"
/> />
<Dropdown <Dropdown
:transfer="true" :transfer="true"
trigger="click" trigger="click"
@on-click="LogOut" @on-click="LogOut"
style="float: right; zindex: 99" style="float: right; zindex: 99"
@ -156,6 +156,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
// 退 // 退

4
01.web/src/views/login/index.vue

@ -117,7 +117,7 @@ export default {
computed: {}, computed: {},
created() {}, created() {},
mounted() { mounted() {
var that =this; var that = this;
if (sessionStorage.token) { if (sessionStorage.token) {
that.$Message.success("已有登录信息 自动跳转中..."); that.$Message.success("已有登录信息 自动跳转中...");
setTimeout(function () { setTimeout(function () {
@ -165,6 +165,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
// //
@ -210,6 +211,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingLogin = false; that.loadingLogin = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}, },

4
01.web/src/views/personal/index.vue

@ -179,6 +179,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.modalEditAdminUserName = false; that.modalEditAdminUserName = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -208,6 +209,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.modalEditAdminUserPass = false; that.modalEditAdminUserPass = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -237,6 +239,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingEditSvnUserPass = false; that.loadingEditSvnUserPass = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -263,6 +266,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}, },

50
01.web/src/views/repositoryGroup/index.vue

@ -83,7 +83,20 @@
>分组名只能包含字母数字破折号下划线</Alert >分组名只能包含字母数字破折号下划线</Alert
> >
</FormItem> </FormItem>
<FormItem>
<Button
type="primary"
@click="CreateGroup"
:loading="loadingCreateGroup"
>确定</Button
>
</FormItem>
</Form> </Form>
<div slot="footer">
<Button type="primary" ghost @click="modalAddGroup = false"
>取消</Button
>
</div>
</Modal> </Modal>
<Modal <Modal
v-model="modalEditGroupName" v-model="modalEditGroupName"
@ -99,7 +112,20 @@
>分组名只能包含字母数字破折号下划线</Alert >分组名只能包含字母数字破折号下划线</Alert
> >
</FormItem> </FormItem>
<FormItem>
<Button
type="primary"
@click="EditGroupName"
:loading="loadingEditGroupName"
>确定</Button
>
</FormItem>
</Form> </Form>
<div slot="footer">
<Button type="primary" ghost @click="modalEditGroupName = false"
>取消</Button
>
</div>
</Modal> </Modal>
<Modal v-model="modalGetGroupMember" :title="titleGetGroupMember"> <Modal v-model="modalGetGroupMember" :title="titleGetGroupMember">
<Tabs type="card"> <Tabs type="card">
@ -149,7 +175,7 @@
</TabPane> </TabPane>
</Tabs> </Tabs>
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="modalGetGroupMember = false" <Button type="primary" ghost @click="modalGetGroupMember = false"
>取消</Button >取消</Button
> >
</div> </div>
@ -189,6 +215,10 @@ export default {
loadingRepAllUser: true, loadingRepAllUser: true,
// //
loadingRepAllGroup: true, loadingRepAllGroup: true,
//
loadingCreateGroup: false,
//
loadingEditGroupName: false,
/** /**
* 临时变量 * 临时变量
@ -366,6 +396,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingGroup = false; that.loadingGroup = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -389,6 +420,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -399,22 +431,27 @@ export default {
}, },
CreateGroup() { CreateGroup() {
var that = this; var that = this;
that.loadingCreateGroup = true;
var data = { var data = {
svn_group_name: that.formCreateGroup.svn_group_name, svn_group_name: that.formCreateGroup.svn_group_name,
}; };
that.$axios that.$axios
.post("/api.php?c=svngroup&a=CreateGroup&t=web", data) .post("/api.php?c=svngroup&a=CreateGroup&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingCreateGroup = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
that.modalAddGroup = false;
that.GetGroupList(); that.GetGroupList();
} else { } else {
that.$Message.error(result.message); that.$Message.error(result.message);
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingCreateGroup = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -432,6 +469,7 @@ export default {
}, },
EditGroupName() { EditGroupName() {
var that = this; var that = this;
that.loadingEditGroupName = true;
var data = { var data = {
groupNameOld: that.formEditGroupName.groupNameOld, groupNameOld: that.formEditGroupName.groupNameOld,
groupNameNew: that.formEditGroupName.groupNameNew, groupNameNew: that.formEditGroupName.groupNameNew,
@ -439,16 +477,20 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svngroup&a=EditGroupName&t=web", data) .post("/api.php?c=svngroup&a=EditGroupName&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingEditGroupName = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
that.modalEditGroupName = false;
that.GetGroupList(); that.GetGroupList();
} else { } else {
that.$Message.error(result.message); that.$Message.error(result.message);
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingEditGroupName = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -476,6 +518,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });
@ -522,6 +565,7 @@ export default {
that.loadingRepAllUser = false; that.loadingRepAllUser = false;
that.loadingRepAllGroup = false; that.loadingRepAllGroup = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -567,6 +611,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -592,6 +637,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -617,6 +663,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -642,6 +689,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}, },

136
01.web/src/views/repositoryInfo/index.vue

@ -147,7 +147,7 @@
</Card> </Card>
</Card> </Card>
<!-- 对话框-新建SVN仓库 --> <!-- 对话框-新建SVN仓库 -->
<Modal v-model="modalCreateRep" title="新建SVN仓库" @on-ok="CreateRep"> <Modal v-model="modalCreateRep" title="新建SVN仓库">
<Form :model="formRepAdd" :label-width="80"> <Form :model="formRepAdd" :label-width="80">
<FormItem label="仓库名称"> <FormItem label="仓库名称">
<Input v-model="formRepAdd.rep_name"></Input> <Input v-model="formRepAdd.rep_name"></Input>
@ -172,7 +172,17 @@
</Radio> </Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem>
<Button type="primary" @click="CreateRep" :loading="loadingCreateRep"
>确定</Button
>
</FormItem>
</Form> </Form>
<div slot="footer">
<Button type="primary" ghost @click="modalCreateRep = false"
>取消</Button
>
</div>
</Modal> </Modal>
<!-- 对话框-仓库浏览 --> <!-- 对话框-仓库浏览 -->
<Modal v-model="modalViewRep" fullscreen :title="titleModalViewRep"> <Modal v-model="modalViewRep" fullscreen :title="titleModalViewRep">
@ -223,7 +233,7 @@
</Table> </Table>
</Card> </Card>
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="modalViewRep = false">取消</Button> <Button type="primary" ghost @click="modalViewRep = false">取消</Button>
</div> </div>
</Modal> </Modal>
<!-- 对话框-备份仓库 --> <!-- 对话框-备份仓库 -->
@ -233,10 +243,9 @@
<Button <Button
type="primary" type="primary"
ghost ghost
size="small"
@click="RepDump" @click="RepDump"
:loading="loadingRepDump" :loading="loadingRepDump"
>备份(svndump)</Button >备份(dump)</Button
> >
</Col> </Col>
</Row> </Row>
@ -261,7 +270,7 @@
</template> </template>
</Table> </Table>
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="modalRepDump = false">取消</Button> <Button type="primary" ghost @click="modalRepDump = false">取消</Button>
</div> </div>
</Modal> </Modal>
<!-- 对话框-仓库权限 --> <!-- 对话框-仓库权限 -->
@ -300,6 +309,7 @@
<Button icon="ios-add" @click="ModalRepAllUser"></Button> <Button icon="ios-add" @click="ModalRepAllUser"></Button>
<Button <Button
icon="ios-remove" icon="ios-remove"
:loading="loadingDelRepPathUserPri"
@click="DelRepPathUserPri" @click="DelRepPathUserPri"
></Button> ></Button>
</ButtonGroup> </ButtonGroup>
@ -321,11 +331,6 @@
</Radio> </Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem>
<Button ghost type="primary" @click="EditRepPathUserPri"
>修改权限针对当前</Button
>
</FormItem>
</Form> </Form>
</TabPane> </TabPane>
<TabPane label="分组"> <TabPane label="分组">
@ -348,6 +353,7 @@
<Button <Button
icon="ios-remove" icon="ios-remove"
@click="DelRepPathGroupPri" @click="DelRepPathGroupPri"
:loading="loadingDelRepPathGroupPri"
></Button> ></Button>
</ButtonGroup> </ButtonGroup>
</FormItem> </FormItem>
@ -368,11 +374,6 @@
</Radio> </Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem>
<Button ghost type="primary" @click="EditRepPathGroupPri"
>修改权限针对当前</Button
>
</FormItem>
</Form> </Form>
</TabPane> </TabPane>
</Tabs> </Tabs>
@ -380,7 +381,7 @@
</Col> </Col>
</Row> </Row>
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="modalRepPri = false">取消</Button> <Button type="primary" ghost @click="modalRepPri = false">取消</Button>
</div> </div>
</Modal> </Modal>
<!-- 对话框-钩子配置 --> <!-- 对话框-钩子配置 -->
@ -436,9 +437,10 @@
</template> </template>
</Table> </Table>
</TabPane> </TabPane>
<TabPane label="转储"> <TabPane label="恢复">
<Form :model="formRepImport" :label-width="90"> <Alert>可以将通过svnadmin dump方式生成的备份文件导入到当前仓库</Alert>
<FormItem label="dump文件"> <Form :model="formRepImport" :label-width="100">
<FormItem label="备份文件位置">
<RadioGroup <RadioGroup
vertical vertical
@on-change="ChangeRadioUploadType" @on-change="ChangeRadioUploadType"
@ -504,7 +506,7 @@
<FormItem v-if="formUploadBackup.selectType == '2'"> <FormItem v-if="formUploadBackup.selectType == '2'">
<Alert type="warning" show-icon <Alert type="warning" show-icon
>不了解svnadmin >不了解svnadmin
dump指令的用户建议只将转储文件导入到空仓库而不是已经包含修订版本的非空仓库</Alert dump指令的用户建议将备份文件只导入到空仓库而不是已经包含修订版本的非空仓库</Alert
> >
<Button <Button
type="primary" type="primary"
@ -518,29 +520,42 @@
</TabPane> </TabPane>
</Tabs> </Tabs>
<div slot="footer"> <div slot="footer">
<Button type="primary" @click="modalRepAdvance = false">取消</Button> <Button type="primary" ghost @click="modalRepAdvance = false"
>取消</Button
>
</div> </div>
</Modal> </Modal>
<!-- 对话框-编辑仓库名称 --> <!-- 对话框-编辑仓库名称 -->
<Modal <Modal v-model="modalEditRepName" :title="titleModalEditRepName">
v-model="modalEditRepName"
:title="titleModalEditRepName"
@on-ok="EditRepName"
>
<Form :model="formRepEdit" :label-width="80"> <Form :model="formRepEdit" :label-width="80">
<FormItem label="仓库名称"> <FormItem label="仓库名称">
<Input v-model="formRepEdit.new_rep_name"></Input> <Input v-model="formRepEdit.new_rep_name"></Input>
</FormItem> </FormItem>
<FormItem>
<Button
type="primary"
:loading="loadingEditRepName"
@click="EditRepName"
>确定</Button
>
</FormItem>
</Form> </Form>
<div slot="footer">
<Button type="primary" ghost @click="modalEditRepName = false"
>取消</Button
>
</div>
</Modal> </Modal>
<!-- 对话框-选择SVN用户 --> <!-- 对话框-选择SVN用户 -->
<Modal <Modal
v-model="modalRepAllUser" v-model="modalRepAllUser"
title="选择SVN用户(添加的用户权限都会被重置为rw)" title="选择SVN用户(添加的用户权限都会被重置为rw)"
@on-ok="AddRepPathUserPri" @on-ok="AddRepPathUserPri"
:loading="loadingAddRepPathUserPri"
> >
<Table <Table
height="350" :height="350"
size="small"
highlight-row highlight-row
:show-header="false" :show-header="false"
:columns="tableColumnAllUser" :columns="tableColumnAllUser"
@ -559,6 +574,7 @@
v-model="modalRepAllGroup" v-model="modalRepAllGroup"
title="选择SVN分组(添加的用户权限都会被重置为rw)" title="选择SVN分组(添加的用户权限都会被重置为rw)"
@on-ok="AddRepPathGroupPri" @on-ok="AddRepPathGroupPri"
:loading="loadingAddRepPathGroupPri"
> >
<Table <Table
height="350" height="350"
@ -641,6 +657,8 @@ export default {
*/ */
// //
loadingRep: true, loadingRep: true,
//
loadingCreateRep: false,
// //
loadingUserRep: true, loadingUserRep: true,
// //
@ -649,8 +667,16 @@ export default {
loadingRepTree: true, loadingRepTree: true,
// //
loadingRepPathUserPri: true, loadingRepPathUserPri: true,
//
loadingAddRepPathUserPri: true,
//
loadingDelRepPathUserPri: false,
// //
loadingRepPathGroupPri: true, loadingRepPathGroupPri: true,
//
loadingAddRepPathGroupPri: true,
//
loadingDelRepPathGroupPri: false,
//SVN //SVN
loadingAllUserList: true, loadingAllUserList: true,
//SVN //SVN
@ -665,6 +691,8 @@ export default {
loadingUploadBackup: false, loadingUploadBackup: false,
// //
loadingImportBackup: false, loadingImportBackup: false,
//
loadingEditRepName: false,
/** /**
* 临时变量 * 临时变量
@ -940,6 +968,7 @@ export default {
{ {
title: "文件名", title: "文件名",
key: "fileName", key: "fileName",
tooltip: true,
}, },
{ {
title: "文件大小", title: "文件大小",
@ -957,6 +986,7 @@ export default {
{ {
title: "文件名", title: "文件名",
key: "fileName", key: "fileName",
tooltip: true,
}, },
{ {
title: "大小", title: "大小",
@ -1069,6 +1099,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
@ -1080,6 +1111,7 @@ export default {
}, },
CreateRep() { CreateRep() {
var that = this; var that = this;
that.loadingCreateRep = true;
var data = { var data = {
rep_name: that.formRepAdd.rep_name, rep_name: that.formRepAdd.rep_name,
rep_note: that.formRepAdd.rep_note, rep_note: that.formRepAdd.rep_note,
@ -1088,6 +1120,7 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnrep&a=CreateRep&t=web", data) .post("/api.php?c=svnrep&a=CreateRep&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingCreateRep = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
@ -1097,7 +1130,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingCreateRep = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
@ -1139,6 +1174,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRep = false; that.loadingRep = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1198,6 +1234,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingUserRep = false; that.loadingUserRep = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1248,6 +1285,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
@ -1334,6 +1372,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
reject(error); reject(error);
}); });
}); });
@ -1370,6 +1409,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepCon = false; that.loadingRepCon = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1404,6 +1444,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepCon = false; that.loadingRepCon = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1480,6 +1521,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepBackupList = false; that.loadingRepBackupList = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
RepDump() { RepDump() {
@ -1503,6 +1545,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepDump = false; that.loadingRepDump = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1535,6 +1578,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1562,6 +1606,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });
@ -1616,6 +1661,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
reject(error); reject(error);
}); });
}); });
@ -1712,6 +1758,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepPathUserPri = false; that.loadingRepPathUserPri = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1734,6 +1781,9 @@ export default {
} else { } else {
this.tableDataRepPathUserPri[this.currentRepPriUserIndex].userPri = this.tableDataRepPathUserPri[this.currentRepPriUserIndex].userPri =
value; value;
//
this.EditRepPathUserPri();
} }
}, },
/** /**
@ -1746,6 +1796,7 @@ export default {
that.$Message.error("未选择用户"); that.$Message.error("未选择用户");
return; return;
} }
that.loadingDelRepPathUserPri = true;
var data = { var data = {
rep_name: that.currentRepName, rep_name: that.currentRepName,
path: that.currentRepTreePriPath, path: that.currentRepTreePriPath,
@ -1754,6 +1805,7 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnrep&a=DelRepPathUserPri&t=web", data) .post("/api.php?c=svnrep&a=DelRepPathUserPri&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingDelRepPathUserPri = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
@ -1763,7 +1815,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingDelRepPathUserPri = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1796,6 +1850,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1812,6 +1867,7 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnrep&a=AddRepPathUserPri&t=web", data) .post("/api.php?c=svnrep&a=AddRepPathUserPri&t=web", data)
.then(function (response) { .then(function (response) {
that.modalRepAllUser = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
@ -1821,7 +1877,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.modalRepAllUser = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1856,6 +1914,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingAllUserList = false; that.loadingAllUserList = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1895,6 +1954,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepPathGroupPri = false; that.loadingRepPathGroupPri = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1921,6 +1981,9 @@ export default {
} else { } else {
this.tableDataRepPathGroupPri[this.currentRepPriGroupIndex].groupPri = this.tableDataRepPathGroupPri[this.currentRepPriGroupIndex].groupPri =
value; value;
//
this.EditRepPathGroupPri();
} }
}, },
/** /**
@ -1933,6 +1996,7 @@ export default {
that.$Message.error("未选择分组"); that.$Message.error("未选择分组");
return; return;
} }
that.loadingDelRepPathGroupPri = true;
var data = { var data = {
rep_name: that.currentRepName, rep_name: that.currentRepName,
path: that.currentRepTreePriPath, path: that.currentRepTreePriPath,
@ -1941,6 +2005,7 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnrep&a=DelRepPathGroupPri&t=web", data) .post("/api.php?c=svnrep&a=DelRepPathGroupPri&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingDelRepPathGroupPri = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
@ -1950,7 +2015,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingDelRepPathGroupPri = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -1984,6 +2051,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -2000,6 +2068,7 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnrep&a=AddRepPathGroupPri&t=web", data) .post("/api.php?c=svnrep&a=AddRepPathGroupPri&t=web", data)
.then(function (response) { .then(function (response) {
that.modalRepAllGroup = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
@ -2009,7 +2078,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.modalRepAllGroup = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -2044,6 +2115,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingAllGroupList = false; that.loadingAllGroupList = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -2086,6 +2158,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -2111,6 +2184,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
@ -2154,6 +2228,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingRepDetail = false; that.loadingRepDetail = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -2232,6 +2307,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingImportBackup = false; that.loadingImportBackup = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
@ -2250,6 +2326,7 @@ export default {
}, },
EditRepName() { EditRepName() {
var that = this; var that = this;
that.loadingEditRepName = true;
var data = { var data = {
old_rep_name: that.formRepEdit.old_rep_name, old_rep_name: that.formRepEdit.old_rep_name,
new_rep_name: that.formRepEdit.new_rep_name, new_rep_name: that.formRepEdit.new_rep_name,
@ -2257,16 +2334,20 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnrep&a=EditRepName&t=web", data) .post("/api.php?c=svnrep&a=EditRepName&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingEditRepName = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
that.modalEditRepName = false;
that.GetRepList(); that.GetRepList();
} else { } else {
that.$Message.error(result.message); that.$Message.error(result.message);
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingEditRepName = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
@ -2296,6 +2377,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });

47
01.web/src/views/repositoryUser/index.vue

@ -86,7 +86,7 @@
/> />
</Card> </Card>
</Card> </Card>
<Modal v-model="modalCreateUser" title="新建SVN用户" @on-ok="CreateUser"> <Modal v-model="modalCreateUser" title="新建SVN用户">
<Form :model="formCreateUser" :label-width="80"> <Form :model="formCreateUser" :label-width="80">
<FormItem label="用户名"> <FormItem label="用户名">
<Input v-model="formCreateUser.svn_user_name"></Input> <Input v-model="formCreateUser.svn_user_name"></Input>
@ -103,7 +103,20 @@
v-model="formCreateUser.svn_user_pass" v-model="formCreateUser.svn_user_pass"
></Input> ></Input>
</FormItem> </FormItem>
<FormItem>
<Button
type="primary"
@click="CreateUser"
:loading="loadingCreateUser"
>确定</Button
>
</FormItem>
</Form> </Form>
<div slot="footer">
<Button type="primary" ghost @click="modalCreateUser = false"
>取消</Button
>
</div>
</Modal> </Modal>
<Modal <Modal
v-model="modalEditUserPass" v-model="modalEditUserPass"
@ -114,7 +127,20 @@
<FormItem label="新密码"> <FormItem label="新密码">
<Input v-model="formEditUser.svn_user_pass"></Input> <Input v-model="formEditUser.svn_user_pass"></Input>
</FormItem> </FormItem>
<FormItem>
<Button
type="primary"
@click="EditUserPass"
:loading="loadingEditUserPass"
>确定</Button
>
</FormItem>
</Form> </Form>
<div slot="footer">
<Button type="primary" ghost @click="modalEditUserPass = false"
>取消</Button
>
</div>
</Modal> </Modal>
</div> </div>
</template> </template>
@ -147,6 +173,10 @@ export default {
*/ */
// //
loadingUser: true, loadingUser: true,
//
loadingCreateUser: false,
//
loadingEditUserPass:false,
/** /**
* 对话框 * 对话框
@ -277,6 +307,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingUser = false; that.loadingUser = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -309,6 +340,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -332,6 +364,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -355,6 +388,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -375,6 +409,7 @@ export default {
}, },
CreateUser() { CreateUser() {
var that = this; var that = this;
that.loadingCreateUser = true;
var data = { var data = {
svn_user_name: that.formCreateUser.svn_user_name, svn_user_name: that.formCreateUser.svn_user_name,
svn_user_pass: that.formCreateUser.svn_user_pass, svn_user_pass: that.formCreateUser.svn_user_pass,
@ -382,16 +417,20 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnuser&a=CreateUser&t=web", data) .post("/api.php?c=svnuser&a=CreateUser&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingCreateUser = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
that.modalCreateUser = false;
that.GetUserList(); that.GetUserList();
} else { } else {
that.$Message.error(result.message); that.$Message.error(result.message);
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingCreateUser = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -411,6 +450,7 @@ export default {
}, },
EditUserPass() { EditUserPass() {
var that = this; var that = this;
that.loadingEditUserPass = true;
var data = { var data = {
svn_user_name: that.formEditUser.svn_user_name, svn_user_name: that.formEditUser.svn_user_name,
svn_user_pass: that.formEditUser.svn_user_pass, svn_user_pass: that.formEditUser.svn_user_pass,
@ -420,8 +460,10 @@ export default {
that.$axios that.$axios
.post("/api.php?c=svnuser&a=EditUserPass&t=web", data) .post("/api.php?c=svnuser&a=EditUserPass&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingEditUserPass = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.modalEditUserPass = false;
that.$Message.success(result.message); that.$Message.success(result.message);
that.GetUserList(); that.GetUserList();
} else { } else {
@ -429,7 +471,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingEditUserPass = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -459,6 +503,7 @@ export default {
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });

10
01.web/src/views/systemLog/index.vue

@ -14,6 +14,7 @@
icon="ios-trash-outline" icon="ios-trash-outline"
type="warning" type="warning"
ghost ghost
:loading="loadingClearLogs"
@click="ClearLogs" @click="ClearLogs"
>清空日志</Button >清空日志</Button
> >
@ -80,6 +81,8 @@ export default {
* 加载 * 加载
*/ */
loadingGetLogList: true, loadingGetLogList: true,
//
loadingClearLogs: false,
/** /**
* 表格 * 表格
@ -153,7 +156,7 @@ export default {
var that = this; var that = this;
that.loadingGetLogList = true; that.loadingGetLogList = true;
that.tableDataLog = []; that.tableDataLog = [];
that.totalLog = 0; // that.totalLog = 0;
var data = { var data = {
pageSize: that.pageSizeLog, pageSize: that.pageSizeLog,
currentPage: that.pageCurrentLog, currentPage: that.pageCurrentLog,
@ -175,6 +178,7 @@ export default {
.catch(function (error) { .catch(function (error) {
that.loadingGetLogList = false; that.loadingGetLogList = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
/** /**
@ -186,10 +190,12 @@ export default {
title: "清空日志", title: "清空日志",
content: "确定要清空日志记录吗?此操作不可逆!", content: "确定要清空日志记录吗?此操作不可逆!",
onOk: () => { onOk: () => {
that.loadingClearLogs = true;
var data = {}; var data = {};
that.$axios that.$axios
.post("/api.php?c=logs&a=ClearLogs&t=web", data) .post("/api.php?c=logs&a=ClearLogs&t=web", data)
.then(function (response) { .then(function (response) {
that.loadingClearLogs = false;
var result = response.data; var result = response.data;
if (result.status == 1) { if (result.status == 1) {
that.$Message.success(result.message); that.$Message.success(result.message);
@ -199,7 +205,9 @@ export default {
} }
}) })
.catch(function (error) { .catch(function (error) {
that.loadingClearLogs = false;
console.log(error); console.log(error);
that.$Message.error("出错了 请联系管理员!");
}); });
}, },
}); });

2
02.php/api.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-24 23:37:06 * @Date: 2022-04-24 23:37:06
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-04-28 02:01:51 * @LastEditTime: 2022-05-01 14:25:05
* @Description: QQ:1801168257 * @Description: QQ:1801168257
*/ */

9
02.php/app/controller/subversion.class.php

@ -3,7 +3,7 @@
* @Author: witersen * @Author: witersen
* @Date: 2022-04-24 23:37:05 * @Date: 2022-04-24 23:37:05
* @LastEditors: witersen * @LastEditors: witersen
* @LastEditTime: 2022-04-30 19:24:09 * @LastEditTime: 2022-05-01 02:25:57
* @Description: QQ:1801168257 * @Description: QQ:1801168257
*/ */
@ -145,6 +145,13 @@ class subversion extends controller
*/ */
function EditPort() function EditPort()
{ {
//获取现在的端口于与要修改的端口对比检查是否相同
$result = $this->SVNAdminInfo->GetSubversionListen(SVNSERVE_ENV_FILE, LISTEN_FILE);
//停止svnserve
FunShellExec("systemctl stop svnserve");
//更换端口
} }
/** /**

Loading…
Cancel
Save