Compare commits

..

No commits in common. '4c89e1d52411b2e845df3568b06367388f40e620' and '43ad473107f2c53d7db08d77740892a877078bd9' have entirely different histories.

@ -4,7 +4,7 @@
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$/main_vm" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

Binary file not shown.

@ -6,6 +6,7 @@
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />

@ -4,5 +4,5 @@
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project>

@ -1,6 +1,6 @@
plugins {
id 'org.springframework.boot' version '2.7.6'
// id "org.sonarqube" version "2.7"
id "org.sonarqube" version "2.7"
id 'io.spring.dependency-management' version '1.0.14.RELEASE'
id 'java'
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
@ -9,7 +9,7 @@ plugins {
group = 'com.icom'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
/*
//sourceCompatibility = '1.8'
apply plugin: 'war'
configurations {
compileOnly {
@ -30,34 +30,25 @@ repositories {
}
}
}
*/
repositories {
mavenCentral()
}
/*
//repositories {
// mavenCentral()
// maven { url "https://maven.egovframe.go.kr/maven/" } // egovframe maven
//}
ext {
set('springCloudVersion', "2021.0.4")
set('log4j2.version', "2.17.1") // log4j
}
*/
ext {
set('springCloudVersion', "2021.0.4")
}
dependencies {
/*
implementation 'org.egovframe.cloud:module-common:0.1'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.0.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
*/
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
implementation 'org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
@ -80,36 +71,35 @@ dependencies {
implementation 'com.querydsl:querydsl-sql-spring:5.0.0'
implementation 'com.querydsl:querydsl-sql-codegen:5.0.0'
// implementation 'javax.servlet:javax.servlet-api'
implementation 'org.apache.tomcat:tomcat-jdbc:10.1.1'
implementation 'javax.servlet:javax.servlet-api'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'org.apache.poi:poi:5.2.2'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'software.amazon.awssdk:s3:2.16.1'
implementation 'commons-codec:commons-codec:1.15'
implementation 'org.apache.commons:commons-text:1.8'
implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'org.apache.poi:poi:5.2.2'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'org.apache.tomcat:tomcat-jdbc:10.1.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
//
implementation 'commons-codec:commons-codec:1.15'
// implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
// implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.5'
// testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.5'
// implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '2.0.6'
//jsp
// implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
// implementation 'javax.servlet:jstl'
// providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
// testImplementation 'org.springframework.boot:spring-boot-starter-test'
// testImplementation 'org.springframework.security:spring-security-test'
// implementation 'net.jodah:expiringmap:0.5.9'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'net.jodah:expiringmap:0.5.9'
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
compileOnly 'org.projectlombok:lombok'
@ -142,7 +132,6 @@ dependencyManagement {
}
}
// querydsl
def querydslDir = "$buildDir/generated/querydsl"
//def querydslDir = "src/main/qfile"

@ -14,7 +14,7 @@ spring:
# url: jdbc:log4jdbc:oracle:thin:@localhost:1522:XE
# username: LG_LOCAL
# password: pass180901
owner: LG_LOCALqq
owner: LG_LOCAL
driver-class-name: net.sf.log4jdbc.DriverSpy
hikari:
connection-timeout: 60000

@ -50,12 +50,6 @@ spring:
jackson:
serialization:
fail-on-empty-beans: false
thymeleaf:
mode: HTML
cache: false
template-resolver-order: 0
check-template-location: true
autoconfigure:
# exclude: org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration

@ -9,6 +9,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@SpringBootApplication
@EnableFeignClients
@EnableWebMvc
public class MainVmApplication extends SpringBootServletInitializer {
public static void main(String[] args) {

@ -127,25 +127,25 @@ public class AdviceHandler {
return new ResponseEntity(er, HttpStatus.NOT_FOUND);
}
// @ExceptionHandler
// public String CustomNoSuchFieldException(NoSuchFieldException e) {
// return "adm/signin/signin";
// }
@ExceptionHandler
public String CustomNoSuchFieldException(NoSuchFieldException e) {
return "adm/signin/signin";
}
// @ExceptionHandler
// public String CustomNoSuchFieldException(CustomNoSuchFieldException e) {
// return "adm/signin/signin";
// }
//
// @ExceptionHandler(NoHandlerFoundException.class)
// public String noHandlerFoundHandle(NoHandlerFoundException e) {
// return "cmm/error/egovError";
// }
//
// @ExceptionHandler
// public ResponseEntity responseStatusException(ResponseStatusException e) {
// return ResponseEntity.status(e.getStatus()).build();
// }
@ExceptionHandler
public String CustomNoSuchFieldException(CustomNoSuchFieldException e) {
return "adm/signin/signin";
}
@ExceptionHandler(NoHandlerFoundException.class)
public String noHandlerFoundHandle(NoHandlerFoundException e) {
return "cmm/error/egovError";
}
@ExceptionHandler
public ResponseEntity responseStatusException(ResponseStatusException e) {
return ResponseEntity.status(e.getStatus()).build();
}
}

@ -13,7 +13,9 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.time.LocalDate;
import java.time.LocalDateTime;

@ -6,7 +6,6 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap;
import java.util.List;
@ -20,9 +19,8 @@ public class DashboardController {
private final StatisticsDashboardService statisticsDashboardService;
@GetMapping("/manage.do")
public ModelAndView DashboardView(){
// return "/adm/common/dashboard";
return new ModelAndView("/layout/adm/common/dashboard");
public String DashboardView(){
return "/adm/common/dashboard";
}
@RequestMapping(value = "/callinfolist.do", method = {RequestMethod.GET, RequestMethod.POST})

@ -12,9 +12,7 @@ import javax.servlet.http.HttpServletRequest;
@Controller
@Slf4j
@RequiredArgsConstructor
public class ErrorPageController
// implements ErrorController
{
public class ErrorPageController implements ErrorController {
private final HttpServletRequest httpServletRequest;
@ -24,18 +22,18 @@ public class ErrorPageController
Object status = httpServletRequest.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
log.info("error status - {}", status.toString());
// if(status.equals("490")){
// return "adm/signin/signin";
// }
// if(status.toString().equals("491")){
// return "adm/signin/changePwd";
// }
if(status.equals("490")){
return "adm/signin/signin";
}
if(status.toString().equals("491")){
return "adm/signin/changePwd";
}
// ModelMap mm = new ModelMap();
// ErrorResult er = new ErrorResult();
// er.setCode(status.toString());
// mm.addAttribute("errorResult", "aaa");
// return "adm/common/error";
return "/layout/signin";
return "adm/signin/signin";
}
}

@ -16,12 +16,13 @@ import com.icomsys.main_vm.biz.common.login.service.LoginService;
import com.icomsys.main_vm.common.code.MenuVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
@ -40,10 +41,9 @@ public class LoginController {
private final HttpServletRequest httpServletRequest;
@GetMapping(value = {"/adm/main/egovLoginUsr.do", "/"})
public ModelAndView loginUsrView() {
// loginService.Logout();
log.info("loginpage");
return new ModelAndView("layout/signin");
public String loginUsrView() {
loginService.Logout();
return "adm/signin/signin";
}
@GetMapping(value = "/adm/main/changePwd")
@ -64,18 +64,13 @@ public class LoginController {
}
@RequestMapping(value = "/adm/main/actionSecurityLogin.do")
public ModelAndView actionSecurityLogin(@Valid LoginReq loginReq, ModelMap model) {
log.info("actionlogin");
// return loginService.LoginValidService(loginReq, model);
String url = loginService.LoginValidService(loginReq, model);
log.info("redi url? - -{}", url);
return new ModelAndView(url);
public String actionSecurityLogin(@Valid LoginReq loginReq, ModelMap model) {
return loginService.LoginValidService(loginReq, model);
}
@RequestMapping(value = "/adm/main/actionMain.do")
public String actionMain(ModelMap model) {
return loginService.actionMain(model);
// return new ModelAndView(loginService.actionMain(model));
}
@GetMapping("/adm/main/actionLogout.do")

@ -74,8 +74,7 @@ public class LoginService {
@Transactional
public String LoginValidService(LoginReq dto, ModelMap model) {
//기본 리턴은 로그인페이지
// String result = "adm/signin/signin";
String result = "layout/signin";
String result = "adm/signin/signin";
TbBotUser userSelect = null;
TbBotUser user = tbBotUserRepo.findByUserIdAndUseYn(dto.getUserId(), "Y")
@ -97,9 +96,7 @@ public class LoginService {
sessionSetting(user);
LoginVO userResult = user.toLoginVO();
// return "forward:/adm/main/actionMain.do";
return "layout/adm/common/dashboard";
return "forward:/adm/main/actionMain.do";
} else {
log.info("Fail!");
}

@ -32,7 +32,6 @@ public class SystemCommoncodeController {
@PostMapping("/oprmngcode/list")
@ResponseBody
public DslDataTableRes<SystemCommoncodeRes> SystemCommoncodeList(@RequestBody SystemCommoncodeReq dto) {
log.info("test!!!");
QueryResults<SystemCommoncodeRes> result = systemOprmngcodeService.SystemCommoncodeList(dto);
return new DslDataTableRes<SystemCommoncodeRes>(result);
}

@ -16,6 +16,7 @@ import com.icomsys.main_vm.db.jpa.repo.system.*;
import com.querydsl.core.QueryResults;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.stream.Streams;
import org.apache.el.lang.FunctionMapperImpl;
import org.apache.http.conn.HttpHostConnectException;
import org.springframework.beans.factory.annotation.Value;

@ -1,19 +1,27 @@
package com.icomsys.main_vm.biz.rcp.conversation.controller;
import com.google.gson.Gson;
import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException;
import com.icomsys.main_vm.biz.advice.excep.CustomRuntimeException;
import com.icomsys.main_vm.biz.common.common.service.ExcelService;
import com.icomsys.main_vm.biz.rcp.conversation.dto.IntentRequestDTO;
import com.icomsys.main_vm.biz.rcp.conversation.service.IntentManageService;
import com.icomsys.main_vm.biz.rcp.conversation.vo.SelectIntentListVo;
import com.icomsys.main_vm.biz.rcp.conversation.vo.intent.ExcelIntentListVo;
import com.icomsys.main_vm.biz.rcp.conversation.vo.intent.IntentSearchVo;
import com.icomsys.main_vm.biz.rcp.conversation.vo.synonym.SelectSynonymListVo;
import com.icomsys.main_vm.common.code.enumresource.ActionResource;
import com.icomsys.main_vm.common.code.enumresource.MenuResource;
import com.icomsys.main_vm.db.jpa.repo.system.TbIntentMasterRepo;
import com.icomsys.main_vm.db.mybatis.alias.LoginVO;
import com.querydsl.core.QueryResults;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@ -24,8 +32,11 @@ import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller

@ -11,21 +11,30 @@ import com.icomsys.main_vm.biz.rcp.monitoring.vo.ConsultingVO;
import com.icomsys.main_vm.biz.rcp.monitoring.vo.RecordDownloadVO;
import com.icomsys.main_vm.common.code.enumresource.ActionResource;
import com.icomsys.main_vm.common.code.enumresource.MenuResource;
import com.icomsys.main_vm.db.jpa.entity.conversation.TbSynonymMaster;
import com.icomsys.main_vm.db.mybatis.alias.MonitoringConsultingVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;

@ -1,7 +1,10 @@
package com.icomsys.main_vm.biz.rcp.oprManage.service;
import com.icomsys.main_vm.biz.common.common.service.LogService;
import com.icomsys.main_vm.biz.common.common.service.LogVO;
import com.icomsys.main_vm.biz.common.system.vo.SystemBotTtsTagVo;
import com.icomsys.main_vm.common.code.enumresource.ActionResource;
import com.icomsys.main_vm.common.code.enumresource.MenuResource;
import com.icomsys.main_vm.db.jpa.entity.oprManage.TbBotTtsTag;
import com.icomsys.main_vm.db.jpa.repo.oprManage.TbBotTtsTagRepo;
import com.icomsys.main_vm.db.mybatis.alias.LoginVO;

@ -1,8 +1,13 @@
package com.icomsys.main_vm.biz.test.controller;
import com.google.gson.Gson;
import aj.org.objectweb.asm.TypeReference;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.google.gson.*;
import com.icomsys.main_vm.biz.advice.excep.CustomBadRequestException;
import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException;
import com.icomsys.main_vm.biz.common.common.service.LogVO;
import com.icomsys.main_vm.biz.common.common.service.RestTemplateService;
import com.icomsys.main_vm.biz.common.common.service.SequenceService;
import com.icomsys.main_vm.biz.common.login.res.OprmngCodeRes;
@ -10,6 +15,7 @@ import com.icomsys.main_vm.biz.common.login.res.ServiceGroupRes;
import com.icomsys.main_vm.biz.common.login.res.UserVo;
import com.icomsys.main_vm.biz.common.system.service.SystemServiceGroupService;
import com.icomsys.main_vm.biz.common.system.vo.*;
import com.icomsys.main_vm.biz.test.controller.testvo.APINodeVo;
import com.icomsys.main_vm.common.code.EnumToMap;
import com.icomsys.main_vm.common.code.MenuVo;
import com.icomsys.main_vm.common.code.enumresource.MenuResource;
@ -25,6 +31,7 @@ import com.querydsl.core.QueryResults;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.ss.usermodel.*;
import org.json.JSONObject;
import org.modelmapper.ModelMapper;
@ -35,16 +42,20 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.util.UriComponentsBuilder;
import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.*;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.net.URI;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

@ -8,8 +8,7 @@ import java.util.List;
@Getter
public enum MenuResource {
// root("common", 1L, 0L, 1, "대쉬보드", "대쉬보드", "/admin/common/dashboard/manage.do"),
root("common", 1L, 0L, 1, "대쉬보드", "대쉬보드", "/layout/adm/common/dashboard"),
root("common", 1L, 0L, 1, "대쉬보드", "대쉬보드", "/admin/common/dashboard/manage.do"),
// root("common", 1L, 0L, 1, "대쉬보드", "대쉬보드", "0"),
rcpconversation("rcp", 1800000L, 1L, 2, "대화관리", "대화관리", "0"),
rcpconversationintentmanage("rcp", 1800001L, 1800000L, 3, "인텐트관리", "인텐트관리", "/admin/rcp/conversation/intent/manage.do"),

@ -1,17 +1,13 @@
package com.icomsys.main_vm.common.config;
import lombok.extern.slf4j.Slf4j;
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect;
import org.apache.http.impl.client.HttpClientBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.view.JstlView;
@ -20,15 +16,12 @@ import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
import org.springframework.web.client.RestTemplate;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.apache.http.client.HttpClient;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;
import org.thymeleaf.spring5.SpringTemplateEngine;
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.spring5.view.ThymeleafViewResolver;
@Configuration
@Slf4j
public class ConfigMvc implements WebMvcConfigurer {
public class ConfigMvc extends WebMvcConfigurationSupport {
@Value("${file.path}")
private String filePath;
@ -37,32 +30,33 @@ public class ConfigMvc implements WebMvcConfigurer {
// @Override
// public void addResourceHandlers(ResourceHandlerRegistry registry) {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
/*
Path path = Paths.get(filePath).toAbsolutePath().normalize();
String patsString = path.toString();
log.info("path = {}",path);
log.info("pathString = {}",patsString);
*/
// registry.addResourceHandler("/**","/img/**")
// .addResourceLocations("/");
registry.addResourceHandler("/**","/img/**")
.addResourceLocations("/");
// .addResourceLocations("file:///"+patsString+"/");
// registry.addResourceHandler("/files/**").addResourceLocations("file:/logs/was/aicb/cinnamon_ui/files/");
registry.addResourceHandler("/files/**").addResourceLocations("file:/logs/was/aicb/cinnamon_ui/files/");
// }
}
// @Override
// public void addViewControllers(ViewControllerRegistry registry) {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
// registry.addViewController("/**/*.do").setViewName("redirect:/adm/main/egovLoginUsr.do");
// registry.addViewController("/").setViewName("redirect:/adm/main/egovLoginUsr.do");
// registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
// }
}
// @Override
// public void addResourceHandlers(ResourceHandlerRegistry registry) {
// registry.addResourceHandler("/**").addResourceLocations("/");
// }
/*
@Bean
public UrlBasedViewResolver urlBasedViewResolver() {
UrlBasedViewResolver urlBasedViewResolver = new UrlBasedViewResolver();
@ -84,14 +78,14 @@ public class ConfigMvc implements WebMvcConfigurer {
interceptor.setParamName("language");
return interceptor;
}
*/
@Bean
public MappingJackson2JsonView jsonView() {
MappingJackson2JsonView jackson2JsonView = new MappingJackson2JsonView();
// jackson2JsonView.setContentType("\"text/html;charset=UTF-8\"");
return jackson2JsonView;
}
/*
// @Override
// public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
// Properties prop = new Properties();
@ -115,7 +109,7 @@ public class ConfigMvc implements WebMvcConfigurer {
// smer.setStatusCodes(statusCode);
// exceptionResolvers.add(smer);
// }
*/
@Bean
@ -130,56 +124,4 @@ public class ConfigMvc implements WebMvcConfigurer {
return new RestTemplate(factory);
}
//
// @Value("${spring.thymeleaf.cache}")
// private boolean isCache;
// @Value("${spring.thymeleaf.template-resolver-order}")
// private int order;
// @Value("${spring.thymeleaf.mode}")
// private String mode;
// //
// @Bean
// public SpringResourceTemplateResolver templateResolver() {
// SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver ();
//// templateResolver.setPrefix("classpath:webapp/WEB-INF/templates/");
// templateResolver.setPrefix("classpath:templates/");
// templateResolver.setCharacterEncoding("UTF-8");
// templateResolver.setSuffix(".html");
// templateResolver.setTemplateMode(mode);
// templateResolver.setCacheable(isCache);
// templateResolver.setOrder(order);
// return templateResolver;
// }
//
// @Bean
// public SpringTemplateEngine templateEngine(MessageSource messageSource) {
// SpringTemplateEngine templateEngine = new SpringTemplateEngine();
// templateEngine.setTemplateResolver(templateResolver());
// templateEngine.setTemplateEngineMessageSource(messageSource);
// templateEngine.addDialect(layoutDialect());
// templateEngine.addDialect(new Java8TimeDialect());
//
// return templateEngine;
// }
//
// @Bean
// public LayoutDialect layoutDialect() {
// return new LayoutDialect();
// }
//
// @Bean
// public ViewResolver viewResolver(MessageSource messageSource) {
// ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
// viewResolver.setTemplateEngine(templateEngine(messageSource));
// viewResolver.setCharacterEncoding("UTF-8");
// viewResolver.setOrder(order);
// return viewResolver;
// }
//
// @Bean
// public Java8TimeDialect java8TimeDialect(){
// return new Java8TimeDialect();
// }
}

@ -26,20 +26,21 @@ public class ConfigSecurity {
private final ObjectMapper objectMapper;
private final CustomUserDetailsService customUserDetailsService;
private final LoginFilter loginFilter;
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
// @Bean
// public WebSecurityCustomizer configure() {
// return (web) -> web.ignoring().mvcMatchers(
//// "/v3/api-docs/**", // doc용
//// "/swagger-ui/**", //스웨거
// "/**"
// );
// }
@Bean
public WebSecurityCustomizer configure() {
return (web) -> web.ignoring().mvcMatchers(
// "/v3/api-docs/**", // doc용
// "/swagger-ui/**", //스웨거
"/ws/**", // 테스트API,
"/login",
"/logout"
);
}
// @Bean
// public AuthTokenFilter authenticationJwtTokenFilter() {
@ -55,41 +56,6 @@ public class ConfigSecurity {
authenticationManagerBuilder.userDetailsService(customUserDetailsService).passwordEncoder(passwordEncoder());
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
return http.csrf().disable()
.exceptionHandling()
// .authenticationEntryPoint(authenticationEntryPoint)
// .accessDeniedHandler(accessDeniedHandler)
// exception handling 할 때 우리가 만든 클래스를 추가
// h2-console 을 위한 설정을 추가
.and()
.headers()
// .frameOptions()
// .sameOrigin()
// 시큐리티는 기본적으로 세션을 사용
// 여기서는 세션을 사용하지 않기 때문에 세션 설정을 Stateless 로 설정
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
// .successHandler(authenticationEntryPoint)
// 로그인, 회원가입 API 는 토큰이 없는 상태에서 요청이 들어오기 때문에 permitAll 설정
.authorizeRequests()
.and()
.logout()
.invalidateHttpSession(true)
.deleteCookies("JSESSIONID", "jsessionid")
.permitAll()
.and()
.addFilterBefore(loginFilter, UsernamePasswordAuthenticationFilter.class)
.build()
// JwtFilter 를 addFilterBefore 로 등록했던 JwtSecurityConfig 클래스를 적용
// .and()
;
}
/*
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
return http.antMatcher("/**")
@ -122,7 +88,17 @@ public class ConfigSecurity {
.addFilterBefore(loginFilter, UsernamePasswordAuthenticationFilter.class)
.build();
}
*/
// @Bean
// public WebMvcConfigurer corsConfigurer() {
// return new WebMvcConfigurer() {
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// registry.addMapping("/**")
// .allowedMethods("*");
// }
// };
// }
}

@ -1,68 +0,0 @@
package com.icomsys.main_vm.common.config;
import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;
import org.thymeleaf.spring5.SpringTemplateEngine;
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.spring5.view.ThymeleafViewResolver;
@Configuration
public class ConfigThymeleafViewResolver {
@Value("${spring.thymeleaf.cache}")
private boolean isCache;
@Value("${spring.thymeleaf.template-resolver-order}")
private int order;
@Value("${spring.thymeleaf.mode}")
private String mode;
//
@Bean
public SpringResourceTemplateResolver templateResolver() {
SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver();
// templateResolver.setPrefix("classpath:webapp/WEB-INF/templates/");
templateResolver.setPrefix("classpath:/templates/");
templateResolver.setCharacterEncoding("UTF-8");
templateResolver.setSuffix(".html");
templateResolver.setTemplateMode(mode);
templateResolver.setCacheable(isCache);
templateResolver.setOrder(order);
return templateResolver;
}
@Bean
public SpringTemplateEngine templateEngine(MessageSource messageSource) {
SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.setTemplateResolver(templateResolver());
templateEngine.setTemplateEngineMessageSource(messageSource);
templateEngine.addDialect(layoutDialect());
templateEngine.addDialect(new Java8TimeDialect());
return templateEngine;
}
@Bean
public LayoutDialect layoutDialect() {
return new LayoutDialect();
}
@Bean
public ViewResolver viewResolver(MessageSource messageSource) {
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setTemplateEngine(templateEngine(messageSource));
viewResolver.setCharacterEncoding("UTF-8");
viewResolver.setOrder(order);
return viewResolver;
}
@Bean
public Java8TimeDialect java8TimeDialect() {
return new Java8TimeDialect();
}
}

@ -40,14 +40,25 @@ public class LoginFilter extends OncePerRequestFilter {
// String reqUrl = request.getRequestURI().toString().replaceAll(context, "");
String reqUrl = request.getRequestURI();
// log.info("meyhod-"+ reqUrl+ request.getMethod());
log.info("필터 요청유알엘 - {}", reqUrl);
// log.info("필터 요청유알엘 - {}, {}", reqUrl);
if (reqUrl.startsWith("/ws")
|| reqUrl.startsWith("/lib")
if (reqUrl.startsWith("/re1")){
response.sendError(490);
return;
}
if (reqUrl.startsWith("/re2")){
response.sendError(491);
return;
}
if (reqUrl.startsWith("/lib")
|| reqUrl.startsWith("/css")
|| reqUrl.startsWith("/images")
|| reqUrl.startsWith("/js")
|| reqUrl.startsWith("/adm/")
|| reqUrl.startsWith("/adm")
|| reqUrl.startsWith("/ws")
|| reqUrl.startsWith("/rest")
|| reqUrl.startsWith("/create")
|| reqUrl.startsWith("/data")
@ -56,11 +67,43 @@ public class LoginFilter extends OncePerRequestFilter {
|| reqUrl.startsWith("/files")
|| reqUrl.equals("/")
) {
log.info("static file check");
filterChain.doFilter(request, response);
} else {
filterChain.doFilter(request, response);
if (request.getSession().getAttribute(SessionResource.UserVO.getName()) == null || request.getSession().getAttribute(SessionResource.UserVO.getName()).equals("")) {
log.info("session Check");
response.sendError(490);
return;
} else {
log.info("Permission Check");
//세션이 있으면 URL별 권한 확인.
//ajax로 호출되는 url은 auth메뉴에 리스트업이 안되있어서 검사를 어떻게할지 계획이 필요함.
// LoginVO loginVO = (LoginVO) request.getSession().getAttribute("LoginVO");
// List<String> auths =
// if(!tbBotMenuRepo.findByMenuNoInOrderByMenuNoAsc(tbBotAuthMenuRepo.findByAuthCode(loginVO.getAuthCode())
// .stream().map(e -> e.getMenuNo())
// .collect(Collectors.toList()))
// .stream()
// .map(f -> f.getUrlPath())
// .collect(Collectors.toList())
// .contains(reqUrl)){
// wrapResponse.sendRedirect("adm/main/egovLoginUsr.do");
// }
// log.info("auths - {}", new Gson().toJson(auths));
//
// for (String e : auths) {
// if (e != null && !e.equals("") && !e.equals("null") && e.equals(reqUrl)) {
// chk+=1;
// break;
// }
// }
// if(chk == 0){
// wrapResponse.setStatus(404);
// wrapResponse.sendRedirect("adm/main/egovLoginUsr.do");
// }
filterChain.doFilter(request, response);
}
}
// response.copyBodyToResponse();
}
}

@ -14,7 +14,7 @@ spring:
# url: jdbc:log4jdbc:oracle:thin:@localhost:1522:XE
# username: LG_LOCAL
# password: pass180901
owner: LG_LOCALqq
owner: LG_LOCAL
driver-class-name: net.sf.log4jdbc.DriverSpy
hikari:
connection-timeout: 60000

@ -50,12 +50,6 @@ spring:
jackson:
serialization:
fail-on-empty-beans: false
thymeleaf:
mode: HTML
cache: false
template-resolver-order: 0
check-template-location: true
autoconfigure:
# exclude: org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration

File diff suppressed because one or more lines are too long

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}"
>
<body>
<th:block layout:fragment="content">
<!-- Begin Page Content -->
<div class="container-fluid">
</div>
</th:block>
</body>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 실시간처리리스트</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 주소봇처리내역</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 발화건물유형관리
</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 주소월별업데이트
</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 지명유사어</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 빌딩유사어</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 유의어전처리</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 요일시간대별멘트관리
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 휴무일관리
</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 자연어전처리
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 멘트관리
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 주소봇실시간처리리스트
</p>
</section>
</html>

@ -1,14 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 상담가이드실시간모니터링
</p>
</section>
</html>

@ -1,14 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 무인접수봇실시간모니터링
</p>
</section>
</html>

@ -1,124 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="content">
<head>
<meta charset="UTF-8">
<title>대시보드</title>
</head>
<body>
<script type="text/javascript" src="/aajs/statisticsDashboard.js"></script>
<style>
.dashboard .component-billboard .billboard-grid {
padding: 5px;
}
</style>
<section id="Content" class="bot_common">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">대시보드</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<!-- <h2 class="mt12">대시보드</h2>-->
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="javascript:StatisticsDashboard.setDashboardChart();" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">시나리오 그룹</th>
<td>
<div class="sel_box">
<select class="wide" id="oprMngCode">
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box dashboard">
<div class="component-billboard">
<div class="billboard-grid">
<div class="box_title">
<div class="tit fl">전체 콜 그래프 (단위 : 건)</div>
</div>
<div class="grid-inner">
<div class="chart-item-box">
<div class="chart-item">
<div class="chart" id="lineChart"></div>
</div>
</div>
</div>
</div>
<div class="billboard-grid">
<div class="box_title">
<div class="tit fl">인텐트 그래프 (단위 : 건)</div>
</div>
<div class="grid-inner">
<div class="chart-item-box">
<div class="chart-item">
<div class="chart" id="lineChart2"></div>
</div>
</div>
</div>
</div>
<div class="billboard-grid">
<div class="box_title">
<div class="tit fl">시나리오 그래프 (단위 : 건)</div>
</div>
<div class="grid-inner">
<div class="chart-item-box">
<div class="chart-item">
<div class="chart" id="lineChart3"></div>
</div>
</div>
</div>
</div>
<div class="billboard-grid full">
<div class="box_title">
<div class="tit fl">오늘 시간대별 통화량 (단위 : 건)</div>
<div class="tit fr" id="curCallCnt">현재 통화량 : 0건</div>
</div>
<div class="grid-inner">
<div class="chart-item-box">
<div class="chart-item">
<div class="chart" id="barChart"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</th:block>
</html>

@ -1,19 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta http-equiv="content-language" content="ko">
<title>ERROR</title>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="100%" align="center" valign="middle" style="padding-top:150px;"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span style="font-family:Tahoma; font-weight:bold; color:#000000; line-height:150%; width:440px; height:70px;">오류발생 알림화면(허용되지 않는 요청을 하셨습니다)2</span></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

@ -1,729 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>시나리오코드</title>
</head>
<script>
$(document).ready(function () {
//내가사용할수있는 서비스그룹조회
getOprService();
//데이터테이블
PagingDataTable();
//리스트더블클릭
$('#listTable tbody').on('dblclick', 'tr', function () {
// $('#listTable tbody').on('dblclick', function () {
var data = $('#listTable').DataTable().row(this).data();
// $("#reg_edit_modal").modal("show");
// $("#modifyCommonCodeModal").show();
// $("#reg_edit_modal").show();
// createDim();
$("#setCustCode").val(data.custCode);
$("#setServiceGroupName").val(data.serviceGroupName);
$("#setServiceGroup").val(data.serviceGroup);
$("#setOprMngCode").val(data.oprMngCode);
$("#setMajorCode").val(data.majorCode);
$("#setMinorCode").val(data.minorCode);
$("#setCodeName").val(data.codeName);
$("#setAttribute1").val(data.attribute1);
$("#setAttribute2").val(data.attribute2);
$("#setAttribute3").val(data.attribute3);
});
// $("#reg_edit_modal a.close").on('click', function () {
// $("#reg_edit_modal").hide();
// removeDim();
// })
// 데이터테이블 AJAX 리로드
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
//엔터입력
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//신규모달
$('#btn_reg_modal').on('click', function () {
$('#serviceInfo').reset();
$('#serviceGroupModal').val('ALL').niceSelect('update');
});
// 신규 공통 코드 저장
$('#btnSaveCust').on('click', function () {
fncCreateCustInfo();
});
//수정모달
$('#btnEditCust').on('click', function () {
fncUpdateCommonCode();
});
//수정모달 삭제 버튼
$('#btnDelCust').on('click', function () {
fncDeleteCommonCode();
});
// $('#listTable').on('page.dt', function(){
// // var info = table.page.info();
// // console.log( 'Showing page: '+info.page+' of '+info.pages );
// // console.log( 'Showing page: ' );
// modalUi();
// });
}
);
function fncUpdateCommonCode() {
var json = {};
var custCode = $("#setCustCode").val();
var serviceGroupName = $("#setServiceGroupName").val();
var serviceGroup = $("#setServiceGroup").val();
var oprMngCode = $("#setCustCode").val() + "_RCP_" + $("#setServiceGroup").val();
var majorCode = $("#setMajorCode").val();
var minorCode = $("#setMinorCode").val();
var codeName = $("#setCodeName").val();
var attribute1 = $("#setAttribute1").val();
var attribute2 = $("#setAttribute2").val();
var attribute3 = $("#setAttribute3").val();
json.custCode = custCode;
json.serviceGroupName = serviceGroupName;
json.serviceGroup = serviceGroup;
json.oprMngCode = oprMngCode;
json.majorCode = majorCode;
json.minorCode = minorCode;
json.codeName = codeName;
json.attribute1 = attribute1;
json.attribute2 = attribute2;
json.attribute3 = attribute3;
// console.log(JSON.stringify(json));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/oprmngcode/update'/>",
data: JSON.stringify(json),
// success: function (data) {
// return swalAlert('success', '저장');
// }
}).complete(function (data) {
if (data.status == 200) {
$.utils.success('정상적으로 저장되었습니다.');
removeDim();
$('#reg_edit_modal a.close').trigger('click');
fnCustSearchBtn();
//document.location.href = "<c:url value='/admin/common/system/oprmngcode/manage.do'/>";
}
if (data.status == 400) {
$.utils.warning("실패하였습니다..");
// $.utils.success('정상적으로 저장되었습니다.');
}
if (data.status == 404) {
$.utils.warning("변경 사항이 없습니다.");
}
});
}
function fncDeleteCommonCode(){
var json = {};
var majorCode = $("#setMajorCode").val();
var custCode = $("#setCustCode").val();
var serviceGroup = $("#setServiceGroup").val();
var minorCode = $("#setMinorCode").val();
json.custCode = custCode;
json.serviceGroup = serviceGroup;
json.majorCode = majorCode;
json.minorCode = minorCode;
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/oprmngcode/delete'/>",
data: JSON.stringify(json),
}).complete(function (data) {
if (data.status == 200) {
$.utils.success('정상적으로 삭제되었습니다.');
$('#reg_edit_modal a.close').trigger('click');
fnCustSearchBtn();
}
if (data.status == 400) {
$.utils.warning("실패하였습니다..");
}
});
}
//내 서비스그룹 조회
function getOprService() {
var html = '<option value="' + "ALL" + '">' + "선택" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>"
// + "?serviceType=S"
,
success: function (data) {
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
$('#serviceGroupModal').html(html);
$('#serviceGroupModal').niceSelect('update');
};
// 신규 공통 코드 저장
function fncCreateCustInfo() {
/*if ($("#codeTypeModal option:selected").val() == "C_CD"){
getOprServiceCommon();
}*/
var json = {};
json.custCode = $("#insertCustCode").val();
json.serviceGroup = $("#serviceGroupModal option:selected").val();
json.major = $('#insertMajorCode').val();
json.minor = $('#insertMinorCode').val();
json.codeName = $('#insertCodeName').val();
json.attribute1 = $('#insertAttribute1').val();
json.attribute2 = $('#insertAttribute2').val();
json.attribute3 = $('#insertAttribute3').val();
// console.log(JSON.stringify(json));
if (json.serviceGroup == 'ALL') {
$.utils.warning("시나리오그룹을 선택해주세요.");
// $.utils.success('정상적으로 저장되었습니다.');
// alert('시나리오그룹을 선택해주세요');
} else if (json.major.trim() == '') {
$.utils.warning("대분류는 필수 항목입니다.");
// alert('대분류는 필수 항목입니다.');
} else if (json.minor.trim() == '') {
$.utils.warning("중분류는 필수 항목입니다.");
// alert('중분류는 필수 항목입니다.');
} else {
$.utils.success('정상적으로 등록되었습니다.');
insertCommonCode(json);
}
}
// 권한 신규등록
function insertCommonCode(json) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/oprmngcode/insert'/>",
data: JSON.stringify(json),
// success: function (data) {
// return swalAlert('success', '저장');
// }
}).complete(function (data) {
if (data.status == 200) {
$('#reg_modal a.close').trigger('click');
fnCustSearchBtn()
}
if (data.status == 400) {
$.utils.warning("이미 존재하는 코드입니다.");
// $.utils.success('정상적으로 저장되었습니다.');
}
});
}
function updateCommonCode(json) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/oprmngcode/update'/>",
data: JSON.stringify(json),
}).complete(function (data) {
if (data.status == 200) {
$('#reg_modal a.close').trigger('click');
fnCustSearchBtn()
}
if (data.status == 400) {
$.utils.warning("이미 존재하는 코드입니다.");
// $.utils.success('정상적으로 저장되었습니다.');
}
});
}
function viewPage(rowData) {
document.location.href = "<c:url value='/admin/common/system/oprmngcode/view'/>", +"?custCode=" + rowData.custCode;
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/oprmngcode/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10;
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText = $('#codeText').val();
json.codeType = $("#codeType option:selected").val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "serviceGroupName"},
{data: "serviceGroup"},
{data: "oprMngCode"},
{data: "majorCode"},
{data: "minorCode"},
{data: "codeName"},
{data: "attribute1"},
{data: "attribute2"},
{data: "attribute3"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
createdRow: function (row, data, index) {
//
// if the second column cell is blank apply special formatting
//
console.dir(row);
$(row).addClass('modalLoad').attr('rel','reg_edit_modal');
}
,
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
// console.log("-- - -" + data)
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
// visible: false,
// searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 8,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 9,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log($(this).parents("tr"));
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}
],
"drawCallback": function () {
modalUi();
}
}
)
// modalUi();
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
// modalUi();
};
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">BOT 공통 관리</a></li>
<li><a href="#">공통 코드 관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">공통 코드 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
</colgroup>
<tbody>
<tr>
<th class="tl">시나리오그룹</th>
<td>
<div class="sel_box">
<select id="serviceGroup" class="wide">
<option value="ALL">선택</option>
</select>
</div>
</td>
<th class="tl">분류</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="major">대분류</option>
<option value="minor">중분류</option>
</select>
</div>
</td>
<th class="tl">코드명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">공통 코드 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<a href="#" rel="reg_modal" id="btn_reg_modal" class="btn line modalLoad">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객사</th>
<th>시나리오그룹명</th>
<th>서비스코드</th>
<th>시나리오그룹코드</th>
<th>대분류</th>
<th>중분류</th>
<th>설명</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>공통 코드 신규등록</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<dl>
<dt><h4><em class="important">시나리오그룹</em></h4></dt>
<dd>
<div class="sel_box">
<select id="serviceGroupModal" name="serviceGroupModal" class="wide">
<option value="ALL">선택</option>
</select>
</div>
</dd>
</dl>
<dl>
<dt><h4><em class="important">대분류</em></h4></dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertMajorCode" name="majorCode" placeholder="대분류를 입력하세요.">
<input type="hidden" id="insertCustCode">
</div>
</dd>
</dl>
<dl>
<dt><h4><em class="important">중분류</em></h4></dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertMinorCode" name="minorCode" placeholder="중분류를 입력하세요.">
</div>
</dd>
</dl>
<dl class="">
<dt><h4><em class="">속성1</em></h4></dt>
<dd>
<input type="text" id="insertAttribute1"></input>
</dd>
</dl>
<dl class="">
<dt><h4><em class="">속성2</em></h4></dt>
<dd>
<input type="text" id="insertAttribute2"></input>
</dd>
</dl>
<dl class="">
<dt><h4><em class="">속성3</em></h4></dt>
<dd>
<input type="text" id="insertAttribute3"></input>
</dd>
</dl>
<dl class="">
<dt><h4><em class="">설명</em></h4></dt>
<dd>
<textarea name="codeName" id="insertCodeName"></textarea>
</dd>
</dl>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
<!-- modal :: 공통 코드 등록 팝업 end -->
<!-- modal :: 공통 코드 수정 팝업 -->
<%--<div class="modal open" id="reg_edit_modal">--%>
<div class="modal" id="reg_edit_modal">
<div class="modal_header">
<h3>공통 코드 수정</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="editServiceInfo">
<dl>
<dt><h4><em class="">시나리오그룹명</em></h4></dt>
<dd>
<div class="ipt_box">
<input type="text" id="setServiceGroupName" value="" readonly>
<input type="hidden" id="setServiceGroup" value="" readonly>
<input type="hidden" id="setCustCode" value="" readonly>
</div>
</dd>
</dl>
<dl>
<%-- <dt><h4><em class="important">대분류</em></h4></dt>--%>
<dt><h4><em class="">대분류</em></h4></dt>
<dd>
<div class="ipt_box">
<input type="text" id="setMajorCode" name="setMajorCode" value="0" readonly>
</div>
</dd>
</dl>
<dl>
<dt><h4><em class="">중분류</em></h4></dt>
<dd>
<div class="ipt_box">
<input type="text" id="setMinorCode" name="minorCode" value="" readonly>
</div>
</dd>
</dl>
<dl>
<dt><h4><em class="">속성1</em></h4></dt>
<dd>
<input type="text" id="setAttribute1"></input>
</dd>
</dl>
<dl>
<dt><h4><em class="">속성2</em></h4></dt>
<dd>
<input type="text" id="setAttribute2"></input>
</dd>
</dl>
<dl>
<dt><h4><em class="">속성3</em></h4></dt>
<dd>
<input type="text" id="setAttribute3"></input>
</dd>
</dl>
<dl>
<dt><h4><em class="">설명</em></h4></dt>
<dd>
<textarea id="setCodeName" name="codeName"></textarea>
</dd>
</dl>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" id="btnDelCust" class="btn grey">삭제</a>
<a href="#" id="btnEditCust" class="btn">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
<!-- modal :: 공통 코드 수정 팝업 end -->
</body>
</html>

@ -1,273 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>고객사관리</title>
</head>
<script>
$(document).ready(function () {
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
}
);
function viewPage(rowData) {
// console.log(rowData.custCode);
// alert("cust - " + rowData.custCode)
// document.location.href = "/BotMain_VM/admin/common/system/cust/update" + "?custCode=" + rowData.custCode;
document.location.href = "<c:url value='/admin/common/system/cust/update'/>" + "?custCode=" + rowData.custCode;
// document.location.href = '/admin/common/system/cust/view';
}
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/cust/insert";
document.location.href = "<c:url value='/admin/common/system/cust/insert'/>";
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/cust/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "custServiceMent"},
{data: "custTel"},
{data: "useYn"},
{data: "registDate"}
// {data: "registId"},
// {data: "updateDate"},
// {data: "updateId"},
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">고객사 관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">고객사 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="85%">
<%-- <col width="140px">--%>
<%-- <col width="25%">--%>
<%-- <col width="140px">--%>
<%-- <col width="25%">--%>
</colgroup>
<tbody>
<tr>
<th class="tl">고객사명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">고객사 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<%-- <a href="#" rel="reg_modal" class="btn modalLoad" id="btnRegModal">신규등록</a>--%>
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객사코드</th>
<th>고객사명</th>
<th>고객사안내멘트</th>
<th>대표번호</th>
<th>사용유무</th>
<th>생성일</th>
<%-- <th>registId</th>--%>
<%-- <th>updateDate</th>--%>
<%-- <th>updateId</th>--%>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</section>
</body>
</html>

@ -1,658 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>고객사화면</title>
</head>
<body>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<script>
$(document).ready(function () {
// 권한 조회
$('#btnSearchCust').on('click', function () {
fncSearchCust();
});
//커스트코드 중복확인
$('#btnCustCodeDoubleCheck').on('click', function () {
// console.log("커스트 중복 클릭")
fncCustDoubleCheck();
});
//서비스코드 중복확인
$('#btnServiceGroupDoubleCheck').on('click', function () {
// console.log("서비스 중복 클릭")
fncServiceDoubleCheck();
});
$('#btnCancel').on('click', function () {
// console.log("취소클릭")
listgo()
});
$('#btnSave').on('click', function () {
// console.log("저장클릭")
fncCustSave();
});
$('#newServiceGroup').keyup(function (e) {
// newOprCreate(e.keyCode)
});
$('#btnSaveCust').on('click', function () {
addServiceGroup();
// $('.tbl-card-li').each(function () {
// // console.log("???");
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
// console.log($('.tbl-card').find('.tbl-card-li').last());
// $('.tbl-card').find('.tbl-card-li').last()
$('.tbl-card').find('.tbl-card-title').last()
.on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on')
}
);
});
// $('#newServiceGroup').change(function () {
// ($(this).val())
// });
});
function fncCustSave() {
var custName = $('#newCustName').val();
var custCode = $('#newCustCode').val().toUpperCase();
var custCodeDoubleCheck = $('#newCustCodeDoubleCheck').val();
var custUseYn = $('#newCustUseYn').val();
var json = {};
json.custName = custName;
json.custCode = custCode;
json.custCodeDoubleCheck = custCodeDoubleCheck;
json.custUseYn = custUseYn;
var addServiceAuthList = new Array();
$(".tbl-card").children('li').each(function (i, e) {
var addServiceAuth = {};
var addServiceGroupName = $(this).find("input:eq(0)").attr("id").replaceAll("addServiceGroupName", "");
var addServiceGroup = $(this).find("input:eq(1)").attr("id").replaceAll("addServiceGroup", "");
// var addOprMngCode = $(this).find("input:eq(2)").attr("id").replaceAll("addOprMngCode", "");
var addServiceGroupDesc = $(this).find("input:eq(2)").attr("id").replaceAll("addServiceGroupDesc", "");
var addUseYn = $(this).find("input:eq(3)").attr("id");
var authList = new Array();
var selectedElms = $("#tree_wrap_" + addServiceGroup).jstree("get_selected", true);
$.each(selectedElms, function () {
authList.push(this.id);
});
// $('#tree_wrap_' + addServiceGroup).find('li').each(function (i, e) {
// var chkid = $(this).find('input').attr('id')
// // .replaceAll("tree_wrap_", "")
// // console.log(chkid);
// if ($(this).find('input').is(':checked')) {
// // console.log(chkid);
// authList.push(chkid);
// }
// });
addServiceAuth.addServiceGroupName = addServiceGroupName;
addServiceAuth.addServiceGroup = addServiceGroup.toUpperCase();
addServiceAuth.addOprMngCode = custCode + "_RCP_" + addServiceGroup.toUpperCase();
addServiceAuth.addServiceGroupDesc = addServiceGroupDesc;
addServiceAuth.addUseYn = addUseYn;
addServiceAuth.authList = authList;
addServiceAuthList.push(addServiceAuth);
// listgo()
});
json.addServiceAuthList = addServiceAuthList;
// console.log(JSON.stringify(json));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/cust/save'/>",
data: JSON.stringify(json),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// console.log("저장하였습니다.")
listgo();
} else if (data.status == 405){
$.utils.warning("NLP연결에 실패했습니다.");
}
else {
$.utils.warning("오류가 발생했습니다.");
}
})
}
function newOprCreate(e) {
var expression = RegExp(/[^a-zA-Z]/);
var text = String.fromCharCode(e);
// console.log("key " + e);
// console.log("key " + text);
var custCode = $("#newCustCode").val().toUpperCase();
var sol = "_RCP_";
if (e === 8) {
setTimeout(() => {
var outText = custCode + sol + $('#newServiceGroup').val().toUpperCase();
$('#newOprDiv').html('<input type="text" id="newOprMngCode" value="' + outText + '" name="" class=" title-connect" readonly>')
}, "100")
} else {
var temp = $('#newOprMngCode').val().replace(custCode + sol, "");
$('#newOprMngCode').val(custCode + sol + temp + text);
}
}
function fncNewDoubleCheck() {
var custCode = $("#custCode").val();
var newServiceGroup = $("#newServiceGroup").val();
var checkJson = {};
checkJson.custCode = custCode;
checkJson.subServiceGroup = newServiceGroup;
// console.log(newServiceGroup)
if (newServiceGroup.length < 1) {
$.utils.warning("1글자이상 입력해주세요.");
// $.utils.success('정상적으로 저장되었습니다.');
return;
}
if (newServiceGroup.length > 20) {
$.utils.warning("20글자이하로 입력해주세요.");
return;
}
var space = /\s/g;
if (space.match(newServiceGroup)) {
$.utils.warning("공백은 입력 할 수 없습니다.");
return;
}
if (RegExp(/[^a-zA-Z]/).test(newServiceGroup)) {
$.utils.warning("영어문만 입력가능합니다.");
return;
} else {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/serviceGroup/doubleCheck'/>",
data: JSON.stringify(checkJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
$('#newDoubleCheck').val(data.responseText);
var yn = data.responseText;
if (yn === "Y") {
// alert("사용가능합니다");
// $.utils.warning("1글자이상 입력해주세요.");
$.utils.success('사용가능합니다.');
return;
} else {
$.utils.warning("중복된코드입니다.");
return;
}
} else {
}
})
;
}
}
function addServiceGroup() {
var custCode = $('#newCustCode').val();
var serviceGroup = $('#newServiceGroup').val();
var serviceGroupName = $('#newServiceGroupName').val();
var serviceGroupDesc = $('#newServiceGroupDesc').val();
var oprMngCode = $('#newOprMngCode').val();
var uesYn = $('#newUseYn').val();
if (custCode.length < 1) {
// alert("커스트 코드를 입력해주세요");
$.utils.warning("커스트 코드를 입력해주세요.");
// $.utils.success('사용가능합니다.');
return;
}
if ($('#newServiceGroup option:selected').val() === 'ALL') {
$.utils.warning("서비스그룹을 선택해주세요.");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
$.utils.warning("이미 추가된 서비스그룹입니다.");
return;
}
var html3 = '';
var html2 = '';
html2 += ''
+ ' <tr>'
+ ' <th class="tl">서비스그룹</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroupName' + serviceGroupName + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">서비스코드</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroup + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
// + ' <tr>'
// + ' <th class="tl">운영관리코드</th>'
// + ' <td>'
// + ' <div class="ipt_box">'
// + ' <input type="text" id="addOprMngCode' + oprMngCode + '" value="' + serviceGroupName + '" name="" readonly class="">'
// + ' </div>'
// + ' </td>'
// + '</tr>'
+ ' <th class="tl">서비스그룹설명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroupDesc' + serviceGroupDesc + '" value="' + serviceGroupDesc + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">사용여부 <em class="red">*</em></th>'
+ ' <td>'
+ ' <div class="sel_box">'
+ ' <select class="wide" id="addUseYn">'
+ ' <option value="Y" selected>Y</option>'
+ ' <option value="N">N</option>'
+ ' </select>'
+ ' </div>'
+ ' </td>'
+ '<tr>'
+ ' <th class="tl">권한</th>'
+ ' <td class="tl">'
+ ' <div class="content tree tree-maxHeight type-chk">'
+ ' <div class="tree_wrap" id="tree_wrap_' + serviceGroup + '">'
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ '</tr>'
;
var html = '';
html
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html);
$('#reg_modal').hide();
removeDim();
treeWrap(getMenuBase(), getPolicyParent(), serviceGroup);
}
function treeWrap(mainMenu, policyParent, serviceGroup) {
// console.log("treeWrap mainMenu -" + JSON.stringify(mainMenu));
// console.log("treeWrap policyParent -" + JSON.stringify(policyParent));
var treeData = [];
mainMenu.forEach(function (e, i) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
});
setTimeout(() => {
$('#tree_wrap_' + serviceGroup).jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1");
}
function getPolicyParent() {
var datas = new Array();
datas = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/jstree/policy/parent'/>",
success: function (data) {
return data;
}
});
return datas.responseJSON;
}
function getMenuBase() {
var datas = new Array();
datas = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/policybase'/>",
success: function (data) {
return data;
}
});
return datas.responseJSON;
}
function fncCustDoubleCheck() {
var custCode = $('#newCustCode').val().toUpperCase();
var regType = /^[A-Za-z0-9]*$/;
// console.log(custCode.length)
if (custCode.length < 1) {
$.utils.warning('고객사코드를 입력해주세요.');
return;
}
var regType = /^[A-Za-z0-9]*$/;
if (!regType.test(custCode)) {
$.utils.warning('영문, 숫자만입력가능합니다.');
return;
}
var yn = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/doubleCheck'/>" + '?custCode=' + custCode,
success: function (data) {
if (data === 'Y') {
// alert("사용할수있는 코드입니다")
$.utils.success('사용할수있는 코드입니다.');
// $.utils.warning("사용할수없는 코드입니다.");
} else {
$.utils.warning("사용할수없는 코드입니다.");
// alert("사용할수없는 코드입니다")
}
return data;
}
});
// console.log(JSON.stringify(yn.responseText));
$('#newCustCodeDoubleCheck').val(yn.responseText);
};
function fncServiceDoubleCheck() {
var serviceGroup = $('#newServiceGroup').val().toUpperCase();
if (serviceGroup.length < 1) {
$.utils.warning('서비스코드를 입력해주세요.');
return;
}
var regType = /^[A-Za-z0-9]*$/;
if (!regType.test(serviceGroup)) {
$.utils.warning('영문, 숫자만입력가능합니다.');
return;
}
var yn = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/service/doubleCheck'/>" + '?serviceGroup=' + serviceGroup,
success: function (data) {
if (data === 'Y') {
// alert("사용할수있는 코드입니다")
$.utils.success('사용할수있는 코드입니다.');
// $.utils.warning("사용할수없는 코드입니다.");
} else {
$.utils.warning("사용할수없는 코드입니다.");
// alert("사용할수없는 코드입니다")
}
}
});
// console.log(JSON.stringify(yn.responseText));
$('#newCustCodeDoubleCheck').val(yn.responseText);
$('#newServiceGroupDoubleCheck').val(yn);
};
function listgo() {
document.location.href = "<c:url value='/admin/common/system/cust/manage.do'/>";
}
</script>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">고객사관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">고객사 등록</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사명 <em class="red">*</em></th>
<td>
<div class="ipt_box">
<input id="newCustName" type="text" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">고객사코드 <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input id="newCustCode" type="text" value="" name="" class="">
<input id="newCustCodeDoubleCheck" type="hidden" value="N" name="" class="">
<a href="#" id="btnCustCodeDoubleCheck" class="btn basic">중복확인</a>
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newCustUseYn">
<option value="Y">Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스 그룹 <em class="red">*</em></h2>
</div>
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnCancel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>서비스그룹 신규등록</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<tr>
<th class="tl">서비스그룹명</th>
<td>
<div class="ipt_box">
<input type="text" id="newServiceGroupName" value="" name="" class="title-connect">
</div>
</td>
</tr>
<tr>
<th class="tl">서비스코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="newServiceGroup" value="" name="" class="">
<input type="hidden" id="newServiceGroupDoubleCheck" value="N" name="" class="">
<a href="#" class="btn grey" id="btnServiceGroupDoubleCheck">중복확인</a>
</div>
</td>
</tr>
<%-- <tr>--%>
<%-- <th class="tl">운영관리코드</th>--%>
<%-- <td>--%>
<%-- <div class="ipt_box" id="newOprDiv">--%>
<%-- <input type="text" id="newOprMngCode" value="" name=""--%>
<%-- class=" title-connect" readonly>--%>
<%-- </div>--%>
<%-- </td>--%>
<%-- </tr>--%>
<tr>
<th class="tl">서비스그룹 설명</th>
<td>
<div class="ipt_box">
<input type="text" id="newServiceGroupDesc" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newServiceUseYn">
<option value="Y" selected>Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,814 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>고객사화면</title>
</head>
<body>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<script>
$(document).ready(function () {
// 권한 조회
$('#btnSearchCust').on('click', function () {
fncSearchCust();
});
getQueryString();
getCustSelect();
//커스트코드 중복확인
$('#btnCustCodeDoubleCheck').on('click', function () {
// console.log("커스트 중복 클릭")
fncCustDoubleCheck();
});
//서비스코드 중복확인
$('#btnServiceGroupDoubleCheck').on('click', function () {
// console.log("서비스 중복 클릭")
fncServiceDoubleCheck();
});
$('#btnCancel').on('click', function () {
// console.log("취소클릭")
listgo()
});
$('#btnSave').on('click', function () {
// console.log("저장클릭")
fncCustSave();
});
$('#newServiceGroup').keyup(function (e) {
newOprCreate(e.keyCode)
});
$('#btnSaveCust').on('click', function () {
addServiceGroup();
// $('.tbl-card-li').each(function () {
// // console.log("???");
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
// console.log($('.tbl-card').find('.tbl-card-li').last());
// $('.tbl-card').find('.tbl-card-li').last()
$('.tbl-card').find('.tbl-card-title').last()
.on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on')
}
);
});
});
function getQueryString() {
var param = new URLSearchParams(location.search).get("custCode");
// console.log(param)
return param;
}
function getCustSelect() {
var result = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/select'/>" + "?custCode=" + getQueryString(),
})
.complete(function (data) {
// console.log(data.status);
if (data.status == 200) {
// console.log("저장하였습니다.")
// console.log(JSON.stringify(data.responseJSON));
return data.responseJSON;
} else {
}
});
// console.log(JSON.stringify(result.responseJSON));
var custCode = result.responseJSON.custCode;
$('#newCustCode').val(custCode);
$('#newCustName').val(result.responseJSON.custName);
$('#newCustUseYn').val(result.responseJSON.custUseYn).prop("selected", true);
$('#newCustUseYn').niceSelect('update');
var html = '';
result.responseJSON.addServiceAuthList.forEach(function (e, i) {
console.log(i);
var serviceGroup = e.addServiceGroup;
var serviceGroupName = e.addServiceGroupName;
var serviceGroupDesc = e.addServiceGroupDesc;
var oprMngCode = e.addOprMngCode;
var uesYn = e.addUseYn;
if (custCode.length < 1) {
// alert("커스트 코드를 입력해주세요");
// $.utils.success('사용할수있는 코드입니다.');
$.utils.warning("커스트 코드를 입력해주세요.");
return;
}
if ($('#newServiceGroup option:selected').val() === 'ALL') {
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
$.utils.warning("이미 추가된 서비스그룹입니다.");
// console.log()("이미 추가된 서비스그룹입니다.");
// return;
}
var html3 = '';
var html2 = '';
html2 += ''
+ ' <tr>'
+ ' <th class="tl">서비스그룹</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroupName' + i + '" value="' + serviceGroupName + '" name="" class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">서비스코드</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + i + '" value="' + serviceGroup + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">시나리오코드</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addOprMngCode' + i + '" value="' + oprMngCode + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <th class="tl">서비스그룹설명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroupDesc' + i + '" value="' + serviceGroupDesc + '" name="" class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">사용여부 <em class="red">*</em></th>'
+ ' <td>'
+ ' <div class="sel_box">'
+ ' <select class="wide" id="addUseYn' + serviceGroup + '">'
if (e.addUseYn === 'Y') {
html2 += ' <option value="Y" selected>Y</option>'
+ ' <option value="N">N</option>'
} else {
html2 += ' <option value="Y" >Y</option>'
+ ' <option value="N" selected>N</option>'
}
html2 += ' </select>'
+ ' </div>'
+ ' </td>'
+ '<tr>'
+ ' <th class="tl">권한</th>'
+ ' <td class="tl">'
+ ' <div class="content tree tree-maxHeight type-chk">'
+ ' <div class="tree_wrap" id="tree_wrap_' + serviceGroup + '">'
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ '</tr>'
;
html
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
// $('#reg_modal').hide();
// removeDim();
treeWrapSelect(result.responseJSON.mainMenu, result.responseJSON.servicePol[serviceGroup], getPolicyParent(), serviceGroup);
})
$('.tbl-card').html(html);
$('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
};
function treeWrapSelect(mainMenu, servicePol, policyParent, serviceGroup) {
var treeData = [];
mainMenu.forEach(function (e, i) {
var setId = e.authName;
if (policyParent[e.authName] == '#') {
var setParent = policyParent[e.authName];
} else {
var setParent = policyParent[e.authName];
}
if (servicePol.includes(e.authName)) {
treeData[i] = {
id: setId,
parent: setParent,
text: e.menuName,
state: {
opened: true,
selected: true
}
};
} else {
treeData[i] = {
id: setId,
parent: setParent,
text: e.menuName,
state: {
opened: false,
selected: false
}
};
}
});
setTimeout(() => {
$('#tree_wrap_' + serviceGroup).jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1");
}
;
function fncCustSave() {
var custName = $('#newCustName').val();
var custCode = $('#newCustCode').val();
var custCodeDoubleCheck = $('#newCustCodeDoubleCheck').val();
var custUseYn = $('#newCustUseYn option:selected').val();
var json = {};
json.custName = custName;
json.custCode = custCode.toUpperCase();
json.custCodeDoubleCheck = custCodeDoubleCheck;
json.custUseYn = custUseYn;
var addServiceAuthList = new Array();
$(".tbl-card").children('li').each(function (i, e) {
console.log('get-----'+i);
var addServiceGroup = $('#'+$(this).find("input:eq(1)").attr("id")).val();
console.log('addServiceGroup-----'+addServiceGroup);
var addServiceAuth = {};
// var addServiceGroupName = $(this).find("input:eq(0)").attr("id").replaceAll("addServiceGroupName", "");
var addOprMngCode = $(this).find("input:eq(2)").attr("id");
console.log('addOprMngCode-----'+addOprMngCode);
// var addServiceGroupDesc = $(this).find("input:eq(3)").attr("id").replaceAll("addServiceGroupDesc", "");
var addServiceGroupName = $('#' + $(this).find("input:eq(0)").attr("id")).val();
console.log('addServiceGroupName-----'+addServiceGroupName);
var addServiceGroupDesc = $('#' + $(this).find("input:eq(3)").attr("id")).val();
console.log('addServiceGroupDesc-----'+addServiceGroupDesc);
var addUseYn = $('#addUseYn' + addServiceGroup + ' option:selected').val();
console.log('addUseYn-----'+addUseYn);
var authList = new Array();
// console.log(JSON.stringify(authList));
// console.log(JSON.stringify($(this)));
var selectedElms = $("#tree_wrap_" + addServiceGroup).jstree("get_selected", true);
$.each(selectedElms, function () {
authList.push(this.id);
});
// $('#tree_wrap_' + addServiceGroup).find('li').each(function (i, e) {
// var chkid = $(this).find('input').attr('id')
// // .replaceAll("tree_wrap_", "")
// // console.log(chkid);
// if ($(this).find('input').is(':checked')) {
// // console.log(chkid);
// authList.push(chkid);
// }
// });
addServiceAuth.addServiceGroupName = addServiceGroupName;
addServiceAuth.addServiceGroup = addServiceGroup.toUpperCase();
addServiceAuth.addOprMngCode = addOprMngCode.toUpperCase();
addServiceAuth.addServiceGroupDesc = addServiceGroupDesc;
addServiceAuth.addUseYn = addUseYn;
addServiceAuth.authList = authList;
addServiceAuthList.push(addServiceAuth);
});
json.addServiceAuthList = addServiceAuthList;
// console.log(JSON.stringify(json));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/cust/modify'/>",
data: JSON.stringify(json),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// console.log("저장하였습니다.")
listgo();
} else if (data.status == 405){
$.utils.warning("NLP연결에 실패했습니다.");
}
else {
$.utils.warning("오류가 발생했습니다.");
}
})
// listgo();
}
function newOprCreate(e) {
var expression = RegExp(/[^a-zA-Z]/);
var text = String.fromCharCode(e);
// console.log("key " + e);
// console.log("key " + text);
var custCode = $("#newCustCode").val().toUpperCase();
var sol = "_RCP_";
if (e === 8) {
setTimeout(() => {
var outText = custCode + sol + $('#newServiceGroup').val().toUpperCase();
$('#newOprDiv').html('<input type="text" id="newOprMngCode" value="' + outText + '" name="" class=" title-connect" readonly>')
}, "100")
} else {
var temp = $('#newOprMngCode').val().replace(custCode + sol, "");
$('#newOprMngCode').val(custCode + sol + temp + text);
}
}
function fncNewDoubleCheck() {
var custCode = $("#custCode").val();
var newServiceGroup = $("#newServiceGroup").val();
var checkJson = {};
checkJson.custCode = custCode;
checkJson.subServiceGroup = newServiceGroup;
// console.log(newServiceGroup)
if (newServiceGroup.length < 1) {
$.utils.warning("1글자이상 입력해주세요.");
return;
}
if (newServiceGroup.length > 20) {
$.utils.warning("20글자이하로 입력해주세요.");
return;
}
if (RegExp(/[^a-zA-Z]/).test(newServiceGroup)) {
$.utils.warning("영어문만 입력가능합니다.");
return;
} else {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/serviceGroup/doubleCheck'/>",
data: JSON.stringify(checkJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
$('#newDoubleCheck').val(data.responseText);
var yn = data.responseText;
if (yn === "Y") {
$.utils.success("사용가능합니다");
return;
} else {
// $.utils.success("사용가능합니다");
$.utils.warning("중복된코드입니다.");
return;
}
} else {
}
})
;
}
}
function addServiceGroup() {
var custCode = $('#newCustCode').val();
var serviceGroup = $('#newServiceGroup').val();
var serviceGroupName = $('#newServiceGroupName').val();
var serviceGroupDesc = $('#newServiceGroupDesc').val();
var oprMngCode = $('#newOprMngCode').val();
var uesYn = $('#newUseYn').val();
if (custCode.length < 1) {
$.utils.warning("커스트 코드를 입력해주세요.");
return;
}
if ($('#newServiceGroup option:selected').val() === 'ALL') {
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
$.utils.warning("이미 추가된 서비스그룹입니다.");
return;
}
var html3 = '';
var html2 = '';
html2 += ''
+ ' <tr>'
+ ' <th class="tl">서비스그룹명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroupName' + serviceGroupName + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">서비스코드</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroup + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">시나리오코드</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addOprMngCode' + oprMngCode + '" value="' + oprMngCode + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <th class="tl">서비스그룹설명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroupDesc' + serviceGroupDesc + '" value="' + serviceGroupDesc + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ ' <tr>'
+ ' <th class="tl">사용여부 <em class="red">*</em></th>'
+ ' <td>'
+ ' <div class="sel_box">'
+ ' <select class="wide" id="addUseYn">'
+ ' <option value="Y" selected>Y</option>'
+ ' <option value="N">N</option>'
+ ' </select>'
+ ' </div>'
+ ' </td>'
+ '<tr>'
+ ' <th class="tl">권한</th>'
+ ' <td class="tl">'
+ ' <div class="content tree tree-maxHeight type-chk">'
+ ' <div class="tree_wrap" id="tree_wrap_' + serviceGroup + '">'
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ '</tr>'
;
var html = '';
html
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html);
$('#reg_modal').hide();
removeDim();
treeWrap(getMenuBase(), getPolicyParent(), serviceGroup);
}
function treeWrap(mainMenu, policyParent, serviceGroup) {
// console.log("treeWrap mainMenu -" + JSON.stringify(mainMenu));
// console.log("treeWrap policyParent -" + JSON.stringify(policyParent));
var treeData = [];
mainMenu.forEach(function (e, i) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
});
setTimeout(() => {
$('#tree_wrap_' + serviceGroup).jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1");
}
function getPolicyParent() {
var datas = new Array();
datas = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/jstree/policy/parent'/>",
success: function (data) {
return data;
}
});
return datas.responseJSON;
}
function getMenuBase() {
var datas = new Array();
datas = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/policybase'/>",
success: function (data) {
return data;
}
});
return datas.responseJSON;
}
function fncCustDoubleCheck() {
var custCode = $('#newCustCode').val().toUpperCase();
var yn = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/doubleCheck'/>" + '?custCode=' + custCode,
success: function (data) {
return data;
}
});
// console.log(JSON.stringify(yn.responseText));
$('#newCustCodeDoubleCheck').val(yn.responseText);
};
function fncServiceDoubleCheck() {
var serviceGroup = $('#newServiceGroup').val().toUpperCase();
var yn = $.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/cust/service/doubleCheck'/>" + '?serviceGroup=' + serviceGroup,
success: function (data) {
return data;
}
});
// console.log(JSON.stringify(yn.responseText));
$('#newCustCodeDoubleCheck').val(yn.responseText);
$('#newServiceGroupDoubleCheck').val(yn);
};
function listgo() {
document.location.href = "<c:url value='/admin/common/system/cust/manage.do'/>";
}
</script>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">고객사관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">고객사 등록</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사명 <em class="red">*</em></th>
<td>
<div class="ipt_box">
<input id="newCustName" type="text" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">고객사코드 <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input id="newCustCode" type="text" value="" name="" class="" readonly>
<input id="newCustCodeDoubleCheck" type="hidden" value="N" name="" class="">
<%-- <a href="#" id="btnCustCodeDoubleCheck" class="btn basic">중복확인</a>--%>
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newCustUseYn">
<option value="Y">Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스 그룹 <em class="red">*</em></h2>
</div>
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnCancel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>서비스그룹 신규등록</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<tr>
<th class="tl">서비스그룹명</th>
<td>
<div class="ipt_box">
<input type="text" id="newServiceGroupName" value="" name="" class="title-connect">
</div>
</td>
</tr>
<tr>
<th class="tl">서비스코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="newServiceGroup" value="" name="" class="">
<input type="hidden" id="newServiceGroupDoubleCheck" value="N" name="" class="">
<a href="#" class="btn grey" id="btnServiceGroupDoubleCheck">중복확인</a>
</div>
</td>
</tr>
<tr>
<th class="tl">시나리오코드</th>
<td>
<div class="ipt_box" id="newOprDiv">
<input type="text" id="newOprMngCode" value="" name=""
class=" title-connect" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">서비스그룹 설명</th>
<td>
<div class="ipt_box">
<input type="text" id="newServiceGroupDesc" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newServiceUseYn">
<option value="Y" selected>Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,568 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
$(document).ready(function () {
getOpr();
PagingDataTable();
// newTreeWrap();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data()
// console.log(JSON.stringify(data))
viewPage(data);
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//모달창 저장버튼
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
//선택 이벤트
$('#insertServiceGroup').change(function () {
getRoleAndOpr($(this).val());
});
}
);
function getRoleAndOpr() {
var role = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/role'/>",
success: function (data) {
role = data;
}
})
// console.log("aaaa - "+role)
var service = $('#insertServiceGroup option:selected').val();
// console.log(service);
newTreeWrap(service);
return role;
};
function getOpr() {
var setUrl = '';
var role = getRoleAndOpr();
// console.log(role)
if(role ==='SYSTEMADMIN'){
setUrl = "<c:url value='/adm/menu/oprmng'/>" ;
}
else {
setUrl = "<c:url value='/adm/menu/oprmng'/>"
// + "?serviceType=S"
;
}
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: setUrl,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
$('#insertServiceGroup').html(html);
$('#insertServiceGroup').niceSelect('update');
};
<%--function getOprAdmin() {--%>
<%-- $.ajax({--%>
<%-- type: "GET",--%>
<%-- contentType: "application/json; charset=utf-8",--%>
<%-- datatype: "JSON",--%>
<%-- url: "<c:url value='/adm/menu/oprmng/admin'/>",--%>
<%-- success: function (data) {--%>
<%-- data.forEach(function (e, f) {--%>
<%-- $('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");--%>
<%-- $('#serviceGroup').niceSelect('update');--%>
<%-- //--%>
<%-- // $('#insertServiceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");--%>
<%-- // $('#insertServiceGroup').niceSelect('update');--%>
<%-- });--%>
<%-- }--%>
<%-- })--%>
<%--};--%>
<%--function insertOpr() {--%>
<%-- var html = '';--%>
<%-- $.ajax({--%>
<%-- type: "GET",--%>
<%-- contentType: "application/json; charset=utf-8",--%>
<%-- datatype: "JSON",--%>
<%-- async: false,--%>
<%-- url: "<c:url value='/admin/common/system/groupAuth/insert/opr'/>",--%>
<%-- success: function (data) {--%>
<%-- data.forEach(function (e, f) {--%>
<%-- // console.log("aaaaa"+e.serviceGroup)--%>
<%-- html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';--%>
<%-- });--%>
<%-- }--%>
<%-- })--%>
<%--};--%>
function viewPage(rowData) {
document.location.href = "<c:url value='/admin/common/system/groupAuth/update'/>" + "?authGroupSeq=" + rowData.authGroupSeq;
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/update" + "?authGroupSeq=" + rowData.authGroupSeq;
}
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/insert";
var insertServiceGroup = $('#insertServiceGroup').val();
var insertGroupName = $('#insertGroupName').val();
var insertGroupDesc = $('#insertGroupDesc').val();
var selectedElms = $("#newTreeWrap").jstree("get_selected", true);
var selectedElmsIds = []
$.each(selectedElms, function () {
selectedElmsIds.push(this.id);
});
// console.log(insertServiceGroup);
// console.log(insertGroupName);
// console.log(insertGroupDesc);
// console.log(selectedElmsIds.length);
if (insertServiceGroup === "ALL") {
// $.utils.success("사용가능합니다");
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
if (insertGroupName.length < 1) {
$.utils.warning("권한그룹명을 선택해주세요.");
return;
}
if (selectedElmsIds.length < 1) {
$.utils.warning("정책을 1개이상 선택해주세요.");
return;
}
var insertJson = {};
insertJson.insertServiceGroup = insertServiceGroup;
insertJson.insertGroupName = insertGroupName;
insertJson.insertGroupDesc = insertGroupDesc;
insertJson.subPolicyVal = selectedElmsIds;
insertJson.subUseYn = 'Y';
// console.log("jsondata - " + JSON.stringify(insertJson));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/groupAuth/insert'/>",
data: JSON.stringify(insertJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/manage.do";
document.location.href = "<c:url value='/admin/common/system/groupAuth/manage.do'/>";
} else {
// console.log(JSON.stringify(this));
}
})
;
}
///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!수정!!!!!!!!!
function newTreeWrap(serviceGroup) {
if(serviceGroup === 'ALL'){
return;
}
var treeData = [];
setUrl = "<c:url value='/admin/common/system/groupAuth/newTree'/>"+"?serviceGroup="+serviceGroup;
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: setUrl,
async: false,
success: function (data) {
var mainMenu = data.mainMenu;
var policyParent = data.policyParent;
mainMenu.forEach(function (e, i) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
});
// $('#newTreeWrap').jstree(true).settings.core.data = treeData;
// $('#newTreeWrap').jstree(true).refresh();
setTimeout(() => {
$('#newTreeWrap').jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1")
// $('#newTreeWrap').jstree(true).settings.core.data = treeData;
$('#newTreeWrap').jstree('refresh');
}
});
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/groupAuth/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10;
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: true,
sProcessing: true,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
columns: [
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "authGroupSeq"},
{data: "policyGroupName"},
{data: "policyGroupDesc"},
{data: "custCode"},
{data: "registDate"}
],
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a hidden="hidden">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">그룹별권한 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="160px">
<col width="5%">
<col width="140px">
<col width="15%">
<%-- <col width="140px">--%>
<%-- <col width="25%">--%>
</colgroup>
<tbody>
<tr>
<th class="tl">시나리오그룹</th>
<td colspan="5">
<div class="sel_box">
<select id="serviceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">권한명</th>
<td colspan="5">
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">그룹별권한 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<a href="#" rel="createGroupModal" class="btn line modalLoad">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>서비스코드</th>
<th>시나리오그룹명</th>
<th>권한번호</th>
<th>권한명</th>
<th>권한설명</th>
<th>고객사코드</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
<!-- modal :: 권한그룹생성 -->
<div class="modal" id="createGroupModal">
<div class="modal_header">
<h3>권한그룹 생성</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<input type="hidden" id="custCode">
<dl>
<dt>
<h4><em class="">시나리오그룹</em></h4>
</dt>
<dd>
<div class="sel_box">
<select id="insertServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">그룹명</em></h4>
</dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertGroupName" placeholder="그룹명을 입력해주세요.">
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">그룹설명</em></h4>
</dt>
<dd>
<div class="ipt_box">
<input type="text" id="insertGroupDesc" placeholder="그룹 설명을 입력해주세요.">
</div>
</dd>
</dl>
<dl>
<dt>
<h4><em class="">권한선택</em></h4>
</dt>
<dd>
<div class="content tree tree-maxHeight type-chk">
<div class="newTreeWrap" id="newTreeWrap">
</div>
</div>
</dd>
</dl>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" class="btn">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,432 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
$(document).ready(function () {
getOpr();
getQueryString();
getGroupAuthUpdateData();
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
getUserSearch()
}
});
//유저조회
$('#btnSearchUser').on('click', function () {
getUserSearch()
// $('#serviceInfo').reset();
});
//유저 선택 이벤트
$('#selectorUser').change(function () {
userAdd($(this).val(), $('#selectorUser option:selected').text())
});
$('#btnSave').on('click', function () {
// console.log("저장클릭")
ServiceGroupAuthModifyUpdate();
});
$('#btnDel').on('click', function () {
// console.log("취소버튼");
delBtn();
});
}
);
function delBtn() {
listgo();
}
function listgo() {
document.location.href = "<c:url value='/admin/common/system/groupAuth/manage.do'/>";
}
function getUserSearch() {
getQueryString();
var json = {};
var searchText = $('#userSelBox').val();
json.userSearchText = searchText;
$('#selectorUser').html("");
$('#selectorUser').niceSelect('update');
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
// url: "/BotMain_VM/admin/common/system/groupAuth/userSearch" + "?authGroupSeq=" + getQueryString(),
url: "<c:url value='/admin/common/system/groupAuth/userSearch'/>" + "?authGroupSeq=" + getQueryString(),
data: JSON.stringify(json),
success:
function (data) {
// console.log("datasss " + JSON.stringify(data))
var html = "";
data.forEach(function (e, i) {
html += "<option value=" + e.userSeq + ">" + e.userName + ' (' + e.userId + ')' + "</option>";
});
$('#selectorUser').html(html);
$('#selectorUser').niceSelect('update');
}
})
}
function ServiceGroupAuthModifyUpdate() {
var selectedElmsIds = [];
var selectedElms = $("#tree_wrap").jstree("get_selected", true);
$.each(selectedElms, function () {
selectedElmsIds.push(this.id);
});
var userList = [];
var delList = [];
$("#list-user-group-box-ul-list").children('li').each(function (i, e) {
var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq", "")
userList.push(ids)
// console.log("3 = " + ids)
})
$("#list-user-group-box-ul-delete").children('li').each(function (i, e) {
var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq", "")
delList.push(ids)
// console.log("3 = " + ids)
})
// console.log("lasddlasldqwle = " + JSON.stringify(lasddlasldqwle))
var authSeq = $('#authGroupSeq').val();
var json = {};
json.custCode = $('#custCode').val();
json.authGroupSeq = authSeq;
json.policyGroupName = $('#updateGroupName').val();
json.policyGroupDesc = $('#updateGroupDesc').val();
json.theUser = userList;
json.delUser = delList;
json.thePolicy = selectedElmsIds;
// console.log("saveData = " + JSON.stringify(json))
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
// url: "/BotMain_VM/admin/common/system/groupAuth/modify/update",
url: "<c:url value='/admin/common/system/groupAuth/modify/update'/>",
data: JSON.stringify(json),
success:
function (data) {
// console.log("modfu suc - ");
// document.location.href = "/BotMain_VM/admin/common/system/groupAuth/update" + "?authGroupSeq=" + getQueryString();
document.location.href = "<c:url value='/admin/common/system/groupAuth/manage.do'/>";
}
})
}
function getQueryString() {
var param = new URLSearchParams(location.search).get("authGroupSeq");
// console.log(param)
return param;
}
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
url: "<c:url value='/adm/menu/oprmng'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
function getGroupAuthUpdateData() {
var authGroupSeq = "authGroupSeq=" + getQueryString();
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
data: authGroupSeq,
url: "<c:url value='/admin/common/system/groupAuth/update/select'/>",
success: function (data) {
// console.log(data.authGroupSeq);
// console.log(data.authPolicyVal);
$('#custCode').val(data.custCode);
$('#authGroupSeq').val(data.authGroupSeq);
$('#updateGroupName').val(data.policyGroupName);
$('#updateGroupDesc').val(data.policyGroupDesc);
treeWrap(data.authPolicyVal, data.mainMenu, data.policyParent);
$('#list-user-group-box-ul-list').html(userList(data.userList))
}
})
};
function userList(data) {
// console.log(JSON.stringify(data));
var html = '';
data.forEach(function (e, i) {
var setUserSeq = e.userSeq;
var setUserIdName = e.userName;
var setUserId = e.userId;
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + setUserSeq + '"'
+ 'href="javascript:ListToDelete(' + setUserSeq + ')" >'
+ setUserIdName + ' (' + setUserId + ')' + '</a>'
+ '</div>'
+ ' </li>'
});
return html;
}
function userAdd(seq, val) {
var html = '';
var userlist = $('#list-user-group-box-ul-list').children('li').attr("id");
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + seq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + seq + '"'
+ 'href="javascript:ListToDelete(' + seq + ')" >'
+ val + '</a>'
+ '</div>'
+ ' </li>'
$('#userLi' + seq).remove();
$('#list-user-group-box-ul-list').prepend(html);
// $('#selectorUser').removeAttr(seq);
$('#selectorUser' + 'option[value=' + seq + ']').remove();
$('#selectorUser').niceSelect('update');
}
function ListToDelete(setUserSeq) {
var setVal = $('#userseq' + setUserSeq).text();
var html = '';
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + setUserSeq + '"'
+ 'href="javascript:DeleteToList(' + setUserSeq + ')" >'
+ setVal + '</a>'
+ '</div>'
+ ' </li>';
$('#userLi' + setUserSeq).remove();
$('#list-user-group-box-ul-delete').append(html);
}
function DeleteToList(setUserSeq) {
var setVal = $('#userseq' + setUserSeq).text();
var html = '';
html
+= ' <li class="select2-selection__choice" id="' + 'userLi' + setUserSeq + '">'
+ ' <div class="chk_box">'
+ ' <a id="' + 'userseq' + setUserSeq + '"'
+ 'href="javascript:ListToDelete(' + setUserSeq + ')" >'
+ setVal + '</a>'
+ '</div>'
+ ' </li>';
$('#userLi' + setUserSeq).remove();
$('#list-user-group-box-ul-list').append(html);
}
function treeWrap(authPolicyVal, mainMenu, policyParent) {
var treeData = [];
mainMenu.forEach(function (e, i) {
if (authPolicyVal.includes(e.authName)) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
} else {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: false
}
};
}
});
setTimeout(() => {
$('#tree_wrap').jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1");
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">권한그룹편집</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<input type="hidden" id="custCode">
<input type="hidden" id="authGroupSeq">
<tr>
<th class="tl">그룹명</th>
<td>
<div class="ipt_box">
<input type="text" id="updateGroupName" value="인텐트 조회권한" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">그룹설명</th>
<td>
<div class="ipt_box">
<input type="text" id="updateGroupDesc" value="인텐트를 조회만 할 수 있는 권한" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">소속사용자 <em class="red">*</em></th>
<td>
<%-- <div class="ipt_box listen">--%>
<%-- <input type="text" placeholder="유저명을 입력하세요" id="userSelBox" name="typeText">--%>
<%-- <div class="btn_wrap fl">--%>
<%-- <a href="#" id="btnSearchUser" class="btn">조회</a>--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="ipt_box listen type-flex">
<input type="text" placeholder="유저명을 입력하세요" id="userSelBox" name="typeText">
<a href="#" id="btnSearchUser" class="btn">조회</a>
</div>
<select id="selectorUser" class="wide">
<%-- <option value="ALL">분류 선택</option>--%>
<%-- <option value="major">대분류</option>--%>
<%-- <option value="minor">중분류</option>--%>
</select>
<div class="list-user-group-box">
<div class="list-user-group-item">
<div class="group-item-title">소속사용자</div>
<ul class="list-user-group-box-ul" id="list-user-group-box-ul-list">
</ul>
</div>
<!-- 2단레이아웃 필요시 list-user-group-item부터 추가-->
<div class="list-user-group-item">
<div class="group-item-title">소속제외</div>
<ul class="list-user-group-box-ul" id="list-user-group-box-ul-delete">
</ul>
</div>
</div>
</td>
</tr>
<tr>
<th class="tl">권한</th>
<td class="tl">
<div class="content tree tree-maxHeight type-chk">
<div class="tree_wrap" id="tree_wrap">
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<%-- <a href="#" class="btn basic grey">삭제</a>--%>
<a href="#" class="btn basic grey" id="btnDel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,324 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>그룹별권한</title>
</head>
<script>
$(document).ready(function () {
getOpr();
getServiceGroupQueryString();
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
);
function getServiceGroupQueryString() {
var param = new URLSearchParams(location.search).get("serviceGroup");
return param;
}
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/adm/menu/oprmng'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">그룹별권한 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">권한그룹편집</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">그룹명</th>
<td>
<div class="ipt_box">
<input type="text" value="인텐트 조회권한" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">그룹설명</th>
<td>
<div class="ipt_box">
<input type="text" value="인텐트를 조회만 할 수 있는 권한" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">소속사용자 <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<div class="select2-lib-ipt">
<select class="select-search" multiple="multiple"></select>
</div>
<a href="#" class="btn">사용자 추가</a>
<script src="assets/js/lib/select2.js"></script>
<script>
const data = [
{id: 1, text: '홍길동'},
{id: 2, text: '남길동'},
{id: 3, text: '재길동'},
{id: 4, text: '개길동'},
{id: 5, text: '김길동'},
{id: 6, text: '이길동'},
{id: 7, text: '임길동'}
];
$(".select-search").select2({
placeholder: "사용자를 검색",
data: data,
tags: true
// allowClear: true
});
</script>
</div>
<div class="list-user-group-box">
<div class="list-user-group-item">
<div class="group-item-title">소속타이틀(필요시 사용)</div>
<ul class="list-user-group-box-ul">
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk01" checked>
<label for="chk01">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk02" checked>
<label for="chk02">김길동</label>
</div>
</li>
</ul>
</div>
<!-- 2단레이아웃 필요시 list-user-group-item부터 추가-->
<!-- <div class="list-user-group-item">
<div class="group-item-title">소속타이틀(필요시 사용)</div>
<ul class="list-user-group-box-ul">
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk03" checked>
<label for="chk03">홍길동</label>
</div>
</li>
<li>
<div class="chk_box">
<input type="checkbox" name="checkbox" id="chk04" checked>
<label for="chk04">김길동</label>
</div>
</li>
</ul>
</div> -->
</div>
</td>
</tr>
<tr>
<th class="tl">권한</th>
<td class="tl">
<script>
$(document).ready(function () {
$('.tree_wrap').jstree({
"checkbox": {
"keep_selected_style": false
},
"plugins": ["checkbox"]
});
});
</script>
<div class="content tree tree-maxHeight type-chk">
<div class="tree_wrap">
<ul>
<li data-jstree='{ "opened" : true }'>root
<ul>
<li data-jstree='{ "opened" : true }'>주소BOT
<ul>
<li>지명 유사어 관리</li>
<li>빌딩 유사어 관리</li>
<li>유의어 전처리 관리</li>
<li>주소봇 멘트 관리</li>
<li>발화 건물유형 관리</li>
<li>주소 월별 업데이트</li>
<li>주소처리내역(녹취)</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>BOT 공통 관리
<ul>
<li data-jstree='{ "opened" : true }'>서비스별관리
<ul>
<li>요일/시간대별 멘트 관리</li>
<li>휴무일 관리</li>
<li>자연어 전처리 관리</li>
</ul>
</li>
<li>공통 코드 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>무인접수BOT
<ul>
<li>무인 접수 리스트</li>
<li>제품군 유의어 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>영상상담
<ul>
<li>컨텐츠등록 관리</li>
<li>영상상담</li>
<li>상담이력 조회</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey">취소</a>
<a href="#" class="btn basic">저장</a>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,304 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>정책별메뉴</title>
</head>
<script>
$(document).ready(function () {
getOpr();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
});
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/adm/menu/oprmng'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/policyMenu/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText1 = $('#codeText1').val();
json.codeText2 = $('#codeText2').val();
json.codeText3 = $('#codeText3').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "policyVal"},
{data: "policyName"},
{data: "menuName"},
{data: "menuSeq"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"l><"pull-right"f><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"ip>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 5,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
<body>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템 관리</a></li>
<li><a href="#">정책별 메뉴</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">정책별 메뉴 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="40%">
<col width="140px">
<col width="40%">
<%-- <col width="140px">--%>
<%-- <col width="25%">--%>
</colgroup>
<tbody>
<tr>
<th class="tl">시나리오그룹</th>
<td>
<div class="sel_box">
<select id="serviceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">정책코드</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText1" name="typeText1">
</div>
</td>
</tr>
<tr>
<th class="tl">정책명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText2" name="typeText2">
</div>
</td>
<th class="tl">메뉴명</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText3" name="typeText3">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">정책별 메뉴 리스트</h2>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객코드</th>
<th>고객사</th>
<th>서비스그룹</th>
<th>서비스그룹명</th>
<th>정책코드</th>
<th>정책명</th>
<th>메뉴명</th>
<th>메뉴번호</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,458 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>서비스그룹 관리</title>
</head>
<script>
$(document).ready(function () {
$('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
$('.tbl-card').find('.tbl-card-li .title-connect').each(function () {
const submitVal = $(this).val();
if (submitVal.length > 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text(submitVal);
}
$(this).on('keyup', function () {
const thisVal = $(this).val();
if (thisVal.length === 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹');
} else {
$(this).parents('.tbl-card-li').find('.title-connected').text(thisVal);
}
})
});
getServiceGroupQueryString();
getServiceGroupViewData();
});
function getServiceGroupQueryString() {
var param = new URLSearchParams(location.search).get("serviceGroup");
// console.log(param);
return param;
}
function getServiceGroupViewData() {
if (getServiceGroupQueryString() == null) {
//유저어드민
setUrl = "<c:url value='/admin/common/system/serviceGroup/view'/>";
} else {
//시스템어드민
setUrl = "<c:url value='/admin/common/system/serviceGroup/view'/>" + "?serviceGroup=" + getServiceGroupQueryString();
}
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: setUrl,
success: function (data) {
// console.log(JSON.stringify(data));
var html = '';
// for (var i=0; i < data.subServiceGroupRes.length; i++) {
//
// }
$('#mainServiceGroupName').val(data.mainServiceGroup);
$('#mainServiceGroup').val(data.mainServiceGroupName);
$('#mainUseYn').val(data.mainUseYn);
$('#mainOprMngCode').val(data.mainOprMngCode);
data.subServiceGroupRes.forEach(function (e, i) {
html += '<li class="tbl-card-li" id="tbl-card-li' + i + '">'
+ '<div class="tbl-card-li-inner">'
+ '<div class="tbl-card-title" id="tbl-card-title' + i + '">'
+ ' <div class="fl title-connected">' + e.subServiceGroup + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
+ ' <div class="btn_wrap fr">'
+ ' <a href="#" class="btn grey">-삭제</a>'
+ ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width = "150px" >'
+ ' <col width = "auto" >'
+ ' </colgroup>'
+ ' <tbody>'
+ ' <tr>'
+ ' <th class="tl">시나리오 그룹명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="subServiceGroup' + i + '" value="' + e.subServiceGroup + '" name=""'
+ ' class="title-connect" readonly>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">시나리오 그룹코드</th>'
+ ' <td>'
+ ' <div class="ipt_box type-flex">'
+ ' <input type="text" id="subServiceGroupName' + i + '" value="' + e.subOprMngCode + '" name="" class="" readonly>'
+ ' </div>'
+ ' <div class="ipt_box ">'
+ ' <div class="create-code-list">'
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">시나리오그룹 설명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" value="' + e.subServiceGroupDesc + '" name="" class="" readonly>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">사용여부 <em class="red">*</em></th>'
+ ' <td>'
+ ' <div class="sel_box">'
+ ' <select class="wide">'
+ ' <option value="" selected>' + e.subUseYn + '</option>'
+ ' </select>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">권한부여</th>'
+ ' <td class="tl">'
+ ' <div class="content tree tree-maxHeight type-chk">'
+ ' <div class="tree_wrap">'
+ ' <ul>'
+ ' <li data-jstree="{ "opened" : true }">root'
+ ' <ul>'
+ ' <li data-jstree="{ "opened" : true }">주소BOT'
+ ' <ul>'
+ ' <li>지명 유사어 관리</li>'
+ ' <li>빌딩 유사어 관리</li>'
+ ' <li>유의어 전처리 관리</li>'
+ ' <li>주소봇 멘트 관리</li>'
+ ' <li>발화 건물유형 관리</li>'
+ ' <li>주소 월별 업데이트</li>'
+ ' <li>주소처리내역(녹취)</li>'
+ ' </ul>'
+ ' </li>'
+ ' <li data-jstree="{ "opened" : true }">BOT 공통 관리'
+ ' <ul>'
+ ' <li data-jstree="{ "opened" : true }">서비스별관리'
+ ' <ul>'
+ ' <li>요일/시간대별 멘트 관리</li>'
+ ' <li>휴무일 관리</li>'
+ ' <li>자연어 전처리 관리</li>'
+ ' </ul>'
+ ' </li>'
+ ' <li>공통 코드 관리</li>'
+ ' </ul>'
+ ' </li>'
+ ' <li data-jstree="{ "opened" : true }">무인접수BOT'
+ ' <ul>'
+ ' <li>무인 접수 리스트</li>'
+ ' <li>제품군 유의어 관리</li>'
+ ' </ul>'
+ ' </li>'
+ ' <li data-jstree="{ "opened" : true }">영상상담'
+ ' <ul>'
+ ' <li>컨텐츠등록 관리</li>'
+ ' <li>영상상담</li>'
+ ' <li>상담이력 조회</li>'
+ ' </ul>'
+ ' </li>'
+ ' </ul>'
+ ' </li>'
+ ' </ul>'
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ ' </li>'
$('#tbl-card').html(html);
$('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
});
// $('#mainServiceGroupName').set(data.mainServiceGroup).val();
// $('#mainServiceGroup').set(data.mainServiceGroupName).val();
// $('#useYn').set(data.useYn).val();
}
})
}
</script>
<header id="header">
</header>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<h1>ICOMSYS ADMIN</h1>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">서비스그룹 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스 그룹관리</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">서비스그룹</th>
<td>
<div class="ipt_box">
<%-- <input type="text" id="mainServiceGroupName" value="mainServiceGroup" name="" class="" readonly>--%>
<input type="text" id="mainServiceGroupName" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">서비스코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="mainServiceGroup" value="codecode" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">시나리오코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="mainOprMngCode" value="codecode" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부</th>
<td>
<input type="text" id="mainUseYn" value="Y" name="" class="" readonly>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">시나리오 그룹 <em class="red">*</em></h2>
</div>
<div class="btn_wrap fr">
<a href="#" class="btn">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card" id="tbl-card">
<li class="tbl-card-li">
<div class="tbl-card-li-inner">
<div class="tbl-card-title">
<div class="fl title-connected">새로운 시나리오 그룹</div>
</div>
<div class="tbl-card-data">
<div class="box-title">
<div class="btn_wrap fr">
<a href="#" class="btn grey">-삭제</a>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">시나리오 그룹명</th>
<td>
<div class="ipt_box">
<input type="text" id="subServiceGroup" value="시나리오그룹 1" name=""
class="title-connect">
</div>
</td>
</tr>
<tr>
<th class="tl">시나리오 그룹코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="subServiceGroupName" value="UPLUS_RCP_DAISO"
name="" class="">
<a href="#" class="btn grey">중복확인</a>
</div>
<div class="ipt_box ">
<div class="create-code-list">
<spna class="create-code">
UPLUS_RCP_DAISO
</spna>
</div>
</div>
</td>
</tr>
<tr>
<th class="tl">시나리오그룹 설명</th>
<td>
<div class="ipt_box">
<input type="text" value="입력된 설명입니다..." name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide">
<option value="" selected>Y</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">권한부여</th>
<td class="tl">
<script>
$(document).ready(function () {
$('.tree_wrap').jstree({
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
});
</script>
<div class="content tree tree-maxHeight type-chk">
<div class="tree_wrap">
<ul>
<li data-jstree='{ "opened" : true }'>root
<ul>
<li data-jstree='{ "opened" : true }'>주소BOT
<ul>
<li>지명 유사어 관리</li>
<li>빌딩 유사어 관리</li>
<li>유의어 전처리 관리</li>
<li>주소봇 멘트 관리</li>
<li>발화 건물유형 관리</li>
<li>주소 월별 업데이트</li>
<li>주소처리내역(녹취)</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>BOT 공통 관리
<ul>
<li data-jstree='{ "opened" : true }'>서비스별관리
<ul>
<li>요일/시간대별 멘트 관리</li>
<li>휴무일 관리</li>
<li>자연어 전처리 관리</li>
</ul>
</li>
<li>공통 코드 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>무인접수BOT
<ul>
<li>무인 접수 리스트</li>
<li>제품군 유의어 관리</li>
</ul>
</li>
<li data-jstree='{ "opened" : true }'>영상상담
<ul>
<li>컨텐츠등록 관리</li>
<li>영상상담</li>
<li>상담이력 조회</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey">취소</a>
<a href="#" class="btn basic">저장</a>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,328 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>서비스그룹 관리List</title>
</head>
<script>
$(document).ready(function () {
getMainOprSelectBox();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
$('#btnRegModal').on('click', function () {
fnServiceGroupInsertBtn();
});
}
);
function fnServiceGroupInsertBtn(){
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/insert";
document.location.href = "<c:url value='/admin/common/system/serviceGroup/insert'/>";
};
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/adm/menu/oprmng'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
function getMainOprSelectBox() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/adm/menu/main/oprmng'/>",
success: function (data) {
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
});
}
})
};
function viewPage(rowData) {
// console.log(rowData.serviceGroup);
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + rowData.serviceGroup;
document.location.href = "<c:url value='/admin/common/system/serviceGroup/view'/>" + "?serviceGroup=" + rowData.serviceGroup;
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/serviceGroup/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10;
json.serviceGroup = $("#serviceGroup option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
{data: "serviceGroup"},
{data: "serviceGroupName"},
{data: "serviceType"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
render: function (data) {
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
// console.log(data)
if (data == "M") {
return '<a style="display: block;text-align: center;">' + '메인' + '</a>';
} else if (data == "S") {
return '<a style="display: block;text-align: center;">' + '서브' + '</a>';
} else {
return '<a style="display: block;text-align: center;">' + '에러' + '</a>';
}
}
},
{
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<h1>대시보드</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템 관리</a></li>
<li><a href="#">서비스그룹 관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스그룹 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="40%">
<%-- <col width="140px">--%>
<%-- <col width="25%">--%>
</colgroup>
<tbody>
<tr>
<th class="tl">서비스그룹</th>
<td>
<div class="sel_box">
<select id="serviceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스그룹 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<%-- <a href="#" rel="reg_modal" class="btn modalLoad" id="btnRegModal">추가</a>--%>
<%-- <a href="#" class="btn line modalLoad" id="btnRegModal">신규등록</a>--%>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>custCode</th>
<th>고객사</th>
<th>서비스그룹</th>
<th>서비스그룹이름</th>
<th>서비스그룹타입</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,750 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>서비스그룹 관리</title>
</head>
<script>
$(document).ready(function () {
$('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
$('.tbl-card').find('.tbl-card-li .title-connect').each(function () {
const submitVal = $(this).val();
if (submitVal.length > 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text(submitVal);
}
$(this).on('keyup', function () {
const thisVal = $(this).val();
if (thisVal.length === 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹');
} else {
$(this).parents('.tbl-card-li').find('.title-connected').text(thisVal);
}
})
});
getServiceGroupQueryString();
getServiceGroupViewData();
$('#btnRegModal').on('click', function () {
// console.log("생성클릭")
newTreeWrap();
// $('#serviceInfo').reset();
});
// 신규 시나리오그룹 저장
$('#btnSaveCust').on('click', function () {
// console.log("저장클릭")
fncCreateServiceInfo();
});
//중복확인
$('#btnDoubleCheck').on('click', function () {
// console.log("저장클릭")
fncNewDoubleCheck();
});
// $('#newServiceGroup').keydown(function (e) {
$('#newServiceGroup').keyup(function (e) {
// newOprCreate(e.keyCode)
});
});
function fncNewDoubleCheck() {
var custCode = $("#custCode").val();
var newServiceGroup = $("#newServiceGroup").val();
var checkJson = {};
checkJson.custCode = custCode;
checkJson.subServiceGroup = newServiceGroup;
// console.log(newServiceGroup)
if (newServiceGroup.length < 1) {
// $.utils.success("사용가능합니다");
$.utils.warning("1글자이상 입력해주세요.");
// alert("1글자이상 입력해주세요.");
return;
}
if (newServiceGroup.length > 20) {
// alert("20글자이하로 입력해주세요.");
$.utils.warning("20글자이하로 입력해주세요.");
return;
}
var regType = /^[A-Za-z0-9]*$/;
if (!regType.test(newServiceGroup)) {
$.utils.warning('영문, 숫자만입력가능합니다.');
return;
} else {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/serviceGroup/doubleCheck'/>",
data: JSON.stringify(checkJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
$('#newDoubleCheck').val(data.responseText);
var yn = data.responseText;
if (yn === "Y") {
$.utils.success("사용가능합니다");
// $.utils.warning("1글자이상 입력해주세요.");
return;
} else {
$.utils.warning("중복된코드입니다.");
return;
}
} else {
}
})
;
}
}
function newOprCreate(e) {
var expression = RegExp(/[^a-zA-Z]/);
var text = String.fromCharCode(e);
// console.log("key " + e);
// console.log("key " + text);
var cust = $("#custCode").val();
var sol = "_RCP_";
if (e === 8) {
// setTimeout(() => {
var outText = cust + sol + $('#newServiceGroup').val();
$('#newOprDiv').html('<input type="text" id="newOprMngCode" value="' + outText.toUpperCase() + '" name="" class=" title-connect" readonly>')
// }, "100")
} else {
var temp = $('#newOprMngCode').val().replace(cust + sol, "");
$('#newOprMngCode').val(cust + sol + temp + text);
}
}
function fncCreateServiceInfo() {
var newServiceGroup = $("#newServiceGroup").val();
var newServiceGroupName = $("#newServiceGroupName").val();
var newServiceGroupDesc = $("#newServiceGroupDesc").val();
var newUseYn = $("#newUseYn").val();
var mainServiceGroup = $("#mainServiceGroup").val();
var custCode = $("#custCode").val();
var newDoubleCheck = $("#newDoubleCheck").val();
// console.log(newServiceGroup);
// console.log(newServiceGroupDesc);
// console.log(newUseYn);
var selectedElmsIds = [];
var selectedElms = $("#newTreeWrap").jstree("get_selected", true);
$.each(selectedElms, function () {
selectedElmsIds.push(this.id);
});
if (newDoubleCheck == 'N') {
// alert("중복확인을해주세요");
// $.utils.success("사용가능합니다");
$.utils.warning("중복확인을해주세요.");
return;
}
if (newServiceGroupName.length < 1) {
$.utils.warning("시나리오명을 입력해주세요");
return;
}
var insertJson = {};
insertJson.custCode = custCode;
insertJson.mainServiceGroup = mainServiceGroup;
insertJson.subServiceGroup = newServiceGroup;
insertJson.subServiceGroupName = newServiceGroupName;
insertJson.subServiceGroupDesc = newServiceGroupDesc;
insertJson.subUseYn = newUseYn;
insertJson.subPolicyVal = selectedElmsIds;
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
url: "<c:url value='/admin/common/system/serviceGroup/insert'/>",
data: JSON.stringify(insertJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + mainServiceGroup;
document.location.href = "<c:url value='/admin/common/system/serviceGroup/view'/>" + "?serviceGroup=" + mainServiceGroup;
} else if (data.status == 405){
$.utils.warning("NLP연결에 실패했습니다.");
}
else {
$.utils.warning("오류가 발생했습니다.");
}
})
;
}
function getServiceGroupQueryString() {
var param = new URLSearchParams(location.search).get("serviceGroup");
return param;
}
//https://stackoverflow.com/questions/18268306/how-to-get-checked-nodes-in-jquery-jstree
function testUpdate(idx) {
var subServiceGroup = $("#subServiceGroup" + idx).val();
var subServiceGroupDesc = $("#subServiceGroupDesc" + idx).val();
var subServiceGroupName = $("#subServiceGroupName" + idx).val();
var subUseYn = $("#subUseYn" + idx).val();
var mainServiceGroup = $("#mainServiceGroup").val();
var custCode = $("#custCode").val();
var selectedElmsIds = [];
var selectedElms = $("#treeWrap" + idx).jstree("get_selected", true);
$.each(selectedElms, function () {
if (idx.toString().length == '1') {
selectedElmsIds.push(this.id.slice(0, this.id.length - 1));
}
if (idx.toString().length == '2') {
selectedElmsIds.push(this.id.slice(0, this.id.length - 2));
}
});
var updateJson = {};
updateJson.custCode = custCode;
updateJson.mainServiceGroup = mainServiceGroup;
updateJson.subServiceGroup = subServiceGroup;
updateJson.subServiceGroupDesc = subServiceGroupDesc;
updateJson.subServiceGroupName = subServiceGroupName;
updateJson.subUseYn = subUseYn;
updateJson.subPolicyVal = selectedElmsIds;
// console.log("jsondata - " + JSON.stringify(updateJson));
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
url: "<c:url value='/admin/common/system/serviceGroup/update'/>",
data: JSON.stringify(updateJson),
})
.complete(function (data) {
// console.log(JSON.stringify(data));
// console.log(data.status);
if (data.status == 200) {
// document.location.href = "/BotMain_VM/admin/common/system/serviceGroup/view" + "?serviceGroup=" + mainServiceGroup;
document.location.href = "<c:url value='/admin/common/system/serviceGroup/view'/>" + "?serviceGroup=" + mainServiceGroup;
} else if (data.status == 405){
$.utils.warning("NLP연결에 실패했습니다.");
}
else {
$.utils.warning("오류가 발생했습니다.");
}
})
;
}
function getServiceGroupViewData() {
if (getServiceGroupQueryString() == null) {
//유저어드민
setUrl = "<c:url value='/admin/common/system/serviceGroup/select'/>";
} else {
//시스템어드민
setUrl = "<c:url value='/admin/common/system/serviceGroup/select'/>" + "?serviceGroup=" + getServiceGroupQueryString();
}
$.ajax({
type: "GET",
async: false,
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: setUrl,
success: function (data) {
// console.log(JSON.stringify(data));
var html = '';
$('#mainServiceGroup').val(data.mainServiceGroup);
$('#mainServiceGroupName').val(data.mainServiceGroupName);
$('#mainUseYn').val(data.mainUseYn);
$('#mainOprMngCode').val(data.mainOprMngCode);
$('#custCode').val(data.custCode);
var mainMenu = data.mainMenu;
var mainPolicyVal = data.mainPolicyVal;
var policyParent = data.policyParent;
// mainMenu.push(data.mainMenu);
// mainPolicyVal.push(data.mainPolicyVal);
data.subService.forEach(function (e, i) {
// console.log(JSON.stringify(e));
html
+= '<li class="tbl-card-li" id="tbl-card-li' + i + '">'
+ '<div class="tbl-card-li-inner">'
+ '<div class="tbl-card-title" id="tbl-card-title' + i + '">'
+ ' <div class="fl title-connected">' + e.subServiceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
+ '<div class="btn_wrap fr">'
+ '<a href="javascript:testUpdate(' + i + ')" class="btn grey">저장</a>'
+ '</div>'
+ '</div>'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width = "160px" >'
+ ' <col width = "auto" >'
+ ' </colgroup>'
+ ' <tbody>'
+ ' <tr>'
+ ' <th class="tl">시나리오 그룹명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="subServiceGroupName' + i + '" value="' + e.subServiceGroupName + '" name=""'
+ ' class="title-connect" >'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">서비스코드</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="subServiceGroup' + i + '" value="' + e.subServiceGroup + '" name=""'
+ ' class="title-connect" readonly>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">시나리오 그룹코드</th>'
+ ' <td>'
+ ' <div class="ipt_box type-flex">'
+ ' <input type="text" id="subOprMngCode' + i + '" value="' + e.subOprMngCode + '" name="" class="" readonly>'
+ ' </div>'
+ ' <div class="ipt_box ">'
+ ' <div class="create-code-list">'
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">시나리오그룹 설명</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="subServiceGroupDesc' + i + '" value="' + e.subServiceGroupDesc + '" name="" class="">'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">사용여부</th>'
+ ' <td>'
+ ' <div class="sel_box">'
+ ' <select class="wide" id="subUseYn' + i + '">'
if (e.subUseYn == 'Y') {
html += ' <option value="Y" selected>Y</option>'
+ ' <option value="N">N</option>'
} else if (e.subUseYn == 'N') {
html += ' <option value="N" selected>N</option>'
+ ' <option value="Y">Y</option>'
}
html += ' </select>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' <tr>'
+ ' <th class="tl">권한부여</th>'
+ ' <td class="tl">'
+ ' <div class="content tree tree-maxHeight type-chk">'
+ ' <div id="treeWrap' + i + '" class="tree_wrap' + i + '"> '
+ ' </div>'
+ ' </div>'
+ ' </td>'
+ ' </tr>'
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ ' </li>';
$('.tbl-card').html(html);
// $('.tree_wrap').html(treeWrap(data.mainMenu));
$('.tbl-card-li').each(function () {
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
treeWrap(e, mainMenu, mainPolicyVal, policyParent, i);
});
}
})
}
function treeWrap(subService, mainMenu, mainPolicyVal, policyParent, idx) {
var treeData = [];
mainMenu.forEach(function (e, i) {
var setId = e.authName + idx;
if (policyParent[e.authName] == '#') {
var setParent = policyParent[e.authName];
} else {
var setParent = policyParent[e.authName] + idx;
}
if($('#mainServiceGroup').val() == subService.subServiceGroup){
if (subService.subPolicyVal.includes(e.authName)) {
treeData[i] = {
id: setId,
parent: setParent,
text: e.menuName,
state: {
opened: true
,selected: true
,disabled: true
}
};
} else {
treeData[i] = {
id: setId,
parent: setParent,
text: e.menuName,
state: {
opened: false
,selected: false
,disabled: true
}
};
}
}
else {
if (subService.subPolicyVal.includes(e.authName)) {
treeData[i] = {
id: setId,
parent: setParent,
text: e.menuName,
state: {
opened: true
,selected: true
}
};
} else {
treeData[i] = {
id: setId,
parent: setParent,
text: e.menuName,
state: {
opened: false
,selected: false
}
};
}
}
});
setTimeout(() => {
$('#treeWrap' + idx).jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1")
}
;
function newTreeWrap() {
var treeData = [];
$("#newServiceGroup").val("");
$("#newServiceGroupName").val("");
$("#newServiceGroupDesc").val("");
$("#newUseYn").val("Y");
$("#newDoubleCheck").val("N");
$("#newOprMngCode").val("");
if (getServiceGroupQueryString() == null) {
//유저어드민
setUrl = "<c:url value='/admin/common/system/serviceGroup/select'/>";
} else {
//시스템어드민
setUrl = "<c:url value='/admin/common/system/serviceGroup/select'/>" + "?serviceGroup=" + getServiceGroupQueryString();
}
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
async: false,
datatype: "JSON",
url: setUrl,
success: function (data) {
// console.log(JSON.stringify(data));
var html = '';
$('#mainServiceGroup').val(data.mainServiceGroup);
$('#mainServiceGroupName').val(data.mainServiceGroupName);
$('#mainUseYn').val(data.mainUseYn);
$('#mainOprMngCode').val(data.mainOprMngCode);
$('#custCode').val(data.custCode);
var mainMenu = data.mainMenu;
var mainPolicyVal = data.mainPolicyVal;
var policyParent = data.policyParent;
// mainMenu.push(data.mainMenu);
// mainPolicyVal.push(data.mainPolicyVal);
mainMenu.forEach(function (e, i) {
treeData[i] = {
id: e.authName,
parent: policyParent[e.authName],
text: e.menuName,
state: {
opened: false,
selected: true
}
};
});
setTimeout(() => {
$('#newTreeWrap').jstree({
'core': {
'data': treeData
},
"checkbox": {
"keep_selected_style": false
, "three_state": false
},
"plugins": ["checkbox"]
});
}, "1")
}
});
}
;
</script>
<header id="header">
</header>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<h1>ICOMSYS ADMIN</h1>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">서비스그룹 관리</a></li>
</ul>
</div>
<!-- TODO: 래부터 신규 컨텐츠 마크업 입니다. -->
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">서비스 그룹관리</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<input type="hidden" id="custCode">
<tr>
<th class="tl">서비스그룹명</th>
<td>
<div class="ipt_box">
<%-- <input type="text" id="mainServiceGroupName" value="mainServiceGroup" name="" class="" readonly>--%>
<input type="text" id="mainServiceGroupName" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">서비스코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="mainServiceGroup" value="codecode" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">시나리오코드</th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="mainOprMngCode" value="codecode" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부</th>
<td>
<input type="text" id="mainUseYn" value="Y" name="" class="" readonly>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">시나리오 그룹 <em class="red">*</em></h2>
</div>
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>시나리오그룹 신규등록</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<tr>
<th class="tl">시나리오 그룹명<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="text" id="newServiceGroupName" value="" name="" class="title-connect">
</div>
</td>
</tr>
<tr>
<th class="tl">서비스코드<em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="newServiceGroup" value="" name="" class="">
<a href="#" class="btn grey" id="btnDoubleCheck">중복확인</a>
</div>
<div class="ipt_box ">
<div class="create-code-list">
<input type="hidden" id="newDoubleCheck" value="N" name="" class="">
</div>
</div>
</td>
</tr>
<%-- <tr>--%>
<%-- <th class="tl">시나리오 그룹코드</th>--%>
<%-- <td>--%>
<%-- <div class="ipt_box" id="newOprDiv">--%>
<%-- <input type="text" id="newOprMngCode" value="" name=""--%>
<%-- class=" title-connect" readonly>--%>
<%-- </div>--%>
<%-- </td>--%>
<%-- </tr>--%>
<tr>
<th class="tl">시나리오그룹 설명<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="text" id="newServiceGroupDesc" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newUseYn">
<option value="Y" selected>Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">권한부여<em class="red">*</em></th>
<td class="tl">
<div class="content tree tree-maxHeight type-chk">
<div id="newTreeWrap" class="tree_wrap">
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,383 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<script>
$(document).ready(function () {
// getOprSelect();
getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
);
function getOprSelect() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>" + "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
};
function getCust() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/cust/select'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.custCode + '">' + e.custName + '</option>';
});
}
})
$('#selectCust').html(html);
$('#selectCust').niceSelect('update');
}
function viewPage(rowData) {
// console.log(rowData.userSeq);
// document.location.href = "/BotMain_VM/admin/common/system/user/view" + "?userSeq=" + rowData.userSeq;
document.location.href = "<c:url value='/admin/common/system/user/view'/>" + "?userSeq=" + rowData.userSeq;
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/user/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
json.custCode = $("#selectCust option:selected").val();
json.codeType = $("#codeType option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
// {data: "serviceGroup"},
// {data: "serviceGroupName"},
{data: "userSeq"},
{data: "userId"},
{data: "userName"},
{data: "eMail"},
{data: "mobileNo"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
visible: false,
searchable: false,
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data) {
if(data == null)
data = '';
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
// {
// targets: 8,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
// {
// targets: 9,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
{
targets: 8,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
function fnInsertBtn() {
// document.location.href = "/BotMain_VM/admin/common/system/user/insert";
document.location.href = "<c:url value='/admin/common/system/user/insert'/>";
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">사용자관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">사용자 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사</th>
<td>
<div class="sel_box">
<select id="selectCust" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">분류</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="userId">사용자아이디</option>
<option value="userName">사용자이름</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12"> 사용자 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<%-- <a href="#" rel="reg_modal" class="btn modalLoad" id="btnRegModal">추가</a>--%>
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객사코드</th>
<th>고객사</th>
<%-- <th>서비스그룹코드</th>--%>
<%-- <th>서비스그룹</th>--%>
<th>사용자시퀀스</th>
<th>사용자아이디</th>
<th>사용자이름</th>
<th>eMail</th>
<th>전화번호</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,379 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>운영자관리</title>
</head>
<script>
$(document).ready(function () {
getCust();
PagingDataTable();
$('#listTable tbody').on('dblclick', 'tr', function () {
var data = $('#listTable').DataTable().row(this).data();
viewPage(data)
});
$('#btnSearchOpr').on('click', function () {
fnCustSearchBtn();
});
$('#btnRegModal').on('click', function () {
fnInsertBtn();
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
}
);
function getOpr() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>" + "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#serviceGroup').html(html);
$('#serviceGroup').niceSelect('update');
};
function getCust() {
var html = '<option value="' + "ALL" + '">' + "전체" + '</option>';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/cust/select'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html += '<option value="' + e.custCode + '">' + e.custName + '</option>';
});
}
})
$('#selectCust').html(html);
$('#selectCust').niceSelect('update');
}
function viewPage(rowData) {
// console.log(rowData.userSeq);
document.location.href = "<c:url value='/admin/common/system/userAdmin/view'/>" + "?userSeq=" + rowData.userSeq;
// document.location.href = '/admin/common/system/cust/view';
}
var PagingDataTable = function () {
// console.log("log - " + JSON.stringify({"page": "0", "size": "10"}));
var paging = JSON.stringify({'page': 0, 'size': 10})
$('#listTable').DataTable(
{
ajax: {
url: "<c:url value='/admin/common/system/userAdmin/list'/>",
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "JSON",
async: false,
data: function (data) {
var json = {};
if (data) {
json.page = data.start / data.length;
json.size = 10
json.custCode = $("#selectCust option:selected").val();
json.codeType = $("#codeType option:selected").val();
json.codeText = $('#codeText').val();
} else {
json = JSON.stringify({'page': 0, 'size': 10});
}
return JSON.stringify(json);
}
,
dataFilter: function (data) {
var jsons = jQuery.parseJSON(data);
// console.log(JSON.stringify(data));
var json = {};
json.recordsTotal = jsons.getTotal;
json.recordsFiltered = jsons.getTotal;
json.data = jsons.getList;
// console.log(json);
return JSON.stringify(json);
}
},
columns: [
{data: "custCode"},
{data: "custName"},
// {data: "serviceGroup"},
// {data: "serviceGroupName"},
{data: "userSeq"},
{data: "userId"},
{data: "userName"},
{data: "eMail"},
{data: "mobileNo"},
{data: "useYn"},
{data: "registDate"}
],
order: [0, "asc"],
scrollX: false,
scrollY: false,
autoWidth: false,
searching: false,
bProcessing: false,
sProcessing: false,
bServerSide: true,
sDom: '<"row view-filter"<"col-sm-12"<"pull-left"><"pull-right"><"clearfix">>>t<"row view-pager"<"col-sm-12"<"text-center"pi>>>',
// pagingType: "first_last_numbers"
columnDefs: [
{
targets: 0,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
// console.log(data)
return '<a style="display: block;text-align: center;" onclick="click()">' + data + '</a>';
},
},
{
targets: 1,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 2,
visible: false,
searchable: false,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 3,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 4,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
visible: false,
searchable: false,
targets: 5,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 6,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
{
targets: 7,
orderable: false,
render: function (data) {
return '<a style="display: block;text-align: center;">' + data + '</a>';
}
},
// {
// targets: 8,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
// {
// targets: 9,
// render: function (data) {
// return '<a style="display: block;text-align: center;">' + data + '</a>';
// }
// },
{
targets: 8,
orderable: false,
render: function (data, type, full, meta) {
// var arr = data.slice();
// return '<a style="display: block;text-align: center;">' + arr[0] + "-" + arr[1] + "-" + arr[2] + '</a>';
return '<a style="display: block;text-align: center;">' + $.utils.sliceDateTimeFormat(data) + '</a>';
}
}
]
}
)
};
function fnCustSearchBtn() {
$('#listTable').DataTable().ajax.reload();
};
function fnInsertBtn() {
document.location.href = "<c:url value='/admin/common/system/userAdmin/insert'/>";
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="system_management">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">운영자관리</a></li>
</ul>
</div>
<div class="sub_cont menu06_01_03">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">운영자 조회</h2>
</div>
<div class="fr">
<div class="btn_wrap fl">
<a href="#" id="btnSearchOpr" class="btn">조회</a>
</div>
</div>
</div>
<div class="tbl">
<table class="search block">
<colgroup>
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
<col width="140px">
<col width="25%">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사</th>
<td>
<div class="sel_box">
<select id="selectCust" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
<th class="tl">분류</th>
<td>
<div class="sel_box">
<select id="codeType" class="wide">
<option value="ALL">분류 선택</option>
<option value="userId">운영자아이디</option>
<option value="userName">움영자이름</option>
</select>
</div>
</td>
<th class="tl">검색어</th>
<td>
<div class="ipt_box listen">
<input type="text" placeholder="검색어를 입력하세요" id="codeText" name="typeText">
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12"> 운영자 리스트</h2>
</div>
<div class="btn_wrap fr">
<%-- <a href="#" class="btn grey" id="btnDelCust">삭제</a>--%>
<%-- <a href="#" rel="reg_modal" class="btn modalLoad" id="btnRegModal">추가</a>--%>
<a href="#" class="btn line modalLoad" id="btnRegModal">등록</a>
</div>
</div>
<div class="tbl">
<form id="custListForm">
<table id="listTable" class="">
<colgroup>
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
<col width="auto">
</colgroup>
<thead>
<tr>
<th>고객사코드</th>
<th>고객사</th>
<%-- <th>서비스그룹코드</th>--%>
<%-- <th>서비스그룹</th>--%>
<th>운영자시퀀스</th>
<th>운영자아이디</th>
<th>운영자이름</th>
<th>eMail</th>
<th>전화번호</th>
<th>사용여부</th>
<th>생성일</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
</div>
</section>
</body>
</html>

@ -1,734 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<script>
$(document).ready(function () {
getCust();
getOpr();
authChoice($('#newServiceGroup option:selected').val());
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//선택 이벤트
$('#newServiceGroup').change(function () {
authChoice($(this).val())
});
// $('.tbl-card-li').each(function () {
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
//선택 이벤트
$('#newCustUser').change(function () {
SelectServiceGroupUpdate($(this).val())
});
//서비스그룹 추가 -> 적용버튼
$('#btnSaveCust').on('click', function () {
addServiceGroup();
// $('.tbl-card-li').each(function () {
// // console.log("???");
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
// console.log($('.tbl-card').find('.tbl-card-li').last());
// $('.tbl-card').find('.tbl-card-li').last()
$('.tbl-card').find('.tbl-card-title').last()
.on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on')
}
);
});
$('#btnSave').on('click', function () {
// console.log("저장버튼");
saveBtn();
});
$('#btnDel').on('click', function () {
// console.log("삭제버튼");
delBtn();
});
$('#doubleCheckBtn').on('click', function () {
// console.log("중복확인버튼");
userDoubleCheck();
});
$('#newUserPass').keyup(function (e) {
newUserPassCheck(e.keyCode)
});
$('#newUserPassChk').keyup(function (e) {
newUserDoublePassCheck(e.keyCode)
});
$('.tbl-card').find('.tbl-card-li .title-connect').each(function () {
const submitVal = $(this).val();
if (submitVal.length > 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text(submitVal);
}
$(this).on('keyup', function () {
const thisVal = $(this).val();
if (thisVal.length === 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹');
} else {
$(this).parents('.tbl-card-li').find('.title-connected').text(thisVal);
}
})
});
}
);
function listgo() {
// document.location.href = "/BotMain_VM/admin/common/system/user/manage.do";
document.location.href = "<c:url value='/admin/common/system/userAdmin/manage.do'/>";
}
function delBtn() {
listgo();
}
function saveBtn() {
var mainOpr = $('#mainOpr option:selected').val()
var userId = $('#newUserId').val();
var pas = $('#newUserPass').val();
var pasChk = $('#newUserPassChk').val();
var userName = $('#newUserName').val();
var useYn = $('#newUseYn option:selected').val();
var userMail = $('#newUserMail').val();
var userMobile = $('#newUserMobile').val();
var userRoleVal = $('#newUserRoleVal').val();
var json = {};
var addServiceAuthList = new Array();
// $("#list-user-group-box-ul-list").children('li').each(function (i,e) {
// var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq","")
// userList.push(ids)
// // console.log("3 = " + ids)
// })
$(".tbl-card").children('li').each(function (i, e) {
var addServiceAuth = {};
var ids = $(this).find("input:eq(0)").attr("id").replaceAll("addServiceGroup", "");
var authList = new Array();
$('#newAuthChk' + ids).find('li').each(function (i, e) {
var chkid = $(this).find('input').attr('id').replaceAll("chk", "")
if ($(this).find('input').is(':checked')) {
authList.push(chkid);
}
});
addServiceAuth.addService = ids;
addServiceAuth.authList = authList;
addServiceAuthList.push(addServiceAuth);
})
json.lastUseServiceGroup = mainOpr;
json.userId = userId;
json.pass = pas;
json.userName = userName
json.useYn = useYn;
json.userMail = userMail;
json.userMobile = userMobile;
json.roleVal = userRoleVal;
json.addServiceAuthList = addServiceAuthList;
// console.log(JSON.stringify(json));
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{10,}$/;
if (pas.length < 10 || pas.length > 20) {
$.utils.warning("10자리 ~ 20자리 이내로 입력해주세요.");
return false;
}
if (pas.search(/\s/) != -1) {
$.utils.warning("비밀번호는 공백 없이 입력해주세요.");
return false;
}
if (false === reg.test(pas)) {
$.utils.warning('비밀번호는 8자 이상이어야 하며, 숫자/문자/특수문자를 모두 포함해야 합니다.');
return false;
}
if ($('#newUserIdYn').val() === 'N') {
// $.utils.success("사용가능합니다");
$.utils.warning("중복확인을 해주세요.");
return;
}
if ($('#newUserPassDoubleChkVal').val() === 'N') {
$.utils.warning("비밀번호가 일치하지 않습니다.");
return;
}
if (json.addServiceAuthList.length < 1) {
$.utils.warning("서비스그룹을 추가해주세요.");
return;
}
//밸류체크는안하는걸로,
json.addServiceAuthList.forEach(function (e, i) {
// console.log("e" + JSON.stringify(e))
// console.log("i" + JSON.stringify(i))
// console.log($(e).length)
})
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/save'/>",
data: JSON.stringify(json)
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
// alert("성공하였습니다. 리스트로 돌아갑니다.")
$.utils.success("성공하였습니다. 리스트로 돌아갑니다.");
// $.utils.warning("중복확인을 해주세요.");
listgo();
} else {
// alert("실패하였습니다.")
$.utils.warning("실패하였습니다.");
}
});
}
function addServiceGroup() {
var serviceGroup = $('#newServiceGroup option:selected').val();
var serviceGroupName = $('#newServiceGroup option:selected').text();
if ($('#newServiceGroup option:selected').val() === 'ALL') {
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다.");
$.utils.warning("시나리오그룹을 선택해주세요.");
// alert("시나리오그룹을 선택해주세요");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
$.utils.warning("이미 추가된 서비스그룹입니다.");
return;
}
var html3 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + serviceGroup,
success: function (data) {
data.forEach(function (e, i) {
html3
+= ' <li>'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ ' </li>';
});
}
});
var html2 = '';
html2 += ' <tr>'
+ ' <th class="tl">시나리오그룹</th>'
+ ' <td class="tl">'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ '<tr>'
+ ' <th class="tl">권한선택</th>'
+ ' <td class="tl">'
+ ' <ul class="list-user-group-box-ul" id="newAuthChk' + serviceGroup + '">'
+ html3
+ ' </ul>'
+ ' </td>'
+ '</tr>';
var html1 = '';
html1
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html1);
$('#reg_modal').hide();
removeDim();
}
function authChoice(servoceGroup) {
var html1 = '';
if (servoceGroup === 'ALL') {
html1
+= ' <li class="select2-selection__choice" id="defaultChkId">'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk01">'
+ ' <label for="chk01">시나리오그룹을선택해주세요</label>'
+ '</div>'
+ ' </li>';
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 1)
// setTimeout($('#newAuthChk').html(html), 1);
} else {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + servoceGroup,
success: function (data) {
data.forEach(function (e, i) {
html1
+= ' <li class="select2-selection__choice" >'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ '</div>'
+ ' </li>';
});
}
});
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 100)
}
;
}
function getOpr() {
var html1 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>"+ "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html1 += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#newServiceGroup').html(html1);
$('#newServiceGroup').niceSelect('update');
}
;
function getCust() {
var html1 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/cust/select'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html1 += '<option value="' + e.custCode + '">' + e.custName + '</option>';
});
}
})
// console.log("== "+html1);
$('#newCustUser').html(html1);
$('#newCustUser').niceSelect('update');
var custCode = $('#newCustUser option:selected').val();
// console.log(custCode)
SelectServiceGroupUpdate(custCode);
}
;
function SelectServiceGroupUpdate(custCode){
var html1 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/userAdmin/service/select'/>" + "?custCode="+custCode,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
// console.log("data"+ JSON.stringify(e))
// html += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
// console.log("data"+ JSON.stringify(e))
html1 += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#newServiceGroup').html(html1);
$('#newServiceGroup').niceSelect('update');
}
function userDoubleCheck() {
var userId = $('#newUserId').val()
if (userId.length < 1) {
// alert("1글자 이상 입력해주세요");
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다.");
$.utils.warning("1글자 이상 입력해주세요.");
return;
}
if (userId.length > 20) {
// alert("20글자 이하로 입력해주세요");
$.utils.warning("20글자 이하로 입력해주세요.");
return;
}
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/doubleCheck'/>" + "?userId=" + userId,
success: function (data) {
// console.log(data);
if (data == "Y") {
// alert("사용가능합니다");
$.utils.success("사용가능합니다.");
// $.utils.warning("1글자 이상 입력해주세요.");
$('#newUserIdYn').val("Y");
} else {
$.utils.warning("사용중인 아이디입니다.");
}
}
});
}
function newUserPassCheck() {
var text1 = $('#newUserPass').val();
var text2 = $('#newUserPassChk').val();
// console.log("key " + text1);
var htmlY = '<div class="ipt_box"><p class="status-txt"><em class="green">사용가능합니다.</em></p>'
+ '<input type="hidden" id="newUserPassChkVal" value="Y" name="" class=""></div>';
var htmlN = '<div class="ipt_box"><p class="status-txt"><em class="red">사용할수 없습니다.</em></p>'
+ '<input type="hidden" id="newUserPassChkVal" value="N" name="" class=""></div>';
var regDesc = '<div class="ipt_box"><p class="status-txt"><em class="red">비밀번호는 8자 이상이어야 하며, 숫자/문자/특수문자를 모두 포함해야 합니다.</em></p>'
+ '<input type="hidden" id="newUserPassChkVal" value="N" name="" class=""></div>';
// '비밀번호는 8자 이상이어야 하며, 숫자/문자/특수문자를 모두 포함해야 합니다.'
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{10,}$/;
if(text2.length > 7){
if (text1 === text2) {
$('#passDoubleCheckUi').html(htmlY)
}
else {
$('#passDoubleCheckUi').html(htmlN)
}
}
if (text1.length < 10 || text1.length > 20) {
$('#passCheckUi').html(htmlN)
return;
}
else if (text1.search(/\s/) != -1) {
$('#passCheckUi').html(htmlN)
return false;
}
else if (false === reg.test(text1)) {
$('#passCheckUi').html(regDesc)
return false;
}
else if ($('#newUserPassDoubleChkVal').val() == "Y") {
newUserDoublePassCheck()
}
else {
$('#passCheckUi').html(htmlY)
return true;
}
return;
}
function newUserDoublePassCheck() {
var text1 = $('#newUserPass').val();
var text2 = $('#newUserPassChk').val();
var htmlY = '<div class="ipt_box"><p class="status-txt"><em class="green">사용가능합니다.</em></p>'
+ '<input type="hidden" id="newUserPassDoubleChkVal" value="Y" name="" class=""></div>';
var htmlN = '<div class="ipt_box"><p class="status-txt"><em class="red">일치하지 않습니다.</em></p>'
+ '<input type="hidden" id="newUserPassDoubleChkVal" value="N" name="" class=""></div>';
// console.log("key " + text1);
// console.log("key " + text2);
if (text1 === text2) {
$('#passDoubleCheckUi').html(htmlY)
$('#passCheckUi').html(htmlY)
;
} else {
$('#passDoubleCheckUi').html(htmlN)
return;
}
return;
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="bot_common">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">운영자관리</a></li>
<li><a href="#">운영자생성</a></li>
</ul>
</div>
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">운영자 생성</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newCustUser">
<option value="ALL">전체</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">운영자 ID <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="newUserId" name="" class="">
<input type="hidden" id="newUserIdYn" value="N" name="" class="">
<a href="#" id="doubleCheckBtn" class="btn basic">중복확인</a>
</div>
</td>
</tr>
<tr>
<th class="tl">비밀번호<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="password" id="newUserPass" value="" name="" class="">
</div>
<span id="passCheckUi"></span>
</td>
</tr>
<tr>
<th class="tl">비밀번호 확인<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="password" id="newUserPassChk" value="" name="" class="">
</div>
<span id="passDoubleCheckUi"></span>
</td>
</tr>
<tr>
<th class="tl">이름 <em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="text" id="newUserName" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newUseYn">
<option value="Y">Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">이메일 주소</th>
<td>
<div class="ipt_box">
<input type="text" id="newUserMail" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">핸드폰 번호</th>
<td>
<div class="ipt_box">
<input type="text" id="newUserMobile" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">등급선택</th>
<td>
<div class="sel_box">
<select class="wide" id="newUserRoleVal">
<%-- <option value="USER">일반사용자</option>--%>
<option value="USERADMIN">운영자</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnDel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>시나리오그룹 권한</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<span id="copySpan">
<tr>
<th class="tl">시나리오그룹</th>
<td>
<div class="sel_box">
<select id="newServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
</tr>
<%-- <tr>--%>
<%-- <th class="tl">권한선택</th>--%>
<%-- <td>--%>
<%-- <ul class="list-user-group-box-ul" id="newAuthChk">--%>
<%-- </ul>--%>
<%-- </td>--%>
<%-- </tr>--%>
</span>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,696 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>운영자관리</title>
</head>
<script>
$(document).ready(function () {
getOpr();
getQueryString();
getViewPageData();
authChoice($('#newServiceGroup option:selected').val());
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//선택 이벤트
$('#newServiceGroup').change(function () {
authChoice($(this).val())
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
})
$('#btnSave').on('click', function () {
// console.log("저장버튼");
saveBtn();
});
$('#failCheckBtn').on('click', function () {
failCheckBtn();
});
//서비스그룹 추가 -> 적용버튼
$('#btnSaveCust').on('click', function () {
addServiceGroup();
// $('.tbl-card-li').each(function () {
// // console.log("???");
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
// console.log($('.tbl-card').find('.tbl-card-li').last());
// $('.tbl-card').find('.tbl-card-li').last()
$('.tbl-card').find('.tbl-card-title').last()
.on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on')
}
);
});
});
function failCheckBtn() {
var data = {};
data.userSeq = getQueryString();
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
data: data,
url: "<c:url value='/admin/common/system/user/chk/reset'/>",
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
// alert("성공하였습니다. 리스트로 돌아갑니다.")
$('#updateLoginCheck').val(0);
$.utils.success("초기화 하였습니다.");
} else {
// alert("실패하였습니다.")
$.utils.warning("실패하였습니다.");
}
});
}
function saveBtn() {
var userSeq = $('#updateUserSeq').val();
var userId = $('#updateUserId').val();
var userName = $('#updateUserName').val();
var userPass = $('#updateUserPass').val();
var mobileNo = $('#updateMobile').val();
var useYn = $('#updateUseYn option:selected').val();
var loginCheck = $('#updateLoginCheck').val();
var email = $('#updateEmail').val();
var roleVal = $('#updateRoleVal option:selected').val();
var json = {};
var addServiceAuthList = new Array();
// $("#list-user-group-box-ul-list").children('li').each(function (i,e) {
// var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq","")
// userList.push(ids)
// // console.log("3 = " + ids)
// })
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{10,}$/;
var pas = $('#updateUserPass').val();
// console.log("길이 = " + pas.length);
if (pas.length > 1) {
if (false === reg.test(pas)) {
$.utils.warning("비밀번호는 8자 이상이어야 하며, 숫자/문자/특수문자를 모두 포함해야 합니다.");
return false;
} else {
$('#updateUserPassChk').val('Y');
}
if (pas === 'N') {
$.utils.warning("유효하지않은 비밀번호입니다.");
}
}
$(".tbl-card").children('li').each(function (i, e) {
var addServiceAuth = {};
var ids = $(this).find("input:eq(0)").attr("id").replaceAll("addServiceGroup", "");
var authList = new Array();
$('#newAuthChk' + ids).find('li').each(function (i, e) {
var chkid = $(this).find('input').attr('id').replaceAll("chk", "")
if ($(this).find('input').is(':checked')) {
authList.push(chkid);
}
});
addServiceAuth.addService = ids;
addServiceAuth.authList = authList;
addServiceAuthList.push(addServiceAuth);
})
json.userSeq = userSeq;
json.userId = userId;
json.userName = userName;
json.userPass = userPass;
json.mobileNo = mobileNo;
json.useYn = useYn;
json.loginCheck = loginCheck;
json.email = email;
json.roleVal = roleVal;
json.addServiceAuthList = addServiceAuthList;
// console.log(JSON.stringify(json));
if ($('#newUserIdYn').val() === 'N') {
// $.utils.success("사용가능합니다.");
$.utils.warning("중복확인을 해주세요.");
return;
}
if ($('#newUserPassDoubleChkVal').val() === 'N') {
$.utils.warning("비밀번호가 일치하지 않습니다.");
return;
}
if (userName < 1) {
$.utils.warning("운영자의 이름을 입력해주세요.");
return;
}
if (json.addServiceAuthList.length < 1) {
$.utils.warning("서비스그룹을 추가해주세요.");
return;
}
//밸류체크는안하는걸로,
json.addServiceAuthList.forEach(function (e, i) {
// console.log("e" + JSON.stringify(e))
// console.log("i" + JSON.stringify(i))
// console.log($(e).length)
})
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/update'/>",
data: JSON.stringify(json)
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
// alert("성공하였습니다. 리스트로 돌아갑니다.")
$.utils.success("성공하였습니다. 리스트로 돌아갑니다.");
setTimeout(function () {
listgo();
}, 1000)
// $.utils.warning("중복확인을 해주세요.");
} else {
// alert("실패하였습니다.")
$.utils.warning("실패하였습니다.");
}
});
}
function listgo() {
// document.location.href = "/BotMain_VM/admin/common/system/user/manage.do";
document.location.href = "<c:url value='/admin/common/system/userAdmin/manage.do'/>";
}
function getQueryString() {
var param = new URLSearchParams(location.search).get("userSeq");
// console.log(param)
return param;
}
function getViewPageData() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/viewData'/>" + "?userSeq=" + getQueryString(),
success: function (data) {
// console.log("getData---");
// console.log(JSON.stringify(data));
$('#updateUserSeq').val(data.userSeq);
$('#updateUserId').val(data.userId);
$('#updateUserName').val(data.userName);
$('#updateMobile').val(data.mobileNo);
$('#updateUseYn').val(data.useYn);
$('#updateLoginCheck').val(data.loginCheck);
$('#updateEmail').val(data.email);
var role = data.roleVal;
if (role == "SYSTEMADMIN") {
$('#updateRoleVal').html('<option value="' + role + '">' + "시스템어드민" + '</option>');
} else {
$('#updateRoleVal').val(role).prop("selected", true);
}
$('#updateRoleVal').niceSelect('update');
// $('#updateUserPass').val();
dataAddServiceGroup(data.useServiceGroup, data.useAuthSeq);
}
})
};
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>" + "?serviceType=M",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
$('#newServiceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#newServiceGroup').niceSelect('update');
});
}
})
};
function addServiceGroup() {
var serviceGroup = $('#newServiceGroup option:selected').val();
var serviceGroupName = $('#newServiceGroup option:selected').text();
if ($('#newServiceGroup option:selected').val() === 'ALL') {
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다..");
$.utils.warning("서비스그룹을 선택해주세요.");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
$.utils.warning("이미 추가된 서비스그룹입니다.");
return;
}
var html3 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + serviceGroup,
success: function (data) {
data.forEach(function (e, i) {
html3
+= ' <li>'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ ' </li>';
});
}
});
var html2 = '';
html2 += ' <tr>'
+ ' <th class="tl">서비스그룹</th>'
// + ' <td class=“tl”>'
+ ' <td class="tl">'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ '<tr>'
+ ' <th class="tl">권한선택</th>'
// + ' <td class=“tl”>'
+ ' <td class="tl">'
+ ' <ul class="list-user-group-box-ul" id="newAuthChk' + serviceGroup + '">'
+ html3
+ ' </ul>'
+ ' </td>'
+ '</tr>';
var html1 = '';
html1
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html1);
$('#reg_modal').hide();
removeDim();
}
function dataAddServiceGroup(serviceList, useAuthSeq) {
serviceList.forEach(function (e) {
var serviceGroup = e.serviceGroup;
var serviceGroupName = e.serviceName;
// if (document.getElementById("addServiceGroup" + serviceGroup)) {
// alert("이미 추가된 서비스그룹입니다.");
// return;
// }
var html3 = '';
e.baseAuthGroup.forEach(function (f, i) {
// console.log(JSON.stringify(f));
if (useAuthSeq.includes(f.authGroupSeq)) {
html3
+= ' <li>'
+ ' <input type="checkbox" checked name="checkbox" id="chk' + f.authGroupSeq + '">'
+ ' <label for="chk01">' + f.policyGroupName + '</label>'
+ ' </li>';
} else {
html3
+= ' <li>'
+ ' <input type="checkbox" name="checkbox" id="chk' + f.authGroupSeq + '">'
+ ' <label for="chk01">' + f.policyGroupName + '</label>'
+ ' </li>';
}
});
var html2 = '';
html2 += ' <tr>'
+ ' <th class="tl">서비스그룹</th>'
+ ' <td class="tl">'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ '<tr>'
+ ' <th class="tl">권한선택</th>'
+ ' <td class="tl">'
+ ' <ul class="list-user-group-box-ul" id="newAuthChk' + serviceGroup + '">'
+ html3
+ ' </ul>'
+ ' </td>'
+ '</tr>';
var html1 = '';
html1
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html1);
// $('#reg_modal').hide();
});
//마지막건 토글
// $('.tbl-card').find('.tbl-card-title').last()
// .on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on')
// }
// );
//전체 토글
$('.tbl-card-li').each(function () {
// console.log("???");
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
}
function authChoice(servoceGroup) {
var html1 = '';
if (servoceGroup === 'ALL') {
html1
+= ' <li class="select2-selection__choice" id="defaultChkId">'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk01">'
+ ' <label for="chk01">서비스그룹을선택해주세요</label>'
+ '</div>'
+ ' </li>';
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 1)
// setTimeout($('#newAuthChk').html(html), 1);
} else {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + servoceGroup,
success: function (data) {
data.forEach(function (e, i) {
html1
+= ' <li class="select2-selection__choice" >'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ '</div>'
+ ' </li>';
});
}
});
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 100)
}
;
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="bot_common">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">운영자관리</a></li>
</ul>
</div>
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">운영자 수정</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">운영자 ID <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="hidden" id="updateUserSeq" name="" class="" readonly>
<input type="text" id="updateUserId" value="아이디아이이" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">비밀번호 변경<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="password" id="updateUserPass" value="" name="" class="">
<input type="hidden" id="updateUserPassChk" value="N" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">오류회수 초기화<em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="updateLoginCheck" value="" name="" class="" readonly>
<a href="#" id="failCheckBtn" class="btn basic">오류회수 초기화</a>
</div>
</td>
</tr>
<tr>
<th class="tl">이름 <em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="text" id="updateUserName" value="홍길동" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="updateUseYn">
<option value="">Y</option>
<option value="">N</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">이메일 주소</th>
<td>
<div class="ipt_box">
<input type="text" value="" id="updateEmail" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">핸드폰 번호</th>
<td>
<div class="ipt_box">
<input type="text" value="" id="updateMobile" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">등급선택</th>
<td>
<div class="sel_box">
<select class="wide" id="updateRoleVal">
<%-- <option value="USER">일반사용자</option>--%>
<option value="USERADMIN">운영자</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnDel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>서비스그룹 권한</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<span id="copySpan">
<tr>
<th class="tl">서비스그룹</th>
<td>
<div class="sel_box">
<select id="newServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
</tr>
<%-- <tr>--%>
<%-- <th class="tl">권한선택</th>--%>
<%-- <td>--%>
<%-- <ul class="list-user-group-box-ul" id="newAuthChk">--%>
<%-- </ul>--%>
<%-- </td>--%>
<%-- </tr>--%>
</span>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,773 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<script>
$(document).ready(function () {
getCust();
getOpr();
authChoice($('#newServiceGroup option:selected').val());
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//선택 이벤트
$('#newServiceGroup').change(function () {
authChoice($(this).val())
});
// $('.tbl-card-li').each(function () {
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
//선택 이벤트
$('#newCustUser').change(function () {
SelectServiceGroupUpdate($(this).val())
});
//서비스그룹 추가 -> 적용버튼
$('#btnSaveCust').on('click', function () {
addServiceGroup();
// $('.tbl-card-li').each(function () {
// // console.log("???");
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
// console.log($('.tbl-card').find('.tbl-card-li').last());
});
$('#btnSave').on('click', function () {
// console.log("저장버튼");
saveBtn();
});
$('#btnDel').on('click', function () {
// console.log("삭제버튼");
delBtn();
});
$('#doubleCheckBtn').on('click', function () {
// console.log("중복확인버튼");
userDoubleCheck();
});
$('#newUserPass').keyup(function (e) {
newUserPassCheck(e.keyCode)
});
$('#newUserPassChk').keyup(function (e) {
newUserDoublePassCheck(e.keyCode)
});
$('.tbl-card').find('.tbl-card-li .title-connect').each(function () {
const submitVal = $(this).val();
if (submitVal.length > 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text(submitVal);
}
$(this).on('keyup', function () {
const thisVal = $(this).val();
if (thisVal.length === 0) {
$(this).parents('.tbl-card-li').find('.title-connected').text('새로운 시나리오 그룹');
} else {
$(this).parents('.tbl-card-li').find('.title-connected').text(thisVal);
}
})
});
}
);
function listgo() {
// document.location.href = "/BotMain_VM/admin/common/system/user/manage.do";
document.location.href = "<c:url value='/admin/common/system/user/manage.do'/>";
}
function delBtn() {
listgo();
}
function saveBtn() {
var mainOpr = $('#mainOpr option:selected').val()
var userId = $('#newUserId').val();
var pas = $('#newUserPass').val();
var pasChk = $('#newUserPassChk').val();
var userName = $('#newUserName').val();
var useYn = $('#newUseYn option:selected').val();
var userMail = $('#newUserMail').val();
var userMobile = $('#newUserMobile').val();
var userRoleVal = $('#newUserRoleVal').val();
var json = {};
var addServiceAuthList = new Array();
// $("#list-user-group-box-ul-list").children('li').each(function (i,e) {
// var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq","")
// userList.push(ids)
// // console.log("3 = " + ids)
// })
$(".tbl-card").children('li').each(function (i, e) {
var addServiceAuth = {};
var ids = $(this).find("input:eq(0)").attr("id").replaceAll("addServiceGroup", "");
var authList = new Array();
$('#newAuthChk' + ids).find('li').each(function (i, e) {
var chkid = $(this).find('input').attr('id').replaceAll("chk", "")
if ($(this).find('input').is(':checked')) {
authList.push(chkid);
}
});
addServiceAuth.addService = ids;
addServiceAuth.authList = authList;
addServiceAuthList.push(addServiceAuth);
})
json.lastUseServiceGroup = mainOpr;
json.userId = userId;
json.pass = pas;
json.userName = userName
json.useYn = useYn;
json.userMail = userMail;
json.userMobile = userMobile;
json.roleVal = userRoleVal;
json.addServiceAuthList = addServiceAuthList;
// console.log(JSON.stringify(json));
if ($('#newUserIdYn').val() === 'N') {
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다..");
$.utils.warning("중복확인을 해주세요.");
return;
}
var text1 = $('#newUserPass').val();
var text2 = $('#newUserPassChk').val();
if (text1.length < 8 || text2.length < 8) {
$.utils.warning("비밀번호를 확인해주세요.");
return;
}
if (text1.length > 15 || text2.length > 15) {
$.utils.warning("비밀번호를 확인해주세요.");
return;
}
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,15}$/;
if (false === reg.test(text1)) {
$.utils.warning("비밀번호를 확인해주세요.");
return;
}
if (text1 !== text2) {
$.utils.warning("비밀번호가 일치하지 않습니다.");
return;
}
if ($('#newUserPassDoubleChkVal').val() === 'N') {
$.utils.warning("비밀번호가 일치하지 않습니다.");
return;
}
if (userName < 1) {
$.utils.warning("사용자의 이름을 입력해주세요.");
return;
}
if (json.addServiceAuthList.length < 1) {
$.utils.warning("시나리오그룹을 추가해주세요.");
return;
}
//밸류체크는안하는걸로,
json.addServiceAuthList.forEach(function (e, i) {
// console.log("e" + JSON.stringify(e))
// console.log("i" + JSON.stringify(i))
// console.log($(e).length)
})
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/save'/>",
data: JSON.stringify(json)
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
$.utils.success("성공하였습니다. 리스트로 돌아갑니다..");
// $.utils.warning("중복확인을 해주세요.");
// alert("성공하였습니다. 리스트로 돌아갑니다.")
listgo();
} else {
// alert("실패하였습니다.")
$.utils.warning("실패하였습니다.");
}
});
}
function addServiceGroup() {
var serviceGroup = $('#newServiceGroup option:selected').val();
var serviceGroupName = $('#newServiceGroup option:selected').text();
if ($('#newServiceGroup option:selected').val() === 'ALL') {
// alert("시나리오그룹을 선택해주세요");
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다..");
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
// alert("이미 추가된 서비스그룹입니다.");
$.utils.warning("이미 추가된 시나리오그룹입니다.");
return;
}
var html3 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + serviceGroup,
success: function (data) {
data.forEach(function (e, i) {
html3
+= ' <li class="select2-selection__choice" >'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ ' </li>';
});
}
});
var html2 = '';
html2 += ' <tr>'
+ ' <th class="tl">시나리오그룹</th>'
+ ' <td class="tl">'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ '<tr>'
+ ' <th class="tl">권한선택</th>'
+ ' <td class="tl">'
+ ' <ul class="list-user-group-box-ul" id="newAuthChk' + serviceGroup + '">'
+ html3
+ ' </ul>'
+ ' </td>'
+ '</tr>';
var html1 = '';
html1
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html1);
$('#reg_modal').hide();
removeDim();
// $('.tbl-card').find('.tbl-card-li').last()
$('.tbl-card').find('.tbl-card-title').last()
.on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on')
}
);
}
function authChoice(servoceGroup) {
var html1 = '';
if (servoceGroup === 'ALL') {
html1
+= ' <li class="select2-selection__choice" id="defaultChkId">'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk01">'
+ ' <label for="chk01">시나리오그룹을선택해주세요</label>'
+ '</div>'
+ ' </li>';
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 1)
// setTimeout($('#newAuthChk').html(html), 1);
} else {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + servoceGroup,
success: function (data) {
data.forEach(function (e, i) {
html1
+= ' <li class="select2-selection__choice" >'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ '</div>'
+ ' </li>';
});
}
});
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 100)
}
;
}
function getOpr() {
var html1 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/adm/menu/oprmng'/>"
// + "?serviceType=S"
,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html1 += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#newServiceGroup').html(html1);
$('#newServiceGroup').niceSelect('update');
}
;
function getCust() {
var html1 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/cust/select'/>",
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html1 += '<option value="' + e.custCode + '">' + e.custName + '</option>';
});
}
})
// console.log("== "+html1);
$('#newCustUser').html(html1);
$('#newCustUser').niceSelect('update');
var custCode = $('#newCustUser option:selected').val();
// console.log(custCode)
SelectServiceGroupUpdate(custCode);
}
;
function SelectServiceGroupUpdate(custCode) {
var html1 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/service/select'/>" + "?custCode=" + custCode,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
html1 += '<option value="' + e.serviceGroup + '">' + e.serviceGroupName + '</option>';
});
}
})
$('#newServiceGroup').html(html1);
$('#newServiceGroup').niceSelect('update');
}
function userDoubleCheck() {
var userId = $('#newUserId').val()
if (userId.length < 1) {
// alert("1글자 이상 입력해주세요");
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다..");
$.utils.warning("1글자 이상 입력해주세요.");
return;
}
if (userId.length > 20) {
// alert("20글자 이하로 입력해주세요");
$.utils.warning("20글자 이하로 입력해주세요.");
return;
}
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/doubleCheck'/>" + "?userId=" + userId,
success: function (data) {
// console.log(data);
if (data == "Y") {
// alert("사용가능합니다");
$.utils.success("사용가능합니다.");
// $.utils.warning("1글자 이상 입력해주세요.");
$('#newUserIdYn').val("Y");
} else {
$.utils.warning("사용중인 아이디입니다.");
// alert("사용중인 아이디입니다.");
}
}
});
}
function newUserPassCheck(e) {
originPassChk(e);
doublePassChk(e);
return;
}
function originPassChk(e) {
var text1 = $('#newUserPass').val();
var text2 = $('#newUserPassChk').val();
// console.log("key " + text1);
var htmlY = '<div class="ipt_box"><p class="status-txt"><em class="green">사용가능합니다.</em></p>'
+ '<input type="hidden" id="newUserPassChkVal" value="Y" name="" class=""></div>';
var htmlN = '<div class="ipt_box"><p class="status-txt"><em class="red">사용할수 없습니다.</em></p>'
+ '<input type="hidden" id="newUserPassChkVal" value="N" name="" class=""></div>';
var htmlNhide = '<input type="hidden" id="newUserPassDoubleChkVal" value="N" name="" class=""></div>';
var regDesc = '<div class="ipt_box"><p class="status-txt"><em class="red">비밀번호는 8자 이상 15이하 여야 하며, 숫자/문자/특수문자를 모두 포함해야 합니다.</em></p>'
+ '<input type="hidden" id="newUserPassChkVal" value="N" name="" class=""></div>';
// '비밀번호는 8자 이상이어야 하며, 숫자/문자/특수문자를 모두 포함해야 합니다.'
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,15}$/;
if (text1.length == 1 || text1.length == 7) {
$('#passCheckUi').html("");
$('#passDoubleCheckUi').html(htmlNhide);
}
if (e === 8 || e === 46) {
$('#passCheckUi').html("");
}
if (text1.length < 8) {
return;
}
if (text1.length > 15) {
$('#passCheckUi').html(regDesc)
return;
}
if (false === reg.test(text1)) {
$('#passCheckUi').html(regDesc)
return;
} else {
$('#passCheckUi').html(htmlY)
return;
}
}
function doublePassChk(e) {
var text1 = $('#newUserPass').val();
var text2 = $('#newUserPassChk').val();
var htmlY = '<div class="ipt_box"><p class="status-txt"><em class="green">비밀번호가 일치합니다.</em></p>'
+ '<input type="hidden" id="newUserPassDoubleChkVal" value="Y" name="" class=""></div>';
var htmlN = '<div class="ipt_box"><p class="status-txt"><em class="red">비밀번호가 일치하지 않습니다.</em></p>'
+ '<input type="hidden" id="newUserPassDoubleChkVal" value="N" name="" class=""></div>';
var htmlNhide = '<input type="hidden" id="newUserPassDoubleChkVal" value="N" name="" class=""></div>';
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/;
if (e === 8 || e === 46) {
$('#passDoubleCheckUi').html(htmlN);
}
if (text2.length == 1) {
$('#passDoubleCheckUi').html("");
$('#passDoubleCheckUi').html(htmlNhide);
}
if (text2.length < 8) {
return;
}
originPassChk(e);
if (text1 === text2) {
$('#passDoubleCheckUi').html(htmlY);
return;
} else {
$('#passDoubleCheckUi').html(htmlN);
return;
}
}
function chkVal(yn) {
$('#newUserPassDoubleChkVal').val(yn);
}
function newUserDoublePassCheck(e) {
var htmlN = '<div class="ipt_box"><p class="status-txt"><em class="red">비밀번호가 일치하지 않습니다.</em></p>'
+ '<input type="hidden" id="newUserPassDoubleChkVal" value="N" name="" class=""></div>';
originPassChk(e);
doublePassChk(e);
return;
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="bot_common">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">사용자관리</a></li>
<li><a href="#">사용자생성</a></li>
</ul>
</div>
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">사용자 생성</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">고객사 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newCustUser">
<option value="ALL">전체</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">사용자 ID <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="newUserId" name="" class="">
<input type="hidden" id="newUserIdYn" value="N" name="" class="">
<a href="#" id="doubleCheckBtn" class="btn basic">중복확인</a>
</div>
</td>
</tr>
<tr>
<th class="tl">비밀번호<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="password" id="newUserPass" value="" name="" class="">
</div>
<span id="passCheckUi"></span>
</td>
</tr>
<tr>
<th class="tl">비밀번호 확인<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="password" id="newUserPassChk" value="" name="" class="">
</div>
<span id="passDoubleCheckUi"></span>
</td>
</tr>
<tr>
<th class="tl">이름 <em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="text" id="newUserName" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="newUseYn">
<option value="Y">Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">이메일 주소</th>
<td>
<div class="ipt_box">
<input type="text" id="newUserMail" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">핸드폰 번호</th>
<td>
<div class="ipt_box">
<input type="text" id="newUserMobile" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">등급선택</th>
<td>
<div class="sel_box">
<select class="wide" id="newUserRoleVal">
<option value="USER">일반사용자</option>
<option value="USERADMIN">운영자</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnDel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>시나리오그룹 권한</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<span id="copySpan">
<tr>
<th class="tl">시나리오그룹</th>
<td>
<div class="sel_box">
<select id="newServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
</tr>
<%-- <tr>--%>
<%-- <th class="tl">권한선택</th>--%>
<%-- <td>--%>
<%-- <ul class="list-user-group-box-ul" id="newAuthChk">--%>
<%-- </ul>--%>
<%-- </td>--%>
<%-- </tr>--%>
</span>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,723 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>사용자관리</title>
</head>
<script>
$(document).ready(function () {
getOpr();
getQueryString();
getViewPageData();
authChoice($('#newServiceGroup option:selected').val());
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
});
//선택 이벤트
$('#newServiceGroup').change(function () {
authChoice($(this).val())
});
$("#Content").on("keyup", function (key) {
if (key.keyCode == 13) {
fnCustSearchBtn();
}
})
$('#btnSave').on('click', function () {
// console.log("저장버튼");
saveBtn();
});
$('#btnDel').on('click', function () {
// console.log("취소버튼");
delBtn();
});
function delBtn() {
listgo();
}
function listgo() {
// document.location.href = "/BotMain_VM/admin/common/system/user/manage.do";
document.location.href = "<c:url value='/admin/common/system/user/manage.do'/>";
}
//서비스그룹 추가 -> 적용버튼
$('#btnSaveCust').on('click', function () {
addServiceGroup();
// $('.tbl-card-li').each(function () {
// // console.log("???");
// $(this).find('.tbl-card-title').on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on');
// })
// });
// console.log($('.tbl-card').find('.tbl-card-li').last());
// $('.tbl-card').find('.tbl-card-li').last()
$('.tbl-card').find('.tbl-card-title').last()
.on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on')
}
);
});
$('#failCheckBtn').on('click', function () {
failCheckBtn();
});
});
function getUv(){
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
data: data,
url: "<c:url value='/admin/common/system/user/chk/reset'/>",
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
// alert("성공하였습니다. 리스트로 돌아갑니다.")
$('#updateLoginCheck').val(0);
} else {
$.utils.warning("실패하였습니다.");
}
});
}
function failCheckBtn() {
var data = {};
data.userSeq = getQueryString();
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
data: data,
url: "<c:url value='/admin/common/system/user/chk/reset'/>",
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
// alert("성공하였습니다. 리스트로 돌아갑니다.")
$('#updateLoginCheck').val(0);
$.utils.success("초기화 하였습니다.");
} else {
// alert("실패하였습니다.")
$.utils.warning("실패하였습니다.");
}
});
}
function saveBtn() {
var userSeq = $('#updateUserSeq').val();
var userId = $('#updateUserId').val();
var userName = $('#updateUserName').val();
var userPass = $('#updateUserPass').val();
var mobileNo = $('#updateMobile').val();
var useYn = $('#updateUseYn option:selected').val();
var loginCheck = $('#updateLoginCheck').val();
var email = $('#updateEmail').val();
var roleVal = $('#updateRoleVal option:selected').val();
var json = {};
var addServiceAuthList = new Array();
// $("#list-user-group-box-ul-list").children('li').each(function (i,e) {
// var ids = $(this).find("div").find("a").attr("id").replaceAll("userseq","")
// userList.push(ids)
// // console.log("3 = " + ids)
// })
$(".tbl-card").children('li').each(function (i, e) {
var addServiceAuth = {};
var ids = $(this).find("input:eq(0)").attr("id").replaceAll("addServiceGroup", "");
var authList = new Array();
$('#newAuthChk' + ids).find('li').each(function (i, e) {
var chkid = $(this).find('input').attr('id').replaceAll("chk", "")
if ($(this).find('input').is(':checked')) {
authList.push(chkid);
}
});
addServiceAuth.addService = ids;
addServiceAuth.authList = authList;
addServiceAuthList.push(addServiceAuth);
})
json.userSeq = userSeq;
json.userId = userId;
json.userName = userName;
json.userPass = userPass;
json.mobileNo = mobileNo;
json.useYn = useYn;
json.loginCheck = loginCheck;
json.email = email;
json.roleVal = roleVal;
json.addServiceAuthList = addServiceAuthList;
// console.log(JSON.stringify(json));
// $.utils.success("사용가능합니다.");
// $.utils.warning("1글자 이상 입력해주세요.");
if ($('#newUserIdYn').val() === 'N') {
// alert("중복확인을 해주세요");
// $.utils.warning("중복확인을 해주세요.");
return;
}
if ($('#newUserPassDoubleChkVal').val() === 'N') {
// alert("비밀번호가 일치하지 않습니다.");
$.utils.warning("비밀번호가 일치하지 않습니다.");
return;
}
if(userPass.length > 0){
var reg = /(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,15}$/;
if (false === reg.test(userPass)) {
$.utils.warning("비밀번호를 확인해주세요.");
return;
}
}
if (userName < 1) {
$.utils.warning("사용자의 이름을 입력해주세요.");
return;
}
if (json.addServiceAuthList.length < 1) {
$.utils.warning("시나리오그룹을 추가해주세요.");
return;
}
//밸류체크는안하는걸로,
json.addServiceAuthList.forEach(function (e, i) {
// console.log("e" + JSON.stringify(e))
// console.log("i" + JSON.stringify(i))
// console.log($(e).length)
})
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/update'/>",
data: JSON.stringify(json)
}).complete(function (data) {
// console.log(data.status);
var result = data.status;
if (result == 200) {
// alert("성공하였습니다. 리스트로 돌아갑니다.")
$.utils.success("성공하였습니다. 리스트로 돌아갑니다.");
// $.utils.warning("1글자 이상 입력해주세요.");
document.location.href = "<c:url value='/admin/common/system/user/manage.do'/>";
} else {
// alert("실패하였습니다.")
$.utils.warning("실패하였습니다.");
}
});
}
function getQueryString() {
var param = new URLSearchParams(location.search).get("userSeq");
// console.log(param)
return param;
}
function getViewPageData() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/viewData'/>" + "?userSeq=" + getQueryString(),
success: function (data) {
// console.log("getData---");
// console.log(JSON.stringify(data));
$('#updateUserSeq').val(data.userSeq);
$('#updateUserId').val(data.userId);
$('#updateUserName').val(data.userName);
$('#updateMobile').val(data.mobileNo);
$('#updateUseYn').val(data.useYn).prop('selected',true);
$('#updateLoginCheck').val(data.loginCheck);
$('#updateEmail').val(data.email);
var role = data.roleVal;
if (role == "SYSTEMADMIN") {
$('#updateRoleVal').html('<option value="' + role + '">' + "시스템어드민" + '</option>');
} else {
$('#updateRoleVal').val(role).prop("selected", true);
}
$('#updateUseYn').niceSelect('update');
$('#updateRoleVal').niceSelect('update');
// $('#updateUserPass').val();
dataAddServiceGroup(data.useServiceGroup, data.useAuthSeq);
}
})
};
function getOpr() {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/adm/menu/oprmng'/>"
// +"?serviceType=S"
,
success: function (data) {
// console.log(JSON.stringify(data));
data.forEach(function (e, f) {
$('#serviceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#serviceGroup').niceSelect('update');
$('#newServiceGroup').append("<option value=" + e.serviceGroup + ">" + e.serviceGroupName + "</option>");
$('#newServiceGroup').niceSelect('update');
});
}
})
};
function addServiceGroup() {
var serviceGroup = $('#newServiceGroup option:selected').val();
var serviceGroupName = $('#newServiceGroup option:selected').text();
if ($('#newServiceGroup option:selected').val() === 'ALL') {
// alert("시나리오그룹을 선택해주세요");
// $.utils.success("성공하였습니다. 리스트로 돌아갑니다.");
$.utils.warning("시나리오그룹을 선택해주세요.");
return;
}
if (document.getElementById("addServiceGroup" + serviceGroup)) {
// alert("이미 추가된 서비스그룹입니다.");
$.utils.warning("이미 추가된 시나리오그룹입니다.");
return;
}
var html3 = '';
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
async: false,
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + serviceGroup,
success: function (data) {
data.forEach(function (e, i) {
html3
+= ' <li class="select2-selection__choice" >'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ '</div>'
+ ' </li>';
});
}
});
var html2 = '';
html2 += ' <tr>'
+ ' <th class="tl">시나리오그룹</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ '<tr>'
+ ' <th class="tl">권한선택</th>'
+ ' <td class="tl">'
+ ' <ul class="list-user-group-box-ul" id="newAuthChk' + serviceGroup + '">'
+ html3
+ ' </ul>'
+ ' </td>'
+ '</tr>';
var html1 = '';
html1
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html1);
$('#reg_modal').hide();
removeDim();
}
function dataAddServiceGroup(serviceList, useAuthSeq) {
serviceList.forEach(function (e) {
var serviceGroup = e.serviceGroup;
var serviceGroupName = e.serviceName;
// if (document.getElementById("addServiceGroup" + serviceGroup)) {
// alert("이미 추가된 서비스그룹입니다.");
// return;
// }
var html3 = '';
e.baseAuthGroup.forEach(function (f, i) {
// console.log(JSON.stringify(f));
if (useAuthSeq.includes(f.authGroupSeq)) {
html3
+= ' <li class="select2-selection__choice" >'
+ ' <input type="checkbox" checked name="checkbox" id="chk' + f.authGroupSeq + '">'
+ ' <label for="chk01">' + f.policyGroupName + '</label>'
+ ' </li>';
} else {
html3
+= ' <li class="select2-selection__choice" >'
+ ' <input type="checkbox" name="checkbox" id="chk' + f.authGroupSeq + '">'
+ ' <label for="chk01">' + f.policyGroupName + '</label>'
+ ' </li>';
}
});
var html2 = '';
html2 += ' <tr>'
+ ' <th class="tl">시나리오그룹</th>'
+ ' <td>'
+ ' <div class="ipt_box">'
+ ' <input type="text" id="addServiceGroup' + serviceGroup + '" value="' + serviceGroupName + '" name="" readonly class="">'
+ ' </div>'
+ ' </td>'
+ '</tr>'
+ '<tr>'
+ ' <th class="tl">권한선택</th>'
+ ' <td class="tl">'
+ ' <ul class="list-user-group-box-ul" id="newAuthChk' + serviceGroup + '">'
+ html3
+ ' </ul>'
+ ' </td>'
+ '</tr>';
var html1 = '';
html1
+= '<li class="tbl-card-li" id="tbl-card-li' + serviceGroup + '">'
+ '<div class="tbl-card-li-inner">'
+ ' <div class="tbl-card-title" id="tbl-card-title' + serviceGroup + '">'
+ ' <div class="fl title-connected">' + serviceGroupName + '</div>'
+ ' </div>'
+ ' <div class="tbl-card-data">'
+ ' <div class="box-title">'
// + ' <div class="btn_wrap fr">'
// + ' <a href="#" class="btn grey">-삭제</a>'
// + ' </div>'
+ ' </div>'
+ ' <div class="tbl">'
+ ' <table class="edit hght">'
+ ' <colgroup>'
+ ' <col width="150px">'
+ ' <col width="auto">'
+ ' </colgroup>'
+ ' <tbody>'
+ html2
+ ' </tbody>'
+ ' </table>'
+ ' </div>'
+ ' </div>'
+ ' </div>'
+ '</li>';
$('.tbl-card').append(html1);
// $('#reg_modal').hide();
});
//마지막건 토글
// $('.tbl-card').find('.tbl-card-title').last()
// .on('click', function () {
// $(this).parents('.tbl-card-li').toggleClass('on')
// }
// );
//전체 토글
$('.tbl-card-li').each(function () {
// console.log("???");
$(this).find('.tbl-card-title').on('click', function () {
$(this).parents('.tbl-card-li').toggleClass('on');
})
});
}
function authChoice(servoceGroup) {
var html1 = '';
if (servoceGroup === 'ALL') {
html1
+= ' <li class="select2-selection__choice" id="defaultChkId">'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk01">'
+ ' <label for="chk01">시나리오그룹을선택해주세요</label>'
+ '</div>'
+ ' </li>';
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 1)
// setTimeout($('#newAuthChk').html(html), 1);
} else {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "JSON",
url: "<c:url value='/admin/common/system/user/authlist'/>" + "?serviceGroup=" + servoceGroup,
success: function (data) {
data.forEach(function (e, i) {
html1
+= ' <li class="select2-selection__choice" >'
+ ' <div class="chk_box">'
+ ' <input type="checkbox" name="checkbox" id="chk' + e.authGroupSeq + '">'
+ ' <label for="chk01">' + e.policyGroupName + '</label>'
+ '</div>'
+ ' </li>';
});
}
});
setTimeout(function () {
$('#newAuthChk').html(html1);
}, 100)
}
;
}
</script>
<body>
<h1>ICOMSYS ADMIN</h1>
<div class="skip_navigation">
<ul>
<li>
<a href="#Content" class="go_content">본문 바로가기</a>
</li>
<li>
<a href="#Gnb">메뉴 바로가기</a>
</li>
</ul>
</div>
<header id="header">
</header>
<section id="Content" class="bot_common">
<div class="location">
<ul>
<li class="home"><a href="#">HOME</a></li>
<li><a href="#">시스템관리</a></li>
<li><a href="#">사용자관리</a></li>
</ul>
</div>
<div class="sub_cont">
<div class="cont_box">
<div class="box_title">
<div class="fl">
<h2 class="mt12">사용자 수정</h2>
</div>
</div>
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
</colgroup>
<tbody>
<tr>
<th class="tl">사용자 ID <em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="hidden" id="updateUserSeq" name="" class="" readonly>
<input type="text" id="updateUserId" value="아이디아이이" name="" class="" readonly>
</div>
</td>
</tr>
<tr>
<th class="tl">비밀번호 변경<em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="password" id="updateUserPass" value="" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">비밀번호 오류회수<em class="red">*</em></th>
<td>
<div class="ipt_box type-flex">
<input type="text" id="updateLoginCheck" value="" name="" class="" readonly>
<a href="#" id="failCheckBtn" class="btn basic">오류회수 초기화</a>
</div>
</td>
</tr>
<tr>
<th class="tl">이름 <em class="red">*</em></th>
<td>
<div class="ipt_box">
<input type="text" id="updateUserName" value="홍길동" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">사용여부 <em class="red">*</em></th>
<td>
<div class="sel_box">
<select class="wide" id="updateUseYn">
<option value="Y">Y</option>
<option value="N">N</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="tl">이메일 주소</th>
<td>
<div class="ipt_box">
<input type="text" value="" id="updateEmail" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">핸드폰 번호</th>
<td>
<div class="ipt_box">
<input type="text" value="" id="updateMobile" name="" class="">
</div>
</td>
</tr>
<tr>
<th class="tl">등급선택</th>
<td>
<div class="sel_box">
<select class="wide" id="updateRoleVal">
<option value="USER">일반사용자</option>
<option value="USERADMIN">운영자</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cont_box">
<div class="box_title">
<div class="btn_wrap fr">
<a href="#" id="btnRegModal" rel="reg_modal" class="btn line modalLoad">추가</a>
</div>
</div>
<div class="tbl-card-wrap">
<ul class="tbl-card">
</ul>
</div>
</div>
<div class="cont_box">
<div class="btn_wrap center">
<a href="#" class="btn basic grey" id="btnDel">취소</a>
<a href="#" class="btn basic" id="btnSave">저장</a>
</div>
</div>
</div>
</section>
<div class="modal" id="reg_modal">
<div class="modal_header">
<h3>시나리오그룹 권한</h3>
</div>
<div class="modal_body">
<div class="modal_cont">
<form id="serviceInfo">
<div class="tbl">
<table class="edit hght">
<colgroup>
<col width="150px">
<col width="auto">
<tbody>
<span id="copySpan">
<tr>
<th class="tl">시나리오그룹</th>
<td>
<div class="sel_box">
<select id="newServiceGroup" class="wide">
<option value="ALL">전체</option>
</select>
</div>
</td>
</tr>
<%-- <tr>--%>
<%-- <th class="tl">권한선택</th>--%>
<%-- <td>--%>
<%-- <ul class="list-user-group-box-ul" id="newAuthChk">--%>
<%-- </ul>--%>
<%-- </td>--%>
<%-- </tr>--%>
</span>
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal_footer">
<div class="btn_wrap fr">
<a href="#" class="btn" id="btnSaveCust">저장</a>
</div>
</div>
<div class="modal_controller">
<a href="#" class="close">close</a>
</div>
</div>
</body>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 관리자모니터링
</p>
</section>
</html>

@ -1,14 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 엔티티
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 대화의도
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 대화의도테스트
</p>
</section>
</html>

@ -1,12 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 대화의도이력
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 학습추진
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 기계학습
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 유의어전처리관리
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 실시간상담
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 상담가이드평가
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 상담가이드평가이력
</p>
</section>
</html>

@ -1,13 +0,0 @@
<html xmlns:th="http://www.thymeleaf.org">
<section id="Content" class="system_management">
<br>
<br>
<br>
<br>
<br>
<p> 상담가이드조회
</p>
</section>
</html>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save