init
|
|
@ -0,0 +1,25 @@
|
|||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[*.cs]
|
||||
|
||||
# CA1051: 不要声明可见实例字段
|
||||
dotnet_diagnostic.CA1051.severity = none
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2022 cache/options directory
|
||||
.vs/
|
||||
packages/
|
||||
/.svn
|
||||
LogError/
|
||||
logs/
|
||||
UploadFile/
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace common
|
||||
{
|
||||
public static class ConfigHelper
|
||||
{
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
static ConfigHelper()
|
||||
{
|
||||
////在当前目录或者根目录中寻找appsettings.json文件
|
||||
//var fileName = "appsettings.json";
|
||||
|
||||
//var directory = AppContext.BaseDirectory;
|
||||
//directory = directory.Replace("\\", "/");
|
||||
|
||||
//var filePath = $"{directory}/{fileName}";
|
||||
//if (!File.Exists(filePath))
|
||||
//{
|
||||
// var length = directory.IndexOf("/bin");
|
||||
// filePath = $"{directory.Substring(0, length)}/{fileName}";
|
||||
//}
|
||||
|
||||
//var builder = new ConfigurationBuilder().AddJsonFile(filePath, false, true);
|
||||
//var config =
|
||||
_configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json", optional: true, reloadOnChange: true).Build();
|
||||
}
|
||||
|
||||
public static string GetSectionValue(string key)
|
||||
{
|
||||
var vlaue= _configuration.GetSection(key).Value;
|
||||
return vlaue ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,164 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace common
|
||||
{
|
||||
public static class DateTimeTool
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取指定日期所在周的第一天,星期天为第一天
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetDateTimeWeekFirstDaySun(DateTime dateTime)
|
||||
{
|
||||
DateTime firstWeekDay = DateTime.Now;
|
||||
try
|
||||
{
|
||||
//得到是星期几,然后从当前日期减去相应天数
|
||||
int weeknow = Convert.ToInt32(dateTime.DayOfWeek);
|
||||
|
||||
int daydiff = (-1) * weeknow;
|
||||
|
||||
firstWeekDay = dateTime.AddDays(daydiff);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return firstWeekDay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定日期所在周的第一天,星期一为第一天
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetDateTimeWeekFirstDayMon(DateTime dateTime)
|
||||
{
|
||||
DateTime firstWeekDay = DateTime.Now;
|
||||
|
||||
try
|
||||
{
|
||||
int weeknow = Convert.ToInt32(dateTime.DayOfWeek);
|
||||
|
||||
//星期一为第一天,weeknow等于0时,要向前推6天。
|
||||
weeknow = (weeknow == 0 ? (7 - 1) : (weeknow - 1));
|
||||
|
||||
int daydiff = (-1) * weeknow;
|
||||
|
||||
firstWeekDay = dateTime.AddDays(daydiff);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return firstWeekDay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定日期所在周的最后一天,星期六为最后一天
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetDateTimeWeekLastDaySat(DateTime dateTime)
|
||||
{
|
||||
DateTime lastWeekDay = DateTime.Now;
|
||||
|
||||
try
|
||||
{
|
||||
int weeknow = Convert.ToInt32(dateTime.DayOfWeek);
|
||||
|
||||
int daydiff = (7 - weeknow) - 1;
|
||||
|
||||
lastWeekDay = dateTime.AddDays(daydiff);
|
||||
|
||||
}
|
||||
catch { }
|
||||
|
||||
return lastWeekDay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定日期所在周的最后一天,星期天为最后一天
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public static DateTime GetDateTimeWeekLastDaySun(DateTime dateTime)
|
||||
{
|
||||
DateTime lastWeekDay = DateTime.Now;
|
||||
|
||||
try
|
||||
{
|
||||
int weeknow = Convert.ToInt32(dateTime.DayOfWeek);
|
||||
|
||||
weeknow = (weeknow == 0 ? 7 : weeknow);
|
||||
|
||||
int daydiff = (7 - weeknow);
|
||||
|
||||
lastWeekDay = dateTime.AddDays(daydiff);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return lastWeekDay;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定日期的月份第一天
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetDateTimeMonthFirstDay(DateTime dateTime)
|
||||
{
|
||||
if (dateTime == null)
|
||||
{
|
||||
dateTime = DateTime.Now;
|
||||
}
|
||||
return new DateTime(dateTime.Year, dateTime.Month, 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定月份最后一天
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetDateTimeMonthLastDay(DateTime dateTime)
|
||||
{
|
||||
int day = DateTime.DaysInMonth(dateTime.Year, dateTime.Month);
|
||||
|
||||
return new DateTime(dateTime.Year, dateTime.Month, day);
|
||||
}
|
||||
/// <summary>
|
||||
/// 时间戳转为C#格式时间
|
||||
/// </summary>
|
||||
/// <param name=”timeStamp”></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetTimeFromLinuxTime(long timeStamp)
|
||||
{
|
||||
System.DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||
dtDateTime = dtDateTime.AddMilliseconds(timeStamp).ToLocalTime();
|
||||
return dtDateTime;
|
||||
}
|
||||
/// <summary>
|
||||
/// 时间戳转为C#格式时间
|
||||
/// </summary>
|
||||
/// <param name=”timeStamp”></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime GetTimeFromLinuxShortTime(long timeStamp)
|
||||
{
|
||||
DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
long lTime = long.Parse(timeStamp.ToString() + "0000000");
|
||||
TimeSpan toNow = new TimeSpan(lTime); return dtStart.Add(toNow);
|
||||
}
|
||||
/// <summary>
|
||||
/// DateTime时间格式转换为Unix时间戳格式
|
||||
/// </summary>
|
||||
/// <param name=”time”></param>
|
||||
/// <returns></returns>
|
||||
public static int ConvertDateTimeInt(System.DateTime time)
|
||||
{
|
||||
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
|
||||
return (int)(time - startTime).TotalSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
using log4net;
|
||||
using log4net.Config;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace common
|
||||
{
|
||||
public class LogHelper
|
||||
{
|
||||
|
||||
private static ILog logger;
|
||||
static LogHelper()
|
||||
{
|
||||
if (logger == null)
|
||||
{
|
||||
var repository = LogManager.CreateRepository("NETCoreRepository");
|
||||
//log4net从log4net.config文件中读取配置信息
|
||||
XmlConfigurator.Configure(repository, new FileInfo("log4net.config"));
|
||||
logger = LogManager.GetLogger(repository.Name, "InfoLogger");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 普通日志
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="exception"></param>
|
||||
public static void Info(string message, Exception exception = null)
|
||||
{
|
||||
if (exception == null)
|
||||
logger.Info(message);
|
||||
else
|
||||
logger.Info(message, exception);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 告警日志
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="exception"></param>
|
||||
public static void Warn(string message, Exception exception = null)
|
||||
{
|
||||
if (exception == null)
|
||||
logger.Warn(message);
|
||||
else
|
||||
logger.Warn(message, exception);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 错误日志
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="exception"></param>
|
||||
public static void Error(string message, Exception exception = null)
|
||||
{
|
||||
if (exception == null)
|
||||
logger.Error(message);
|
||||
else
|
||||
logger.Error(message, exception);
|
||||
}
|
||||
|
||||
//public static ILog log = LogManager.GetLogger(typeof(LogHelper));
|
||||
|
||||
//public static void Error(Exception ex)
|
||||
//{
|
||||
// log.Error(ex);
|
||||
//}
|
||||
|
||||
//public static void Error(string msg)
|
||||
//{
|
||||
// log.Error(msg);
|
||||
//}
|
||||
|
||||
//public static void Error(string msg, Exception ex)
|
||||
//{
|
||||
// log.Error(msg, ex);
|
||||
//}
|
||||
|
||||
//public static void Info(string msg)
|
||||
//{
|
||||
// log.Info(msg);
|
||||
//}
|
||||
|
||||
//public static void Debug(string msg)
|
||||
//{
|
||||
// log.Debug(msg);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,349 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace common
|
||||
{
|
||||
public class PhoneHelper
|
||||
{
|
||||
#region 超过8个数字的数据替换成*
|
||||
|
||||
/// <summary>
|
||||
/// 超过8个数字的数据替换成*
|
||||
/// </summary>
|
||||
/// <param name="txt"></param>
|
||||
/// <returns></returns>
|
||||
public static string Replace8Number(object txt)
|
||||
{
|
||||
if (txt == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
if (string.IsNullOrEmpty(txt.ToString()))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
var content = txt.ToString();
|
||||
//普通数字
|
||||
string numReg = @"\d+";
|
||||
var result = Regex.Matches(content, numReg).Cast<Match>().Select(t => t.Value).ToList();
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
foreach (var s in result)
|
||||
{
|
||||
if (s.Length > 7)
|
||||
{
|
||||
content = content.Replace(s, GetHideNumber(s));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//下标数字
|
||||
numReg = @"[₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{8,}";
|
||||
result = Regex.Matches(content, numReg).Cast<Match>().Select(t => t.Value).ToList();
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
foreach (var s in result)
|
||||
{
|
||||
if (s.Length > 7)
|
||||
{
|
||||
content = content.Replace(s, GetHideDownNumber(s));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//上标数字
|
||||
numReg = @"[¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰]{8,}";
|
||||
result = Regex.Matches(content, numReg).Cast<Match>().Select(t => t.Value).ToList();
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
foreach (var s in result)
|
||||
{
|
||||
if (s.Length > 7)
|
||||
{
|
||||
content = content.Replace(s, GetHideUpNumber(s));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//全角数字
|
||||
numReg = @"[1,2,3,4,5,6,7,8,9,0]{8,}";
|
||||
result = Regex.Matches(content, numReg).Cast<Match>().Select(t => t.Value).ToList();
|
||||
if (result != null && result.Count > 0)
|
||||
{
|
||||
foreach (var s in result)
|
||||
{
|
||||
if (s.Length > 7)
|
||||
{
|
||||
content = content.Replace(s, GetHideRoundNumber(s));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return content;
|
||||
}
|
||||
//全角数字屏蔽
|
||||
public static string GetHideRoundNumber(string phoneNo)
|
||||
{
|
||||
string rexstr = "";
|
||||
string xinghao = "";
|
||||
if (phoneNo.Length == 8)
|
||||
{
|
||||
rexstr = @"([1,2,3,4,5,6,7,8,9,0]{2})([1,2,3,4,5,6,7,8,9,0]{4})([1,2,3,4,5,6,7,8,9,0]{2})";
|
||||
xinghao = "****";
|
||||
}
|
||||
else if (phoneNo.Length == 9)
|
||||
{
|
||||
rexstr = @"([1,2,3,4,5,6,7,8,9,0]{2})([1,2,3,4,5,6,7,8,9,0]{5})([1,2,3,4,5,6,7,8,9,0]{2})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else if (phoneNo.Length == 10)
|
||||
{
|
||||
rexstr = @"([1,2,3,4,5,6,7,8,9,0]{2})([1,2,3,4,5,6,7,8,9,0]{5})([1,2,3,4,5,6,7,8,9,0]{3})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else
|
||||
{
|
||||
rexstr = @"([1,2,3,4,5,6,7,8,9,0]{3})([1,2,3,4,5,6,7,8,9,0]{" + (phoneNo.Length - 6) + @"})([1,2,3,4,5,6,7,8,9,0]{3})";
|
||||
for (int i = 0; i < (phoneNo.Length - 6); i++)
|
||||
{
|
||||
xinghao += "*";
|
||||
}
|
||||
}
|
||||
Regex re = new Regex(rexstr, RegexOptions.None);
|
||||
phoneNo = re.Replace(phoneNo, "$1" + xinghao + "$3");
|
||||
return phoneNo;
|
||||
}
|
||||
//上标数字屏蔽
|
||||
public static string GetHideUpNumber(string phoneNo)
|
||||
{
|
||||
string rexstr = "";
|
||||
string xinghao = "";
|
||||
if (phoneNo.Length == 8)
|
||||
{
|
||||
rexstr = @"([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{2})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{4})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{2})";
|
||||
xinghao = "****";
|
||||
}
|
||||
else if (phoneNo.Length == 9)
|
||||
{
|
||||
rexstr = @"([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{2})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{5})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{2})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else if (phoneNo.Length == 10)
|
||||
{
|
||||
rexstr = @"([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{2})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{5})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{3})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else
|
||||
{
|
||||
rexstr = @"([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{3})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{" + (phoneNo.Length - 6) + @"})([¹,²,³,⁴,⁵,⁶,⁷,⁸,⁹,⁰,]{3})";
|
||||
for (int i = 0; i < (phoneNo.Length - 6); i++)
|
||||
{
|
||||
xinghao += "*";
|
||||
}
|
||||
}
|
||||
Regex re = new Regex(rexstr, RegexOptions.None);
|
||||
phoneNo = re.Replace(phoneNo, "$1" + xinghao + "$3");
|
||||
return phoneNo;
|
||||
}
|
||||
//下标数字屏蔽
|
||||
public static string GetHideDownNumber(string phoneNo)
|
||||
{
|
||||
string rexstr = "";
|
||||
string xinghao = "";
|
||||
if (phoneNo.Length == 8)
|
||||
{
|
||||
rexstr = @"([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{2})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{4})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{2})";
|
||||
xinghao = "****";
|
||||
}
|
||||
else if (phoneNo.Length == 9)
|
||||
{
|
||||
rexstr = @"([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{2})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{5})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{2})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else if (phoneNo.Length == 10)
|
||||
{
|
||||
rexstr = @"([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{2})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{5})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{3})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else
|
||||
{
|
||||
rexstr = @"([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{3})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{" + (phoneNo.Length - 6) + @"})([₁,₂,₃,₄,₅,₆,₇,₈,₉,₀]{3})";
|
||||
for (int i = 0; i < (phoneNo.Length - 6); i++)
|
||||
{
|
||||
xinghao += "*";
|
||||
}
|
||||
}
|
||||
Regex re = new Regex(rexstr, RegexOptions.None);
|
||||
phoneNo = re.Replace(phoneNo, "$1" + xinghao + "$3");
|
||||
return phoneNo;
|
||||
}
|
||||
//数字屏蔽
|
||||
public static string GetHideNumber(string phoneNo)
|
||||
{
|
||||
string rexstr = "";
|
||||
string xinghao = "";
|
||||
if (phoneNo.Length == 8)
|
||||
{
|
||||
rexstr = @"(\d{2})(\d{4})(\d{2})";
|
||||
xinghao = "****";
|
||||
}
|
||||
else if (phoneNo.Length == 9)
|
||||
{
|
||||
rexstr = @"(\d{2})(\d{5})(\d{2})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else if (phoneNo.Length == 10)
|
||||
{
|
||||
rexstr = @"(\d{2})(\d{5})(\d{3})";
|
||||
xinghao = "*****";
|
||||
}
|
||||
else
|
||||
{
|
||||
rexstr = @"(\d{3})(\d{" + (phoneNo.Length - 6) + @"})(\d{3})";
|
||||
for (int i = 0; i < (phoneNo.Length - 6); i++)
|
||||
{
|
||||
xinghao += "*";
|
||||
}
|
||||
}
|
||||
Regex re = new Regex(rexstr, RegexOptions.None);
|
||||
phoneNo = re.Replace(phoneNo, "$1" + xinghao + "$3");
|
||||
return phoneNo;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 格式化以手机号码作为用户名的username
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
public static string FormatPhoneUserName(string username)
|
||||
{
|
||||
string newUsername = GetFormatPhoneUserName(username);//手机号码格式化
|
||||
return newUsername;
|
||||
}
|
||||
/// <summary>
|
||||
/// 格式化以手机号码作为用户名的username(存在多个用户名)
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
public static string FormatPhoneMoreUserName(string username)
|
||||
{
|
||||
string newUsername = GetFormatPhoneUserName(username);//手机号码格式化
|
||||
if (string.IsNullOrEmpty(newUsername))
|
||||
return newUsername;
|
||||
string userNames = string.Empty;
|
||||
foreach (var item in newUsername.Split(','))
|
||||
{
|
||||
userNames += FormatUserName(item) + ",";//用户名格式化
|
||||
}
|
||||
userNames = userNames.Substring(0, userNames.Length - 1);
|
||||
return userNames;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 格式化以手机号码作为用户名的username
|
||||
/// </summary>
|
||||
/// <param name="username">需要改动的用户名</param>
|
||||
/// <param name="ntype"></param>
|
||||
/// <returns></returns>
|
||||
public static string FormatPhoneUserNameContent(string username)
|
||||
{
|
||||
string newUsername = GetFormatPhoneUserName(username);//手机号码格式化
|
||||
return newUsername;
|
||||
}
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public static string FormatUserName(string userName)
|
||||
{
|
||||
/*
|
||||
用户名屏蔽规则:
|
||||
1、手机号形式的按原处理规则中间几位屏蔽;
|
||||
2、否则看用户名长度,小于等于5位的,第一位不屏蔽,后面的屏蔽,比如“test1”,处理后为“t****”;
|
||||
3、5位以上的,用户名长度除2向下取整,再减1做为起始值,从起始值开始后面4位用*号;比如“test123”,处理后为“te****3”
|
||||
*/
|
||||
if (string.IsNullOrEmpty(userName))
|
||||
return "";
|
||||
if (userName == "未设置")
|
||||
return userName;
|
||||
string newUserName = userName;
|
||||
//判断 是否已经在手机号屏蔽的时候屏蔽过一次
|
||||
if (userName.IndexOf("*****") > -1)
|
||||
{
|
||||
return newUserName;
|
||||
}
|
||||
int nameLth = newUserName.Length;
|
||||
if (nameLth <= 5)
|
||||
{
|
||||
newUserName = newUserName.Substring(0, 1) + GetAsterisk(nameLth - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
int startIndex = nameLth / 2;
|
||||
startIndex = startIndex - 1;
|
||||
newUserName = newUserName.Substring(0, startIndex) + "****" + newUserName.Substring(startIndex + 4, nameLth - startIndex - 4);
|
||||
}
|
||||
return newUserName;
|
||||
}
|
||||
/// <summary>
|
||||
/// 格式化以手机号码作为用户名的username
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
private static string GetFormatPhoneUserName(string username)
|
||||
{
|
||||
string newUsername = username;
|
||||
if (string.IsNullOrWhiteSpace(newUsername))
|
||||
return newUsername;
|
||||
while (ContainMobile(newUsername))
|
||||
{
|
||||
string phone = GetMobile(newUsername);
|
||||
if (string.IsNullOrWhiteSpace(phone))
|
||||
break;
|
||||
newUsername = newUsername.Replace(phone, (phone.Substring(0, 3) + "*****" + phone.Substring(8, 3)));
|
||||
}
|
||||
return newUsername;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取星号
|
||||
/// </summary>
|
||||
/// <param name="number">需要返回的星号数量</param>
|
||||
/// <returns></returns>
|
||||
private static string GetAsterisk(int number)
|
||||
{
|
||||
string xingHao = string.Empty;
|
||||
if (number == 0)
|
||||
return xingHao;
|
||||
for (int i = 0; i < number; i++)
|
||||
{
|
||||
xingHao += "*";
|
||||
}
|
||||
return xingHao;
|
||||
}
|
||||
|
||||
public static bool ContainMobile(string number)
|
||||
{
|
||||
string rgs = @".*(11|12|13|14|15|16|17|18|19)\d{9}.*";
|
||||
Regex reg = new Regex(rgs);
|
||||
return reg.IsMatch(number);
|
||||
}
|
||||
/// <summary>
|
||||
/// 从文本中返回号码字符串
|
||||
/// </summary>
|
||||
/// <param name="txt"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetMobile(string txt)
|
||||
{
|
||||
string rgs = @"(11|12|13|14|15|16|17|18|19)\d{9}";
|
||||
string result = Regex.Match(txt, rgs).Value;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace common
|
||||
{
|
||||
public class ValidationError
|
||||
{
|
||||
public ValidationError() { }
|
||||
public string ErrorMessage { get; set; }
|
||||
|
||||
}
|
||||
public class ValidationErrors : List<ValidationError>
|
||||
{
|
||||
/// <summary>
|
||||
/// 添加错误
|
||||
/// </summary>
|
||||
/// <param name="errorMessage">信息描述</param>
|
||||
public void Add(string errorMessage)
|
||||
{
|
||||
base.Add(new ValidationError { ErrorMessage = errorMessage });
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取错误集合
|
||||
/// </summary>
|
||||
public string Error
|
||||
{
|
||||
get
|
||||
{
|
||||
string error = "";
|
||||
this.All(a => {
|
||||
error += a.ErrorMessage;
|
||||
return true;
|
||||
});
|
||||
return error;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="log4net" Version="2.0.14" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
using common;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
public class DataContext : DbContext
|
||||
{
|
||||
|
||||
public DataContext()
|
||||
{
|
||||
}
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseMySql(ConfigHelper.GetSectionValue("ConnectionStrings:mysql"), new MySqlServerVersion("8.0"));
|
||||
}
|
||||
public virtual DbSet<ww_corp> ww_corps { get; set; }
|
||||
public virtual DbSet<ww_dept> ww_depts { get; set; }
|
||||
public virtual DbSet<ww_hhuser> ww_hhusers { get; set; }
|
||||
public virtual DbSet<ww_extuser> ww_extusres { get; set; }
|
||||
public virtual DbSet<ww_user_extuser> ww_user_extusers { get; set; }
|
||||
public virtual DbSet<ww_userinfo> ww_userinfos { get; set; }
|
||||
public virtual DbSet<ww_addway> ww_addways { get; set; }
|
||||
public virtual DbSet<ww_grouptag> ww_grouptags { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<ww_dept>().HasKey(x => new { x.deptid, x.corpid });
|
||||
modelBuilder.Entity<ww_grouptag>().HasKey(x => new { x.group_id, x.corpid });
|
||||
modelBuilder.Entity<ww_hhuser>().HasKey(x => new { x.corpid, x.userid });
|
||||
modelBuilder.Entity<ww_extuser>().HasKey(x => new { x.corpid, x.userid });
|
||||
modelBuilder.Entity<ww_user_extuser>().HasKey(x => new { x.userid, x.extuserid });
|
||||
modelBuilder.Entity<ww_userinfo>().HasKey(x => new { x.machineid, x.userid });
|
||||
modelBuilder.Entity<ww_grouptag>().HasKey(x => new { x.corpid, x.group_id });
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model.crmodel
|
||||
{
|
||||
public class Laypage
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 每页行数
|
||||
/// </summary>
|
||||
public int limit { get; set; }
|
||||
/// <summary>
|
||||
/// 当前页是第几页
|
||||
/// </summary>
|
||||
public int page { get; set; }
|
||||
/// <summary>
|
||||
/// 排序方式
|
||||
/// </summary>
|
||||
public string order { get; set; }
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
/// </summary>
|
||||
public string sort { get; set; }
|
||||
/// <summary>
|
||||
/// 总数据量
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model.crmodel
|
||||
{
|
||||
public class LayuiData<T>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// code :0正常 1不正常
|
||||
/// </summary>
|
||||
public int code { get; set; }
|
||||
public string msg { get; set; }
|
||||
public int count { get; set; }
|
||||
public List<T> data { get; set; }
|
||||
|
||||
public void SetFail(int code, string msg)
|
||||
{
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.count = 0;
|
||||
this.data = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model.crmodel
|
||||
{
|
||||
public class retMsg
|
||||
{
|
||||
public bool result { get; set; }
|
||||
public int retcode { get; set; }
|
||||
public string retmsg { get; set; }
|
||||
public void SetFail(string msg, int code)
|
||||
{
|
||||
this.result = false;
|
||||
this.retcode = code;
|
||||
this.retmsg = msg;
|
||||
}
|
||||
|
||||
public void SetResult(bool success, int code, string msg)
|
||||
{
|
||||
this.result = success;
|
||||
this.retcode = code;
|
||||
this.retmsg = msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\common\common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model.viewmodel
|
||||
{
|
||||
public class wwExtuserView
|
||||
{
|
||||
public string userid { get; set; }
|
||||
public string extuserid { get; set; }
|
||||
public string corpid { get; set; }
|
||||
public string nickname { get; set; }
|
||||
public string remark { get; set; }
|
||||
public long createtime { get; set; }
|
||||
public DateTime createtime2 { get; set; }
|
||||
public string thumb_avatar { get; set; }
|
||||
/// <summary>
|
||||
/// 根据时间来过滤的
|
||||
/// </summary>
|
||||
public string cdate { get; set; }
|
||||
/// <summary>
|
||||
/// 根据时间来过滤
|
||||
/// </summary>
|
||||
public string cmonth { get; set; }
|
||||
/// <summary>
|
||||
/// 根据时间来过滤
|
||||
/// </summary>
|
||||
public string chours { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 1:普通 2:日汇总
|
||||
/// </summary>
|
||||
public int type { get; set; }
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
public int xuhao { get; set; }
|
||||
|
||||
public string description { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string tags_type1 { get; set; }
|
||||
|
||||
public string tags_type2 { get; set; }
|
||||
|
||||
public string remark_corp_name { get; set; }
|
||||
|
||||
public int add_type { get; set; }
|
||||
|
||||
public int add_way { get; set; }
|
||||
|
||||
public bool deleted { get; set; }
|
||||
public List<TagInfo> tagInfos { get; set; }//标签组
|
||||
}
|
||||
|
||||
public class TagInfo
|
||||
{
|
||||
public string group_name { get; set; }
|
||||
public string tag_name { get; set; }
|
||||
public int type { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model.viewmodel
|
||||
{
|
||||
public class wwGroupTagView
|
||||
{
|
||||
|
||||
public string corpid { get; set; }
|
||||
|
||||
public string group_id { get; set; }
|
||||
|
||||
public string group_name { get; set; }
|
||||
|
||||
public long create_time { get; set; }
|
||||
|
||||
public int order { get; set; }
|
||||
|
||||
/*
|
||||
[{
|
||||
"id": "TAG_ID1",
|
||||
"name": "NAME1",
|
||||
"create_time": 1557838797,
|
||||
"order": 1,
|
||||
"deleted": false
|
||||
},
|
||||
{
|
||||
"id": "TAG_ID2",
|
||||
"name": "NAME2",
|
||||
"create_time": 1557838797,
|
||||
"order": 2,
|
||||
"deleted": true
|
||||
}
|
||||
]
|
||||
*/
|
||||
public string tags { get; set; }
|
||||
public List<wwGroupTagInfo> tagNumbers { get; set; }
|
||||
}
|
||||
public class wwGroupTagInfo
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string name { get; set; }
|
||||
public int order { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model.viewmodel
|
||||
{
|
||||
public class wwUserinfoView
|
||||
{
|
||||
public string machineid { get; set; }
|
||||
public string userid { get; set; }
|
||||
public string name { get; set; }
|
||||
public string exinfo { get; set; }
|
||||
public string mobile { get; set; }
|
||||
public string corpid { get; set; }
|
||||
public string corpname { get; set; }
|
||||
public string thumb_avatar { get; set; }
|
||||
public DateTime? ctime { get; set; }
|
||||
public int isdefault { get; set; }
|
||||
|
||||
}
|
||||
public class wwUserinfoExinfo
|
||||
{
|
||||
public string thumb_avatar { get; set; }
|
||||
public string avatar { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_addway")]
|
||||
public class ww_addway
|
||||
{
|
||||
[Key]
|
||||
public int id { get; set; }
|
||||
public string way { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_corp")]
|
||||
public class ww_corp
|
||||
{
|
||||
[Key]
|
||||
public string corpid { get; set; }
|
||||
|
||||
public string corpname { get; set; }
|
||||
|
||||
public string khsecret { get; set; }
|
||||
|
||||
public string txlsecret { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_dept")]
|
||||
public class ww_dept
|
||||
{
|
||||
[Key]
|
||||
public int deptid { get; set; }
|
||||
[Key]
|
||||
public string corpid { get; set; }
|
||||
|
||||
public string deptname { get; set; }
|
||||
|
||||
public int parentid { get; set; }
|
||||
|
||||
public string? orderseq { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_extuser")]
|
||||
public class ww_extuser
|
||||
{
|
||||
[Key]
|
||||
public string userid { get; set; }
|
||||
[Key]
|
||||
public string corpid { get; set; }
|
||||
public string name { get; set; }
|
||||
public string avatar { get; set; }
|
||||
|
||||
public DateTime ctime { get; set; }
|
||||
|
||||
public DateTime lastupdate { get; set; }
|
||||
|
||||
public string unionid { get; set; }
|
||||
|
||||
public string exinfo { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_grouptag")]
|
||||
public class ww_grouptag
|
||||
{
|
||||
[Key]
|
||||
public string corpid { get; set; }
|
||||
|
||||
[Key]
|
||||
public string group_id { get; set; }
|
||||
|
||||
public string group_name { get; set; }
|
||||
|
||||
public long create_time { get; set; }
|
||||
|
||||
public bool deleted { get; set; }
|
||||
|
||||
public int order { get; set; }
|
||||
|
||||
/*
|
||||
[{
|
||||
"id": "TAG_ID1",
|
||||
"name": "NAME1",
|
||||
"create_time": 1557838797,
|
||||
"order": 1,
|
||||
"deleted": false
|
||||
},
|
||||
{
|
||||
"id": "TAG_ID2",
|
||||
"name": "NAME2",
|
||||
"create_time": 1557838797,
|
||||
"order": 2,
|
||||
"deleted": true
|
||||
}
|
||||
]
|
||||
*/
|
||||
public string tag { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_hhuser")]
|
||||
public class ww_hhuser
|
||||
{
|
||||
[Key]
|
||||
public string userid { get; set; }
|
||||
[Key]
|
||||
public string corpid { get; set; }
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public string mobile { get; set; }
|
||||
|
||||
public string exinfo { get; set; }
|
||||
|
||||
public DateTime lastupdate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_user_extuser")]
|
||||
public class ww_user_extuser
|
||||
{
|
||||
[Key]
|
||||
public string userid { get; set; }
|
||||
[Key]
|
||||
public string extuserid { get; set; }
|
||||
|
||||
public string corpid { get; set; }
|
||||
|
||||
public string remark { get; set; }
|
||||
|
||||
public string description { get; set; }
|
||||
|
||||
public string tags_type1 { get; set; }
|
||||
|
||||
public string tags_type2 { get; set; }
|
||||
|
||||
public string remark_corp_name { get; set; }
|
||||
|
||||
public int add_type { get; set; }
|
||||
|
||||
public int add_way { get; set; }
|
||||
|
||||
public long createtime { get; set; }
|
||||
|
||||
public bool deleted { get; set; }
|
||||
|
||||
public int errnum { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace model
|
||||
{
|
||||
[Table("ww_userinfo")]
|
||||
public class ww_userinfo
|
||||
{
|
||||
[Key]
|
||||
public string machineid { get; set; }
|
||||
[Key]
|
||||
public string userid { get; set; }
|
||||
public string corpid { get; set; }
|
||||
public DateTime? ctime { get; set; }
|
||||
|
||||
public int isdefault { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
using common;
|
||||
using model;
|
||||
using model.viewmodel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace services
|
||||
{
|
||||
public interface IwwUserinfoService
|
||||
{
|
||||
List<wwUserinfoView> GetMyUserList(string machineid, string name);
|
||||
List<wwUserinfoView> GetMyDefault(string machineid);
|
||||
wwUserinfoView GetMyUserOne(string machineid, string corpid, string userid);
|
||||
bool BindUser(string machineid, string mobile, string remark, ref ValidationErrors errors);
|
||||
bool DisBindUser(string machineid, string userid, string corpid, ref ValidationErrors errors);
|
||||
List<wwExtuserView> GetExtUserList(string machineid, string corpid, string userid, ref Dictionary<string, string> customTags);
|
||||
bool SetDefault(string machineid, string corpid, string userid);
|
||||
|
||||
/// <summary>
|
||||
/// 获取添加来源条件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<ww_addway> GetAddWayList();
|
||||
|
||||
/// <summary>
|
||||
/// 获取某个企业号下所有的企业标签
|
||||
/// </summary>
|
||||
/// <param name="corpid"></param>
|
||||
/// <returns></returns>
|
||||
List<wwGroupTagView> GetGroupTagList(string corpid);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace services
|
||||
{
|
||||
public interface IwwhhuserService
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace services
|
||||
{
|
||||
public static class ServiceCore
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取程序集名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetAssemblyName()
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetName().Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="6.3.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\common\common.csproj" />
|
||||
<ProjectReference Include="..\model\model.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,337 @@
|
|||
using common;
|
||||
using model;
|
||||
using model.viewmodel;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace services
|
||||
{
|
||||
public class wwUserinfoService : IwwUserinfoService
|
||||
{
|
||||
public List<wwUserinfoView> GetMyUserList(string machineid, string name)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
var dd = (from a in db.ww_corps
|
||||
join b in db.ww_hhusers on a.corpid equals b.corpid
|
||||
join c in db.ww_userinfos on new { b.corpid, b.userid } equals new { c.corpid, c.userid }
|
||||
select new wwUserinfoView()
|
||||
{
|
||||
userid = b.userid,
|
||||
corpid = b.corpid,
|
||||
corpname = a.corpname,
|
||||
exinfo = b.exinfo,
|
||||
machineid = c.machineid,
|
||||
mobile = b.mobile,
|
||||
name = b.name,
|
||||
ctime = c.ctime,
|
||||
isdefault = c.isdefault
|
||||
}).Where(m => m.machineid == machineid);
|
||||
if (!string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
name = name.Trim();
|
||||
dd = dd.Where(m => m.name.Contains(name));
|
||||
}
|
||||
return dd.OrderByDescending(m => m.ctime).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public List<wwUserinfoView> GetMyDefault(string machineid)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
var dd = (from a in db.ww_corps
|
||||
join b in db.ww_hhusers on a.corpid equals b.corpid
|
||||
join c in db.ww_userinfos on new { b.corpid, b.userid } equals new { c.corpid, c.userid }
|
||||
select new wwUserinfoView()
|
||||
{
|
||||
userid = b.userid,
|
||||
corpid = b.corpid,
|
||||
corpname = a.corpname,
|
||||
exinfo = b.exinfo,
|
||||
machineid = c.machineid,
|
||||
mobile = b.mobile,
|
||||
name = b.name,
|
||||
ctime = c.ctime,
|
||||
isdefault = c.isdefault
|
||||
}).Where(m => m.machineid == machineid).ToList();
|
||||
return dd;
|
||||
}
|
||||
}
|
||||
|
||||
public wwUserinfoView GetMyUserOne(string machineid, string corpid, string userid)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
var dd = (from a in db.ww_corps
|
||||
join b in db.ww_hhusers on a.corpid equals b.corpid
|
||||
select new wwUserinfoView()
|
||||
{
|
||||
userid = b.userid,
|
||||
corpid = b.corpid,
|
||||
corpname = a.corpname,
|
||||
exinfo = b.exinfo,
|
||||
mobile = b.mobile,
|
||||
name = b.name,
|
||||
}).FirstOrDefault(m => m.corpid == corpid && m.userid == userid);
|
||||
|
||||
try
|
||||
{
|
||||
var json = JsonConvert.DeserializeObject<wwUserinfoExinfo>(dd.exinfo);
|
||||
dd.thumb_avatar = json.thumb_avatar ?? json.avatar;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new wwUserinfoView();
|
||||
}
|
||||
return dd;
|
||||
}
|
||||
}
|
||||
|
||||
public bool BindUser(string machineid, string mobile, string remark, ref ValidationErrors errors)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(mobile))
|
||||
{
|
||||
errors.Add("号码不能为空!");
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(remark))
|
||||
{
|
||||
errors.Add("备注不能为空!");
|
||||
return false;
|
||||
}
|
||||
mobile = mobile.Trim();
|
||||
remark = remark.Trim();
|
||||
|
||||
var userList = db.ww_hhusers.Where(m => m.mobile == mobile).ToList();
|
||||
if (userList == null || userList.Count() == 0)
|
||||
{
|
||||
errors.Add("找不到" + mobile + "对应的企微!");
|
||||
return false;
|
||||
}
|
||||
//
|
||||
foreach (var user in userList)//一个号码多个企业微信的时候,需要进行循环全部考虑进去
|
||||
{
|
||||
var ent = db.ww_userinfos.FirstOrDefault(m => m.machineid == machineid && m.userid == user.userid && m.corpid == user.corpid);
|
||||
if (ent != null)
|
||||
{
|
||||
errors.Add($"号码{mobile}|{user.name}已绑定!");
|
||||
continue;
|
||||
}
|
||||
var lastm = db.ww_user_extusers.FirstOrDefault(m => m.userid == user.userid && m.corpid == user.corpid && m.remark == remark);
|
||||
if (lastm == null)
|
||||
{
|
||||
errors.Add("信息不对,无法绑定!");
|
||||
continue;
|
||||
}
|
||||
ww_userinfo info = new ww_userinfo()
|
||||
{
|
||||
machineid = machineid,
|
||||
userid = user.userid,
|
||||
corpid = user.corpid,
|
||||
ctime = DateTime.Now
|
||||
};
|
||||
db.ww_userinfos.Add(info);
|
||||
db.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.ToString());
|
||||
errors.Add("系统错误");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisBindUser(string machineid, string userid, string corpid, ref ValidationErrors errors)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(machineid))
|
||||
{
|
||||
errors.Add("参数错误!");
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(userid))
|
||||
{
|
||||
errors.Add("参数错误!");
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(corpid))
|
||||
{
|
||||
errors.Add("参数错误!");
|
||||
return false;
|
||||
}
|
||||
machineid = machineid.Trim();
|
||||
userid = userid.Trim();
|
||||
corpid = corpid.Trim();
|
||||
var user = db.ww_userinfos.FirstOrDefault(m => m.machineid == machineid && m.userid == userid && m.corpid == corpid);
|
||||
if (user == null)
|
||||
{
|
||||
errors.Add("找不到数据!");
|
||||
return false;
|
||||
}
|
||||
db.ww_userinfos.Remove(user);
|
||||
db.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public List<wwExtuserView> GetExtUserList(string machineid, string corpid, string userid, ref Dictionary<string, string> customTags)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
var dd = (from a in db.ww_user_extusers
|
||||
join c in db.ww_extusres on new { a.corpid, a.extuserid } equals new { c.corpid, extuserid = c.userid }
|
||||
join b in db.ww_hhusers on new { a.corpid, a.userid } equals new { b.corpid, b.userid }
|
||||
select new wwExtuserView()
|
||||
{
|
||||
userid = b.userid,
|
||||
corpid = b.corpid,
|
||||
createtime = a.createtime,
|
||||
extuserid = a.extuserid,
|
||||
nickname = c.name,
|
||||
remark = a.remark,
|
||||
thumb_avatar = c.avatar,
|
||||
description = a.description,
|
||||
deleted = a.deleted,//是否删除
|
||||
tags_type1 = a.tags_type1,//企业标签
|
||||
tags_type2 = a.tags_type2,//个人标签
|
||||
remark_corp_name = a.remark_corp_name,//企业备注
|
||||
add_type = a.add_type,//添加类型 0被加,1主动加,2分配转移
|
||||
add_way = a.add_way//添加途径 从数据库中读取表
|
||||
}).Where(m => m.corpid == corpid && m.userid == userid && m.deleted == false).OrderByDescending(m => m.createtime).ToList();
|
||||
int xuhao = 0;
|
||||
List<wwExtuserView> monthGroupBy = new List<wwExtuserView>();
|
||||
Dictionary<string, string> dic = new Dictionary<string, string>();
|
||||
foreach (var item in dd)
|
||||
{
|
||||
item.tagInfos = new List<TagInfo>();
|
||||
if (string.IsNullOrWhiteSpace(item.remark_corp_name))
|
||||
{
|
||||
item.remark_corp_name = "";
|
||||
}
|
||||
try//企业标签
|
||||
{
|
||||
var tag1 = JsonConvert.DeserializeObject<List<TagInfo>>(item.tags_type1);
|
||||
item.tagInfos.AddRange(tag1);
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
try//自定义标签
|
||||
{
|
||||
var tag2 = JsonConvert.DeserializeObject<List<TagInfo>>(item.tags_type2);
|
||||
foreach (var mytag in tag2)
|
||||
{
|
||||
if (!customTags.ContainsKey(mytag.tag_name))
|
||||
{
|
||||
customTags.Add(mytag.tag_name, mytag.tag_name);
|
||||
}
|
||||
}
|
||||
item.tagInfos.AddRange(tag2);
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
xuhao++;
|
||||
item.createtime2 = DateTimeTool.GetTimeFromLinuxShortTime(item.createtime);
|
||||
item.cdate = item.createtime2.ToString("yyyy-MM-dd");
|
||||
item.type = 1;
|
||||
item.cmonth = item.createtime2.ToString("yyyy-MM");
|
||||
item.chours = item.createtime2.ToString("HH:mm:ss");
|
||||
////跟据日来算
|
||||
//if (!dic.ContainsKey(item.cdate))
|
||||
//{
|
||||
// dic.Add(item.cdate, item.cdate);
|
||||
// monthGroupBy.Add(new wwExtuserView()
|
||||
// {
|
||||
// type = 2,
|
||||
// nickname = item.cdate,
|
||||
// cdate = item.cdate,
|
||||
// xuhao = xuhao,
|
||||
// cmonth = item.cmonth
|
||||
// });
|
||||
// xuhao++;
|
||||
//}
|
||||
item.xuhao = xuhao;//赋值序号
|
||||
}
|
||||
dd.AddRange(monthGroupBy);
|
||||
return dd.OrderBy(m => m.xuhao).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public bool SetDefault(string machineid, string corpid, string userid)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
var list = db.ww_userinfos.Where(m => m.machineid == machineid).ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item.userid == userid)
|
||||
{
|
||||
//var entry = db.ww_userinfos.FirstOrDefault(m => m.machineid == machineid && m.userid == item.userid);
|
||||
item.isdefault = 1;
|
||||
db.SaveChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
//var entry = db.ww_userinfos.FirstOrDefault(m => m.machineid == machineid && m.userid == item.userid);
|
||||
item.isdefault = 0;
|
||||
db.SaveChanges();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取添加来源条件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<ww_addway> GetAddWayList()
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
return db.ww_addways.OrderBy(m => m.id).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取某个企业号下所有的企业标签
|
||||
/// </summary>
|
||||
/// <param name="corpid"></param>
|
||||
/// <returns></returns>
|
||||
public List<wwGroupTagView> GetGroupTagList(string corpid)
|
||||
{
|
||||
using (var db = new DataContext())
|
||||
{
|
||||
var list = db.ww_grouptags.Where(m => m.corpid == corpid).OrderBy(m => m.order).ToList();
|
||||
List<wwGroupTagView> viewList = new List<wwGroupTagView>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
try
|
||||
{
|
||||
var info = JsonConvert.DeserializeObject<List<wwGroupTagInfo>>(item.tag);
|
||||
if (info != null)
|
||||
viewList.Add(new wwGroupTagView()
|
||||
{
|
||||
corpid = item.corpid,
|
||||
order = item.order,
|
||||
tags = item.tag,
|
||||
create_time = item.create_time,
|
||||
group_id = item.group_id,
|
||||
group_name = item.group_name,
|
||||
tagNumbers = info.ToList()
|
||||
});
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
return viewList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace services
|
||||
{
|
||||
public class wwhhuserService : IwwhhuserService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,340 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using model;
|
||||
using model.crmodel;
|
||||
using model.viewmodel;
|
||||
using services;
|
||||
using System.Diagnostics;
|
||||
using web.Models;
|
||||
using Newtonsoft.Json;
|
||||
using common;
|
||||
|
||||
namespace web.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
private readonly IwwUserinfoService _iwwUserinfoService;
|
||||
|
||||
public HomeController(IwwUserinfoService iwwUserinfoService, ILogger<HomeController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_iwwUserinfoService = iwwUserinfoService;
|
||||
}
|
||||
|
||||
public IActionResult Default(string machineid)
|
||||
{
|
||||
List<wwUserinfoView> accountList = _iwwUserinfoService.GetMyDefault(machineid);
|
||||
if (accountList.Count() == 0)
|
||||
{
|
||||
return Redirect("Index?needBind=1&machineid=" + machineid);
|
||||
}
|
||||
else
|
||||
{
|
||||
var defaultAcount = accountList.FirstOrDefault(m => m.isdefault == 1);
|
||||
if (defaultAcount != null)
|
||||
{
|
||||
return Redirect("CSelectionTag?machineid=" + machineid + "&userid=" + defaultAcount.userid + "&corpid=" + defaultAcount.corpid);//直接进入默认
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("Index?machineid=" + machineid);//如果没有默认,就进入进行自己选择
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult Index(string machineid, int? needBind)
|
||||
{
|
||||
if (string.IsNullOrEmpty(machineid))
|
||||
{
|
||||
return Redirect("Error");//跳转
|
||||
}
|
||||
ViewBag.Machineid = machineid;
|
||||
if (needBind.HasValue)
|
||||
{
|
||||
ViewBag.needBind = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewBag.needBind = 0;
|
||||
}
|
||||
return View();
|
||||
}
|
||||
|
||||
public JsonResult GetWeWorktHtmlList(string machineid, string name)
|
||||
{
|
||||
var layUidata = new LayuiData<wwUserinfoView>();
|
||||
try
|
||||
{
|
||||
List<wwUserinfoView> list = _iwwUserinfoService.GetMyUserList(machineid, name);
|
||||
foreach (var item in list)
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = JsonConvert.DeserializeObject<wwUserinfoExinfo>(item.exinfo);
|
||||
item.thumb_avatar = json.thumb_avatar ?? json.avatar;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e.ToString());
|
||||
}
|
||||
}
|
||||
layUidata.msg = "数据加载成功";
|
||||
layUidata.code = 0;
|
||||
layUidata.data = list;
|
||||
layUidata.count = 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex.ToString());
|
||||
LogHelper.Error(ex.ToString());
|
||||
|
||||
layUidata.SetFail(1, "出现错误!" + ex.Message);
|
||||
}
|
||||
return Json(layUidata);
|
||||
}
|
||||
|
||||
public IActionResult Bind(string machineid)
|
||||
{
|
||||
ViewBag.machineid = machineid;
|
||||
return View();
|
||||
}
|
||||
|
||||
public JsonResult BindSave(string machineid, string mobile, string remark)
|
||||
{
|
||||
ValidationErrors erro = new ValidationErrors();
|
||||
bool result = _iwwUserinfoService.BindUser(machineid, mobile, remark, ref erro);
|
||||
retMsg ret = new retMsg() { result = result, retcode = 200, retmsg = "设置成功!" };
|
||||
if (!result)
|
||||
{
|
||||
ret.retmsg = erro.Error;
|
||||
}
|
||||
return Json(ret);
|
||||
}
|
||||
|
||||
public JsonResult DisBind(string machineid, string userid, string corpid)
|
||||
{
|
||||
ValidationErrors erro = new ValidationErrors();
|
||||
bool result = _iwwUserinfoService.DisBindUser(machineid, userid, corpid, ref erro);
|
||||
retMsg ret = new retMsg() { result = result, retcode = 200, retmsg = "操作成功!" };
|
||||
if (!result)
|
||||
{
|
||||
ret.retmsg = erro.Error;
|
||||
}
|
||||
return Json(ret);
|
||||
}
|
||||
|
||||
public IActionResult AllTab(string machineid, string userid, string corpid)
|
||||
{
|
||||
ViewBag.machineid = machineid;
|
||||
ViewBag.userid = userid;
|
||||
ViewBag.corpid = corpid;
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 时间格式
|
||||
/// </summary>
|
||||
/// <param name="machineid"></param>
|
||||
/// <param name="userid"></param>
|
||||
/// <param name="corpid"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult CSelection(string machineid, string userid, string corpid)
|
||||
{
|
||||
ViewBag.machineid = machineid;
|
||||
ViewBag.userid = userid;
|
||||
ViewBag.corpid = corpid;
|
||||
ViewBag.MyUser = _iwwUserinfoService.GetMyUserOne(machineid, corpid, userid);
|
||||
Dictionary<string, string> customTags = new Dictionary<string, string>();
|
||||
var list = _iwwUserinfoService.GetExtUserList(machineid, corpid, userid, ref customTags);//List<wwExtuserView> list =
|
||||
|
||||
//ViewBag.customTags = customTags;//自定义标签
|
||||
ViewBag.Data = Newtonsoft.Json.JsonConvert.SerializeObject(list);
|
||||
ViewBag.DataList = list;
|
||||
Dictionary<string, List<string>> diclist = new Dictionary<string, List<string>>();
|
||||
//var tagList = _iwwUserinfoService.GetGroupTagList(corpid);//获取所有标签
|
||||
//ViewBag.TagList = tagList;//所有标签
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item.type != 2)
|
||||
{
|
||||
string yearStr = item.createtime2.Year.ToString();
|
||||
if (diclist.ContainsKey(yearStr))
|
||||
{
|
||||
if (diclist[yearStr].Where(m => m == item.cmonth).Count() > 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
diclist[yearStr].Add(item.cmonth);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
diclist.Add(yearStr, new List<string>() { item.cmonth });
|
||||
}
|
||||
}
|
||||
}
|
||||
ViewBag.YearMonthList = diclist;
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标签方式查看数据
|
||||
/// </summary>
|
||||
/// <param name="machineid"></param>
|
||||
/// <param name="userid"></param>
|
||||
/// <param name="corpid"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult CSelectionTag(string machineid, string userid, string corpid)
|
||||
{
|
||||
ViewBag.machineid = machineid;
|
||||
ViewBag.userid = userid;
|
||||
ViewBag.corpid = corpid;
|
||||
ViewBag.MyUser = _iwwUserinfoService.GetMyUserOne(machineid, corpid, userid);
|
||||
Dictionary<string, string> customTags = new Dictionary<string, string>();
|
||||
var list = _iwwUserinfoService.GetExtUserList(machineid, corpid, userid, ref customTags);//List<wwExtuserView> list =
|
||||
|
||||
ViewBag.customTags = customTags;//自定义标签
|
||||
ViewBag.Data = Newtonsoft.Json.JsonConvert.SerializeObject(list);
|
||||
ViewBag.DataList = list;
|
||||
Dictionary<string, List<string>> diclist = new Dictionary<string, List<string>>();
|
||||
var tagList = _iwwUserinfoService.GetGroupTagList(corpid);//获取所有标签
|
||||
ViewBag.TagList = tagList;//所有标签
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item.type != 2)
|
||||
{
|
||||
string yearStr = item.createtime2.Year.ToString();
|
||||
if (diclist.ContainsKey(yearStr))
|
||||
{
|
||||
if (diclist[yearStr].Where(m => m == item.cmonth).Count() > 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
diclist[yearStr].Add(item.cmonth);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
diclist.Add(yearStr, new List<string>() { item.cmonth });
|
||||
}
|
||||
}
|
||||
}
|
||||
ViewBag.YearMonthList = diclist;
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 企业筛选
|
||||
/// </summary>
|
||||
/// <param name="machineid"></param>
|
||||
/// <param name="userid"></param>
|
||||
/// <param name="corpid"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult CSelectionQY(string machineid, string userid, string corpid)
|
||||
{
|
||||
ViewBag.machineid = machineid;
|
||||
ViewBag.userid = userid;
|
||||
ViewBag.corpid = corpid;
|
||||
ViewBag.MyUser = _iwwUserinfoService.GetMyUserOne(machineid, corpid, userid);
|
||||
Dictionary<string, string> customTags = new Dictionary<string, string>();
|
||||
var list = _iwwUserinfoService.GetExtUserList(machineid, corpid, userid, ref customTags);//List<wwExtuserView> list =
|
||||
|
||||
ViewBag.customTags = customTags;//自定义标签
|
||||
ViewBag.Data = Newtonsoft.Json.JsonConvert.SerializeObject(list);
|
||||
ViewBag.DataList = list;
|
||||
Dictionary<string, List<string>> diclist = new Dictionary<string, List<string>>();
|
||||
var tagList = _iwwUserinfoService.GetGroupTagList(corpid);//获取所有标签
|
||||
ViewBag.TagList = tagList;//所有标签
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item.type != 2)
|
||||
{
|
||||
string yearStr = item.createtime2.Year.ToString();
|
||||
if (diclist.ContainsKey(yearStr))
|
||||
{
|
||||
if (diclist[yearStr].Where(m => m == item.cmonth).Count() > 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
diclist[yearStr].Add(item.cmonth);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
diclist.Add(yearStr, new List<string>() { item.cmonth });
|
||||
}
|
||||
}
|
||||
}
|
||||
ViewBag.YearMonthList = diclist;
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
public JsonResult CSelectionWorkAll(string machineid, string userid, string corpid)
|
||||
{
|
||||
var layUidata = new LayuiData<wwExtuserView>();
|
||||
try
|
||||
{
|
||||
Dictionary<string, string> customTags = new Dictionary<string, string>();
|
||||
List<wwExtuserView> list = _iwwUserinfoService.GetExtUserList(machineid, corpid, userid, ref customTags);
|
||||
//Dictionary<string, List<string>> diclist = new Dictionary<string, List<string>>();
|
||||
//foreach (var item in list.GroupBy(m=>m.cmonth))
|
||||
//{
|
||||
//}
|
||||
layUidata.msg = "数据加载成功";
|
||||
layUidata.code = 0;
|
||||
layUidata.data = list;
|
||||
layUidata.count = 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex.ToString());
|
||||
layUidata.SetFail(1, "出现错误!" + ex.Message);
|
||||
|
||||
LogHelper.Error(ex.ToString());
|
||||
}
|
||||
return Json(layUidata);
|
||||
}
|
||||
|
||||
public JsonResult SetDefault(string machineid, string userid, string corpid)
|
||||
{
|
||||
ValidationErrors erro = new ValidationErrors();
|
||||
var result = true;
|
||||
retMsg ret = new retMsg() { result = result, retcode = 200, retmsg = "操作成功!" };
|
||||
try
|
||||
{
|
||||
result = _iwwUserinfoService.SetDefault(machineid, corpid, userid);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
ret.retmsg = "出现错误!";
|
||||
ret.result = result;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(ex.ToString());
|
||||
}
|
||||
return Json(ret);
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["web/web.csproj", "web/"]
|
||||
COPY ["model/model.csproj", "model/"]
|
||||
COPY ["common/common.csproj", "common/"]
|
||||
COPY ["services/services.csproj", "services/"]
|
||||
RUN dotnet restore "web/web.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/web"
|
||||
RUN dotnet build "web.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "web.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "web.dll"]
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace web.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
using Autofac;
|
||||
using Autofac.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore;
|
||||
using services;
|
||||
using System.Reflection;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
||||
builder.Host.ConfigureContainer<ContainerBuilder>(builder =>
|
||||
{
|
||||
Assembly assembly = Assembly.Load(ServiceCore.GetAssemblyName());//ÅúÁ¿×¢Èë
|
||||
builder.RegisterAssemblyTypes(assembly)
|
||||
.AsImplementedInterfaces()
|
||||
.InstancePerDependency();
|
||||
//builder.RegisterType<wwUserinfoService>().As<IwwUserinfoService>();//µ¥¸ö×¢Èë
|
||||
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.Run();
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>False</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33458",
|
||||
"sslPort": 44349
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"web": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://0.0.0.0:7777",
|
||||
"dotnetRunMessages": true
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"publishAllPorts": true,
|
||||
"useSSL": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
@using model;
|
||||
@{
|
||||
ViewBag.Title = "我的企业微信";
|
||||
Layout = "~/Views/Shared/_content.cshtml";
|
||||
}
|
||||
<div class="layui-tab layui-tab-card">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">时间分组</li>
|
||||
<li>标签分组</li>
|
||||
<li>企业分组</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="height: 100px;">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<iframe frameborder="0" src="CSelection?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)"></iframe>
|
||||
</div>
|
||||
<div class="layui-tab-item">2</div>
|
||||
<div class="layui-tab-item">3</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
@{
|
||||
ViewBag.Title = "绑定";
|
||||
Layout = "~/Views/Shared/_form.cshtml";
|
||||
}
|
||||
<style>
|
||||
.layui-form-label {
|
||||
}
|
||||
|
||||
.my_form_iterm {
|
||||
width: 60%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="layui-form-item" style="margin-top:20px;">
|
||||
<label class="layui-form-label">
|
||||
手机号码
|
||||
</label>
|
||||
<div class="layui-input-block my_form_iterm">
|
||||
<input type="hidden" name="machineid" value="@ViewBag.machineid" />
|
||||
<input autocomplete="off" class="layui-input" id="mobile" lay-reqtext="手机号码不能空!" lay-verify="required" name="mobile" placeholder="手机号码" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top:20px;">
|
||||
<label class="layui-form-label">
|
||||
客户备注
|
||||
</label>
|
||||
<div class="layui-input-block my_form_iterm">
|
||||
<input autocomplete="off" class="layui-input" id="remark" lay-reqtext="备注不能为空!" lay-verify="required" name="remark" placeholder="客户备注" type="text" value="">
|
||||
<span class="layui-form-mid"> (注:任意某个客户备注)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block my_form_iterm">
|
||||
<button class="layui-btn layui-btn-ok" lay-submit lay-filter="formDemo">保存</button>
|
||||
<button onclick="parent.Closed()" type="button" class="layui-btn layui-btn-primary">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
layui.use('form', function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
//监听提交
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "BindSave",
|
||||
data: data.field,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
parent.layer.msg('操作成功!', { icon: 1 });
|
||||
parent.TableReload();
|
||||
parent.Closed();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
});
|
||||
//各种基于事件的操作,下面会有进一步介绍
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,687 @@
|
|||
@using model;
|
||||
@using model.viewmodel;
|
||||
@{
|
||||
ViewBag.Title = "我的企业微信";
|
||||
Layout = "~/Views/Shared/_content.cshtml";
|
||||
wwUserinfoView myinfo = (wwUserinfoView)ViewBag.MyUser;
|
||||
Dictionary<string, List<string>> diclist = ViewBag.YearMonthList;
|
||||
List<wwExtuserView> datalist = ViewBag.DataList;
|
||||
}
|
||||
|
||||
<!--确定宽度-->
|
||||
<style type="text/css">
|
||||
.myUL li {
|
||||
line-height: 25px;
|
||||
display: inline-block;
|
||||
width: 170px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
input[type='checkbox'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.myChooseUL li {
|
||||
line-height: 35px;
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-table-body .layui-table-cell {
|
||||
height: auto;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.mycheckbox {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.layui-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.layui-table[lay-even] tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.layui-table td, .layui-table th, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
|
||||
border-width: 1px !important;
|
||||
border-style: solid;
|
||||
border-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.mxxx input, .mxxx a {
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
width: 35px;
|
||||
padding: 0 3px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.mxxx .layui-btn + .layui-btn {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.XuanFuTop {
|
||||
position: fixed;
|
||||
/* right: 15px;
|
||||
bottom: 15px;*/
|
||||
z-index: 999979;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
bottom: 0px;
|
||||
border-top: 1px solid #cac7c7;
|
||||
}
|
||||
|
||||
.PointClass {
|
||||
padding-top: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.hgguanjianci {
|
||||
background-color: #FF9800;
|
||||
color: white
|
||||
}
|
||||
|
||||
.LiClas {
|
||||
background-color: #08af0a;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.MyUL2 {
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.MyUL2 li {
|
||||
line-height: 16px;
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.selftopwhere {
|
||||
padding-top: 3px !important;
|
||||
}
|
||||
|
||||
.mxxx a {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.layui-tab-title .layui-this {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.layui-tab-title .layui-this:after {
|
||||
border-bottom: 2px solid #01AAED !important;
|
||||
}
|
||||
|
||||
.MyUL2 a {
|
||||
color: #01AAED;
|
||||
}
|
||||
|
||||
.MyUL2 a:hover {
|
||||
color: #01AAED !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.myUL a {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.myUL a:hover {
|
||||
color: #01AAED !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
|
||||
.hiddenLi {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<div id="XuanFuTop" class="XuanFuTop" style="display:none;">
|
||||
<form class="layui-form selftopwhere" id="myform" style="padding-top: 5px;">
|
||||
<div class="layui-form-item">
|
||||
名称:
|
||||
<div class="layui-inline">
|
||||
<input id="searchname2" type="text" style="width:130px;" name="name" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-inline" style="width:250px">
|
||||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search2" type="button" value="查询" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndCheck2" style="margin-left:0px;padding: 0 4px;" type="button" value="✔匹配勾选" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndUnCheck2" style="margin-left:0px;padding: 0 4px;" type="button" value="✖匹配去除" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
var table;
|
||||
$(function () {
|
||||
var xx=0;
|
||||
$(window).scroll(function(){
|
||||
//console.log($(window).scrollTop());
|
||||
if($(window).scrollTop() >= 224){
|
||||
$("#XuanFuTop").fadeIn(800); // 开始淡入
|
||||
}
|
||||
//else{
|
||||
// $("#XuanFuTop").stop(true,true).fadeOut(800); // 如果小于等于 300 淡出
|
||||
//}
|
||||
|
||||
if($(window).scrollTop() >= 50){
|
||||
$("#ShowChoose").fadeIn(500); // 开始淡入
|
||||
}
|
||||
else{
|
||||
$("#ShowChoose").stop(true,true).fadeOut(500); // 如果小于等于 300 淡出
|
||||
}
|
||||
});
|
||||
$(".layui-fixbar-top").click(function(){
|
||||
$('html, body').animate({scrollTop:0}, 'slow');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
|
||||
<div class="layui-card" id="topcard" style="width:100%;">
|
||||
<div class="layui-card-header layui-self-header" style="height:50px;">
|
||||
<div style="float:left;">
|
||||
<ul class="layui-tab-title">
|
||||
<li onclick="window.location.href='CSelectionTag?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)'">标签筛选</li>
|
||||
<li class="layui-this">添加时间筛选</li>
|
||||
<li onclick="window.location.href='CSelectionQY?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)'">企业筛选</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="float:right;position:relative;">
|
||||
<img src="@myinfo.thumb_avatar" width='50' height='50' style="vertical-align: middle;">
|
||||
<ul class="MyUL2">
|
||||
<li>企业号:@myinfo.corpname</li>
|
||||
<li>昵称:@myinfo.name</li>
|
||||
<li>
|
||||
号码:@myinfo.mobile
|
||||
<a href="Index?machineid=@ViewBag.machineid" class="qiehuan" title="切换其他企业微信" style="display:none">
|
||||
<svg t="1649132381412" class="icon" viewBox="0 0 1029 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4302" width="18" height="18"><path d="M161.069235 551.794827c-25.510524-152.677406 62.122998-306.961398 218.610082-365.336357 115.970485-43.276427 241.009833-22.577709 329.549048 39.240078L633.885825 342.495192l337.867309-1.246695L850.994703 5.965049l-61.857553 95.864295C658.69148 20.981064 480.863441-5.461002 325.148831 52.641553 109.407938 133.129942-14.771449 341.290252 9.746889 551.796816h151.32334z m707.822602-83.572318c25.490641 152.677406-62.100132 306.981282-218.587216 365.336357-106.678928 39.79085-224.237111 24.794718-314.629468-28.849957 17.213142-26.73833 68.081087-105.579371 68.081088-105.579371L40.421157 678.727083 194.172272 1024l64.462291-99.898656c130.423798 80.84828 290.44219 101.397872 446.1568 43.29631 215.69715-80.51026 339.92028-288.648699 315.401942-499.13339H868.893825v-0.041755z" fill="#6E9FF4" p-id="4303"></path></svg>
|
||||
切换
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="float:right;position:relative;padding-right: 20px;">
|
||||
@* <input class="layui-btn layui-btn-sm layui-btn-ok" data-method="add" type="button" value="+绑定" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-reset" data-method="delete" type="button" value="解绑" />*@
|
||||
已选<span id="chooseCount">0</span>人
|
||||
<a href="javascript:SubMit();" class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue"><i class="layui-icon layui-icon-tabs"></i>提交数据</a>
|
||||
<a href="javascript:ClearAll();" class="layui-btn layui-btn-sm layui-btn-primary layui-border-red"><i class="layui-icon layui-icon-delete"></i>清空已选择</a>
|
||||
</div>
|
||||
@*<div class="hrclass" style="position:relative;float: left;"></div>*@
|
||||
</div>
|
||||
<div class="layui-card-body " id="contentBody">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-panel">
|
||||
<div style="padding: 5px;">
|
||||
<form class="layui-form selftopwhere" id="myform">
|
||||
<div class="layui-form-item">
|
||||
名称:
|
||||
<div class="layui-inline">
|
||||
<input id="searchname1" type="text" style="width:130px;" name="name" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width:250px">
|
||||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search1" type="button" value="查询" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndCheck1" style="margin-left:0px;padding: 0 4px;" type="button" value="✔匹配勾选" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndUnCheck1" style="margin-left:0px;padding: 0 4px;" type="button" value="✖匹配去除" />
|
||||
@*<input data-method="clear" class="layui-btn layui-btn-sm layui-btn-reset" style="margin-left:0px;" type="reset" value="清空" />*@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach (var item in diclist)
|
||||
{
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline mxxx" style="width:auto;">
|
||||
@item.Key
|
||||
@foreach (var month in item.Value)
|
||||
{
|
||||
<a ckallday="@month" class="layui-btn layui-btn-primary layui-btn-sm" ischeck="false" onclick="ChooseMonthMyAllA(this,'@Html.Raw(month)','#td_@month')" href="javascript:void(0);" nvalue="@month">@Html.Raw(Convert.ToDateTime((month+"-01")).Month)月</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-panel">
|
||||
<div style="padding: 5px;overflow-y:auto; height:120px;">
|
||||
<ul class="myChooseUL" id="chooseUL"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="newTable" class="layui-table" lay-even lay-skin="row">
|
||||
<thead>
|
||||
<tr><th colspan="2">时间</th><th>客户</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@{
|
||||
var all = datalist.Where(m => m.type == 1);
|
||||
var daylist = all.GroupBy(m => m.cdate);
|
||||
Dictionary<string, string> monthDic = new Dictionary<string, string>();
|
||||
}
|
||||
@foreach (var b in daylist)
|
||||
{
|
||||
string date = Convert.ToDateTime(b.Key).ToString("yyyy-MM");
|
||||
<tr>
|
||||
<td>
|
||||
@if (!monthDic.ContainsKey(date))
|
||||
{
|
||||
monthDic.Add(date, date);
|
||||
<a name="td_@Html.Raw(date)" class="PointClass"></a>
|
||||
<input ckallday="@date" class="layui-btn layui-btn-primary layui-btn-sm" value="@Html.Raw(date)" type="button" ntype="nbp2" ischeck="false" onclick="ChooseMonthMyAll(this,'@Html.Raw(date)')" />
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<input class="layui-btn layui-btn-primary layui-btn-sm" ckAllDay='@Html.Raw(date)' value="@Html.Raw(b.Key)" type="button" ntype="nbp" ischeck="false" onclick="ChooseMyAll(this,'@Html.Raw(b.Key)')" />
|
||||
</td>
|
||||
<td>
|
||||
<ul class="myUL">
|
||||
@{
|
||||
int mycount = 0;
|
||||
}
|
||||
@foreach (var item in all.Where(m => m.cdate == b.Key).OrderBy(m => m.xuhao))
|
||||
{
|
||||
mycount++;
|
||||
var mystyle = "";
|
||||
|
||||
if (mycount > 10)
|
||||
{
|
||||
mystyle = "hiddenLi";
|
||||
}
|
||||
string name = string.IsNullOrEmpty(item.remark) ? item.nickname : item.remark;
|
||||
name = common.PhoneHelper.FormatPhoneUserName(name);
|
||||
<li title="@Html.Raw(name)" class="@mystyle" mycount="@mystyle">
|
||||
<input type='checkbox' ckmonth='@Html.Raw(date)' lay-ignore name='chooseck' id='ck_@Html.Raw(item.extuserid)' class='mycheckbox' onchange="ChooseOne(this,'@Html.Raw(item.extuserid)','@Html.Raw(item.thumb_avatar)','@Html.Raw(name)','@Html.Raw(item.description)',true)" cname='@Html.Raw(name)' thumb_avatar='@Html.Raw(item.thumb_avatar)' extuserid='@Html.Raw(item.extuserid)' description='@Html.Raw(item.description)' cktype='@Html.Raw(item.cdate)' value='@Html.Raw(item.extuserid)'>
|
||||
@if (mycount > 10)
|
||||
{
|
||||
<img src="" nsrc="@Html.Raw(item.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="@Html.Raw(item.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
<span class="custonername">@Html.Raw(name)</span>
|
||||
</li>
|
||||
} @if (mycount > 10)
|
||||
{
|
||||
<li title="显示剩余客户" onclick="ShowHiddent(this)" ishidden="true">
|
||||
<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@*<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>*@
|
||||
<div style="height:200px;"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function ShowHiddent(ck){
|
||||
var hidden= $(ck).attr("ishidden");
|
||||
if(hidden=="true"){
|
||||
$(ck).parent().find("[mycount='hiddenLi']").removeClass("hiddenLi");
|
||||
$(ck).attr("ishidden","false");
|
||||
$(ck).html('<a href="javascript:void(0);">隐藏<i class="layui-icon layui-icon-up"></i> </a>');
|
||||
$(ck).parent().find("[mycount='hiddenLi']").find("img").each(function(inx,bm){
|
||||
if(!$(bm).attr("src")){
|
||||
$(bm).attr("src",$(bm).attr("nsrc"));//无数据就显示图片
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$(ck).parent().find("[mycount='hiddenLi']").addClass("hiddenLi");
|
||||
$(ck).attr("ishidden","true");
|
||||
$(ck).html('<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>');
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var selectRow = {};
|
||||
var winindex;
|
||||
var layer;
|
||||
var rowid;
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
//layui.use('element', function () {
|
||||
// var element = layui.element;
|
||||
// element.on('tab(tonghuajiankong)', function (n) {
|
||||
// $(".bodytable").addClass("hidden");
|
||||
// $("#kefuzhuangtai" + (n.index + 1)).removeClass("hidden");
|
||||
// });
|
||||
// element.on('tab(maintab)', function (n) {
|
||||
// if (n.index == 0)
|
||||
// $("#bottomcard").removeClass("hidden");
|
||||
// else
|
||||
// $("#bottomcard").addClass("hidden");
|
||||
// });
|
||||
//});
|
||||
var machineid='@ViewBag.Machineid';
|
||||
var alldata=@Html.Raw(ViewBag.Data);
|
||||
layui.use(['laypage', 'layer', 'table', 'laydate'], function () {
|
||||
var laydate = layui.laydate;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
var active = {
|
||||
add: function () {
|
||||
winindex = layer.open({
|
||||
type: 2,
|
||||
content: 'Bind?machineid=' + machineid,
|
||||
title: '绑定企业微信',
|
||||
area: ['500px', '400px']
|
||||
});
|
||||
}
|
||||
, delete: function () {
|
||||
if (selectRow.userid == "undefined" || selectRow.userid == null) {
|
||||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||||
return;
|
||||
}
|
||||
layer.confirm('确定解绑吗?', {icon: 3, title:'提示'}, function(index){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "DisBind",
|
||||
data:{machineid:machineid,userid:selectRow.userid,corpid:selectRow.corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
}, search1: function () {
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
ShearchPoint(name);
|
||||
}, search2: function () {
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
ShearchPoint(name);
|
||||
},clear:function(){
|
||||
ClearSearch();
|
||||
},searchAndCheck1:function(){
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
searchAndCheck();
|
||||
},searchAndUnCheck1:function(){
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
searchAndUnCheck();
|
||||
},searchAndCheck2:function(){
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
searchAndCheck();
|
||||
},searchAndUnCheck2:function(){
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
searchAndUnCheck();
|
||||
}
|
||||
};
|
||||
$('.layui-btn').on('click', function () {
|
||||
var othis = $(this), method = othis.data('method');
|
||||
console.log(method);
|
||||
active[method] ? active[method].call(this, othis) : '';
|
||||
|
||||
});
|
||||
});
|
||||
var preName="";
|
||||
var searchIndex=0;
|
||||
var maodian=[];
|
||||
var maodianIndex=0;
|
||||
function ShearchPoint(name){
|
||||
if(name){
|
||||
name=$.trim(name);
|
||||
}
|
||||
if(preName!=name){//名字不相等,进行锚点创建
|
||||
preName=name;
|
||||
$(".hgguanjianci").each(function(aa,bb){
|
||||
$(this).after($(this).attr("title"));
|
||||
$(this).remove();
|
||||
});
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
maodian=[];
|
||||
maodianIndex=0;
|
||||
var mi=0;
|
||||
if(!name){
|
||||
return;
|
||||
}
|
||||
$(".custonername").each(function(aa,bb){
|
||||
var txt=$(this).html();
|
||||
if(txt.indexOf(name)>-1){
|
||||
searchIndex++;
|
||||
txt=txt.replace(name,"<span class='hgguanjianci' title='"+name+"'><a name='search_"+searchIndex+"'></a>"+name+"</span>");
|
||||
$(this).html(txt);
|
||||
maodian[mi]="search_"+searchIndex;//添加到临时集合
|
||||
mi++;
|
||||
}
|
||||
});
|
||||
console.log(maodian);
|
||||
if(maodian.length>0){
|
||||
location.href="#"+maodian[maodianIndex];//锚点定位
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
$("[name=\""+maodian[maodianIndex]+"\"]").parent().parent().addClass("LiClas");
|
||||
}else{
|
||||
layer.msg("未找查找到!", { icon: 7 });
|
||||
}
|
||||
}else{//名字相等,进行下一个锚点定位
|
||||
maodianIndex++;
|
||||
if(maodianIndex>=maodian.length){
|
||||
layer.msg("没有更多!", { icon: 7 });
|
||||
maodianIndex=-1;
|
||||
return ;
|
||||
}
|
||||
else{
|
||||
location.href="#"+maodian[maodianIndex];//锚点定位
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
$("[name=\""+maodian[maodianIndex]+"\"]").parent().parent().addClass("LiClas");
|
||||
}
|
||||
}
|
||||
preName=name;
|
||||
}
|
||||
function searchAndCheck(){
|
||||
maodianIndex--;
|
||||
//console.log($("#searchname1").val());
|
||||
ShearchPoint($("#searchname1").val());
|
||||
$(maodian).each(function(a,b){
|
||||
var checkbox= $("[name=\""+b+"\"]").parent().parent().parent().find("[type=\"checkbox\"]");
|
||||
$(checkbox).prop("checked",true);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
function searchAndUnCheck(){
|
||||
maodianIndex--;
|
||||
ShearchPoint($("#searchname1").val());
|
||||
$(maodian).each(function(a,b){
|
||||
var checkbox= $("[name=\""+b+"\"]").parent().parent().parent().find("[type=\"checkbox\"]");
|
||||
$(checkbox).prop("checked",false);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
|
||||
}
|
||||
function ClearSearch(){
|
||||
$("#searchname1").val("");
|
||||
$("#searchname2").val("");
|
||||
$(".hgguanjianci").each(function(aa,bb){
|
||||
$(this).after($(this).attr("title"));
|
||||
$(this).remove();
|
||||
});
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
maodian=[];
|
||||
maodianIndex=0;
|
||||
preName="";
|
||||
}
|
||||
//选择某天勾选
|
||||
function ChooseMyAll(ck,cdate){
|
||||
if($(ck).attr("ischeck")=="false"){
|
||||
$("#newTable").find("[cktype='"+cdate+"']").prop("checked",true);
|
||||
$(ck).attr("ischeck","true").addClass("layui-border-blue");
|
||||
}else{
|
||||
$("#newTable").find("[cktype='"+cdate+"']").prop("checked",false);
|
||||
$(ck).attr("ischeck","false").removeClass("layui-border-blue");
|
||||
}
|
||||
$("#newTable").find("[cktype='"+cdate+"']").each(function(dd,i){
|
||||
ChooseOne(this,$(this).attr("extuserid"),$(this).attr("thumb_avatar"),$(this).attr("cname"),$(this).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
function ChooseMonthMyAllA(ck,cdate,href){
|
||||
ChooseMonthMyAll(ck,cdate);
|
||||
window.location.href=href;
|
||||
}
|
||||
//月份勾选
|
||||
function ChooseMonthMyAll(ck,cdate){
|
||||
if($(ck).attr("ischeck")=="false"){
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").prop("checked",true);
|
||||
//$(ck).attr("ischeck","true").addClass("layui-border-blue");
|
||||
$("[ckAllDay='"+cdate+"']").attr("ischeck","true").addClass("layui-border-blue");
|
||||
|
||||
}else{
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").prop("checked",false);
|
||||
//$(ck).attr("ischeck","false").removeClass("layui-border-blue");
|
||||
$("[ckAllDay='"+cdate+"']").attr("ischeck","false").removeClass("layui-border-blue");
|
||||
}
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").each(function(dd,i){
|
||||
ChooseOne(this,$(this).attr("extuserid"),$(this).attr("thumb_avatar"),$(this).attr("cname"),$(this).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
//单个勾选
|
||||
function ChooseOne(ck,extuserid,thumb_avatar,title,description,isOne){
|
||||
if(ck){
|
||||
if($(ck).is(':checked')){
|
||||
if($("#Chose_"+extuserid).length==0){
|
||||
var html="<li title='"+title+"'description='"+description+"' id='Chose_"+extuserid+"' avatar='"+thumb_avatar+"' onclick='CanCleOne(this,\""+extuserid+"\")'><img src='"+thumb_avatar+"' width='30' height='30'></li>";
|
||||
$("#chooseUL").append(html);
|
||||
}
|
||||
}else{
|
||||
$("#Chose_"+extuserid).remove();
|
||||
}
|
||||
}
|
||||
if(isOne){
|
||||
ShowCount();
|
||||
}
|
||||
}
|
||||
//已选客户头像点击,取消
|
||||
function CanCleOne(cn,extuserid){
|
||||
$(cn).remove();
|
||||
$("#newTable").find("#ck_"+extuserid).prop("checked",false);
|
||||
ShowCount();
|
||||
}
|
||||
//显示已选数量
|
||||
function ShowCount(){
|
||||
var chooseLenth=$("#chooseUL").children().length;
|
||||
$("#chooseCount").html(chooseLenth);
|
||||
$("#ChooseCountXF").html(chooseLenth);
|
||||
|
||||
}
|
||||
function Closed() {
|
||||
layer.close(winindex);
|
||||
}
|
||||
function TableReload() {
|
||||
table.reload('listReload', {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//提交
|
||||
function SubMit(){
|
||||
var subdata=[];
|
||||
var outuserids = [];
|
||||
var userid = '@Html.Raw(ViewBag.userid)';
|
||||
var corpid = '@Html.Raw(ViewBag.corpid)';
|
||||
$("#chooseUL li").each(function(a,b){
|
||||
subdata[a]={name:$(this).attr("title"),description:$(this).attr("description"),avatar:$(this).attr("avatar")};
|
||||
outuserids[a] = {name:$(this).attr("title"),userid : $(this).attr("id").replace("Chose_","")};
|
||||
});
|
||||
var last=JSON.stringify(subdata);
|
||||
console.log(last)
|
||||
//alert(subdata);
|
||||
setdata(last);
|
||||
window.parent.postMessage({ type: "chooseMsgToolUser",pagetype:2, userid:userid,outuserList: outuserids,corpid:corpid}, "*");
|
||||
}
|
||||
//清空已选
|
||||
function ClearAll(){
|
||||
$("#chooseUL").html("");//清空
|
||||
$("#newTable").find(":checked").prop("checked",false);
|
||||
$("[ntype='nbp2']").attr("ischeck","false");
|
||||
$("[ckAllDay]").attr("ischeck","false");
|
||||
ShowCount();
|
||||
}
|
||||
window.addEventListener('message',function(e){
|
||||
var value = e.data;
|
||||
//返回方法向父页面发送数据
|
||||
if (value != null && value.type == 'initData') {
|
||||
if (value.userChose != "") {
|
||||
var outuserList = value.userChose.outuserList;
|
||||
for (var i = 0; i < outuserList.length; i++) {
|
||||
checkbox = $("#newTable").find("#ck_"+outuserList[i].userid);
|
||||
$(checkbox).prop("checked",true);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
}
|
||||
ShowCount();
|
||||
}
|
||||
|
||||
}
|
||||
}, false);
|
||||
document.onkeydown = function (e) {
|
||||
//捕捉回车事件
|
||||
var ev = (typeof event != 'undefined') ? window.event : e;
|
||||
if (ev.keyCode == 13 || event.which == 13) {
|
||||
ShearchPoint($("#searchname1").val());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(async function(){
|
||||
//await CefSharp.BindObjectAsync("cefsharpbrowser");
|
||||
})();
|
||||
|
||||
function setdata(data) {
|
||||
try{
|
||||
cefsharpbrowser.setdata(data);
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<ul id="ShowChoose" class="layui-fixbar" style="top:60px;display:none;">
|
||||
<li class="layui-icon " lay-type="top" style="display: list-item;line-height: 23px;font-size: 16px;width: 60px;">已选<br /><span id="ChooseCountXF">0</span>人</li>
|
||||
</ul>
|
||||
<ul class="layui-fixbar">
|
||||
<li class="layui-icon layui-fixbar-top" lay-type="top" style="display: list-item;"></li>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,710 @@
|
|||
@using model;
|
||||
@using model.viewmodel;
|
||||
@{
|
||||
ViewBag.Title = "我的企业微信";
|
||||
Layout = "~/Views/Shared/_content.cshtml";
|
||||
wwUserinfoView myinfo = (wwUserinfoView)ViewBag.MyUser;
|
||||
Dictionary<string, List<string>> diclist = ViewBag.YearMonthList;
|
||||
List<wwExtuserView> datalist = ViewBag.DataList;
|
||||
}
|
||||
@{
|
||||
List<wwGroupTagView> tagGrouList = ViewBag.TagList;
|
||||
Dictionary<string, string> tagDic = new Dictionary<string, string>();
|
||||
Dictionary<string, string> sefTagDic = ViewBag.customTags;
|
||||
var groupTAG = datalist.GroupBy(m => m.remark_corp_name).OrderByDescending(m => m.Key);
|
||||
}
|
||||
<!--确定宽度-->
|
||||
<style type="text/css">
|
||||
.myUL li {
|
||||
line-height: 25px;
|
||||
display: inline-block;
|
||||
width: 170px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
input[type='checkbox'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.myChooseUL li {
|
||||
line-height: 35px;
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-table-body .layui-table-cell {
|
||||
height: auto;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.mycheckbox {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.layui-form-item {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.layui-table[lay-even] tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.layui-table td, .layui-table th, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
|
||||
border-width: 1px !important;
|
||||
border-style: solid;
|
||||
border-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.mxxx input, .mxxx a {
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
width: auto;
|
||||
padding: 0 3px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.mxxx .layui-btn + .layui-btn {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.XuanFuTop {
|
||||
position: fixed;
|
||||
/* right: 15px;
|
||||
bottom: 15px;*/
|
||||
z-index: 999979;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
bottom: 0px;
|
||||
border-top: 1px solid #cac7c7;
|
||||
}
|
||||
|
||||
.PointClass {
|
||||
padding-top: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.hgguanjianci {
|
||||
background-color: #FF9800;
|
||||
color: white
|
||||
}
|
||||
|
||||
.LiClas {
|
||||
background-color: #08af0a;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.MyUL2 {
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.MyUL2 li {
|
||||
line-height: 16px;
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.selftopwhere {
|
||||
padding-top: 3px !important;
|
||||
}
|
||||
|
||||
.mxxx a {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.layui-tab-title .layui-this {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.layui-tab-title .layui-this:after {
|
||||
border-bottom: 2px solid #01AAED !important;
|
||||
}
|
||||
|
||||
.MyUL2 a {
|
||||
color: #01AAED;
|
||||
}
|
||||
|
||||
.MyUL2 a:hover {
|
||||
color: #01AAED !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.myUL a {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.myUL a:hover {
|
||||
color: #01AAED !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
|
||||
.hiddenLi {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<div id="XuanFuTop" class="XuanFuTop" style="display:none;">
|
||||
<form class="layui-form selftopwhere" id="myform" style="padding-top: 5px;">
|
||||
<div class="layui-form-item">
|
||||
名称:
|
||||
<div class="layui-inline">
|
||||
<input id="searchname2" type="text" style="width:130px;" name="name" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width:250px">
|
||||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search2" type="button" value="查询" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndCheck2" style="margin-left:0px;padding: 0 4px;" type="button" value="✔匹配勾选" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndUnCheck2" style="margin-left:0px;padding: 0 4px;" type="button" value="✖匹配去除" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
var table;
|
||||
$(function () {
|
||||
var xx=0;
|
||||
$(window).scroll(function(){
|
||||
//console.log($(window).scrollTop());
|
||||
if($(window).scrollTop() >= 224){
|
||||
$("#XuanFuTop").fadeIn(800); // 开始淡入
|
||||
}
|
||||
//else{
|
||||
// $("#XuanFuTop").stop(true,true).fadeOut(800); // 如果小于等于 300 淡出
|
||||
//}
|
||||
|
||||
if($(window).scrollTop() >= 50){
|
||||
$("#ShowChoose").fadeIn(500); // 开始淡入
|
||||
}
|
||||
else{
|
||||
$("#ShowChoose").stop(true,true).fadeOut(500); // 如果小于等于 300 淡出
|
||||
}
|
||||
});
|
||||
$(".layui-fixbar-top").click(function(){
|
||||
$('html, body').animate({scrollTop:0}, 'slow');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
|
||||
<div class="layui-card" id="topcard" style="width:100%;">
|
||||
<div class="layui-card-header layui-self-header" style="height:50px;">
|
||||
<div style="float:left;" class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
||||
@* <span class="layui-breadcrumb" lay-separator="|">
|
||||
<a href="CSelection?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)">添加时间筛选</a>
|
||||
<a href="javascript:void(0)" style="color:#1E9FFF!important;">标签筛选</a>
|
||||
<a href="CSelectionQY?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)">企业筛选</a>
|
||||
</span>*@
|
||||
<ul class="layui-tab-title">
|
||||
<li onclick="window.location.href='CSelectionTag?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)'">标签筛选</li>
|
||||
<li onclick="window.location.href='CSelection?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)'">添加时间筛选</li>
|
||||
<li class="layui-this">企业筛选</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="float:right;position:relative;">
|
||||
<img src="@myinfo.thumb_avatar" width='50' height='50' style="vertical-align: middle;">
|
||||
<ul class="MyUL2">
|
||||
<li>企业号:@myinfo.corpname</li>
|
||||
<li>昵称:@myinfo.name</li>
|
||||
<li>
|
||||
号码:@myinfo.mobile
|
||||
<a href="Index?machineid=@ViewBag.machineid" class="qiehuan" title="切换其他企业微信" style="display:none">
|
||||
<svg t="1649132381412" class="icon" viewBox="0 0 1029 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4302" width="18" height="18"><path d="M161.069235 551.794827c-25.510524-152.677406 62.122998-306.961398 218.610082-365.336357 115.970485-43.276427 241.009833-22.577709 329.549048 39.240078L633.885825 342.495192l337.867309-1.246695L850.994703 5.965049l-61.857553 95.864295C658.69148 20.981064 480.863441-5.461002 325.148831 52.641553 109.407938 133.129942-14.771449 341.290252 9.746889 551.796816h151.32334z m707.822602-83.572318c25.490641 152.677406-62.100132 306.981282-218.587216 365.336357-106.678928 39.79085-224.237111 24.794718-314.629468-28.849957 17.213142-26.73833 68.081087-105.579371 68.081088-105.579371L40.421157 678.727083 194.172272 1024l64.462291-99.898656c130.423798 80.84828 290.44219 101.397872 446.1568 43.29631 215.69715-80.51026 339.92028-288.648699 315.401942-499.13339H868.893825v-0.041755z" fill="#6E9FF4" p-id="4303"></path></svg>
|
||||
切换
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="float:right;position:relative;padding-right: 20px;">
|
||||
@* <input class="layui-btn layui-btn-sm layui-btn-ok" data-method="add" type="button" value="+绑定" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-reset" data-method="delete" type="button" value="解绑" />*@
|
||||
已选<span id="chooseCount">0</span>人
|
||||
<a href="javascript:SubMit();" class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue"><i class="layui-icon layui-icon-tabs"></i>提交数据</a>
|
||||
<a href="javascript:ClearAll();" class="layui-btn layui-btn-sm layui-btn-primary layui-border-red"><i class="layui-icon layui-icon-delete"></i>清空已选择</a>
|
||||
</div>
|
||||
@*<div class="hrclass" style="position:relative;float: left;"></div>*@
|
||||
</div>
|
||||
<div class="layui-card-body " id="contentBody">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-panel">
|
||||
<div style="padding: 5px;">
|
||||
<form class="layui-form selftopwhere" id="myform">
|
||||
<div class="layui-form-item">
|
||||
名称:
|
||||
<div class="layui-inline">
|
||||
<input id="searchname1" type="text" style="width:130px;" name="name" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width:250px">
|
||||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search1" type="button" value="查询" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndCheck1" style="margin-left:0px;padding: 0 4px;" type="button" value="✔匹配勾选" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndUnCheck1" style="margin-left:0px;padding: 0 4px;" type="button" value="✖匹配去除" />
|
||||
@* <input data-method="clear" class="layui-btn layui-btn-sm layui-btn-reset" style="margin-left:0px;" type="reset" value="清空" />*@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-row">
|
||||
<div class="layui-form-item mxxx" style="width:auto;">
|
||||
企业备注:
|
||||
@foreach (var item in groupTAG)
|
||||
{
|
||||
var childTag = item.Key;
|
||||
<a ckAllDay='@Html.Raw(childTag)' class="layui-btn layui-btn-primary layui-btn-sm" href="javascript:void(0);" onclick="ChooseMyAll(this,'@Html.Raw(childTag)');" nvalue="@childTag" ischeck="false">@Html.Raw(string.IsNullOrEmpty(item.Key)?"未知":item.Key)</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-panel">
|
||||
<div style="padding: 5px;overflow-y:auto; height:120px;">
|
||||
<ul class="myChooseUL" id="chooseUL"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="newTable" class="layui-table" lay-even lay-skin="row">
|
||||
<thead>
|
||||
<tr><th>企业分组</th><th>客户</th></tr>
|
||||
</thead>
|
||||
<tbody id="tag_Body">
|
||||
@{
|
||||
var all = datalist.Where(m => m.type == 1);
|
||||
var daylist = all.GroupBy(m => m.cdate);
|
||||
Dictionary<string, string> monthDic = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
@foreach (var item in groupTAG)
|
||||
{
|
||||
var childTag = item.Key;
|
||||
<tr>
|
||||
<td>
|
||||
<a name="td_@Html.Raw(childTag)" class="PointClass"></a>
|
||||
<input class="layui-btn layui-btn-primary layui-btn-sm" ckAllDay='@Html.Raw(childTag)' value="@Html.Raw(string.IsNullOrEmpty(item.Key)?"未知":item.Key)" type="button" ntype="nbp" ischeck="false" onclick="ChooseMyAll(this,'@Html.Raw(childTag)')" />
|
||||
</td>
|
||||
<td>
|
||||
<ul class="myUL">
|
||||
@{
|
||||
int mycount = 0;
|
||||
}
|
||||
@foreach (var mbitem in item.ToList().OrderBy(m => m.xuhao))
|
||||
{
|
||||
string name = string.IsNullOrEmpty(mbitem.remark) ? mbitem.nickname : mbitem.remark;
|
||||
name = common.PhoneHelper.FormatPhoneUserName(name);
|
||||
mycount++;
|
||||
var mystyle = "";
|
||||
if (mycount > 10)
|
||||
{
|
||||
mystyle = "hiddenLi";
|
||||
}
|
||||
<li title="@Html.Raw(name)" class="@mystyle" mycount="@mystyle">
|
||||
<input type='checkbox' cktype='@Html.Raw(childTag)' lay-ignore name='chooseck' id='ck_@Html.Raw(mbitem.extuserid)' class='mycheckbox' onchange="ChooseOne(this,'@Html.Raw(mbitem.extuserid)','@Html.Raw(mbitem.thumb_avatar)','@Html.Raw(name)','@Html.Raw(mbitem.description)',true)" cname='@Html.Raw(name)' thumb_avatar='@Html.Raw(mbitem.thumb_avatar)' extuserid='@Html.Raw(mbitem.extuserid)' description='@Html.Raw(mbitem.description)' value='@Html.Raw(mbitem.extuserid)'>
|
||||
@if (mycount > 10)
|
||||
{
|
||||
<img src="" nsrc="@Html.Raw(mbitem.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="@Html.Raw(mbitem.thumb_avatar)" width='28' height='28'>
|
||||
|
||||
}
|
||||
<span class="custonername">@Html.Raw(name)</span>
|
||||
</li>
|
||||
}@if (mycount > 10)
|
||||
{
|
||||
<li title="显示剩余客户" onclick="ShowHiddent(this)" ishidden="true">
|
||||
<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>
|
||||
</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@*<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>*@
|
||||
<div style="height:200px;"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function ShowHiddent(ck){
|
||||
var hidden= $(ck).attr("ishidden");
|
||||
if(hidden=="true"){
|
||||
$(ck).parent().find("[mycount='hiddenLi']").removeClass("hiddenLi");
|
||||
$(ck).attr("ishidden","false");
|
||||
$(ck).html('<a href="javascript:void(0);">隐藏<i class="layui-icon layui-icon-up"></i> </a>');
|
||||
$(ck).parent().find("[mycount='hiddenLi']").find("img").each(function(inx,bm){
|
||||
if(!$(bm).attr("src")){
|
||||
$(bm).attr("src",$(bm).attr("nsrc"));//无数据就显示图片
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$(ck).parent().find("[mycount='hiddenLi']").addClass("hiddenLi");
|
||||
$(ck).attr("ishidden","true");
|
||||
$(ck).html('<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>');
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var selectRow = {};
|
||||
var winindex;
|
||||
var layer;
|
||||
var rowid;
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
//layui.use('element', function () {
|
||||
// var element = layui.element;
|
||||
// element.on('tab(tonghuajiankong)', function (n) {
|
||||
// $(".bodytable").addClass("hidden");
|
||||
// $("#kefuzhuangtai" + (n.index + 1)).removeClass("hidden");
|
||||
// });
|
||||
// element.on('tab(maintab)', function (n) {
|
||||
// if (n.index == 0)
|
||||
// $("#bottomcard").removeClass("hidden");
|
||||
// else
|
||||
// $("#bottomcard").addClass("hidden");
|
||||
// });
|
||||
//});
|
||||
var machineid='@ViewBag.Machineid';
|
||||
var alldata=@Html.Raw(ViewBag.Data);
|
||||
layui.use(['laypage', 'layer', 'table', 'laydate'], function () {
|
||||
var laydate = layui.laydate;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
var active = {
|
||||
add: function () {
|
||||
winindex = layer.open({
|
||||
type: 2,
|
||||
content: 'Bind?machineid=' + machineid,
|
||||
title: '绑定企业微信',
|
||||
area: ['500px', '400px']
|
||||
});
|
||||
}
|
||||
, delete: function () {
|
||||
if (selectRow.userid == "undefined" || selectRow.userid == null) {
|
||||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||||
return;
|
||||
}
|
||||
layer.confirm('确定解绑吗?', {icon: 3, title:'提示'}, function(index){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "DisBind",
|
||||
data:{machineid:machineid,userid:selectRow.userid,corpid:selectRow.corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
}, search1: function () {
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
ShearchPoint(name);
|
||||
}, search2: function () {
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
ShearchPoint(name);
|
||||
},clear:function(){
|
||||
ClearSearch();
|
||||
},searchAndCheck1:function(){
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
searchAndCheck();
|
||||
},searchAndUnCheck1:function(){
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
searchAndUnCheck();
|
||||
},searchAndCheck2:function(){
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
searchAndCheck();
|
||||
},searchAndUnCheck2:function(){
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
searchAndUnCheck();
|
||||
}
|
||||
};
|
||||
|
||||
$('.layui-btn').on('click', function () {
|
||||
var othis = $(this), method = othis.data('method');
|
||||
console.log(method);
|
||||
active[method] ? active[method].call(this, othis) : '';
|
||||
|
||||
});
|
||||
$(".btnQieHuan .layui-btn").click(function () {
|
||||
$(".btnQieHuan .layui-btn-normal").removeClass("layui-btn-normal").addClass("layui-btn-primary");
|
||||
$(this).removeClass("layui-btn-primary").addClass("layui-btn-normal");
|
||||
});
|
||||
});
|
||||
var preName="";
|
||||
var searchIndex=0;
|
||||
var maodian=[];
|
||||
var maodianIndex=0;
|
||||
function ShearchPoint(name) {
|
||||
if(name){
|
||||
name=$.trim(name);
|
||||
}
|
||||
if(preName!=name){//名字不相等,进行锚点创建
|
||||
preName=name;
|
||||
$(".hgguanjianci").each(function(aa,bb){
|
||||
$(this).after($(this).attr("title"));
|
||||
$(this).remove();
|
||||
});
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
maodian=[];
|
||||
maodianIndex=0;
|
||||
var mi=0;
|
||||
if(!name){
|
||||
return;
|
||||
}
|
||||
$(".custonername").each(function(aa,bb){
|
||||
var txt=$(this).html();
|
||||
if(txt.indexOf(name)>-1){
|
||||
searchIndex++;
|
||||
txt=txt.replace(name,"<span class='hgguanjianci' title='"+name+"'><a name='search_"+searchIndex+"'></a>"+name+"</span>");
|
||||
$(this).html(txt);
|
||||
maodian[mi]="search_"+searchIndex;//添加到临时集合
|
||||
mi++;
|
||||
}
|
||||
});
|
||||
console.log(maodian);
|
||||
if(maodian.length>0){
|
||||
location.href="#"+maodian[maodianIndex];//锚点定位
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
$("[name=\""+maodian[maodianIndex]+"\"]").parent().parent().addClass("LiClas");
|
||||
}else{
|
||||
layer.msg("未找查找到!", { icon: 7 });
|
||||
}
|
||||
}else{//名字相等,进行下一个锚点定位
|
||||
maodianIndex++;
|
||||
if(maodianIndex>=maodian.length){
|
||||
layer.msg("没有更多!", { icon: 7 });
|
||||
maodianIndex=-1;
|
||||
return ;
|
||||
}
|
||||
else{
|
||||
location.href="#"+maodian[maodianIndex];//锚点定位
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
$("[name=\""+maodian[maodianIndex]+"\"]").parent().parent().addClass("LiClas");
|
||||
}
|
||||
}
|
||||
preName=name;
|
||||
}
|
||||
function searchAndCheck(){
|
||||
maodianIndex--;
|
||||
//console.log($("#searchname1").val());
|
||||
ShearchPoint($("#searchname1").val());
|
||||
$(maodian).each(function(a,b){
|
||||
var checkbox= $("[name=\""+b+"\"]").parent().parent().parent().find("[type=\"checkbox\"]");
|
||||
$(checkbox).prop("checked",true);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
function searchAndUnCheck(){
|
||||
maodianIndex--;
|
||||
ShearchPoint($("#searchname1").val());
|
||||
$(maodian).each(function(a,b){
|
||||
var checkbox= $("[name=\""+b+"\"]").parent().parent().parent().find("[type=\"checkbox\"]");
|
||||
$(checkbox).prop("checked",false);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
|
||||
}
|
||||
function ClearSearch(){
|
||||
$("#searchname1").val("");
|
||||
$("#searchname2").val("");
|
||||
$(".hgguanjianci").each(function(aa,bb){
|
||||
$(this).after($(this).attr("title"));
|
||||
$(this).remove();
|
||||
});
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
maodian=[];
|
||||
maodianIndex=0;
|
||||
preName="";
|
||||
}
|
||||
//选择某天勾选
|
||||
function ChooseMyAll(ck,cdate){
|
||||
//console.log(ck);
|
||||
if($(ck).attr("ischeck")=="false"){
|
||||
$("#newTable").find("[cktype='"+cdate+"']").prop("checked",true);
|
||||
//$(ck).attr("ischeck","true").addClass("layui-border-blue");
|
||||
$("[ckAllDay='"+cdate+"']").attr("ischeck","true").addClass("layui-border-blue");
|
||||
}else{
|
||||
$("#newTable").find("[cktype='"+cdate+"']").prop("checked",false);
|
||||
//$(ck).attr("ischeck","false").removeClass("layui-border-blue");
|
||||
$("[ckAllDay='"+cdate+"']").attr("ischeck","false").removeClass("layui-border-blue");
|
||||
}
|
||||
$("#newTable").find("[cktype='"+cdate+"']").each(function(dd,i){
|
||||
ChooseOne(this,$(this).attr("extuserid"),$(this).attr("thumb_avatar"),$(this).attr("cname"),$(this).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
//月份勾选
|
||||
function ChooseMonthMyAll(ck,cdate){
|
||||
if($(ck).attr("ischeck")=="false"){
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").prop("checked",true);
|
||||
$(ck).attr("ischeck","true");
|
||||
$("[ckAllDay='"+cdate+"']").attr("ischeck","true");
|
||||
|
||||
}else{
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").prop("checked",false);
|
||||
$(ck).attr("ischeck","false");
|
||||
$("[ckAllDay='"+cdate+"']").attr("ischeck","false");
|
||||
}
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").each(function(dd,i){
|
||||
ChooseOne(this,$(this).attr("extuserid"),$(this).attr("thumb_avatar"),$(this).attr("cname"),$(this).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
//单个勾选
|
||||
function ChooseOne(ck,extuserid,thumb_avatar,title,description,isOne){
|
||||
if(ck){
|
||||
if($(ck).is(':checked')){
|
||||
if($("#Chose_"+extuserid).length==0){
|
||||
var html="<li title='"+title+"'description='"+description+"' id='Chose_"+extuserid+"' avatar='"+thumb_avatar+"' onclick='CanCleOne(this,\""+extuserid+"\")'><img src='"+thumb_avatar+"' width='30' height='30'></li>";
|
||||
$("#chooseUL").append(html);
|
||||
}
|
||||
}else{
|
||||
console.log("选择一下!!!");
|
||||
var hasCount=0;
|
||||
$("#newTable").find("[id='ck_"+extuserid+"']").each(function(){
|
||||
if($(this).is(':checked')){
|
||||
hasCount++;
|
||||
}
|
||||
})
|
||||
if(hasCount==0){//如果在勾选界面中没有任何被勾选了,那么需要去除勾选
|
||||
$("#Chose_"+extuserid).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isOne){
|
||||
ShowCount();
|
||||
}
|
||||
}
|
||||
//已选客户头像点击,取消
|
||||
function CanCleOne(cn,extuserid){
|
||||
$(cn).remove();
|
||||
$($("#newTable #ck_"+extuserid)).each(function(bb,dd){
|
||||
console.log(dd);
|
||||
$(this).prop("checked",false);
|
||||
});
|
||||
|
||||
ShowCount();
|
||||
}
|
||||
//显示已选数量
|
||||
function ShowCount(){
|
||||
var chooseLenth=$("#chooseUL").children().length;
|
||||
$("#chooseCount").html(chooseLenth);
|
||||
$("#ChooseCountXF").html(chooseLenth);
|
||||
|
||||
}
|
||||
function Closed() {
|
||||
layer.close(winindex);
|
||||
}
|
||||
function TableReload() {
|
||||
table.reload('listReload', {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//提交
|
||||
function SubMit(){
|
||||
var outuserids = [];
|
||||
var userid = '@Html.Raw(ViewBag.userid)';
|
||||
var corpid = '@Html.Raw(ViewBag.corpid)';
|
||||
var subdata=[];
|
||||
$("#chooseUL li").each(function(a,b){
|
||||
subdata[a]={name:$(this).attr("title"),description:$(this).attr("description"),avatar:$(this).attr("avatar")};
|
||||
outuserids[a] = {name:$(this).attr("title"),userid : $(this).attr("id").replace("Chose_","")};
|
||||
});
|
||||
var last=JSON.stringify(subdata);
|
||||
console.log(last)
|
||||
//alert(subdata);
|
||||
setdata(last);
|
||||
window.parent.postMessage({ type: "chooseMsgToolUser",pagetype:3, userid:userid,outuserList: outuserids,corpid:corpid}, "*");
|
||||
}
|
||||
//清空已选
|
||||
function ClearAll(){
|
||||
$("#chooseUL").html("");//清空
|
||||
$("#newTable").find(":checked").prop("checked",false);
|
||||
$("[ntype='nbp2']").attr("ischeck","false");
|
||||
$("[ckAllDay]").attr("ischeck","false");
|
||||
|
||||
ShowCount();
|
||||
}
|
||||
|
||||
window.addEventListener('message',function(e){
|
||||
var value = e.data;
|
||||
//返回方法向父页面发送数据
|
||||
if (value != null && value.type == 'initData') {
|
||||
if (value.userChose != "") {
|
||||
var outuserList = value.userChose.outuserList;
|
||||
for (var i = 0; i < outuserList.length; i++) {
|
||||
checkbox = $("#newTable").find("#ck_"+outuserList[i].userid);
|
||||
$(checkbox).prop("checked",true);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
}
|
||||
ShowCount();
|
||||
}
|
||||
|
||||
}
|
||||
}, false);
|
||||
document.onkeydown = function (e) {
|
||||
//捕捉回车事件
|
||||
var ev = (typeof event != 'undefined') ? window.event : e;
|
||||
if (ev.keyCode == 13 || event.which == 13) {
|
||||
ShearchPoint($("#searchname1").val());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(async function(){
|
||||
//await CefSharp.BindObjectAsync("cefsharpbrowser");
|
||||
})();
|
||||
|
||||
function setdata(data) {
|
||||
try{
|
||||
cefsharpbrowser.setdata(data);
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<ul id="ShowChoose" class="layui-fixbar" style="top:60px;display:none;">
|
||||
<li class="layui-icon " lay-type="top" style="display: list-item;line-height: 23px;font-size: 16px;width: 60px;">已选<br /><span id="ChooseCountXF">0</span>人</li>
|
||||
</ul>
|
||||
<ul class="layui-fixbar">
|
||||
<li class="layui-icon layui-fixbar-top" lay-type="top" style="display: list-item;"></li>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,795 @@
|
|||
@using model;
|
||||
@using model.viewmodel;
|
||||
@{
|
||||
ViewBag.Title = "我的企业微信";
|
||||
Layout = "~/Views/Shared/_content.cshtml";
|
||||
wwUserinfoView myinfo = (wwUserinfoView)ViewBag.MyUser;
|
||||
Dictionary<string, List<string>> diclist = ViewBag.YearMonthList;
|
||||
List<wwExtuserView> datalist = ViewBag.DataList;
|
||||
}
|
||||
@{
|
||||
List<wwGroupTagView> tagGrouList = ViewBag.TagList;
|
||||
Dictionary<string, string> tagDic = new Dictionary<string, string>();
|
||||
Dictionary<string, string> sefTagDic = ViewBag.customTags;
|
||||
}
|
||||
<!--确定宽度-->
|
||||
<style type="text/css">
|
||||
.myUL li {
|
||||
line-height: 25px;
|
||||
display: inline-block;
|
||||
width: 170px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
input[type='checkbox'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.myChooseUL li {
|
||||
line-height: 35px;
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-table-body .layui-table-cell {
|
||||
height: auto;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.mycheckbox {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.layui-form-item {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.layui-table[lay-even] tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.layui-table td, .layui-table th, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
|
||||
border-width: 1px !important;
|
||||
border-style: solid;
|
||||
border-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.mxxx input, .mxxx a {
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
width: auto;
|
||||
padding: 0 3px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.mxxx .layui-btn + .layui-btn {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.XuanFuTop {
|
||||
position: fixed;
|
||||
/* right: 15px;
|
||||
bottom: 15px;*/
|
||||
z-index: 999979;
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
bottom: 0px;
|
||||
border-top: 1px solid #cac7c7;
|
||||
}
|
||||
|
||||
.PointClass {
|
||||
padding-top: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.hgguanjianci {
|
||||
background-color: #FF9800;
|
||||
color: white
|
||||
}
|
||||
|
||||
.LiClas {
|
||||
background-color: #08af0a;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.MyUL2 {
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.MyUL2 li {
|
||||
line-height: 16px;
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.selftopwhere {
|
||||
padding-top: 3px !important;
|
||||
}
|
||||
|
||||
.mxxx a {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.layui-tab-title .layui-this {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.layui-tab-title .layui-this:after {
|
||||
border-bottom: 2px solid #01AAED !important;
|
||||
}
|
||||
|
||||
.MyUL2 a {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.MyUL2 a:hover {
|
||||
color: #01AAED !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.myUL a {
|
||||
color: #01AAED !important;
|
||||
}
|
||||
|
||||
.myUL a:hover {
|
||||
color: #01AAED !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
|
||||
.hiddenLi {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<div id="XuanFuTop" class="XuanFuTop" style="display:none;">
|
||||
<form class="layui-form selftopwhere" id="myform" style="padding-top: 5px;">
|
||||
<div class="layui-form-item">
|
||||
名称:
|
||||
<div class="layui-inline">
|
||||
<input id="searchname2" type="text" style="width:130px;" name="name" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width:250px">
|
||||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search2" type="button" value="查询" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndCheck2" style="margin-left:0px;padding: 0 4px;" type="button" value="✔匹配勾选" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndUnCheck2" style="margin-left:0px;padding: 0 4px;" type="button" value="✖匹配去除" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
var table;
|
||||
$(function () {
|
||||
var xx=0;
|
||||
$(window).scroll(function(){
|
||||
//console.log($(window).scrollTop());
|
||||
if($(window).scrollTop() >= 224){
|
||||
$("#XuanFuTop").fadeIn(800); // 开始淡入
|
||||
}
|
||||
//else{
|
||||
// $("#XuanFuTop").stop(true,true).fadeOut(800); // 如果小于等于 300 淡出
|
||||
//}
|
||||
|
||||
if($(window).scrollTop() >= 50){
|
||||
$("#ShowChoose").fadeIn(500); // 开始淡入
|
||||
}
|
||||
else{
|
||||
$("#ShowChoose").stop(true,true).fadeOut(500); // 如果小于等于 300 淡出
|
||||
}
|
||||
});
|
||||
$(".layui-fixbar-top").click(function(){
|
||||
$('html, body').animate({scrollTop:0}, 'slow');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
|
||||
<div class="layui-card" id="topcard" style="width:100%;">
|
||||
<div class="layui-card-header layui-self-header" style="height:50px;">
|
||||
<div style="float:left;" class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
||||
@* <span class="layui-breadcrumb" lay-separator="|">
|
||||
<a href="CSelection?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)">添加时间筛选</a>
|
||||
<a href="javascript:void(0)" style="color:#1E9FFF!important;">标签筛选</a>
|
||||
<a href="CSelectionQY?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)">企业筛选</a>
|
||||
</span>*@
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">标签筛选</li>
|
||||
<li onclick="window.location.href='CSelection?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)'">添加时间筛选</li>
|
||||
<li onclick="window.location.href='CSelectionQY?machineid=@Html.Raw(ViewBag.machineid)&userid=@Html.Raw(ViewBag.userid)&corpid=@Html.Raw(ViewBag.corpid)'">企业筛选</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="float:right;position:relative;">
|
||||
<img src="@myinfo.thumb_avatar" width='50' height='50' style="vertical-align: middle;">
|
||||
<ul class="MyUL2">
|
||||
<li>企业号:@myinfo.corpname</li>
|
||||
<li>昵称:@myinfo.name</li>
|
||||
<li>
|
||||
号码:@myinfo.mobile
|
||||
<a href="Index?machineid=@ViewBag.machineid" class="qiehuan" title="切换其他企业微信" style="display:none">
|
||||
<svg t="1649132381412" class="icon" viewBox="0 0 1029 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4302" width="18" height="18"><path d="M161.069235 551.794827c-25.510524-152.677406 62.122998-306.961398 218.610082-365.336357 115.970485-43.276427 241.009833-22.577709 329.549048 39.240078L633.885825 342.495192l337.867309-1.246695L850.994703 5.965049l-61.857553 95.864295C658.69148 20.981064 480.863441-5.461002 325.148831 52.641553 109.407938 133.129942-14.771449 341.290252 9.746889 551.796816h151.32334z m707.822602-83.572318c25.490641 152.677406-62.100132 306.981282-218.587216 365.336357-106.678928 39.79085-224.237111 24.794718-314.629468-28.849957 17.213142-26.73833 68.081087-105.579371 68.081088-105.579371L40.421157 678.727083 194.172272 1024l64.462291-99.898656c130.423798 80.84828 290.44219 101.397872 446.1568 43.29631 215.69715-80.51026 339.92028-288.648699 315.401942-499.13339H868.893825v-0.041755z" fill="#6E9FF4" p-id="4303"></path></svg>
|
||||
切换
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="float:right;position:relative;padding-right: 20px;">
|
||||
@* <input class="layui-btn layui-btn-sm layui-btn-ok" data-method="add" type="button" value="+绑定" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-reset" data-method="delete" type="button" value="解绑" />*@
|
||||
已选<span id="chooseCount">0</span>人
|
||||
<a href="javascript:SubMit();" class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue"><i class="layui-icon layui-icon-tabs"></i>提交数据</a>
|
||||
<a href="javascript:ClearAll();" class="layui-btn layui-btn-sm layui-btn-primary layui-border-red"><i class="layui-icon layui-icon-delete"></i>清空已选择</a>
|
||||
</div>
|
||||
@*<div class="hrclass" style="position:relative;float: left;"></div>*@
|
||||
</div>
|
||||
<div class="layui-card-body " id="contentBody">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-panel">
|
||||
<div style="padding: 5px;">
|
||||
<form class="layui-form selftopwhere" id="myform">
|
||||
<div class="layui-form-item">
|
||||
名称:
|
||||
<div class="layui-inline">
|
||||
<input id="searchname1" type="text" style="width:130px;" name="name" required lay-verify="required" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="width:250px">
|
||||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search1" type="button" value="查询" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndCheck1" style="margin-left:0px;padding: 0 4px;" type="button" value="✔匹配勾选" />
|
||||
<input class="layui-btn layui-btn-sm layui-btn-primary layui-border-blue" data-method="searchAndUnCheck1" style="margin-left:0px;padding: 0 4px;" type="button" value="✖匹配去除" />
|
||||
@* <input data-method="clear" class="layui-btn layui-btn-sm layui-btn-reset" style="margin-left:0px;" type="reset" value="清空" />*@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-row">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td width="60%" style="vertical-align:top;">
|
||||
@foreach (var groupTag in tagGrouList)
|
||||
{
|
||||
<div class="layui-form-item mxxx">
|
||||
@groupTag.group_name:
|
||||
@foreach (var item in groupTag.tagNumbers)
|
||||
{
|
||||
var childTag = groupTag.group_name + "_" + item.name;
|
||||
<a maxgroup="@groupTag.group_name" class="layui-btn layui-btn-primary layui-btn-sm" href="javascript:void(0);" onclick="ChooseMyAll(this,'@Html.Raw(childTag)');" ckallday="@childTag" nvalue="@childTag" ischeck="false">@Html.Raw(item.name)</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
<td width="40%" style="vertical-align:top;">
|
||||
<div class="layui-form-item mxxx" style="width:auto;">
|
||||
个人标签:
|
||||
@foreach (var item in sefTagDic)
|
||||
{
|
||||
var childTag = "个人标签_" + item.Key;
|
||||
<a maxgroup="个人标签" class="layui-btn layui-btn-primary layui-btn-sm" href="javascript:void(0);" onclick="ChooseMyAll(this,'@Html.Raw(childTag)');" ckallday="@childTag" nvalue="@childTag" ischeck="false">@Html.Raw(item.Key)</a>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-panel">
|
||||
<div style="padding: 5px;overflow-y:auto; height:120px;">
|
||||
<ul class="myChooseUL" id="chooseUL"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="newTable" class="layui-table" lay-even lay-skin="row">
|
||||
<thead>
|
||||
<tr><th colspan="2">标签分组/标签</th><th>客户</th></tr>
|
||||
</thead>
|
||||
<tbody id="tag_Body">
|
||||
@{
|
||||
var all = datalist.Where(m => m.type == 1);
|
||||
var daylist = all.GroupBy(m => m.cdate);
|
||||
Dictionary<string, string> monthDic = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
@foreach (var groupTag in tagGrouList)
|
||||
{
|
||||
@foreach (var item in groupTag.tagNumbers)
|
||||
{
|
||||
var childTag = groupTag.group_name + "_" + item.name;
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
@if (!tagDic.ContainsKey(groupTag.group_id))
|
||||
{
|
||||
tagDic.Add(groupTag.group_id, groupTag.group_id);
|
||||
<a name="td_@Html.Raw(groupTag.group_id)" class="PointClass"></a>
|
||||
<input class="layui-btn layui-btn-primary layui-btn-sm" value="@Html.Raw(groupTag.group_name)" type="button" ntype="nbp2" ischeck="false" onclick="ChooseMonthMyAll(this,'@Html.Raw(groupTag.group_name)')" />
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a name="td_@Html.Raw(childTag)" class="PointClass"></a>
|
||||
<input maxgroup="@groupTag.group_name" class="layui-btn layui-btn-primary layui-btn-sm" ckAllDay='@Html.Raw(childTag)' value="@Html.Raw(item.name)" type="button" ntype="nbp" ischeck="false" onclick="ChooseMyAll(this,'@Html.Raw(childTag)')" />
|
||||
</td>
|
||||
<td>
|
||||
<ul class="myUL">
|
||||
@{
|
||||
int mycount = 0;
|
||||
}
|
||||
@foreach (var mbitem in all.Where(m => m.tagInfos.Where(x => x.group_name == groupTag.group_name && x.tag_name == item.name).Count() > 0).OrderBy(m => m.xuhao))
|
||||
{
|
||||
mycount++;
|
||||
var mystyle = "";
|
||||
string name = string.IsNullOrEmpty(mbitem.remark) ? mbitem.nickname : mbitem.remark;
|
||||
name = common.PhoneHelper.FormatPhoneUserName(name);
|
||||
if (mycount > 10)
|
||||
{
|
||||
mystyle = "hiddenLi";
|
||||
}
|
||||
<li title="@Html.Raw(name)" class="@mystyle" mycount="@mystyle">
|
||||
<input type='checkbox' ckmonth='@Html.Raw(groupTag.group_name)' cktype='@Html.Raw(childTag)' lay-ignore name='chooseck' id='ck_@Html.Raw(mbitem.extuserid)' class='mycheckbox' onchange="ChooseOne(this,'@Html.Raw(mbitem.extuserid)','@Html.Raw(mbitem.thumb_avatar)','@Html.Raw(name)','@Html.Raw(mbitem.description)',true)" cname='@Html.Raw(name)' thumb_avatar='@Html.Raw(mbitem.thumb_avatar)' extuserid='@Html.Raw(mbitem.extuserid)' description='@Html.Raw(mbitem.description)' value='@Html.Raw(mbitem.extuserid)'>
|
||||
@if (mycount > 10)
|
||||
{
|
||||
<img src="" nsrc="@Html.Raw(mbitem.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="@Html.Raw(mbitem.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
<span class="custonername">@Html.Raw(name)</span>
|
||||
</li>
|
||||
}
|
||||
@if (mycount > 10)
|
||||
{
|
||||
<li title="显示剩余客户" onclick="ShowHiddent(this)" ishidden="true">
|
||||
<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
@foreach (var item in sefTagDic)
|
||||
{
|
||||
var childTag = "个人标签_" + item.Key;
|
||||
var groupTag = new wwGroupTagView() { group_name = "个人标签", group_id = "Xxss_11111" };
|
||||
@*var childTag = groupTag.group_name + "_" + item.name;*@
|
||||
<tr>
|
||||
<td>
|
||||
@if (!tagDic.ContainsKey(groupTag.group_id))
|
||||
{
|
||||
tagDic.Add(groupTag.group_id, groupTag.group_id);
|
||||
<a name="td_@Html.Raw(groupTag.group_id)" class="PointClass"></a>
|
||||
<input class="layui-btn layui-btn-primary layui-btn-sm" value="@Html.Raw(groupTag.group_name)" type="button" ntype="nbp2" ischeck="false" onclick="ChooseMonthMyAll(this,'@Html.Raw(groupTag.group_name)')" />
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a name="td_@Html.Raw(childTag)" class="PointClass"></a>
|
||||
<input maxgroup="@groupTag.group_name" class="layui-btn layui-btn-primary layui-btn-sm" ckAllDay='@Html.Raw(childTag)' value="@Html.Raw(item.Key)" type="button" ntype="nbp" ischeck="false" onclick="ChooseMyAll(this,'@Html.Raw(childTag)')" />
|
||||
</td>
|
||||
<td>
|
||||
<ul class="myUL">
|
||||
@{
|
||||
int mycount = 0;
|
||||
}
|
||||
@foreach (var mbitem in all.Where(m => m.tagInfos.Where(x => x.group_name == groupTag.group_name && x.tag_name == item.Key).Count() > 0).OrderBy(m => m.xuhao))
|
||||
{
|
||||
mycount++;
|
||||
var mystyle = "";
|
||||
|
||||
if (mycount > 10)
|
||||
{
|
||||
mystyle = "hiddenLi";
|
||||
}
|
||||
string name = string.IsNullOrEmpty(mbitem.remark) ? mbitem.nickname : mbitem.remark;
|
||||
name = common.PhoneHelper.FormatPhoneUserName(name);
|
||||
<li title="@Html.Raw(name)" class="@mystyle" mycount="@mystyle">
|
||||
<input type='checkbox' ckmonth='@Html.Raw(groupTag.group_name)' cktype='@Html.Raw(childTag)' lay-ignore name='chooseck' id='ck_@Html.Raw(mbitem.extuserid)' class='mycheckbox' onchange="ChooseOne(this,'@Html.Raw(mbitem.extuserid)','@Html.Raw(mbitem.thumb_avatar)','@Html.Raw(name)','@Html.Raw(mbitem.description)',true)" cname='@Html.Raw(name)' thumb_avatar='@Html.Raw(mbitem.thumb_avatar)' extuserid='@Html.Raw(mbitem.extuserid)' description='@Html.Raw(mbitem.description)' value='@Html.Raw(mbitem.extuserid)'>
|
||||
@if (mycount > 10)
|
||||
{
|
||||
<img src="" nsrc="@Html.Raw(mbitem.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="@Html.Raw(mbitem.thumb_avatar)" width='28' height='28'>
|
||||
}
|
||||
<span class="custonername">@Html.Raw(name)</span>
|
||||
</li>
|
||||
}
|
||||
@if (mycount > 10)
|
||||
{
|
||||
<li title="显示剩余客户" onclick="ShowHiddent(this)" ishidden="true">
|
||||
<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@*<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>*@
|
||||
<div style="height:200px;"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function ShowHiddent(ck){
|
||||
var hidden= $(ck).attr("ishidden");
|
||||
if(hidden=="true"){
|
||||
$(ck).parent().find("[mycount='hiddenLi']").removeClass("hiddenLi");
|
||||
$(ck).attr("ishidden","false");
|
||||
$(ck).html('<a href="javascript:void(0);">隐藏<i class="layui-icon layui-icon-up"></i> </a>');
|
||||
$(ck).parent().find("[mycount='hiddenLi']").find("img").each(function(inx,bm){
|
||||
if(!$(bm).attr("src")){
|
||||
$(bm).attr("src",$(bm).attr("nsrc"));//无数据就显示图片
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$(ck).parent().find("[mycount='hiddenLi']").addClass("hiddenLi");
|
||||
$(ck).attr("ishidden","true");
|
||||
$(ck).html('<a href="javascript:void(0);">更多<i class="layui-icon layui-icon-down"></i> </a>');
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
var selectRow = {};
|
||||
var winindex;
|
||||
var layer;
|
||||
var rowid;
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
//layui.use('element', function () {
|
||||
// var element = layui.element;
|
||||
// element.on('tab(tonghuajiankong)', function (n) {
|
||||
// $(".bodytable").addClass("hidden");
|
||||
// $("#kefuzhuangtai" + (n.index + 1)).removeClass("hidden");
|
||||
// });
|
||||
// element.on('tab(maintab)', function (n) {
|
||||
// if (n.index == 0)
|
||||
// $("#bottomcard").removeClass("hidden");
|
||||
// else
|
||||
// $("#bottomcard").addClass("hidden");
|
||||
// });
|
||||
//});
|
||||
var machineid='@ViewBag.Machineid';
|
||||
var alldata=@Html.Raw(ViewBag.Data);
|
||||
layui.use(['laypage', 'layer', 'table', 'laydate'], function () {
|
||||
var laydate = layui.laydate;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
var active = {
|
||||
add: function () {
|
||||
winindex = layer.open({
|
||||
type: 2,
|
||||
content: 'Bind?machineid=' + machineid,
|
||||
title: '绑定企业微信',
|
||||
area: ['500px', '400px']
|
||||
});
|
||||
}
|
||||
, delete: function () {
|
||||
if (selectRow.userid == "undefined" || selectRow.userid == null) {
|
||||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||||
return;
|
||||
}
|
||||
layer.confirm('确定解绑吗?', {icon: 3, title:'提示'}, function(index){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "DisBind",
|
||||
data:{machineid:machineid,userid:selectRow.userid,corpid:selectRow.corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
}, search1: function () {
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
ShearchPoint(name);
|
||||
}, search2: function () {
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
ShearchPoint(name);
|
||||
},clear:function(){
|
||||
ClearSearch();
|
||||
},searchAndCheck1:function(){
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
searchAndCheck();
|
||||
},searchAndUnCheck1:function(){
|
||||
var name=$("#searchname1").val();
|
||||
$("#searchname2").val(name);
|
||||
searchAndUnCheck();
|
||||
},searchAndCheck2:function(){
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
searchAndCheck();
|
||||
},searchAndUnCheck2:function(){
|
||||
var name=$("#searchname2").val();
|
||||
$("#searchname1").val(name);
|
||||
searchAndUnCheck();
|
||||
}
|
||||
};
|
||||
$('.layui-btn').on('click', function () {
|
||||
var othis = $(this), method = othis.data('method');
|
||||
console.log(method);
|
||||
active[method] ? active[method].call(this, othis) : '';
|
||||
|
||||
});
|
||||
$(".btnQieHuan .layui-btn").click(function(){
|
||||
$(".btnQieHuan .layui-btn-normal").removeClass("layui-btn-normal").addClass("layui-btn-primary");
|
||||
$(this).removeClass("layui-btn-primary").addClass("layui-btn-normal");
|
||||
});
|
||||
});
|
||||
var preName="";
|
||||
var searchIndex=0;
|
||||
var maodian=[];
|
||||
var maodianIndex=0;
|
||||
function ShearchPoint(name){
|
||||
if(name){
|
||||
name=$.trim(name);
|
||||
}
|
||||
if(preName!=name){//名字不相等,进行锚点创建
|
||||
preName=name;
|
||||
$(".hgguanjianci").each(function(aa,bb){
|
||||
$(this).after($(this).attr("title"));
|
||||
$(this).remove();
|
||||
});
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
maodian=[];
|
||||
maodianIndex=0;
|
||||
var mi=0;
|
||||
if(!name){
|
||||
return;
|
||||
}
|
||||
$(".custonername").each(function(aa,bb){
|
||||
var txt=$(this).html();
|
||||
if(txt.indexOf(name)>-1){
|
||||
searchIndex++;
|
||||
txt=txt.replace(name,"<span class='hgguanjianci' title='"+name+"'><a name='search_"+searchIndex+"'></a>"+name+"</span>");
|
||||
$(this).html(txt);
|
||||
maodian[mi]="search_"+searchIndex;//添加到临时集合
|
||||
mi++;
|
||||
}
|
||||
});
|
||||
console.log(maodian);
|
||||
if(maodian.length>0){
|
||||
location.href="#"+maodian[maodianIndex];//锚点定位
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
$("[name=\""+maodian[maodianIndex]+"\"]").parent().parent().addClass("LiClas");
|
||||
}else{
|
||||
layer.msg("未找查找到!", { icon: 7 });
|
||||
}
|
||||
}else{//名字相等,进行下一个锚点定位
|
||||
maodianIndex++;
|
||||
if(maodianIndex>=maodian.length){
|
||||
layer.msg("没有更多!", { icon: 7 });
|
||||
maodianIndex=-1;
|
||||
return ;
|
||||
}
|
||||
else{
|
||||
location.href="#"+maodian[maodianIndex];//锚点定位
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
$("[name=\""+maodian[maodianIndex]+"\"]").parent().parent().addClass("LiClas");
|
||||
}
|
||||
}
|
||||
preName=name;
|
||||
}
|
||||
function searchAndCheck(){
|
||||
maodianIndex--;
|
||||
//console.log($("#searchname1").val());
|
||||
ShearchPoint($("#searchname1").val());
|
||||
$(maodian).each(function(a,b){
|
||||
var checkbox= $("[name=\""+b+"\"]").parent().parent().parent().find("[type=\"checkbox\"]");
|
||||
$(checkbox).prop("checked",true);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
function searchAndUnCheck(){
|
||||
maodianIndex--;
|
||||
ShearchPoint($("#searchname1").val());
|
||||
$(maodian).each(function(a,b){
|
||||
var checkbox= $("[name=\""+b+"\"]").parent().parent().parent().find("[type=\"checkbox\"]");
|
||||
$(checkbox).prop("checked",false);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
|
||||
}
|
||||
function ClearSearch(){
|
||||
$("#searchname1").val("");
|
||||
$("#searchname2").val("");
|
||||
$(".hgguanjianci").each(function(aa,bb){
|
||||
$(this).after($(this).attr("title"));
|
||||
$(this).remove();
|
||||
});
|
||||
$(".LiClas").removeClass("LiClas");
|
||||
maodian=[];
|
||||
maodianIndex=0;
|
||||
preName="";
|
||||
}
|
||||
//选择某天勾选
|
||||
function ChooseMyAll(ck,cdate){
|
||||
|
||||
if($(ck).attr("ischeck")=="false"){
|
||||
$("#newTable").find("[cktype='"+cdate+"']").prop("checked",true);
|
||||
//$(ck).attr("ischeck","true").addClass("layui-border-blue");
|
||||
$("[ckallday='"+cdate+"']").attr("ischeck","true").addClass("layui-border-blue");
|
||||
|
||||
}else{
|
||||
$("#newTable").find("[cktype='"+cdate+"']").prop("checked",false);
|
||||
//$(ck).attr("ischeck","false").removeClass("layui-border-blue");
|
||||
$("[ckallday='"+cdate+"']").attr("ischeck","false").removeClass("layui-border-blue");
|
||||
}
|
||||
$("#newTable").find("[cktype='"+cdate+"']").each(function(dd,i){
|
||||
ChooseOne(this,$(this).attr("extuserid"),$(this).attr("thumb_avatar"),$(this).attr("cname"),$(this).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
//月份勾选
|
||||
function ChooseMonthMyAll(ck,cdate){
|
||||
if($(ck).attr("ischeck")=="false"){
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").prop("checked",true);
|
||||
$(ck).attr("ischeck","true").addClass("layui-border-blue");
|
||||
$("[maxgroup='"+cdate+"']").attr("ischeck","true").addClass("layui-border-blue");
|
||||
|
||||
}else{
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").prop("checked",false);
|
||||
$(ck).attr("ischeck","false").removeClass("layui-border-blue");
|
||||
$("[maxgroup='"+cdate+"']").attr("ischeck","false").removeClass("layui-border-blue");
|
||||
}
|
||||
$("#newTable").find("[ckmonth='"+cdate+"']").each(function(dd,i){
|
||||
ChooseOne(this,$(this).attr("extuserid"),$(this).attr("thumb_avatar"),$(this).attr("cname"),$(this).attr("description"),false);
|
||||
});
|
||||
ShowCount();
|
||||
}
|
||||
//单个勾选
|
||||
function ChooseOne(ck,extuserid,thumb_avatar,title,description,isOne){
|
||||
if(ck){
|
||||
if($(ck).is(':checked')){
|
||||
if($("#Chose_"+extuserid).length==0){
|
||||
var html="<li title='"+title+"'description='"+description+"' id='Chose_"+extuserid+"' avatar='"+thumb_avatar+"' onclick='CanCleOne(this,\""+extuserid+"\")'><img src='"+thumb_avatar+"' width='30' height='30'></li>";
|
||||
$("#chooseUL").append(html);
|
||||
}
|
||||
}else{
|
||||
console.log("选择一下!!!");
|
||||
var hasCount=0;
|
||||
$("#newTable").find("[id='ck_"+extuserid+"']").each(function(){
|
||||
if($(this).is(':checked')){
|
||||
hasCount++;
|
||||
}
|
||||
})
|
||||
if(hasCount==0){//如果在勾选界面中没有任何被勾选了,那么需要去除勾选
|
||||
$("#Chose_"+extuserid).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isOne){
|
||||
ShowCount();
|
||||
}
|
||||
}
|
||||
//已选客户头像点击,取消
|
||||
function CanCleOne(cn,extuserid){
|
||||
$(cn).remove();
|
||||
$($("#newTable #ck_"+extuserid)).each(function(bb,dd){
|
||||
console.log(dd);
|
||||
$(this).prop("checked",false);
|
||||
});
|
||||
|
||||
ShowCount();
|
||||
}
|
||||
//显示已选数量
|
||||
function ShowCount(){
|
||||
var chooseLenth=$("#chooseUL").children().length;
|
||||
$("#chooseCount").html(chooseLenth);
|
||||
$("#ChooseCountXF").html(chooseLenth);
|
||||
|
||||
}
|
||||
function Closed() {
|
||||
layer.close(winindex);
|
||||
}
|
||||
function TableReload() {
|
||||
table.reload('listReload', {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//提交
|
||||
function SubMit(){
|
||||
var outuserids = [];
|
||||
var userid = '@Html.Raw(ViewBag.userid)';
|
||||
var corpid = '@Html.Raw(ViewBag.corpid)';
|
||||
var subdata=[];
|
||||
$("#chooseUL li").each(function(a,b){
|
||||
subdata[a]={name:$(this).attr("title"),description:$(this).attr("description"),avatar:$(this).attr("avatar")};
|
||||
outuserids[a] = {name:$(this).attr("title"),userid : $(this).attr("id").replace("Chose_","")};
|
||||
});
|
||||
var last=JSON.stringify(subdata);
|
||||
console.log(last)
|
||||
//alert(subdata);
|
||||
setdata(last);
|
||||
|
||||
window.parent.postMessage({ type: "chooseMsgToolUser",pagetype:1, userid:userid,outuserList: outuserids,corpid:corpid}, "*");
|
||||
}
|
||||
//清空已选
|
||||
function ClearAll(){
|
||||
$("#chooseUL").html("");//清空
|
||||
$("#newTable").find(":checked").prop("checked",false);
|
||||
$("[ntype='nbp2']").attr("ischeck","false");
|
||||
$("[ckAllDay]").attr("ischeck","false");
|
||||
ShowCount();
|
||||
}
|
||||
window.addEventListener('message',function(e){
|
||||
var value = e.data;
|
||||
//返回方法向父页面发送数据
|
||||
if (value != null && value.type == 'initData') {
|
||||
if (value.userChose != "") {
|
||||
var outuserList = value.userChose.outuserList;
|
||||
for (var i = 0; i < outuserList.length; i++) {
|
||||
checkbox = $("#newTable").find("#ck_"+outuserList[i].userid);
|
||||
$(checkbox).prop("checked",true);
|
||||
ChooseOne( $(checkbox),$(checkbox).attr("extuserid"),$(checkbox).attr("thumb_avatar"),$(checkbox).attr("cname"),$(checkbox).attr("description"),false);
|
||||
}
|
||||
ShowCount();
|
||||
}
|
||||
|
||||
}
|
||||
}, false);
|
||||
document.onkeydown = function (e) {
|
||||
//捕捉回车事件
|
||||
var ev = (typeof event != 'undefined') ? window.event : e;
|
||||
if (ev.keyCode == 13 || event.which == 13) {
|
||||
ShearchPoint($("#searchname1").val());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(async function(){
|
||||
//await CefSharp.BindObjectAsync("cefsharpbrowser");
|
||||
})();
|
||||
|
||||
function setdata(data) {
|
||||
try{
|
||||
cefsharpbrowser.setdata(data);
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<ul id="ShowChoose" class="layui-fixbar" style="top:60px;display:none;">
|
||||
<li class="layui-icon " lay-type="top" style="display: list-item;line-height: 23px;font-size: 16px;width: 60px;">已选<br /><span id="ChooseCountXF">0</span>人</li>
|
||||
</ul>
|
||||
<ul class="layui-fixbar">
|
||||
<li class="layui-icon layui-fixbar-top" lay-type="top" style="display: list-item;"></li>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,293 @@
|
|||
@using model;
|
||||
@{
|
||||
ViewBag.Title = "我的企业微信";
|
||||
Layout = "~/Views/Shared/_content.cshtml";
|
||||
}
|
||||
<div class="layui-container" style="padding-left:0px;padding-top:10px;">
|
||||
<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>
|
||||
</div>
|
||||
<!--确定宽度-->
|
||||
<style type="text/css">
|
||||
.layui-table-body .layui-table-cell {
|
||||
height: auto;
|
||||
line-height: 100px;
|
||||
}
|
||||
|
||||
.HeadImg {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.leftDiv {
|
||||
float: left;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.MyUL {
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.MyUL li {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.MyUL2 {
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.MyUL2 li {
|
||||
line-height: 30px;
|
||||
width: 90px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.leftDiv a:hover {
|
||||
color: #FF5722;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var table;
|
||||
$(function () {
|
||||
//var tempwidth = 1410;
|
||||
//var tempheight = 1115;
|
||||
//var width = $(window).width();
|
||||
//var height = Math.ceil(width * (tempheight / tempwidth));
|
||||
//$("body").height($(window).height() + 150);
|
||||
|
||||
//$(window).resize(function () {//自动适应大小
|
||||
// console.log("resize");
|
||||
// table.resize('tab_kefuzhuangtaiyi1');
|
||||
//});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var needBind ="@Html.Raw(ViewBag.needBind)";
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
//执行一个laydate实例
|
||||
laydate.render({
|
||||
elem: '#start' //指定元素
|
||||
});
|
||||
//执行一个laydate实例
|
||||
laydate.render({
|
||||
elem: '#end' //指定元素
|
||||
});
|
||||
});
|
||||
var selectRow = {};
|
||||
var winindex;
|
||||
var layer;
|
||||
var rowid;
|
||||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||||
layui.use('element', function () {
|
||||
var element = layui.element;
|
||||
element.on('tab(tonghuajiankong)', function (n) {
|
||||
$(".bodytable").addClass("hidden");
|
||||
$("#kefuzhuangtai" + (n.index + 1)).removeClass("hidden");
|
||||
});
|
||||
element.on('tab(maintab)', function (n) {
|
||||
if (n.index == 0)
|
||||
$("#bottomcard").removeClass("hidden");
|
||||
else
|
||||
$("#bottomcard").addClass("hidden");
|
||||
});
|
||||
});
|
||||
var machineid='@ViewBag.Machineid';
|
||||
layui.use(['laypage', 'layer', 'table', 'laydate'], function () {
|
||||
var laydate = layui.laydate;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
table.render({
|
||||
id: 'listReload'//列表别名ID
|
||||
,toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
|
||||
,defaultToolbar:[]
|
||||
, elem: '#tab_kefuzhuangtaiyi1'
|
||||
, url: '/Home/GetWeWorktHtmlList?machineid=@ViewBag.Machineid'
|
||||
, method: 'POST'
|
||||
, page: true
|
||||
, limit: 30
|
||||
, height: "full-160"
|
||||
,width:700
|
||||
,skin: 'line' //行边框风格
|
||||
,even: true //开启隔行背景
|
||||
//, size:"sm"
|
||||
, cols: [[
|
||||
, { field: 'exinfo',width:690, title: '我的企业微信列表',height:300,templet:function(d){
|
||||
var html="";
|
||||
html+="<div class='leftDiv'><a title='进入我的客户,进行筛选!' href=\"CSelectionTag?machineid="+d.machineid+"&userid="+d.userid+"&corpid="+d.corpid+"\"><img src='"+(d.thumb_avatar)+"'width='90' height='90' class='HeadImg'/><ul class='MyUL'>";
|
||||
html+="<li>企业号:"+d.corpname+"</li>";
|
||||
html+="<li>昵称:"+d.name+"</li>";
|
||||
html+="<li>号码:"+d.mobile+"</li>";
|
||||
html+="</ul></a></div>";
|
||||
html+="<ul class='MyUL2'>";
|
||||
html+='<li> </li>';
|
||||
html+="<li> </li>";
|
||||
if(d.isdefault==1){
|
||||
html+= "<li><span style='color:green;'>默认</span>";
|
||||
}else{
|
||||
html+="<li><a href='javascript:SetDefault(\""+d.userid+"\",\""+d.corpid+"\");' style='color:#1E9FFF;'>设为默认</a>";
|
||||
}
|
||||
html+=" <a href='javascript:DisBind(\""+d.userid+"\",\""+d.corpid+"\");' style='color:red;'>删除</a></li>";
|
||||
|
||||
html+="</ul>";
|
||||
return html ;
|
||||
}
|
||||
}
|
||||
]], where: $("#myform").serializeFormJSON()
|
||||
});
|
||||
//监听行单击事件(单击事件为:rowDouble)
|
||||
//table.on('row(wochao)', function (obj) {
|
||||
// var data = obj.data;
|
||||
// //console.log(data);
|
||||
// //标注选中样式
|
||||
// obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||||
// selectRow = data;
|
||||
//});
|
||||
|
||||
|
||||
var active = {
|
||||
add: function () {
|
||||
winindex = layer.open({
|
||||
type: 2,
|
||||
content: 'Bind?machineid=' + machineid,
|
||||
title: '绑定企业微信',
|
||||
area: ['500px', '400px']
|
||||
});
|
||||
}
|
||||
, delete: function () {
|
||||
if (selectRow.userid == "undefined" || selectRow.userid == null) {
|
||||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||||
return;
|
||||
}
|
||||
layer.confirm('确定解绑吗?', {icon: 3, title:'提示'}, function(index){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "DisBind",
|
||||
data:{machineid:machineid,userid:selectRow.userid,corpid:selectRow.corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
},set:function(){
|
||||
if (selectRow.userid == "undefined" || selectRow.userid == null) {
|
||||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||||
return;
|
||||
}
|
||||
layer.confirm('确定设为默认吗?', {icon: 3, title:'提示'}, function(index){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "SetDefault",
|
||||
data:{machineid:machineid,userid:selectRow.userid,corpid:selectRow.corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
}, search: function () {
|
||||
var param = $("#myform").serializeFormJSON();
|
||||
table.reload('listReload', {
|
||||
page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
},
|
||||
where: param
|
||||
});
|
||||
}
|
||||
};
|
||||
$('.layui-btn').on('click', function () {
|
||||
var othis = $(this), method = othis.data('method');
|
||||
console.log(method);
|
||||
active[method] ? active[method].call(this, othis) : '';
|
||||
|
||||
});
|
||||
if(needBind=="1"){
|
||||
winindex = layer.open({
|
||||
type: 2,
|
||||
content: 'Bind?machineid=' + machineid,
|
||||
title: '绑定企业微信',
|
||||
area: ['500px', '400px']
|
||||
});
|
||||
}
|
||||
});
|
||||
function DisBind(userid,corpid){
|
||||
layer.confirm('确定解绑吗?', {icon: 3, title:'提示'}, function(index){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "DisBind",
|
||||
data:{machineid:machineid,userid:userid,corpid:corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
});
|
||||
}
|
||||
function SetDefault(userid,corpid){
|
||||
var loading = layer.load(0, { shade: true});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "SetDefault",
|
||||
data:{ machineid:machineid,userid:userid,corpid:corpid} ,
|
||||
dataType: "json",
|
||||
success: function (da) {
|
||||
if (da.result == true) {
|
||||
layer.msg('操作成功!', { icon: 1 });
|
||||
TableReload();
|
||||
} else {
|
||||
layer.msg(da.retmsg, { icon: 2 });
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('操作失败!', { icon: 2 });
|
||||
}
|
||||
});
|
||||
layer.close(loading);
|
||||
}
|
||||
function Closed() {
|
||||
layer.close(winindex);
|
||||
}
|
||||
function TableReload() {
|
||||
table.reload('listReload', {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<input class="layui-btn layui-btn-primary layui-border-blue" data-method="add" type="button" value="+绑定" />
|
||||
</div>
|
||||
</script>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
@{
|
||||
ViewData["Title"] = "Privacy Policy";
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
<p>Use this page to detail your site's privacy policy.</p>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - web</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/web.styles.css" asp-append-version="true" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">web</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="container">
|
||||
<main role="main" class="pb-3">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2022 - web - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
for details on configuring this project to bundle and minify static web assets. */
|
||||
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0077cc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
button.accept-policy {
|
||||
font-size: 1rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@*小型界面模板 如角色管理*@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@*<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">*@
|
||||
<title>@ViewBag.Title - 企微管理</title>
|
||||
<!--<link href="/layui-v2.5.4/css/layui.css" rel="stylesheet" />-->
|
||||
@*<link href="/layui-v2.5.4/css/layui.css" rel="stylesheet" />*@
|
||||
<link href="/layui-v2.6.4/layui/css/layui.css" rel="stylesheet" />
|
||||
<script src="/Scripts/jquery-1.10.2.min.js"></script>
|
||||
<link href="/layui-v2.6.4/layui/css/workbench.css" rel="stylesheet" />
|
||||
<link href="/layui-v2.6.4/layui/css/common.css" rel="stylesheet" />
|
||||
@*<script src="/layui-v2.5.4/layui.js"></script>*@
|
||||
<script src="/layui-v2.6.4/layui/layui.js"></script>
|
||||
|
||||
<script src="~/Scripts/common.js"></script>
|
||||
<script src="~/Scripts/newCommon.js"></script>
|
||||
</head>
|
||||
<body class="" style="overflow-y:auto;overflow-x:hidden;">
|
||||
<!--确定宽度-->
|
||||
@RenderBody()
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
@*用于表单界面模板 如角色编辑*@
|
||||
<!DOCTYPE html>
|
||||
<html style="height:100%">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title - 客户管理系统</title>
|
||||
<link href="/layui-v2.6.4/layui/css/layui.css" rel="stylesheet" />
|
||||
<script src="/Scripts/jquery-1.10.2.min.js"></script>
|
||||
<link href="/layui-v2.6.4/layui/css/common.css" rel="stylesheet" />
|
||||
<script src="/layui-v2.6.4/layui/layui.js"></script>
|
||||
<script src="~/Scripts/common.js"></script>
|
||||
<script src="~/Scripts/newCommon.js"></script>
|
||||
<style>
|
||||
.layui-btn-ok {
|
||||
background: #FF4D4D;
|
||||
}
|
||||
|
||||
.layui-form-radio > i:hover, .layui-form-radioed > i {
|
||||
color: #FF4D4D;
|
||||
}
|
||||
|
||||
.my_form_iterm {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.erro_msg {
|
||||
color: red !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!--确定宽度-->
|
||||
<form id="wocaaa" class="layui-form" action="">
|
||||
@RenderBody()
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
@using web
|
||||
@using web.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": { "mysql": "Server=192.168.11.35;User Id=root;Password=sa123456.;Database=pcwework;Old Guids=true;SslMode=None" }
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<!-- This section contains the log4net configuration settings -->
|
||||
<log4net>
|
||||
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="Log/" />
|
||||
<appendToFile value="true" />
|
||||
<rollingStyle value="Composite" />
|
||||
<staticLogFileName value="false" />
|
||||
<datePattern value="yyyyMMdd'.log'" />
|
||||
<maxSizeRollBackups value="10" />
|
||||
<maximumFileSize value="50MB" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-5level %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Setup the root category, add the appenders and set the default level -->
|
||||
<root>
|
||||
<level value="ALL" />
|
||||
<appender-ref ref="RollingLogFileAppender" />
|
||||
</root>
|
||||
|
||||
</log4net>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UserSecretsId>ab4e41e6-3eaf-417c-b0cf-187741be70f0</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="6.3.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\common\common.csproj" />
|
||||
<ProjectReference Include="..\model\model.csproj" />
|
||||
<ProjectReference Include="..\services\services.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,709 @@
|
|||
|
||||
|
||||
//要获取的参数名称
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return r[2];
|
||||
}
|
||||
return null
|
||||
}
|
||||
//===========================字符串辅助================================
|
||||
|
||||
//生成唯一的GUID
|
||||
function GetGuid() {
|
||||
var s4 = function () {
|
||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||
};
|
||||
return s4() + s4() + s4() + "-" + s4();
|
||||
}
|
||||
|
||||
//========= common公用方法,只暴露需要的方法,不影响全局变量========
|
||||
(function (win) {
|
||||
var CRM_Comon, document, defaults;
|
||||
document = win.document;
|
||||
defaults = {
|
||||
//添加属性
|
||||
};
|
||||
CRM_Comon = function (option) {
|
||||
return new CRM_Comon.prototype.init(option);
|
||||
};
|
||||
CRM_Comon.prototype.init = function (option) {
|
||||
this.options = $.extend(true, {}, defaults, option);
|
||||
return this;
|
||||
};
|
||||
//===================这里添加具体方法===============
|
||||
|
||||
//==设置光标离开开始验证
|
||||
CRM_Comon.prototype.FocusoutCheck = function () {
|
||||
$.validator.setDefaults({
|
||||
//光标移出时
|
||||
onfocusout: function (element) {
|
||||
this.element(element);
|
||||
},
|
||||
//光标移入时
|
||||
onfocusin: function (element, event) {
|
||||
//找到显示错误提示的标签并移除,针对jquery.validate.unobtrusive
|
||||
var errorElement = $(element).next('span.field-validation-error');
|
||||
if (errorElement) {
|
||||
errorElement.children().remove();
|
||||
}
|
||||
},
|
||||
onkeyup: function (element, event) {
|
||||
}
|
||||
});
|
||||
};
|
||||
//==ModelState自定义的错误显示在前端
|
||||
CRM_Comon.prototype.showErrors = function (Validate) {
|
||||
if (typeof Validate !== "undefined" && Validate.length > 0) {
|
||||
$.each(Validate, function (index, failure) {
|
||||
var timeValue, formElements, nextTd, spans;
|
||||
formElements = $("#" + failure.PropertyName);
|
||||
nextTd = formElements.parent().next();
|
||||
timeValue = failure.PropertyName.toLowerCase().indexOf('time');
|
||||
if (nextTd.length > 0) {
|
||||
spans = nextTd.children(".validationMessage");
|
||||
}
|
||||
else {
|
||||
spans = formElements.siblings(".validationMessage");
|
||||
}
|
||||
if (spans.length === 0) {
|
||||
///如果未存在 span,则新建
|
||||
var span = $('<span></span>', {
|
||||
'class': 'validationMessage',
|
||||
text: failure.Message
|
||||
});
|
||||
if (nextTd.length > 0) {
|
||||
nextTd.append(span);
|
||||
}
|
||||
else {
|
||||
span.insertAfter(formElements);
|
||||
}
|
||||
if (timeValue > -1) {
|
||||
formElements.bind('focus', function () {
|
||||
span.text('').hide();
|
||||
$(this).removeClass("input-error");
|
||||
}).addClass("input-error");
|
||||
}
|
||||
else {
|
||||
formElements.bind('keyup', function () {
|
||||
span.text('').hide();
|
||||
$(this).removeClass("input-error");
|
||||
}).addClass("input-error");
|
||||
}
|
||||
} else {
|
||||
spans.each(function (i, span) {
|
||||
var $span = $(span);
|
||||
$span.show().text(failure.Message);
|
||||
if (timeValue > -1) {
|
||||
formElements.bind('focus', function () {
|
||||
$span.text('').hide();
|
||||
}).addClass("input-error");
|
||||
}
|
||||
else {
|
||||
formElements.bind('keyup', function () {
|
||||
$span.text('').hide();
|
||||
}).addClass("input-error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
//--------------获取时间
|
||||
CRM_Comon.prototype.GetDate = function (options) {
|
||||
var defaults = {
|
||||
};
|
||||
function DateDetaile(setDate) {
|
||||
var date, year, month, day, hours, minutes, seconds, week, timestamp, detaile;
|
||||
date = setDate || new Date();
|
||||
year = date.getFullYear();
|
||||
month = date.getMonth() + 1;
|
||||
day = date.getDate();
|
||||
hours = date.getHours();
|
||||
minutes = date.getMinutes();
|
||||
seconds = date.getSeconds();
|
||||
week = date.getDay();
|
||||
timestamp = date.valueOf();
|
||||
month = (month < 10 && "0" + month) || month;
|
||||
day = (day < 10 && "0" + day) || day;
|
||||
hours = (hours < 10 && "0" + hours) || hours;
|
||||
minutes = (minutes < 10 && "0" + minutes) || minutes;
|
||||
seconds = (seconds < 10 && "0" + seconds) || seconds;
|
||||
detaile = {
|
||||
_date: date,
|
||||
_year: year,
|
||||
_month: month,
|
||||
_day: day,
|
||||
_hours: hours,
|
||||
_minutes: minutes,
|
||||
_seconds: seconds,
|
||||
_week: week,
|
||||
_timestamp: timestamp
|
||||
}
|
||||
return detaile;
|
||||
}
|
||||
//日期的最小或最大时间
|
||||
function MaxOrMinDate(date, options) {
|
||||
var Localdefault, localeDate, optionDefault;
|
||||
Localdefault = {
|
||||
MaxDate: false,
|
||||
MinDate: false
|
||||
};
|
||||
optionDefault = $.extend(true, {}, Localdefault, options);
|
||||
localeDate = (optionDefault.MinDate && date + " 00:00:00") || (optionDefault.MaxDate && date + " 23:59:59") || date;
|
||||
return localeDate;
|
||||
}
|
||||
//----
|
||||
var getdate = DateDetaile();
|
||||
function GetDate(options) {
|
||||
this.options = $.extend(true, {}, defaults, options);
|
||||
}
|
||||
//本月第一天
|
||||
GetDate.prototype.getFistDate = function (options) {
|
||||
var firstdate = getdate._year + '-' + getdate._month + "-" + "01";
|
||||
var returnDate = MaxOrMinDate(firstdate, options);
|
||||
return returnDate;
|
||||
}
|
||||
//本月最后一天
|
||||
GetDate.prototype.getLastDate = function (options) {
|
||||
var day = new Date(getdate._year, getdate._month, 0);
|
||||
var lastdate = getdate._year + '-' + getdate._month + '-' + day.getDate();
|
||||
var returnDate = MaxOrMinDate(lastdate, options);
|
||||
return returnDate;
|
||||
}
|
||||
//当前日期
|
||||
GetDate.prototype.getLocalDate = function (options) {
|
||||
var localeDate, returnDate;
|
||||
localeDate = getdate._year + '-' + getdate._month + "-" + getdate._day;
|
||||
returnDate = MaxOrMinDate(localeDate, options);
|
||||
return returnDate;
|
||||
}
|
||||
//当前时间
|
||||
GetDate.prototype.getLocalTime = function () {
|
||||
var localeTime = getdate._year + '-' + getdate._month + "-" + getdate._day + " " + getdate._hours + ":" + getdate._minutes + ":" + getdate._seconds;
|
||||
return localeTime;
|
||||
}
|
||||
//当前时间+ - 天数
|
||||
GetDate.prototype.AddDays = function (days, options) {
|
||||
var _days, countstamp, newDate, newDateDetaile, localeDate, returnDate;
|
||||
_days = Number(days) || 0;
|
||||
countstamp = getdate._timestamp + (_days * 24 * 60 * 60 * 1000);
|
||||
newDate = new Date(countstamp);
|
||||
var newDateDetaile = DateDetaile(newDate);
|
||||
localeDate = newDateDetaile._year + '-' + newDateDetaile._month + "-" + newDateDetaile._day;
|
||||
returnDate = MaxOrMinDate(localeDate, options);
|
||||
return returnDate;
|
||||
}
|
||||
//当前周星期(1~n)
|
||||
GetDate.prototype.getDateOfWeek = function (week, options) {
|
||||
var _setweek, countstamp, newDate, returnDate, _getweek;
|
||||
_setweek = (week < 1 && 1) || (week > 7 && 7) || week;
|
||||
_getweek = getdate._week || 7;
|
||||
countstamp = getdate._timestamp + ((_setweek - _getweek) * 24 * 60 * 60 * 1000);
|
||||
newDate = new Date(countstamp);
|
||||
var newDateDetaile = DateDetaile(newDate);
|
||||
returnDate = newDateDetaile._year + '-' + newDateDetaile._month + "-" + newDateDetaile._day;
|
||||
returnDate = MaxOrMinDate(returnDate, options);
|
||||
return returnDate;
|
||||
}
|
||||
return new GetDate(options);
|
||||
};
|
||||
|
||||
//--------------显示详情
|
||||
CRM_Comon.prototype.PopUpBox = function (options) {
|
||||
var PopUpBox, PublicFn, defaults;
|
||||
defaults = {
|
||||
isMarked: true,//是否需要遮罩
|
||||
marked_opt: 0.3,//遮罩的透明度
|
||||
speed: 500,
|
||||
width: "400px",
|
||||
height: "300px",
|
||||
scrollbar: false
|
||||
};
|
||||
PopUpBox = function (option) {
|
||||
this.options = $.extend(true, {}, defaults, option);
|
||||
};
|
||||
|
||||
PublicFn = {
|
||||
PopUpBox_init: function () {
|
||||
var self = this;
|
||||
$('<div id="popup_bg"><div id="popup_content"></div><div class="popup_close">[close]</div></div>').appendTo('body');
|
||||
$('<div class="pop_mark"></div>').appendTo('body');
|
||||
$('#popup_bg').css({
|
||||
position: "absolute",
|
||||
padding: "20px 3px 3px 3px",
|
||||
zIndex: 999,
|
||||
display: "none",
|
||||
background: "#fff",
|
||||
overflow: "hidden",
|
||||
border: "1px solid #CACACA"
|
||||
}
|
||||
);
|
||||
|
||||
$('.popup_close').css({
|
||||
position: "absolute",
|
||||
top: "2px",
|
||||
right: "2px",
|
||||
cursor: "pointer",
|
||||
zIndex: 1000,
|
||||
color: "#000"
|
||||
}).bind("click", function (e) {
|
||||
e.preventDefault();
|
||||
self.TurnToHide.apply(self);
|
||||
});
|
||||
$('.pop_mark').css({
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
backgroundColor: "#777",
|
||||
zIndex: 998,
|
||||
left: 0,
|
||||
display: " none"
|
||||
}
|
||||
).bind("click", function (e) {
|
||||
e.preventDefault();
|
||||
self.TurnToHide.apply(self);
|
||||
});
|
||||
},
|
||||
TurnToHide: function () {
|
||||
$('.pop_mark').stop(false, true).fadeOut(300);
|
||||
$('#popup_bg').stop(false, true).fadeOut(300, function () {
|
||||
$('#popup_content').empty();
|
||||
});
|
||||
},
|
||||
marked: function (marked_opt) {
|
||||
return $('.pop_mark').css({
|
||||
height: document.documentElement.scrollHeight,
|
||||
width: document.documentElement.scrollWidth
|
||||
}).stop(false, true).show()
|
||||
.animate({ opacity: marked_opt }, 0)
|
||||
}
|
||||
};
|
||||
|
||||
//(function () {
|
||||
// if (!$("#popup_bg")) {
|
||||
// PublicFn.PopUpBox_init();
|
||||
// }
|
||||
//})();
|
||||
PopUpBox.prototype.ViewCenter = function (getValue) {
|
||||
var $box, top, left, maxbox, $content;
|
||||
if (this.options.isMarked) {
|
||||
PublicFn.marked(this.options.marked_opt);
|
||||
}
|
||||
$box = $('#popup_bg');
|
||||
$content = $('#popup_content');
|
||||
$content.css({
|
||||
width: this.options.width,
|
||||
height: this.options.height,
|
||||
border: "solid 1px #AAA9AE",
|
||||
padding: "5px",
|
||||
background: "#F8F8F8",
|
||||
overflow: "auto"
|
||||
});
|
||||
maxbox = {
|
||||
width: $content.outerWidth(),
|
||||
height: $content.outerHeight()
|
||||
};
|
||||
maxbox.height = maxbox.height > $(window).height() - 80 ? $(window).height() - 80 : maxbox.height;
|
||||
maxbox.width = maxbox.width * (maxbox.height / $content.outerHeight());
|
||||
top = ($(window).height() - maxbox.height - 30) / 2 + $(document).scrollTop();
|
||||
left = ($(window).width() - maxbox.width - 20) / 2 + $(document).scrollLeft();
|
||||
$box.css({
|
||||
width: maxbox.width,
|
||||
height: maxbox.height,
|
||||
top: top,
|
||||
left: left
|
||||
}).stop(false, true).fadeIn(this.options.speed);
|
||||
var $p = $('<p></p>');
|
||||
$p.css({
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
lineHeight: '22px'
|
||||
}).appendTo($content).html(getValue)
|
||||
};
|
||||
(function () {
|
||||
if ($("#popup_bg").length < 1) {
|
||||
PublicFn.PopUpBox_init();
|
||||
}
|
||||
})();
|
||||
return new PopUpBox(options);
|
||||
}
|
||||
|
||||
/*------------------------------------*/
|
||||
CRM_Comon.prototype.init.prototype = CRM_Comon.prototype;
|
||||
win.CRM_Comon = CRM_Comon;
|
||||
})(window);
|
||||
|
||||
//
|
||||
function OpenCustomerByResId(resId) {
|
||||
var windowUrl = "/Csvr/CustomerInfo/CustomerDetail?resid=" + resId;
|
||||
window.parent.ChildAddTab("客户详细", windowUrl, "icon-memeber");
|
||||
};
|
||||
|
||||
|
||||
Date.prototype.Format = function (fmt) { //author: meizz
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //月份
|
||||
"d+": this.getDate(), //日
|
||||
"h+": this.getHours(), //小时
|
||||
"m+": this.getMinutes(), //分
|
||||
"s+": this.getSeconds(), //秒
|
||||
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
||||
"S": this.getMilliseconds() //毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in o)
|
||||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
return fmt;
|
||||
}
|
||||
/**
|
||||
* 日期范围工具类
|
||||
*/
|
||||
var dateRangeUtil = (function () {
|
||||
/***
|
||||
* 获得当前时间
|
||||
*/
|
||||
this.getCurrentDate = function () {
|
||||
return new Date();
|
||||
};
|
||||
|
||||
/***
|
||||
* 获得本周起止时间
|
||||
*/
|
||||
this.getCurrentWeek = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//返回date是一周中的某一天
|
||||
var week = currentDate.getDay();
|
||||
//返回date是一个月中的某一天
|
||||
var month = currentDate.getDate();
|
||||
|
||||
//一天的毫秒数
|
||||
var millisecond = 1000 * 60 * 60 * 24;
|
||||
//减去的天数
|
||||
var minusDay = week != 0 ? week - 1 : 6;
|
||||
//alert(minusDay);
|
||||
//本周 周一
|
||||
var monday = new Date(currentDate.getTime() - (minusDay * millisecond));
|
||||
//本周 周日
|
||||
var sunday = new Date(monday.getTime() + (6 * millisecond));
|
||||
//添加本周时间
|
||||
startStop.push(monday); //本周起始时间
|
||||
//添加本周最后一天时间
|
||||
startStop.push(sunday); //本周终止时间
|
||||
//返回
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/***
|
||||
* 获得本月的起止时间
|
||||
*/
|
||||
this.getCurrentMonth = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//获得当前月份0-11
|
||||
var currentMonth = currentDate.getMonth();
|
||||
//获得当前年份4位年
|
||||
var currentYear = currentDate.getFullYear();
|
||||
//求出本月第一天
|
||||
var firstDay = new Date(currentYear, currentMonth, 1);
|
||||
|
||||
|
||||
//当为12月的时候年份需要加1
|
||||
//月份需要更新为0 也就是下一年的第一个月
|
||||
if (currentMonth == 11) {
|
||||
currentYear++;
|
||||
currentMonth = 0; //就为
|
||||
} else {
|
||||
//否则只是月份增加,以便求的下一月的第一天
|
||||
currentMonth++;
|
||||
}
|
||||
|
||||
|
||||
//一天的毫秒数
|
||||
var millisecond = 1000 * 60 * 60 * 24;
|
||||
//下月的第一天
|
||||
var nextMonthDayOne = new Date(currentYear, currentMonth, 1);
|
||||
//求出上月的最后一天
|
||||
var lastDay = new Date(nextMonthDayOne.getTime() - millisecond);
|
||||
|
||||
//添加至数组中返回
|
||||
startStop.push(firstDay);
|
||||
startStop.push(lastDay);
|
||||
//返回
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/**
|
||||
* 得到本季度开始的月份
|
||||
* @param month 需要计算的月份
|
||||
***/
|
||||
this.getQuarterSeasonStartMonth = function (month) {
|
||||
var quarterMonthStart = 0;
|
||||
var spring = 0; //春
|
||||
var summer = 3; //夏
|
||||
var fall = 6; //秋
|
||||
var winter = 9; //冬
|
||||
//月份从0-11
|
||||
if (month < 3) {
|
||||
return spring;
|
||||
}
|
||||
|
||||
if (month < 6) {
|
||||
return summer;
|
||||
}
|
||||
|
||||
if (month < 9) {
|
||||
return fall;
|
||||
}
|
||||
|
||||
return winter;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获得该月的天数
|
||||
* @param year年份
|
||||
* @param month月份
|
||||
* */
|
||||
this.getMonthDays = function (year, month) {
|
||||
//本月第一天 1-31
|
||||
var relativeDate = new Date(year, month, 1);
|
||||
//获得当前月份0-11
|
||||
var relativeMonth = relativeDate.getMonth();
|
||||
//获得当前年份4位年
|
||||
var relativeYear = relativeDate.getFullYear();
|
||||
|
||||
//当为12月的时候年份需要加1
|
||||
//月份需要更新为0 也就是下一年的第一个月
|
||||
if (relativeMonth == 11) {
|
||||
relativeYear++;
|
||||
relativeMonth = 0;
|
||||
} else {
|
||||
//否则只是月份增加,以便求的下一月的第一天
|
||||
relativeMonth++;
|
||||
}
|
||||
//一天的毫秒数
|
||||
var millisecond = 1000 * 60 * 60 * 24;
|
||||
//下月的第一天
|
||||
var nextMonthDayOne = new Date(relativeYear, relativeMonth, 1);
|
||||
//返回得到上月的最后一天,也就是本月总天数
|
||||
return new Date(nextMonthDayOne.getTime() - millisecond).getDate();
|
||||
};
|
||||
|
||||
/**
|
||||
* 获得本季度的起止日期
|
||||
*/
|
||||
this.getCurrentSeason = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//获得当前月份0-11
|
||||
var currentMonth = currentDate.getMonth();
|
||||
//获得当前年份4位年
|
||||
var currentYear = currentDate.getFullYear();
|
||||
//获得本季度开始月份
|
||||
var quarterSeasonStartMonth = this.getQuarterSeasonStartMonth(currentMonth);
|
||||
//获得本季度结束月份
|
||||
var quarterSeasonEndMonth = quarterSeasonStartMonth + 2;
|
||||
|
||||
//获得本季度开始的日期
|
||||
var quarterSeasonStartDate = new Date(currentYear, quarterSeasonStartMonth, 1);
|
||||
//获得本季度结束的日期
|
||||
var quarterSeasonEndDate = new Date(currentYear, quarterSeasonEndMonth, this.getMonthDays(currentYear, quarterSeasonEndMonth));
|
||||
//加入数组返回
|
||||
startStop.push(quarterSeasonStartDate);
|
||||
startStop.push(quarterSeasonEndDate);
|
||||
//返回
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/***
|
||||
* 得到本年的起止日期
|
||||
*
|
||||
*/
|
||||
this.getCurrentYear = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//获得当前年份4位年
|
||||
var currentYear = currentDate.getFullYear();
|
||||
|
||||
//本年第一天
|
||||
var currentYearFirstDate = new Date(currentYear, 0, 1);
|
||||
//本年最后一天
|
||||
var currentYearLastDate = new Date(currentYear, 11, 31);
|
||||
//添加至数组
|
||||
startStop.push(currentYearFirstDate);
|
||||
startStop.push(currentYearLastDate);
|
||||
//返回
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/**
|
||||
* 返回上一个月的第一天Date类型
|
||||
* @param year 年
|
||||
* @param month 月
|
||||
**/
|
||||
this.getPriorMonthFirstDay = function (year, month) {
|
||||
//年份为0代表,是本年的第一月,所以不能减
|
||||
if (month == 0) {
|
||||
month = 11; //月份为上年的最后月份
|
||||
year--; //年份减1
|
||||
return new Date(year, month, 1);
|
||||
}
|
||||
//否则,只减去月份
|
||||
month--;
|
||||
return new Date(year, month, 1);;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获得上一月的起止日期
|
||||
* ***/
|
||||
this.getPreviousMonth = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//获得当前月份0-11
|
||||
var currentMonth = currentDate.getMonth();
|
||||
//获得当前年份4位年
|
||||
var currentYear = currentDate.getFullYear();
|
||||
//获得上一个月的第一天
|
||||
var priorMonthFirstDay = this.getPriorMonthFirstDay(currentYear, currentMonth);
|
||||
//获得上一月的最后一天
|
||||
var priorMonthLastDay = new Date(priorMonthFirstDay.getFullYear(), priorMonthFirstDay.getMonth(), this.getMonthDays(priorMonthFirstDay.getFullYear(), priorMonthFirstDay.getMonth()));
|
||||
//添加至数组
|
||||
startStop.push(priorMonthFirstDay);
|
||||
startStop.push(priorMonthLastDay);
|
||||
//返回
|
||||
return startStop;
|
||||
};
|
||||
|
||||
this.getPreviousDay = function() {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//一天的毫秒数
|
||||
var millisecond = 1000 * 60 * 60 * 24;
|
||||
var priorDayFirstDay = new Date(currentDate.getTime() - millisecond);
|
||||
startStop.push(priorDayFirstDay);
|
||||
startStop.push(currentDate);
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获得上一周的起止日期
|
||||
* **/
|
||||
this.getPreviousWeek = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//返回date是一周中的某一天
|
||||
var week = currentDate.getDay();
|
||||
//返回date是一个月中的某一天
|
||||
var month = currentDate.getDate();
|
||||
//一天的毫秒数
|
||||
var millisecond = 1000 * 60 * 60 * 24;
|
||||
//减去的天数
|
||||
var minusDay = week != 0 ? week - 1 : 6;
|
||||
//获得当前周的第一天
|
||||
var currentWeekDayOne = new Date(currentDate.getTime() - (millisecond * minusDay));
|
||||
//上周最后一天即本周开始的前一天
|
||||
var priorWeekLastDay = new Date(currentWeekDayOne.getTime() - millisecond);
|
||||
//上周的第一天
|
||||
var priorWeekFirstDay = new Date(priorWeekLastDay.getTime() - (millisecond * 6));
|
||||
|
||||
//添加至数组
|
||||
startStop.push(priorWeekFirstDay);
|
||||
startStop.push(priorWeekLastDay);
|
||||
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/**
|
||||
* 得到上季度的起始日期
|
||||
* year 这个年应该是运算后得到的当前本季度的年份
|
||||
* month 这个应该是运算后得到的当前季度的开始月份
|
||||
* */
|
||||
this.getPriorSeasonFirstDay = function (year, month) {
|
||||
var quarterMonthStart = 0;
|
||||
var spring = 0; //春
|
||||
var summer = 3; //夏
|
||||
var fall = 6; //秋
|
||||
var winter = 9; //冬
|
||||
//月份从0-11
|
||||
switch (month) {//季度的其实月份
|
||||
case spring:
|
||||
//如果是第一季度则应该到去年的冬季
|
||||
year--;
|
||||
month = winter;
|
||||
break;
|
||||
case summer:
|
||||
month = spring;
|
||||
break;
|
||||
case fall:
|
||||
month = summer;
|
||||
break;
|
||||
case winter:
|
||||
month = fall;
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
return new Date(year, month, 1);
|
||||
};
|
||||
|
||||
/**
|
||||
* 得到上季度的起止日期
|
||||
* **/
|
||||
this.getPreviousSeason = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//获得当前月份0-11
|
||||
var currentMonth = currentDate.getMonth();
|
||||
//获得当前年份4位年
|
||||
var currentYear = currentDate.getFullYear();
|
||||
//上季度的第一天
|
||||
var priorSeasonFirstDay = this.getPriorSeasonFirstDay(currentYear, currentMonth);
|
||||
//上季度的最后一天
|
||||
var priorSeasonLastDay = new Date(priorSeasonFirstDay.getFullYear(), priorSeasonFirstDay.getMonth() + 2, this.getMonthDays(priorSeasonFirstDay.getFullYear(), priorSeasonFirstDay.getMonth() + 2));
|
||||
//添加至数组
|
||||
startStop.push(priorSeasonFirstDay);
|
||||
startStop.push(priorSeasonLastDay);
|
||||
return startStop;
|
||||
};
|
||||
|
||||
/**
|
||||
* 得到去年的起止日期
|
||||
* **/
|
||||
this.getPreviousYear = function () {
|
||||
//起止日期数组
|
||||
var startStop = new Array();
|
||||
//获取当前时间
|
||||
var currentDate = this.getCurrentDate();
|
||||
//获得当前年份4位年
|
||||
var currentYear = currentDate.getFullYear();
|
||||
currentYear--;
|
||||
var priorYearFirstDay = new Date(currentYear, 0, 1);
|
||||
var priorYearLastDay = new Date(currentYear, 11, 1);
|
||||
//添加至数组
|
||||
startStop.push(priorYearFirstDay);
|
||||
startStop.push(priorYearLastDay);
|
||||
return startStop;
|
||||
};
|
||||
|
||||
return this;
|
||||
})();
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
(function ($) {
|
||||
$.fn.serializeFormJSON = function () {
|
||||
var o = {};
|
||||
var a = this.serializeArray();
|
||||
$.each(a, function () {
|
||||
if (o[this.name]) {
|
||||
if (!o[this.name].push) {
|
||||
o[this.name] = [o[this.name]];
|
||||
}
|
||||
o[this.name].push(this.value || '');
|
||||
} else {
|
||||
o[this.name] = this.value || '';
|
||||
}
|
||||
});
|
||||
return o;
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
|
|
@ -0,0 +1,4 @@
|
|||
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
// for details on configuring this project to bundle and minify static web assets.
|
||||
|
||||
// Write your JavaScript code.
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
.layui-tab-brief_1 > .layui-tab-title li {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
background: #DEE0EF;
|
||||
border-radius: 2px 2px 0 0;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.layui-tab-brief_1 > .layui-tab-title .layui-this {
|
||||
color: red;
|
||||
background-color: white;
|
||||
border-bottom: none;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 16px;
|
||||
color: #FF4D4D;
|
||||
}
|
||||
|
||||
.layui-tab-brief_1 > .layui-tab-more li.layui-this:after, .layui-tab-brief_1 > .layui-tab-title .layui-this:after {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.layui-tab-brief_2 > .layui-tab-more li.layui-this:after, .layui-tab-brief_2 > .layui-tab-title .layui-this:after {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.layui-tab-brief_2 .layui-this div {
|
||||
border-bottom: 2px solid red;
|
||||
}
|
||||
|
||||
.layui-tab-brief_2 > .layui-tab-title .layui-this {
|
||||
color: red;
|
||||
/*background-color: white;*/
|
||||
/*border-bottom: none;*/
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-brief_1 > .layui-tab-title li div {
|
||||
background: #DEE0EF;
|
||||
border-radius: 2px 2px 0 0;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.layui-tab-brief_1 > .layui-tab-title li {
|
||||
border-right: 1px solid white;
|
||||
}
|
||||
|
||||
.layui-tab-brief_1 > .layui-tab-title .layui-this div {
|
||||
background: #FFFFFF;
|
||||
border-radius: 2px 2px 0 0;
|
||||
height: 42px;
|
||||
vertical-align: middle;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.jiankongmodule {
|
||||
/*background-color: #F2F3F8;*/
|
||||
background: #dedede;
|
||||
height: 84px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.jiankongmodule .jktitle {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
padding: 10px 0 0 20px;
|
||||
}
|
||||
|
||||
.jiankongmodule .jkcontent {
|
||||
font-family: Lato-Regular;
|
||||
font-size: 32px;
|
||||
color: #FF4D4D;
|
||||
padding: 10px 0 0 20px;
|
||||
}
|
||||
|
||||
.layui-self-header {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
padding-left: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hrclass {
|
||||
height: 10px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #C6CCDE;
|
||||
}
|
||||
|
||||
.selftopwhere {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.selftopwhere .layui-inline {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.selftopwhere .layui-inline-max {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.selftopwhere .layui-inline input {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.self_innerblock {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.self-table-click td {
|
||||
background-color: #f3ebbc;
|
||||
}
|
||||
.layui-laypage .layui-laypage-curr .layui-laypage-em {
|
||||
background-color: #ff4d4d;
|
||||
}
|
||||
/*
|
||||
.layui-table tbody tr:hover, .layui-table thead tr, .layui-table-click, .layui-table-header, .layui-table-hover, .layui-table-mend, .layui-table-patch, .layui-table-tool, .layui-table-total, .layui-table-total tr, .layui-table[lay-even] tr:nth-child(even) {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
.layui-table th {
|
||||
border-color: #cccaca;
|
||||
}
|
||||
.layui-table td, .layui-table[lay-skin=line], .layui-table[lay-skin=row] {
|
||||
border-width: 1px;
|
||||
border-style: dotted;
|
||||
border-color: #cccaca;
|
||||
}*/
|
||||
.layui-table th {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
background-color:none;
|
||||
}
|
||||
.layui-table-header tr {
|
||||
background-color: white !important;
|
||||
}
|
||||
.layui-btn-primary:hover {
|
||||
border: 1px solid #f77373;
|
||||
}
|
||||
|
||||
.layui-layer-btn .layui-layer-btn0 {
|
||||
background-color: #FF4D4D;
|
||||
border-color: #FF4D4D;
|
||||
}
|
||||
|
||||
|
||||
.maytable .layui-table-cell, .layui-table-tool-panel li {
|
||||
overflow: hidden;
|
||||
text-overflow: unset;
|
||||
white-space: unset;
|
||||
height:auto;
|
||||
}
|
||||
.maytable .layui-table-view .layui-table[lay-size=sm] .layui-table-cell {
|
||||
height: unset;
|
||||
}
|
||||
.layui-form-select dl dd, .layui-form-select dl dt {
|
||||
line-height: 24px;
|
||||
}
|
||||
.layui-form-select dl dd.layui-this {
|
||||
background-color: #FF4D4D;
|
||||
color: #fff;
|
||||
}
|
||||
/*#623a7b;*/
|
||||
|
||||
/*.self-table-click:hover {
|
||||
background-color: #FBEC88;
|
||||
}*/
|
||||
|
|
@ -0,0 +1 @@
|
|||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#FAFAFA;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none}
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 701 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,612 @@
|
|||
body, html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mainclass {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.divcontent {
|
||||
background-color: white;
|
||||
width: 230px;
|
||||
height: 100%;
|
||||
display: table-cell;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.divShou {
|
||||
animation: divleftshou 0.5s;
|
||||
-webkit-animation: divleftshou 0.5s; /*Safari and Chrome*/
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
.divShoW {
|
||||
animation: divleftshow 0.5s;
|
||||
-webkit-animation: divleftshow 0.5s; /*Safari and Chrome*/
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
.hiddenULandHr ul, .hiddenULandHr hr,.hiddenULandHr div, .hiddenULandHr .headstyle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@keyframes divleftshou {
|
||||
from {
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes divleftshou /*Safari and Chrome*/
|
||||
{
|
||||
from {
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 230px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes divleftshow {
|
||||
from {
|
||||
width: 0px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 230px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes divleftshow /*Safari and Chrome*/
|
||||
{
|
||||
from {
|
||||
width: 230px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.divcontent2 {
|
||||
background-color: #eff0f4;
|
||||
width: 16px;
|
||||
height: 100%;
|
||||
display: table-cell;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.divcontent3 {
|
||||
background-color: #eff0f4;
|
||||
/*left: 290px;
|
||||
width: 100%;
|
||||
right: 350px;*/
|
||||
height: 100%;
|
||||
display: table-cell;
|
||||
/*width: inherit-230px;*/
|
||||
}
|
||||
|
||||
|
||||
.layui_self_shou {
|
||||
background: url(/image/shou.png) no-repeat center;
|
||||
height: 48px;
|
||||
width: 13px;
|
||||
}
|
||||
|
||||
.layui_self_xian {
|
||||
background: url(/image/shouw.png) no-repeat center;
|
||||
height: 48px;
|
||||
width: 13px;
|
||||
}
|
||||
|
||||
.shouhand {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-ul {
|
||||
}
|
||||
|
||||
.layui-ul .layui-ul-iterm {
|
||||
display: block;
|
||||
width: 100%;
|
||||
line-height: 35px;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.layui-ul-iterm > .layui-dl {
|
||||
display: block;
|
||||
padding: 0;
|
||||
/* background-color: rgba(0,0,0,.3) !important; */
|
||||
}
|
||||
|
||||
.layui-dl dd {
|
||||
position: relative;
|
||||
/*color: #666666;*/
|
||||
/*font-family: MicrosoftYaHei;*/
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
|
||||
.layui-dl .toptitle {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.layui-dl .layui-dd a {
|
||||
display: block;
|
||||
padding: 0 20px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.layui-dl .layui-dd a:hover {
|
||||
color: #ff6a00;
|
||||
border-right: 2px solid #ef8b8b;
|
||||
}
|
||||
|
||||
.layui-dl .toptitlechose a {
|
||||
color: #333333;
|
||||
font-weight:bold;
|
||||
border-right: 2px solid red;
|
||||
}
|
||||
|
||||
.layui-dl .layui-dd2 a {
|
||||
display: block;
|
||||
color: #666666;
|
||||
}
|
||||
.layui-dl .layui-dd2 a:hover {
|
||||
display: block;
|
||||
color: #ff6a00;
|
||||
}
|
||||
.layui-dl .layui-dd2 a:hover .spanitemright {
|
||||
display: block;
|
||||
color: #ff6a00;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.layui-dl .layui-dt a {
|
||||
padding: 0 10px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.layui_self_shishi {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/jiankong.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_phone {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/phone.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_phonetime {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/time.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_nophone {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/weijie.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_palyer {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/palyer.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_webchat {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: url(/image/icon/webchat.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_workwebchat {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: url(/image/icon/workwebchat.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_soft {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: url(/image/icon/soft.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_customer {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: url(/image/icon/customer.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_outphone {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: url(/image/icon/outphone.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_neer7 {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: url(/image/icon/neer7.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_redcustomer {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/user-group.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_redmemo {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: url(/image/icon/memo.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_mesion {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url(/image/icon/mesion.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_more {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url(/image/icon/more.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_liu {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url(/image/icon/border-verticle.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_create {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url(/image/icon/create.png) no-repeat center;
|
||||
}
|
||||
|
||||
.layui_self_main {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url(/image/icon/main.png) no-repeat center;
|
||||
}
|
||||
|
||||
.self_icon {
|
||||
float: left;
|
||||
top: 7px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menuleft {
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.menutitle {
|
||||
padding-left: 18px;
|
||||
/*font-weight: 600;*/
|
||||
font-family: MicrosoftYaHei-Bold;
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.spanitemleft {
|
||||
padding-left: 20px;
|
||||
/*color: #333333;*/
|
||||
}
|
||||
|
||||
.spanitemright {
|
||||
margin-right: 10px;
|
||||
float: right;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
|
||||
.topmenu {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.menuhr {
|
||||
margin-left: 12px;
|
||||
width: 90%;
|
||||
background-color: #C6CCDE;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.rightmg {
|
||||
margin-right: 5px;
|
||||
float: right;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.online {
|
||||
color: #00CA49;
|
||||
}
|
||||
|
||||
.layui-bg-online {
|
||||
background-color: #00CA49;
|
||||
}
|
||||
|
||||
.unline {
|
||||
color: #FF4D4D;
|
||||
}
|
||||
|
||||
.x-iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.noticebody {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: 310px;
|
||||
}
|
||||
|
||||
.myscrolcss::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.myscrolcss::-webkit-scrollbar-track {
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
-webkit-border-radius: 2em;
|
||||
-moz-border-radius: 2em;
|
||||
border-radius: 2em;
|
||||
}
|
||||
|
||||
.myscrolcss::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
-webkit-border-radius: 2em;
|
||||
-moz-border-radius: 2em;
|
||||
border-radius: 2em;
|
||||
}
|
||||
|
||||
|
||||
.detailDivbody {
|
||||
background-color: #eff0f4;
|
||||
}
|
||||
|
||||
/*.mainclass {
|
||||
min-height: 800px;
|
||||
}*/
|
||||
|
||||
.tableDiv {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.tableCell {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
display: table-row;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.tablePanel {
|
||||
height: 96%;
|
||||
/*border: 1px solid #080808;*/
|
||||
position: relative;
|
||||
/*display: block;*/ /*display: block;*/
|
||||
background-color: white;
|
||||
border: 1px solid #eff0f4;
|
||||
/*margin: 10px 10px 10px 10px;*/
|
||||
}
|
||||
|
||||
.celIcon {
|
||||
border: 4px solid #eff0f4;
|
||||
box-sizing: border-box;
|
||||
height: 97%;
|
||||
width: 97%;
|
||||
min-width: 90px;
|
||||
min-height: 90px;
|
||||
}
|
||||
|
||||
.celIcon .celIcon_Icon {
|
||||
padding: 10% 0 0 10%;
|
||||
}
|
||||
|
||||
.celIcon .celIcon_Count {
|
||||
font-size: 2.5em;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.celIcon .celIcon_Title {
|
||||
font-size: 16px;
|
||||
color: white
|
||||
}
|
||||
|
||||
|
||||
|
||||
.celIcon2 .celIcon_Icon {
|
||||
padding: 10% 0 0 10%;
|
||||
}
|
||||
|
||||
.celIcon2 .celIcon_Count {
|
||||
font-size: 1.8em;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.celIcon2 .celIcon_Title {
|
||||
font-size: 12px;
|
||||
color: white
|
||||
}
|
||||
|
||||
.listPanl {
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
/*padding: 20px 0 0 15px;*/
|
||||
}
|
||||
|
||||
.listPanl .tabhead, .listPanl .centerhed, .listPanl .messionbody, .listPanl .liubody {
|
||||
margin: 20px 20px 5px 20px;
|
||||
}
|
||||
|
||||
.tabhead {
|
||||
font-family: MicrosoftYaHei-Bold;
|
||||
font-size: 15px;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.tabhead .nochose {
|
||||
color: #999999;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.centerhed {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.centerhed .chose {
|
||||
font-family: MicrosoftYaHei-Bold;
|
||||
font-size: 14px;
|
||||
color: #FF4D4D;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid red;
|
||||
}
|
||||
|
||||
.centerhed .title {
|
||||
width: 90px;
|
||||
/*height: 100%;*/
|
||||
height: 23px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.tabbody a {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.tabbody a div {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tabbody a:hover {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.tabbody a:hover .tabcount {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.tabcount {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.myselect {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.myselect option {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.addmemo a {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #1799FF;
|
||||
}
|
||||
|
||||
.addmemo a:hover {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.centerhed {
|
||||
height: 55px;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.righttitle {
|
||||
font-family: MicrosoftYaHei;
|
||||
font-size: 14px;
|
||||
color: #1799FF;
|
||||
}
|
||||
|
||||
.messionbody {
|
||||
/*width: 98%;*/
|
||||
}
|
||||
|
||||
.Notice {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.layui_self_video {
|
||||
background: url(/image/icon/video.png) no-repeat left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.wochavid {
|
||||
margin: 10px 20px 10px 20px;
|
||||
}
|
||||
|
||||
.layui-btn-ok {
|
||||
background: #FF4D4D;
|
||||
}
|
||||
.layui-btn-reset {
|
||||
background: #999999;
|
||||
}
|
||||
|
||||
.layui-form-select dl dd.layui-this {
|
||||
background-color: #ff4d4d;
|
||||
}
|
||||
|
After Width: | Height: | Size: 299 KiB |
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>测试 - layui</title>
|
||||
<link rel="stylesheet" href="layui/css/layui.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="layui-container">
|
||||
<div class="layui-progress" style="margin: 15px 0 30px;">
|
||||
<div class="layui-progress-bar" lay-percent="100%"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn" test-active="test-form">一个按钮</button>
|
||||
<button class="layui-btn layui-btn-normal" id="test2">当前日期</button>
|
||||
</div>
|
||||
|
||||
<blockquote class="layui-elem-quote" style="margin-top: 30px;">
|
||||
<div class="layui-text">
|
||||
<ul>
|
||||
<li>你当前预览的是:<span>layui-v<span id="version"></span></span></li>
|
||||
<li>这是一个极其简洁的演示页面</li>
|
||||
</ul>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 引入 layui.js 的 <script> 标签最好放置在 html 末尾 -->
|
||||
<script src="layui/layui.js"></script>
|
||||
<script>
|
||||
layui.use(function(){
|
||||
var layer = layui.layer
|
||||
,form = layui.form
|
||||
,laypage = layui.laypage
|
||||
,element = layui.element
|
||||
,laydate = layui.laydate
|
||||
,util = layui.util;
|
||||
|
||||
//欢迎信息
|
||||
layer.msg('Hello World');
|
||||
|
||||
//输出版本号
|
||||
lay('#version').html(layui.v);
|
||||
|
||||
//日期
|
||||
laydate.render({
|
||||
elem: '#test2'
|
||||
,value: new Date()
|
||||
,isInitValue: true
|
||||
});
|
||||
|
||||
//触发事件
|
||||
util.event('test-active', {
|
||||
'test-form': function(){
|
||||
layer.open({
|
||||
type: 1
|
||||
,resize: false
|
||||
,shadeClose: true
|
||||
,content: ['<ul class="layui-form" style="margin: 10px;">'
|
||||
,'<li class="layui-form-item">'
|
||||
,'<label class="layui-form-label">输入框</label>'
|
||||
,'<div class="layui-input-block">'
|
||||
,'<input class="layui-input" name="field1">'
|
||||
,'</div>'
|
||||
,'</li>'
|
||||
,'<li class="layui-form-item">'
|
||||
,'<label class="layui-form-label">选择框</label>'
|
||||
,'<div class="layui-input-block">'
|
||||
,'<select name="field2">'
|
||||
,'<option value="A">A</option>'
|
||||
,'<option value="B">B</option>'
|
||||
,'<select>'
|
||||
,'</div>'
|
||||
,'</li>'
|
||||
,'<li class="layui-form-item" style="text-align:center;">'
|
||||
,'<button type="submit" lay-submit lay-filter="*" class="layui-btn">提交</button>'
|
||||
,'</li>'
|
||||
,'</ul>'].join('')
|
||||
,success: function(layero){
|
||||
layero.find('.layui-layer-content').css('overflow', 'visible');
|
||||
|
||||
form.render().on('submit(*)', function(data){
|
||||
layer.msg(JSON.stringify(data.field));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2021 Twitter, Inc.
|
||||
Copyright (c) 2011-2021 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
@ -0,0 +1,427 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr /* rtl:ignore */;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/* rtl:raw:
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
*/
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||
|
|
@ -0,0 +1,424 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr ;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */
|
||||