This commit is contained in:
hoteas 2021-12-16 13:24:31 +08:00
parent 84dbc5d71e
commit bb16f0a75b
32 changed files with 497 additions and 6 deletions

View File

@ -93,4 +93,5 @@ var ColumnNameType = []ColumnShow{
{"email", false, true, true, false, "", false},
{"time", true, true, true, true, "time", false},
{"level", false, false, true, false, "", false},
{"rule", false, true, true, false, "form", false},
}

View File

@ -574,7 +574,12 @@ func (that *MakeCode) Add(table string, req *http.Request) Map {
if v.Get("add") == nil || v.GetBool("add") {
if len(req.Form[v.GetString("name")]) == 0 {
return nil
if v.GetBool("must") {
return nil
} else {
continue
}
}
reqValue := req.FormValue(v.GetString("name"))
if (reqValue == "" || reqValue == "null") && strings.Contains(v.GetString("name"), "id") {

View File

@ -5,7 +5,7 @@ import (
. "../../../hotime/common"
)
var ID = "7b1c0ebec5cc5b407bcd243c54d45d10"
var ID = "a6467964bfe64def9cd247c226e6d49b"
// Project 管理端项目
var Project = Proj{

View File

@ -16,6 +16,7 @@ var Project = Proj{
"material_inout": material_inoutCtr,
"produce_product": produce_productCtr,
"produce": produceCtr,
"product_line": product_lineCtr,
}
//生成随机码的4位随机数

View File

@ -55,6 +55,7 @@ var produce_productCtr = Ctr{
sn := that.Req.FormValue("sn")
product_id := ObjToInt(that.Req.FormValue("product_id"))
produce_id := ObjToInt(that.Req.FormValue("produce_id"))
product_line_id := ObjToInt(that.Req.FormValue("product_line_id"))
state := ObjToInt(that.Req.FormValue("state"))
rule_check := that.Req.FormValue("rule_check")
description := that.Req.FormValue("description")
@ -73,7 +74,9 @@ var produce_productCtr = Ctr{
"modify_time": time.Now().Unix(),
}
id := that.Db.Insert("produce_product", data)
data1 := ObjToMap(data.ToJsonString())
data1["product_line_id"] = product_line_id
id := that.Db.Insert("produce_product", data1)
if id == 0 {
that.Display(4, "添加新成品失败,请重新添加")
return

146
example/app/product_line.go Normal file
View File

@ -0,0 +1,146 @@
package app
import (
. "../../../hotime"
. "../../../hotime/common"
"strings"
)
var product_lineCtr = Ctr{
"info": func(that *Context) {
data := that.Db.Get("admin", "*", Map{"id": that.Session("admin_id").ToCeilInt()})
str, inData := that.MakeCode.Info(that.RouterString[1], data, that.Db)
where := Map{"id": that.RouterString[2]}
if len(inData) == 1 {
inData["id"] = where["id"]
where = Map{"AND": inData}
} else if len(inData) > 1 {
where["OR"] = inData
where = Map{"AND": where}
}
re := that.Db.Get(that.RouterString[1], str, where)
if re == nil {
that.Display(4, "找不到对应信息")
return
}
for k, v := range re {
column := that.MakeCode.TableColumns[that.RouterString[1]][k]
if column == nil {
continue
}
if (column["list"] == nil || column.GetBool("list")) && column.GetString("link") != "" {
re[column.GetString("link")] = that.Db.Get(column.GetString("link"), "id,"+column.GetString("value"), Map{"id": v})
}
}
that.Display(0, re)
},
"add": func(that *Context) {
inData := that.MakeCode.Add(that.RouterString[1], that.Req)
if inData == nil {
that.Display(3, "请求参数不足")
return
}
re := that.Db.Insert(that.RouterString[1], inData)
if re == 0 {
that.Display(4, "无法插入对应数据")
return
}
//索引管理,便于检索以及权限
if inData.Get("parent_id") != nil && inData.GetString("index") != "" {
index := that.Db.Get(that.RouterString[1], "`index`", Map{"id": inData.Get("parent_id")})
inData["index"] = index.GetString("index") + ObjToStr(re) + ","
that.Db.Update(that.RouterString[1], Map{"index": inData["index"]}, Map{"id": re})
} else if inData.GetString("index") != "" {
inData["index"] = "," + ObjToStr(re) + ","
that.Db.Update(that.RouterString[1], Map{"index": inData["index"]}, Map{"id": re})
}
that.Display(0, re)
},
"update": func(that *Context) {
inData := that.MakeCode.Edit(that.RouterString[1], that.Req)
if inData == nil {
that.Display(3, "没有找到要更新的数据")
return
}
//索引管理,便于检索以及权限
if inData.Get("parent_id") != nil && inData.GetString("index") != "" {
Index := that.Db.Get(that.RouterString[1], "`index`", Map{"id": that.RouterString[2]})
parentIndex := that.Db.Get(that.RouterString[1], "`index`", Map{"id": inData.Get("parent_id")})
inData["index"] = parentIndex.GetString("index") + that.RouterString[2] + ","
childNodes := that.Db.Select(that.RouterString[1], "id,`index`", Map{"index[~]": "," + that.RouterString[2] + ","})
for _, v := range childNodes {
v["index"] = strings.Replace(v.GetString("index"), Index.GetString("index"), inData.GetString("index"), -1)
that.Db.Update(that.RouterString[1], Map{"index": v["index"]}, Map{"id": v.GetCeilInt("id")})
}
}
re := that.Db.Update(that.RouterString[1], inData, Map{"id": that.RouterString[2]})
if re == 0 {
that.Display(4, "更新数据失败")
return
}
that.Display(0, re)
},
"remove": func(that *Context) {
inData := that.MakeCode.Delete(that.RouterString[1], that.Req)
if inData == nil {
that.Display(3, "请求参数不足")
return
}
re := int64(0)
//索引管理,便于检索以及权限
if inData.Get("parent_id") != nil && inData.GetSlice("index") != nil {
re = that.Db.Delete(that.RouterString[1], Map{"index[~]": "," + that.RouterString[2] + ","})
} else {
re = that.Db.Delete(that.RouterString[1], Map{"id": that.RouterString[2]})
}
if re == 0 {
that.Display(4, "删除数据失败")
return
}
that.Display(0, "删除成功")
},
"search": func(that *Context) {
adminID := that.Session("id").ToInt()
if adminID == 0 {
that.Display(2, "登录失效,请重新登录")
return
}
//page := ObjToInt(that.Req.FormValue("page"))
//pageSize := ObjToInt(that.Req.FormValue("pageSize"))
//
//if page < 1 {
// page = 1
//}
//if pageSize <= 0 {
// pageSize = 10
//}
//leftJoin := Map{"[><]admin": "product.admin_id=admin.id"}
where := Map{"state": 0, "ORDER": "modify_time DESC"}
//count := that.Db.Count("product", where)
reData := that.Db.Select("product_line", "*", where)
that.Display(0, reData)
},
}

BIN
example/bzyy.exe Normal file

Binary file not shown.

View File

@ -24,7 +24,7 @@
"db": {
"mysql": {
"host": "192.168.6.253",
"name": "myhs",
"name": "myhs_remote",
"password": "dasda8454456",
"port": "3306",
"prefix": "",

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.left-nav-home-bar{background:#2c3759!important}.left-nav-home-bar,.left-nav-home-bar i{color:#fff!important}.el-submenu .el-menu-item{height:40px;line-height:40px}.el-menu .el-submenu__title{height:46px;line-height:46px}.left-nav-home-bar i{margin-bottom:6px!important}.el-menu-item-group__title{padding:0 0 0 20px}.head-left[data-v-297b6686],.head-right[data-v-297b6686]{display:flex;justify-content:center;flex-direction:column}.head-right[data-v-297b6686]{align-items:flex-end}.el-upload{height:100px;width:100px}.el-upload img[data-v-012633a9]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-012633a9]{font-size:40px;margin:30% 31%;display:block}.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload{height:60px;width:60px;background:#eee;overflow:hidden}

View File

@ -1 +0,0 @@
h3[data-v-b9167eee]{margin:40px 0 0}ul[data-v-b9167eee]{list-style-type:none;padding:0}li[data-v-b9167eee]{display:inline-block;margin:0 10px}a[data-v-b9167eee]{color:#42b983}

View File

@ -0,0 +1 @@
.not-show-tab-label .el-tabs__header,.not-show-tab-search{display:none}

View File

@ -0,0 +1 @@
.el-upload{height:100px;width:100px}.el-upload img[data-v-012633a9]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-012633a9]{font-size:40px;margin:30% 31%;display:block}.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload{height:60px;width:60px;background:#eee;overflow:hidden}

View File

@ -0,0 +1 @@
body[data-v-581864d3],dd[data-v-581864d3],dl[data-v-581864d3],form[data-v-581864d3],h1[data-v-581864d3],h2[data-v-581864d3],h3[data-v-581864d3],h4[data-v-581864d3],h5[data-v-581864d3],h6[data-v-581864d3],html[data-v-581864d3],ol[data-v-581864d3],p[data-v-581864d3],pre[data-v-581864d3],tbody[data-v-581864d3],textarea[data-v-581864d3],tfoot[data-v-581864d3],thead[data-v-581864d3],ul[data-v-581864d3]{margin:0;font-size:14px;font-family:Microsoft YaHei}dl[data-v-581864d3],ol[data-v-581864d3],ul[data-v-581864d3]{padding:0}li[data-v-581864d3]{list-style:none}input[data-v-581864d3]{border:none;outline:none;font-family:Microsoft YaHei;background-color:#fff}a[data-v-581864d3]{font-family:Microsoft YaHei;text-decoration:none}[data-v-581864d3]{margin:0;padding:0}.login[data-v-581864d3]{position:relative;width:100%;height:100%;background-color:#353d56}.login-item[data-v-581864d3]{position:absolute;top:calc(50% - 244px);left:calc(50% - 244px);width:488px;height:488px;padding:80px 0 152px 0;box-sizing:border-box;background-size:468px 468px}.login-item .left-title[data-v-581864d3]{display:inline-block;width:236px;height:100%;border-right:2px solid #88919e;text-align:center;padding-top:68px;box-sizing:border-box}.login-item .left-title p[data-v-581864d3]{font-size:30px;line-height:50px;color:#fff}.login-item .right-content[data-v-581864d3]{display:inline-block;vertical-align:top;padding-left:42px;box-sizing:border-box}.login-item .right-content .login-title[data-v-581864d3]{font-size:16px;color:#fff}.errorMsg[data-v-581864d3]{width:100%;height:34px;line-height:34px;color:red;font-size:14px;overflow:hidden}.login-item .right-content .inputWrap[data-v-581864d3]{width:204px;height:36px;line-height:36px;color:#99a3b2;font-size:14px;border-bottom:3px solid #98a2b1;margin-bottom:10px}.login-item .right-content .inputWrap input[data-v-581864d3]{background-color:transparent;color:#99a3b2}.login-btn[data-v-581864d3]{width:88px;height:36px;text-align:center;line-height:36px;font-size:14px;color:#fff;background-color:#4f619b;border-radius:18px;margin-top:60px;cursor:pointer}

View File

@ -0,0 +1 @@
.form-file-item .upload-file .el-upload{width:100px;height:auto;line-height:0;background-color:transparent}.form-file-item .el-button--small{height:32px}.el-input-number--mini{width:100px;margin-right:5px}.el-input-number--mini .el-input{width:100px!important}.basic-form{width:400px}.basic-form .el-input,.basic-form .el-select{width:84px;margin-right:5px}.form-file-item{margin-bottom:5px}.form-file-item .el-upload{width:60px;height:60px;line-height:60px}.form-file-item .file-item .name{width:100px}.form-file-item .name{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-list .form-common-item{display:flex;margin-bottom:5px}.form-common-item .name,.form-common-item .value{width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list .select-list-item{display:flex;margin-bottom:5px}.select-list-item .name{width:76px}.select-list-item .name,.select-list-item .value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select-list-item .value{width:77px}.select-wrap{text-align:left;margin-bottom:5px}.select-wrap .select-add-name{display:inline-block;width:87px;text-align:right}.select-wrap .el-input{width:84px}.el-input__inner{padding-left:10px;padding-right:5px}.el-upload,.el-upload-list--picture-card .el-upload-list__item{height:60px;width:60px}.el-upload-list__item.is-success.focusing .el-icon-close-tip{display:none!important}.el-upload{height:100px;width:100px;background:#eee;overflow:hidden}.file-upload .el-upload{background:transparent;width:100%;height:auto;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-upload .el-upload .el-button{margin-right:10px}.el-upload img[data-v-4b440c12]{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;display:block}.el-upload i[data-v-4b440c12]{font-size:40px;margin:30% 31%;display:block}

View File

@ -0,0 +1 @@
h3[data-v-28af1b93]{margin:40px 0 0}ul[data-v-28af1b93]{list-style-type:none;padding:0}li[data-v-28af1b93]{display:inline-block;margin:0 10px}a[data-v-28af1b93]{color:#42b983}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>hotime</title><style>body{
margin: 0px;
}</style><link href="css/chunk-038340db.e4ca99de.css" rel="prefetch"><link href="css/chunk-0524801b.1e910850.css" rel="prefetch"><link href="css/chunk-1c438cad.2fd7d31d.css" rel="prefetch"><link href="css/chunk-1d1a12b6.8c684de3.css" rel="prefetch"><link href="css/chunk-2c1d9b2f.78c69bda.css" rel="prefetch"><link href="css/chunk-5ccac4d0.5f1c91ca.css" rel="prefetch"><link href="css/chunk-c569a38e.01bc1b83.css" rel="prefetch"><link href="css/chunk-c7a51d14.4a0871eb.css" rel="prefetch"><link href="js/chunk-038340db.3c8b0cb6.js" rel="prefetch"><link href="js/chunk-0524801b.de9b433f.js" rel="prefetch"><link href="js/chunk-14f17cfa.c5104e8c.js" rel="prefetch"><link href="js/chunk-1c438cad.72a22c19.js" rel="prefetch"><link href="js/chunk-1d1a12b6.6900cc01.js" rel="prefetch"><link href="js/chunk-2c1d9b2f.39065c9e.js" rel="prefetch"><link href="js/chunk-5b2ead63.af868ff8.js" rel="prefetch"><link href="js/chunk-5ccac4d0.98ff45de.js" rel="prefetch"><link href="js/chunk-68815fbc.04152d5f.js" rel="prefetch"><link href="js/chunk-c569a38e.16d55c64.js" rel="prefetch"><link href="js/chunk-c7a51d14.3cd28dc4.js" rel="prefetch"><link href="css/app.5e2eb449.css" rel="preload" as="style"><link href="js/app.f5f26baa.js" rel="preload" as="script"><link href="css/app.5e2eb449.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but hotime doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/app.f5f26baa.js"></script></body></html>
}</style><link href="css/chunk-1afce11c.7ec257c2.css" rel="prefetch"><link href="css/chunk-1dd2a8d0.e4ca99de.css" rel="prefetch"><link href="css/chunk-2f62f180.5c448e68.css" rel="prefetch"><link href="css/chunk-a74869b6.c460e209.css" rel="prefetch"><link href="css/chunk-b504df5c.61d7456c.css" rel="prefetch"><link href="css/chunk-d1a9ebe6.5cc24c46.css" rel="prefetch"><link href="js/chunk-1afce11c.fbe5a1b4.js" rel="prefetch"><link href="js/chunk-1dd2a8d0.c3cd4fb6.js" rel="prefetch"><link href="js/chunk-2c065dd6.99c035f4.js" rel="prefetch"><link href="js/chunk-2f62f180.820cf5fd.js" rel="prefetch"><link href="js/chunk-58db4e7f.c298e695.js" rel="prefetch"><link href="js/chunk-6581ae4b.953630b3.js" rel="prefetch"><link href="js/chunk-78ba61e2.520b239c.js" rel="prefetch"><link href="js/chunk-a74869b6.59e9b13d.js" rel="prefetch"><link href="js/chunk-b504df5c.0add8dfa.js" rel="prefetch"><link href="js/chunk-d1a9ebe6.fba0f501.js" rel="prefetch"><link href="css/app.5e2eb449.css" rel="preload" as="style"><link href="js/app.3ff414bb.js" rel="preload" as="script"><link href="css/app.5e2eb449.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but hotime doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/app.3ff414bb.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2c065dd6"],{1:function(t,e){},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"c",function(){return u}),n.d(e,"a",function(){return c}),n.d(e,"f",function(){return d});var e=n("b0c0"),r=n("b775"),e=n("4328"),i=n.n(e);function o(t,e){return Object(r.b)({url:t,method:"GET",params:e})}function a(t,e){return Object(r.b)({url:t,method:"GET",params:e})}function s(t,e){return Object(r.b)({url:t,method:"DELETE",data:i.a.stringify(e)})}function u(t,e){return Object(r.b)({url:t,method:"PUT",data:i.a.stringify(e)})}function c(t,e){return Object(r.b)({url:t,method:"POST",data:i.a.stringify(e)})}function d(t){var e=new FormData;return e.append("file",t,t.name),Object(r.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}},"83c5":function(t,e,n){"use strict";n("159b");e.a={list:{},constructor:function(){this.list={}},$on:function(t,e){this.list[t]=this.list[t]||[],this.list[t].push(e)},$emit:function(t,e){this.list[t]&&this.list[t].forEach(function(t){t(e)})},$off:function(t){this.list[t]&&delete this.list[t]}}},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("d3b7"),i=n("bc3a"),r=n.n(i),i=n("4328"),o=n.n(i),a=n("2bea"),s=n("56d7"),u="";r.a.defaults.withCredentials=!0,r.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";r=r.a.create({baseURL:u,timeout:2e4});r.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return o.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),r.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(a.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void s.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=r}}]);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-58db4e7f"],{"159b":function(c,n,o){var r,t=o("da84"),a=o("fdbc"),f=o("17c2"),i=o("9112");for(r in a){var u=t[r],u=u&&u.prototype;if(u&&u.forEach!==f)try{i(u,"forEach",f)}catch(c){u.forEach=f}}},"17c2":function(c,n,o){"use strict";var r=o("b727").forEach,o=o("a640")("forEach");c.exports=o?[].forEach:function(c){return r(this,c,1<arguments.length?arguments[1]:void 0)}},a640:function(c,n,o){"use strict";var r=o("d039");c.exports=function(c,n){var o=[][c];return!!o&&r(function(){o.call(null,n||function(){throw 1},1)})}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a74869b6"],{1:function(t,e){},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"f",function(){return d});var e=n("b0c0"),o=n("b775"),e=n("4328"),r=n.n(e);function a(t,e){return Object(o.b)({url:t,method:"GET",params:e})}function s(t,e){return Object(o.b)({url:t,method:"GET",params:e})}function i(t,e){return Object(o.b)({url:t,method:"DELETE",data:r.a.stringify(e)})}function c(t,e){return Object(o.b)({url:t,method:"PUT",data:r.a.stringify(e)})}function u(t,e){return Object(o.b)({url:t,method:"POST",data:r.a.stringify(e)})}function d(t){var e=new FormData;return e.append("file",t,t.name),Object(o.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}},"40a7":function(t,e,n){},"578a":function(t,e,n){"use strict";n.r(e);n("b0c0");var s=n("9f9f");Object(s.O)("data-v-581864d3");var i={class:"login",style:{width:"100%",height:"100vh"}},c={class:"login-item"},u={class:"left-title"},d={class:"right-content"},l=Object(s.o)("p",{class:"login-title"},"登录",-1),f={style:{height:"40px"}},b={class:"inputWrap"},p=Object(s.r)(" 账号:"),m={class:"inputWrap"},h=Object(s.r)(" 密码:");Object(s.M)();var o=n("2934"),r={name:"Login",data:function(){return{showLog:!1,showLogInfo:"",label:"HoTime DashBoard",form:{name:"",password:""}}},methods:{login:function(){var e=this;if(""==this.name||""==this.password)return this.showLogInfo="参数不足!",void(this.showLog=!0);Object(o.a)(window.Hotime.data.name+"/hotime/login",e.form).then(function(t){return 0!=t.status?(e.showLogInfo=t.error.msg,void(e.showLog=!0)):void e.$router.push({path:"/"})})}},mounted:function(){this.label=window.Hotime.data.label}};n("8d39");r.render=function(t,e,n,o,r,a){return Object(s.L)(),Object(s.n)("div",i,[Object(s.o)("div",c,[Object(s.o)("div",u,[Object(s.o)("p",null,Object(s.Y)(r.label),1)]),Object(s.o)("div",d,[l,Object(s.o)("div",f,[Object(s.kb)(Object(s.o)("p",{class:"errorMsg"},Object(s.Y)(r.showLogInfo),513),[[s.gb,r.showLog]])]),Object(s.o)("p",b,[p,Object(s.kb)(Object(s.o)("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=function(t){return r.form.name=t}),class:"accountVal"},null,512),[[s.fb,r.form.name]])]),Object(s.o)("p",m,[h,Object(s.kb)(Object(s.o)("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=function(t){return r.form.password=t}),class:"passwordVal"},null,512),[[s.fb,r.form.password]])]),Object(s.o)("p",{class:"login-btn",onClick:e[2]||(e[2]=function(){return a.login&&a.login.apply(a,arguments)})},"登录")])])])},r.__scopeId="data-v-581864d3";e.default=r},"8d39":function(t,e,n){"use strict";n("40a7")},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var o=n("d3b7"),r=n("bc3a"),o=n.n(r),r=n("4328"),a=n.n(r),s=n("2bea"),i=n("56d7"),c="";o.a.defaults.withCredentials=!0,o.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";o=o.a.create({baseURL:c,timeout:2e4});o.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return a.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),o.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(s.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void i.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=o}}]);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d1a9ebe6"],{"587e":function(a,e,t){"use strict";t.r(e);var n=t("9f9f");Object(n.O)("data-v-28af1b93");var v={class:"hello"},b=Object(n.q)('<p data-v-28af1b93> For a guide and recipes on how to configure / customize this project,<br data-v-28af1b93> check out the <a href="https://cli.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>vue-cli documentation</a>. </p><h3 data-v-28af1b93>Installed CLI Plugins</h3><ul data-v-28af1b93><li data-v-28af1b93><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener" data-v-28af1b93>babel</a></li><li data-v-28af1b93><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener" data-v-28af1b93>eslint</a></li></ul><h3 data-v-28af1b93>Essential Links</h3><ul data-v-28af1b93><li data-v-28af1b93><a href="https://vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>Core Docs</a></li><li data-v-28af1b93><a href="https://forum.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>Forum</a></li><li data-v-28af1b93><a href="https://chat.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>Community Chat</a></li><li data-v-28af1b93><a href="https://twitter.com/vuejs" target="_blank" rel="noopener" data-v-28af1b93>Twitter</a></li><li data-v-28af1b93><a href="https://news.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>News</a></li></ul><h3 data-v-28af1b93>Ecosystem</h3><ul data-v-28af1b93><li data-v-28af1b93><a href="https://router.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>vue-router</a></li><li data-v-28af1b93><a href="https://vuex.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>vuex</a></li><li data-v-28af1b93><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener" data-v-28af1b93>vue-devtools</a></li><li data-v-28af1b93><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener" data-v-28af1b93>vue-loader</a></li><li data-v-28af1b93><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener" data-v-28af1b93>awesome-vue</a></li></ul>',7);Object(n.M)();var r={name:"HelloWorld",props:{msg:String}};t("6fe9");r.render=function(a,e,t,r,l,o){return Object(n.L)(),Object(n.n)("div",v,[Object(n.o)("h1",null,Object(n.Y)(t.msg),1),b])},r.__scopeId="data-v-28af1b93";e.default=r},"6fe9":function(a,e,t){"use strict";t("e8a7")},e8a7:function(a,e,t){}}]);