未验证 提交 f62f54d4 编写于 作者: RYAN0UP's avatar RYAN0UP 提交者: GitHub

Merge pull request #180 from halo-dev/dev

Dev
......@@ -8,7 +8,7 @@ apply plugin: 'io.spring.dependency-management'
group = 'run.halo.app'
archivesBaseName = 'halo'
version = '1.0.0'
version = '1.0.1'
sourceCompatibility = '1.8'
description = 'Halo, personal blog system developed in Java.'
......@@ -26,6 +26,7 @@ configurations {
}
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
......@@ -70,6 +71,9 @@ dependencies {
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
......
......@@ -5,6 +5,6 @@ VERSION=$(ls build/libs | sed 's/.*halo-//' | sed 's/.jar$//')
echo "Halo version: $VERSION"
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build --build-arg JAR_FILE=build/libs/halo-$VERSION.jar -t $DOCKER_USERNAME/halo -t $DOCKER_USERNAME/$VERSION .
docker build --build-arg JAR_FILE=build/libs/halo-$VERSION.jar -t $DOCKER_USERNAME/halo -t $DOCKER_USERNAME/halo:$VERSION .
docker images
docker push $DOCKER_USERNAME/halo
......@@ -69,8 +69,8 @@ public class SwaggerConfiguration {
return buildApiDocket("run.halo.app.content.api",
"run.halo.app.controller.content.api",
"/api/content/**")
.securitySchemes(portalApiKeys())
.securityContexts(portalSecurityContext())
.securitySchemes(contentApiKeys())
.securityContexts(contentSecurityContext())
.enable(!haloProperties.isDocDisabled());
}
......@@ -137,14 +137,14 @@ public class SwaggerConfiguration {
);
}
private List<ApiKey> portalApiKeys() {
private List<ApiKey> contentApiKeys() {
return Arrays.asList(
new ApiKey("Token from header", ApiAuthenticationFilter.API_TOKEN_HEADER_NAME, In.HEADER.name()),
new ApiKey("Token from query", ApiAuthenticationFilter.API_TOKEN_QUERY_NAME, In.QUERY.name())
new ApiKey("Access key from header", ApiAuthenticationFilter.API_ACCESS_KEY_HEADER_NAME, In.HEADER.name()),
new ApiKey("Access key from query", ApiAuthenticationFilter.API_ACCESS_KEY_QUERY_NAME, In.QUERY.name())
);
}
private List<SecurityContext> portalSecurityContext() {
private List<SecurityContext> contentSecurityContext() {
return Collections.singletonList(
SecurityContext.builder()
.securityReferences(defaultAuth())
......
package run.halo.app.model.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import run.halo.app.model.dto.base.OutputConverter;
import run.halo.app.model.entity.Menu;
......@@ -11,6 +13,8 @@ import run.halo.app.model.entity.Menu;
* @date 4/3/19
*/
@Data
@EqualsAndHashCode
@ToString
public class MenuDTO implements OutputConverter<MenuDTO, Menu> {
private Integer id;
......
......@@ -17,7 +17,7 @@ import java.util.Date;
*/
@Data
@Entity(name = "BasePost")
@Table(name = "posts", indexes = @Index(columnList = "url"))
@Table(name = "posts")
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER, columnDefinition = "int default 0")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
......
package run.halo.app.model.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.persistence.*;
......
package run.halo.app.model.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.persistence.*;
......
......@@ -14,7 +14,7 @@ import javax.persistence.*;
*/
@Data
@Entity
@Table(name = "tags", indexes = @Index(columnList = "slug_name"))
@Table(name = "tags")
@ToString
@EqualsAndHashCode(callSuper = true)
public class Tag extends BaseEntity {
......
......@@ -14,7 +14,7 @@ import javax.persistence.*;
*/
@Data
@Entity
@Table(name = "theme_settings", indexes = {@Index(columnList = "setting_key")})
@Table(name = "theme_settings")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class ThemeSetting extends BaseEntity {
......
......@@ -10,7 +10,7 @@ public enum OtherProperties implements PropertyEnum {
API_ENABLED("api_enabled", Boolean.class, "false"),
API_TOKEN("api_token", String.class, ""),
API_ACCESS_KEY("api_access_key", String.class, ""),
STATISTICS_CODE("statistics_code", String.class, ""),
......
package run.halo.app.model.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import run.halo.app.model.dto.MenuDTO;
import java.util.List;
......@@ -10,6 +12,8 @@ import java.util.List;
* @date : 2019-04-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class MenuVO extends MenuDTO {
private List<MenuVO> children;
......
......@@ -27,9 +27,9 @@ import java.util.Optional;
@Slf4j
public class ApiAuthenticationFilter extends AbstractAuthenticationFilter {
public final static String API_TOKEN_HEADER_NAME = "API-" + HttpHeaders.AUTHORIZATION;
public final static String API_ACCESS_KEY_HEADER_NAME = "API-" + HttpHeaders.AUTHORIZATION;
public final static String API_TOKEN_QUERY_NAME = "api_token";
public final static String API_ACCESS_KEY_QUERY_NAME = "api_access_key";
private final OptionService optionService;
......@@ -55,27 +55,27 @@ public class ApiAuthenticationFilter extends AbstractAuthenticationFilter {
return;
}
// Get token
String token = getTokenFromRequest(request);
// Get access key
String accessKey = getTokenFromRequest(request);
if (StringUtils.isBlank(token)) {
// If the token is missing
getFailureHandler().onFailure(request, response, new AuthenticationException("Missing API token"));
if (StringUtils.isBlank(accessKey)) {
// If the access key is missing
getFailureHandler().onFailure(request, response, new AuthenticationException("Missing API access key"));
return;
}
// Get token from option
Optional<String> optionalToken = optionService.getByProperty(OtherProperties.API_TOKEN, String.class);
// Get access key from option
Optional<String> optionalAccessKey = optionService.getByProperty(OtherProperties.API_ACCESS_KEY, String.class);
if (!optionalToken.isPresent()) {
// If the token is not set
getFailureHandler().onFailure(request, response, new AuthenticationException("API Token hasn't been set by blogger"));
if (!optionalAccessKey.isPresent()) {
// If the access key is not set
getFailureHandler().onFailure(request, response, new AuthenticationException("API access key hasn't been set by blogger"));
return;
}
if (!StringUtils.equals(token, optionalToken.get())) {
// If the token is mismatch
getFailureHandler().onFailure(request, response, new AuthenticationException("Token is mismatch"));
if (!StringUtils.equals(accessKey, optionalAccessKey.get())) {
// If the access key is mismatch
getFailureHandler().onFailure(request, response, new AuthenticationException("API access key is mismatch"));
return;
}
......@@ -103,17 +103,17 @@ public class ApiAuthenticationFilter extends AbstractAuthenticationFilter {
Assert.notNull(request, "Http servlet request must not be null");
// Get from header
String token = request.getHeader(API_TOKEN_HEADER_NAME);
String accessKey = request.getHeader(API_ACCESS_KEY_HEADER_NAME);
// Get from param
if (StringUtils.isBlank(token)) {
token = request.getParameter(API_TOKEN_QUERY_NAME);
if (StringUtils.isBlank(accessKey)) {
accessKey = request.getParameter(API_ACCESS_KEY_QUERY_NAME);
log.debug("Got token from parameter: [{}: {}]", API_TOKEN_QUERY_NAME, token);
log.debug("Got access key from parameter: [{}: {}]", API_ACCESS_KEY_QUERY_NAME, accessKey);
} else {
log.debug("Got token from header: [{}: {}]", API_TOKEN_HEADER_NAME, token);
log.debug("Got access key from header: [{}: {}]", API_ACCESS_KEY_HEADER_NAME, accessKey);
}
return token;
return accessKey;
}
}
......@@ -429,6 +429,11 @@ public abstract class BaseCommentServiceImpl<COMMENT extends BaseComment> extend
// Get all comments
Page<COMMENT> topCommentPage = baseCommentRepository.findAllByPostIdAndStatusAndParentId(targetId, status, 0L, pageable);
if (topCommentPage.isEmpty()) {
// If the comments is empty
return ServiceUtils.buildEmptyPageImpl(topCommentPage);
}
// Get top comment ids
Set<Long> topCommentIds = ServiceUtils.fetchProperty(topCommentPage.getContent(), BaseComment::getId);
......
package run.halo.app.utils;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.*;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
......@@ -136,6 +134,21 @@ public class ServiceUtils {
return buildLatestPageable(top, "createTime");
}
/**
* Build empty page result.
*
* @param page page info must not be null
* @param <T> target page result type
* @param <S> source page result type
* @return empty page result
*/
@NonNull
public static <T, S> Page<T> buildEmptyPageImpl(@NonNull Page<S> page) {
Assert.notNull(page, "Page result must not be null");
return new PageImpl<>(Collections.emptyList(), page.getPageable(), page.getTotalElements());
}
/**
* Builds latest page request.
*
......
.attach-detail-img img{width:100%}.ant-divider-horizontal[data-v-b694bf52]{margin:24px 0 12px 0}.search-box[data-v-b694bf52]{padding-bottom:12px}.attach-thumb[data-v-b694bf52]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.attach-thumb img[data-v-b694bf52]{width:100%;height:100%;position:absolute;top:0;left:0}.ant-card-meta[data-v-b694bf52]{padding:.8rem}.attach-detail-img img[data-v-b694bf52]{width:100%}.table-operator[data-v-b694bf52]{margin-bottom:0}
\ No newline at end of file
.category-tree[data-v-0f333a36]{margin-top:1rem}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.page-header-wrapper-grid-content-main[data-v-23ca7e76]{width:100%;height:100%;min-height:100%;-webkit-transition:.3s;transition:.3s}.page-header-wrapper-grid-content-main .profile-center-avatarHolder[data-v-23ca7e76]{text-align:center;margin-bottom:24px}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar[data-v-23ca7e76]{margin:0 auto;width:104px;height:104px;margin-bottom:20px;border-radius:50%;overflow:hidden;cursor:pointer}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar img[data-v-23ca7e76]{height:100%;width:100%}.page-header-wrapper-grid-content-main .profile-center-avatarHolder .username[data-v-23ca7e76]{color:rgba(0,0,0,.85);font-size:20px;line-height:28px;font-weight:500;margin-bottom:4px}.page-header-wrapper-grid-content-main .profile-center-detail p[data-v-23ca7e76]{margin-bottom:8px;padding-left:26px;position:relative}.page-header-wrapper-grid-content-main .profile-center-detail i[data-v-23ca7e76]{position:absolute;height:14px;width:14px;left:0;top:4px}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.page-header-wrapper-grid-content-main[data-v-0c60a972]{width:100%;height:100%;min-height:100%;-webkit-transition:.3s;transition:.3s}.page-header-wrapper-grid-content-main .profile-center-avatarHolder[data-v-0c60a972]{text-align:center;margin-bottom:24px}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar[data-v-0c60a972]{margin:0 auto;width:104px;height:104px;margin-bottom:20px;border-radius:50%;overflow:hidden;cursor:pointer}.page-header-wrapper-grid-content-main .profile-center-avatarHolder>.avatar img[data-v-0c60a972]{height:100%;width:100%}.page-header-wrapper-grid-content-main .profile-center-avatarHolder .username[data-v-0c60a972]{color:rgba(0,0,0,.85);font-size:20px;line-height:28px;font-weight:500;margin-bottom:4px}.page-header-wrapper-grid-content-main .profile-center-detail p[data-v-0c60a972]{margin-bottom:8px;padding-left:26px;position:relative}.page-header-wrapper-grid-content-main .profile-center-detail i[data-v-0c60a972]{position:absolute;height:14px;width:14px;left:0;top:4px}
\ No newline at end of file
.height-100[data-v-1ac0b863]{height:100vh}.install-action[data-v-1ac0b863]{margin-top:1rem}.previus-button[data-v-1ac0b863]{margin-right:1rem}.install-card[data-v-1ac0b863]{-webkit-box-shadow:0 10px 20px 0 hsla(0,0%,92.5%,.86);box-shadow:0 10px 20px 0 hsla(0,0%,92.5%,.86)}
\ No newline at end of file
.attach-detail-img img{width:100%}.ant-divider-horizontal[data-v-40ab62a8]{margin:24px 0 12px 0}.search-box[data-v-40ab62a8]{padding-bottom:12px}.attach-thumb[data-v-40ab62a8]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.attach-thumb img[data-v-40ab62a8]{width:100%;height:100%;position:absolute;top:0;left:0}.ant-card-meta[data-v-40ab62a8]{padding:.8rem}.attach-detail-img img[data-v-40ab62a8]{width:100%}.table-operator[data-v-40ab62a8]{margin-bottom:0}
\ No newline at end of file
.height-100[data-v-f2997e68]{height:100vh}.install-action[data-v-f2997e68]{margin-top:1rem}.previus-button[data-v-f2997e68]{margin-right:1rem}.install-card[data-v-f2997e68]{-webkit-box-shadow:0 10px 20px 0 hsla(0,0%,92.5%,.86);box-shadow:0 10px 20px 0 hsla(0,0%,92.5%,.86)}
\ No newline at end of file
.v-note-wrapper[data-v-6778754a]{z-index:1000;min-height:580px}.sheet-thum .img[data-v-6778754a]{width:100%;cursor:pointer;border-radius:4px}.sheet-thum .sheet-thum-remove[data-v-6778754a]{margin-top:16px}
\ No newline at end of file
.v-note-wrapper[data-v-348cd59e]{z-index:1000;min-height:580px}.post-thum .img[data-v-348cd59e]{width:100%;cursor:pointer;border-radius:4px}.post-thum .post-thum-remove[data-v-348cd59e]{margin-top:16px}
\ No newline at end of file
.ant-tree-child-tree li[data-v-05a41120]{overflow:hidden}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-code{font-family:Menlo,Monaco,Consolas,Courier New,monospace}.CodeMirror{height:560px}.CodeMirror-gutters{border-right:1px solid #fff3f3;background-color:#fff}
\ No newline at end of file
.ant-tree-child-tree li[data-v-a6e9d8f4]{overflow:hidden}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-code{font-family:Menlo,Monaco,Consolas,Courier New,monospace}.CodeMirror{height:560px}.CodeMirror-gutters{border-right:1px solid #fff3f3;background-color:#fff}
\ No newline at end of file
.category-tree[data-v-77634e76]{margin-top:1rem}
\ No newline at end of file
.v-note-wrapper[data-v-5a42b07f]{z-index:1000;min-height:580px}.sheet-thum .img[data-v-5a42b07f]{width:100%;cursor:pointer;border-radius:4px}.sheet-thum .sheet-thum-remove[data-v-5a42b07f]{margin-top:16px}
\ No newline at end of file
.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.upload-button[data-v-773a8e75]{position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-773a8e75]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-773a8e75]{width:100%;height:100%;position:absolute;top:0;left:0}
\ No newline at end of file
.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.upload-button[data-v-40d5a5ae]{position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-40d5a5ae]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-40d5a5ae]{width:100%;height:100%;position:absolute;top:0;left:0}
\ No newline at end of file
.analysis-card-container[data-v-704c3674]{position:relative;overflow:hidden;width:100%}.analysis-card-container .meta[data-v-704c3674]{position:relative;overflow:hidden;width:100%;color:rgba(0,0,0,.45);font-size:14px;line-height:22px}.analysis-card-container .meta .analysis-card-action[data-v-704c3674]{cursor:pointer;position:absolute;top:0;right:0}.number[data-v-704c3674]{overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:nowrap;color:#000;margin-top:4px;margin-bottom:0;font-size:32px;line-height:38px;height:38px}
\ No newline at end of file
.analysis-card-container[data-v-4cadd8f2]{position:relative;overflow:hidden;width:100%}.analysis-card-container .meta[data-v-4cadd8f2]{position:relative;overflow:hidden;width:100%;color:rgba(0,0,0,.45);font-size:14px;line-height:22px}.analysis-card-container .meta .analysis-card-action[data-v-4cadd8f2]{cursor:pointer;position:absolute;top:0;right:0}.number[data-v-4cadd8f2]{overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:nowrap;color:#000;margin-top:4px;margin-bottom:0;font-size:32px;line-height:38px;height:38px}
\ No newline at end of file
.v-note-wrapper[data-v-669770a4]{z-index:1000;min-height:580px}.post-thum .img[data-v-669770a4]{width:100%;cursor:pointer;border-radius:4px}.post-thum .post-thum-remove[data-v-669770a4]{margin-top:16px}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.ant-divider-horizontal[data-v-4bf43659]{margin:24px 0 12px 0}.search-box[data-v-4bf43659]{padding-bottom:12px}.photo-thumb[data-v-4bf43659]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.photo-thumb img[data-v-4bf43659]{width:100%;height:100%;position:absolute;top:0;left:0}.ant-card-meta[data-v-4bf43659]{padding:.8rem}.photo-detail-img img[data-v-4bf43659]{width:100%}.table-operator[data-v-4bf43659]{margin-bottom:0}
\ No newline at end of file
.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}.ant-divider-horizontal[data-v-2a97a053]{margin:24px 0 12px 0}.search-box[data-v-2a97a053]{padding-bottom:12px}.photo-thumb[data-v-2a97a053]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.photo-thumb img[data-v-2a97a053]{width:100%;height:100%;position:absolute;top:0;left:0}.ant-card-meta[data-v-2a97a053]{padding:.8rem}.photo-detail-img img[data-v-2a97a053]{width:100%}.table-operator[data-v-2a97a053]{margin-bottom:0}
\ No newline at end of file
.exception[data-v-230942b4]{min-height:500px;height:80%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;margin-top:150px}.exception .img[data-v-230942b4]{display:inline-block;padding-right:52px;zoom:1}.exception .img img[data-v-230942b4]{height:360px;max-width:430px}.exception .content[data-v-230942b4]{display:inline-block;-webkit-box-flex:1;-ms-flex:auto;flex:auto}.exception .content h1[data-v-230942b4]{color:#434e59;font-size:72px;font-weight:600;line-height:72px;margin-bottom:24px}.exception .content .desc[data-v-230942b4]{color:rgba(0,0,0,.45);font-size:20px;line-height:28px;margin-bottom:16px}.mobile .exception[data-v-230942b4]{margin-top:30px}.mobile .exception .img[data-v-230942b4]{padding-right:unset}.mobile .exception .img img[data-v-230942b4]{height:40%;max-width:80%}
\ No newline at end of file
.exception[data-v-729a8fea]{min-height:500px;height:80%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;margin-top:150px}.exception .img[data-v-729a8fea]{display:inline-block;padding-right:52px;zoom:1}.exception .img img[data-v-729a8fea]{height:360px;max-width:430px}.exception .content[data-v-729a8fea]{display:inline-block;-webkit-box-flex:1;-ms-flex:auto;flex:auto}.exception .content h1[data-v-729a8fea]{color:#434e59;font-size:72px;font-weight:600;line-height:72px;margin-bottom:24px}.exception .content .desc[data-v-729a8fea]{color:rgba(0,0,0,.45);font-size:20px;line-height:28px;margin-bottom:16px}.mobile .exception[data-v-729a8fea]{margin-top:30px}.mobile .exception .img[data-v-729a8fea]{padding-right:unset}.mobile .exception .img img[data-v-729a8fea]{height:40%;max-width:80%}
\ No newline at end of file
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-0337f7a6.4c6b622f.css rel=prefetch><link href=/css/chunk-14e0b302.32f796a8.css rel=prefetch><link href=/css/chunk-1be69b35.b6783003.css rel=prefetch><link href=/css/chunk-2a007c18.45475c5a.css rel=prefetch><link href=/css/chunk-31c8ea42.4a090118.css rel=prefetch><link href=/css/chunk-35e63e70.6a83ae7d.css rel=prefetch><link href=/css/chunk-4851a43a.09186be6.css rel=prefetch><link href=/css/chunk-4e835ab8.5f75da19.css rel=prefetch><link href=/css/chunk-55d28d8a.5710ea86.css rel=prefetch><link href=/css/chunk-5b9151a2.5ac5144c.css rel=prefetch><link href=/css/chunk-6d8b31f6.ad8d17b2.css rel=prefetch><link href=/css/chunk-9449c032.6f053d75.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/chunk-f1eac230.8481e8b4.css rel=prefetch><link href=/css/fail.809a6bc5.css rel=prefetch><link href=/js/chunk-0337f7a6.53ede862.js rel=prefetch><link href=/js/chunk-142c8832.919c15cb.js rel=prefetch><link href=/js/chunk-14e0b302.8cbbed1c.js rel=prefetch><link href=/js/chunk-1be69b35.3b96d59c.js rel=prefetch><link href=/js/chunk-2a007c18.d7c59ddb.js rel=prefetch><link href=/js/chunk-2d0b64bf.2af37a5a.js rel=prefetch><link href=/js/chunk-2d0d65a2.cea2ab69.js rel=prefetch><link href=/js/chunk-2d21a35c.8a7b3003.js rel=prefetch><link href=/js/chunk-2d228d13.f8dd7bb5.js rel=prefetch><link href=/js/chunk-31c8ea42.fcec41a2.js rel=prefetch><link href=/js/chunk-35e63e70.25724764.js rel=prefetch><link href=/js/chunk-4851a43a.eadb6121.js rel=prefetch><link href=/js/chunk-4b5e9e93.8033dcf8.js rel=prefetch><link href=/js/chunk-4e835ab8.734baaf4.js rel=prefetch><link href=/js/chunk-55d28d8a.e28b3150.js rel=prefetch><link href=/js/chunk-5b9151a2.9189da9d.js rel=prefetch><link href=/js/chunk-5bf599cc.c2681092.js rel=prefetch><link href=/js/chunk-6d8b31f6.cb49297f.js rel=prefetch><link href=/js/chunk-87e2df70.b954f846.js rel=prefetch><link href=/js/chunk-9449c032.8f6a0d1a.js rel=prefetch><link href=/js/chunk-bb4f0d4a.c336573f.js rel=prefetch><link href=/js/chunk-f1eac230.05982c8b.js rel=prefetch><link href=/js/fail.13f5cbab.js rel=prefetch><link href=/css/app.8abf48c5.css rel=preload as=style><link href=/css/chunk-vendors.da56ac75.css rel=preload as=style><link href=/js/app.e0ba5034.js rel=preload as=script><link href=/js/chunk-vendors.fe7dde0e.js rel=preload as=script><link href=/css/chunk-vendors.da56ac75.css rel=stylesheet><link href=/css/app.8abf48c5.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.fe7dde0e.js></script><script src=/js/app.e0ba5034.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content=Halo><link rel=icon href=/logo.png><title>Halo Dashboard</title><link href=/css/chunk-009936c1.f3153164.css rel=prefetch><link href=/css/chunk-0aa79c38.26a33a1b.css rel=prefetch><link href=/css/chunk-1be69b35.b6783003.css rel=prefetch><link href=/css/chunk-2ca3170e.61a5a976.css rel=prefetch><link href=/css/chunk-37d95348.909d3d1b.css rel=prefetch><link href=/css/chunk-436563a2.cb1e7f15.css rel=prefetch><link href=/css/chunk-46d7532c.94c6eb30.css rel=prefetch><link href=/css/chunk-4851a43a.210847fe.css rel=prefetch><link href=/css/chunk-6e38bcf5.2ee2b33a.css rel=prefetch><link href=/css/chunk-70b33d4d.701a4459.css rel=prefetch><link href=/css/chunk-75c7eed4.7cf84e9e.css rel=prefetch><link href=/css/chunk-9449c032.dafef2de.css rel=prefetch><link href=/css/chunk-9cb97d52.046bf41d.css rel=prefetch><link href=/css/chunk-bb4f0d4a.c1990d7c.css rel=prefetch><link href=/css/fail.e9c3e2d8.css rel=prefetch><link href=/js/chunk-009936c1.cde57fa8.js rel=prefetch><link href=/js/chunk-0aa79c38.2659df6e.js rel=prefetch><link href=/js/chunk-0ba750a2.02c8e842.js rel=prefetch><link href=/js/chunk-142c8832.8aceee71.js rel=prefetch><link href=/js/chunk-1be69b35.4a496da5.js rel=prefetch><link href=/js/chunk-2ca3170e.258d6e52.js rel=prefetch><link href=/js/chunk-2d0b64bf.25665dba.js rel=prefetch><link href=/js/chunk-2d0d65a2.1c8f2476.js rel=prefetch><link href=/js/chunk-2d21a35c.2fc10284.js rel=prefetch><link href=/js/chunk-2d228d13.dd7018e7.js rel=prefetch><link href=/js/chunk-37d95348.9ac04f40.js rel=prefetch><link href=/js/chunk-436563a2.89c8f183.js rel=prefetch><link href=/js/chunk-46d7532c.7500e276.js rel=prefetch><link href=/js/chunk-4851a43a.e3ce92c4.js rel=prefetch><link href=/js/chunk-5bf599cc.fc6c7d8c.js rel=prefetch><link href=/js/chunk-6e38bcf5.7b552106.js rel=prefetch><link href=/js/chunk-70b33d4d.f5bbad6f.js rel=prefetch><link href=/js/chunk-75c7eed4.cee58ce6.js rel=prefetch><link href=/js/chunk-87e2df70.f4b6bdc6.js rel=prefetch><link href=/js/chunk-9449c032.0036f54b.js rel=prefetch><link href=/js/chunk-9cb97d52.abfd8c14.js rel=prefetch><link href=/js/chunk-bb4f0d4a.3b7dfaaa.js rel=prefetch><link href=/js/fail.8a6d08f5.js rel=prefetch><link href=/css/app.d748d7bc.css rel=preload as=style><link href=/css/chunk-vendors.278be955.css rel=preload as=style><link href=/js/app.1842d5e6.js rel=preload as=script><link href=/js/chunk-vendors.811663b9.js rel=preload as=script><link href=/css/chunk-vendors.278be955.css rel=stylesheet><link href=/css/app.d748d7bc.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.811663b9.js></script><script src=/js/app.1842d5e6.js></script></body></html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-009936c1"],{"5bcf":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("div",{staticClass:"attach-detail-img"},[e("img",{attrs:{src:t.attachment.path}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(a){t.$set(t.attachment,"name",a)},expression:"attachment.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.path}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyNormalLink}})],1)])])],1),e("a-list-item",[e("a-list-item-meta",[e("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyMarkdownLink}})],1)])])],1)],1)],1)],1)],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.addToPhoto?e("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),e("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],s=(e("7364"),e("ac0d")),o=e("a796"),l=e("975e"),c={name:"AttachmentDetailDrawer",mixins:[s["a"],s["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,a){this.$log.debug("old value",a),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;o["a"].delete(this.attachment.id).then(function(a){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;o["a"].update(this.attachment.id,this.attachment).then(function(a){t.$log.debug("Updated attachment",a.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,a="".concat(this.attachment.path);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,a="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(a){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},r=c,d=(e("b3a7"),e("17cc")),u=Object(d["a"])(r,n,i,!1,null,null,null);a["a"]=u.exports},"61d0":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=this,e=a.$createElement,n=a._self._c||e;return n("page-view",[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{staticClass:"search-box",attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:a.queryParam.keyword,callback:function(t){a.$set(a.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"存储位置"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.attachmentType,callback:function(t){a.$set(a.queryParam,"attachmentType",t)},expression:"queryParam.attachmentType"}},a._l(Object.keys(a.attachmentType),function(t){return n("a-select-option",{key:t,attrs:{value:t}},[a._v(a._s(a.attachmentType[t].text))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"文件类型"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.mediaType,callback:function(t){a.$set(a.queryParam,"mediaType",t)},expression:"queryParam.mediaType"}},a._l(a.mediaTypes,function(t,e){return n("a-select-option",{key:e,attrs:{value:t}},[a._v(a._s(t))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:a.handleQuery}},[a._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:a.handleResetParam}},[a._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return t.uploadVisible=!0}}},[a._v("上传")])],1)])],1),n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:a.formattedDatas,loading:a.listLoading},scopedSlots:a._u([{key:"renderItem",fn:function(t,e){return n("a-list-item",{key:e},[n("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return a.handleShowDetailDrawer(t)}}},[n("div",{staticClass:"attach-thumb"},[n("img",{attrs:{src:t.thumbPath}})]),n("a-card-meta",[n("ellipsis",{attrs:{slot:"description",length:a.isMobile()?36:16,tooltip:""},slot:"description"},[a._v(a._s(t.name))])],1)],1)],1)}}])})],1)],1),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:a.pagination.total,defaultPageSize:a.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:a.handlePaginationChange,showSizeChange:a.handlePaginationChange}})],1),n("a-modal",{attrs:{title:"上传附件",footer:null},model:{value:a.uploadVisible,callback:function(t){a.uploadVisible=t},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:a.uploadHandler},on:{success:a.handleUploadSuccess}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[a._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[a._v("支持单个或批量上传")])])],1),a.selectAttachment?n("AttachmentDetailDrawer",{attrs:{attachment:a.selectAttachment,addToPhoto:!0},on:{delete:function(){return t.loadAttachments()}},model:{value:a.drawerVisiable,callback:function(t){a.drawerVisiable=t},expression:"drawerVisiable"}}):a._e()],1)},i=[],s=(e("b745"),e("680a")),o=e("ac0d"),l=e("5bcf"),c=e("a796"),r={components:{PageView:s["b"],AttachmentDetailDrawer:l["a"]},mixins:[o["a"],o["b"]],data:function(){return{attachmentType:c["a"].type,listLoading:!0,uploadVisible:!1,selectAttachment:{},attachments:[],mediaTypes:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null,mediaType:null,attachmentType:null},uploadHandler:c["a"].upload,drawerVisiable:!1}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(a){return a.typeProperty=t.attachmentType[a.type],a})}},created:function(){this.loadAttachments(),this.loadMediaTypes()},methods:{loadAttachments:function(){var t=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,this.listLoading=!0,c["a"].query(this.queryParam).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total,t.listLoading=!1})},loadMediaTypes:function(){var t=this;c["a"].getMediaTypes().then(function(a){t.mediaTypes=a.data.data})},handleShowDetailDrawer:function(t){this.selectAttachment=t,this.drawerVisiable=!0},handleUploadSuccess:function(){this.loadAttachments(),this.loadMediaTypes()},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.mediaType=null,this.queryParam.attachmentType=null,this.loadAttachments()},handleQuery:function(){this.queryParam.page=0,this.loadAttachments()}}},d=r,u=(e("fc84"),e("17cc")),m=Object(u["a"])(d,n,i,!1,null,"b694bf52",null);a["default"]=m.exports},9298:function(t,a,e){},"975e":function(t,a,e){"use strict";var n=e("9efd"),i="/api/admin/photos",s={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=s},a796:function(t,a,e){"use strict";var n=e("7f43"),i=e.n(n),s=e("9efd"),o="/api/admin/attachments",l={query:function(t){return Object(s["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"get"})},delete:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},update:function(t,a){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(s["a"])({url:"".concat(o,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l},b3a7:function(t,a,e){"use strict";var n=e("9298"),i=e.n(n);i.a},f6df:function(t,a,e){},fc84:function(t,a,e){"use strict";var n=e("f6df"),i=e.n(n);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0aa79c38"],{"307b":function(t,a,e){"use strict";var s=e("6fda"),n=e.n(s);n.a},3993:function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("a-drawer",{attrs:{title:t.title,width:t.isMobile()?"100%":t.drawerWidth,closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),e("a-divider"),e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[e("a-col",{attrs:{span:24}},t._l(t.attachments,function(a,s){return e("div",{key:s,staticClass:"attach-item",on:{click:function(e){return t.handleSelectAttachment(a)}}},[e("img",{attrs:{src:a.thumbPath}})])}),0)],1)],1),e("a-divider"),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[e("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),e("a-modal",{attrs:{title:"上传附件",footer:null},model:{value:t.uploadVisible,callback:function(a){t.uploadVisible=a},expression:"uploadVisible"}},[e("upload",{attrs:{name:"file",multiple:"",accept:"image/*",uploadHandler:t.attachmentUploadHandler},on:{success:t.handleAttachmentUploadSuccess}},[e("p",{staticClass:"ant-upload-drag-icon"},[e("a-icon",{attrs:{type:"inbox"}})],1),e("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),e("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},n=[],o=(e("d4d5"),e("ac0d")),i=e("a796"),r={name:"AttachmentSelectDrawer",mixins:[o["a"],o["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:i["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,a){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var t=this,a=Object.assign({},this.pagination);a.page--,i["a"].query(a).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total})},handleSelectAttachment:function(t){this.$emit("listenToSelect",t)},handlePaginationChange:function(t,a){this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},handleDelete:function(){this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},l=r,c=(e("307b"),e("17cc")),d=Object(c["a"])(l,s,n,!1,null,null,null);a["a"]=d.exports},"6fda":function(t,a,e){},"7c54":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=this,e=a.$createElement,s=a._self._c||e;return s("div",{staticClass:"page-header-index-wide page-header-wrapper-grid-content-main"},[s("a-row",{attrs:{gutter:12}},[s("a-col",{style:{"padding-bottom":"12px"},attrs:{lg:10,md:24}},[s("a-card",{attrs:{bordered:!1}},[s("div",{staticClass:"profile-center-avatarHolder"},[s("a-tooltip",{attrs:{placement:"right",trigger:["hover"],title:"点击可修改头像"}},[s("template",{slot:"title"},[s("span",[a._v("prompt text")])]),s("div",{staticClass:"avatar"},[s("img",{attrs:{src:a.user.avatar||"//cn.gravatar.com/avatar/?s=256&d=mm"},on:{click:function(){return t.attachmentDrawerVisible=!0}}})])],2),s("div",{staticClass:"username"},[a._v(a._s(a.user.nickname))]),s("div",{staticClass:"bio"},[a._v(a._s(a.user.description))])],1),s("div",{staticClass:"profile-center-detail"},[s("p",[s("a-icon",{attrs:{type:"global"}}),s("a",{attrs:{href:a.options.blog_url,target:"method"}},[a._v(a._s(a.options.blog_url))])],1),s("p",[s("a-icon",{attrs:{type:"mail"}}),a._v(a._s(a.user.email)+"\n ")],1),s("p",[s("a-icon",{attrs:{type:"calendar"}}),a._v(a._s(a.counts.establishDays||0)+"\n ")],1)]),s("a-divider"),s("div",{staticClass:"general-profile"},[s("a-list",{attrs:{loading:a.countsLoading,itemLayout:"horizontal"}},[s("a-list-item",[a._v("累计发表了 "+a._s(a.counts.postCount||0)+" 篇文章。")]),s("a-list-item",[a._v("累计创建了 "+a._s(a.counts.linkCount||0)+" 个标签。")]),s("a-list-item",[a._v("累计获得了 "+a._s(a.counts.commentCount||0)+" 条评论。")]),s("a-list-item",[a._v("累计添加了 "+a._s(a.counts.linkCount||0)+" 个友链。")]),s("a-list-item",[a._v("文章总访问 "+a._s(a.counts.visitCount||0)+" 次。")]),s("a-list-item")],1)],1)],1)],1),s("a-col",{style:{"padding-bottom":"12px"},attrs:{lg:14,md:24}},[s("a-card",{attrs:{bodyStyle:{padding:"0"},bordered:!1,title:"个人资料"}},[s("div",{staticClass:"card-container"},[s("a-tabs",{attrs:{type:"card"}},[s("a-tab-pane",{key:"1"},[s("span",{attrs:{slot:"tab"},slot:"tab"},[s("a-icon",{attrs:{type:"idcard"}}),a._v("基本资料\n ")],1),s("a-form",{attrs:{layout:"vertical"}},[s("a-form-item",{attrs:{label:"用户名:"}},[s("a-input",{model:{value:a.user.username,callback:function(t){a.$set(a.user,"username",t)},expression:"user.username"}})],1),s("a-form-item",{attrs:{label:"昵称:"}},[s("a-input",{model:{value:a.user.nickname,callback:function(t){a.$set(a.user,"nickname",t)},expression:"user.nickname"}})],1),s("a-form-item",{attrs:{label:"邮箱:"}},[s("a-input",{model:{value:a.user.email,callback:function(t){a.$set(a.user,"email",t)},expression:"user.email"}})],1),s("a-form-item",{attrs:{label:"个人说明:"}},[s("a-input",{attrs:{autosize:{minRows:5},type:"textarea"},model:{value:a.user.description,callback:function(t){a.$set(a.user,"description",t)},expression:"user.description"}})],1),s("a-form-item",[s("a-button",{attrs:{type:"primary"},on:{click:a.handleUpdateProfile}},[a._v("保存")])],1)],1)],1),s("a-tab-pane",{key:"2"},[s("span",{attrs:{slot:"tab"},slot:"tab"},[s("a-icon",{attrs:{type:"lock"}}),a._v("密码\n ")],1),s("a-form",{attrs:{layout:"vertical"}},[s("a-form-item",{attrs:{label:"原密码:"}},[s("a-input",{attrs:{type:"password"},model:{value:a.passwordParam.oldPassword,callback:function(t){a.$set(a.passwordParam,"oldPassword",t)},expression:"passwordParam.oldPassword"}})],1),s("a-form-item",{attrs:{label:"新密码:"}},[s("a-input",{attrs:{type:"password"},model:{value:a.passwordParam.newPassword,callback:function(t){a.$set(a.passwordParam,"newPassword",t)},expression:"passwordParam.newPassword"}})],1),s("a-form-item",{attrs:{label:"确认密码:"}},[s("a-input",{attrs:{type:"password"},model:{value:a.passwordParam.confirmPassword,callback:function(t){a.$set(a.passwordParam,"confirmPassword",t)},expression:"passwordParam.confirmPassword"}})],1),s("a-form-item",[s("a-button",{attrs:{disabled:a.passwordUpdateButtonDisabled,type:"primary"},on:{click:a.handleUpdatePassword}},[a._v("确认更改")])],1)],1)],1)],1)],1)])],1)],1),s("AttachmentSelectDrawer",{attrs:{title:"选择头像"},on:{listenToSelect:a.handleSelectAvatar},model:{value:a.attachmentDrawerVisible,callback:function(t){a.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}})],1)},n=[],o=(e("f763"),e("e20c")),i=e("3993"),r=e("c24f"),l=e("50fc"),c=e("482b"),d=e("591a"),u={components:{AttachmentSelectDrawer:i["a"]},data:function(){return{countsLoading:!0,attachmentDrawerVisible:!1,user:{},counts:{},passwordParam:{oldPassword:null,newPassword:null,confirmPassword:null},attachment:{},options:[],keys:["blog_url"]}},computed:{passwordUpdateButtonDisabled:function(){return!(this.passwordParam.oldPassword&&this.passwordParam.newPassword)}},created:function(){this.loadUser(),this.getCounts(),this.loadOptions()},methods:Object(o["a"])({},Object(d["d"])({setUser:"SET_USER"}),{loadUser:function(){var t=this;r["a"].getProfile().then(function(a){t.user=a.data.data,t.profileLoading=!1})},loadOptions:function(){var t=this;c["a"].listAll(this.keys).then(function(a){t.options=a.data.data})},getCounts:function(){var t=this;l["a"].counts().then(function(a){t.counts=a.data.data,t.countsLoading=!1})},handleUpdatePassword:function(){this.passwordParam.newPassword===this.passwordParam.confirmPassword?r["a"].updatePassword(this.passwordParam.oldPassword,this.passwordParam.newPassword).then(function(t){}):this.$message.error("确认密码和新密码不匹配!")},handleUpdateProfile:function(){var t=this;r["a"].updateProfile(this.user).then(function(a){t.user=a.data.data,t.setUser(Object.assign({},t.user)),t.$message.success("资料更新成功!")})},handleSelectAvatar:function(t){this.user.avatar=t.path,this.attachmentDrawerVisible=!1}})},p=u,m=(e("d5f3"),e("17cc")),h=Object(m["a"])(p,s,n,!1,null,"0c60a972",null);a["default"]=h.exports},a796:function(t,a,e){"use strict";var s=e("7f43"),n=e.n(s),o=e("9efd"),i="/api/admin/attachments",r={query:function(t){return Object(o["a"])({url:i,params:t,method:"get"})},get:function(t){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"get"})},delete:function(t){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"delete"})},update:function(t,a){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(o["a"])({url:"".concat(i,"/media_types"),method:"get"})}};r.CancelToken=n.a.CancelToken,r.isCancel=n.a.isCancel,r.upload=function(t,a,e){return Object(o["a"])({url:"".concat(i,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},r.uploads=function(t,a,e){return Object(o["a"])({url:"".concat(i,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},r.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=r},c518:function(t,a,e){},d5f3:function(t,a,e){"use strict";var s=e("c518"),n=e.n(s);n.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b5e9e93"],{aa1e:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",{attrs:{gutter:12}},[e("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[e("a-card",{attrs:{title:t.title}},[e("a-form",{attrs:{layout:"horizontal"}},[e("a-form-item",{attrs:{label:"名称:",help:"* 页面上所显示的名称"}},[e("a-input",{model:{value:t.tagToCreate.name,callback:function(a){t.$set(t.tagToCreate,"name",a)},expression:"tagToCreate.name"}})],1),e("a-form-item",{attrs:{label:"别名",help:"* 一般为单个标签页面的标识,最好为英文"}},[e("a-input",{model:{value:t.tagToCreate.slugName,callback:function(a){t.$set(t.tagToCreate,"slugName",a)},expression:"tagToCreate.slugName"}})],1),e("a-form-item",["create"===t.formType?e("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("保存")]):e("a-button-group",[e("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("更新")]),"update"===t.formType?e("a-button",{attrs:{type:"dashed"},on:{click:t.handleAddTag}},[t._v("返回添加")]):t._e()],1),"update"===t.formType?e("a-popconfirm",{attrs:{title:"你确定要删除【"+t.tagToCreate.name+"】标签?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return t.handleDeleteTag(t.tagToCreate.id)}}},[e("a-button",{staticStyle:{float:"right"},attrs:{type:"danger"}},[t._v("删除")])],1):t._e()],1)],1)],1)],1),e("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[e("a-card",{attrs:{title:"所有标签"}},t._l(t.tags,function(a){return e("a-tooltip",{key:a.id,attrs:{placement:"topLeft"}},[e("template",{slot:"title"},[e("span",[t._v(t._s(a.postCount)+" 篇文章")])]),e("a-tag",{staticStyle:{"margin-bottom":"8px"},attrs:{color:"blue"},on:{click:function(e){return t.handleEditTag(a)}}},[t._v(t._s(a.name))])],2)}),1)],1)],1)],1)},o=[],r=e("d28db"),s={data:function(){return{formType:"create",tags:[],tagToCreate:{}}},computed:{title:function(){return this.tagToCreate.id?"修改标签":"添加标签"}},created:function(){this.loadTags()},methods:{loadTags:function(){var t=this;r["a"].listAll(!0).then(function(a){t.tags=a.data.data})},handleSaveClick:function(){this.createOrUpdateTag()},handleAddTag:function(){this.formType="create",this.tagToCreate={}},handleEditTag:function(t){this.tagToCreate=t,this.formType="update"},handleDeleteTag:function(t){var a=this;r["a"].delete(t).then(function(t){a.$message.success("删除成功!"),a.loadTags(),a.handleAddTag()})},createOrUpdateTag:function(){var t=this;this.tagToCreate.id?r["a"].update(this.tagToCreate.id,this.tagToCreate).then(function(a){t.$message.success("更新成功!"),t.loadTags(),t.tagToCreate={}}):r["a"].create(this.tagToCreate).then(function(a){t.$message.success("保存成功!"),t.loadTags(),t.tagToCreate={}}),this.handleAddTag()}}},i=s,l=e("17cc"),c=Object(l["a"])(i,n,o,!1,null,null,null);a["default"]=c.exports},d28db:function(t,a,e){"use strict";var n=e("9efd"),o="/api/admin/tags",r={listAll:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(n["a"])({url:o,params:{more:t},method:"get"})},createWithName:function(t){return Object(n["a"])({url:o,data:{name:t},method:"post"})},create:function(t){return Object(n["a"])({url:o,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(o,"/").concat(t),data:a,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})}};a["a"]=r}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0ba750a2"],{aa1e:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",{attrs:{gutter:12}},[e("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[e("a-card",{attrs:{title:t.title}},[e("a-form",{attrs:{layout:"horizontal"}},[e("a-form-item",{attrs:{label:"名称:",help:"* 页面上所显示的名称"}},[e("a-input",{model:{value:t.tagToCreate.name,callback:function(a){t.$set(t.tagToCreate,"name",a)},expression:"tagToCreate.name"}})],1),e("a-form-item",{attrs:{label:"别名",help:"* 一般为单个标签页面的标识,最好为英文"}},[e("a-input",{model:{value:t.tagToCreate.slugName,callback:function(a){t.$set(t.tagToCreate,"slugName",a)},expression:"tagToCreate.slugName"}})],1),e("a-form-item",["create"===t.formType?e("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("保存")]):e("a-button-group",[e("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("更新")]),"update"===t.formType?e("a-button",{attrs:{type:"dashed"},on:{click:t.handleAddTag}},[t._v("返回添加")]):t._e()],1),"update"===t.formType?e("a-popconfirm",{attrs:{title:"你确定要删除【"+t.tagToCreate.name+"】标签?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return t.handleDeleteTag(t.tagToCreate.id)}}},[e("a-button",{staticStyle:{float:"right"},attrs:{type:"danger"}},[t._v("删除")])],1):t._e()],1)],1)],1)],1),e("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[e("a-card",{attrs:{title:"所有标签"}},t._l(t.tags,function(a){return e("a-tooltip",{key:a.id,attrs:{placement:"topLeft"}},[e("template",{slot:"title"},[e("span",[t._v(t._s(a.postCount)+" 篇文章")])]),e("a-tag",{staticStyle:{"margin-bottom":"8px"},attrs:{color:"blue"},on:{click:function(e){return t.handleEditTag(a)}}},[t._v(t._s(a.name))])],2)}),1)],1)],1)],1)},o=[],r=e("d28d"),s={data:function(){return{formType:"create",tags:[],tagToCreate:{}}},computed:{title:function(){return this.tagToCreate.id?"修改标签":"添加标签"}},created:function(){this.loadTags()},methods:{loadTags:function(){var t=this;r["a"].listAll(!0).then(function(a){t.tags=a.data.data})},handleSaveClick:function(){this.createOrUpdateTag()},handleAddTag:function(){this.formType="create",this.tagToCreate={}},handleEditTag:function(t){this.tagToCreate=t,this.formType="update"},handleDeleteTag:function(t){var a=this;r["a"].delete(t).then(function(t){a.$message.success("删除成功!"),a.loadTags(),a.handleAddTag()})},createOrUpdateTag:function(){var t=this;this.tagToCreate.id?r["a"].update(this.tagToCreate.id,this.tagToCreate).then(function(a){t.$message.success("更新成功!"),t.loadTags(),t.tagToCreate={}}):r["a"].create(this.tagToCreate).then(function(a){t.$message.success("保存成功!"),t.loadTags(),t.tagToCreate={}}),this.handleAddTag()}}},i=s,l=e("17cc"),c=Object(l["a"])(i,n,o,!1,null,null,null);a["default"]=c.exports},d28d:function(t,a,e){"use strict";var n=e("9efd"),o="/api/admin/tags",r={listAll:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(n["a"])({url:o,params:{more:t},method:"get"})},createWithName:function(t){return Object(n["a"])({url:o,data:{name:t},method:"post"})},create:function(t){return Object(n["a"])({url:o,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(o,"/").concat(t),data:a,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})}};a["a"]=r}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-142c8832"],{a8ed:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header-index-wide"},[a("a-row",[a("a-col",{attrs:{span:24}},[a("div",{staticClass:"card-container"},[a("a-tabs",{attrs:{type:"card"}},[a("a-tab-pane",{key:"internal"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"pushpin"}}),t._v("内置页面\n ")],1),a("a-table",{attrs:{columns:t.internalColumns,dataSource:t.internalSheets,pagination:!1,rowKey:function(t){return t.id}},scopedSlots:t._u([{key:"status",fn:function(e){return[e?a("span",[t._v("可用")]):a("span",[t._v("不可用\n "),a("a-tooltip",{attrs:{slot:"action",title:"当前主题没有对应模板"},slot:"action"},[a("a-icon",{attrs:{type:"info-circle-o"}})],1)],1)]}},{key:"action",fn:function(e,n){return a("span",{},[1==n.id?a("router-link",{attrs:{to:{name:"LinkList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),2==n.id?a("router-link",{attrs:{to:{name:"PhotoList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),3==n.id?a("router-link",{attrs:{to:{name:"JournalList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),n.status?a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank"}},[t._v("查看")]):a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank",disabled:""}},[t._v("查看")])],1)}}])})],1),a("a-tab-pane",{key:"custom"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"fork"}}),t._v("自定义页面\n ")],1),a("a-table",{attrs:{rowKey:function(t){return t.id},columns:t.customColumns,dataSource:t.formattedSheets,pagination:!1},scopedSlots:t._u([{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"updateTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,n){return a("span",{},["PUBLISHED"===n.status||"DRAFT"===n.status?a("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditClick(n)}}},[t._v("编辑")]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要发布【"+n.title+"】?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===n.status||"DRAFT"===n.status?a("a-popconfirm",{attrs:{title:"你确定要将【"+n.title+"】页面移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除【"+n.title+"】页面?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(n.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}])})],1)],1)],1)])],1)],1)},s=[],o=(a("612f"),a("ac0d")),r=a("ed66"),i=a("482b"),c=[{title:"页面名称",dataIndex:"title"},{title:"访问路径",dataIndex:"url"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],u=[{title:"标题",dataIndex:"title"},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论量",dataIndex:"commentCount"},{title:"访问量",dataIndex:"visits"},{title:"更新时间",dataIndex:"updateTime",scopedSlots:{customRender:"updateTime"}},{title:"操作",width:"150px",scopedSlots:{customRender:"action"}}],l={mixins:[o["a"],o["b"]],data:function(){return{sheetStatus:r["a"].sheetStatus,internalColumns:c,customColumns:u,internalSheets:[],sheets:[],options:[],keys:["blog_url"]}},computed:{formattedSheets:function(){var t=this;return this.sheets.map(function(e){return e.statusProperty=t.sheetStatus[e.status],e})}},created:function(){this.loadSheets(),this.loadInternalSheets(),this.loadOptions()},methods:{loadSheets:function(){var t=this;r["a"].list().then(function(e){t.sheets=e.data.data.content})},loadInternalSheets:function(){var t=this;r["a"].listInternal().then(function(e){t.internalSheets=e.data.data})},loadOptions:function(){var t=this;i["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handleEditClick:function(t){this.$router.push({name:"SheetEdit",query:{sheetId:t.id}})},handleEditStatusClick:function(t,e){var a=this;r["a"].updateStatus(t,e).then(function(t){a.$message.success("操作成功!"),a.loadSheets()})},handleDeleteClick:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadSheets()})}}},d=l,p=a("17cc"),h=Object(p["a"])(d,n,s,!1,null,null,null);e["default"]=h.exports},ed66:function(t,e,a){"use strict";var n=a("9efd"),s="/api/admin/sheets",o={list:function(){return Object(n["a"])({url:s,method:"get"})},listInternal:function(){return Object(n["a"])({url:"".concat(s,"/internal"),method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"get"})},create:function(t,e){return Object(n["a"])({url:s,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(n["a"])({url:"".concat(s,"/").concat(t,"/").concat(e),method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},sheetStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=o}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-142c8832"],{a8ed:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header-index-wide"},[a("a-row",[a("a-col",{attrs:{span:24}},[a("div",{staticClass:"card-container"},[a("a-tabs",{attrs:{type:"card"}},[a("a-tab-pane",{key:"internal"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"pushpin"}}),t._v("内置页面\n ")],1),a("a-table",{attrs:{columns:t.internalColumns,dataSource:t.internalSheets,pagination:!1,rowKey:function(t){return t.id}},scopedSlots:t._u([{key:"status",fn:function(e){return[e?a("span",[t._v("可用")]):a("span",[t._v("不可用\n "),a("a-tooltip",{attrs:{slot:"action",title:"当前主题没有对应模板"},slot:"action"},[a("a-icon",{attrs:{type:"info-circle-o"}})],1)],1)]}},{key:"action",fn:function(e,n){return a("span",{},[1==n.id?a("router-link",{attrs:{to:{name:"LinkList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),2==n.id?a("router-link",{attrs:{to:{name:"PhotoList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),3==n.id?a("router-link",{attrs:{to:{name:"JournalList"}}},[a("a",{attrs:{href:"javascript:void(0);"}},[t._v("管理")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),n.status?a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank"}},[t._v("查看")]):a("a",{attrs:{href:t.options.blog_url+n.url,target:"_blank",disabled:""}},[t._v("查看")])],1)}}])})],1),a("a-tab-pane",{key:"custom"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"fork"}}),t._v("自定义页面\n ")],1),a("a-table",{attrs:{rowKey:function(t){return t.id},columns:t.customColumns,dataSource:t.formattedSheets,pagination:!1},scopedSlots:t._u([{key:"status",fn:function(e){return a("span",{},[a("a-badge",{attrs:{status:e.status}}),t._v("\n "+t._s(e.text)+"\n ")],1)}},{key:"updateTime",fn:function(e){return a("span",{},[t._v(t._s(t._f("timeAgo")(e)))])}},{key:"action",fn:function(e,n){return a("span",{},["PUBLISHED"===n.status||"DRAFT"===n.status?a("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditClick(n)}}},[t._v("编辑")]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要发布【"+n.title+"】?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"PUBLISHED")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("还原")])]):t._e(),a("a-divider",{attrs:{type:"vertical"}}),"PUBLISHED"===n.status||"DRAFT"===n.status?a("a-popconfirm",{attrs:{title:"你确定要将【"+n.title+"】页面移到回收站?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleEditStatusClick(n.id,"RECYCLE")}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("回收站")])]):"RECYCLE"===n.status?a("a-popconfirm",{attrs:{title:"你确定要永久删除【"+n.title+"】页面?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteClick(n.id)}}},[a("a",{attrs:{href:"javascript:;"}},[t._v("删除")])]):t._e()],1)}}])})],1)],1)],1)])],1)],1)},s=[],o=(a("f763"),a("ac0d")),r=a("ed66"),i=a("482b"),c=[{title:"页面名称",dataIndex:"title"},{title:"访问路径",dataIndex:"url"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],u=[{title:"标题",dataIndex:"title"},{title:"状态",className:"status",dataIndex:"statusProperty",scopedSlots:{customRender:"status"}},{title:"评论量",dataIndex:"commentCount"},{title:"访问量",dataIndex:"visits"},{title:"更新时间",dataIndex:"updateTime",scopedSlots:{customRender:"updateTime"}},{title:"操作",width:"150px",scopedSlots:{customRender:"action"}}],l={mixins:[o["a"],o["b"]],data:function(){return{sheetStatus:r["a"].sheetStatus,internalColumns:c,customColumns:u,internalSheets:[],sheets:[],options:[],keys:["blog_url"]}},computed:{formattedSheets:function(){var t=this;return this.sheets.map(function(e){return e.statusProperty=t.sheetStatus[e.status],e})}},created:function(){this.loadSheets(),this.loadInternalSheets(),this.loadOptions()},methods:{loadSheets:function(){var t=this;r["a"].list().then(function(e){t.sheets=e.data.data.content})},loadInternalSheets:function(){var t=this;r["a"].listInternal().then(function(e){t.internalSheets=e.data.data})},loadOptions:function(){var t=this;i["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handleEditClick:function(t){this.$router.push({name:"SheetEdit",query:{sheetId:t.id}})},handleEditStatusClick:function(t,e){var a=this;r["a"].updateStatus(t,e).then(function(t){a.$message.success("操作成功!"),a.loadSheets()})},handleDeleteClick:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadSheets()})}}},d=l,p=a("17cc"),h=Object(p["a"])(d,n,s,!1,null,null,null);e["default"]=h.exports},ed66:function(t,e,a){"use strict";var n=a("9efd"),s="/api/admin/sheets",o={list:function(){return Object(n["a"])({url:s,method:"get"})},listInternal:function(){return Object(n["a"])({url:"".concat(s,"/internal"),method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"get"})},create:function(t,e){return Object(n["a"])({url:s,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(n["a"])({url:"".concat(s,"/").concat(t,"/").concat(e),method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},sheetStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=o}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14e0b302"],{"306f":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("a-row",{staticClass:"height-100",attrs:{type:"flex",justify:"center",align:"middle"}},[e("a-col",{attrs:{xl:8,md:12,sm:20,xs:24}},[e("div",{staticClass:"card-container"},[e("a-card",{staticClass:"install-card",attrs:{bordered:!1,title:"Halo 安装向导"}},[e("a-steps",{attrs:{current:t.stepCurrent}},[e("a-step",{attrs:{title:"博主信息"}}),e("a-step",{attrs:{title:"博客信息"}}),e("a-step",{attrs:{title:"数据迁移"}})],1),e("a-divider",{attrs:{dashed:""}}),e("a-form",{directives:[{name:"show",rawName:"v-show",value:0==t.stepCurrent,expression:"stepCurrent == 0"}],attrs:{layout:"horizontal",form:t.bloggerForm}},[e("a-form-item",{staticClass:"animated fadeInUp"},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!0,message:"请输入用户名"}]}],expression:"[\n 'username',\n {rules: [{ required: true, message: '请输入用户名' }]}\n ]"}],attrs:{placeholder:"用户名"},model:{value:t.installation.username,callback:function(a){t.$set(t.installation,"username",a)},expression:"installation.username"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.1s"}},[e("a-input",{attrs:{placeholder:"用户昵称"},model:{value:t.installation.nickname,callback:function(a){t.$set(t.installation,"nickname",a)},expression:"installation.nickname"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.2s"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{required:!0,message:"请输入邮箱"}]}],expression:"[\n 'email',\n {rules: [{ required: true, message: '请输入邮箱' }]}\n ]"}],attrs:{placeholder:"用户邮箱"},model:{value:t.installation.email,callback:function(a){t.$set(t.installation,"email",a)},expression:"installation.email"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.3s"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码(8-100位)"}]}],expression:"[\n 'password',\n {rules: [{ required: true, message: '请输入密码(8-100位)' }]}\n ]"}],attrs:{type:"password",placeholder:"用户密码"},model:{value:t.installation.password,callback:function(a){t.$set(t.installation,"password",a)},expression:"installation.password"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.4s"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirmPassword",{rules:[{required:!0,message:"请确定密码"}]}],expression:"[\n 'confirmPassword',\n {rules: [{ required: true, message: '请确定密码' }]}\n ]"}],attrs:{type:"password",placeholder:"确定密码"},model:{value:t.installation.confirmPassword,callback:function(a){t.$set(t.installation,"confirmPassword",a)},expression:"installation.confirmPassword"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1),e("a-form",{directives:[{name:"show",rawName:"v-show",value:1==t.stepCurrent,expression:"stepCurrent == 1"}],attrs:{layout:"horizontal"}},[e("a-form-item",{staticClass:"animated fadeInUp"},[e("a-input",{attrs:{placeholder:"博客地址"},model:{value:t.installation.url,callback:function(a){t.$set(t.installation,"url",a)},expression:"installation.url"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"link"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.2s"}},[e("a-input",{attrs:{placeholder:"博客标题"},model:{value:t.installation.title,callback:function(a){t.$set(t.installation,"title",a)},expression:"installation.title"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"book"},slot:"prefix"})],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2==t.stepCurrent,expression:"stepCurrent == 2"}]},[e("a-alert",{staticClass:"animated fadeInUp",staticStyle:{"margin-bottom":"1rem"},attrs:{message:"如果有迁移需求,请点击并选择'迁移文件'",type:"info"}}),e("Upload",{staticClass:"animated fadeIn",style:{"animation-delay":"0.2s"},attrs:{name:t.migrationUploadName,accept:"application/json",uploadHandler:t.handleMigrationUpload},on:{remove:t.handleMigrationFileRemove}},[e("p",{staticClass:"ant-upload-drag-icon"},[e("a-icon",{attrs:{type:"inbox"}})],1),e("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),e("p",{staticClass:"ant-upload-hint"},[t._v("仅支持单个文件上传")])])],1),e("a-row",{staticClass:"install-action",attrs:{type:"flex",justify:"space-between"}},[e("div",[0!=t.stepCurrent?e("a-button",{staticClass:"previus-button",on:{click:function(a){t.stepCurrent--}}},[t._v("上一步")]):t._e(),2!=t.stepCurrent?e("a-button",{attrs:{type:"primary"},on:{click:t.handleNextStep}},[t._v("下一步")]):t._e()],1),2==t.stepCurrent?e("a-button",{attrs:{type:"danger",icon:"upload"},on:{click:t.handleInstall}},[t._v("安装")]):t._e()],1)],1)],1)])],1)],1)},i=[],n=(e("612f"),e("50fc")),l=e("482b"),r=e("9efd"),o="/api/admin/recoveries",c={migrate:function(t){return Object(r["a"])({url:"".concat(o,"/migrations/v0_4_3"),data:t,method:"post"})}},d=c,u={data:function(){return{formItemLayout:{labelCol:{xs:{span:24},sm:{span:5},lg:{span:4},xl:{span:4},xxl:{span:3}},wrapperCol:{xs:{span:24},sm:{span:19},lg:{span:20},xl:{span:20},xxl:{span:21}}},installation:{},migrationUploadName:"file",migrationData:null,stepCurrent:0,bloggerForm:this.$form.createForm(this),keys:["is_installed"]}},created:function(){this.verifyIsInstall(),this.installation.url=window.location.protocol+"//"+window.location.host},methods:{verifyIsInstall:function(){var t=this;l["a"].listAll(this.keys).then(function(a){a.data.data.is_installed&&t.$router.push({name:"Login"})})},handleNextStep:function(t){var a=this;t.preventDefault(),this.bloggerForm.validateFields(function(t,e){console.log("error",t),console.log("Received values of form: ",e),null!=t||a.stepCurrent++})},handleMigrationUpload:function(t){var a=this;return this.$log.debug("Selected data",t),this.migrationData=t,new Promise(function(t,e){a.$log.debug("Handle uploading"),t()})},handleMigrationFileRemove:function(t){this.$log.debug("Removed file",t),this.$log.debug("Migration file from data",this.migrationData.get(this.migrationUploadName)),this.migrationData.get(this.migrationUploadName).uid===t.uid&&(this.migrationData=null,this.migrationFile=null)},install:function(){var t=this;n["a"].install(this.installation).then(function(a){t.$log.debug("Installation response",a),t.$message.success("安装成功!"),setTimeout(function(){t.$router.push({name:"Dashboard"})},300)})},handleInstall:function(){var t=this,a=this.installation.password,e=this.installation.confirmPassword;this.$log.debug("Password",a),this.$log.debug("Confirm password",e),a===e?this.migrationData?d.migrate(this.migrationData).then(function(a){t.$log.debug("Migrated successfullly"),t.$message.success("数据迁移成功!"),t.install()}):this.install():this.$message.error("确认密码和密码不匹配")}}},p=u,m=(e("5076"),e("17cc")),f=Object(m["a"])(p,s,i,!1,null,"1ac0b863",null);a["default"]=f.exports},5076:function(t,a,e){"use strict";var s=e("8852"),i=e.n(s);i.a},8852:function(t,a,e){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,e){},2967:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",[e("a-col",{attrs:{span:24}},[e("a-card",{attrs:{bordered:!1}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[e("h3",{attrs:{slot:"title"},slot:"title"},[t._v("\n 环境信息\n ")]),e("template",{slot:"description"},[e("ul",[e("li",[t._v("版本:"+t._s(t.environments.version))]),e("li",[t._v("数据库:"+t._s(t.environments.database))]),e("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),e("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),e("a-icon",{attrs:{type:"link"}})],1),t._v(" \n "),e("a",{attrs:{href:"https://halo.run/docs",target:"_blank"}},[t._v("用户文档\n "),e("a-icon",{attrs:{type:"link"}})],1),t._v(" \n "),e("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),e("a-icon",{attrs:{type:"link"}})],1),t._v(" \n ")])],2)],1),e("a-list-item",[e("a-list-item-meta",[e("h3",{attrs:{slot:"title"},slot:"title"},[t._v("\n 开发者\n ")]),e("template",{slot:"description"},t._l(t.developers,function(t,a){return e("a-tooltip",{key:a,attrs:{placement:"top",title:t.name}},[e("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)}),1)],2)],1),e("a-list-item",[e("a-list-item-meta",[e("h3",{attrs:{slot:"title"},slot:"title"},[t._v("\n 时间轴\n ")]),e("template",{slot:"description"},[e("a-timeline",[e("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,n){return e("a-timeline-item",{key:n},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],2)],1)],1)],1)],1)],1)],1)},i=[],s=e("50fc"),r={data:function(){return{environments:{},developers:[{name:"Ryan Wang",avatar:"https://gravatar.loli.net/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"https://gravatar.loli.net/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"https://gravatar.loli.net/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"https://gravatar.loli.net/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-??-??",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}]}},created:function(){this.getEnvironments()},methods:{getEnvironments:function(){var t=this;s["a"].environments().then(function(a){t.environments=a.data.data})}}},o=r,l=(e("5ea2"),e("17cc")),c=Object(l["a"])(o,n,i,!1,null,null,null);a["default"]=c.exports},"5ea2":function(t,a,e){"use strict";var n=e("031c"),i=e.n(n);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,e){},2967:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",[e("a-col",{attrs:{span:24}},[e("a-card",{attrs:{bordered:!1}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[e("h3",{attrs:{slot:"title"},slot:"title"},[t._v("\n 环境信息\n ")]),e("template",{slot:"description"},[e("ul",[e("li",[t._v("版本:"+t._s(t.environments.version))]),e("li",[t._v("数据库:"+t._s(t.environments.database))]),e("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),e("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),e("a-icon",{attrs:{type:"link"}})],1),t._v(" \n "),e("a",{attrs:{href:"https://halo.run/docs",target:"_blank"}},[t._v("用户文档\n "),e("a-icon",{attrs:{type:"link"}})],1),t._v(" \n "),e("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),e("a-icon",{attrs:{type:"link"}})],1),t._v(" \n ")])],2)],1),e("a-list-item",[e("a-list-item-meta",[e("h3",{attrs:{slot:"title"},slot:"title"},[t._v("\n 开发者\n ")]),e("template",{slot:"description"},t._l(t.developers,function(t,a){return e("a-tooltip",{key:a,attrs:{placement:"top",title:t.name}},[e("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)}),1)],2)],1),e("a-list-item",[e("a-list-item-meta",[e("h3",{attrs:{slot:"title"},slot:"title"},[t._v("\n 时间轴\n ")]),e("template",{slot:"description"},[e("a-timeline",[e("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,n){return e("a-timeline-item",{key:n},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],2)],1)],1)],1)],1)],1)],1)},i=[],s=e("50fc"),r={data:function(){return{environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}]}},created:function(){this.getEnvironments()},methods:{getEnvironments:function(){var t=this;s["a"].environments().then(function(a){t.environments=a.data.data})}}},o=r,c=(e("5ea2"),e("17cc")),l=Object(c["a"])(o,n,i,!1,null,null,null);a["default"]=l.exports},"5ea2":function(t,a,e){"use strict";var n=e("031c"),i=e.n(n);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2a007c18"],{"481f":function(t,a,e){},"5bcf":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("div",{staticClass:"attach-detail-img"},[e("img",{attrs:{src:t.attachment.path}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(a){t.$set(t.attachment,"name",a)},expression:"attachment.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.path}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyNormalLink}})],1)])])],1),e("a-list-item",[e("a-list-item-meta",[e("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyMarkdownLink}})],1)])])],1)],1)],1)],1)],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.addToPhoto?e("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),e("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],s=(e("3a23"),e("ac0d")),o=e("a796"),l=e("975e"),c={name:"AttachmentDetailDrawer",mixins:[s["a"],s["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,a){this.$log.debug("old value",a),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;o["a"].delete(this.attachment.id).then(function(a){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;o["a"].update(this.attachment.id,this.attachment).then(function(a){t.$log.debug("Updated attachment",a.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,a="".concat(this.attachment.path);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,a="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(a){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},r=c,d=(e("b3a7"),e("17cc")),u=Object(d["a"])(r,n,i,!1,null,null,null);a["a"]=u.exports},"61d0":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=this,e=a.$createElement,n=a._self._c||e;return n("page-view",[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{staticClass:"search-box",attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:a.queryParam.keyword,callback:function(t){a.$set(a.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"存储位置"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.attachmentType,callback:function(t){a.$set(a.queryParam,"attachmentType",t)},expression:"queryParam.attachmentType"}},a._l(Object.keys(a.attachmentType),function(t){return n("a-select-option",{key:t,attrs:{value:t}},[a._v(a._s(a.attachmentType[t].text))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"文件类型"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.mediaType,callback:function(t){a.$set(a.queryParam,"mediaType",t)},expression:"queryParam.mediaType"}},a._l(a.mediaTypes,function(t,e){return n("a-select-option",{key:e,attrs:{value:t}},[a._v(a._s(t))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:a.handleQuery}},[a._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:a.handleResetParam}},[a._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return t.uploadVisible=!0}}},[a._v("上传")])],1)])],1),n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:a.formattedDatas,loading:a.listLoading},scopedSlots:a._u([{key:"renderItem",fn:function(t,e){return n("a-list-item",{key:e},[n("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return a.handleShowDetailDrawer(t)}}},[n("div",{staticClass:"attach-thumb"},[n("img",{attrs:{src:t.thumbPath}})]),n("a-card-meta",[n("ellipsis",{attrs:{slot:"description",length:a.isMobile()?36:16,tooltip:""},slot:"description"},[a._v(a._s(t.name))])],1)],1)],1)}}])})],1)],1),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:a.pagination.total,defaultPageSize:a.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:a.handlePaginationChange,showSizeChange:a.handlePaginationChange}})],1),n("a-modal",{attrs:{title:"上传附件",footer:null},model:{value:a.uploadVisible,callback:function(t){a.uploadVisible=t},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:a.uploadHandler},on:{success:a.handleUploadSuccess}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[a._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[a._v("支持单个或批量上传")])])],1),a.selectAttachment?n("AttachmentDetailDrawer",{attrs:{attachment:a.selectAttachment,addToPhoto:!0},on:{delete:function(){return t.loadAttachments()}},model:{value:a.drawerVisiable,callback:function(t){a.drawerVisiable=t},expression:"drawerVisiable"}}):a._e()],1)},i=[],s=(e("ab56"),e("680a")),o=e("ac0d"),l=e("5bcf"),c=e("a796"),r={components:{PageView:s["b"],AttachmentDetailDrawer:l["a"]},mixins:[o["a"],o["b"]],data:function(){return{attachmentType:c["a"].type,listLoading:!0,uploadVisible:!1,selectAttachment:{},attachments:[],mediaTypes:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null,mediaType:null,attachmentType:null},uploadHandler:c["a"].upload,drawerVisiable:!1}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(a){return a.typeProperty=t.attachmentType[a.type],a})}},created:function(){this.loadAttachments(),this.loadMediaTypes()},methods:{loadAttachments:function(){var t=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,this.listLoading=!0,c["a"].query(this.queryParam).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total,t.listLoading=!1})},loadMediaTypes:function(){var t=this;c["a"].getMediaTypes().then(function(a){t.mediaTypes=a.data.data})},handleShowDetailDrawer:function(t){this.selectAttachment=t,this.drawerVisiable=!0},handleUploadSuccess:function(){this.loadAttachments(),this.loadMediaTypes()},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.mediaType=null,this.queryParam.attachmentType=null,this.loadAttachments()},handleQuery:function(){this.queryParam.page=0,this.loadAttachments()}}},d=r,u=(e("7b1e"),e("17cc")),m=Object(u["a"])(d,n,i,!1,null,"40ab62a8",null);a["default"]=m.exports},"7b1e":function(t,a,e){"use strict";var n=e("481f"),i=e.n(n);i.a},9298:function(t,a,e){},"975e":function(t,a,e){"use strict";var n=e("9efd"),i="/api/admin/photos",s={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=s},a796:function(t,a,e){"use strict";var n=e("7f43"),i=e.n(n),s=e("9efd"),o="/api/admin/attachments",l={query:function(t){return Object(s["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"get"})},delete:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},update:function(t,a){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(s["a"])({url:"".concat(o,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l},b3a7:function(t,a,e){"use strict";var n=e("9298"),i=e.n(n);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2ca3170e"],{"0709":function(t,a,e){},"306f":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("a-row",{staticClass:"height-100",attrs:{type:"flex",justify:"center",align:"middle"}},[e("a-col",{attrs:{xl:8,md:12,sm:20,xs:24}},[e("div",{staticClass:"card-container"},[e("a-card",{staticClass:"install-card",attrs:{bordered:!1,title:"Halo 安装向导"}},[e("a-steps",{attrs:{current:t.stepCurrent}},[e("a-step",{attrs:{title:"博主信息"}}),e("a-step",{attrs:{title:"博客信息"}}),e("a-step",{attrs:{title:"数据迁移"}})],1),e("a-divider",{attrs:{dashed:""}}),e("a-form",{directives:[{name:"show",rawName:"v-show",value:0==t.stepCurrent,expression:"stepCurrent == 0"}],attrs:{layout:"horizontal",form:t.bloggerForm}},[e("a-form-item",{staticClass:"animated fadeInUp"},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!0,message:"请输入用户名"}]}],expression:"[\n 'username',\n {rules: [{ required: true, message: '请输入用户名' }]}\n ]"}],attrs:{placeholder:"用户名"},model:{value:t.installation.username,callback:function(a){t.$set(t.installation,"username",a)},expression:"installation.username"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.1s"}},[e("a-input",{attrs:{placeholder:"用户昵称"},model:{value:t.installation.nickname,callback:function(a){t.$set(t.installation,"nickname",a)},expression:"installation.nickname"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.2s"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{required:!0,message:"请输入邮箱"}]}],expression:"[\n 'email',\n {rules: [{ required: true, message: '请输入邮箱' }]}\n ]"}],attrs:{placeholder:"用户邮箱"},model:{value:t.installation.email,callback:function(a){t.$set(t.installation,"email",a)},expression:"installation.email"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.3s"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码(8-100位)"}]}],expression:"[\n 'password',\n {rules: [{ required: true, message: '请输入密码(8-100位)' }]}\n ]"}],attrs:{type:"password",placeholder:"用户密码"},model:{value:t.installation.password,callback:function(a){t.$set(t.installation,"password",a)},expression:"installation.password"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.4s"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirmPassword",{rules:[{required:!0,message:"请确定密码"}]}],expression:"[\n 'confirmPassword',\n {rules: [{ required: true, message: '请确定密码' }]}\n ]"}],attrs:{type:"password",placeholder:"确定密码"},model:{value:t.installation.confirmPassword,callback:function(a){t.$set(t.installation,"confirmPassword",a)},expression:"installation.confirmPassword"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1),e("a-form",{directives:[{name:"show",rawName:"v-show",value:1==t.stepCurrent,expression:"stepCurrent == 1"}],attrs:{layout:"horizontal"}},[e("a-form-item",{staticClass:"animated fadeInUp"},[e("a-input",{attrs:{placeholder:"博客地址"},model:{value:t.installation.url,callback:function(a){t.$set(t.installation,"url",a)},expression:"installation.url"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"link"},slot:"prefix"})],1)],1),e("a-form-item",{staticClass:"animated fadeInUp",style:{"animation-delay":"0.2s"}},[e("a-input",{attrs:{placeholder:"博客标题"},model:{value:t.installation.title,callback:function(a){t.$set(t.installation,"title",a)},expression:"installation.title"}},[e("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"book"},slot:"prefix"})],1)],1)],1),e("div",{directives:[{name:"show",rawName:"v-show",value:2==t.stepCurrent,expression:"stepCurrent == 2"}]},[e("a-alert",{staticClass:"animated fadeInUp",staticStyle:{"margin-bottom":"1rem"},attrs:{message:"如果有迁移需求,请点击并选择'迁移文件'",type:"info"}}),e("Upload",{staticClass:"animated fadeIn",style:{"animation-delay":"0.2s"},attrs:{name:t.migrationUploadName,accept:"application/json",uploadHandler:t.handleMigrationUpload},on:{remove:t.handleMigrationFileRemove}},[e("p",{staticClass:"ant-upload-drag-icon"},[e("a-icon",{attrs:{type:"inbox"}})],1),e("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),e("p",{staticClass:"ant-upload-hint"},[t._v("仅支持单个文件上传")])])],1),e("a-row",{staticClass:"install-action",attrs:{type:"flex",justify:"space-between"}},[e("div",[0!=t.stepCurrent?e("a-button",{staticClass:"previus-button",on:{click:function(a){t.stepCurrent--}}},[t._v("上一步")]):t._e(),2!=t.stepCurrent?e("a-button",{attrs:{type:"primary"},on:{click:t.handleNextStep}},[t._v("下一步")]):t._e()],1),2==t.stepCurrent?e("a-button",{attrs:{type:"danger",icon:"upload"},on:{click:t.handleInstall}},[t._v("安装")]):t._e()],1)],1)],1)])],1)],1)},i=[],n=(e("f763"),e("50fc")),l=e("482b"),r=e("9efd"),o="/api/admin/recoveries",c={migrate:function(t){return Object(r["a"])({url:"".concat(o,"/migrations/v0_4_3"),data:t,method:"post"})}},d=c,u={data:function(){return{formItemLayout:{labelCol:{xs:{span:24},sm:{span:5},lg:{span:4},xl:{span:4},xxl:{span:3}},wrapperCol:{xs:{span:24},sm:{span:19},lg:{span:20},xl:{span:20},xxl:{span:21}}},installation:{},migrationUploadName:"file",migrationData:null,stepCurrent:0,bloggerForm:this.$form.createForm(this),keys:["is_installed"]}},created:function(){this.verifyIsInstall(),this.installation.url=window.location.protocol+"//"+window.location.host},methods:{verifyIsInstall:function(){var t=this;l["a"].listAll(this.keys).then(function(a){a.data.data.is_installed&&t.$router.push({name:"Login"})})},handleNextStep:function(t){var a=this;t.preventDefault(),this.bloggerForm.validateFields(function(t,e){console.log("error",t),console.log("Received values of form: ",e),null!=t||a.stepCurrent++})},handleMigrationUpload:function(t){var a=this;return this.$log.debug("Selected data",t),this.migrationData=t,new Promise(function(t,e){a.$log.debug("Handle uploading"),t()})},handleMigrationFileRemove:function(t){this.$log.debug("Removed file",t),this.$log.debug("Migration file from data",this.migrationData.get(this.migrationUploadName)),this.migrationData.get(this.migrationUploadName).uid===t.uid&&(this.migrationData=null,this.migrationFile=null)},install:function(){var t=this;n["a"].install(this.installation).then(function(a){t.$log.debug("Installation response",a),t.$message.success("安装成功!"),setTimeout(function(){t.$router.push({name:"Dashboard"})},300)})},handleInstall:function(){var t=this,a=this.installation.password,e=this.installation.confirmPassword;this.$log.debug("Password",a),this.$log.debug("Confirm password",e),a===e?this.migrationData?d.migrate(this.migrationData).then(function(a){t.$log.debug("Migrated successfullly"),t.$message.success("数据迁移成功!"),t.install()}):this.install():this.$message.error("确认密码和密码不匹配")}}},p=u,m=(e("effc"),e("17cc")),f=Object(m["a"])(p,s,i,!1,null,"f2997e68",null);a["default"]=f.exports},effc:function(t,a,e){"use strict";var s=e("0709"),i=e.n(s);i.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d65a2"],{"71d6":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12}},[n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[n("a-card",{attrs:{title:e.title}},[n("a-form",{attrs:{layout:"horizontal"}},[n("a-form-item",{attrs:{label:"名称:",help:"* 页面上所显示的名称"}},[n("a-input",{model:{value:e.menuToCreate.name,callback:function(t){e.$set(e.menuToCreate,"name",t)},expression:"menuToCreate.name"}})],1),n("a-form-item",{attrs:{label:"地址:",help:"* 菜单的地址"}},[n("a-input",{model:{value:e.menuToCreate.url,callback:function(t){e.$set(e.menuToCreate,"url",t)},expression:"menuToCreate.url"}})],1),n("a-form-item",{attrs:{label:"上级菜单:"}},[n("menu-select-tree",{attrs:{menus:e.menus},model:{value:e.menuToCreate.parentId,callback:function(t){e.$set(e.menuToCreate,"parentId",t)},expression:"menuToCreate.parentId"}})],1),n("a-form-item",{attrs:{label:"排序编号:"}},[n("a-input",{attrs:{type:"number"},model:{value:e.menuToCreate.priority,callback:function(t){e.$set(e.menuToCreate,"priority",t)},expression:"menuToCreate.priority"}})],1),n("a-form-item",{style:{display:e.fieldExpand?"block":"none"},attrs:{label:"图标:",help:"* 请根据主题的支持选填"}},[n("a-input",{model:{value:e.menuToCreate.icon,callback:function(t){e.$set(e.menuToCreate,"icon",t)},expression:"menuToCreate.icon"}})],1),n("a-form-item",{style:{display:e.fieldExpand?"block":"none"},attrs:{label:"打开方式:"}},[n("a-select",{attrs:{defaultValue:"_self"},model:{value:e.menuToCreate.target,callback:function(t){e.$set(e.menuToCreate,"target",t)},expression:"menuToCreate.target"}},[n("a-select-option",{attrs:{value:"_self"}},[e._v("当前窗口")]),n("a-select-option",{attrs:{value:"_blank"}},[e._v("新窗口")])],1)],1),n("a-form-item",["create"===e.formType?n("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("保存")]):n("a-button-group",[n("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("更新")]),"update"===e.formType?n("a-button",{attrs:{type:"dashed"},on:{click:e.handleAddMenu}},[e._v("返回添加")]):e._e()],1),n("a",{style:{marginLeft:"8px"},on:{click:e.toggleExpand}},[e._v("\n 更多选项\n "),n("a-icon",{attrs:{type:e.fieldExpand?"up":"down"}})],1)],1)],1)],1)],1),n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[n("a-card",{attrs:{title:"所有菜单"}},[n("a-table",{attrs:{columns:e.columns,dataSource:e.menus,loading:e.loading,rowKey:function(e){return e.id}},scopedSlots:e._u([{key:"name",fn:function(t){return n("ellipsis",{attrs:{length:30,tooltip:""}},[e._v(e._s(t))])}},{key:"action",fn:function(t,a){return n("span",{},[n("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleEditMenu(a)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除【"+a.name+"】菜单?",okText:"确定",cancelText:"取消"},on:{confirm:function(t){return e.handleDeleteMenu(a.id)}}},[n("a",{attrs:{href:"javascript:;"}},[e._v("删除")])])],1)}}])})],1)],1)],1)],1)},r=[],o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-tree-select",{attrs:{treeData:e.menuTreeData,placeholder:"请选择上级菜单,默认为顶级菜单",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:e.menuIdString},on:{change:e.handleSelectionChange}})},l=[],u=(n("48fb"),n("3a23"),n("b06f"),{name:"MenuSelectTree",model:{prop:"menuId",event:"change"},props:{menuId:{type:Number,required:!0,default:0},menus:{type:Array,required:!1,default:function(){return[]}}},computed:{menuTreeData:function(){return this.menus.map(function(e){return{id:e.id,title:e.name,value:e.id.toString(),pId:e.parentId}})},menuIdString:function(){return this.menuId.toString()}},methods:{handleSelectionChange:function(e,t,n){this.$log.debug("value: ",e),this.$log.debug("label: ",t),this.$log.debug("extra: ",n),this.$emit("change",e?parseInt(e):0)}}}),i=u,c=n("17cc"),s=Object(c["a"])(i,o,l,!1,null,null,null),d=s.exports,m=n("9efd"),p="/api/admin/menus",f={listAll:function(){return Object(m["a"])({url:p,method:"get"})},listTree:function(){return Object(m["a"])({url:"".concat(p,"/tree_view"),method:"get"})},create:function(e){return Object(m["a"])({url:p,data:e,method:"post"})},delete:function(e){return Object(m["a"])({url:"".concat(p,"/").concat(e),method:"delete"})},get:function(e){return Object(m["a"])({url:"".concat(p,"/").concat(e),method:"get"})},update:function(e,t){return Object(m["a"])({url:"".concat(p,"/").concat(e),data:t,method:"put"})}},h=f,g=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"地址",dataIndex:"url"},{title:"排序",dataIndex:"priority"},{title:"操作",key:"action",scopedSlots:{customRender:"action"}}],b={components:{MenuSelectTree:d},data:function(){return{formType:"create",loading:!1,columns:g,menus:[],menuToCreate:{},fieldExpand:!1}},computed:{title:function(){return this.menuToCreate.id?"修改菜单":"添加菜单"}},created:function(){this.loadMenus()},methods:{loadMenus:function(){var e=this;this.loading=!0,h.listTree().then(function(t){e.menus=t.data.data,e.loading=!1})},handleSaveClick:function(){this.createOrUpdateMenu()},handleAddMenu:function(){this.formType="create",this.menuToCreate={}},handleEditMenu:function(e){this.menuToCreate=e,this.formType="update"},handleDeleteMenu:function(e){var t=this;h.delete(e).then(function(e){t.$message.success("删除成功!"),t.loadMenus()})},createOrUpdateMenu:function(){var e=this;this.menuToCreate.id?h.update(this.menuToCreate.id,this.menuToCreate).then(function(t){e.$message.success("更新成功!"),e.loadMenus()}):h.create(this.menuToCreate).then(function(t){e.$message.success("保存成功!"),e.loadMenus()}),this.handleAddMenu()},toggleExpand:function(){this.fieldExpand=!this.fieldExpand}}},T=b,v=Object(c["a"])(T,a,r,!1,null,"744c6750",null);t["default"]=v.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d65a2"],{"71d6":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12}},[n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[n("a-card",{attrs:{title:e.title}},[n("a-form",{attrs:{layout:"horizontal"}},[n("a-form-item",{attrs:{label:"名称:",help:"* 页面上所显示的名称"}},[n("a-input",{model:{value:e.menuToCreate.name,callback:function(t){e.$set(e.menuToCreate,"name",t)},expression:"menuToCreate.name"}})],1),n("a-form-item",{attrs:{label:"地址:",help:"* 菜单的地址"}},[n("a-input",{model:{value:e.menuToCreate.url,callback:function(t){e.$set(e.menuToCreate,"url",t)},expression:"menuToCreate.url"}})],1),n("a-form-item",{attrs:{label:"上级菜单:"}},[n("menu-select-tree",{attrs:{menus:e.menus},model:{value:e.menuToCreate.parentId,callback:function(t){e.$set(e.menuToCreate,"parentId",t)},expression:"menuToCreate.parentId"}})],1),n("a-form-item",{attrs:{label:"排序编号:"}},[n("a-input",{attrs:{type:"number"},model:{value:e.menuToCreate.priority,callback:function(t){e.$set(e.menuToCreate,"priority",t)},expression:"menuToCreate.priority"}})],1),n("a-form-item",{style:{display:e.fieldExpand?"block":"none"},attrs:{label:"图标:",help:"* 请根据主题的支持选填"}},[n("a-input",{model:{value:e.menuToCreate.icon,callback:function(t){e.$set(e.menuToCreate,"icon",t)},expression:"menuToCreate.icon"}})],1),n("a-form-item",{style:{display:e.fieldExpand?"block":"none"},attrs:{label:"打开方式:"}},[n("a-select",{attrs:{defaultValue:"_self"},model:{value:e.menuToCreate.target,callback:function(t){e.$set(e.menuToCreate,"target",t)},expression:"menuToCreate.target"}},[n("a-select-option",{attrs:{value:"_self"}},[e._v("当前窗口")]),n("a-select-option",{attrs:{value:"_blank"}},[e._v("新窗口")])],1)],1),n("a-form-item",["create"===e.formType?n("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("保存")]):n("a-button-group",[n("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("更新")]),"update"===e.formType?n("a-button",{attrs:{type:"dashed"},on:{click:e.handleAddMenu}},[e._v("返回添加")]):e._e()],1),n("a",{style:{marginLeft:"8px"},on:{click:e.toggleExpand}},[e._v("\n 更多选项\n "),n("a-icon",{attrs:{type:e.fieldExpand?"up":"down"}})],1)],1)],1)],1)],1),n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[n("a-card",{attrs:{title:"所有菜单"}},[n("a-table",{attrs:{columns:e.columns,dataSource:e.menus,loading:e.loading,rowKey:function(e){return e.id}},scopedSlots:e._u([{key:"name",fn:function(t){return n("ellipsis",{attrs:{length:30,tooltip:""}},[e._v(e._s(t))])}},{key:"action",fn:function(t,a){return n("span",{},[n("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleEditMenu(a)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除【"+a.name+"】菜单?",okText:"确定",cancelText:"取消"},on:{confirm:function(t){return e.handleDeleteMenu(a.id)}}},[n("a",{attrs:{href:"javascript:;"}},[e._v("删除")])])],1)}}])})],1)],1)],1)],1)},r=[],o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-tree-select",{attrs:{treeData:e.menuTreeData,placeholder:"请选择上级菜单,默认为顶级菜单",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:e.menuIdString},on:{change:e.handleSelectionChange}})},l=[],u=(n("0857"),n("7364"),n("d4d5"),{name:"MenuSelectTree",model:{prop:"menuId",event:"change"},props:{menuId:{type:Number,required:!0,default:0},menus:{type:Array,required:!1,default:function(){return[]}}},computed:{menuTreeData:function(){return this.menus.map(function(e){return{id:e.id,title:e.name,value:e.id.toString(),pId:e.parentId}})},menuIdString:function(){return this.menuId.toString()}},methods:{handleSelectionChange:function(e,t,n){this.$log.debug("value: ",e),this.$log.debug("label: ",t),this.$log.debug("extra: ",n),this.$emit("change",e?parseInt(e):0)}}}),i=u,s=n("17cc"),c=Object(s["a"])(i,o,l,!1,null,null,null),d=c.exports,m=n("9efd"),p="/api/admin/menus",f={listAll:function(){return Object(m["a"])({url:p,method:"get"})},listTree:function(){return Object(m["a"])({url:"".concat(p,"/tree_view"),method:"get"})},create:function(e){return Object(m["a"])({url:p,data:e,method:"post"})},delete:function(e){return Object(m["a"])({url:"".concat(p,"/").concat(e),method:"delete"})},get:function(e){return Object(m["a"])({url:"".concat(p,"/").concat(e),method:"get"})},update:function(e,t){return Object(m["a"])({url:"".concat(p,"/").concat(e),data:t,method:"put"})}},h=f,g=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"地址",dataIndex:"url"},{title:"排序",dataIndex:"priority"},{title:"操作",key:"action",scopedSlots:{customRender:"action"}}],T={components:{MenuSelectTree:d},data:function(){return{formType:"create",loading:!1,columns:g,menus:[],menuToCreate:{},fieldExpand:!1}},computed:{title:function(){return this.menuToCreate.id?"修改菜单":"添加菜单"}},created:function(){this.loadMenus()},methods:{loadMenus:function(){var e=this;this.loading=!0,h.listTree().then(function(t){e.menus=t.data.data,e.loading=!1})},handleSaveClick:function(){this.createOrUpdateMenu()},handleAddMenu:function(){this.formType="create",this.menuToCreate={}},handleEditMenu:function(e){this.menuToCreate=e,this.formType="update"},handleDeleteMenu:function(e){var t=this;h.delete(e).then(function(e){t.$message.success("删除成功!"),t.loadMenus()})},createOrUpdateMenu:function(){var e=this;this.menuToCreate.id?h.update(this.menuToCreate.id,this.menuToCreate).then(function(t){e.$message.success("更新成功!"),e.loadMenus()}):h.create(this.menuToCreate).then(function(t){e.$message.success("保存成功!"),e.loadMenus()}),this.handleAddMenu()},toggleExpand:function(){this.fieldExpand=!this.fieldExpand}}},b=T,v=Object(s["a"])(b,a,r,!1,null,"432853d4",null);t["default"]=v.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21a35c"],{bb17:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12}},[n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[n("a-card",{attrs:{title:t.title}},[n("a-form",{attrs:{layout:"horizontal"}},[n("a-form-item",{attrs:{label:"网站名称:"}},[n("a-input",{model:{value:t.link.name,callback:function(e){t.$set(t.link,"name",e)},expression:"link.name"}})],1),n("a-form-item",{attrs:{label:"网站地址:",help:"* 需要加上 http://"}},[n("a-input",{model:{value:t.link.url,callback:function(e){t.$set(t.link,"url",e)},expression:"link.url"}})],1),n("a-form-item",{attrs:{label:"Logo:"}},[n("a-input",{model:{value:t.link.logo,callback:function(e){t.$set(t.link,"logo",e)},expression:"link.logo"}})],1),n("a-form-item",{attrs:{label:"分组:",help:"* 非必填"}},[n("a-input",{model:{value:t.link.team,callback:function(e){t.$set(t.link,"team",e)},expression:"link.team"}})],1),n("a-form-item",{attrs:{label:"描述:"}},[n("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:t.link.description,callback:function(e){t.$set(t.link,"description",e)},expression:"link.description"}})],1),n("a-form-item",["create"===t.formType?n("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("保存")]):n("a-button-group",[n("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("更新")]),"update"===t.formType?n("a-button",{attrs:{type:"dashed"},on:{click:t.handleAddLink}},[t._v("返回添加")]):t._e()],1)],1)],1)],1)],1),n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[n("a-card",{attrs:{title:"所有友情链接"}},[n("a-table",{attrs:{columns:t.columns,dataSource:t.links,loading:t.loading,rowKey:function(t){return t.id}},scopedSlots:t._u([{key:"url",fn:function(e){return[n("a",{attrs:{target:"_blank",href:e}},[t._v(t._s(e))])]}},{key:"name",fn:function(e){return n("ellipsis",{attrs:{length:15,tooltip:""}},[t._v(t._s(e))])}},{key:"action",fn:function(e,a){return n("span",{},[n("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditLink(a.id)}}},[t._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除【"+a.name+"】链接?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteLink(a.id)}}},[n("a",{attrs:{href:"javascript:;"}},[t._v("删除")])])],1)}}])})],1)],1)],1)],1)},i=[],l=(n("3aba"),n("9efd")),o="/api/admin/links",r={listAll:function(){return Object(l["a"])({url:"".concat(o),method:"get"})},create:function(t){return Object(l["a"])({url:o,data:t,method:"post"})},get:function(t){return Object(l["a"])({url:"".concat(o,"/").concat(t),method:"get"})},update:function(t,e){return Object(l["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(l["a"])({url:"".concat(o,"/").concat(t),method:"delete"})}},c=r,s=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"网址",dataIndex:"url",scopedSlots:{customRender:"url"}},{title:"分组",dataIndex:"team"},{title:"操作",key:"action",scopedSlots:{customRender:"action"}}],d={data:function(){return{formType:"create",data:[],loading:!1,columns:s,links:[],link:{}}},computed:{title:function(){return this.link.id?"修改友情链接":"添加友情链接"}},created:function(){this.loadLinks()},methods:{loadLinks:function(){var t=this;this.loading=!0,c.listAll().then(function(e){t.links=e.data.data,t.loading=!1})},handleSaveClick:function(){this.createOrUpdateLink()},handleAddLink:function(){this.formType="create",this.link={}},handleEditLink:function(t){var e=this;c.get(t).then(function(t){e.link=t.data.data,e.formType="update"})},handleDeleteLink:function(t){var e=this;c.delete(t).then(function(t){e.$message.success("删除成功!"),e.loadLinks()})},createOrUpdateLink:function(){var t=this;this.link.id?c.update(this.link.id,this.link).then(function(e){t.$message.success("更新成功!"),t.loadLinks()}):c.create(this.link).then(function(e){t.$message.success("保存成功!"),t.loadLinks()}),this.handleAddLink()}}},u=d,m=n("17cc"),k=Object(m["a"])(u,a,i,!1,null,"56d4c6ed",null);e["default"]=k.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21a35c"],{bb17:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12}},[n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[n("a-card",{attrs:{title:t.title}},[n("a-form",{attrs:{layout:"horizontal"}},[n("a-form-item",{attrs:{label:"网站名称:"}},[n("a-input",{model:{value:t.link.name,callback:function(e){t.$set(t.link,"name",e)},expression:"link.name"}})],1),n("a-form-item",{attrs:{label:"网站地址:",help:"* 需要加上 http://"}},[n("a-input",{model:{value:t.link.url,callback:function(e){t.$set(t.link,"url",e)},expression:"link.url"}})],1),n("a-form-item",{attrs:{label:"Logo:"}},[n("a-input",{model:{value:t.link.logo,callback:function(e){t.$set(t.link,"logo",e)},expression:"link.logo"}})],1),n("a-form-item",{attrs:{label:"分组:",help:"* 非必填"}},[n("a-input",{model:{value:t.link.team,callback:function(e){t.$set(t.link,"team",e)},expression:"link.team"}})],1),n("a-form-item",{attrs:{label:"描述:"}},[n("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:t.link.description,callback:function(e){t.$set(t.link,"description",e)},expression:"link.description"}})],1),n("a-form-item",["create"===t.formType?n("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("保存")]):n("a-button-group",[n("a-button",{attrs:{type:"primary"},on:{click:t.handleSaveClick}},[t._v("更新")]),"update"===t.formType?n("a-button",{attrs:{type:"dashed"},on:{click:t.handleAddLink}},[t._v("返回添加")]):t._e()],1)],1)],1)],1)],1),n("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[n("a-card",{attrs:{title:"所有友情链接"}},[n("a-table",{attrs:{columns:t.columns,dataSource:t.links,loading:t.loading,rowKey:function(t){return t.id}},scopedSlots:t._u([{key:"url",fn:function(e){return[n("a",{attrs:{target:"_blank",href:e}},[t._v(t._s(e))])]}},{key:"name",fn:function(e){return n("ellipsis",{attrs:{length:15,tooltip:""}},[t._v(t._s(e))])}},{key:"action",fn:function(e,a){return n("span",{},[n("a",{attrs:{href:"javascript:;"},on:{click:function(e){return t.handleEditLink(a.id)}}},[t._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除【"+a.name+"】链接?",okText:"确定",cancelText:"取消"},on:{confirm:function(e){return t.handleDeleteLink(a.id)}}},[n("a",{attrs:{href:"javascript:;"}},[t._v("删除")])])],1)}}])})],1)],1)],1)],1)},i=[],l=(n("69a3"),n("9efd")),o="/api/admin/links",c={listAll:function(){return Object(l["a"])({url:"".concat(o),method:"get"})},create:function(t){return Object(l["a"])({url:o,data:t,method:"post"})},get:function(t){return Object(l["a"])({url:"".concat(o,"/").concat(t),method:"get"})},update:function(t,e){return Object(l["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(l["a"])({url:"".concat(o,"/").concat(t),method:"delete"})}},r=c,s=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"网址",dataIndex:"url",scopedSlots:{customRender:"url"}},{title:"分组",dataIndex:"team"},{title:"操作",key:"action",scopedSlots:{customRender:"action"}}],d={data:function(){return{formType:"create",data:[],loading:!1,columns:s,links:[],link:{}}},computed:{title:function(){return this.link.id?"修改友情链接":"添加友情链接"}},created:function(){this.loadLinks()},methods:{loadLinks:function(){var t=this;this.loading=!0,r.listAll().then(function(e){t.links=e.data.data,t.loading=!1})},handleSaveClick:function(){this.createOrUpdateLink()},handleAddLink:function(){this.formType="create",this.link={}},handleEditLink:function(t){var e=this;r.get(t).then(function(t){e.link=t.data.data,e.formType="update"})},handleDeleteLink:function(t){var e=this;r.delete(t).then(function(t){e.$message.success("删除成功!"),e.loadLinks()})},createOrUpdateLink:function(){var t=this;this.link.id?r.update(this.link.id,this.link).then(function(e){t.$message.success("更新成功!"),t.loadLinks()}):r.create(this.link).then(function(e){t.$message.success("保存成功!"),t.loadLinks()}),this.handleAddLink()}}},u=d,m=n("17cc"),k=Object(m["a"])(u,a,i,!1,null,"243cf1cf",null);e["default"]=k.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d228d13"],{db98:function(a,t,o){"use strict";o.r(t);var e=function(){var a=this,t=a.$createElement,o=a._self._c||t;return o("div",{staticClass:"page-header-index-wide"},[o("div",{staticClass:"card-content"},[o("a-row",{attrs:{gutter:12}},[o("a-col",{attrs:{xl:6,lg:6,md:12,sm:24,xs:24}},[o("a-card",{attrs:{title:"Markdown 文章导入",bordered:!1,bodyStyle:{padding:"16px"}}},[o("p",[a._v("支持 Hexo/Jekyll 文章导入并解析元数据")]),o("a-button",{staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:a.handleImportMarkdown}},[a._v("导入")])],1)],1)],1),o("a-modal",{attrs:{title:"Markdown 文章导入",footer:null},model:{value:a.markdownUpload,callback:function(t){a.markdownUpload=t},expression:"markdownUpload"}},[o("upload",{attrs:{name:"files",multiple:"",accept:"text/markdown",uploadHandler:a.uploadHandler},on:{change:a.handleChange}},[o("p",{staticClass:"ant-upload-drag-icon"},[o("a-icon",{attrs:{type:"inbox"}})],1),o("p",{staticClass:"ant-upload-text"},[a._v("拖拽或点击选择 Markdown 文件到此处")]),o("p",{staticClass:"ant-upload-hint"},[a._v("支持多个文件同时上传")])])],1)],1)])},n=[],d=(o("3a23"),o("9efd")),r="/api/admin/backups",l={importMarkdown:function(a,t,o){return Object(d["a"])({url:"".concat(r,"/import/markdowns"),timeout:864e4,data:a,onUploadProgress:t,cancelToken:o,method:"post"})}},s=l,i={data:function(){return{markdownUpload:!1,uploadHandler:s.importMarkdown}},methods:{handleImportMarkdown:function(){this.markdownUpload=!0},handleChange:function(a){var t=a.file.status;"uploading"!==t&&console.log(a.file,a.fileList),"done"===t?this.$message.success("".concat(a.file.name," 导入成功!")):"error"===t&&this.$message.error("".concat(a.file.name," 导入失败!"))}}},c=i,p=o("17cc"),u=Object(p["a"])(c,e,n,!1,null,"8dab78e6",null);t["default"]=u.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d228d13"],{db98:function(a,t,o){"use strict";o.r(t);var e=function(){var a=this,t=a.$createElement,o=a._self._c||t;return o("div",{staticClass:"page-header-index-wide"},[o("div",{staticClass:"card-content"},[o("a-row",{attrs:{gutter:12}},[o("a-col",{attrs:{xl:6,lg:6,md:12,sm:24,xs:24}},[o("a-card",{attrs:{title:"Markdown 文章导入",bordered:!1,bodyStyle:{padding:"16px"}}},[o("p",[a._v("支持 Hexo/Jekyll 文章导入并解析元数据")]),o("a-button",{staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:a.handleImportMarkdown}},[a._v("导入")])],1)],1)],1),o("a-modal",{attrs:{title:"Markdown 文章导入",footer:null},model:{value:a.markdownUpload,callback:function(t){a.markdownUpload=t},expression:"markdownUpload"}},[o("upload",{attrs:{name:"files",multiple:"",accept:"text/markdown",uploadHandler:a.uploadHandler},on:{change:a.handleChange}},[o("p",{staticClass:"ant-upload-drag-icon"},[o("a-icon",{attrs:{type:"inbox"}})],1),o("p",{staticClass:"ant-upload-text"},[a._v("拖拽或点击选择 Markdown 文件到此处")]),o("p",{staticClass:"ant-upload-hint"},[a._v("支持多个文件同时上传")])])],1)],1)])},n=[],d=(o("7364"),o("9efd")),r="/api/admin/backups",l={importMarkdown:function(a,t,o){return Object(d["a"])({url:"".concat(r,"/import/markdowns"),timeout:864e4,data:a,onUploadProgress:t,cancelToken:o,method:"post"})}},s=l,i={data:function(){return{markdownUpload:!1,uploadHandler:s.importMarkdown}},methods:{handleImportMarkdown:function(){this.markdownUpload=!0},handleChange:function(a){var t=a.file.status;"uploading"!==t&&console.log(a.file,a.fileList),"done"===t?this.$message.success("".concat(a.file.name," 导入成功!")):"error"===t&&this.$message.error("".concat(a.file.name," 导入失败!"))}}},c=i,p=o("17cc"),u=Object(p["a"])(c,e,n,!1,null,"5fc42ae9",null);t["default"]=u.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-35e63e70"],{"72a5b":function(t,e,a){"use strict";var r=a("7c17"),o=a.n(r);o.a},"7c17":function(t,e,a){},c405:function(t,e,a){"use strict";a("3a23"),a("612f");var r=a("9efd"),o="/api/admin/categories",s={};function n(t,e){e.forEach(function(e){t.key===e.parentId&&(t.children||(t.children=[]),t.children.push({key:e.id,title:e.name,isLeaf:!1}))}),t.children?t.children.forEach(function(t){return n(t,e)}):t.isLeaf=!0}s.listAll=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r["a"])({url:"".concat(o),params:{more:t},method:"get"})},s.listTree=function(){return Object(r["a"])({url:"".concat(o,"/tree_view"),method:"get"})},s.create=function(t){return Object(r["a"])({url:o,data:t,method:"post"})},s.delete=function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},s.get=function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"get"})},s.update=function(t,e){return Object(r["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},s.concreteTree=function(t){var e={key:0,title:"top",children:[]};return n(e,t),e.children},e["a"]=s},caf6:function(t,e,a){"use strict";var r=a("9efd"),o="/api/admin/posts",s={listLatest:function(t){return Object(r["a"])({url:"".concat(o,"/latest"),params:{top:t},method:"get"})},query:function(t){return Object(r["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"get"})},create:function(t,e){return Object(r["a"])({url:o,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(r["a"])({url:"".concat(o,"/").concat(t,"/status/").concat(e),method:"put"})},delete:function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},postStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=s},d28db:function(t,e,a){"use strict";var r=a("9efd"),o="/api/admin/tags",s={listAll:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r["a"])({url:o,params:{more:t},method:"get"})},createWithName:function(t){return Object(r["a"])({url:o,data:{name:t},method:"post"})},create:function(t){return Object(r["a"])({url:o,data:t,method:"post"})},update:function(t,e){return Object(r["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(r["a"])({url:"".concat(o,"/").concat(t),method:"delete"})}};e["a"]=s},db44:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=this,a=e.$createElement,r=e._self._c||a;return r("div",{staticClass:"page-header-index-wide"},[r("a-row",{attrs:{gutter:12}},[r("a-col",{attrs:{span:24}},[r("div",{staticStyle:{"margin-bottom":"16px"}},[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入文章标题"}]}],expression:"['title', { rules: [{ required: true, message: '请输入文章标题' }] }]"}],attrs:{size:"large",placeholder:"请输入文章标题"},model:{value:e.postToStage.title,callback:function(t){e.$set(e.postToStage,"title",t)},expression:"postToStage.title"}})],1),r("div",{attrs:{id:"editor"}},[r("mavon-editor",{attrs:{boxShadow:!1,toolbars:e.toolbars,ishljs:!0,autofocus:!1},model:{value:e.postToStage.originalContent,callback:function(t){e.$set(e.postToStage,"originalContent",t)},expression:"postToStage.originalContent"}})],1)])],1),r("a-drawer",{attrs:{title:"文章设置",width:e.isMobile()?"100%":"460",placement:"right",closable:"",visible:e.postSettingVisible},on:{close:function(){return t.postSettingVisible=!1}}},[r("div",{staticClass:"post-setting-drawer-content"},[r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("基本设置")]),r("div",{staticClass:"post-setting-drawer-item"},[r("a-form",{attrs:{layout:"vertical"}},[r("a-form-item",{attrs:{label:"文章路径:",help:e.options.blog_url+"/archives/"+(e.postToStage.url?e.postToStage.url:"{auto_generate}")}},[r("a-input",{model:{value:e.postToStage.url,callback:function(t){e.$set(e.postToStage,"url",t)},expression:"postToStage.url"}})],1),r("a-form-item",{attrs:{label:"开启评论:"}},[r("a-radio-group",{attrs:{defaultValue:!1},model:{value:e.postToStage.disallowComment,callback:function(t){e.$set(e.postToStage,"disallowComment",t)},expression:"postToStage.disallowComment"}},[r("a-radio",{attrs:{value:!1}},[e._v("开启")]),r("a-radio",{attrs:{value:!0}},[e._v("关闭")])],1)],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("分类目录")]),r("div",{staticClass:"post-setting-drawer-item"},[r("category-tree",{attrs:{categories:e.categories},model:{value:e.selectedCategoryIds,callback:function(t){e.selectedCategoryIds=t},expression:"selectedCategoryIds"}}),r("div",[r("a-form",{attrs:{layout:"vertical"}},[e.categoryForm?r("a-form-item",[r("category-select-tree",{attrs:{categories:e.categories},model:{value:e.categoryToCreate.parentId,callback:function(t){e.$set(e.categoryToCreate,"parentId",t)},expression:"categoryToCreate.parentId"}})],1):e._e(),e.categoryForm?r("a-form-item",[r("a-input",{attrs:{placeholder:"分类名称"},model:{value:e.categoryToCreate.name,callback:function(t){e.$set(e.categoryToCreate,"name",t)},expression:"categoryToCreate.name"}})],1):e._e(),e.categoryForm?r("a-form-item",[r("a-input",{attrs:{placeholder:"分类路径"},model:{value:e.categoryToCreate.slugNames,callback:function(t){e.$set(e.categoryToCreate,"slugNames",t)},expression:"categoryToCreate.slugNames"}})],1):e._e(),r("a-form-item",[e.categoryForm?r("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"primary"},on:{click:e.handlerCreateCategory}},[e._v("保存")]):e._e(),e.categoryForm?e._e():r("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"},on:{click:e.toggleCategoryForm}},[e._v("新增")]),e.categoryForm?r("a-button",{on:{click:e.toggleCategoryForm}},[e._v("取消")]):e._e()],1)],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("标签")]),r("div",{staticClass:"post-setting-drawer-item"},[r("a-form",{attrs:{layout:"vertical"}},[r("a-form-item",[r("TagSelect",{model:{value:e.selectedTagIds,callback:function(t){e.selectedTagIds=t},expression:"selectedTagIds"}})],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("摘要")]),r("div",{staticClass:"post-setting-drawer-item"},[r("a-form",{attrs:{layout:"vertical"}},[r("a-form-item",[r("a-input",{attrs:{type:"textarea",autosize:{minRows:5},placeholder:"不填写则会自动生成"},model:{value:e.postToStage.summary,callback:function(t){e.$set(e.postToStage,"summary",t)},expression:"postToStage.summary"}})],1)],1)],1)]),r("a-divider"),r("div",{style:{marginBottom:"16px"}},[r("h3",{staticClass:"post-setting-drawer-title"},[e._v("缩略图")]),r("div",{staticClass:"post-setting-drawer-item"},[r("div",{staticClass:"post-thum"},[r("img",{staticClass:"img",attrs:{src:e.postToStage.thumbnail||"//i.loli.net/2019/05/05/5ccf007c0a01d.png"},on:{click:function(){return t.thumDrawerVisible=!0}}}),r("a-button",{staticClass:"post-thum-remove",attrs:{type:"dashed"},on:{click:e.handlerRemoveThumb}},[e._v("移除")])],1)])]),r("a-divider",{staticClass:"divider-transparent"})],1),r("AttachmentSelectDrawer",{attrs:{drawerWidth:460},on:{listenToSelect:e.handleSelectPostThumb},model:{value:e.thumDrawerVisible,callback:function(t){e.thumDrawerVisible=t},expression:"thumDrawerVisible"}}),r("div",{staticClass:"bottom-control"},[r("a-button",{staticStyle:{marginRight:"8px"},on:{click:e.handleDraftClick}},[e._v("保存草稿")]),r("a-button",{attrs:{type:"primary"},on:{click:e.handlePublishClick}},[e._v("发布")])],1)],1),r("AttachmentDrawer",{model:{value:e.attachmentDrawerVisible,callback:function(t){e.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}}),r("footer-tool-bar",{style:{width:e.isSideMenu()&&e.isDesktop()?"calc(100% - "+(e.sidebarOpened?256:80)+"px)":"100%"}},[r("a-button",{attrs:{type:"primary"},on:{click:function(){return t.postSettingVisible=!0}}},[e._v("发布")]),r("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"dashed"},on:{click:function(){return t.attachmentDrawerVisible=!0}}},[e._v("附件库")])],1)],1)},o=[],s=(a("612f"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tree",{attrs:{checkable:"",treeData:t.categoryTree,defaultExpandAll:!0,checkedKeys:t.categoryIds},on:{check:t.onCheck}},[a("span",{staticStyle:{color:"#1890ff"},attrs:{slot:"title0010"},slot:"title0010"},[t._v("sss")])])}),n=[],i=a("c405"),c={name:"CategoryTree",model:{prop:"categoryIds",event:"check"},props:{categoryIds:{type:Array,required:!1,default:function(){return[]}},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTree:function(){return i["a"].concreteTree(this.categories)}},methods:{onCheck:function(t,e){this.$log.debug("Chekced keys",t),this.$log.debug("e",e);var a=e.checkedNodes.filter(function(t){return t.data.props.isLeaf}).map(function(t){return t.key});this.$log.debug("Effectively selected category ids",a),this.$emit("check",a)}}},l=c,u=a("17cc"),d=Object(u["a"])(l,s,n,!1,null,null,null),g=d.exports,m=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-select",{staticStyle:{width:"100%"},attrs:{allowClear:"",mode:"tags",placeholder:"选择或输入标签"},on:{blur:t.handleBlur},model:{value:t.selectedTagNames,callback:function(e){t.selectedTagNames=e},expression:"selectedTagNames"}},t._l(t.tags,function(e){return a("a-select-option",{key:e.id,attrs:{value:e.name}},[t._v(t._s(e.name))])}),1)],1)},p=[],h=(a("3a23"),a("d28db")),f=a("7f43"),v=a.n(f),b={name:"TagSelect",model:{prop:"tagIds",event:"change"},props:{tagIds:{type:Array,required:!1,default:function(){return[]}}},data:function(){return{tags:[],selectedTagNames:[]}},created:function(){var t=this;this.loadTags(),this.selectedTagNames=this.tagIds.map(function(e){return t.tagIdMap[e].name})},computed:{tagIdMap:function(){var t={};return this.tags.forEach(function(e){t[e.id]=e}),t},tagNameMap:function(){var t={};return this.tags.forEach(function(e){t[e.name]=e}),t}},methods:{loadTags:function(t){var e=this;h["a"].listAll(!0).then(function(a){e.tags=a.data.data,t&&t()})},handleBlur:function(){var t=this;this.$log.debug("Blured");var e=this.selectedTagNames.filter(function(e){return!t.tagNameMap[e]});if(this.$log.debug("Tag names to create",e),e!==[]){var a=e.map(function(t){return h["a"].createWithName(t)});v.a.all(a).then(v.a.spread(function(){t.loadTags(function(){t.$log.debug("Tag name map",t.tagNameMap);var e=t.selectedTagNames.map(function(e){return t.tagNameMap[e].id});t.$emit("change",e)})}))}else{var r=this.selectedTagNames.map(function(e){return t.tagNameMap[e].id});this.$emit("change",r)}}}},y=b,T=Object(u["a"])(y,m,p,!1,null,null,null),S=T.exports,C=a("6657"),w=a("ed4e"),k=a("3993"),I=a("fa25"),x=a("5a70"),_=a("ac0d"),$=a("2749"),D=(a("cc71"),a("caf6")),O=a("482b"),j={components:{TagSelect:S,mavonEditor:C["mavonEditor"],CategoryTree:g,FooterToolBar:x["a"],AttachmentDrawer:w["a"],AttachmentSelectDrawer:k["a"],CategorySelectTree:I["a"]},mixins:[_["a"],_["b"]],data:function(){return{toolbars:$["a"],wrapperCol:{xl:{span:24},sm:{span:24},xs:{span:24}},attachmentDrawerVisible:!1,postSettingVisible:!1,thumDrawerVisible:!1,categoryForm:!1,tags:[],categories:[],selectedCategoryIds:[],selectedTagIds:[],postToStage:{},categoryToCreate:{},timer:null,options:[],keys:["blog_url"]}},created:function(){this.loadTags(),this.loadCategories(),this.loadOptions(),clearInterval(this.timer),this.timer=null,this.autoSaveTimer()},destroyed:function(){clearInterval(this.timer),this.timer=null},beforeRouteLeave:function(t,e,a){null!==this.timer&&clearInterval(this.timer),this.autoSavePost(),a()},beforeRouteEnter:function(t,e,a){var r=t.query.postId;a(function(t){r&&D["a"].get(r).then(function(e){var a=e.data.data;t.postToStage=a,t.selectedTagIds=a.tagIds,t.selectedCategoryIds=a.categoryIds})})},methods:{loadTags:function(){var t=this;h["a"].listAll(!0).then(function(e){t.tags=e.data.data})},loadCategories:function(){var t=this;i["a"].listAll().then(function(e){t.categories=e.data.data})},loadOptions:function(){var t=this;O["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},createOrUpdatePost:function(t,e,a){var r=this;this.postToStage.categoryIds=this.selectedCategoryIds,this.postToStage.tagIds=this.selectedTagIds,this.postToStage.id?D["a"].update(this.postToStage.id,this.postToStage,a).then(function(t){r.$log.debug("Updated post",t.data.data),e&&e()}):D["a"].create(this.postToStage,a).then(function(e){r.$log.debug("Created post",e.data.data),t&&t(),r.postToStage=e.data.data})},savePost:function(){var t=this;this.createOrUpdatePost(function(){return t.$message.success("文章创建成功")},function(){return t.$message.success("文章更新成功")},!1)},autoSavePost:function(){null!=this.postToStage.title&&null!=this.postToStage.originalContent&&this.createOrUpdatePost(null,null,!0)},toggleCategoryForm:function(){this.categoryForm=!this.categoryForm},handlePublishClick:function(){this.postToStage.status="PUBLISHED",this.savePost()},handleDraftClick:function(){this.postToStage.status="DRAFT",this.savePost()},handlerRemoveThumb:function(){this.postToStage.thumbnail=null},handlerCreateCategory:function(){var t=this;i["a"].create(this.categoryToCreate).then(function(e){t.loadCategories(),t.categoryToCreate={}})},handleSelectPostThumb:function(t){this.postToStage.thumbnail=t.path,this.thumDrawerVisible=!1},autoSaveTimer:function(){var t=this;null==this.timer&&(this.timer=setInterval(function(){t.autoSavePost()},15e3))}}},N=j,A=(a("72a5b"),Object(u["a"])(N,r,o,!1,null,"348cd59e",null));e["default"]=A.exports},fa25:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-tree-select",{attrs:{treeData:t.categoryTreeData,placeholder:"请选择上级目录,默认为顶级目录",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:t.categoryIdString},on:{change:t.handleSelectionChange}})},o=[],s=(a("48fb"),a("3a23"),a("b06f"),{name:"CategorySelectTree",model:{prop:"categoryId",event:"change"},props:{categoryId:{type:Number,required:!0,default:0},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTreeData:function(){return this.categories.map(function(t){return{id:t.id,title:t.name,value:t.id.toString(),pId:t.parentId}})},categoryIdString:function(){return this.categoryId.toString()}},methods:{handleSelectionChange:function(t,e,a){this.$log.debug("value: ",t),this.$log.debug("label: ",e),this.$log.debug("extra: ",a),this.$emit("change",t?parseInt(t):0)}}}),n=s,i=a("17cc"),c=Object(i["a"])(n,r,o,!1,null,null,null);e["a"]=c.exports}}]);
\ No newline at end of file
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0337f7a6"],{"61dd":function(e,t,a){},"7e89":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page-header-index-wide"},[a("a-row",{attrs:{gutter:12}},[a("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[a("a-card",{attrs:{title:e.title}},[a("a-form",{attrs:{layout:"horizontal"}},[a("a-form-item",{attrs:{label:"名称:",help:"* 页面上所显示的名称"}},[a("a-input",{model:{value:e.categoryToCreate.name,callback:function(t){e.$set(e.categoryToCreate,"name",t)},expression:"categoryToCreate.name"}})],1),a("a-form-item",{attrs:{label:"别名:",help:"* 一般为单个分类页面的标识,最好为英文"}},[a("a-input",{model:{value:e.categoryToCreate.slugName,callback:function(t){e.$set(e.categoryToCreate,"slugName",t)},expression:"categoryToCreate.slugName"}})],1),a("a-form-item",{attrs:{label:"上级目录:"}},[a("category-select-tree",{attrs:{categories:e.categories},model:{value:e.categoryToCreate.parentId,callback:function(t){e.$set(e.categoryToCreate,"parentId",t)},expression:"categoryToCreate.parentId"}})],1),a("a-form-item",{attrs:{label:"描述:",help:"* 分类描述,部分主题可显示"}},[a("a-input",{attrs:{type:"textarea",autosize:{minRows:3}},model:{value:e.categoryToCreate.description,callback:function(t){e.$set(e.categoryToCreate,"description",t)},expression:"categoryToCreate.description"}})],1),a("a-form-item",["create"===e.formType?a("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("保存")]):a("a-button-group",[a("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("更新")]),"update"===e.formType?a("a-button",{attrs:{type:"dashed"},on:{click:e.handleAddCategory}},[e._v("返回添加")]):e._e()],1)],1)],1)],1)],1),a("a-col",{style:{"padding-bottom":"1rem"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[a("a-card",{attrs:{title:"分类列表"}},[a("a-table",{attrs:{columns:e.columns,dataSource:e.categories,rowKey:function(e){return e.id},loading:e.loading},scopedSlots:e._u([{key:"name",fn:function(t){return a("ellipsis",{attrs:{length:30,tooltip:""}},[e._v("\n "+e._s(t)+"\n ")])}},{key:"action",fn:function(t,r){return a("span",{},[a("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleEditCategory(r)}}},[e._v("编辑")]),a("a-divider",{attrs:{type:"vertical"}}),a("a-popconfirm",{attrs:{title:"你确定要删除【"+r.name+"】分类?",okText:"确定",cancelText:"取消"},on:{confirm:function(t){return e.handleDeleteCategory(r.id)}}},[a("a",{attrs:{href:"javascript:;"}},[e._v("删除")])])],1)}}])})],1)],1)],1)],1)},o=[],n=a("fa25"),c=a("c405"),i=[{title:"名称",dataIndex:"name"},{title:"别名",dataIndex:"slugName"},{title:"描述",dataIndex:"description"},{title:"文章数",dataIndex:"postCount"},{title:"操作",key:"action",scopedSlots:{customRender:"action"}}],l={components:{CategorySelectTree:n["a"]},data:function(){return{formType:"create",categories:[],categoryToCreate:{},loading:!1,columns:i}},computed:{title:function(){return this.categoryToCreate.id?"修改分类":"添加分类"}},created:function(){this.loadCategories()},methods:{loadCategories:function(){var e=this;this.loading=!0,c["a"].listAll(!0).then(function(t){e.categories=t.data.data,e.loading=!1})},handleSaveClick:function(){this.createOrUpdateCategory()},handleAddCategory:function(){this.formType="create",this.categoryToCreate={}},handleEditCategory:function(e){this.categoryToCreate=e,this.formType="update"},handleDeleteCategory:function(e){var t=this;c["a"].delete(e).then(function(e){t.$message.success("删除成功!"),t.loadCategories(),t.handleAddCategory()})},createOrUpdateCategory:function(){var e=this;this.categoryToCreate.id?c["a"].update(this.categoryToCreate.id,this.categoryToCreate).then(function(t){e.$message.success("更新成功!"),e.loadCategories(),e.categoryToCreate={}}):c["a"].create(this.categoryToCreate).then(function(t){e.$message.success("保存成功!"),e.loadCategories(),e.categoryToCreate={}}),this.handleAddCategory()}}},s=l,d=(a("9110"),a("17cc")),u=Object(d["a"])(s,r,o,!1,null,"0f333a36",null);t["default"]=u.exports},9110:function(e,t,a){"use strict";var r=a("61dd"),o=a.n(r);o.a},c405:function(e,t,a){"use strict";a("3a23"),a("612f");var r=a("9efd"),o="/api/admin/categories",n={};function c(e,t){t.forEach(function(t){e.key===t.parentId&&(e.children||(e.children=[]),e.children.push({key:t.id,title:t.name,isLeaf:!1}))}),e.children?e.children.forEach(function(e){return c(e,t)}):e.isLeaf=!0}n.listAll=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r["a"])({url:"".concat(o),params:{more:e},method:"get"})},n.listTree=function(){return Object(r["a"])({url:"".concat(o,"/tree_view"),method:"get"})},n.create=function(e){return Object(r["a"])({url:o,data:e,method:"post"})},n.delete=function(e){return Object(r["a"])({url:"".concat(o,"/").concat(e),method:"delete"})},n.get=function(e){return Object(r["a"])({url:"".concat(o,"/").concat(e),method:"get"})},n.update=function(e,t){return Object(r["a"])({url:"".concat(o,"/").concat(e),data:t,method:"put"})},n.concreteTree=function(e){var t={key:0,title:"top",children:[]};return c(t,e),t.children},t["a"]=n},fa25:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-tree-select",{attrs:{treeData:e.categoryTreeData,placeholder:"请选择上级目录,默认为顶级目录",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:e.categoryIdString},on:{change:e.handleSelectionChange}})},o=[],n=(a("48fb"),a("3a23"),a("b06f"),{name:"CategorySelectTree",model:{prop:"categoryId",event:"change"},props:{categoryId:{type:Number,required:!0,default:0},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTreeData:function(){return this.categories.map(function(e){return{id:e.id,title:e.name,value:e.id.toString(),pId:e.parentId}})},categoryIdString:function(){return this.categoryId.toString()}},methods:{handleSelectionChange:function(e,t,a){this.$log.debug("value: ",e),this.$log.debug("label: ",t),this.$log.debug("extra: ",a),this.$emit("change",e?parseInt(e):0)}}}),c=n,i=a("17cc"),l=Object(i["a"])(c,r,o,!1,null,null,null);t["a"]=l.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-436563a2"],{"711b":function(e,t,a){},"7e89":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page-header-index-wide"},[a("a-row",{attrs:{gutter:12}},[a("a-col",{style:{"padding-bottom":"12px"},attrs:{xl:10,lg:10,md:10,sm:24,xs:24}},[a("a-card",{attrs:{title:e.title}},[a("a-form",{attrs:{layout:"horizontal"}},[a("a-form-item",{attrs:{label:"名称:",help:"* 页面上所显示的名称"}},[a("a-input",{model:{value:e.categoryToCreate.name,callback:function(t){e.$set(e.categoryToCreate,"name",t)},expression:"categoryToCreate.name"}})],1),a("a-form-item",{attrs:{label:"别名:",help:"* 一般为单个分类页面的标识,最好为英文"}},[a("a-input",{model:{value:e.categoryToCreate.slugName,callback:function(t){e.$set(e.categoryToCreate,"slugName",t)},expression:"categoryToCreate.slugName"}})],1),a("a-form-item",{attrs:{label:"上级目录:"}},[a("category-select-tree",{attrs:{categories:e.categories},model:{value:e.categoryToCreate.parentId,callback:function(t){e.$set(e.categoryToCreate,"parentId",t)},expression:"categoryToCreate.parentId"}})],1),a("a-form-item",{attrs:{label:"描述:",help:"* 分类描述,部分主题可显示"}},[a("a-input",{attrs:{type:"textarea",autosize:{minRows:3}},model:{value:e.categoryToCreate.description,callback:function(t){e.$set(e.categoryToCreate,"description",t)},expression:"categoryToCreate.description"}})],1),a("a-form-item",["create"===e.formType?a("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("保存")]):a("a-button-group",[a("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveClick}},[e._v("更新")]),"update"===e.formType?a("a-button",{attrs:{type:"dashed"},on:{click:e.handleAddCategory}},[e._v("返回添加")]):e._e()],1)],1)],1)],1)],1),a("a-col",{style:{"padding-bottom":"1rem"},attrs:{xl:14,lg:14,md:14,sm:24,xs:24}},[a("a-card",{attrs:{title:"分类列表"}},[a("a-table",{attrs:{columns:e.columns,dataSource:e.categories,rowKey:function(e){return e.id},loading:e.loading},scopedSlots:e._u([{key:"name",fn:function(t){return a("ellipsis",{attrs:{length:30,tooltip:""}},[e._v("\n "+e._s(t)+"\n ")])}},{key:"action",fn:function(t,r){return a("span",{},[a("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleEditCategory(r)}}},[e._v("编辑")]),a("a-divider",{attrs:{type:"vertical"}}),a("a-popconfirm",{attrs:{title:"你确定要删除【"+r.name+"】分类?",okText:"确定",cancelText:"取消"},on:{confirm:function(t){return e.handleDeleteCategory(r.id)}}},[a("a",{attrs:{href:"javascript:;"}},[e._v("删除")])])],1)}}])})],1)],1)],1)],1)},o=[],n=a("fa25"),c=a("c405"),i=[{title:"名称",dataIndex:"name"},{title:"别名",dataIndex:"slugName"},{title:"描述",dataIndex:"description"},{title:"文章数",dataIndex:"postCount"},{title:"操作",key:"action",scopedSlots:{customRender:"action"}}],l={components:{CategorySelectTree:n["a"]},data:function(){return{formType:"create",categories:[],categoryToCreate:{},loading:!1,columns:i}},computed:{title:function(){return this.categoryToCreate.id?"修改分类":"添加分类"}},created:function(){this.loadCategories()},methods:{loadCategories:function(){var e=this;this.loading=!0,c["a"].listAll(!0).then(function(t){e.categories=t.data.data,e.loading=!1})},handleSaveClick:function(){this.createOrUpdateCategory()},handleAddCategory:function(){this.formType="create",this.categoryToCreate={}},handleEditCategory:function(e){this.categoryToCreate=e,this.formType="update"},handleDeleteCategory:function(e){var t=this;c["a"].delete(e).then(function(e){t.$message.success("删除成功!"),t.loadCategories(),t.handleAddCategory()})},createOrUpdateCategory:function(){var e=this;this.categoryToCreate.id?c["a"].update(this.categoryToCreate.id,this.categoryToCreate).then(function(t){e.$message.success("更新成功!"),e.loadCategories(),e.categoryToCreate={}}):c["a"].create(this.categoryToCreate).then(function(t){e.$message.success("保存成功!"),e.loadCategories(),e.categoryToCreate={}}),this.handleAddCategory()}}},s=l,d=(a("db66"),a("17cc")),u=Object(d["a"])(s,r,o,!1,null,"77634e76",null);t["default"]=u.exports},c405:function(e,t,a){"use strict";a("7364"),a("f763");var r=a("9efd"),o="/api/admin/categories",n={};function c(e,t){t.forEach(function(t){e.key===t.parentId&&(e.children||(e.children=[]),e.children.push({key:t.id,title:t.name,isLeaf:!1}))}),e.children?e.children.forEach(function(e){return c(e,t)}):e.isLeaf=!0}n.listAll=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(r["a"])({url:"".concat(o),params:{more:e},method:"get"})},n.listTree=function(){return Object(r["a"])({url:"".concat(o,"/tree_view"),method:"get"})},n.create=function(e){return Object(r["a"])({url:o,data:e,method:"post"})},n.delete=function(e){return Object(r["a"])({url:"".concat(o,"/").concat(e),method:"delete"})},n.get=function(e){return Object(r["a"])({url:"".concat(o,"/").concat(e),method:"get"})},n.update=function(e,t){return Object(r["a"])({url:"".concat(o,"/").concat(e),data:t,method:"put"})},n.concreteTree=function(e){var t={key:0,title:"top",children:[]};return c(t,e),t.children},t["a"]=n},db66:function(e,t,a){"use strict";var r=a("711b"),o=a.n(r);o.a},fa25:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-tree-select",{attrs:{treeData:e.categoryTreeData,placeholder:"请选择上级目录,默认为顶级目录",treeDefaultExpandAll:"",treeDataSimpleMode:!0,allowClear:!0,value:e.categoryIdString},on:{change:e.handleSelectionChange}})},o=[],n=(a("0857"),a("7364"),a("d4d5"),{name:"CategorySelectTree",model:{prop:"categoryId",event:"change"},props:{categoryId:{type:Number,required:!0,default:0},categories:{type:Array,required:!1,default:function(){return[]}}},computed:{categoryTreeData:function(){return this.categories.map(function(e){return{id:e.id,title:e.name,value:e.id.toString(),pId:e.parentId}})},categoryIdString:function(){return this.categoryId.toString()}},methods:{handleSelectionChange:function(e,t,a){this.$log.debug("value: ",e),this.$log.debug("label: ",t),this.$log.debug("extra: ",a),this.$emit("change",e?parseInt(e):0)}}}),c=n,i=a("17cc"),l=Object(i["a"])(c,r,o,!1,null,null,null);t["a"]=l.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-31c8ea42"],{"12de":function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/themes",s={listAll:function(){return Object(n["a"])({url:"".concat(o),method:"get"})},listFiles:function(){return Object(n["a"])({url:"".concat(o,"/files"),method:"get"})},customTpls:function(){return Object(n["a"])({url:"".concat(o,"/files/custom"),method:"get"})},active:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/activation"),method:"post"})},getActivatedTheme:function(){return Object(n["a"])({url:"".concat(o,"/activation"),method:"get"})},update:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),timeout:6e4,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},fetchConfiguration:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/configurations"),method:"get"})},fetchSettings:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/settings"),method:"get"})},saveSettings:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/settings"),data:e,method:"post"})},getProperty:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"get"})},upload:function(t,e,a){return Object(n["a"])({url:"".concat(o,"/upload"),timeout:864e5,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},fetching:function(t){return Object(n["a"])({url:"".concat(o,"/fetching"),timeout:6e4,params:{uri:t},method:"post"})},getContent:function(t){return Object(n["a"])({url:"".concat(o,"/files/content"),params:{path:t},method:"get"})},saveContent:function(t,e){return Object(n["a"])({url:"".concat(o,"/files/content"),params:{path:t},data:e,method:"put"})},reload:function(){return Object(n["a"])({url:"".concat(o,"/reload"),method:"post"})},exists:function(t){return Object(n["a"])({url:"".concat(o,"/activation/template/exists"),method:"get",params:{template:t}})}};e["a"]=s},"3b04":function(t,e,a){},e3ee:function(t,e,a){"use strict";var n=a("3b04"),o=a.n(n);o.a},ed66:function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/sheets",s={list:function(){return Object(n["a"])({url:o,method:"get"})},listInternal:function(){return Object(n["a"])({url:"".concat(o,"/internal"),method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"get"})},create:function(t,e){return Object(n["a"])({url:o,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/").concat(e),method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},sheetStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=s},f585:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12}},[n("a-col",{attrs:{span:24}},[n("div",{staticStyle:{"margin-bottom":"16px"}},[n("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入页面标题"}]}],expression:"['title', { rules: [{ required: true, message: '请输入页面标题' }] }]"}],attrs:{size:"large",placeholder:"请输入页面标题"},model:{value:e.sheetToStage.title,callback:function(t){e.$set(e.sheetToStage,"title",t)},expression:"sheetToStage.title"}})],1),n("div",{attrs:{id:"editor"}},[n("mavon-editor",{attrs:{boxShadow:!1,toolbars:e.toolbars,ishljs:!0,autofocus:!1},model:{value:e.sheetToStage.originalContent,callback:function(t){e.$set(e.sheetToStage,"originalContent",t)},expression:"sheetToStage.originalContent"}})],1)]),n("a-col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[n("a-drawer",{attrs:{title:"页面设置",width:e.isMobile()?"100%":"460",closable:!0,visible:e.sheetSettingVisible},on:{close:function(){return t.sheetSettingVisible=!1}}},[n("div",{staticClass:"post-setting-drawer-content"},[n("div",{style:{marginBottom:"16px"}},[n("h3",{staticClass:"post-setting-drawer-title"},[e._v("基本设置")]),n("div",{staticClass:"post-setting-drawer-item"},[n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",{attrs:{label:"页面路径:",help:e.options.blog_url+"/s/"+(e.sheetToStage.url?e.sheetToStage.url:"{auto_generate}")}},[n("a-input",{model:{value:e.sheetToStage.url,callback:function(t){e.$set(e.sheetToStage,"url",t)},expression:"sheetToStage.url"}})],1),n("a-form-item",{attrs:{label:"开启评论:"}},[n("a-radio-group",{attrs:{defaultValue:!1},model:{value:e.sheetToStage.disallowComment,callback:function(t){e.$set(e.sheetToStage,"disallowComment",t)},expression:"sheetToStage.disallowComment"}},[n("a-radio",{attrs:{value:!1}},[e._v("开启")]),n("a-radio",{attrs:{value:!0}},[e._v("关闭")])],1)],1),n("a-form-item",{attrs:{label:"自定义模板:"}},[n("a-select",{model:{value:e.sheetToStage.template,callback:function(t){e.$set(e.sheetToStage,"template",t)},expression:"sheetToStage.template"}},[n("a-select-option",{key:"",attrs:{value:""}},[e._v("")]),e._l(e.customTpls,function(t){return n("a-select-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})],2)],1)],1)],1)]),n("a-divider"),n("div",{style:{marginBottom:"16px"}},[n("h3",{staticClass:"post-setting-drawer-title"},[e._v("缩略图")]),n("div",{staticClass:"post-setting-drawer-item"},[n("div",{staticClass:"sheet-thum"},[n("img",{staticClass:"img",attrs:{src:e.sheetToStage.thumbnail||"//i.loli.net/2019/05/05/5ccf007c0a01d.png"},on:{click:function(){return t.thumDrawerVisible=!0}}}),n("a-button",{staticClass:"sheet-thum-remove",attrs:{type:"dashed"},on:{click:e.handlerRemoveThumb}},[e._v("移除")])],1)])]),n("a-divider",{staticClass:"divider-transparent"})],1),n("AttachmentSelectDrawer",{attrs:{drawerWidth:460},on:{listenToSelect:e.handleSelectSheetThumb},model:{value:e.thumDrawerVisible,callback:function(t){e.thumDrawerVisible=t},expression:"thumDrawerVisible"}}),n("div",{staticClass:"bottom-control"},[n("a-button",{staticStyle:{marginRight:"8px"},on:{click:e.handleDraftClick}},[e._v("保存草稿")]),n("a-button",{attrs:{type:"primary"},on:{click:e.handlePublishClick}},[e._v("发布")])],1)],1)],1)],1),n("AttachmentDrawer",{model:{value:e.attachmentDrawerVisible,callback:function(t){e.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}}),n("footer-tool-bar",{style:{width:e.isSideMenu()&&e.isDesktop()?"calc(100% - "+(e.sidebarOpened?256:80)+"px)":"100%"}},[n("a-button",{attrs:{type:"primary"},on:{click:function(){return t.sheetSettingVisible=!0}}},[e._v("发布")]),n("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"dashed"},on:{click:function(){return t.attachmentDrawerVisible=!0}}},[e._v("附件库")])],1)],1)},o=[],s=(a("612f"),a("6657")),i=a("ed4e"),r=a("3993"),c=a("5a70"),l=a("ac0d"),u=a("2749"),h=(a("cc71"),a("ed66")),d=a("12de"),m=a("482b"),p={components:{mavonEditor:s["mavonEditor"],FooterToolBar:c["a"],AttachmentDrawer:i["a"],AttachmentSelectDrawer:r["a"]},mixins:[l["a"],l["b"]],data:function(){return{toolbars:u["a"],wrapperCol:{xl:{span:24},sm:{span:24},xs:{span:24}},attachmentDrawerVisible:!1,thumDrawerVisible:!1,sheetSettingVisible:!1,customTpls:[],sheetToStage:{},timer:null,options:[],keys:["blog_url"]}},created:function(){this.loadCustomTpls(),this.loadOptions(),clearInterval(this.timer),this.timer=null,this.autoSaveTimer()},destroyed:function(){clearInterval(this.timer),this.timer=null},beforeRouteLeave:function(t,e,a){null!==this.timer&&clearInterval(this.timer),this.autoSaveSheet(),a()},beforeRouteEnter:function(t,e,a){var n=t.query.sheetId;a(function(t){n&&h["a"].get(n).then(function(e){var a=e.data.data;t.sheetToStage=a})})},methods:{loadCustomTpls:function(){var t=this;d["a"].customTpls().then(function(e){t.customTpls=e.data.data})},loadOptions:function(){var t=this;m["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handlePublishClick:function(){this.sheetToStage.status="PUBLISHED",this.saveSheet()},handleDraftClick:function(){this.sheetToStage.status="DRAFT",this.saveSheet()},handlerRemoveThumb:function(){this.sheetToStage.thumbnail=null},createOrUpdateSheet:function(t,e,a){var n=this;this.sheetToStage.id?h["a"].update(this.sheetToStage.id,this.sheetToStage,a).then(function(t){n.$log.debug("Updated sheet",t.data.data),e&&e()}):h["a"].create(this.sheetToStage,a).then(function(e){n.$log.debug("Created sheet",e.data.data),t&&t(),n.sheetToStage=e.data.data})},saveSheet:function(){var t=this;this.createOrUpdateSheet(function(){return t.$message.success("页面创建成功!")},function(){return t.$message.success("页面更新成功!")},!1)},autoSaveSheet:function(){null!=this.sheetToStage.title&&null!=this.sheetToStage.originalContent&&this.createOrUpdateSheet(null,null,!0)},handleSelectSheetThumb:function(t){this.sheetToStage.thumbnail=t.path,this.thumDrawerVisible=!1},autoSaveTimer:function(){var t=this;null==this.timer&&(this.timer=setInterval(function(){t.autoSaveSheet()},15e3))}}},g=p,f=(a("e3ee"),a("17cc")),b=Object(f["a"])(g,n,o,!1,null,"6778754a",null);e["default"]=b.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46d7532c"],{"12de":function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/themes",s={listAll:function(){return Object(n["a"])({url:"".concat(o),method:"get"})},listFiles:function(){return Object(n["a"])({url:"".concat(o,"/files"),method:"get"})},customTpls:function(){return Object(n["a"])({url:"".concat(o,"/files/custom"),method:"get"})},active:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/activation"),method:"post"})},getActivatedTheme:function(){return Object(n["a"])({url:"".concat(o,"/activation"),method:"get"})},update:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),timeout:6e4,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},fetchConfiguration:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/configurations"),method:"get"})},fetchSettings:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/settings"),method:"get"})},saveSettings:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/settings"),data:e,method:"post"})},getProperty:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"get"})},upload:function(t,e,a){return Object(n["a"])({url:"".concat(o,"/upload"),timeout:864e5,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},fetching:function(t){return Object(n["a"])({url:"".concat(o,"/fetching"),timeout:6e4,params:{uri:t},method:"post"})},getContent:function(t){return Object(n["a"])({url:"".concat(o,"/files/content"),params:{path:t},method:"get"})},saveContent:function(t,e){return Object(n["a"])({url:"".concat(o,"/files/content"),params:{path:t},data:e,method:"put"})},reload:function(){return Object(n["a"])({url:"".concat(o,"/reload"),method:"post"})},exists:function(t){return Object(n["a"])({url:"".concat(o,"/activation/template/exists"),method:"get",params:{template:t}})}};e["a"]=s},"1e78":function(t,e,a){"use strict";var n=a("d71e"),o=a.n(n);o.a},d71e:function(t,e,a){},ed66:function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/sheets",s={list:function(){return Object(n["a"])({url:o,method:"get"})},listInternal:function(){return Object(n["a"])({url:"".concat(o,"/internal"),method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"get"})},create:function(t,e){return Object(n["a"])({url:o,method:"post",data:t,params:{autoSave:e}})},update:function(t,e,a){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"put",data:e,params:{autoSave:a}})},updateStatus:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/").concat(e),method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},sheetStatus:{PUBLISHED:{color:"green",status:"success",text:"已发布"},DRAFT:{color:"yellow",status:"warning",text:"草稿"},RECYCLE:{color:"red",status:"error",text:"回收站"}}};e["a"]=s},f585:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12}},[n("a-col",{attrs:{span:24}},[n("div",{staticStyle:{"margin-bottom":"16px"}},[n("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["title",{rules:[{required:!0,message:"请输入页面标题"}]}],expression:"['title', { rules: [{ required: true, message: '请输入页面标题' }] }]"}],attrs:{size:"large",placeholder:"请输入页面标题"},model:{value:e.sheetToStage.title,callback:function(t){e.$set(e.sheetToStage,"title",t)},expression:"sheetToStage.title"}})],1),n("div",{attrs:{id:"editor"}},[n("mavon-editor",{attrs:{boxShadow:!1,toolbars:e.toolbars,ishljs:!0,autofocus:!1},model:{value:e.sheetToStage.originalContent,callback:function(t){e.$set(e.sheetToStage,"originalContent",t)},expression:"sheetToStage.originalContent"}})],1)]),n("a-col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[n("a-drawer",{attrs:{title:"页面设置",width:e.isMobile()?"100%":"460",closable:!0,visible:e.sheetSettingVisible},on:{close:function(){return t.sheetSettingVisible=!1}}},[n("div",{staticClass:"post-setting-drawer-content"},[n("div",{style:{marginBottom:"16px"}},[n("h3",{staticClass:"post-setting-drawer-title"},[e._v("基本设置")]),n("div",{staticClass:"post-setting-drawer-item"},[n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",{attrs:{label:"页面路径:",help:e.options.blog_url+"/s/"+(e.sheetToStage.url?e.sheetToStage.url:"{auto_generate}")}},[n("a-input",{model:{value:e.sheetToStage.url,callback:function(t){e.$set(e.sheetToStage,"url",t)},expression:"sheetToStage.url"}})],1),n("a-form-item",{attrs:{label:"开启评论:"}},[n("a-radio-group",{attrs:{defaultValue:!1},model:{value:e.sheetToStage.disallowComment,callback:function(t){e.$set(e.sheetToStage,"disallowComment",t)},expression:"sheetToStage.disallowComment"}},[n("a-radio",{attrs:{value:!1}},[e._v("开启")]),n("a-radio",{attrs:{value:!0}},[e._v("关闭")])],1)],1),n("a-form-item",{attrs:{label:"自定义模板:"}},[n("a-select",{model:{value:e.sheetToStage.template,callback:function(t){e.$set(e.sheetToStage,"template",t)},expression:"sheetToStage.template"}},[n("a-select-option",{key:"",attrs:{value:""}},[e._v("")]),e._l(e.customTpls,function(t){return n("a-select-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})],2)],1)],1)],1)]),n("a-divider"),n("div",{style:{marginBottom:"16px"}},[n("h3",{staticClass:"post-setting-drawer-title"},[e._v("缩略图")]),n("div",{staticClass:"post-setting-drawer-item"},[n("div",{staticClass:"sheet-thum"},[n("img",{staticClass:"img",attrs:{src:e.sheetToStage.thumbnail||"//i.loli.net/2019/05/05/5ccf007c0a01d.png"},on:{click:function(){return t.thumDrawerVisible=!0}}}),n("a-button",{staticClass:"sheet-thum-remove",attrs:{type:"dashed"},on:{click:e.handlerRemoveThumb}},[e._v("移除")])],1)])]),n("a-divider",{staticClass:"divider-transparent"})],1),n("AttachmentSelectDrawer",{attrs:{drawerWidth:460},on:{listenToSelect:e.handleSelectSheetThumb},model:{value:e.thumDrawerVisible,callback:function(t){e.thumDrawerVisible=t},expression:"thumDrawerVisible"}}),n("div",{staticClass:"bottom-control"},[n("a-button",{staticStyle:{marginRight:"8px"},on:{click:e.handleDraftClick}},[e._v("保存草稿")]),n("a-button",{attrs:{type:"primary"},on:{click:e.handlePublishClick}},[e._v("发布")])],1)],1)],1)],1),n("AttachmentDrawer",{model:{value:e.attachmentDrawerVisible,callback:function(t){e.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}}),n("footer-tool-bar",{style:{width:e.isSideMenu()&&e.isDesktop()?"calc(100% - "+(e.sidebarOpened?256:80)+"px)":"100%"}},[n("a-button",{attrs:{type:"primary"},on:{click:function(){return t.sheetSettingVisible=!0}}},[e._v("发布")]),n("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"dashed"},on:{click:function(){return t.attachmentDrawerVisible=!0}}},[e._v("附件库")])],1)],1)},o=[],s=(a("f763"),a("6657")),i=a("ed4e"),r=a("3993"),c=a("5a70"),l=a("ac0d"),u=a("2749"),h=(a("cc71"),a("ed66")),d=a("12de"),m=a("482b"),p={components:{mavonEditor:s["mavonEditor"],FooterToolBar:c["a"],AttachmentDrawer:i["a"],AttachmentSelectDrawer:r["a"]},mixins:[l["a"],l["b"]],data:function(){return{toolbars:u["a"],wrapperCol:{xl:{span:24},sm:{span:24},xs:{span:24}},attachmentDrawerVisible:!1,thumDrawerVisible:!1,sheetSettingVisible:!1,customTpls:[],sheetToStage:{},timer:null,options:[],keys:["blog_url"]}},created:function(){this.loadCustomTpls(),this.loadOptions(),clearInterval(this.timer),this.timer=null,this.autoSaveTimer()},destroyed:function(){clearInterval(this.timer),this.timer=null},beforeRouteLeave:function(t,e,a){null!==this.timer&&clearInterval(this.timer),this.autoSaveSheet(),a()},beforeRouteEnter:function(t,e,a){var n=t.query.sheetId;a(function(t){n&&h["a"].get(n).then(function(e){var a=e.data.data;t.sheetToStage=a})})},methods:{loadCustomTpls:function(){var t=this;d["a"].customTpls().then(function(e){t.customTpls=e.data.data})},loadOptions:function(){var t=this;m["a"].listAll(this.keys).then(function(e){t.options=e.data.data})},handlePublishClick:function(){this.sheetToStage.status="PUBLISHED",this.saveSheet()},handleDraftClick:function(){this.sheetToStage.status="DRAFT",this.saveSheet()},handlerRemoveThumb:function(){this.sheetToStage.thumbnail=null},createOrUpdateSheet:function(t,e,a){var n=this;this.sheetToStage.id?h["a"].update(this.sheetToStage.id,this.sheetToStage,a).then(function(t){n.$log.debug("Updated sheet",t.data.data),e&&e()}):h["a"].create(this.sheetToStage,a).then(function(e){n.$log.debug("Created sheet",e.data.data),t&&t(),n.sheetToStage=e.data.data})},saveSheet:function(){var t=this;this.createOrUpdateSheet(function(){return t.$message.success("页面创建成功!")},function(){return t.$message.success("页面更新成功!")},!1)},autoSaveSheet:function(){null!=this.sheetToStage.title&&null!=this.sheetToStage.originalContent&&this.createOrUpdateSheet(null,null,!0)},handleSelectSheetThumb:function(t){this.sheetToStage.thumbnail=t.path,this.thumDrawerVisible=!1},autoSaveTimer:function(){var t=this;null==this.timer&&(this.timer=setInterval(function(){t.autoSaveSheet()},15e3))}}},g=p,f=(a("1e78"),a("17cc")),b=Object(f["a"])(g,n,o,!1,null,"5a42b07f",null);e["default"]=b.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4e835ab8"],{"034d":function(t,a,e){},"307b":function(t,a,e){"use strict";var s=e("6fda"),n=e.n(s);n.a},3993:function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("a-drawer",{attrs:{title:t.title,width:t.isMobile()?"100%":t.drawerWidth,closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),e("a-divider"),e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[e("a-col",{attrs:{span:24}},t._l(t.attachments,function(a,s){return e("div",{key:s,staticClass:"attach-item",on:{click:function(e){return t.handleSelectAttachment(a)}}},[e("img",{attrs:{src:a.thumbPath}})])}),0)],1)],1),e("a-divider"),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[e("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),e("a-modal",{attrs:{title:"上传附件",footer:null},model:{value:t.uploadVisible,callback:function(a){t.uploadVisible=a},expression:"uploadVisible"}},[e("upload",{attrs:{name:"file",multiple:"",accept:"image/*",uploadHandler:t.attachmentUploadHandler},on:{success:t.handleAttachmentUploadSuccess}},[e("p",{staticClass:"ant-upload-drag-icon"},[e("a-icon",{attrs:{type:"inbox"}})],1),e("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),e("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},n=[],o=(e("b06f"),e("ac0d")),i=e("a796"),r={name:"AttachmentSelectDrawer",mixins:[o["a"],o["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:i["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,a){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var t=this,a=Object.assign({},this.pagination);a.page--,i["a"].query(a).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total})},handleSelectAttachment:function(t){this.$emit("listenToSelect",t)},handlePaginationChange:function(t,a){this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},handleDelete:function(){this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},l=r,c=(e("307b"),e("17cc")),d=Object(c["a"])(l,s,n,!1,null,null,null);a["a"]=d.exports},"6fda":function(t,a,e){},"7c54":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=this,e=a.$createElement,s=a._self._c||e;return s("div",{staticClass:"page-header-index-wide page-header-wrapper-grid-content-main"},[s("a-row",{attrs:{gutter:12}},[s("a-col",{style:{"padding-bottom":"12px"},attrs:{lg:10,md:24}},[s("a-card",{attrs:{bordered:!1}},[s("div",{staticClass:"profile-center-avatarHolder"},[s("a-tooltip",{attrs:{placement:"right",trigger:["hover"],title:"点击可修改头像"}},[s("template",{slot:"title"},[s("span",[a._v("prompt text")])]),s("div",{staticClass:"avatar"},[s("img",{attrs:{src:a.user.avatar||"https://gravatar.loli.net/avatar/?s=256&d=mm"},on:{click:function(){return t.attachmentDrawerVisible=!0}}})])],2),s("div",{staticClass:"username"},[a._v(a._s(a.user.nickname))]),s("div",{staticClass:"bio"},[a._v(a._s(a.user.description))])],1),s("div",{staticClass:"profile-center-detail"},[s("p",[s("a-icon",{attrs:{type:"global"}}),s("a",{attrs:{href:a.options.blog_url,target:"method"}},[a._v(a._s(a.options.blog_url))])],1),s("p",[s("a-icon",{attrs:{type:"mail"}}),a._v(a._s(a.user.email)+"\n ")],1),s("p",[s("a-icon",{attrs:{type:"calendar"}}),a._v(a._s(a.counts.establishDays||0)+"\n ")],1)]),s("a-divider"),s("div",{staticClass:"general-profile"},[s("a-list",{attrs:{loading:a.countsLoading,itemLayout:"horizontal"}},[s("a-list-item",[a._v("累计发表了 "+a._s(a.counts.postCount||0)+" 篇文章。")]),s("a-list-item",[a._v("累计创建了 "+a._s(a.counts.linkCount||0)+" 个标签。")]),s("a-list-item",[a._v("累计获得了 "+a._s(a.counts.commentCount||0)+" 条评论。")]),s("a-list-item",[a._v("累计添加了 "+a._s(a.counts.linkCount||0)+" 个友链。")]),s("a-list-item",[a._v("文章总访问 "+a._s(a.counts.visitCount||0)+" 次。")]),s("a-list-item")],1)],1)],1)],1),s("a-col",{style:{"padding-bottom":"12px"},attrs:{lg:14,md:24}},[s("a-card",{attrs:{bodyStyle:{padding:"0"},bordered:!1,title:"个人资料"}},[s("div",{staticClass:"card-container"},[s("a-tabs",{attrs:{type:"card"}},[s("a-tab-pane",{key:"1"},[s("span",{attrs:{slot:"tab"},slot:"tab"},[s("a-icon",{attrs:{type:"idcard"}}),a._v("基本资料\n ")],1),s("a-form",{attrs:{layout:"vertical"}},[s("a-form-item",{attrs:{label:"用户名:"}},[s("a-input",{model:{value:a.user.username,callback:function(t){a.$set(a.user,"username",t)},expression:"user.username"}})],1),s("a-form-item",{attrs:{label:"昵称:"}},[s("a-input",{model:{value:a.user.nickname,callback:function(t){a.$set(a.user,"nickname",t)},expression:"user.nickname"}})],1),s("a-form-item",{attrs:{label:"邮箱:"}},[s("a-input",{model:{value:a.user.email,callback:function(t){a.$set(a.user,"email",t)},expression:"user.email"}})],1),s("a-form-item",{attrs:{label:"个人说明:"}},[s("a-input",{attrs:{autosize:{minRows:5},type:"textarea"},model:{value:a.user.description,callback:function(t){a.$set(a.user,"description",t)},expression:"user.description"}})],1),s("a-form-item",[s("a-button",{attrs:{type:"primary"},on:{click:a.handleUpdateProfile}},[a._v("保存")])],1)],1)],1),s("a-tab-pane",{key:"2"},[s("span",{attrs:{slot:"tab"},slot:"tab"},[s("a-icon",{attrs:{type:"lock"}}),a._v("密码\n ")],1),s("a-form",{attrs:{layout:"vertical"}},[s("a-form-item",{attrs:{label:"原密码:"}},[s("a-input",{attrs:{type:"password"},model:{value:a.passwordParam.oldPassword,callback:function(t){a.$set(a.passwordParam,"oldPassword",t)},expression:"passwordParam.oldPassword"}})],1),s("a-form-item",{attrs:{label:"新密码:"}},[s("a-input",{attrs:{type:"password"},model:{value:a.passwordParam.newPassword,callback:function(t){a.$set(a.passwordParam,"newPassword",t)},expression:"passwordParam.newPassword"}})],1),s("a-form-item",{attrs:{label:"确认密码:"}},[s("a-input",{attrs:{type:"password"},model:{value:a.passwordParam.confirmPassword,callback:function(t){a.$set(a.passwordParam,"confirmPassword",t)},expression:"passwordParam.confirmPassword"}})],1),s("a-form-item",[s("a-button",{attrs:{disabled:a.passwordUpdateButtonDisabled,type:"primary"},on:{click:a.handleUpdatePassword}},[a._v("确认更改")])],1)],1)],1)],1)],1)])],1)],1),s("AttachmentSelectDrawer",{attrs:{title:"选择头像"},on:{listenToSelect:a.handleSelectAvatar},model:{value:a.attachmentDrawerVisible,callback:function(t){a.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}})],1)},n=[],o=(e("612f"),e("3556")),i=e("3993"),r=e("c24f"),l=e("50fc"),c=e("482b"),d=e("591a"),u={components:{AttachmentSelectDrawer:i["a"]},data:function(){return{countsLoading:!0,attachmentDrawerVisible:!1,user:{},counts:{},passwordParam:{oldPassword:null,newPassword:null,confirmPassword:null},attachment:{},options:[],keys:["blog_url"]}},computed:{passwordUpdateButtonDisabled:function(){return!(this.passwordParam.oldPassword&&this.passwordParam.newPassword)}},created:function(){this.loadUser(),this.getCounts(),this.loadOptions()},methods:Object(o["a"])({},Object(d["d"])({setUser:"SET_USER"}),{loadUser:function(){var t=this;r["a"].getProfile().then(function(a){t.user=a.data.data,t.profileLoading=!1})},loadOptions:function(){var t=this;c["a"].listAll(this.keys).then(function(a){t.options=a.data.data})},getCounts:function(){var t=this;l["a"].counts().then(function(a){t.counts=a.data.data,t.countsLoading=!1})},handleUpdatePassword:function(){this.passwordParam.newPassword===this.passwordParam.confirmPassword?r["a"].updatePassword(this.passwordParam.oldPassword,this.passwordParam.newPassword).then(function(t){}):this.$message.error("确认密码和新密码不匹配!")},handleUpdateProfile:function(){var t=this;r["a"].updateProfile(this.user).then(function(a){t.user=a.data.data,t.setUser(Object.assign({},t.user)),t.$message.success("资料更新成功!")})},handleSelectAvatar:function(t){this.user.avatar=t.path,this.attachmentDrawerVisible=!1}})},p=u,m=(e("c19c"),e("17cc")),h=Object(m["a"])(p,s,n,!1,null,"23ca7e76",null);a["default"]=h.exports},a796:function(t,a,e){"use strict";var s=e("7f43"),n=e.n(s),o=e("9efd"),i="/api/admin/attachments",r={query:function(t){return Object(o["a"])({url:i,params:t,method:"get"})},get:function(t){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"get"})},delete:function(t){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"delete"})},update:function(t,a){return Object(o["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(o["a"])({url:"".concat(i,"/media_types"),method:"get"})}};r.CancelToken=n.a.CancelToken,r.isCancel=n.a.isCancel,r.upload=function(t,a,e){return Object(o["a"])({url:"".concat(i,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},r.uploads=function(t,a,e){return Object(o["a"])({url:"".concat(i,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},r.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=r},c19c:function(t,a,e){"use strict";var s=e("034d"),n=e.n(s);n.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bf599cc"],{"81a6":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:e.queryParam.keyword,callback:function(t){e.$set(e.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"状态"}},[n("a-select",{attrs:{placeholder:"请选择状态"}},[n("a-select-option",{attrs:{value:"1"}},[e._v("公开")]),n("a-select-option",{attrs:{value:"0"}},[e._v("私密")])],1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.loadJournals(!0)}}},[e._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetParam}},[e._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleNew}},[e._v("写日志")])],1),n("a-divider"),n("div",{staticStyle:{"margin-top":"15px"}},[n("a-list",{attrs:{itemLayout:"vertical",pagination:!1,dataSource:e.journals,loading:e.listLoading},scopedSlots:e._u([{key:"renderItem",fn:function(t,a){return n("a-list-item",{key:a},[n("template",{slot:"actions"},[n("span",[n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"like-o"}}),e._v(e._s(t.likes)+"\n ")],1)]),n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleCommentShow(t)}}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"message"}}),e._v(e._s(t.commentCount)+"\n ")],1)])]),n("template",{slot:"extra"},[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleEdit(t)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除这条日志?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleDelete(t.id)}}},[n("a",{attrs:{href:"javascript:void(0);"}},[e._v("删除")])])],1),n("a-list-item-meta",{attrs:{description:t.content}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(e._f("moment")(t.createTime)))]),n("a-avatar",{attrs:{slot:"avatar",size:"large",src:e.user.avatar},slot:"avatar"})],1)],2)}}])},[n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:e.pagination.total,defaultPageSize:e.pagination.size,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:e.onPaginationChange,change:e.onPaginationChange}})],1)])],1)],1)],1)],1),n("a-modal",{model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("template",{slot:"title"},[e._v("\n "+e._s(e.title)+" "),n("a-tooltip",{attrs:{slot:"action",title:"只能输入250字"},slot:"action"},[n("a-icon",{attrs:{type:"info-circle-o"}})],1)],1),n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.createOrUpdateJournal}},[e._v("\n 发布\n ")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.journal.content,callback:function(t){e.$set(e.journal,"content",t)},expression:"journal.content"}})],1)],1)],2),e.selectComment?n("a-modal",{attrs:{title:"回复给:"+e.selectComment.author},model:{value:e.selectCommentVisible,callback:function(t){e.selectCommentVisible=t},expression:"selectCommentVisible"}},[n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.handleReplyComment}},[e._v("\n 回复\n ")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.replyComment.content,callback:function(t){e.$set(e.replyComment,"content",t)},expression:"replyComment.content"}})],1)],1)],2):e._e(),n("a-drawer",{attrs:{title:"评论列表",width:e.isMobile()?"100%":"460",closable:"",visible:e.commentVisiable,destroyOnClose:""},on:{close:function(){return t.commentVisiable=!1}}},[n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-comment",[n("a-avatar",{attrs:{slot:"avatar",src:e.user.avatar,alt:e.user.nickname},slot:"avatar"}),n("p",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.journal.content))]),n("span",{attrs:{slot:"datetime"},slot:"datetime"},[e._v(e._s(e._f("moment")(e.journal.createTime)))])],1)],1),n("a-divider"),n("a-col",{attrs:{span:24}},e._l(e.comments,function(t,a){return n("journal-comment-tree",{key:a,attrs:{comment:t},on:{reply:e.handleCommentReplyClick,delete:e.handleCommentDelete}})}),1)],1)],1)],1)},o=[],i=(a("ab56"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-comment",[a("span",{attrs:{slot:"actions"},on:{click:t.handleReplyClick},slot:"actions"},[t._v("回复")]),a("a-popconfirm",{attrs:{slot:"actions",title:"你确定要永久删除该评论?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteClick},slot:"actions"},[a("span",[t._v("删除")])]),a("a",{attrs:{slot:"author"},slot:"author"},[t._v(" "+t._s(t.comment.author)+" ")]),a("a-avatar",{attrs:{slot:"avatar",src:t.avatar,alt:t.comment.author},slot:"avatar"}),a("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.comment.content))]),t.comment.children?t._l(t.comment.children,function(e,n){return a("journal-comment-tree",{key:n,attrs:{comment:e},on:{reply:t.handleSubReply,delete:t.handleSubDelete}})}):t._e()],2)],1)}),s=[],l={name:"JournalCommentTree",props:{comment:{type:Object,required:!1,default:null}},computed:{avatar:function(){return"//gravatar.loli.net/avatar/".concat(this.comment.gavatarMd5,"/?s=256&d=mp")}},methods:{handleReplyClick:function(){this.$emit("reply",this.comment)},handleSubReply:function(t){this.$emit("reply",t)},handleDeleteClick:function(){this.$emit("delete",this.comment)},handleSubDelete:function(t){this.$emit("delete",t)}}},r=l,c=a("17cc"),m=Object(c["a"])(r,i,s,!1,null,null,null),u=m.exports,d=a("ac0d"),p=a("d8fc"),h=a("9efd"),f="/api/admin/journals/comments",v={create:function(t){return Object(h["a"])({url:f,data:t,method:"post"})},delete:function(t){return Object(h["a"])({url:"".concat(f,"/").concat(t),method:"delete"})}},y=v,g=a("c24f"),b={mixins:[d["a"],d["b"]],components:{JournalCommentTree:u},data:function(){return{title:"发表",listLoading:!1,visible:!1,commentVisiable:!1,selectCommentVisible:!1,pagination:{page:1,size:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null},journals:[],comments:[],journal:{},selectComment:null,replyComment:{},user:{}}},created:function(){this.loadJournals(),this.loadUser()},methods:{loadJournals:function(t){var e=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),this.listLoading=!0,p["a"].query(this.queryParam).then(function(t){e.journals=t.data.data.content,e.pagination.total=t.data.data.total,e.listLoading=!1})},loadUser:function(){var t=this;g["a"].getProfile().then(function(e){t.user=e.data.data})},handleNew:function(){this.title="新建",this.visible=!0,this.journal={}},handleEdit:function(t){this.title="编辑",this.journal=t,this.visible=!0},handleDelete:function(t){var e=this;p["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadJournals()})},handleCommentShow:function(t){var e=this;this.journal=t,p["a"].commentTree(this.journal.id).then(function(t){e.comments=t.data.data.content,e.commentVisiable=!0})},handleCommentReplyClick:function(t){this.selectComment=t,this.selectCommentVisible=!0,this.replyComment.parentId=t.id,this.replyComment.postId=this.journal.id},handleReplyComment:function(){var t=this;y.create(this.replyComment).then(function(e){t.$message.success("回复成功!"),t.replyComment={},t.selectComment={},t.selectCommentVisible=!1,t.handleCommentShow(t.journal)})},handleCommentDelete:function(t){var e=this;y.delete(t.id).then(function(t){e.$message.success("删除成功!"),e.handleCommentShow(e.journal)})},createOrUpdateJournal:function(){var t=this;this.journal.id?p["a"].update(this.journal.id,this.journal).then(function(e){t.$message.success("更新成功!"),t.loadJournals()}):p["a"].create(this.journal).then(function(e){t.$message.success("发表成功!"),t.loadJournals()}),this.visible=!1},onPaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.page=t,this.pagination.size=e,this.loadJournals()},resetParam:function(){this.queryParam.keyword=null,this.loadJournals()}}},C=b,_=Object(c["a"])(C,n,o,!1,null,null,null);e["default"]=_.exports},d8fc:function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/journals",i={query:function(t){return Object(n["a"])({url:o,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:o,data:t,method:"post"})},update:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},commentTree:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/comments/tree_view"),method:"get"})}};e["a"]=i}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5bf599cc"],{"81a6":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:e.queryParam.keyword,callback:function(t){e.$set(e.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"状态"}},[n("a-select",{attrs:{placeholder:"请选择状态"}},[n("a-select-option",{attrs:{value:"1"}},[e._v("公开")]),n("a-select-option",{attrs:{value:"0"}},[e._v("私密")])],1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:function(t){return e.loadJournals(!0)}}},[e._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetParam}},[e._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleNew}},[e._v("写日志")])],1),n("a-divider"),n("div",{staticStyle:{"margin-top":"15px"}},[n("a-list",{attrs:{itemLayout:"vertical",pagination:!1,dataSource:e.journals,loading:e.listLoading},scopedSlots:e._u([{key:"renderItem",fn:function(t,a){return n("a-list-item",{key:a},[n("template",{slot:"actions"},[n("span",[n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"like-o"}}),e._v(e._s(t.likes)+"\n ")],1)]),n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleCommentShow(t)}}},[n("a-icon",{staticStyle:{"margin-right":"8px"},attrs:{type:"message"}}),e._v(e._s(t.commentCount)+"\n ")],1)])]),n("template",{slot:"extra"},[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(a){return e.handleEdit(t)}}},[e._v("编辑")]),n("a-divider",{attrs:{type:"vertical"}}),n("a-popconfirm",{attrs:{title:"你确定要删除这条日志?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleDelete(t.id)}}},[n("a",{attrs:{href:"javascript:void(0);"}},[e._v("删除")])])],1),n("a-list-item-meta",{attrs:{description:t.content}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(e._f("moment")(t.createTime)))]),n("a-avatar",{attrs:{slot:"avatar",size:"large",src:e.user.avatar},slot:"avatar"})],1)],2)}}])},[n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:e.pagination.total,defaultPageSize:e.pagination.size,pageSizeOptions:["1","2","5","10","20","50","100"],showSizeChanger:""},on:{showSizeChange:e.onPaginationChange,change:e.onPaginationChange}})],1)])],1)],1)],1)],1),n("a-modal",{model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("template",{slot:"title"},[e._v("\n "+e._s(e.title)+" "),n("a-tooltip",{attrs:{slot:"action",title:"只能输入250字"},slot:"action"},[n("a-icon",{attrs:{type:"info-circle-o"}})],1)],1),n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.createOrUpdateJournal}},[e._v("\n 发布\n ")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.journal.content,callback:function(t){e.$set(e.journal,"content",t)},expression:"journal.content"}})],1)],1)],2),e.selectComment?n("a-modal",{attrs:{title:"回复给:"+e.selectComment.author},model:{value:e.selectCommentVisible,callback:function(t){e.selectCommentVisible=t},expression:"selectCommentVisible"}},[n("template",{slot:"footer"},[n("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.handleReplyComment}},[e._v("\n 回复\n ")])],1),n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",[n("a-input",{attrs:{type:"textarea",autosize:{minRows:8}},model:{value:e.replyComment.content,callback:function(t){e.$set(e.replyComment,"content",t)},expression:"replyComment.content"}})],1)],1)],2):e._e(),n("a-drawer",{attrs:{title:"评论列表",width:e.isMobile()?"100%":"460",closable:"",visible:e.commentVisiable,destroyOnClose:""},on:{close:function(){return t.commentVisiable=!1}}},[n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-comment",[n("a-avatar",{attrs:{slot:"avatar",src:e.user.avatar,alt:e.user.nickname},slot:"avatar"}),n("p",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.journal.content))]),n("span",{attrs:{slot:"datetime"},slot:"datetime"},[e._v(e._s(e._f("moment")(e.journal.createTime)))])],1)],1),n("a-divider"),n("a-col",{attrs:{span:24}},e._l(e.comments,function(t,a){return n("journal-comment-tree",{key:a,attrs:{comment:t},on:{reply:e.handleCommentReplyClick,delete:e.handleCommentDelete}})}),1)],1)],1)],1)},o=[],i=(a("b745"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-comment",[a("span",{attrs:{slot:"actions"},on:{click:t.handleReplyClick},slot:"actions"},[t._v("回复")]),a("a-popconfirm",{attrs:{slot:"actions",title:"你确定要永久删除该评论?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteClick},slot:"actions"},[a("span",[t._v("删除")])]),a("a",{attrs:{slot:"author"},slot:"author"},[t._v(" "+t._s(t.comment.author)+" ")]),a("a-avatar",{attrs:{slot:"avatar",src:t.avatar,alt:t.comment.author},slot:"avatar"}),a("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.comment.content))]),t.comment.children?t._l(t.comment.children,function(e,n){return a("journal-comment-tree",{key:n,attrs:{comment:e},on:{reply:t.handleSubReply,delete:t.handleSubDelete}})}):t._e()],2)],1)}),s=[],r={name:"JournalCommentTree",props:{comment:{type:Object,required:!1,default:null}},computed:{avatar:function(){return"//cn.gravatar.com/avatar/".concat(this.comment.gavatarMd5,"/?s=256&d=mp")}},methods:{handleReplyClick:function(){this.$emit("reply",this.comment)},handleSubReply:function(t){this.$emit("reply",t)},handleDeleteClick:function(){this.$emit("delete",this.comment)},handleSubDelete:function(t){this.$emit("delete",t)}}},l=r,c=a("17cc"),m=Object(c["a"])(l,i,s,!1,null,null,null),u=m.exports,d=a("ac0d"),p=a("d8fc"),h=a("9efd"),f="/api/admin/journals/comments",v={create:function(t){return Object(h["a"])({url:f,data:t,method:"post"})},delete:function(t){return Object(h["a"])({url:"".concat(f,"/").concat(t),method:"delete"})}},y=v,g=a("c24f"),b={mixins:[d["a"],d["b"]],components:{JournalCommentTree:u},data:function(){return{title:"发表",listLoading:!1,visible:!1,commentVisiable:!1,selectCommentVisible:!1,pagination:{page:1,size:10,sort:null},queryParam:{page:0,size:10,sort:null,keyword:null},journals:[],comments:[],journal:{},selectComment:null,replyComment:{},user:{}}},created:function(){this.loadJournals(),this.loadUser()},methods:{loadJournals:function(t){var e=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),this.listLoading=!0,p["a"].query(this.queryParam).then(function(t){e.journals=t.data.data.content,e.pagination.total=t.data.data.total,e.listLoading=!1})},loadUser:function(){var t=this;g["a"].getProfile().then(function(e){t.user=e.data.data})},handleNew:function(){this.title="新建",this.visible=!0,this.journal={}},handleEdit:function(t){this.title="编辑",this.journal=t,this.visible=!0},handleDelete:function(t){var e=this;p["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadJournals()})},handleCommentShow:function(t){var e=this;this.journal=t,p["a"].commentTree(this.journal.id).then(function(t){e.comments=t.data.data.content,e.commentVisiable=!0})},handleCommentReplyClick:function(t){this.selectComment=t,this.selectCommentVisible=!0,this.replyComment.parentId=t.id,this.replyComment.postId=this.journal.id},handleReplyComment:function(){var t=this;y.create(this.replyComment).then(function(e){t.$message.success("回复成功!"),t.replyComment={},t.selectComment={},t.selectCommentVisible=!1,t.handleCommentShow(t.journal)})},handleCommentDelete:function(t){var e=this;y.delete(t.id).then(function(t){e.$message.success("删除成功!"),e.handleCommentShow(e.journal)})},createOrUpdateJournal:function(){var t=this;this.journal.id?p["a"].update(this.journal.id,this.journal).then(function(e){t.$message.success("更新成功!"),t.loadJournals()}):p["a"].create(this.journal).then(function(e){t.$message.success("发表成功!"),t.loadJournals()}),this.visible=!1},onPaginationChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.pagination.page=t,this.pagination.size=e,this.loadJournals()},resetParam:function(){this.queryParam.keyword=null,this.loadJournals()}}},C=b,_=Object(c["a"])(C,n,o,!1,null,null,null);e["default"]=_.exports},d8fc:function(t,e,a){"use strict";var n=a("9efd"),o="/api/admin/journals",i={query:function(t){return Object(n["a"])({url:o,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:o,data:t,method:"post"})},update:function(t,e){return Object(n["a"])({url:"".concat(o,"/").concat(t),data:e,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},commentTree:function(t){return Object(n["a"])({url:"".concat(o,"/").concat(t,"/comments/tree_view"),method:"get"})}};e["a"]=i}}]);
\ No newline at end of file
此差异已折叠。
此差异已折叠。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["fail"],{"01a4":function(t,e,s){},2254:function(t,e,s){"use strict";var a=s("01a4"),c=s.n(a);c.a},cc89:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("exception-page",{attrs:{type:"404"}})},c=[],n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"exception"},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.config[t.type].img}})]),s("div",{staticClass:"content"},[s("h1",[t._v(t._s(t.config[t.type].title))]),s("div",{staticClass:"desc"},[t._v(t._s(t.config[t.type].desc))]),s("div",{staticClass:"action"},[s("a-button",{attrs:{type:"primary"},on:{click:t.handleToHome}},[t._v("返回首页")])],1)])])},i=[],o={404:{img:"https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg",title:"404",desc:"抱歉,你访问的页面不存在"},500:{img:"https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg",title:"500",desc:"抱歉,服务器出错了"}},p=o,r={name:"Exception",props:{type:{type:String,default:"404"}},data:function(){return{config:p}},methods:{handleToHome:function(){this.$router.push({name:"Dashboard"})}}},l=r,u=(s("2254"),s("17cc")),d=Object(u["a"])(l,n,i,!1,null,"230942b4",null),m=d.exports,g={components:{ExceptionPage:m}},f=g,v=Object(u["a"])(f,a,c,!1,null,"e319b3a6",null);e["default"]=v.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["fail"],{5517:function(t,e,s){"use strict";var c=s("92530"),n=s.n(c);n.a},92530:function(t,e,s){},cc89:function(t,e,s){"use strict";s.r(e);var c=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("exception-page",{attrs:{type:"404"}})},n=[],a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"exception"},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.config[t.type].img}})]),s("div",{staticClass:"content"},[s("h1",[t._v(t._s(t.config[t.type].title))]),s("div",{staticClass:"desc"},[t._v(t._s(t.config[t.type].desc))]),s("div",{staticClass:"action"},[s("a-button",{attrs:{type:"primary"},on:{click:t.handleToHome}},[t._v("返回首页")])],1)])])},i=[],o={404:{img:"https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg",title:"404",desc:"抱歉,你访问的页面不存在"},500:{img:"https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg",title:"500",desc:"抱歉,服务器出错了"}},p=o,r={name:"Exception",props:{type:{type:String,default:"404"}},data:function(){return{config:p}},methods:{handleToHome:function(){this.$router.push({name:"Dashboard"})}}},l=r,u=(s("5517"),s("17cc")),d=Object(u["a"])(l,a,i,!1,null,"729a8fea",null),f=d.exports,m={components:{ExceptionPage:f}},g=m,v=Object(u["a"])(g,c,n,!1,null,"388fe08d",null);e["default"]=v.exports}}]);
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册