mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
Enhance entim, visitor comments, health metric api, clean container script, etc.
This commit is contained in:
parent
2565ff8f6f
commit
15d0063ec2
@ -19,7 +19,7 @@ RUN chmod +x /opt/install-corretto-8.sh && /opt/install-corretto-8.sh
|
|||||||
|
|
||||||
# install other lib and configure timezone
|
# install other lib and configure timezone
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install --no-install-recommends -y tzdata mysql-client-5.7 zip unzip vim-tiny libfontconfig1 libfreetype6 && \
|
apt-get install --no-install-recommends -y tzdata iputils-ping mysql-client-5.7 zip unzip vim-tiny libfontconfig1 libfreetype6 && \
|
||||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure --frontend noninteractive tzdata && \
|
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure --frontend noninteractive tzdata && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
@ -145,6 +145,10 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
|
@ -239,7 +239,7 @@ public class SystemConfigController extends Handler {
|
|||||||
systemConfig.setConsolelogo(super.saveImageFileWithMultipart(consolelogo));
|
systemConfig.setConsolelogo(super.saveImageFileWithMultipart(consolelogo));
|
||||||
}
|
}
|
||||||
if (favlogo != null && StringUtils.isNotBlank(
|
if (favlogo != null && StringUtils.isNotBlank(
|
||||||
favlogo.getOriginalFilename()) && consolelogo.getOriginalFilename().lastIndexOf(".") > 0) {
|
favlogo.getOriginalFilename()) && favlogo.getOriginalFilename().lastIndexOf(".") > 0) {
|
||||||
systemConfig.setFavlogo(super.saveImageFileWithMultipart(favlogo));
|
systemConfig.setFavlogo(super.saveImageFileWithMultipart(favlogo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,14 +242,14 @@ public class ContactsController extends Handler {
|
|||||||
|
|
||||||
@RequestMapping("/delete")
|
@RequestMapping("/delete")
|
||||||
@Menu(type = "contacts", subtype = "contacts")
|
@Menu(type = "contacts", subtype = "contacts")
|
||||||
public ModelAndView delete(HttpServletRequest request, @Valid Contacts contacts, @Valid String p) {
|
public ModelAndView delete(HttpServletRequest request, @Valid Contacts contacts, @Valid String p, @Valid String ckind) {
|
||||||
if (contacts != null) {
|
if (contacts != null) {
|
||||||
contacts = contactsRes.findOne(contacts.getId());
|
contacts = contactsRes.findOne(contacts.getId());
|
||||||
contacts.setDatastatus(true); //客户和联系人都是 逻辑删除
|
contacts.setDatastatus(true); //客户和联系人都是 逻辑删除
|
||||||
contactsRes.save(contacts);
|
contactsRes.save(contacts);
|
||||||
}
|
}
|
||||||
return request(super.createRequestPageTempletResponse(
|
return request(super.createRequestPageTempletResponse(
|
||||||
"redirect:/apps/contacts/index.html?p=" + p + "&ckind=" + contacts.getCkind()));
|
"redirect:/apps/contacts/index.html?p=" + p + "&ckind=" + ckind));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/add")
|
@RequestMapping("/add")
|
||||||
@ -296,8 +296,9 @@ public class ContactsController extends Handler {
|
|||||||
|
|
||||||
@RequestMapping("/edit")
|
@RequestMapping("/edit")
|
||||||
@Menu(type = "contacts", subtype = "contacts")
|
@Menu(type = "contacts", subtype = "contacts")
|
||||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String ckind) {
|
||||||
map.addAttribute("contacts", contactsRes.findOne(id));
|
map.addAttribute("contacts", contactsRes.findOne(id));
|
||||||
|
map.addAttribute("ckindId", ckind);
|
||||||
return request(super.createRequestPageTempletResponse("/apps/business/contacts/edit"));
|
return request(super.createRequestPageTempletResponse("/apps/business/contacts/edit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +351,7 @@ public class ContactsController extends Handler {
|
|||||||
|
|
||||||
@RequestMapping("/update")
|
@RequestMapping("/update")
|
||||||
@Menu(type = "contacts", subtype = "contacts")
|
@Menu(type = "contacts", subtype = "contacts")
|
||||||
public ModelAndView update(HttpServletRequest request, @Valid Contacts contacts) {
|
public ModelAndView update(HttpServletRequest request, @Valid Contacts contacts , @Valid String ckindId) {
|
||||||
final User logined = super.getUser(request);
|
final User logined = super.getUser(request);
|
||||||
final String orgi = logined.getOrgi();
|
final String orgi = logined.getOrgi();
|
||||||
Contacts data = contactsRes.findOne(contacts.getId());
|
Contacts data = contactsRes.findOne(contacts.getId());
|
||||||
@ -372,13 +373,13 @@ public class ContactsController extends Handler {
|
|||||||
} else {
|
} else {
|
||||||
//无修改,直接点击确定
|
//无修改,直接点击确定
|
||||||
return request(super.createRequestPageTempletResponse(
|
return request(super.createRequestPageTempletResponse(
|
||||||
"redirect:/apps/contacts/index.html?ckind=" + contacts.getCkind()));
|
"redirect:/apps/contacts/index.html?ckind=" + ckindId));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.info("[contacts edit] errer :The same skypeid exists");
|
logger.info("[contacts edit] errer :The same skypeid exists");
|
||||||
msg = "edit_contacts_fail";
|
msg = "edit_contacts_fail";
|
||||||
return request(super.createRequestPageTempletResponse(
|
return request(super.createRequestPageTempletResponse(
|
||||||
"redirect:/apps/contacts/index.html?ckind=" + contacts.getCkind() + "&msg=" + msg));
|
"redirect:/apps/contacts/index.html?ckind=" + ckindId + "&msg=" + msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -411,7 +412,7 @@ public class ContactsController extends Handler {
|
|||||||
contactsRes.save(contacts);
|
contactsRes.save(contacts);
|
||||||
}
|
}
|
||||||
return request(super.createRequestPageTempletResponse(
|
return request(super.createRequestPageTempletResponse(
|
||||||
"redirect:/apps/contacts/index.html?ckind=" + contacts.getCkind() + "&msg=" + msg));
|
"redirect:/apps/contacts/index.html?ckind=" + ckindId + "&msg=" + msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -262,25 +262,26 @@ public class CustomerController extends Handler {
|
|||||||
|
|
||||||
@RequestMapping("/delete")
|
@RequestMapping("/delete")
|
||||||
@Menu(type = "customer", subtype = "customer")
|
@Menu(type = "customer", subtype = "customer")
|
||||||
public ModelAndView delete(HttpServletRequest request, @Valid EntCustomer entCustomer, @Valid String p) {
|
public ModelAndView delete(HttpServletRequest request, @Valid EntCustomer entCustomer, @Valid String p, @Valid String ekind) {
|
||||||
if (entCustomer != null) {
|
if (entCustomer != null) {
|
||||||
entCustomer = entCustomerRes.findOne(entCustomer.getId());
|
entCustomer = entCustomerRes.findOne(entCustomer.getId());
|
||||||
entCustomer.setDatastatus(true); //客户和联系人都是 逻辑删除
|
entCustomer.setDatastatus(true); //客户和联系人都是 逻辑删除
|
||||||
entCustomerRes.save(entCustomer);
|
entCustomerRes.save(entCustomer);
|
||||||
}
|
}
|
||||||
return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?p=" + p + "&ekind=" + entCustomer.getEkind()));
|
return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?p=" + p + "&ekind=" + ekind));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/edit")
|
@RequestMapping("/edit")
|
||||||
@Menu(type = "customer", subtype = "customer")
|
@Menu(type = "customer", subtype = "customer")
|
||||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String ekind) {
|
||||||
map.addAttribute("entCustomer", entCustomerRes.findOne(id));
|
map.addAttribute("entCustomer", entCustomerRes.findOne(id));
|
||||||
|
map.addAttribute("ekindId", ekind);
|
||||||
return request(super.createRequestPageTempletResponse("/apps/business/customer/edit"));
|
return request(super.createRequestPageTempletResponse("/apps/business/customer/edit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/update")
|
@RequestMapping("/update")
|
||||||
@Menu(type = "customer", subtype = "customer")
|
@Menu(type = "customer", subtype = "customer")
|
||||||
public ModelAndView update(HttpServletRequest request, @Valid CustomerGroupForm customerGroupForm) {
|
public ModelAndView update(HttpServletRequest request, @Valid CustomerGroupForm customerGroupForm, @Valid String ekindId) {
|
||||||
final User logined = super.getUser(request);
|
final User logined = super.getUser(request);
|
||||||
EntCustomer customer = entCustomerRes.findOne(customerGroupForm.getEntcustomer().getId());
|
EntCustomer customer = entCustomerRes.findOne(customerGroupForm.getEntcustomer().getId());
|
||||||
String msg = "";
|
String msg = "";
|
||||||
@ -306,7 +307,7 @@ public class CustomerController extends Handler {
|
|||||||
customerGroupForm.getEntcustomer().setPinyin(PinYinTools.getInstance().getFirstPinYin(customerGroupForm.getEntcustomer().getName()));
|
customerGroupForm.getEntcustomer().setPinyin(PinYinTools.getInstance().getFirstPinYin(customerGroupForm.getEntcustomer().getName()));
|
||||||
entCustomerRes.save(customerGroupForm.getEntcustomer());
|
entCustomerRes.save(customerGroupForm.getEntcustomer());
|
||||||
|
|
||||||
return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?ekind=" + customerGroupForm.getEntcustomer().getEkind() + "&msg=" + msg));
|
return request(super.createRequestPageTempletResponse("redirect:/apps/customer/index.html?ekind=" + ekindId + "&msg=" + msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/imp")
|
@RequestMapping("/imp")
|
||||||
|
@ -319,6 +319,7 @@ public class IMController extends Handler {
|
|||||||
data.setWlsid(sid);
|
data.setWlsid(sid);
|
||||||
data.setWlsystem_name(system_name);
|
data.setWlsystem_name(system_name);
|
||||||
data.setName(username + '@' + company_name);
|
data.setName(username + '@' + company_name);
|
||||||
|
data.setShares("all");
|
||||||
|
|
||||||
data.setPinyin(PinYinTools.getInstance().getFirstPinYin(username));
|
data.setPinyin(PinYinTools.getInstance().getFirstPinYin(username));
|
||||||
contactsRes.save(data);
|
contactsRes.save(data);
|
||||||
|
@ -96,11 +96,11 @@ public class AgentSummaryController extends Handler{
|
|||||||
list.add(cb.equal(root.get("process").as(boolean.class), 0)) ;
|
list.add(cb.equal(root.get("process").as(boolean.class), 0)) ;
|
||||||
list.add(cb.notEqual(root.get("channel").as(String.class), MainContext.ChannelType.PHONE.toString())) ;
|
list.add(cb.notEqual(root.get("channel").as(String.class), MainContext.ChannelType.PHONE.toString())) ;
|
||||||
try {
|
try {
|
||||||
if(!StringUtils.isBlank(begin) && begin.matches("[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2}")){
|
if(!StringUtils.isBlank(begin) && begin.matches("[\\d]{4}-[\\d]{2}-[\\d]{2}")){
|
||||||
list.add(cb.greaterThanOrEqualTo(root.get("createtime").as(Date.class), MainUtils.dateFormate.parse(begin))) ;
|
list.add(cb.greaterThanOrEqualTo(root.get("createtime").as(Date.class),MainUtils.simpleDateFormat.parse(begin)));
|
||||||
}
|
}
|
||||||
if(!StringUtils.isBlank(end) && end.matches("[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2}")){
|
if(!StringUtils.isBlank(end) && end.matches("[\\d]{4}-[\\d]{2}-[\\d]{2}")){
|
||||||
list.add(cb.lessThanOrEqualTo(root.get("createtime").as(Date.class), MainUtils.dateFormate.parse(end))) ;
|
list.add(cb.lessThanOrEqualTo(root.get("createtime").as(Date.class),MainUtils.dateFormate.parse(end + " 23:59:59")));
|
||||||
}
|
}
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -102,10 +102,10 @@ public class ProcessedSummaryController extends Handler{
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if(!StringUtils.isBlank(begin) && begin.matches("[\\d]{4}-[\\d]{2}-[\\d]{2}")) {
|
if(!StringUtils.isBlank(begin) && begin.matches("[\\d]{4}-[\\d]{2}-[\\d]{2}")) {
|
||||||
list.add(cb.greaterThanOrEqualTo(root.get("createtime").as(Date.class), MainUtils.simpleDateFormat.parse(begin))) ;
|
list.add(cb.greaterThanOrEqualTo(root.get("createtime").as(Date.class), MainUtils.simpleDateFormat.parse(begin)));
|
||||||
}
|
}
|
||||||
if(!StringUtils.isBlank(end) && end.matches("[\\d]{4}-[\\d]{2}-[\\d]{2}")){
|
if(!StringUtils.isBlank(end) && end.matches("[\\d]{4}-[\\d]{2}-[\\d]{2}")){
|
||||||
list.add(cb.lessThanOrEqualTo(root.get("createtime").as(Date.class), MainUtils.dateFormate.parse(end + " 23:59:59")));
|
list.add(cb.lessThanOrEqualTo(root.get("createtime").as(Date.class),MainUtils.dateFormate.parse(end + " 23:59:59")));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -502,7 +502,7 @@ public class UserProxy {
|
|||||||
*
|
*
|
||||||
* @param user
|
* @param user
|
||||||
*/
|
*/
|
||||||
public void processAffiliates(final User user, final Map<String, String> skills, final Organ organ) {
|
public void processAffiliates(final User user, final Organ organ) {
|
||||||
if (organ == null) {
|
if (organ == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -513,15 +513,13 @@ public class UserProxy {
|
|||||||
|
|
||||||
user.getAffiliates().add(organ.getId());
|
user.getAffiliates().add(organ.getId());
|
||||||
|
|
||||||
if (organ.isSkill()) skills.put(organ.getId(), organ.getName());
|
|
||||||
|
|
||||||
// 获得子部门
|
// 获得子部门
|
||||||
List<Organ> y = organRes.findByOrgiAndParent(user.getOrgi(), organ.getId());
|
List<Organ> y = organRes.findByOrgiAndParent(user.getOrgi(), organ.getId());
|
||||||
|
|
||||||
for (Organ x : y) {
|
for (Organ x : y) {
|
||||||
try {
|
try {
|
||||||
// 递归调用
|
// 递归调用
|
||||||
processAffiliates(user, skills, x);
|
processAffiliates(user, x);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("processAffiliates", e);
|
logger.error("processAffiliates", e);
|
||||||
}
|
}
|
||||||
@ -544,9 +542,12 @@ public class UserProxy {
|
|||||||
// 添加直属部门到organs
|
// 添加直属部门到organs
|
||||||
final Organ o = organRes.findOne(organ.getOrgan());
|
final Organ o = organRes.findOne(organ.getOrgan());
|
||||||
user.getOrgans().put(organ.getOrgan(), o);
|
user.getOrgans().put(organ.getOrgan(), o);
|
||||||
|
if (o.isSkill()) {
|
||||||
|
skills.put(o.getId(), o.getName());
|
||||||
|
}
|
||||||
|
|
||||||
// 添加部门及附属部门
|
// 添加部门及附属部门
|
||||||
processAffiliates(user, skills, o);
|
processAffiliates(user, o);
|
||||||
}
|
}
|
||||||
|
|
||||||
user.setSkills(skills);
|
user.setSkills(skills);
|
||||||
|
@ -512,6 +512,8 @@ input,textarea{
|
|||||||
border: 1px solid #DDDDDD;
|
border: 1px solid #DDDDDD;
|
||||||
float: left;
|
float: left;
|
||||||
min-width: 25px;
|
min-width: 25px;
|
||||||
|
max-width: 400px;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.chatting-left div.chat-content *{
|
.chatting-left div.chat-content *{
|
||||||
background-color: #EDEDED !important;
|
background-color: #EDEDED !important;
|
||||||
|
Binary file not shown.
@ -418,7 +418,7 @@ input,textarea{
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
width:70px;
|
width:70px;
|
||||||
top:5px;
|
top:9px;
|
||||||
}
|
}
|
||||||
.mobile-chat-bottom .send-btn{
|
.mobile-chat-bottom .send-btn{
|
||||||
width: 96px;
|
width: 96px;
|
||||||
@ -467,8 +467,8 @@ input,textarea{
|
|||||||
}
|
}
|
||||||
.mobile-chat-bottom #message {
|
.mobile-chat-bottom #message {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 45px;
|
left: 80px;
|
||||||
width: calc(100% - 130px);
|
width: calc(100% - 160px);
|
||||||
border:1px solid #cccccc;
|
border:1px solid #cccccc;
|
||||||
font-size:16px;
|
font-size:16px;
|
||||||
height:40px;
|
height:40px;
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -126,7 +126,7 @@
|
|||||||
<div class="col-lg-4" style="text-align:right;position: relative;">
|
<div class="col-lg-4" style="text-align:right;position: relative;">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-box layui-upload-button">
|
<div class="layui-box layui-upload-button">
|
||||||
<input type="file" name="favlogo" accept="image/ico, image/gif, image/jpeg, image/png" lay-ext="jpg|png|gif" class="layui-upload-file" onchange="$('#favlogo_img').html($(this).val());">
|
<input type="file" name="favlogo" accept="image/ico, image/icon, image/gif, image/jpeg, image/png" lay-ext="jpg|png|ico|icon|gif" class="layui-upload-file" onchange="$('#favlogo_img').html($(this).val());">
|
||||||
<span class="layui-upload-icon"><i class="layui-icon"></i>上传图片</span>
|
<span class="layui-upload-icon"><i class="layui-icon"></i>上传图片</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -318,7 +318,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ukefu-webim-tl">2、自定义LOGO</div>
|
<div class="ukefu-webim-tl">2、自定义LOGO (建议尺寸:220*60)</div>
|
||||||
<div class="box-item" style="position: relative;padding-bottom: 40px">
|
<div class="box-item" style="position: relative;padding-bottom: 40px">
|
||||||
<span class="ukefu-logo">
|
<span class="ukefu-logo">
|
||||||
<img id="webim_show" src="<#if inviteData?? && inviteData.consult_dialog_logo??>/res/image.html?id=${inviteData.consult_dialog_logo?url}<#else>/images/logo2.png</#if>" style="height:40px;">
|
<img id="webim_show" src="<#if inviteData?? && inviteData.consult_dialog_logo??>/res/image.html?id=${inviteData.consult_dialog_logo?url}<#else>/images/logo2.png</#if>" style="height:40px;">
|
||||||
@ -333,7 +333,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ukefu-webim-tl">3、自定义客服图标</div>
|
<div class="ukefu-webim-tl">3、自定义客服图标 (建议尺寸:80*80)</div>
|
||||||
<div class="box-item" style="position: relative;padding-bottom: 40px">
|
<div class="box-item" style="position: relative;padding-bottom: 40px">
|
||||||
<span class="ukefu-logo">
|
<span class="ukefu-logo">
|
||||||
<img id="agent_show" src="<#if inviteData?? && inviteData.consult_dialog_headimg??>/res/image.html?id=${inviteData.consult_dialog_headimg?url}<#else>/images/agent.png</#if>" style="height:40px;">
|
<img id="agent_show" src="<#if inviteData?? && inviteData.consult_dialog_headimg??>/res/image.html?id=${inviteData.consult_dialog_headimg?url}<#else>/images/agent.png</#if>" style="height:40px;">
|
||||||
|
@ -166,7 +166,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ukefu-webim-prop">
|
<div class="ukefu-webim-prop">
|
||||||
<div class="ukefu-webim-tl">7、自定义访客邀请框背景图片</div>
|
<div class="ukefu-webim-tl">7、自定义访客邀请框背景图片 (建议尺寸:273*230)</div>
|
||||||
<div class="box-item" style="position: relative;">
|
<div class="box-item" style="position: relative;">
|
||||||
<span class="ukefu-logo">
|
<span class="ukefu-logo">
|
||||||
<img id="invite_show" src="<#if inviteData?? && inviteData.consult_invite_bg??>/res/image.html?id=${inviteData.consult_invite_bg?url}<#else>/im/img/webwxgetmsgimg.jpg</#if>" style="height:175px;">
|
<img id="invite_show" src="<#if inviteData?? && inviteData.consult_invite_bg??>/res/image.html?id=${inviteData.consult_invite_bg?url}<#else>/im/img/webwxgetmsgimg.jpg</#if>" style="height:175px;">
|
||||||
|
@ -140,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ukefu-webim-prop">
|
<div class="ukefu-webim-prop">
|
||||||
<div class="ukefu-webim-tl">7、自定义形象图片</div>
|
<div class="ukefu-webim-tl">7、自定义形象图片 (建议尺寸:276*236)</div>
|
||||||
<div class="box-item" style="position: relative;">
|
<div class="box-item" style="position: relative;">
|
||||||
<span class="ukefu-logo">
|
<span class="ukefu-logo">
|
||||||
<img id="agent_show" src="<#if inviteData?? && inviteData.dialog_ad??>/res/image.html?id=${inviteData.dialog_ad?url}<#else>/im/img/pic01.jpg</#if>" style="height:130px;">
|
<img id="agent_show" src="<#if inviteData?? && inviteData.dialog_ad??>/res/image.html?id=${inviteData.dialog_ad?url}<#else>/im/img/pic01.jpg</#if>" style="height:130px;">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div class="uk-layui-form">
|
<div class="uk-layui-form">
|
||||||
<form class="layui-form" action="/apps/contacts/update.html" method="post">
|
<form class="layui-form" action="/apps/contacts/update.html" method="post">
|
||||||
<input type="hidden" name="id" value="${contacts.id!''}">
|
<input type="hidden" name="id" value="${contacts.id!''}">
|
||||||
|
<input type="hidden" name="ckindId" value="${ckindId!''}">
|
||||||
<input type="hidden" name="wluid" value="${contacts.wluid!''}">
|
<input type="hidden" name="wluid" value="${contacts.wluid!''}">
|
||||||
<input type="hidden" name="wlusername" value="${contacts.wlusername!''}">
|
<input type="hidden" name="wlusername" value="${contacts.wlusername!''}">
|
||||||
<input type="hidden" name="wlcid" value="${contacts.wlcid!''}">
|
<input type="hidden" name="wlcid" value="${contacts.wlcid!''}">
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<div class="layui-input-inline" style="width: 218px;">
|
<div class="layui-input-inline" style="width: 218px;">
|
||||||
<input type="text" name="q" value="${q!''}" style="height: 30px;line-height: 30px;margin-top: 4px;border: 1px solid #32c24d;" placeholder="请输入联系人姓名或电话" autocomplete="off" class="layui-input">
|
<input type="text" id="q" name="q" value="${q!''}" style="height: 30px;line-height: 30px;margin-top: 4px;border: 1px solid #32c24d;" placeholder="请输入联系人姓名或电话" autocomplete="off" class="layui-input">
|
||||||
<i class="layui-icon" onclick="search.submit()" style="position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;"></i>
|
<i class="layui-icon" onclick="search.submit()" style="position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -145,12 +145,12 @@
|
|||||||
<i class="layui-icon"></i> 详情
|
<i class="layui-icon"></i> 详情
|
||||||
</a>
|
</a>
|
||||||
<#if user?? && (user.roleAuthMap[ "A02_A01_A02_B06"]?? || user.admin)>
|
<#if user?? && (user.roleAuthMap[ "A02_A01_A02_B06"]?? || user.admin)>
|
||||||
<a href="/apps/contacts/edit.html?id=${contacts.id!''}" data-toggle="ajax" data-width="950" data-height="600" data-title="编辑联系人信息">
|
<a href="/apps/contacts/edit.html?id=${contacts.id!''}&ckind=${ckind!''}" data-toggle="ajax" data-width="950" data-height="600" data-title="编辑联系人信息">
|
||||||
<i class="layui-icon"></i> 编辑
|
<i class="layui-icon"></i> 编辑
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#if>
|
||||||
<#if user?? && (user.roleAuthMap[ "A02_A01_A02_B07"]?? || user.admin)>
|
<#if user?? && (user.roleAuthMap[ "A02_A01_A02_B07"]?? || user.admin)>
|
||||||
<a href="/apps/contacts/delete.html?id=${contacts.id!''}" style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除联系人?">
|
<a href="/apps/contacts/delete.html?id=${contacts.id!''}&ckind=${ckind!''}" style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除联系人?">
|
||||||
<i class="layui-icon" style="color:red;">ဆ</i> 删除
|
<i class="layui-icon" style="color:red;">ဆ</i> 删除
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#if>
|
||||||
@ -211,7 +211,7 @@
|
|||||||
,groups : 5 //连续显示分页数
|
,groups : 5 //连续显示分页数
|
||||||
,jump : function(data, first) {
|
,jump : function(data, first) {
|
||||||
if (!first) {
|
if (!first) {
|
||||||
location.href = "/apps/contacts/${subtype!'index'}.html?p=" + data.curr;
|
location.href = "/apps/contacts/${subtype!'index'}.html?ckind=${ckind!''}&p=" + data.curr + "&q=" + $("#q").val();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div class="uk-layui-form">
|
<div class="uk-layui-form">
|
||||||
<form class="layui-form" action="/apps/customer/update.html" method="post">
|
<form class="layui-form" action="/apps/customer/update.html" method="post">
|
||||||
<input type="hidden" name="entcustomer.id" value="${entCustomer.id!''}">
|
<input type="hidden" name="entcustomer.id" value="${entCustomer.id!''}">
|
||||||
|
<input type="hidden" name="ekindId" value="${ekindId!''}">
|
||||||
<div class="layui-collapse">
|
<div class="layui-collapse">
|
||||||
<div class="layui-colla-item">
|
<div class="layui-colla-item">
|
||||||
<h2 class="layui-colla-title">基本信息</h2>
|
<h2 class="layui-colla-title">基本信息</h2>
|
||||||
|
@ -145,14 +145,14 @@
|
|||||||
</td>
|
</td>
|
||||||
<td style="white-space:nowrap;width:1%;" nowrap="nowrap">
|
<td style="white-space:nowrap;width:1%;" nowrap="nowrap">
|
||||||
<#if user?? && (user.roleAuthMap["A03_A01_A02_B07"]?? || user.admin) >
|
<#if user?? && (user.roleAuthMap["A03_A01_A02_B07"]?? || user.admin) >
|
||||||
<a href="/apps/customer/edit.html?id=${entCustomer.id!''}" data-toggle="ajax" data-width="950"
|
<a href="/apps/customer/edit.html?id=${entCustomer.id!''}&ekind=${ekind!''}" data-toggle="ajax" data-width="950"
|
||||||
data-height="600" data-title="编辑用户信息">
|
data-height="600" data-title="编辑用户信息">
|
||||||
<i class="layui-icon"></i>
|
<i class="layui-icon"></i>
|
||||||
编辑
|
编辑
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#if>
|
||||||
<#if user?? && (user.roleAuthMap["A03_A01_A02_B08"]?? || user.admin) >
|
<#if user?? && (user.roleAuthMap["A03_A01_A02_B08"]?? || user.admin) >
|
||||||
<a href="/apps/customer/delete.html?id=${entCustomer.id!''}" style="margin-left:10px;" data-toggle="tip"
|
<a href="/apps/customer/delete.html?id=${entCustomer.id!''}&ekind=${ekind!''}" style="margin-left:10px;" data-toggle="tip"
|
||||||
data-title="请确认是否删除记录?">
|
data-title="请确认是否删除记录?">
|
||||||
<i class="layui-icon" style="color:red;">ဆ</i>
|
<i class="layui-icon" style="color:red;">ဆ</i>
|
||||||
删除
|
删除
|
||||||
@ -235,7 +235,7 @@
|
|||||||
,groups: 5 //连续显示分页数
|
,groups: 5 //连续显示分页数
|
||||||
,jump:function(data , first){
|
,jump:function(data , first){
|
||||||
if(!first){
|
if(!first){
|
||||||
location.href = "/apps/customer/${subtype!'index'}.html?p="+data.curr ;
|
location.href = "/apps/customer/${subtype!'index'}.html?p="+data.curr + "&ekind=${ekind!''}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -229,6 +229,7 @@
|
|||||||
shade: 0,
|
shade: 0,
|
||||||
content: url
|
content: url
|
||||||
});
|
});
|
||||||
|
top.$('#'+id).next().find("a.layui-layer-maxmin").click();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -185,6 +185,7 @@
|
|||||||
shade: 0,
|
shade: 0,
|
||||||
content: url
|
content: url
|
||||||
});
|
});
|
||||||
|
top.$('#'+id).next().find("a.layui-layer-maxmin").click();
|
||||||
if($('#msgbox').data("msgbox") - $('.cont_'+id).data("newmsg") > 0){
|
if($('#msgbox').data("msgbox") - $('.cont_'+id).data("newmsg") > 0){
|
||||||
$('#msgbox').data("newmsg" , $('#msgbox').data("msgbox") - $('.cont_'+id).data("newmsg")) ;
|
$('#msgbox').data("newmsg" , $('#msgbox').data("msgbox") - $('.cont_'+id).data("newmsg")) ;
|
||||||
}else{
|
}else{
|
||||||
|
@ -311,8 +311,10 @@
|
|||||||
if(isAgentEnds){
|
if(isAgentEnds){
|
||||||
alert("服务评价已提交,请关闭浏览器!");
|
alert("服务评价已提交,请关闭浏览器!");
|
||||||
isAgentEnds = false ;
|
isAgentEnds = false ;
|
||||||
|
|
||||||
service_end = true;
|
service_end = true;
|
||||||
}
|
}
|
||||||
|
alert("服务评价已提交");
|
||||||
} , "id="+form.id.value+"&satislevel="+document.getElementById("satislevel_input").value +"&satiscomment="+encodeURIComponent(satisComment));
|
} , "id="+form.id.value+"&satislevel="+document.getElementById("satislevel_input").value +"&satiscomment="+encodeURIComponent(satisComment));
|
||||||
return false ;
|
return false ;
|
||||||
}
|
}
|
||||||
|
@ -245,12 +245,12 @@
|
|||||||
<input type="file" name="imgFile" id="imgFile" accept="image/*" onChange="$('#imgForm').submit();$(this).val('');">
|
<input type="file" name="imgFile" id="imgFile" accept="image/*" onChange="$('#imgForm').submit();$(this).val('');">
|
||||||
</a>
|
</a>
|
||||||
</form>
|
</form>
|
||||||
|
<img id="evaluation" onclick="popup('block')" src="/im/img/evaluationm.png" style="width:32px;height:32px; margin-left: 40px;margin-top: 5px;"></a>
|
||||||
<textarea id="message" name="content" maxlength="<#if inviteData.maxwordsnum gt 0>${inviteData.maxwordsnum}<#else>300</#if>"></textarea>
|
<textarea id="message" name="content" maxlength="<#if inviteData.maxwordsnum gt 0>${inviteData.maxwordsnum}<#else>300</#if>"></textarea>
|
||||||
<div class="btn-push clearfix" class="tools">
|
<div class="btn-push clearfix" class="tools">
|
||||||
<img id="facedialog" onclick="return openFaceDialog()" src="/im/img/face.png" style="width:32px;height:32px;"></a>
|
<img id="facedialog" onclick="return openFaceDialog()" src="/im/img/face.png" style="width:32px;height:32px;"></a>
|
||||||
<a href="javascript:void(0)" onClick="sendMessage();return false;"><img src="/im/img/send.png" style="width:32px;height:32px;"></a>
|
<a href="javascript:void(0)" onClick="sendMessage();return false;"><img src="/im/img/send.png" style="width:32px;height:32px;"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="faceindex" style="display:none;height:200px;position: absolute;bottom: 0px;width:100%;overflow-x:auto;">
|
<div id="faceindex" style="display:none;height:200px;position: absolute;bottom: 0px;width:100%;overflow-x:auto;">
|
||||||
<table class="ke-table" cellpadding="0" cellspacing="0" border="0" style="min-width:100%;">
|
<table class="ke-table" cellpadding="0" cellspacing="0" border="0" style="min-width:100%;">
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -268,16 +268,199 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<#if sessionConfig?? && sessionConfig.satisfaction?? && sessionConfig.satisfaction>
|
||||||
|
<!--调查问卷弹框-->
|
||||||
|
<div class="dialogWrap" id="dialogWrap" style="display: none;height: auto;margin:0px;top:0;left: 0;border:none;width: 100%;height: 100%;background-color:#fff;overflow: auto">
|
||||||
|
<div class="dialogCon">
|
||||||
|
<form id="commentContent" onSubmit="return submitForm(this)">
|
||||||
|
<input type="hidden" name="id" id="agentserviceid" name="agentserviceid">
|
||||||
|
<div style="width: 100%;height: 100%;overflow:auto;">
|
||||||
|
<h2 class="diaHeader clearfix" style="width: 90%;margin: 0 auto;">
|
||||||
|
<span>评价</span>
|
||||||
|
<hr style="width: 100%;">
|
||||||
|
</h2>
|
||||||
|
<p class="title" style="width: 90%;margin: 10px auto 0;">您是否对此次服务满意?</p>
|
||||||
|
<!--评价-->
|
||||||
|
<div style="width: 90%;margin: 20px auto">
|
||||||
|
<span style="font-weight: 600;font-size: 16px;">评价:</span>
|
||||||
|
<span style="position: relative;top: 10px">
|
||||||
|
<div style="width: 100%;height: auto;margin-bottom: 15px">
|
||||||
|
<#assign defaultvalue = "">
|
||||||
|
<#if commentList??>
|
||||||
|
<#list commentList as comment>
|
||||||
|
<div style="margin-bottom:15px;width: 188px">
|
||||||
|
<input type="radio" name="satislevel" value="${comment.code!''}" <#if comment_index == 0>checked="checked"</#if> id="dic_${comment.id!''}" onclick="document.getElementById('satislevel_input').value = this.value">
|
||||||
|
<label for="dic_${comment.id!''}" class="radio">${comment.name!''}</label>
|
||||||
|
</div>
|
||||||
|
<#if defaultvalue == "">
|
||||||
|
<#assign defaultvalue = comment.code>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
<input type="hidden" id="satislevel_input" name="t" value="${defaultvalue}">
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style="width: 90%;margin: 20px auto">
|
||||||
|
<span style="font-weight: 600;font-size: 16px;">意见:</span>
|
||||||
|
<input type="hidden" id="comment_input" name="t">
|
||||||
|
<span style="position: relative;top: 10px">
|
||||||
|
<div style="width: 100%;height: auto;margin-bottom: 15px">
|
||||||
|
<#if commentItemList??>
|
||||||
|
<#list commentItemList as item>
|
||||||
|
<div style="margin-bottom:15px;width: 188px">
|
||||||
|
<input type="radio" name="comment" id="item_${item.id!''}" value="${item.id!''}" contentname="${item.name!''}" onclick="selectOther(this.getAttribute('contentname'),this.value)">
|
||||||
|
<label for="item_${item.id!''}" class="radio" style="margin-right: 0px">
|
||||||
|
${item.name!''}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</#list>
|
||||||
|
<textarea name="comment" id="othertxt" placeholder="请输入意见(最大长度为200个字符)" class="layui-textarea" style="resize:none;display: none;height: 85px; width:100%;background: #f7f7f7;border-color: #ccc;font-size: 14px;outline: none;padding-left: 10px;border-radius: 2px;" maxlength="200"></textarea>
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%;height: 85px"></div>
|
||||||
|
<!--按钮-->
|
||||||
|
<p class="submitBtnWrap" style="background:#fff;position: fixed;bottom: 0px;left:0px;width: 100%;height:100px;padding-right: 0px;margin-bottom: 0px;z-index: 10">
|
||||||
|
<input type="submit" class="btn submitBtn" id="submitBtn" style="width: 85% !important;display: block;margin: 0 auto;" value="提 交">
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
<script>
|
<script>
|
||||||
var service_end = false;
|
var service_end = false;
|
||||||
// 调查问卷
|
// 调查问卷
|
||||||
var diaShade = document.getElementById('diaShade');
|
|
||||||
var dialogWrap = document.getElementById('dialogWrap');
|
var dialogWrap = document.getElementById('dialogWrap');
|
||||||
function popup(para) {
|
function popup(para) {
|
||||||
diaShade.style.display = para;
|
|
||||||
dialogWrap.style.display = para;
|
dialogWrap.style.display = para;
|
||||||
}
|
}
|
||||||
|
function selectOther(name,value){
|
||||||
|
var otherTxt = document.getElementById('othertxt');
|
||||||
|
if (name == "其他"){
|
||||||
|
otherTxt.style.display="block"
|
||||||
|
}else{
|
||||||
|
otherTxt.style.display="none";
|
||||||
|
}
|
||||||
|
document.getElementById("comment_input").value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
var R3Ajax = {
|
||||||
|
ajax:function(opt){
|
||||||
|
var xhr = this.createXhrObject();
|
||||||
|
xhr.onreadystatechange = function(){
|
||||||
|
if(xhr.readyState!=4) return ;
|
||||||
|
(xhr.status===200 ?
|
||||||
|
opt.success(xhr.responseText,xhr.responseXML):
|
||||||
|
opt.error(xhr.responseText,xhr.status));
|
||||||
|
}
|
||||||
|
xhr.open(opt.type,opt.url,true);
|
||||||
|
if(opt.type!=='post')
|
||||||
|
opt.data=null;
|
||||||
|
else
|
||||||
|
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
|
||||||
|
opt.data = this.parseQuery(opt.data);
|
||||||
|
xhr.send(opt.data);
|
||||||
|
},
|
||||||
|
post:function(url,success,data){
|
||||||
|
var popt = {
|
||||||
|
url:url,
|
||||||
|
type:'post',
|
||||||
|
data:data,
|
||||||
|
success:success,
|
||||||
|
error:function(data){}
|
||||||
|
}
|
||||||
|
this.ajax(popt);
|
||||||
|
},
|
||||||
|
get:function(url,success){
|
||||||
|
var gopt = {
|
||||||
|
url:url,
|
||||||
|
type:'get',
|
||||||
|
success:success,
|
||||||
|
error:function(){}
|
||||||
|
}
|
||||||
|
this.ajax(gopt);
|
||||||
|
},
|
||||||
|
createXhrObject:function(){
|
||||||
|
var methods = [
|
||||||
|
function(){ return new XMLHttpRequest();},
|
||||||
|
function(){ return new ActiveXObject('Msxml2.XMLHTTP');},
|
||||||
|
function(){ return new ActiveXObject('Microsoft.XMLHTTP');}
|
||||||
|
];
|
||||||
|
for(var i=0;len=methods.length,i<len;i++){
|
||||||
|
try{
|
||||||
|
methods[i]();
|
||||||
|
}catch(e){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
this.createXhrObject = methods[i];
|
||||||
|
return methods[i]();
|
||||||
|
}
|
||||||
|
throw new Error('Could not create an XHR object.');
|
||||||
|
},
|
||||||
|
parseQuery:function(json){
|
||||||
|
if(typeof json == 'object'){
|
||||||
|
var str = '';
|
||||||
|
for(var i in json){
|
||||||
|
str += "&"+i+"="+encodeURIComponent(json[i]);
|
||||||
|
}
|
||||||
|
return str.length==0 ? str : str.substring(1);
|
||||||
|
}else{
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
audioplayer:function(id, file, loop) {
|
||||||
|
var audioplayer = document.getElementById(id);
|
||||||
|
if (audioplayer != null) {
|
||||||
|
document.body.removeChild(audioplayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof(file) != 'undefined') {
|
||||||
|
if (navigator.userAgent.indexOf("MSIE") > 0) { // IE
|
||||||
|
var player = document.createElement('bgsound');
|
||||||
|
player.id = id;
|
||||||
|
player.src = file['mp3'];
|
||||||
|
player.setAttribute('autostart', 'true');
|
||||||
|
if (loop) {
|
||||||
|
player.setAttribute('loop', 'infinite');
|
||||||
|
}
|
||||||
|
document.body.appendChild(player);
|
||||||
|
|
||||||
|
} else { // Other FF Chome Safari Opera
|
||||||
|
var player = document.createElement('audio');
|
||||||
|
player.id = id;
|
||||||
|
player.setAttribute('autoplay', 'autoplay');
|
||||||
|
if (loop) {
|
||||||
|
player.setAttribute('loop', 'loop');
|
||||||
|
}
|
||||||
|
document.body.appendChild(player);
|
||||||
|
|
||||||
|
var mp3 = document.createElement('source');
|
||||||
|
mp3.src = file['mp3'];
|
||||||
|
mp3.type = 'audio/mpeg';
|
||||||
|
player.appendChild(mp3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function submitForm(form){
|
||||||
|
var satisComment = "";
|
||||||
|
var otherVal = document.getElementById('othertxt').value;
|
||||||
|
var comInputVal = document.getElementById("comment_input").value;
|
||||||
|
if(otherVal.length>0){
|
||||||
|
satisComment = otherVal;
|
||||||
|
}else{
|
||||||
|
satisComment = comInputVal;
|
||||||
|
}
|
||||||
|
R3Ajax.post("/im/satis.html?orgi=${orgi!''}" , function(){
|
||||||
|
document.getElementById("dialogWrap").style.display = "none" ;
|
||||||
|
alert("服务评价已提交");
|
||||||
|
} , "id="+form.id.value+"&satislevel="+document.getElementById("satislevel_input").value +"&satiscomment="+encodeURIComponent(satisComment));
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
document.getElementById('above').scrollTop = document
|
document.getElementById('above').scrollTop = document
|
||||||
.getElementById('above').scrollHeight; //滚动到 对话内容的 底部
|
.getElementById('above').scrollHeight; //滚动到 对话内容的 底部
|
||||||
// 参数连接
|
// 参数连接
|
||||||
@ -299,6 +482,9 @@
|
|||||||
service_end = true ;
|
service_end = true ;
|
||||||
//editor.readonly();
|
//editor.readonly();
|
||||||
}
|
}
|
||||||
|
if(document.getElementById("agentserviceid")){
|
||||||
|
document.getElementById("agentserviceid").value = data.agentserviceid;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
socket.on('message', function(data) {
|
socket.on('message', function(data) {
|
||||||
var chat=document.getElementsByClassName('chatting-left').innerText;
|
var chat=document.getElementsByClassName('chatting-left').innerText;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
content="width=device-width, maximum-scale=1.0, initial-scale=1.0,initial-scale=1.0,user-scalable=no" />
|
content="width=device-width, maximum-scale=1.0, initial-scale=1.0,initial-scale=1.0,user-scalable=no" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<title><#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if></title>
|
<title><#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>春松客服-全渠道智能客服</#if></title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="<#if systemConfig?? && systemConfig.favlogo?? && systemConfig.favlogo != ''>/res/image.html?id=${systemConfig.favlogo?url}<#else>/images/favicon.ico</#if>?t=${.now?long}"/>
|
<link rel="shortcut icon" type="image/x-icon" href="<#if systemConfig?? && systemConfig.favlogo?? && systemConfig.favlogo != ''>/res/image.html?id=${systemConfig.favlogo?url}<#else>/images/favicon.ico?t=${.now?long}</#if>"/>
|
||||||
<link rel="stylesheet" href="/css/flexboxgrid.min.css">
|
<link rel="stylesheet" href="/css/flexboxgrid.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="/css/darktooltip.css" />
|
<link rel="stylesheet" type="text/css" href="/css/darktooltip.css" />
|
||||||
<link rel="stylesheet" href="css/layui.css">
|
<link rel="stylesheet" href="css/layui.css">
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
历史会话<#if agentServiceList??>(${agentServiceList.totalElements})</#if>
|
历史会话<#if agentServiceList??>(${agentServiceList.totalElements})</#if>
|
||||||
</h1>
|
</h1>
|
||||||
<span>
|
<span>
|
||||||
<form class="layui-form" name="search" action="/service/history/index.html" method="get" style="float: left;margin-right:5px">
|
<form class="layui-form" name="search" id="search" action="/service/history/index.html" method="get" style="float: left;margin-right:5px">
|
||||||
<div class="layui-form-item" style="width: 700px;padding-left: 5px">
|
<div class="layui-form-item" style="width: 700px;padding-left: 5px">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
||||||
@ -74,39 +74,30 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</select>
|
</select>
|
||||||
<label >~</label>
|
<label >~</label>
|
||||||
<!-- <select name="allocation" id="allocation" class="layui-input ukefu-input" lay-ignore>-->
|
<select name="allocation" id="allocation" class="layui-input ukefu-input" lay-ignore>
|
||||||
<!-- <option value="">请选择坐席</option>-->
|
<option value="">请先选择分类</option>
|
||||||
<!-- <#if agentList??>-->
|
<#if servicetype=="agentno">
|
||||||
<!-- <#list agentList as useragent>-->
|
<#if userlist?? >
|
||||||
<!-- <option value="${useragent.id}" <#if agent?? && agent == useragent.id>selected="selected"</#if>>${useragent.uname!''}</option>-->
|
<#list userlist as user >
|
||||||
<!-- </#list>-->
|
<#if allocation??>
|
||||||
<!-- </#if>-->
|
<option value="${user.id}" <#if allocation?? && allocation == user.id>selected="selected"</#if>>${user.uname}</option>
|
||||||
<!-- </select>-->
|
<#else>
|
||||||
|
<option value="${user.id}">${user.uname}</option>
|
||||||
<select name="allocation" id="allocation" class="layui-input ukefu-input" lay-ignore>
|
</#if>
|
||||||
<option value="">请先选择分类</option>
|
</#list>
|
||||||
<#if servicetype=="agentno">
|
</#if>
|
||||||
<#if userlist?? >
|
<#elseif servicetype=="skill">
|
||||||
<#list userlist as user >
|
<#if deptlist?? >
|
||||||
<#if allocation??>
|
<#list deptlist as dept >
|
||||||
<option value="${user.id}" <#if allocation?? && allocation == user.id>selected="selected"</#if>>${user.uname}</option>
|
<#if allocation??>
|
||||||
<#else>
|
<option value="${dept.id}" <#if allocation?? && allocation == dept.id>selected="selected"</#if>>${dept.name}</option>
|
||||||
<option value="${user.id}">${user.uname}</option>
|
<#else>
|
||||||
</#if>
|
<option value="${dept.id}">${dept.name}</option>
|
||||||
</#list>
|
</#if>
|
||||||
</#if>
|
</#list>
|
||||||
<#else>
|
</#if>
|
||||||
<#if deptlist?? >
|
</#if>
|
||||||
<#list deptlist as dept >
|
</select>
|
||||||
<#if allocation??>
|
|
||||||
<option value="${dept.id}" <#if allocation?? && allocation == dept.id>selected="selected"</#if>>${dept.name}</option>
|
|
||||||
<#else>
|
|
||||||
<option value="${dept.id}">${dept.name}</option>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -193,6 +184,11 @@
|
|||||||
var form = layui.form();
|
var form = layui.form();
|
||||||
form.render(); //更新全部
|
form.render(); //更新全部
|
||||||
});
|
});
|
||||||
|
var searchData = $("#search :input").serializeArray()
|
||||||
|
var searchCondition = "";
|
||||||
|
$.each(searchData, function() {
|
||||||
|
searchCondition += '&'+this.name+'='+this.value
|
||||||
|
});
|
||||||
layui.use(['laypage', 'layer'], function(){
|
layui.use(['laypage', 'layer'], function(){
|
||||||
var laypage = layui.laypage
|
var laypage = layui.laypage
|
||||||
,layer = layui.layer;
|
,layer = layui.layer;
|
||||||
@ -203,7 +199,7 @@
|
|||||||
,groups: 5 //连续显示分页数
|
,groups: 5 //连续显示分页数
|
||||||
,jump:function(data , first){
|
,jump:function(data , first){
|
||||||
if(!first){
|
if(!first){
|
||||||
location.href = "/service/history/index.html?p="+data.curr ;
|
location.href = "/service/history/index.html?p="+data.curr+searchCondition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -227,8 +223,6 @@
|
|||||||
var currentdate = year + seperator + month + seperator + strDate;
|
var currentdate = year + seperator + month + seperator + strDate;
|
||||||
return currentdate;
|
return currentdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var start = {
|
var start = {
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
max:getNowFormatDate(),//默认最大值为当前日期
|
max:getNowFormatDate(),//默认最大值为当前日期
|
||||||
@ -237,7 +231,6 @@
|
|||||||
end.min = datas; //开始日选好后,重置结束日的最小日期
|
end.min = datas; //开始日选好后,重置结束日的最小日期
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var end = {
|
var end = {
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
max:getNowFormatDate(),//默认最大值为当前日期
|
max:getNowFormatDate(),//默认最大值为当前日期
|
||||||
@ -246,7 +239,6 @@
|
|||||||
start.max = datas; //结束日选好后,重置开始日的最大日期
|
start.max = datas; //结束日选好后,重置开始日的最大日期
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById('begin').onclick = function () {
|
document.getElementById('begin').onclick = function () {
|
||||||
start.elem = this;
|
start.elem = this;
|
||||||
laydate(start);
|
laydate(start);
|
||||||
@ -255,7 +247,7 @@
|
|||||||
end.elem = this;
|
end.elem = this;
|
||||||
laydate(end);
|
laydate(end);
|
||||||
};
|
};
|
||||||
|
|
||||||
function deptorservice(data){
|
function deptorservice(data){
|
||||||
$('#allocation').html("");
|
$('#allocation').html("");
|
||||||
if(data=="agentno"){
|
if(data=="agentno"){
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
服务小结列表<#if summaryList??>(${summaryList.totalElements})</#if>
|
服务小结列表<#if summaryList??>(${summaryList.totalElements})</#if>
|
||||||
<span style="float:right;">
|
<span style="float:right;">
|
||||||
<div class="ukefu-bt-text-content" style="position: absolute;right: 5px;top: 0px;">
|
<div class="ukefu-bt-text-content" style="position: absolute;right: 5px;top: 0px;">
|
||||||
<form class="layui-form" name="search" action="/apps/agent/processed/index.html" method="get" style="float: left;margin-right:5px;">
|
<form class="layui-form" name="search" id="search"action="/apps/agent/processed/index.html" method="get" style="float: left;margin-right:5px;">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline" style="margin-right:0px;">
|
<div class="layui-inline" style="margin-right:0px;">
|
||||||
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
||||||
@ -173,65 +173,74 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
layui.use(['laypage', 'layer' , 'laydate'], function(){
|
var searchData = $("#search :input").serializeArray()
|
||||||
|
var searchCondition = "";
|
||||||
|
$.each(searchData, function() {
|
||||||
|
searchCondition += '&'+this.name+'='+this.value
|
||||||
|
});
|
||||||
|
layui.use(['laypage', 'layer'], function(){
|
||||||
var laypage = layui.laypage
|
var laypage = layui.laypage
|
||||||
,layer = layui.layer;
|
,layer = layui.layer;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
|
laypage({
|
||||||
function getNowFormatDate() {
|
|
||||||
var date = new Date();
|
|
||||||
var seperator = "-";
|
|
||||||
var year = date.getFullYear();
|
|
||||||
var month = date.getMonth() + 1;
|
|
||||||
var strDate = date.getDate();
|
|
||||||
if (month >= 1 && month <= 9) {
|
|
||||||
month = "0" + month;
|
|
||||||
}
|
|
||||||
if (strDate >= 0 && strDate <= 9) {
|
|
||||||
strDate = "0" + strDate;
|
|
||||||
}
|
|
||||||
var currentdate = year + seperator + month + seperator + strDate;
|
|
||||||
return currentdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
var start = {
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
max:getNowFormatDate(),//默认最大值为当前日期
|
|
||||||
istoday: true,
|
|
||||||
choose: function (datas) {
|
|
||||||
end.min = datas; //开始日选好后,重置结束日的最小日期
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var end = {
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
max:getNowFormatDate(),//默认最大值为当前日期
|
|
||||||
istoday: true,
|
|
||||||
choose: function (datas) {
|
|
||||||
start.max = datas; //结束日选好后,重置开始日的最大日期
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
document.getElementById('begin').onclick = function () {
|
|
||||||
start.elem = this;
|
|
||||||
laydate(start);
|
|
||||||
};
|
|
||||||
document.getElementById('end').onclick = function () {
|
|
||||||
end.elem = this;
|
|
||||||
laydate(end);
|
|
||||||
};
|
|
||||||
|
|
||||||
laypage({
|
|
||||||
cont: 'page'
|
cont: 'page'
|
||||||
,pages: <#if summaryList??>${summaryList.totalPages}<#else>0</#if> //总页数
|
,pages: <#if summaryList??>${summaryList.totalPages}<#else>0</#if> //总页数
|
||||||
,curr:<#if summaryList??>${summaryList.number+1}<#else>0</#if>
|
,curr:<#if summaryList??>${summaryList.number+1}<#else>0</#if>
|
||||||
,groups: 5 //连续显示分页数
|
,groups: 5 //连续显示分页数
|
||||||
,jump:function(data , first){
|
,jump:function(data , first){
|
||||||
if(!first){
|
if(!first){
|
||||||
location.href = "/apps/agent/processed/index.html?p="+data.curr ;
|
location.href = "/apps/agent/processed/index.html?p="+data.curr + searchCondition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
layui.use('laydate', function() {
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
});
|
||||||
|
|
||||||
|
function getNowFormatDate() {
|
||||||
|
var date = new Date();
|
||||||
|
var seperator = "-";
|
||||||
|
var year = date.getFullYear();
|
||||||
|
var month = date.getMonth() + 1;
|
||||||
|
var strDate = date.getDate();
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
if (strDate >= 0 && strDate <= 9) {
|
||||||
|
strDate = "0" + strDate;
|
||||||
|
}
|
||||||
|
var currentdate = year + seperator + month + seperator + strDate;
|
||||||
|
return currentdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
var start = {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
max:getNowFormatDate(),//默认最大值为当前日期
|
||||||
|
istoday: true,
|
||||||
|
choose: function (datas) {
|
||||||
|
end.min = datas; //开始日选好后,重置结束日的最小日期
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var end = {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
max:getNowFormatDate(),//默认最大值为当前日期
|
||||||
|
istoday: true,
|
||||||
|
choose: function (datas) {
|
||||||
|
start.max = datas; //结束日选好后,重置开始日的最大日期
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
document.getElementById('begin').onclick = function () {
|
||||||
|
start.elem = this;
|
||||||
|
laydate(start);
|
||||||
|
};
|
||||||
|
document.getElementById('end').onclick = function () {
|
||||||
|
end.elem = this;
|
||||||
|
laydate(end);
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -12,17 +12,17 @@
|
|||||||
服务小结列表<#if summaryList??>(${summaryList.totalElements})</#if>
|
服务小结列表<#if summaryList??>(${summaryList.totalElements})</#if>
|
||||||
<span style="float:right;">
|
<span style="float:right;">
|
||||||
<div class="ukefu-bt-text-content" style="position: absolute;right: 5px;top: 0px;">
|
<div class="ukefu-bt-text-content" style="position: absolute;right: 5px;top: 0px;">
|
||||||
<form class="layui-form" name="search" action="/apps/agent/summary/index.html" method="get" style="float: left;margin-right:5px;">
|
<form class="layui-form" name="search" id="search" action="/apps/agent/summary/index.html" method="get" style="float: left;margin-right:5px;">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline" style="margin-right:0px;">
|
<div class="layui-inline" style="margin-right:0px;">
|
||||||
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
||||||
<label class="layui-form-label" style="width: auto;">服务时间:</label>
|
<label class="layui-form-label" style="width: auto;">服务时间:</label>
|
||||||
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
||||||
<input name="begin" class="layui-input ukefu-input" placeholder="开始时间" value="${begin!''}" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
|
<input name="begin" id="begin" class="layui-input ukefu-input" placeholder="开始时间" value="${begin!''}">
|
||||||
</div>
|
</div>
|
||||||
<label class="layui-form-label" style="width: auto;">~</label>
|
<label class="layui-form-label" style="width: auto;">~</label>
|
||||||
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
<div class="layui-input-inline" style="width: auto;margin-right:0px;">
|
||||||
<input name="end" class="layui-input ukefu-input" placeholder="结束时间" value="${end!''}" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
|
<input name="end" id="end" class="layui-input ukefu-input" placeholder="结束时间" value="${end!''}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -173,67 +173,70 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
layui.use(['laypage', 'layer' , 'laydate'], function(){
|
var searchData = $("#search :input").serializeArray()
|
||||||
|
var searchCondition = "";
|
||||||
|
$.each(searchData, function() {
|
||||||
|
searchCondition += '&'+this.name+'='+this.value
|
||||||
|
});
|
||||||
|
|
||||||
|
layui.use(['laypage', 'layer'], function(){
|
||||||
var laypage = layui.laypage
|
var laypage = layui.laypage
|
||||||
,layer = layui.layer;
|
,layer = layui.layer;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
|
laypage({
|
||||||
function getNowFormatDate() {
|
cont: 'page'
|
||||||
var date = new Date();
|
,pages: <#if summaryList??>${summaryList.totalPages}<#else>0</#if> //总页数
|
||||||
var seperator = "-";
|
|
||||||
var year = date.getFullYear();
|
|
||||||
var month = date.getMonth() + 1;
|
|
||||||
var strDate = date.getDate();
|
|
||||||
if (month >= 1 && month <= 9) {
|
|
||||||
month = "0" + month;
|
|
||||||
}
|
|
||||||
if (strDate >= 0 && strDate <= 9) {
|
|
||||||
strDate = "0" + strDate;
|
|
||||||
}
|
|
||||||
var currentdate = year + seperator + month + seperator + strDate;
|
|
||||||
return currentdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
var start = {
|
|
||||||
istime: true,
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
max:getNowFormatDate(),//默认最大值为当前日期
|
|
||||||
istoday: true,
|
|
||||||
choose: function (datas) {
|
|
||||||
end.min = datas; //开始日选好后,重置结束日的最小日期
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var end = {
|
|
||||||
istime: true,
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
max:getNowFormatDate(),//默认最大值为当前日期
|
|
||||||
istoday: true,
|
|
||||||
choose: function (datas) {
|
|
||||||
start.max = datas; //结束日选好后,重置开始日的最大日期
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
document.getElementById('start_time').onclick = function () {
|
|
||||||
start.elem = this;
|
|
||||||
laydate(start);
|
|
||||||
};
|
|
||||||
document.getElementById('end_time').onclick = function () {
|
|
||||||
end.elem = this;
|
|
||||||
laydate(end);
|
|
||||||
};
|
|
||||||
|
|
||||||
laypage({
|
|
||||||
cont: 'page'
|
|
||||||
,pages: <#if summaryList??>${summaryList.totalPages}<#else>0</#if> //总页数
|
|
||||||
,curr:<#if summaryList??>${summaryList.number+1}<#else>0</#if>
|
,curr:<#if summaryList??>${summaryList.number+1}<#else>0</#if>
|
||||||
,groups: 5 //连续显示分页数
|
,groups: 5 //连续显示分页数
|
||||||
,jump:function(data , first){
|
,jump:function(data , first){
|
||||||
if(!first){
|
if(!first){
|
||||||
location.href = "/apps/agent/summary/index.html?p="+data.curr ;
|
location.href = "/apps/agent/summary/index.html?p="+data.curr+searchCondition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
layui.use('laydate', function() {
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
});
|
||||||
|
function getNowFormatDate() {
|
||||||
|
var date = new Date();
|
||||||
|
var seperator = "-";
|
||||||
|
var year = date.getFullYear();
|
||||||
|
var month = date.getMonth() + 1;
|
||||||
|
var strDate = date.getDate();
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
if (strDate >= 0 && strDate <= 9) {
|
||||||
|
strDate = "0" + strDate;
|
||||||
|
}
|
||||||
|
var currentdate = year + seperator + month + seperator + strDate;
|
||||||
|
return currentdate;
|
||||||
|
}
|
||||||
|
var start = {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
max:getNowFormatDate(),//默认最大值为当前日期
|
||||||
|
istoday: true,
|
||||||
|
choose: function (datas) {
|
||||||
|
end.min = datas; //开始日选好后,重置结束日的最小日期
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var end = {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
max:getNowFormatDate(),//默认最大值为当前日期
|
||||||
|
istoday: true,
|
||||||
|
choose: function (datas) {
|
||||||
|
start.max = datas; //结束日选好后,重置开始日的最大日期
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.getElementById('begin').onclick = function () {
|
||||||
|
start.elem = this;
|
||||||
|
laydate(start);
|
||||||
|
};
|
||||||
|
document.getElementById('end').onclick = function () {
|
||||||
|
end.elem = this;
|
||||||
|
laydate(end);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
31
scripts/clean.container.sh
Executable file
31
scripts/clean.container.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
###########################################
|
||||||
|
#
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
# constants
|
||||||
|
baseDir=$(cd `dirname "$0"`;pwd)
|
||||||
|
# functions
|
||||||
|
|
||||||
|
# main
|
||||||
|
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
||||||
|
cd $baseDir/..
|
||||||
|
|
||||||
|
CONTAINER=$1
|
||||||
|
|
||||||
|
if [[ -z $CONTAINER ]]; then
|
||||||
|
echo "No container specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
if [[ "$(docker ps -aq -f name=^/${CONTAINER}$ 2> /dev/null)" == "" ]]; then
|
||||||
|
CONTAINER="$(docker-compose ps $CONTAINER 2> /dev/null | awk '{if (NR==3) print $1 fi}')"
|
||||||
|
if [[ -z $CONTAINER ]]; then
|
||||||
|
echo "Container \"$1\" does not exist, exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
log=$(docker inspect -f '{{.LogPath}}' $CONTAINER 2> /dev/null)
|
||||||
|
truncate -s 0 $log
|
Loading…
x
Reference in New Issue
Block a user