Browse Source

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

docker-svn
witersen 3 years ago
parent
commit
a52e409f19
  1. 4
      01.web/src/views/advance/index.vue
  2. 3
      01.web/src/views/index/index.vue
  3. 1
      01.web/src/views/layout/basicLayout/index.vue
  4. 2
      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 { @@ -416,6 +416,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -436,6 +437,7 @@ export default { @@ -436,6 +437,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -472,6 +474,7 @@ export default { @@ -472,6 +474,7 @@ export default {
.catch(function (error) {
that.loadingSvnserveStart = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
});
@ -502,6 +505,7 @@ export default { @@ -502,6 +505,7 @@ export default {
.catch(function (error) {
that.loadingSvnserveStop = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
});

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

@ -247,6 +247,7 @@ export default { @@ -247,6 +247,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -268,6 +269,7 @@ export default { @@ -268,6 +269,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -289,6 +291,7 @@ export default { @@ -289,6 +291,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
},

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

@ -156,6 +156,7 @@ export default { @@ -156,6 +156,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
// 退

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

@ -165,6 +165,7 @@ export default { @@ -165,6 +165,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
//
@ -210,6 +211,7 @@ export default { @@ -210,6 +211,7 @@ export default {
.catch(function (error) {
that.loadingLogin = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
},

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

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

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

@ -83,7 +83,20 @@ @@ -83,7 +83,20 @@
>分组名只能包含字母数字破折号下划线</Alert
>
</FormItem>
<FormItem>
<Button
type="primary"
@click="CreateGroup"
:loading="loadingCreateGroup"
>确定</Button
>
</FormItem>
</Form>
<div slot="footer">
<Button type="primary" ghost @click="modalAddGroup = false"
>取消</Button
>
</div>
</Modal>
<Modal
v-model="modalEditGroupName"
@ -99,7 +112,20 @@ @@ -99,7 +112,20 @@
>分组名只能包含字母数字破折号下划线</Alert
>
</FormItem>
<FormItem>
<Button
type="primary"
@click="EditGroupName"
:loading="loadingEditGroupName"
>确定</Button
>
</FormItem>
</Form>
<div slot="footer">
<Button type="primary" ghost @click="modalEditGroupName = false"
>取消</Button
>
</div>
</Modal>
<Modal v-model="modalGetGroupMember" :title="titleGetGroupMember">
<Tabs type="card">
@ -149,7 +175,7 @@ @@ -149,7 +175,7 @@
</TabPane>
</Tabs>
<div slot="footer">
<Button type="primary" @click="modalGetGroupMember = false"
<Button type="primary" ghost @click="modalGetGroupMember = false"
>取消</Button
>
</div>
@ -189,6 +215,10 @@ export default { @@ -189,6 +215,10 @@ export default {
loadingRepAllUser: true,
//
loadingRepAllGroup: true,
//
loadingCreateGroup: false,
//
loadingEditGroupName: false,
/**
* 临时变量
@ -366,6 +396,7 @@ export default { @@ -366,6 +396,7 @@ export default {
.catch(function (error) {
that.loadingGroup = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -389,6 +420,7 @@ export default { @@ -389,6 +420,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -399,22 +431,27 @@ export default { @@ -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 { @@ -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 { @@ -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 { @@ -476,6 +518,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
});
@ -522,6 +565,7 @@ export default { @@ -522,6 +565,7 @@ export default {
that.loadingRepAllUser = false;
that.loadingRepAllGroup = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -567,6 +611,7 @@ export default { @@ -567,6 +611,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -592,6 +637,7 @@ export default { @@ -592,6 +637,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -617,6 +663,7 @@ export default { @@ -617,6 +663,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -642,6 +689,7 @@ export default { @@ -642,6 +689,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
},

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

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

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

@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
/>
</Card>
</Card>
<Modal v-model="modalCreateUser" title="新建SVN用户" @on-ok="CreateUser">
<Modal v-model="modalCreateUser" title="新建SVN用户">
<Form :model="formCreateUser" :label-width="80">
<FormItem label="用户名">
<Input v-model="formCreateUser.svn_user_name"></Input>
@ -103,7 +103,20 @@ @@ -103,7 +103,20 @@
v-model="formCreateUser.svn_user_pass"
></Input>
</FormItem>
<FormItem>
<Button
type="primary"
@click="CreateUser"
:loading="loadingCreateUser"
>确定</Button
>
</FormItem>
</Form>
<div slot="footer">
<Button type="primary" ghost @click="modalCreateUser = false"
>取消</Button
>
</div>
</Modal>
<Modal
v-model="modalEditUserPass"
@ -114,7 +127,20 @@ @@ -114,7 +127,20 @@
<FormItem label="新密码">
<Input v-model="formEditUser.svn_user_pass"></Input>
</FormItem>
<FormItem>
<Button
type="primary"
@click="EditUserPass"
:loading="loadingEditUserPass"
>确定</Button
>
</FormItem>
</Form>
<div slot="footer">
<Button type="primary" ghost @click="modalEditUserPass = false"
>取消</Button
>
</div>
</Modal>
</div>
</template>
@ -147,6 +173,10 @@ export default { @@ -147,6 +173,10 @@ export default {
*/
//
loadingUser: true,
//
loadingCreateUser: false,
//
loadingEditUserPass:false,
/**
* 对话框
@ -277,6 +307,7 @@ export default { @@ -277,6 +307,7 @@ export default {
.catch(function (error) {
that.loadingUser = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -309,6 +340,7 @@ export default { @@ -309,6 +340,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -332,6 +364,7 @@ export default { @@ -332,6 +364,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -355,6 +388,7 @@ export default { @@ -355,6 +388,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -375,6 +409,7 @@ export default { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -429,7 +471,9 @@ export default {
}
})
.catch(function (error) {
that.loadingEditUserPass = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -459,6 +503,7 @@ export default { @@ -459,6 +503,7 @@ export default {
})
.catch(function (error) {
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
});

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

@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
icon="ios-trash-outline"
type="warning"
ghost
:loading="loadingClearLogs"
@click="ClearLogs"
>清空日志</Button
>
@ -80,6 +81,8 @@ export default { @@ -80,6 +81,8 @@ export default {
* 加载
*/
loadingGetLogList: true,
//
loadingClearLogs: false,
/**
* 表格
@ -153,7 +156,7 @@ export default { @@ -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 { @@ -175,6 +178,7 @@ export default {
.catch(function (error) {
that.loadingGetLogList = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
/**
@ -186,10 +190,12 @@ export default { @@ -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 { @@ -199,7 +205,9 @@ export default {
}
})
.catch(function (error) {
that.loadingClearLogs = false;
console.log(error);
that.$Message.error("出错了 请联系管理员!");
});
},
});

2
02.php/api.php

@ -3,7 +3,7 @@ @@ -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
*/

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

@ -3,7 +3,7 @@ @@ -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 @@ -145,6 +145,13 @@ class subversion extends controller
*/
function EditPort()
{
//获取现在的端口于与要修改的端口对比检查是否相同
$result = $this->SVNAdminInfo->GetSubversionListen(SVNSERVE_ENV_FILE, LISTEN_FILE);
//停止svnserve
FunShellExec("systemctl stop svnserve");
//更换端口
}
/**

Loading…
Cancel
Save