v3.0。beta版本,完成了数据导出前端,数据尚未绑定,导出功能不可用

This commit is contained in:
lili 2018-04-02 09:07:39 +08:00
parent 4218595a3a
commit 3ac9da8ad2
12 changed files with 1563 additions and 1303 deletions

View File

@ -9,6 +9,7 @@ declare module Configs {
static UPDATE: string;
static PUT: string;
static MOVE: string;
static CREATE_DATABASE: string;
static EXTRACT: string;
}
function createOracleInfo(array: Array<any>, id: number): {

2
defs.d.ts vendored
View File

@ -77,7 +77,6 @@
/// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/templates.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>
/// <reference path="d.ts/system/ts/systemHelpers.d.ts"/>
/// <reference path="d.ts/system/ts/systemPlugin.d.ts"/>
/// <reference path="d.ts/system/ts/regionalismCodeSearch.d.ts"/>
@ -86,3 +85,4 @@
/// <reference path="d.ts/system/ts/systemCodeSearch.d.ts"/>
/// <reference path="d.ts/system/ts/systemList.d.ts"/>
/// <reference path="d.ts/system/ts/systemVerification.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

View File

@ -18,6 +18,9 @@
<button class="btn sj_btn_green mb10" style="color:#fff;" ng-click="create()">
<span class="glyphicon glyphicon-plus"></span> 添加
</button>
<button class="btn sj_btn_green mb10" style="color:#fff;" ng-click="createGatherDababase()">
<span class="glyphicon glyphicon-plus"></span> 创建汇总库
</button>
</div>
</div>
<hr>
@ -27,8 +30,8 @@
<div class="col-md-6 col-md-offset-1 ">
<form class="form-horizontal" novalidate="novalidate" name="validForm" ng-submit="onSubmit(tableForm)">
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">名称</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control " type="text" ng-model="tableForm.name" name="orcName" ng-minlength="2" ng-maxlength="20" required="required" ng-focus="tableForm.name" placeholder="请输入2-20个字符的数据名称" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcName.$invalid && submitted">
<span role="alert" ng-show="validForm.orcName.$error.required">名称不能为空</span>
@ -36,20 +39,18 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否创建汇总库</label>
<div class="col-sm-10 sj_form_input ">
<!-- <div class="form-group" ng-show="add">
<label class="col-sm-3 control-label">是否创建汇总库</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="tableForm.isCreateGatherOracle">
<option value=1 ng-selected="tableForm.isCreateGatherOracle==1" selected></option>
<option value=0 ng-selected="tableForm.isCreateGatherOracle==0" ></option>
<option value=1 ng-selected="tableForm.isCreateGatherOracle==1"></option>
<option value=0 ng-selected="tableForm.isCreateGatherOracle==0" selected></option>
</select>
</div>
</div>
<div ng-switch = "tableForm.isCreateGatherOracle">
<div ng-switch-when = "0">
</div> -->
<div class="form-group">
<label class="col-sm-2 control-label">IP</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">IP</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.ip" name="orcIP" ng-pattern="/((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))/" required="required" ng-focus="tableForm.ip" placeholder="oracle的IP,例如0.0.0.0" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcIP.$invalid && submitted">
<span role="alert" ng-show="validForm.orcIP.$error.required">IP不能为空</span>
@ -58,8 +59,8 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">端口号</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">端口号</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.port" name="orcPort" ng-pattern="/^([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/" required="required" ng-focus="tableForm.port" placeholder="oracle的的端口,1~65535" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPort.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPort.$error.required">端口号不能为空</span>
@ -67,23 +68,21 @@
</div>
</div>
</div>
</div>
</div>
<div ng-switch = "tableForm.isCreateGatherOracle">
<!-- <div ng-switch="tableForm.isCreateGatherOracle">
<div ng-switch-when="1">
<div class="form-group ">
<label class="col-sm-2 control-label">开始时间</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.startTime" name="orcStartTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.startTime" placeholder="开始时间,格式为yyyy-MM 例如2018-02"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcStartTime.$invalid && submitted">
<span role="alert" ng-show="validForm.orcStartTime.$error.required">开始时间不能为空</span>
<span role="alert" ng-show="validForm.orcStartTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
<label class="col-sm-3 control-label">开始时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.startTime" name="startTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.startTime" placeholder="开始时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.startTime.$invalid && submitted">
<span role="alert" ng-show="validForm.startTime.$error.required">开始时间不能为空</span>
<span role="alert" ng-show="validForm.startTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">结束时间</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">结束时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.endTime" name="orcEndTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.endTime" placeholder="结束时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcEndTime.$invalid && submitted">
<span role="alert" ng-show="validForm.orcEndTime.$error.required">结束时间不能为空</span>
@ -92,28 +91,38 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">联系人</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.contact" name="orcContact" ng-pattern="" required="required" ng-focus="tableForm.contact" placeholder="联系人"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcContact.$invalid && submitted">
<span role="alert" ng-show="validForm.orcContact.$error.required">联系人不能为空</span>
<span role="alert" ng-show="validForm.orcContact.$error.pattern">联系人为有效联系人</span>
<label class="col-sm-3 control-label">联系人</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.contact" name="contact" ng-pattern="" required="required" ng-focus="tableForm.contact" placeholder="联系人" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.contact.$invalid && submitted">
<span role="alert" ng-show="validForm.contact.$error.required">联系人不能为空</span>
<span role="alert" ng-show="validForm.contact.$error.pattern">联系人为有效联系人</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">联系方式</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.phone" name="orcPhone" ng-pattern="/^[1][3,4,5,7,8][0-9]{9}$/" required="required" ng-focus="tableForm.phone" placeholder="联系方式"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPhone.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPhone.$error.required">联系方式不能为空</span>
<span role="alert" ng-show="validForm.orcPhone.$error.pattern">手机号必须为有效的手机号码</span>
<label class="col-sm-3 control-label">联系方式</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.phone" name="phone" ng-pattern="/^[1][3,4,5,7,8][0-9]{9}$/" required="required" ng-focus="tableForm.phone" placeholder="联系方式" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.phone.$invalid && submitted">
<span role="alert" ng-show="validForm.phone.$error.required">联系方式不能为空</span>
<span role="alert" ng-show="validForm.phone.$error.pattern">手机号必须为有效的手机号码</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">编码方式</label>
<div class="col-sm-10 sj_form_input ">
<label class="col-sm-3 control-label">数据版本号</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.dataVersion" name="dataVersion" ng-pattern="/^[1-9]\d*$/" required="required" ng-focus="tableForm.phone" placeholder="数据版本号" ng-init="tableForm.dataVersion=1" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.phone.$invalid && submitted">
<span role="alert" ng-show="validForm.phone.$error.required">版本号不能为空</span>
<span role="alert" ng-show="validForm.dataVersion.$error.pattern">数据版本号必须为正整数</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">编码方式</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="tableForm.encoding">
<option value=0 ng-selected="tableForm.encoding==GBK" selected>GBK</option>
<option value=1 ng-selected="tableForm.encoding==UTF8">UTF8</option>
@ -121,10 +130,10 @@
</div>
</div>
</div>
</div>
</div> -->
<div class="form-group">
<label class="col-sm-2 control-label">用戶名</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">用戶名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.user" name="orcUser" ng-pattern="/^\w{2,15}$/" required="required" ng-focus="tableForm.user" placeholder="oracle的用户名2-15个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcUser.$invalid && submitted">
<span role="alert" ng-show="validForm.orcUser.$error.required">用户名不能为空</span>
@ -133,8 +142,8 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">密码</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">密码</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.password" name="orcPassword" ng-pattern="/^\w{2,15}$/" required="required" ng-focus="tableForm.password" placeholder="oracle的密码,2-15个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPassword.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPassword.$error.required">密码不能为空</span>
@ -143,8 +152,8 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">服务名</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">服务名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.databaseName" name="orcService" ng-pattern="/^[a-zA-Z]{1,10}$/" required="required" ng-focus="tableForm.databaseName" placeholder="oracle的实例名,1-10个字母,例如ORCL" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcService.$invalid && submitted">
<span role="alert" ng-show="validForm.orcService.$error.required">服务名不能为空</span>
@ -153,8 +162,8 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">表空间名</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">表空间名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.tableName" name="orcTable" ng-pattern="/^\w{1,15}$/" required="required" ng-focus="tableForm.tableName" placeholder="oracle的表空间名,1-15个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcTable.$invalid && submitted">
<span role="alert" ng-show="validForm.orcTable.$error.required">表空间名不能为空</span>
@ -163,8 +172,8 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">表后缀名</label>
<div class="col-sm-10 sj_form_input">
<label class="col-sm-3 control-label">表后缀名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.suffix" name="orcSuffix" ng-pattern="/^\w{1,10}$/" required="required" ng-focus="tableForm.suffix" placeholder="汇总生成新表的后缀名,1-10个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcSuffix.$invalid && submitted">
<span role="alert" ng-show="validForm.orcSuffix.$error.required">表后缀名不能为空</span>
@ -173,10 +182,10 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">标准表汇总库</label>
<div class="col-sm-10 sj_form_input ">
<label class="col-sm-3 control-label">标准表汇总库</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="tableForm.type">
<option value=0 ng-selected="tableForm.type==0" selected></option>
<option value=0 ng-selected="tableForm.type==0" ng-init="tableForm.type==0"></option>
<option value=1 ng-selected="tableForm.type==1"></option>
</select>
</div>
@ -193,6 +202,92 @@
</div>
</div>
<hr>
<hr>
<div class="row " style="padding-top:10px;" ng-show="tableForm && createDatabase">
<h3 class="mb10" ng-show="createDatabase">填写创建汇总库信息:</h3>
<div class="col-md-6 col-md-offset-1 ">
<form class="form-horizontal" novalidate="novalidate" name="createDatabaseForm" ng-submit="onSubmitCreateDatabase(tableForm)">
<div class="form-group" ng-show="0">
<label class="col-sm-3 control-label">汇总库系统名称</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control " type="text" ng-model="tableForm.systemName" name="systemName" ng-minlength="2" ng-maxlength="20" required="required" ng-focus="tableForm.systemName" ng-init="tableForm.systemName='汇总库'" placeholder="请输入2-20个字符的汇总库系统名称" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.systemName.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.systemName.$error.required">汇总库系统名称不能为空</span>
<span role="alert" ng-show="!createDatabaseForm.systemName.$error.required && createDatabaseForm.systemName.$invalid">请输入2-20个字符的汇总库系统名称</span>
</div>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">开始时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.startTime" name="startTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.startTime" placeholder="开始时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.startTime.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.startTime.$error.required">开始时间不能为空</span>
<span role="alert" ng-show="createDatabaseForm.startTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">结束时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.endTime" name="endTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.endTime" placeholder="结束时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.endTime.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.endTime.$error.required">结束时间不能为空</span>
<span role="alert" ng-show="createDatabaseForm.endTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.contact" name="contact" ng-pattern="" required="required" ng-focus="tableForm.contact" placeholder="联系人" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.contact.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.contact.$error.required">联系人不能为空</span>
<span role="alert" ng-show="createDatabaseForm.contact.$error.pattern">联系人为有效联系人</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系方式</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.phone" name="phone" ng-pattern="/^[1][3,4,5,7,8][0-9]{9}$/" required="required" ng-focus="tableForm.phone" placeholder="联系方式" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.phone.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.phone.$error.required">联系方式不能为空</span>
<span role="alert" ng-show="createDatabaseForm.phone.$error.pattern">手机号必须为有效的手机号码</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数据版本号</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.dataVersion" name="dataVersion" ng-pattern="/^[1-9]\d*$/" required="required" ng-focus="tableForm.dataVersion" placeholder="数据版本号" ng-init="tableForm.dataVersion=1" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.dataVersion.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.dataVersion.$error.required">版本号不能为空</span>
<span role="alert" ng-show="createDatabaseForm.dataVersion.$error.pattern">数据版本号必须为正整数</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">编码方式</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="createDatabaseForm.encoding">
<option value="GBK" ng-selected="createDatabaseForm.encoding==GBK" selected>GBK</option>
<option value="UTF8" ng-selected="createDatabaseForm.encoding==UTF8">UTF8</option>
</select>
</div>
</div>
<div class="form-group" style="margin-left:145px;">
<button class="btn sj_btn_blue" type='submit' style="color:#fff; margin-right:30px;">
<span class="glyphicon glyphicon-save "></span> 保存
</button>
<button class="btn sj_btn_grey" ng-click='cancelCreateDatabase()'>
<span class="glyphicon glyphicon-remove "></span> 取消
</button>
</div>
</form>
</div>
</div>
<hr>
</div>
</div>
</div>
@ -203,23 +298,25 @@
line-height: 28px;
font-style: normal;
}
.form-horizontal input::-moz-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style: normal;
}
.form-horizontal input:-moz-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style: normal;
}
.form-horizontal input:-ms-input-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style: normal;
}
</style>

View File

@ -411,7 +411,6 @@
<p>一键审核:待审核状态的所有脚本文件,后台一次性全部替换</p>
</div>
</div>
</script>
<script type="text/ng-template" id="uploadErrorInfo.html">
<div class="container-fluid ">
@ -448,11 +447,9 @@
<li class="cl export-li" ng-repeat="item in data">
<label class="export-label">
<input type="checkbox" id={{item.id}} ng-checked="ischeckedId(item.id) " ng-click="selectId(item.id,$event,idList) " class="fl " />
<span class="ml5 mt5 fl sj_over_hid ">{{item.cityName}}_{{item.districtName}}_{{item.systemName}}_{{item.endYear}}_{{item.submittedBatch}}</span>
<span class="ml5 mt5 fl sj_over_hid ">{{item.cityName}}_{{item.districtName}}_{{item.systemName}}_{{item.endYear}}_{{item.submittedBatch}}_{{item.dataVersion}}</span>
</label>
</li>
</ul>
</div>
<div class="sj_table_td05 sj-border-black mt10 padding20 border-left-none fl ">
@ -460,16 +457,16 @@
<ul class="mb10 " style="height:400px;overflow-y:auto; ">
<li class="cl export-li " ng-repeat="item in export ">
<label class="export-label">
<input type="checkbox" class="fl" id="{{item.type}}" ng-checked="ischeckedType(item.type)" ng-click="selectType(item.type,$event,typeList)"/>
<span class="ml5 mt5 fl sj_over_hid">{{item.exportName}}</span>
<input type="checkbox" id={{item.type}} ng-checked="ischeckedType(item.type) " ng-click="selectType(item.type,$event,typeList) " class="fl " />
<span class="ml5 mt5 fl sj_over_hid " style="width: 150px;">{{item.exportName}}</span>
<select class="ml5 mt5 fl sj_over_hid" style="width: 200px;" ng-show="item.exportName=='汇总库' " ng-init="selectGatherOracleName=gatherOracles[0].name" ng-model="selectGatherOracleName" ng-options="one.name for one in gatherOracles">
</select>
</label>
</li>
</ul>
</div>
<button class="sj_btn_blue mt20 fr " ng-click="onsubmit(idList,typeList) ">保存</button>
<button class="sj_btn_grey mt20 mr5 fr " ng-click="cancel() ">取消</button>
</div>
</script>
<div ng-controller="Kubernetes.TopLevel ">

View File

@ -9,6 +9,7 @@ module Configs{
public static get UPDATE(): string { return "update" }
public static get PUT(): string { return "put" }
public static get MOVE(): string { return "move" }
public static get CREATE_DATABASE(): string { return "createDatabase" }
public static get EXTRACT(): string { return "extract" }
}
@ -24,7 +25,8 @@ module Configs{
label: "服务集群配置",
title: "配置服务集群信息",
href: UrlHelpers.join(context, "/kube-cluster/setting")
}]
}
]
}]);
function createConfigBreadcrumbs($scope, $location, $routeParams) {
@ -111,17 +113,16 @@ module Configs{
dataType: 'json',
url: UrlHelpers.join(url, operate + "s"),
data: ids,
}).success((data,header,config,status) => {
}).then(function successCallback(response) {
if (angular.isFunction(fn))
fn(data, header);
}).error((data,header,config,status) => {
if(angular.isFunction(fn))
fn(data, header);
fn(response.data, response.header);
}, function errorCallback(response) {
fn(response.data, response.header);
});
} else {
var id = resource["id"] || resource["name"] || resource["_id"] || resource["_key"];
var RESTfulUrl = url;
if(id == "undefined"){
if (typeof(id) == "undefined") {
RESTfulUrl = UrlHelpers.join(url, operate);
} else {
RESTfulUrl = UrlHelpers.join(url, id + "", operate);
@ -132,22 +133,27 @@ module Configs{
dataType: 'json',
url: RESTfulUrl,
data: JSON.stringify(resource),
}).success((data,header,config,status) => {
}).then(function successCallback(response) {
if (angular.isFunction(fn))
fn(data, header);
// console.log("success");
// console.log(data + "_." + header + "_.." + config + "_..." + status);
// console.log("success");
}).error((data,header,config,status) => {
if(angular.isFunction(fn))
fn(data, header);
fn(response.data, response.status);
}, function errorCallback(response) {
fn(response.data, response.status);
});
// success((data,header,config,status) => {
// if(angular.isFunction(fn))
// fn(data, header);
// // console.log("success");
// // console.log(data + "_." + header + "_.." + config + "_..." + status);
// // console.log("success");
// }).error((data,header,config,status) => {
// if(angular.isFunction(fn))
// fn(data, header);
// });
}
}
export function createConfigHelperNavBar($scope, $location, $routeParams) {
return Developer.activateCurrent([
{
return Developer.activateCurrent([{
href: UrlHelpers.join(context, "regionalism-code/searching"),
label: "行政区划检索",
title: "检索行政区划代码"

View File

@ -5,12 +5,12 @@
module Configs {
export var KubeController = controller('KubeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout","ConfigsModel","DataModel",
($scope, $templateCache:ng.ITemplateCacheService, $location, $routeParams, $http, $timeout, ConfigsModel, DataModel) => {
export var KubeController = controller('KubeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "ConfigsModel", "DataModel", "$modal",
($scope, $templateCache: ng.ITemplateCacheService, $location, $routeParams, $http, $timeout, ConfigsModel, DataModel, $modal) => {
$scope.model = ConfigsModel;
$scope.model.updateOracleParam();
$scope.submitted = false;
$scope.submittedCreateDatabase = false;
$scope.DataModel = DataModel;
console.log(ConfigsModel.oracleParam);
@ -56,12 +56,14 @@ module Configs{
field: "type",
displayName: "标准表汇总库",
cellTemplate: $templateCache.get("strandColumn.html")
},
{
field: "entity",
displayName: "操作",
cellTemplate: $templateCache.get("tableEdit.html")
}],
}
],
enableRowClickSelection: false,
showSelectionCheckbox: false,
multiSelect: false,
@ -77,6 +79,7 @@ module Configs{
$scope.submitted = false;
$scope.add = true;
$scope.edit = false;
$scope.createDatabase = false;
$scope.tableForm = {};
$scope.tableForm["id"] = 0;
$scope.tableForm["type"] = 0;
@ -89,20 +92,38 @@ module Configs{
$scope.tableForm["tableName"] = '';
$scope.tableForm["suffix"] = '';
}
$scope.createGatherDababase = () => {
$scope.submittedCreateDatabase = false;
$scope.add = false;
$scope.edit = false;
$scope.createDatabase = true;
$scope.tableForm = {};
$scope.tableForm["dataVersion"] = 1;
$scope.tableForm["systemName"] = '汇总库';
$scope.tableForm["startTime"] = '';
$scope.tableForm["endTime"] = '';
$scope.tableForm["contact"] = '';
$scope.tableForm["phone"] = '';
$scope.tableForm["isCreateGatherOracle"]=1;
}
$scope.tableForm["encoding"] = 'UTF8';
}
$scope.cancel = () => {
$scope.tableForm = null;
$scope.add = false;
$scope.edit = false;
$scope.submitted = false;
}
$scope.cancelCreateDatabase = () => {
$scope.tableForm = null;
$scope.createDatabase = false;
$scope.submittedCreateDatabase = false;
}
$scope.onSubmit = (oracle) => {
if ($scope.tableForm["name"] == '请输入2-20个字符的数据名称')
$scope.tableForm["name"] = '';
@ -121,6 +142,32 @@ module Configs{
if ($scope.tableForm["suffix"] == '汇总生成新表的后缀名,1-10个字母、数字或下划线')
$scope.tableForm["suffix"] = '';
if ($scope.validForm.$valid && $scope.validForm.$dirty) {
$scope.edit = false;
$scope.add = false
console.log(oracle);
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.UPDATE, oracle, (result, status) => {
if (status == 200) {
$scope.model.updateOracleParam();
Configs.customAlert("提示", "汇总库更新成功", '', null, 0, "success");
} else if (status == 400) {
console.log(result);
Configs.customAlert("提示", "汇总库更新失败,名称不能重复", '', null, 0, "error");
} else {
console.log(result);
Configs.customAlert("提示", "汇总库配置失败: 系统异常!", '', null, 0, "error");
}
});
} else {
$scope.submitted = true;
}
}
$scope.onSubmitCreateDatabase = (oracle) => {
if ($scope.tableForm["systemName"] == '请输入2-20个字符的汇总库系统名称')
$scope.tableForm["systemName"] = '';
if ($scope.tableForm["startTime"] == '开始时间,格式为yyyy-MM 例如2018-02')
$scope.tableForm["startTime"] = '';
if ($scope.tableForm["endTime"] == '结束时间,格式为yyyy-MM 例如2018-02')
@ -130,31 +177,31 @@ module Configs{
if ($scope.tableForm["phone"] == '联系方式')
$scope.tableForm["phone"] = '';
if ($scope.createDatabaseForm.$valid && $scope.createDatabaseForm.$dirty) {
$scope.createDatabase = false;
if($scope.validForm.$valid && $scope.validForm.$dirty){
$scope.edit = false;
$scope.add = false
console.log(oracle);
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.UPDATE, oracle, (result, status) => {
console.log(oracle);
Configs.customAlert("提示", "准备创建汇总库,请稍后前往数据管理页面查看创建的汇总库", '', null, 0, "success");
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.CREATE_DATABASE, oracle, (result, status) => {
if (status === 200) {
$scope.model.updateOracleParam();
Configs.customAlert("提示", "汇总库创建成功,请前往数据管理页面中启动创建的汇总库并查看参数在配置服务集群", '', null, 0, "success");
} else {
throw "资源请求失败";
console.log(result);
Configs.customAlert("提示", "汇总库创建失败!\n" + result.msg, '', null, 0, "error");
}
});
} else {
$scope.submitted = true;
$scope.submittedCreateDatabase = true;
}
}
$scope.$on("editRow", (event, data) => {
$scope.submitted = false;
$scope.tableForm = deepCopy(data);
$scope.edit = true;
$scope.add = false;
$scope.createDatabase = false;
//$scope.rowId = data.id
//createNewObejct($scope.tableConfig.columnDefs, data);
//removeElementsByValue($scope.tableForm, [{key: "name", value: "序号"},{key: "name", value: "连接状态"},{key: "name", value: "操作"}]);
@ -162,15 +209,21 @@ module Configs{
$scope.$on("deleteRow", (event, data) => {
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.DELETE, data, (result, status) => {
if(status===200){
console.log("准备更新");
if (status == 200) {
$scope.model.updateOracleParam();
Configs.customAlert("提示", "汇总库删除成功", '', null, 0, "success");
} else {
throw "资源请求失败";
console.log(result);
Configs.customAlert("提示", "汇总库配置失败: 系统异常!", '', null, 0, "error");
}
});
//removeElementByValue($scope.model, data._id, "_id");
});
}]);
}
]);
}

View File

@ -78,13 +78,13 @@ module Configs{
}
}]);
export var SystemInfoController = controller('SystemInfoController', ['$scope', ($scope) =>{
}]);
export var SystemInfoController = controller('SystemInfoController', ['$scope', ($scope) => {}]);
export var SqlViewController = controller('SqlViewController', ['$scope', '$http', ($scope, $http) => {
$scope.title = shareInit($scope.ngDialogData);
$scope.content = "";
getSqlContent();
function getSqlContent() {
$http({
url: "/java/console/api/filePackage/readSqlFile",
@ -181,8 +181,7 @@ module Configs{
if (null == $scope.content || $scope.content == "") {
console.log("上传的内容不能为空");
$scope.closeThisDialog();
}
else{
} else {
$scope.$emit("onOk", {
url: "/java/console/api/filePackage/handleSqlFile",
item: $scope.ngDialogData.item,
@ -214,6 +213,7 @@ module Configs{
});
$scope.closeThisDialog();
}
function getSqlContent() {
$http({
url: "/java/console/api/filePackage/readSqlFile",
@ -283,8 +283,7 @@ module Configs{
if ($event.target.checked) {
if ($scope.checkboxItmes.indexOf(name) == -1)
$scope.checkboxItmes.push(name)
}
else{
} else {
for (var i = 0; i < $scope.checkboxItmes.length; i++) {
if ($scope.checkboxItmes[i] === name) {
$scope.checkboxItmes.splice(i, 1);
@ -328,7 +327,7 @@ module Configs{
export var dataExportController = controller("dataExportController", ['$scope', '$http', 'DataModel', 'ConfigsModel', ($scope, $http, DataModel: Developer.DataModelService, ConfigsModel: Configs.ConfigsModelService) => {
$scope.model = DataModel;
$scope.data = DataModel.data;
$scope.gatherOracles=ConfigsModel.oracleParam;
$scope.export = [{ "type": 1, "exportName": "原始数据" }, { "type": 2, "exportName": "汇总库" }, { "type": 3, "exportName": "标准表抽取脚本" }];
$scope.idList = [];
@ -392,16 +391,39 @@ module Configs{
}
$scope.onsubmit = (idList, typeList) => {
$http({
url: "/oracle/exportData",
method:'POST',
data: idList,typeList,
}).success(function(data,header,config,status){
console.log(data + "__" + header);
}).error(function(data,header,config,status){
console.log("获取脚本内容失败");
if (!idList.length) {
Configs.customAlert("提示", "请选择需要导出的数据", '', null, 0, "error");
return;
}
if (!typeList.length) {
Configs.customAlert("提示", "请选择需要导出的类型", '', null, 0, "error");
return;
}
var formData = {};
formData['idList'] = idList;
formData['typeList'] = typeList;
$.ajax({
async: false,
type: "POST",
contentType: "application/x-www-form-urlencoded",
url: UrlHelpers.join("/java/console/api/oracle/exportData"),
dataType: 'json',
data: { "idList": idList, "typeList": typeList },
// data: { "idList": idList, "typeList": typeList },
// data: JSON.stringify(formData),
success: (data) => {
Configs.customAlert("提示", "操作成功: 本次合计新增了" + data, '', null, 0, "success");
},
error: (data) => {
Configs.customAlert("提示", "操作成功: 本次合计新增了" + data, '', null, 0, "error");
}
});
$scope.closeThisDialog();
}
}]);

View File

@ -296,7 +296,6 @@ module Developer {
console.log("selected");
var exitedItems = Kubernetes.checkForCreateOracle($scope.model.transferTasks, items);
console.log(items);
console.log(12313132);
for (var i = 0; i < items.length; ++i) {
// code...
if (items[i].dataBaseType != 'ORACLE') {

View File

@ -233,7 +233,6 @@
</div>
</div>
</script>
<script type="text/ng-template" id="taskRecordEdit.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.TaskRecordEdit">
<button class="btn sj_btn" style="border:0;background:none;" ng-click="showDeleteOne.open(entity)" ng-disabled="entity.status == 1 || entity.status == 0">
@ -260,7 +259,6 @@
<div style="position:relative;text-align:right;width:100%;height:15px;line-height:90%">
<span>{{entity.process}}%</span>
</div>
<!-- <div ng-show="entity.status ===3" class="progress-bar progress-bar-danger active sj_progress_bar" role="progressbar" aria-valuenow="{{entity.process}}" aria-valuemin="30" aria-valuemax="100" style="width: 100%" title="{{entity.process}}%">
<span class="sj_progress_font">{{entity.process}}%</span>
</div> -->
@ -319,12 +317,34 @@
</script>
<script type="text/ng-template" id="isExistHot.html">
<div class="ngCellText" ng-init="entity=row.entity">
<div ng-show="true" title="是否是标准表汇总库">
<div ng-show="true" title="是否在热区">
<span ng-show="entity.existHotData == 0">&nbsp;</span>
<span ng-show="entity.existHotData == 1">&nbsp;</span>
</div>
</div>
</script>
<script type="text/ng-template" id="modal.html">
<div>
<div class="modal-header">
<h3 class="modal-title" align="center">
标题信息
</h3>
</div>
<div class="modal-body">
<div align="center">
{{data}}
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" ng-click="ok()">
确认
</button>
<button class="btn btn-warning" ng-click="cancel()">
退出
</button>
</div>
</div>
</script>
<div ng-controller="Kubernetes.TopLevel">
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
<div class="row kubernetes-view" ng-view></div>

View File

@ -4,8 +4,7 @@
module Kubernetes {
export var ReplicationControllerController = controller("ReplicationControllerController",
["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
export var ReplicationControllerController = controller("ReplicationControllerController", ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState,
$templateCache: ng.ITemplateCacheService, $location: ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
@ -53,5 +52,6 @@ module Kubernetes {
}
Core.$apply($scope);
}
}]);
}
]);
}

View File

@ -166,6 +166,7 @@ module System {
});
}
//boolean选择条件是/否
function booleanChoose() {
return [{ id: '是', title: '是' }, { id: '否', title: '否' }];