Merge branch 'master' of http://47.104.102.122:3000/shecs/Basf_FCL
This commit is contained in:
commit
ad9a022937
|
@ -15,12 +15,12 @@ namespace BLL.Common
|
|||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
public static string HttpGetRequest(string url)
|
||||
public static string HttpGetRequest(string url, string token ="")
|
||||
{
|
||||
string strGetResponse = string.Empty;
|
||||
try
|
||||
{
|
||||
var getRequest = CreateHttpRequest(url,"GET", "");
|
||||
var getRequest = CreateHttpRequest(url,"GET", token);
|
||||
var getResponse = getRequest.GetResponse() as HttpWebResponse;
|
||||
strGetResponse = GetHttpResponse(getResponse, "GET");
|
||||
}
|
||||
|
|
|
@ -67,6 +67,9 @@
|
|||
<f:HiddenField runat="server" ID="hidisDepScore4"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hidisDepScore5"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hidisDepScore6"></f:HiddenField>
|
||||
<f:HiddenField runat="server" Text="3.5" ID="hidMaxScore1"></f:HiddenField>
|
||||
<f:HiddenField runat="server" Text="4.5" ID="hidMaxScore2"></f:HiddenField>
|
||||
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField HeaderText="承包商<br/>Contractor" HeaderTextAlign="Center" Width="200px">
|
||||
|
@ -182,26 +185,55 @@
|
|||
//用户评分事件
|
||||
function renderRateUser(value, row) {
|
||||
var evaltype = row.rowValue["IsEvaluateType"];
|
||||
return F.rateHtml(value, {
|
||||
var html= F.rateHtml(value, {
|
||||
allowClear:true,
|
||||
readonly: evaltype == 1 ? true : false,
|
||||
allowHalf: true,
|
||||
textVisible: false
|
||||
});
|
||||
return html;
|
||||
}
|
||||
F.ready(function () {
|
||||
var grid1 = F(grid1ClientID);
|
||||
var control1 = '<%=this.hidMaxScore1.ClientID%>';
|
||||
var control2 = '<%=this.hidMaxScore2.ClientID%>';
|
||||
// 注册评分事件
|
||||
F.rateEvents(grid1.el, function (event, value) {
|
||||
var target = $(event.target);
|
||||
var cellEl = target.closest('.f-grid-cell');
|
||||
|
||||
var rowId = grid1.getRowId(cellEl);
|
||||
var columnId = grid1.getColumnId(cellEl);
|
||||
var columnName = grid1.getColumn(columnId).columnId;
|
||||
//获取控件值1()
|
||||
var maxScore1 = grid1.getItem(control1).value;
|
||||
//获取控件值2()
|
||||
var maxScore2 = grid1.getItem(control2).value;
|
||||
|
||||
//更新单元格的值
|
||||
grid1.updateCellValue(rowId, columnId, value);
|
||||
if (columnName = "Score1" && value >= parseFloat(maxScore1)) {
|
||||
F.alert("最大只能评" + maxScore1 + "分");
|
||||
var html = F.rateHtml(0, {
|
||||
allowClear: true,
|
||||
allowHalf: true,
|
||||
textVisible: false
|
||||
});
|
||||
grid1.getCellEl(rowId, columnId).html(html)
|
||||
}
|
||||
else if (columnName == "Score2" && value >= parseFloat(maxScore2)) {
|
||||
F.alert("最大只能评" + maxScore2 + "分");
|
||||
var html = F.rateHtml(0, {
|
||||
allowClear: true,
|
||||
allowHalf: true,
|
||||
textVisible: false
|
||||
});
|
||||
grid1.getCellEl(rowId, columnId).html(html)
|
||||
}
|
||||
else {
|
||||
//更新单元格的值
|
||||
grid1.updateCellValue(rowId, columnId, value);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -203,6 +203,24 @@ namespace FineUIPro.Web.Evaluation
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hidisDepScore6;
|
||||
|
||||
/// <summary>
|
||||
/// hidMaxScore1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hidMaxScore1;
|
||||
|
||||
/// <summary>
|
||||
/// hidMaxScore2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hidMaxScore2;
|
||||
|
||||
/// <summary>
|
||||
/// lblContractor 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -300,7 +300,6 @@
|
|||
<Content Include="Controls\My97DatePicker\开发包\skin\whyGreen\datepicker.css" />
|
||||
<Content Include="Controls\My97DatePicker\开发包\skin\whyGreen\img.gif" />
|
||||
<Content Include="Controls\ProgressBox.ascx" />
|
||||
<Content Include="ErrLog.txt" />
|
||||
<Content Include="App_Themes\Default\Default.css" />
|
||||
<Content Include="Evaluation\ContractorEvaluation.aspx" />
|
||||
<Content Include="Evaluation\ContractorEvaluationEdit.aspx" />
|
||||
|
@ -313,14 +312,6 @@
|
|||
<Content Include="Evaluation\PerformanceReport.aspx" />
|
||||
<Content Include="Evaluation\SafetyEvaluation.aspx" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="FileManage\editCAD.aspx" />
|
||||
<Content Include="FileManage\EditOffice.aspx" />
|
||||
<Content Include="FileManage\FileManageList.aspx" />
|
||||
<Content Include="FileManage\ntko.js" />
|
||||
<Content Include="FileManage\Read.aspx" />
|
||||
<Content Include="FileManage\ReadCad.aspx" />
|
||||
<Content Include="FileManage\Save.aspx" />
|
||||
<Content Include="FileManage\SaveCAD.aspx" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Images\dlu.gif" />
|
||||
<Content Include="Images\dlu1.gif" />
|
||||
|
@ -358,7 +349,6 @@
|
|||
<Content Include="Login.aspx" />
|
||||
<Content Include="AttachFile\fileupload.ashx" />
|
||||
<Content Include="MyWebService.asmx" />
|
||||
<Content Include="Report\ReportPrint.aspx" />
|
||||
<Content Include="res\css\common.css" />
|
||||
<Content Include="res\css\dashboard.css" />
|
||||
<Content Include="res\css\datalist.css" />
|
||||
|
@ -2568,7 +2558,6 @@
|
|||
<None Include="Controls\My97DatePicker\开发包\vssver.scc" />
|
||||
<Fakes Include="Fakes\Microsoft.ReportViewer.Common.fakes" />
|
||||
<Content Include="Doc\FC操作手册.docx" />
|
||||
<None Include="FileManage\uploadCADFile\Empty.dwg" />
|
||||
<Content Include="File\Excel\SES Report.xlsx" />
|
||||
<Content Include="File\Excel\SES ReportToCPT.xlsx" />
|
||||
<Content Include="File\Excel\EvaluationReport.xls" />
|
||||
|
@ -2597,17 +2586,6 @@
|
|||
<Content Include="SES\SESReport.ashx" />
|
||||
<Content Include="res\images\logo\logo.psd" />
|
||||
<Content Include="res\images\logo\logo_127.psd" />
|
||||
<Content Include="Report\FCLDS.xsc">
|
||||
<DependentUpon>FCLDS.xsd</DependentUpon>
|
||||
</Content>
|
||||
<None Include="Report\FCLDS.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSDataSetGenerator</Generator>
|
||||
<LastGenOutput>FCLDS.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="Report\FCLDS.xss">
|
||||
<DependentUpon>FCLDS.xsd</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\index\css\font\digifacewide.ttf" />
|
||||
<Content Include="res\index\css\font\iconfont.eot" />
|
||||
<Content Include="res\index\css\font\iconfont.ttf" />
|
||||
|
@ -3061,55 +3039,6 @@
|
|||
<Compile Include="Evaluation\SafetyEvaluation.aspx.designer.cs">
|
||||
<DependentUpon>SafetyEvaluation.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\editCAD.aspx.cs">
|
||||
<DependentUpon>editCAD.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\editCAD.aspx.designer.cs">
|
||||
<DependentUpon>editCAD.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\EditOffice.aspx.cs">
|
||||
<DependentUpon>EditOffice.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\EditOffice.aspx.designer.cs">
|
||||
<DependentUpon>EditOffice.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\FileManageList.aspx.cs">
|
||||
<DependentUpon>FileManageList.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\FileManageList.aspx.designer.cs">
|
||||
<DependentUpon>FileManageList.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\Read.aspx.cs">
|
||||
<DependentUpon>Read.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\Read.aspx.designer.cs">
|
||||
<DependentUpon>Read.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\ReadCad.aspx.cs">
|
||||
<DependentUpon>ReadCad.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\ReadCad.aspx.designer.cs">
|
||||
<DependentUpon>ReadCad.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\Save.aspx.cs">
|
||||
<DependentUpon>Save.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\Save.aspx.designer.cs">
|
||||
<DependentUpon>Save.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\SaveCAD.aspx.cs">
|
||||
<DependentUpon>SaveCAD.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileManage\SaveCAD.aspx.designer.cs">
|
||||
<DependentUpon>SaveCAD.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -3153,22 +3082,6 @@
|
|||
<DependentUpon>OperationError.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Report\FCLDS.cs">
|
||||
<DependentUpon>FCLDS.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Report\FCLDS.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>FCLDS.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Report\ReportPrint.aspx.cs">
|
||||
<DependentUpon>ReportPrint.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Report\ReportPrint.aspx.designer.cs">
|
||||
<DependentUpon>ReportPrint.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Report\ScoreDataSet.Designer.cs" />
|
||||
<Compile Include="Scripts\index.aspx.cs">
|
||||
<DependentUpon>index.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -3566,14 +3479,11 @@
|
|||
<LastGenOutput>Lan.en-US.designer.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Report\ScoreReport.rdlc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
|
|
|
@ -1587,14 +1587,7 @@
|
|||
// 回收时调用接口
|
||||
protected void Application_End(object sender, EventArgs e)
|
||||
{
|
||||
//调用接口
|
||||
string baseUrl = "https://fcl-test.basf-ypc.net.cn/api/api/DataSyncUserInfo/GetHrInfoList";
|
||||
BLL.Common.HttpHelper.HttpGetRequest(baseUrl);
|
||||
//var obj = JsonConvert.DeserializeObject<dynamic>(result);
|
||||
//if (obj.code == 200)
|
||||
//{
|
||||
// //成功
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
})
|
||||
$("#faskloginUrl").click(function () {
|
||||
let url = "https://login.microsoftonline.com/ecaa386b-c8df-4ce0-ad01-740cbdb5ba55/oauth2/v2.0/authorize";
|
||||
let clientId = "a7977a3e-06b5-4dfc-bd7f-5b6825f0d846";
|
||||
let clientId = "9379ad91-eef9-4956-a1ee-8b04bb3d42c8";
|
||||
let response_type = "code";
|
||||
let redirect_url = encodeURIComponent("http://localhost:6166/ssocallback.aspx");
|
||||
let scope = "openid profile";
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="FCLDBConnectionString" connectionString="Data Source=.\SQL2016;Initial Catalog=FCLDB;uid=sa;pwd=1111;" providerName="System.Data.SqlClient"/>
|
||||
<add name="FCLDBConnectionString" connectionString="Data Source=.;Initial Catalog=FCLDB;uid=sa;pwd=Sh@nghai9;" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<FineUIPro DebugMode="false" CustomTheme="Metro_Dark_Blue" EnableAnimation="true" JSLibrary="All"/>
|
||||
<appSettings>
|
||||
|
|
|
@ -21,13 +21,21 @@ namespace FineUIPro.Web
|
|||
Response.Redirect("~/login.aspx");
|
||||
return;
|
||||
}
|
||||
GetAccessToken(this.code);
|
||||
var token= GetAccessToken(this.code);
|
||||
var userInfo = getUserInfo(token);
|
||||
if (userInfo == null)
|
||||
{
|
||||
Response.Redirect("~/login.aspx");
|
||||
return;
|
||||
}
|
||||
|
||||
Response.Redirect("~/index.aspx");
|
||||
}
|
||||
|
||||
private AccessTokenModel GetAccessToken(string _code)
|
||||
{
|
||||
string clientId = "";
|
||||
string clientSecret = "";
|
||||
string clientId = "9379ad91-eef9-4956-a1ee-8b04bb3d42c8";
|
||||
string clientSecret = "iLu8Q~4DRYAn~sMjvO1j.tgRERFWhILvLYRPNc9S";
|
||||
string grant_type = "authorization_code";
|
||||
string redirect_url = "http://localhost:6166/ssocallback.aspx";
|
||||
string scope = "profile openid";
|
||||
|
@ -53,17 +61,45 @@ namespace FineUIPro.Web
|
|||
}
|
||||
|
||||
|
||||
private void getUserInfo(string _code)
|
||||
private UserTokenModel getUserInfo(AccessTokenModel token)
|
||||
{
|
||||
var objData = GetAccessToken(_code);
|
||||
if (objData == null)
|
||||
{
|
||||
//退出去login页面
|
||||
return;
|
||||
}
|
||||
string baseUrl = "https://graph.microsoft.com/oidc/userinfo";
|
||||
try
|
||||
{
|
||||
var result = HttpHelper.HttpGetRequest(baseUrl, token.access_token);
|
||||
|
||||
if (result.IndexOf("sub") > -1)
|
||||
{
|
||||
var info = JsonConvert.DeserializeObject<UserTokenModel>(result);
|
||||
//写入session信息
|
||||
//写入cookie信息
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//这里报错了,写入日志
|
||||
BLL.ErrLogInfo.WriteLog(ex.Message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class UserTokenModel
|
||||
{
|
||||
public string sub { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public string family_name { get; set; }
|
||||
|
||||
public string given_name { get; set; }
|
||||
|
||||
public string picture { get; set; }
|
||||
public string email { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
<add key="ClientValidationEnabled" value="true"/>
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
||||
<!--连接字符串-->
|
||||
<add key="ConnectionString" value="Server=.\sql2016;Database=FCLDB;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<add key="ConnectionString" value="Server=.;Database=FCLDB;Integrated Security=False;User ID=sa;Password=Sh@nghai9;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<!--版本号-->
|
||||
<add key="SystemVersion" value="WebApi_V2019-09-20-001"/>
|
||||
<!--附件上传物理路径-->
|
||||
|
|
Loading…
Reference in New Issue