witersen
3 years ago
47 changed files with 1686 additions and 427 deletions
@ -0,0 +1 @@ |
|||||||
|
webpackJsonp([0],{377:function(e,t,r){r(398);var n=r(147)(r(387),r(415),"data-v-51f19c28",null);n.options.__file="D:\\SVN\\B06.svn管理面板V2.0\\09.软件开发\\01.web\\src\\views\\layout\\basicLayout\\index.vue",n.esModule&&Object.keys(n.esModule).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),n.options.functional&&console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions."),e.exports=n.exports},387:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{currentActiveName:"",logoContent:"SVN Admin",currentUsername:sessionStorage.user_name,currentRoleName:sessionStorage.user_role_name,navList:[],breadcrumb:[]}},methods:{LogOut:function(){var e=this,t={};e.$axios.post("/api.php?c=Common&a=Logout&t=web",t).then(function(t){var r=t.data;1==r.status?(sessionStorage.removeItem("token"),sessionStorage.removeItem("user_name"),sessionStorage.removeItem("user_role_id"),sessionStorage.removeItem("user_role_name"),e.$Message.success(r.message),e.$router.push({name:"login"})):e.$Message.error(r.message)}).catch(function(t){console.log(t),e.$Message.error("出错了 请联系管理员!")})},handleCommand:function(e){switch(e){case"logOut":this.logOUt()}},CreateNav:function(){var e=this,t=e.$router.options.routes.filter(function(e){return"manage"==e.name});t=t[0].children;var r=t.map(function(e){return e.meta.group}).filter(function(e){return""!=e.name});t=t.filter(function(e){return e.meta.group.num>0}),t=t.filter(function(e){return-1!=e.meta.user_role_id.indexOf(sessionStorage.user_role_id)});for(var n=[],o=0;o<r.length;o++){for(var a=[],i=0;i<t.length;i++)t[i].meta.group.num==r[o].num&&a.push(t[i]);0!=a.length&&n.push({title:r[o].name,value:a})}e.navList=n},SetBreadcrumb:function(){var e=this;e.breadcrumb=e.$route.matched},SetActiveName:function(){this.currentActiveName=this.$route.name}},mounted:function(){var e=this;e.CreateNav(),e.SetBreadcrumb(),this.SetActiveName()},watch:{$route:function(){this.SetBreadcrumb()}}}},398:function(e,t){},410:function(e,t,r){e.exports=r.p+"6eee7a3978d7d0d05d816816ca1b291c.png"},415:function(e,t,r){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("Layout",[n("Header",{staticStyle:{"background-color":"#9b1be5","background-image":"linear-gradient(90deg, #9b1be5 0%, #2085ea 100%)",color:"#fff",position:"fixed",width:"100%","z-index":"99"}},[n("img",{staticStyle:{"line-height":"64px",position:"absolute",top:"12px",left:"1%"},attrs:{src:r(410)}}),e._v(" "),n("Dropdown",{staticStyle:{float:"right",zindex:"99"},attrs:{transfer:!0,trigger:"click"},on:{"on-click":e.LogOut}},[n("a",{staticStyle:{"margin-left":"8px",color:"#fff"},attrs:{href:"javascript:void(0)"}},[e._v("\n "+e._s(e.currentUsername)+"\n "),n("Icon",{attrs:{type:"md-arrow-dropdown"}})],1),e._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",[e._v("退出")])],1)],1),e._v(" "),n("div",{staticStyle:{float:"right"}},[n("Divider",{attrs:{type:"vertical"}})],1),e._v(" "),n("div",{staticStyle:{float:"right"}},[n("a",{staticStyle:{"margin-left":"8px",color:"#fff",cursor:"default"}},[e._v(e._s(e.currentRoleName))])])],1),e._v(" "),n("Layout",{staticStyle:{"margin-top":"64px"}},[n("Sider",{staticStyle:{"min-height":"calc(100vh - 64px)",position:"fixed","z-index":"99",height:"100%"}},[n("Menu",{staticStyle:{height:"100%"},attrs:{theme:"light",width:"auto","active-name":e.currentActiveName}},e._l(e.navList,function(t,r){return n("MenuGroup",{key:r,attrs:{title:t.title}},e._l(t.value,function(t,o){return n("MenuItem",{key:r+"-"+o,attrs:{name:t.name,to:t.path}},[n("Icon",{attrs:{type:t.meta.icon}}),e._v("\n "+e._s(t.meta.title)+"\n ")],1)}))}))],1),e._v(" "),n("Layout",{staticStyle:{padding:"20px 30px 0px 220px",height:"calc(100vh - 64px)"}},[n("Breadcrumb",{staticStyle:{padding:"0px 0px 20px 0px"}},e._l(e.breadcrumb,function(t,r){return n("BreadcrumbItem",{key:r},[e._v(e._s(t.meta.title))])})),e._v(" "),n("Content",[n("router-view")],1)],1)],1)],1)],1)},staticRenderFns:[]},e.exports.render._withStripped=!0}}); |
@ -0,0 +1 @@ |
|||||||
|
webpackJsonp([1],{383:function(e,t,o){o(396);var a=o(147)(o(393),o(413),null,null);a.options.__file="D:\\SVN\\B06.svn管理面板V2.0\\09.软件开发\\01.web\\src\\views\\systemLog\\index.vue",a.esModule&&Object.keys(a.esModule).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),a.options.functional&&console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions."),e.exports=a.exports},393:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={data:function(){return{pageCurrentLog:1,pageSizeLog:10,totalLog:0,searchKeywordLog:"",loadingGetLogList:!0,loadingClearLogs:!1,tableColumnLog:[{title:"序号",type:"index",fixed:"left",minWidth:80},{title:"操作人",key:"log_add_user_name",minWidth:120},{title:"日志类型",key:"log_type_name",minWidth:150},{title:"详细信息",key:"log_content",tooltip:!0,minWidth:120},{title:"操作时间",key:"log_add_time",minWidth:150}],tableDataLog:[]}},computed:{},created:function(){},mounted:function(){this.GetLogList()},methods:{LogPageSizeChange:function(e){this.pageSizeLog=e,this.GetLogList()},LogPageChange:function(e){this.pageCurrentLog=e,this.GetLogList()},SearchGetLogList:function(){this.GetLogList()},GetLogList:function(){var e=this;e.loadingGetLogList=!0,e.tableDataLog=[];var t={pageSize:e.pageSizeLog,currentPage:e.pageCurrentLog,searchKeyword:e.searchKeywordLog};e.$axios.post("/api.php?c=Logs&a=GetLogList&t=web",t).then(function(t){e.loadingGetLogList=!1;var o=t.data;1==o.status?(e.tableDataLog=o.data.data,e.totalLog=o.data.total):e.$Message.error(o.message)}).catch(function(t){e.loadingGetLogList=!1,console.log(t),e.$Message.error("出错了 请联系管理员!")})},ClearLogs:function(){var e=this;e.$Modal.confirm({title:"清空日志",content:"确定要清空日志记录吗?此操作不可逆!",onOk:function(){e.loadingClearLogs=!0;var t={};e.$axios.post("/api.php?c=Logs&a=ClearLogs&t=web",t).then(function(t){e.loadingClearLogs=!1;var o=t.data;1==o.status?(e.$Message.success(o.message),e.GetLogList()):e.$Message.error(o.message)}).catch(function(t){e.loadingClearLogs=!1,console.log(t),e.$Message.error("出错了 请联系管理员!")})}})},ExportLog:function(){var e=this;o.e(10).then(function(){var t=o(394),a=t.export_json_to_excel,n=["序号","操作人","日志类型","详细信息","操作时间"],s=["index","log_add_user_name","log_type_name","log_content","log_add_time"],i=e.tableDataLog;for(var r in i)i[r].index=parseInt(r)+1;a(n,e.FormatJson(s,i),"logs-"+new Date)}.bind(null,o)).catch(o.oe)},FormatJson:function(e,t){return t.map(function(t){return e.map(function(e){return t[e]})})}}}},396:function(e,t){},413:function(e,t,o){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("Card",{attrs:{bordered:!1,"dis-hover":!0}},[o("Row",{staticStyle:{"margin-bottom":"15px"}},[o("Col",{attrs:{type:"flex",justify:"space-between",xs:21,sm:20,md:19,lg:18}},[o("Button",{attrs:{icon:"ios-trash-outline",type:"warning",ghost:"",loading:e.loadingClearLogs},on:{click:e.ClearLogs}},[e._v("清空日志")]),e._v(" "),o("Button",{attrs:{icon:"ios-cloud-download-outline",type:"success",ghost:""},on:{click:e.ExportLog}},[e._v("导出日志")])],1),e._v(" "),o("Col",{attrs:{xs:3,sm:4,md:5,lg:6}},[o("Input",{staticStyle:{width:"100%"},attrs:{search:"","enter-button":"",placeholder:"通过所有信息搜索..."},on:{"on-search":e.SearchGetLogList},model:{value:e.searchKeywordLog,callback:function(t){e.searchKeywordLog=t},expression:"searchKeywordLog"}})],1)],1),e._v(" "),o("Table",{attrs:{border:"",loading:e.loadingGetLogList,columns:e.tableColumnLog,data:e.tableDataLog,size:"small"}}),e._v(" "),o("Card",{attrs:{bordered:!1,"dis-hover":!0}},[0!=e.totalLog?o("Page",{attrs:{total:e.totalLog,current:e.pageCurrentLog,"page-size":e.pageSizeLog,size:"small","show-sizer":""},on:{"on-page-size-change":e.LogPageSizeChange,"on-change":e.LogPageChange}}):e._e()],1)],1)],1)},staticRenderFns:[]},e.exports.render._withStripped=!0}}); |
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 399 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 1.6 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 542 KiB |
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,16 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="zh-CN"> |
||||||
|
|
||||||
|
<head> |
||||||
|
<title>iView project</title> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
||||||
|
<link rel="stylesheet" href="/dist/main.55456e93cfe3e0947bae.css"> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
<div id="app"></div> |
||||||
|
<script type="text/javascript" src="/dist/vendors.55456e93cfe3e0947bae.js"></script> |
||||||
|
<script type="text/javascript" src="/dist/main.55456e93cfe3e0947bae.js"></script> |
||||||
|
</body> |
||||||
|
</html> |
@ -1,136 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
/** |
|
||||||
* 文件传输,支持断点续传。 |
|
||||||
* 2g以上超大文件也有效 |
|
||||||
* @author MoXie |
|
||||||
*/ |
|
||||||
class Transfer |
|
||||||
{ |
|
||||||
/** |
|
||||||
* 缓冲单元 |
|
||||||
*/ |
|
||||||
const BUFF_SIZE = 5120; // 1024 * 5 |
|
||||||
/** |
|
||||||
* 文件地址 |
|
||||||
* @var <String> |
|
||||||
*/ |
|
||||||
private $filePath; |
|
||||||
/** |
|
||||||
* 文件大小 |
|
||||||
* @var <String> Php超大数字 字符串形式描述 |
|
||||||
*/ |
|
||||||
private $fileSize; |
|
||||||
/** |
|
||||||
* 文件类型 |
|
||||||
* @var <String> |
|
||||||
*/ |
|
||||||
private $mimeType; |
|
||||||
/** |
|
||||||
* 请求区域(范围) |
|
||||||
* @var <String> |
|
||||||
*/ |
|
||||||
private $range; |
|
||||||
/** |
|
||||||
* |
|
||||||
* @param <String> $filePath 文件路径 |
|
||||||
* @param <String> $mimeType 文件类型 |
|
||||||
* @param <String> $range 请求区域(范围) |
|
||||||
*/ |
|
||||||
function __construct($filePath, $mimeType = null, $range = null) |
|
||||||
{ |
|
||||||
$this->filePath = $filePath; |
|
||||||
$this->fileSize = sprintf('%u', filesize($filePath)); |
|
||||||
$this->mimeType = ($mimeType != null) ? $mimeType : "application/octet-stream"; // bin |
|
||||||
$this->range = trim($range); |
|
||||||
} |
|
||||||
/** |
|
||||||
* 获取文件区域 |
|
||||||
* @return <Map> {'start':long,'end':long} or null |
|
||||||
*/ |
|
||||||
private function getRange() |
|
||||||
{ |
|
||||||
/** |
|
||||||
* Range: bytes=-128 |
|
||||||
* Range: bytes=-128 |
|
||||||
* Range: bytes=28-175,382-399,510-541,644-744,977-980 |
|
||||||
* Range: bytes=28-175\n380 |
|
||||||
* type 1 |
|
||||||
* RANGE: bytes=1000-9999 |
|
||||||
* RANGE: bytes=2000-9999 |
|
||||||
* type 2 |
|
||||||
* RANGE: bytes=1000-1999 |
|
||||||
* RANGE: bytes=2000-2999 |
|
||||||
* RANGE: bytes=3000-3999 |
|
||||||
*/ |
|
||||||
if (!empty($this->range)) { |
|
||||||
$range = preg_replace('/[\s|,].*/', '', $this->range); |
|
||||||
$range = explode('-', substr($range, 6)); |
|
||||||
if (count($range) < 2) { |
|
||||||
$range[1] = $this->fileSize; // Range: bytes=-100 |
|
||||||
} |
|
||||||
$range = array_combine(array('start', 'end'), $range); |
|
||||||
if (empty($range['start'])) { |
|
||||||
$range['start'] = 0; |
|
||||||
} |
|
||||||
if (!isset($range['end']) || empty($range['end'])) { |
|
||||||
$range['end'] = $this->fileSize; |
|
||||||
} |
|
||||||
return $range; |
|
||||||
} |
|
||||||
return null; |
|
||||||
} |
|
||||||
/** |
|
||||||
* 向客户端发送文件 |
|
||||||
*/ |
|
||||||
public function send() |
|
||||||
{ |
|
||||||
$fileHande = fopen($this->filePath, 'rb'); |
|
||||||
if ($fileHande) { |
|
||||||
// setting |
|
||||||
ob_end_clean(); // clean cache |
|
||||||
ob_start(); |
|
||||||
ini_set('output_buffering', 'Off'); |
|
||||||
ini_set('zlib.output_compression', 'Off'); |
|
||||||
// init |
|
||||||
$lastModified = gmdate('D, d M Y H:i:s', filemtime($this->filePath)) . ' GMT'; |
|
||||||
$etag = sprintf('w/"%s:%s"', md5($lastModified), $this->fileSize); |
|
||||||
$ranges = $this->getRange(); |
|
||||||
// headers |
|
||||||
header(sprintf('Last-Modified: %s', $lastModified)); |
|
||||||
header(sprintf('ETag: %s', $etag)); |
|
||||||
header(sprintf('Content-Type: %s', $this->mimeType)); |
|
||||||
$disposition = 'attachment'; |
|
||||||
if (strpos($this->mimeType, 'image/') !== FALSE) { |
|
||||||
$disposition = 'inline'; |
|
||||||
} |
|
||||||
header(sprintf('Content-Disposition: %s; filename="%s"', $disposition, basename($this->filePath))); |
|
||||||
if ($ranges != null) { |
|
||||||
header('HTTP/1.1 206 Partial Content'); |
|
||||||
header('Accept-Ranges: bytes'); |
|
||||||
header(sprintf('Content-Length: %u', $ranges['end'] - $ranges['start'])); |
|
||||||
header(sprintf('Content-Range: bytes %s-%s/%s', $ranges['start'], $ranges['end'], $this->fileSize)); |
|
||||||
// |
|
||||||
fseek($fileHande, sprintf('%u', $ranges['start'])); |
|
||||||
} else { |
|
||||||
header("HTTP/1.1 200 OK"); |
|
||||||
header(sprintf('Content-Length: %s', $this->fileSize)); |
|
||||||
} |
|
||||||
// read file |
|
||||||
$lastSize = 0; |
|
||||||
while (!feof($fileHande) && !connection_aborted()) { |
|
||||||
$lastSize = sprintf("%u", bcsub($this->fileSize, sprintf("%u", ftell($fileHande)))); |
|
||||||
if (bccomp($lastSize, self::BUFF_SIZE) > 0) { |
|
||||||
$lastSize = self::BUFF_SIZE; |
|
||||||
} |
|
||||||
echo fread($fileHande, $lastSize); |
|
||||||
ob_flush(); |
|
||||||
flush(); |
|
||||||
} |
|
||||||
ob_end_flush(); |
|
||||||
} |
|
||||||
if ($fileHande != null) { |
|
||||||
fclose($fileHande); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,11 @@ |
|||||||
|
[Unit] |
||||||
|
Description=Subversion protocol daemon |
||||||
|
After=syslog.target network.target |
||||||
|
|
||||||
|
[Service] |
||||||
|
Type=simple |
||||||
|
ExecStart=/usr/bin/php /var/www/html/server/svnadmind.php start |
||||||
|
ExecStop=/usr/bin/php /var/www/html/server/svnadmind.php stop |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
Loading…
Reference in new issue