add bookmark_type delete function

This commit is contained in:
simple321vip
2022-08-28 21:18:02 +08:00
parent 4eef8656c3
commit 41c42e2d47
52 changed files with 279 additions and 99 deletions
@@ -1 +1 @@
import{G as e}from"./index.5d800fae.js";import{l as s}from"./index.36ff3ff6.js";const t={"Content-Type":"application/json;charsetset=UTF-8"},u=r=>e({url:"/auth/api/v1/reader/blogs",method:"GET",params:r,paramsSerializer:a=>s.stringify(a,{arrayFormat:"repeat"})}),i=()=>e({url:"/auth/api/v1/reader/blog_type",method:"GET",headers:t}),p=r=>e({url:"/auth/api/v1/reader/blog/"+r,method:"GET",headers:t}),n=()=>e({url:"/auth/api/v1/reader/blogs/publish/all",method:"GET"}),h=r=>e({url:"/auth/api/v1/reader/blogs/publish/"+r,method:"GET"});export{i as a,h as b,p as c,u as g,n as p}; import{G as e}from"./index.4a6e9266.js";import{l as s}from"./index.220e6de4.js";const t={"Content-Type":"application/json;charsetset=UTF-8"},u=r=>e({url:"/auth/api/v1/reader/blogs",method:"GET",params:r,paramsSerializer:a=>s.stringify(a,{arrayFormat:"repeat"})}),i=()=>e({url:"/auth/api/v1/reader/blog_type",method:"GET",headers:t}),p=r=>e({url:"/auth/api/v1/reader/blog/"+r,method:"GET",headers:t}),n=()=>e({url:"/auth/api/v1/reader/blogs/publish/all",method:"GET"}),h=r=>e({url:"/auth/api/v1/reader/blogs/publish/"+r,method:"GET"});export{i as a,h as b,p as c,u as g,n as p};
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
.b_section[data-v-a732f5aa],.bt_section[data-v-a732f5aa],.c_section[data-v-a732f5aa]{display:flex;flex-direction:column;align-items:stretch;border-right:1px solid royalblue}.bt-input[data-v-a732f5aa]{display:flex;flex-direction:row;justify-content:flex-start;margin-left:0;padding-left:10px;font-size:15px;overflow:hidden;height:50px;border-radius:0;border-right:0px;border-left:0px;border-top:1px solid royalblue;border-bottom:1px solid royalblue}.title_style[data-v-a732f5aa]{display:flex}.title_style[data-v-a732f5aa] .el-input__inner{flex-direction:row;height:50px;font-size:20px;border-right:0px;border-left:0px;border-radius:0;border-top:1px solid royalblue;border-bottom:1px solid royalblue}.el-dropdown[data-v-a732f5aa]{margin-right:5px}.blog_editer[data-v-a732f5aa]{display:flex}.tab_list[data-v-a732f5aa]{display:flex;flex-direction:column}
-1
View File
@@ -1 +0,0 @@
.b_section[data-v-299e6ba1],.bt_section[data-v-299e6ba1],.c_section[data-v-299e6ba1]{display:flex;flex-direction:column;align-items:stretch;border-right:1px solid royalblue}.bt-input[data-v-299e6ba1]{display:flex;flex-direction:row;justify-content:flex-start;margin-left:0;padding-left:10px;font-size:15px;overflow:hidden;height:50px;border-radius:0;border-right:0px;border-left:0px;border-top:1px solid royalblue;border-bottom:1px solid royalblue}.title_style[data-v-299e6ba1]{display:flex}.title_style[data-v-299e6ba1] .el-input__inner{flex-direction:row;height:50px;font-size:20px;border-right:0px;border-left:0px;border-radius:0;border-top:1px solid royalblue;border-bottom:1px solid royalblue}.el-dropdown[data-v-299e6ba1]{margin-right:5px}.blog_editer[data-v-299e6ba1]{display:flex}.tab_list[data-v-299e6ba1]{display:flex;flex-direction:column}
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -1 +1 @@
import{_ as e,o as _,c as a}from"./index.5d800fae.js";const c={},n={class:"dashboard"};function r(s,t){return _(),a("div",n,"\u8FD9\u91CC\u6211\u60F3\u5206\u4EAB\u7684\u4E00\u4E9B\u4E1C\u897F\uFF0C\u65E0\u8BBA\u662F\u751F\u6D3B\u8FD8\u662F\u5DE5\u4F5C\uFF0C\u8FD8\u662F\u5B66\u79D1")}var d=e(c,[["render",r]]);export{d as default}; import{_ as e,o as _,c as a}from"./index.4a6e9266.js";const c={},n={class:"dashboard"};function r(s,t){return _(),a("div",n,"\u8FD9\u91CC\u6211\u60F3\u5206\u4EAB\u7684\u4E00\u4E9B\u4E1C\u897F\uFF0C\u65E0\u8BBA\u662F\u751F\u6D3B\u8FD8\u662F\u5DE5\u4F5C\uFF0C\u8FD8\u662F\u5B66\u79D1")}var d=e(c,[["render",r]]);export{d as default};
-1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
import{d as ZL,b as XL,C as qL,o as KL,c as QL}from"./index.5d800fae.js";/*! ***************************************************************************** import{d as ZL,b as XL,C as qL,o as KL,c as QL}from"./index.4a6e9266.js";/*! *****************************************************************************
Copyright (c) Microsoft Corporation. Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{d as S,D as b,r as u,o as i,c as r,a as e,u as s,g as l,F as y,j as C,h as w,k as $,e as p,t as B,f as m,E as q}from"./index.5d800fae.js";import{g,a as A,p as T,b as G}from"./blogView.5a19e561.js";import"./index.36ff3ff6.js";const H=p("span",null,"\u5206\u7C7B\u641C\u7D22",-1),J=p("span",{class:"text-gray-500"},"-",-1),K=m("\u641C\u7D22"),M=m("\u521B\u4F5C"),O=m("\u5168\u90E8\u91CD\u65B0\u53D1\u5E03"),P={class:"blog_list"},Q=["onClick"],R={style:{display:"flex","justify-content":"space-between","align-items":"center"}},W={style:{"font-size":"12px",height:"16px","line-height":"16px",overflow:"hidden","text-overflow":"ellipsis"}},X=m("\u91CD\u65B0\u53D1\u5E03 "),oe=S({setup(Y){const a=b({key_word:"",btId:"",start_day:"",end_day:""}),_=b([]),h=b([]),v=()=>{g({}).then(n=>{n.data.forEach(t=>{_.push(t)})}),A().then(n=>{h.push({btId:"",btName:"\u9009\u62E9\u5206\u7C7B"}),n.data.forEach(t=>{const f={btId:t.btId,btName:t.btName};h.push(f)})})},x=()=>{g(a).then(n=>{_.splice(0,_.length),n.data.forEach(t=>{_.push(t)})})},V=n=>{q.set("bid",n);const{href:t}=w.resolve({path:"/view",query:{bid:n}});window.open(t,"_blank")},E=()=>{const{href:n}=w.resolve({path:"/write/"});window.open(n,"_blank")},F=()=>{T()},D=n=>{G(n)};return v(),(n,t)=>{const f=u("el-input"),d=u("el-col"),N=u("el-option"),I=u("el-select"),k=u("el-form-item"),U=u("el-date-picker"),j=u("el-time-picker"),c=u("el-button"),z=u("el-form");return i(),r(y,null,[e(z,{model:s(a),"label-width":"120px"},{default:l(()=>[e(k,{label:"\u5173\u952E\u5B57\u641C\u7D22"},{default:l(()=>[e(d,{span:7},{default:l(()=>[e(f,{modelValue:s(a).key_word,"onUpdate:modelValue":t[0]||(t[0]=o=>s(a).key_word=o)},null,8,["modelValue"])]),_:1}),e(d,{span:1}),e(d,{span:10},{default:l(()=>[H,e(I,{modelValue:s(a).btId,"onUpdate:modelValue":t[1]||(t[1]=o=>s(a).btId=o),placeholder:"\u9009\u62E9\u5206\u7C7B"},{default:l(()=>[(i(!0),r(y,null,C(s(h),o=>(i(),$(N,{key:o.btId,label:o.btName,value:o.btId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(k,{label:"\u521B\u4F5C\u65F6\u95F4"},{default:l(()=>[e(d,{span:7},{default:l(()=>[e(U,{modelValue:s(a).start_day,"onUpdate:modelValue":t[2]||(t[2]=o=>s(a).start_day=o),type:"date",placeholder:"\u5F00\u59CB\u65F6\u95F4",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e(d,{span:2,class:"text-center"},{default:l(()=>[J]),_:1}),e(d,{span:7},{default:l(()=>[e(j,{modelValue:s(a).end_day,"onUpdate:modelValue":t[3]||(t[3]=o=>s(a).end_day=o),placeholder:"\u7ED3\u675F\u65F6\u95F4",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e(d,{span:6,style:{"text-align":"center"}},{default:l(()=>[e(c,{type:"primary",onClick:x},{default:l(()=>[K]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),e(c,{onClick:E},{default:l(()=>[M]),_:1}),e(c,{onClick:F},{default:l(()=>[O]),_:1}),(i(!0),r(y,null,C(s(_),o=>(i(),r("div",P,[p("h3",{style:{cursor:"pointer",width:"min-content","white-space":"nowrap"},onClick:L=>V(o.bid)},B(o.title),9,Q),p("div",R,[p("p",W,B(o.content),1),e(c,{size:"small",type:"success",onClick:L=>D(o.bid)},{default:l(()=>[X]),_:2},1032,["onClick"])])]))),256))],64)}}});export{oe as default}; import{d as S,D as b,r as u,o as i,c as r,a as e,u as s,g as l,F as y,j as C,h as w,k as $,e as p,t as B,f as m,E as q}from"./index.4a6e9266.js";import{g,a as A,p as T,b as G}from"./blogView.4b0b5f89.js";import"./index.220e6de4.js";const H=p("span",null,"\u5206\u7C7B\u641C\u7D22",-1),J=p("span",{class:"text-gray-500"},"-",-1),K=m("\u641C\u7D22"),M=m("\u521B\u4F5C"),O=m("\u5168\u90E8\u91CD\u65B0\u53D1\u5E03"),P={class:"blog_list"},Q=["onClick"],R={style:{display:"flex","justify-content":"space-between","align-items":"center"}},W={style:{"font-size":"12px",height:"16px","line-height":"16px",overflow:"hidden","text-overflow":"ellipsis"}},X=m("\u91CD\u65B0\u53D1\u5E03 "),oe=S({setup(Y){const a=b({key_word:"",btId:"",start_day:"",end_day:""}),_=b([]),h=b([]),v=()=>{g({}).then(n=>{n.data.forEach(t=>{_.push(t)})}),A().then(n=>{h.push({btId:"",btName:"\u9009\u62E9\u5206\u7C7B"}),n.data.forEach(t=>{const f={btId:t.btId,btName:t.btName};h.push(f)})})},x=()=>{g(a).then(n=>{_.splice(0,_.length),n.data.forEach(t=>{_.push(t)})})},V=n=>{q.set("bid",n);const{href:t}=w.resolve({path:"/view",query:{bid:n}});window.open(t,"_blank")},E=()=>{const{href:n}=w.resolve({path:"/write/"});window.open(n,"_blank")},F=()=>{T()},D=n=>{G(n)};return v(),(n,t)=>{const f=u("el-input"),d=u("el-col"),N=u("el-option"),I=u("el-select"),k=u("el-form-item"),U=u("el-date-picker"),j=u("el-time-picker"),c=u("el-button"),z=u("el-form");return i(),r(y,null,[e(z,{model:s(a),"label-width":"120px"},{default:l(()=>[e(k,{label:"\u5173\u952E\u5B57\u641C\u7D22"},{default:l(()=>[e(d,{span:7},{default:l(()=>[e(f,{modelValue:s(a).key_word,"onUpdate:modelValue":t[0]||(t[0]=o=>s(a).key_word=o)},null,8,["modelValue"])]),_:1}),e(d,{span:1}),e(d,{span:10},{default:l(()=>[H,e(I,{modelValue:s(a).btId,"onUpdate:modelValue":t[1]||(t[1]=o=>s(a).btId=o),placeholder:"\u9009\u62E9\u5206\u7C7B"},{default:l(()=>[(i(!0),r(y,null,C(s(h),o=>(i(),$(N,{key:o.btId,label:o.btName,value:o.btId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(k,{label:"\u521B\u4F5C\u65F6\u95F4"},{default:l(()=>[e(d,{span:7},{default:l(()=>[e(U,{modelValue:s(a).start_day,"onUpdate:modelValue":t[2]||(t[2]=o=>s(a).start_day=o),type:"date",placeholder:"\u5F00\u59CB\u65F6\u95F4",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e(d,{span:2,class:"text-center"},{default:l(()=>[J]),_:1}),e(d,{span:7},{default:l(()=>[e(j,{modelValue:s(a).end_day,"onUpdate:modelValue":t[3]||(t[3]=o=>s(a).end_day=o),placeholder:"\u7ED3\u675F\u65F6\u95F4",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e(d,{span:6,style:{"text-align":"center"}},{default:l(()=>[e(c,{type:"primary",onClick:x},{default:l(()=>[K]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),e(c,{onClick:E},{default:l(()=>[M]),_:1}),e(c,{onClick:F},{default:l(()=>[O]),_:1}),(i(!0),r(y,null,C(s(_),o=>(i(),r("div",P,[p("h3",{style:{cursor:"pointer",width:"min-content","white-space":"nowrap"},onClick:L=>V(o.bid)},B(o.title),9,Q),p("div",R,[p("p",W,B(o.content),1),e(c,{size:"small",type:"success",onClick:L=>D(o.bid)},{default:l(()=>[X]),_:2},1032,["onClick"])])]))),256))],64)}}});export{oe as default};
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -1 +1 @@
import{_ as e,o as c,c as o}from"./index.5d800fae.js";const r={},s={class:"dashboard"};function a(t,n){return c(),o("div",s,"\u4E2A\u4EBA\u4E91\u7F51\u76D8\uFF0C\u5178\u578B\u7684\u6743\u9650\uFF0C\u521D\u671F\u6253\u7B97\u53EA\u6709\u6700\u9AD8\u6743\u9650\u7684\u6211\u81EA\u5DF1\u4F7F\u7528")}var d=e(r,[["render",a]]);export{d as default}; import{_ as e,o as c,c as o}from"./index.4a6e9266.js";const r={},s={class:"dashboard"};function a(t,n){return c(),o("div",s,"\u4E2A\u4EBA\u4E91\u7F51\u76D8\uFF0C\u5178\u578B\u7684\u6743\u9650\uFF0C\u521D\u671F\u6253\u7B97\u53EA\u6709\u6700\u9AD8\u6743\u9650\u7684\u6211\u81EA\u5DF1\u4F7F\u7528")}var d=e(r,[["render",a]]);export{d as default};
@@ -1 +1 @@
import{_ as e,o as _,c as o}from"./index.5d800fae.js";const a={},c={class:"dashboard"};function r(s,t){return _(),o("div",c," \u521D\u671F\u8BBE\u60F3\uFF0C\u4F5C\u4E3A\u767B\u5F55\u7528\u6237\u7684\u529F\u80FD\u4E4B\u4E00\uFF0C\u53EF\u9009\u62E9\u5F0F\u7684\u6570\u636E\u62BD\u53D6 \u5305\u62EC\u7528\u6237\u76F8\u5173\u8D44\u6599\u7684\u5168\u90E8\u53D6\u56DE\u64CD\u4F5C\u3002 bookmark blog study cloud \u7B49\u7B49\u3002\u5E76\u6CA1\u6709\u6253\u7B97\u5728\u6BCF\u4E2A\u6A21\u5757\u4E0B\u63D0\u4F9B\u4E0B\u8F7D\u5DE5\u7A0B\uFF0C\u56E0\u4E3A\u6211\u8FD9\u4E2A\u4E0D\u662F\u9762\u5411\u4E1A\u52A1\u7684\u3002\u63D0\u4F9B\u4E0B\u8F7D\u5DE5\u7A0B\u65E0\u975E\u662F\u6015\u6570\u636E\u4E22\u5931\u800C\u5DF2\uFF0C\u4EC5\u9650\u4E8E\u6B64 ")}var d=e(a,[["render",r]]);export{d as default}; import{_ as e,o as _,c as o}from"./index.4a6e9266.js";const a={},c={class:"dashboard"};function r(s,t){return _(),o("div",c," \u521D\u671F\u8BBE\u60F3\uFF0C\u4F5C\u4E3A\u767B\u5F55\u7528\u6237\u7684\u529F\u80FD\u4E4B\u4E00\uFF0C\u53EF\u9009\u62E9\u5F0F\u7684\u6570\u636E\u62BD\u53D6 \u5305\u62EC\u7528\u6237\u76F8\u5173\u8D44\u6599\u7684\u5168\u90E8\u53D6\u56DE\u64CD\u4F5C\u3002 bookmark blog study cloud \u7B49\u7B49\u3002\u5E76\u6CA1\u6709\u6253\u7B97\u5728\u6BCF\u4E2A\u6A21\u5757\u4E0B\u63D0\u4F9B\u4E0B\u8F7D\u5DE5\u7A0B\uFF0C\u56E0\u4E3A\u6211\u8FD9\u4E2A\u4E0D\u662F\u9762\u5411\u4E1A\u52A1\u7684\u3002\u63D0\u4F9B\u4E0B\u8F7D\u5DE5\u7A0B\u65E0\u975E\u662F\u6015\u6570\u636E\u4E22\u5931\u800C\u5DF2\uFF0C\u4EC5\u9650\u4E8E\u6B64 ")}var d=e(a,[["render",r]]);export{d as default};
+1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
.el-button--text[data-v-0b345e82]{margin-right:15px}.el-select[data-v-0b345e82],.el-input[data-v-0b345e82]{width:300px}.dialog-footer button[data-v-0b345e82]:first-child{margin-right:10px}.el-button--text[data-v-58aa0600]{margin-right:15px}.el-select[data-v-58aa0600],.el-input[data-v-58aa0600]{width:300px}.dialog-footer button[data-v-58aa0600]:first-child{margin-right:10px}.dashboard{background-color:beige}.tag_list[data-v-e97fae76]{display:flex;border-top:1px solid rgba(151,151,151,.3);border-bottom:1px solid rgba(151,151,151,.3)}.click-icon[data-v-e97fae76]{width:40px;margin:10px;cursor:pointer}.create_dialog[data-v-e97fae76]{margin:10px}
@@ -1 +1 @@
import{_ as e,o as _,c as n}from"./index.5d800fae.js";const o={},t={class:"dialog-footer"};function a(c,r){return _(),n("span",t," \u5F53\u4F60\u770B\u5230\u4E86\uFF0C\u8FD9\u4E2A\u9875\u9762\uFF0C\u8FD9\u8868\u793A\u4E86\uFF0C\u4F60\u901A\u8FC7\u767E\u5EA6\u626B\u63CF\u767B\u9646\u4E86\u6211\u7684\u79D8\u5BC6\u57FA\u5730\uFF0C\u4F46\u662F\u5F88\u9057\u61BE\u7684\u544A\u8BC9\u4F60\uFF0C\u6211\u4EEC\u5C06\u4EE5\u975E\u6CD5\u767B\u5F55\u7684\u65B9\u5F0F\u5904\u7406\u4F60\u7684\u8BF7\u6C42\uFF0C88 ")}var d=e(o,[["render",a]]);export{d as default}; import{_ as e,o as _,c as n}from"./index.4a6e9266.js";const o={},t={class:"dialog-footer"};function a(c,r){return _(),n("span",t," \u5F53\u4F60\u770B\u5230\u4E86\uFF0C\u8FD9\u4E2A\u9875\u9762\uFF0C\u8FD9\u8868\u793A\u4E86\uFF0C\u4F60\u901A\u8FC7\u767E\u5EA6\u626B\u63CF\u767B\u9646\u4E86\u6211\u7684\u79D8\u5BC6\u57FA\u5730\uFF0C\u4F46\u662F\u5F88\u9057\u61BE\u7684\u544A\u8BC9\u4F60\uFF0C\u6211\u4EEC\u5C06\u4EE5\u975E\u6CD5\u767B\u5F55\u7684\u65B9\u5F0F\u5904\u7406\u4F60\u7684\u8BF7\u6C42\uFF0C88 ")}var d=e(o,[["render",a]]);export{d as default};
@@ -1 +1 @@
import{_ as e,o as _,c as a}from"./index.5d800fae.js";const c={},n={class:"dashboard"};function r(s,t){return _(),a("div",n,"\u611F\u609F\u8FD9\u4E2A\u4E1C\u897F\uFF0C\u6682\u65F6\u6CA1\u6709\u4EC0\u4E48\u592A\u591A\u60F3\u6CD5\uFF0C\u4EE5\u540E\u4F1A\u88AB\u5220\u6389\u628A")}var d=e(c,[["render",r]]);export{d as default}; import{_ as e,o as _,c as a}from"./index.4a6e9266.js";const c={},n={class:"dashboard"};function r(s,t){return _(),a("div",n,"\u611F\u609F\u8FD9\u4E2A\u4E1C\u897F\uFF0C\u6682\u65F6\u6CA1\u6709\u4EC0\u4E48\u592A\u591A\u60F3\u6CD5\uFF0C\u4EE5\u540E\u4F1A\u88AB\u5220\u6389\u628A")}var d=e(c,[["render",r]]);export{d as default};
Binary file not shown.
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
.el-button--text[data-v-0b345e82]{margin-right:15px}.el-select[data-v-0b345e82],.el-input[data-v-0b345e82]{width:300px}.dialog-footer button[data-v-0b345e82]:first-child{margin-right:10px}.dashboard{background-color:beige}.tag_list[data-v-636a90b3]{display:flex;border-top:1px solid rgba(151,151,151,.3);border-bottom:1px solid rgba(151,151,151,.3)}.click-icon[data-v-636a90b3]{width:40px;margin:10px;cursor:pointer}.create_dialog[data-v-636a90b3]{margin:10px}
Binary file not shown.
@@ -1 +1 @@
import{_ as x,r as t,o as r,c as m,a as e,d as D,b as C,e as _,f as l,t as b,u as p,w as A,v as w,g as u,F as k,h as E,l as $,i as V,j as H,k as M,n as I,p as N,m as L}from"./index.5d800fae.js";import{h as y}from"./moment.a9f98195.js";import{u as T}from"./tenant.8e26e394.js";const j={},z={class:"section-main",style:{height:"100%"}};function U(a,s){const n=t("router-view");return r(),m("section",z,[e(n)])}var q=x(j,[["render",U]]);const G={class:"nav-main"},J=_("span",null,"\u8BBA\u4E00\u4E2A\u7A0B\u5E8F\u5458\u7684\u5BC2\u5BDE\u4E0E\u5FE7\u4F24",-1),K=l("profile"),O=l("\u9000\u51FA"),P=_("span",null,"\u786E\u8BA4\u4F60\u7684\u767B\u51FA\u64CD\u4F5C\u4E48\uFF1F",-1),Q={class:"dialog-footer"},R=l("\u53D6\u6D88"),W=l("\u786E\u8BA4"),X=D({setup(a){const s=T();s.reflush();const n=C(!1);let c=C(y().format("YYYY\u5E74MM\u6708DD\u65E5 HH:mm:ss"));setInterval(()=>{c.value=y().format("YYYY\u5E74MM\u6708DD\u65E5 HH:mm:ss")},1e3);const F=()=>{E.push({path:"/login"})},d=()=>{n.value=!1,$(s.id).then(()=>{s.logout(),E.push({path:"/login"})})};return(f,o)=>{const v=t("el-avatar"),i=t("el-dropdown-item"),h=t("el-dropdown-menu"),S=t("el-dropdown"),g=t("el-button"),Y=t("el-dialog");return r(),m(k,null,[_("div",G,[l(" \u5F53\u524D\u65F6\u95F4\uFF1A"+b(p(c))+" ",1),J,A(e(S,{trigger:"click"},{dropdown:u(()=>[e(h,null,{default:u(()=>[e(i,null,{default:u(()=>[K]),_:1}),e(i,{onClick:o[0]||(o[0]=B=>n.value=!0)},{default:u(()=>[O]),_:1})]),_:1})]),default:u(()=>[e(v,{src:"https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"})]),_:1},512),[[w,p(s).account]]),A(_("span",{onClick:F},"\u767B\u5F55",512),[[w,!p(s).account]])]),e(Y,{modelValue:n.value,"onUpdate:modelValue":o[2]||(o[2]=B=>n.value=B),title:"\u63D0\u793A",width:"30%"},{footer:u(()=>[_("span",Q,[e(g,{onClick:o[1]||(o[1]=B=>n.value=!1)},{default:u(()=>[R]),_:1}),e(g,{type:"primary",onClick:d},{default:u(()=>[W]),_:1})])]),default:u(()=>[P]),_:1},8,["modelValue"])],64)}}});const Z=D({setup(a){let s=E.options.routes[0].children,n=C("");return V(()=>{n.value=window.innerHeight+"px"}),(c,F)=>{const d=t("el-menu-item"),f=t("el-menu");return r(),m("div",null,[e(f,{router:"",class:"side_Style",style:I({height:p(n)})},{default:u(()=>[(r(!0),m(k,null,H(p(s),(o,v)=>{var i;return r(),M(d,{key:v,index:o.path,title:(i=o.meta)==null?void 0:i.name},{default:u(()=>{var h;return[l(b((h=o.meta)==null?void 0:h.name),1)]}),_:2},1032,["index","title"])}),128))]),_:1},8,["style"])])}}});const ee=a=>(N("data-v-7c0e872a"),a=a(),L(),a),ue={class:"4444"},te=ee(()=>_("span",null,[l(" \u672C\u7F51\u7AD9\u4E0D\u6D89\u53CA\u8272\u60C5\uFF0C\u8D4C\u535A\uFF0C\u6BD2\u54C1\u548C\u653F\u6CBB\u5B97\u6559\u7B49\u5185\u5BB9\uFF0C\u6682\u65F6\u4E3A\u4E2A\u4EBA\u5B66\u4E60\u7528\u9014\u3002 \u8003\u8651\u5230\u6CD5\u5F8B\u98CE\u9669\uFF0C\u9488\u5BF9\u6709\u654F\u611F\u8BCD\u6C47\u8FD8\u8BBE\u6709\u8FC7\u6EE4\u529F\u80FD\uFF0C\u6240\u4EE5\u6682\u65F6\u4E0D\u5BF9\u5916\u63D0\u4F9B\u4E00\u5207\u529F\u80FD\u3002 "),_("br"),l(" \u518D\u6B21\u91CD\u7533\uFF0C\u672C\u7F51\u7AD9\u53EA\u4F5C\u4E3A\u5B66\u4E60\u7F51\u7AD9\u3002\u3002\u3002\u3002\u3002\u3002 ")],-1)),oe=D({setup(a){return(s,n)=>{const c=t("el-aside"),F=t("el-header"),d=t("el-main"),f=t("el-footer"),o=t("el-container");return r(),m("div",ue,[e(o,null,{default:u(()=>[e(c,{width:"150px"},{default:u(()=>[e(Z)]),_:1}),e(o,null,{default:u(()=>[e(F,{style:{"border-bottom-style":"solid","border-bottom-width":"0.5px","border-bottom-color":"rgba(151, 151, 151, 0.3)"}},{default:u(()=>[e(X)]),_:1}),e(d,null,{default:u(()=>[e(q)]),_:1}),e(f,null,{default:u(()=>[te]),_:1})]),_:1})]),_:1})])}}});var ae=x(oe,[["__scopeId","data-v-7c0e872a"]]);export{ae as default}; import{_ as x,r as t,o as r,c as m,a as e,d as D,b as C,e as _,f as l,t as b,u as p,w as A,v as w,g as u,F as k,h as E,l as $,i as V,j as H,k as M,n as I,p as N,m as L}from"./index.4a6e9266.js";import{h as y}from"./moment.a9f98195.js";import{u as T}from"./tenant.25fbfc82.js";const j={},z={class:"section-main",style:{height:"100%"}};function U(a,s){const n=t("router-view");return r(),m("section",z,[e(n)])}var q=x(j,[["render",U]]);const G={class:"nav-main"},J=_("span",null,"\u8BBA\u4E00\u4E2A\u7A0B\u5E8F\u5458\u7684\u5BC2\u5BDE\u4E0E\u5FE7\u4F24",-1),K=l("profile"),O=l("\u9000\u51FA"),P=_("span",null,"\u786E\u8BA4\u4F60\u7684\u767B\u51FA\u64CD\u4F5C\u4E48\uFF1F",-1),Q={class:"dialog-footer"},R=l("\u53D6\u6D88"),W=l("\u786E\u8BA4"),X=D({setup(a){const s=T();s.reflush();const n=C(!1);let c=C(y().format("YYYY\u5E74MM\u6708DD\u65E5 HH:mm:ss"));setInterval(()=>{c.value=y().format("YYYY\u5E74MM\u6708DD\u65E5 HH:mm:ss")},1e3);const F=()=>{E.push({path:"/login"})},d=()=>{n.value=!1,$(s.id).then(()=>{s.logout(),E.push({path:"/login"})})};return(f,o)=>{const v=t("el-avatar"),i=t("el-dropdown-item"),h=t("el-dropdown-menu"),S=t("el-dropdown"),g=t("el-button"),Y=t("el-dialog");return r(),m(k,null,[_("div",G,[l(" \u5F53\u524D\u65F6\u95F4\uFF1A"+b(p(c))+" ",1),J,A(e(S,{trigger:"click"},{dropdown:u(()=>[e(h,null,{default:u(()=>[e(i,null,{default:u(()=>[K]),_:1}),e(i,{onClick:o[0]||(o[0]=B=>n.value=!0)},{default:u(()=>[O]),_:1})]),_:1})]),default:u(()=>[e(v,{src:"https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"})]),_:1},512),[[w,p(s).account]]),A(_("span",{onClick:F},"\u767B\u5F55",512),[[w,!p(s).account]])]),e(Y,{modelValue:n.value,"onUpdate:modelValue":o[2]||(o[2]=B=>n.value=B),title:"\u63D0\u793A",width:"30%"},{footer:u(()=>[_("span",Q,[e(g,{onClick:o[1]||(o[1]=B=>n.value=!1)},{default:u(()=>[R]),_:1}),e(g,{type:"primary",onClick:d},{default:u(()=>[W]),_:1})])]),default:u(()=>[P]),_:1},8,["modelValue"])],64)}}});const Z=D({setup(a){let s=E.options.routes[0].children,n=C("");return V(()=>{n.value=window.innerHeight+"px"}),(c,F)=>{const d=t("el-menu-item"),f=t("el-menu");return r(),m("div",null,[e(f,{router:"",class:"side_Style",style:I({height:p(n)})},{default:u(()=>[(r(!0),m(k,null,H(p(s),(o,v)=>{var i;return r(),M(d,{key:v,index:o.path,title:(i=o.meta)==null?void 0:i.name},{default:u(()=>{var h;return[l(b((h=o.meta)==null?void 0:h.name),1)]}),_:2},1032,["index","title"])}),128))]),_:1},8,["style"])])}}});const ee=a=>(N("data-v-7c0e872a"),a=a(),L(),a),ue={class:"4444"},te=ee(()=>_("span",null,[l(" \u672C\u7F51\u7AD9\u4E0D\u6D89\u53CA\u8272\u60C5\uFF0C\u8D4C\u535A\uFF0C\u6BD2\u54C1\u548C\u653F\u6CBB\u5B97\u6559\u7B49\u5185\u5BB9\uFF0C\u6682\u65F6\u4E3A\u4E2A\u4EBA\u5B66\u4E60\u7528\u9014\u3002 \u8003\u8651\u5230\u6CD5\u5F8B\u98CE\u9669\uFF0C\u9488\u5BF9\u6709\u654F\u611F\u8BCD\u6C47\u8FD8\u8BBE\u6709\u8FC7\u6EE4\u529F\u80FD\uFF0C\u6240\u4EE5\u6682\u65F6\u4E0D\u5BF9\u5916\u63D0\u4F9B\u4E00\u5207\u529F\u80FD\u3002 "),_("br"),l(" \u518D\u6B21\u91CD\u7533\uFF0C\u672C\u7F51\u7AD9\u53EA\u4F5C\u4E3A\u5B66\u4E60\u7F51\u7AD9\u3002\u3002\u3002\u3002\u3002\u3002 ")],-1)),oe=D({setup(a){return(s,n)=>{const c=t("el-aside"),F=t("el-header"),d=t("el-main"),f=t("el-footer"),o=t("el-container");return r(),m("div",ue,[e(o,null,{default:u(()=>[e(c,{width:"150px"},{default:u(()=>[e(Z)]),_:1}),e(o,null,{default:u(()=>[e(F,{style:{"border-bottom-style":"solid","border-bottom-width":"0.5px","border-bottom-color":"rgba(151, 151, 151, 0.3)"}},{default:u(()=>[e(X)]),_:1}),e(d,null,{default:u(()=>[e(q)]),_:1}),e(f,null,{default:u(()=>[te]),_:1})]),_:1})]),_:1})])}}});var ae=x(oe,[["__scopeId","data-v-7c0e872a"]]);export{ae as default};
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{E as n}from"./style.a5339ceb.js";import{d as u,b as l,O as i,o as m,k as p,u as r,J as d}from"./index.5d800fae.js";import{c}from"./blogView.5a19e561.js";import"./index.36ff3ff6.js";const g=u({setup(f){let e=l("");const s=i().query;return(()=>{c(s.bid).then(t=>{e.value=t.data.content})})(),(t,o)=>(m(),p(r(n),{modelValue:r(e),"onUpdate:modelValue":o[0]||(o[0]=a=>d(e)?e.value=a:e=a),previewOnly:""},null,8,["modelValue"]))}});export{g as default}; import{E as n}from"./style.783c2b77.js";import{d as u,b as l,O as i,o as m,k as p,u as r,J as d}from"./index.4a6e9266.js";import{c}from"./blogView.4b0b5f89.js";import"./index.220e6de4.js";const g=u({setup(f){let e=l("");const s=i().query;return(()=>{c(s.bid).then(t=>{e.value=t.data.content})})(),(t,o)=>(m(),p(r(n),{modelValue:r(e),"onUpdate:modelValue":o[0]||(o[0]=a=>d(e)?e.value=a:e=a),previewOnly:""},null,8,["modelValue"]))}});export{g as default};
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
var d=Object.defineProperty,h=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var n=(e,a,t)=>a in e?d(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,o=(e,a)=>{for(var t in a||(a={}))k.call(a,t)&&n(e,t,a[t]);if(s)for(var t of s(a))f.call(a,t)&&n(e,t,a[t]);return e},c=(e,a)=>h(e,g(a));import{q as l,s as p,x as T,y as m,z as y,A as i,B as z}from"./index.5d800fae.js";const w=l({id:"tenant",state:()=>({account:"",token:"",id:""}),getters:{},actions:{logout(){this.$patch({account:"",token:"",id:""}),p()},async login(e,a){const t=await T({user_id:e,user_password:a});return t.data.token&&(this.$patch(c(o({account:e},t.data),{id:"true"})),m(t.data.token),y(t),console.log("authorize success!")),new Promise((r,u)=>{t.data.message?u(t.data.message):r(t.data)})},async reflush(){if(i()){const e=JSON.parse(z()),a=i();this.$patch({account:e.account,token:a,id:e.id})}}}});export{w as u}; var d=Object.defineProperty,h=Object.defineProperties;var g=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var n=(e,a,t)=>a in e?d(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,o=(e,a)=>{for(var t in a||(a={}))k.call(a,t)&&n(e,t,a[t]);if(s)for(var t of s(a))f.call(a,t)&&n(e,t,a[t]);return e},c=(e,a)=>h(e,g(a));import{q as l,s as p,x as T,y as m,z as y,A as i,B as z}from"./index.4a6e9266.js";const w=l({id:"tenant",state:()=>({account:"",token:"",id:""}),getters:{},actions:{logout(){this.$patch({account:"",token:"",id:""}),p()},async login(e,a){const t=await T({user_id:e,user_password:a});return t.data.token&&(this.$patch(c(o({account:e},t.data),{id:"true"})),m(t.data.token),y(t),console.log("authorize success!")),new Promise((r,u)=>{t.data.message?u(t.data.message):r(t.data)})},async reflush(){if(i()){const e=JSON.parse(z()),a=i();this.$patch({account:e.account,token:a,id:e.id})}}}});export{w as u};
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -6,7 +6,7 @@
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>violin-home-manage</title> <title>violin-home-manage</title>
<script type="module" crossorigin src="/assets/index.5d800fae.js"></script> <script type="module" crossorigin src="/assets/index.4a6e9266.js"></script>
<link rel="stylesheet" href="/assets/index.c85c68cc.css"> <link rel="stylesheet" href="/assets/index.c85c68cc.css">
</head> </head>
+18 -6
View File
@@ -1,9 +1,15 @@
import request from '../utils/request' import request from '../utils/request'
import Qs from 'qs' import Qs from 'qs'
/**
*
* @param params
* @returns
*/
const search_bookmark = (params: Object) => { const search_bookmark = (params: Object) => {
return request({ return request({
url: '/auth/api/v1/bookmark', url: '/auth/api/v1/bookmark',
method: 'get', method: 'GET',
params: params, params: params,
paramsSerializer: (params) => { paramsSerializer: (params) => {
return Qs.stringify(params, { arrayFormat: 'repeat' }) return Qs.stringify(params, { arrayFormat: 'repeat' })
@@ -14,7 +20,7 @@ const search_bookmark = (params: Object) => {
const put_bookmark = (params: Object) => { const put_bookmark = (params: Object) => {
return request({ return request({
url: '/auth/api/v1/bookmark/insert', url: '/auth/api/v1/bookmark/insert',
method: 'put', method: 'PUT',
data: params data: params
}) })
} }
@@ -22,7 +28,7 @@ const put_bookmark = (params: Object) => {
const update_bookmark = (params: Object) => { const update_bookmark = (params: Object) => {
return request({ return request({
url: '/auth/api/v1/bookmark/update', url: '/auth/api/v1/bookmark/update',
method: 'post', method: 'POST',
data: params data: params
}) })
} }
@@ -30,17 +36,23 @@ const update_bookmark = (params: Object) => {
const delete_bookmark = (query: number) => { const delete_bookmark = (query: number) => {
return request({ return request({
url: '/auth/api/v1/bookmark/delete/' + query, url: '/auth/api/v1/bookmark/delete/' + query,
method: 'delete', method: 'DELETE',
}) })
} }
const delete_bookmarks = (params: Object) => { const delete_bookmarks = (params: Object) => {
return request({ return request({
url: '/auth/api/v1/bookmark', url: '/auth/api/v1/bookmark',
method: 'delete', method: 'DELETE',
headers: {}, headers: {},
data: params data: params
}) })
} }
export { search_bookmark, put_bookmark, delete_bookmark, delete_bookmarks, update_bookmark } export {
search_bookmark,
put_bookmark,
delete_bookmark,
delete_bookmarks,
update_bookmark
}
+39
View File
@@ -0,0 +1,39 @@
import request from '../utils/request'
const put_bookmark_type = (params: Object) => {
return request({
url: '/auth/api/v1/bookmark_type/insert',
method: 'PUT',
data: params
})
}
const get_bookmark_type = () => {
return request({
url: '/auth/api/v1/bookmark_type',
method: 'GET',
data: {}
})
}
const delete_bookmark_type = (type_id: string) => {
return request({
url: '/auth/api/v1/bookmark_type/' + type_id,
method: 'DELETE'
})
}
const post_bookmark_type = (params: Object) => {
return request({
url: '/auth/api/v1/bookmark_type',
method: 'POST',
data: params
})
}
export {
put_bookmark_type,
get_bookmark_type,
delete_bookmark_type,
post_bookmark_type
}
-9
View File
@@ -1,10 +1 @@
import request from '../utils/request'
const bookmark_type = () => {
return request({
url: '/auth/api/v1/master/bookmark/type',
method: 'get',
data: {}
})
}
export { bookmark_type }
+17 -16
View File
@@ -39,7 +39,8 @@
</div> </div>
<div class="c_section"> <div class="c_section">
<div class="title_style"> <div class="title_style">
<el-input v-model="((blogTypes.get(checkedBlogIndex) as BlogType).blogs.get(checkedIndex) as Blog).title"> <el-input v-model="((blogTypes.get(checkedBlogIndex) as BlogType).blogs.get(checkedIndex) as Blog).title"
@keyup.enter.native="saveTitle" @blur="saveTitle">
</el-input> </el-input>
<div style="width: 60px;"> <div style="width: 60px;">
<span v-if="!updated">已保存</span> <span v-if="!updated">已保存</span>
@@ -98,9 +99,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, reactive, ref, watch } from 'vue' import { onMounted, reactive, ref, watch } from 'vue'
import $moment from "moment"; import $moment from "moment"
import MdEditor from 'md-editor-v3' import MdEditor from 'md-editor-v3'
import { Edit } from "@element-plus/icons-vue"; import { Edit } from "@element-plus/icons-vue"
import 'md-editor-v3/lib/style.css' import 'md-editor-v3/lib/style.css'
import { updateBtName, updateContent, listAll, putBlogType, removeBlogType, getContent, putBlog, deleteContent } from '../../api/blog' import { updateBtName, updateContent, listAll, putBlogType, removeBlogType, getContent, putBlog, deleteContent } from '../../api/blog'
@@ -177,8 +178,6 @@ const getTestData = async () => {
startTime = current // 更新开始时间为当前 09:00:00 09:00:00.500 startTime = current // 更新开始时间为当前 09:00:00 09:00:00.500
setTimeout(() => { setTimeout(() => {
if ($moment(current).diff($moment(tmp), 'seconds') >= 1) { if ($moment(current).diff($moment(tmp), 'seconds') >= 1) {
console.log(current)
console.log(startTime)
saveContent() saveContent()
} }
}, 1000) }, 1000)
@@ -188,17 +187,17 @@ const getTestData = async () => {
/** /**
* BlogTypeを選べる * BlogTypeを選べる
* @param key * @param key
*/ */
const onclickTypeTab = (key: string) => { const onclickTypeTab = (key: string) => {
const bid = <string>blogTypes.get(key)?.blogs.values().next().value.bid const bid = blogTypes.get(key)?.blogs.values().next().value.bid
getContent(bid).then(response => { getContent(bid).then(response => {
((blogTypes.get(key) as BlogType).blogs.get(bid) as Blog).content = response.data.content ((blogTypes.get(key) as BlogType).blogs.get(bid) as Blog).content = response.data.content
checkedBlogIndex.value = key checkedBlogIndex.value = key
checkedIndex.value = bid checkedIndex.value = bid
}) })
} }
const onclickBlogTab = (key: string) => { const onclickBlogTab = (key: string) => {
checkedIndex.value = key checkedIndex.value = key
getContent(key).then(response => { getContent(key).then(response => {
@@ -206,6 +205,7 @@ const onclickBlogTab = (key: string) => {
}) })
} }
const handleEditBtName = (bt: BlogType) => { const handleEditBtName = (bt: BlogType) => {
dialogVisible.value = true dialogVisible.value = true
} }
@@ -225,10 +225,11 @@ const saveContent = () => {
updateContent(query).then(response => { updateContent(query).then(response => {
if (response.status == 200) { if (response.status == 200) {
updated.value = false updated.value = false
// blogTypes.get(checkedBlogIndex.value)?.blogs.get(checkedIndex.value)?.content = // blogTypes.get(checkedBlogIndex.value)?.blogs.get(checkedIndex.value)?.content =
} }
}) })
} }
/** /**
* Blogタイプ名称修正 * Blogタイプ名称修正
*/ */
@@ -242,6 +243,7 @@ const saveType = () => {
}) })
} }
/** /**
* Blogタイトル修正 * Blogタイトル修正
*/ */
@@ -258,6 +260,7 @@ const saveTitle = () => {
updated.value = false updated.value = false
}) })
} }
/** /**
* ブログ新規作成 * ブログ新規作成
*/ */
@@ -282,8 +285,9 @@ const insertBlog = () => {
isclicked.value = false isclicked.value = false
}) })
} }
/** /**
* ブログ削除 * ブログ削除
*/ */
const deleteBlog = () => { const deleteBlog = () => {
if (btName.value == "删除") { if (btName.value == "删除") {
@@ -297,7 +301,6 @@ const deleteBlog = () => {
}) })
btName.value = "" btName.value = ""
} }
} }
// Blogタイプ新規作成用、作成後、リセットする // Blogタイプ新規作成用、作成後、リセットする
@@ -351,8 +354,6 @@ const deleteBlogType = () => {
} else { } else {
} }
} }
// Created 段階の関数呼び出す処理 // Created 段階の関数呼び出す処理
@@ -361,7 +362,7 @@ getTestData()
// サイズ調整部分 // サイズ調整部分
type WholeStyle = { type WholeStyle = {
width: string width: string,
height: string height: string
} }
let innerHeight = ref("") let innerHeight = ref("")
@@ -377,9 +378,9 @@ const cWholeStyle = reactive<WholeStyle>({} as WholeStyle)
let contentWidth = 0.67 * window.innerWidth let contentWidth = 0.67 * window.innerWidth
cWholeStyle.width = contentWidth + 'px' cWholeStyle.width = contentWidth + 'px'
innerHeight.value = (window.innerHeight - 50) + 'px' innerHeight.value = (window.innerHeight - 50) + 'px'
onMounted(() => { // onMounted(() => {
}) // })
</script> </script>
<style scoped> <style scoped>
+90 -24
View File
@@ -1,14 +1,30 @@
<template> <template>
<div class="dashboard"> <div class="dashboard">
<el-table ref="multipleTableRef" :data="tableData" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="index" label="index" width="80" />
<el-table-column prop="bk_type_name" label="分类名" width="100" />
<el-table-column type="selection" width="55" />
<el-table-column label="修改">
<template #default="scope">
<el-button class="click-icon" size="small" @click="handleEditType(scope.$index, scope.row)">编辑
</el-button>
</template>
</el-table-column>
<el-table-column class="click-icon" prop="删除" label="url">
<template #default="scope">
<el-button size="small" type="danger" @click="handleDeleteType(scope.$index, scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-form :model="dialog_form"> <el-form :model="dialog_form">
<el-form-item label="分类" :label-width="formLabelWidth"> <el-form-item label="分类" :label-width="formLabelWidth">
<el-select v-model="dialog_form.bk_type_id" placeholder> <el-select v-model="dialog_form.bk_type_id" placeholder>
<el-option <el-option v-for="(item) in types" :key="item.bk_type_id" :value="item.bk_type_id"
v-for="(item) in types" :label="item.bk_type_name" />
:key="item.bk_type_id"
:value="item.bk_type_id"
:label="item.bk_type_name"
/>
</el-select> </el-select>
<el-form-item label="备注" :label-width="formLabelWidth"> <el-form-item label="备注" :label-width="formLabelWidth">
<el-input v-model="dialog_form.comment" autocomplete="off" /> <el-input v-model="dialog_form.comment" autocomplete="off" />
@@ -24,15 +40,75 @@
<el-button type="primary" @click="submit">提交</el-button> <el-button type="primary" @click="submit">提交</el-button>
</span> </span>
<!-- </template> --> <!-- </template> -->
<el-dialog v-model="deleteDialogVisible">
<delete_dialog :delete_id="currentDialogData.bookmark_type_id" @on-submit="doDeleteType"></delete_dialog>
</el-dialog>
<el-dialog v-model="deleteDialogVisible">
<delete_dialog :delete_id="currentDialogData.bookmark_type_id" @on-submit="doEditType"></delete_dialog>
</el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive } from 'vue'; import { reactive, ref } from 'vue';
import { update_bookmark, put_bookmark } from '../../api/bookmark' import { delete_bookmark_type, post_bookmark_type, get_bookmark_type } from '../../api/bookmark_type'
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
const formLabelWidth = '140px' const formLabelWidth = '140px'
// 定义书签格式
type BookmarkType = {
bookmark_type_id: string,
bookmark_type_name: string,
visiable: boolean,
}
const tableData = reactive<BookmarkType[]>([])
const currentDialogData = reactive<BookmarkType>({
bookmark_type_id: '',
bookmark_type_name: '',
visiable: false,
})
const deleteDialogVisible = ref<Boolean>(false)
const editDialogVisible = ref<Boolean>(false)
const handleDeleteType = (index: number, bookmarkType: BookmarkType) => {
Object.assign(currentDialogData, bookmarkType)
deleteDialogVisible.value = true
}
const handleEditType = (index: number, bookmarkType: BookmarkType) => {
Object.assign(currentDialogData, bookmarkType)
editDialogVisible.value = true
}
const handleSelectionChange = () => {
}
const doDeleteType = () => {
delete_bookmark_type(currentDialogData.bookmark_type_id).then(response => {
deleteDialogVisible.value = false
doSearchType()
})
}
const doEditType = () => {
post_bookmark_type(currentDialogData.bookmark_type_id).then(response => {
deleteDialogVisible.value = false
doSearchType()
})
}
const doSearchType = () => {
get_bookmark_type().then(response => {
deleteDialogVisible.value = false
})
}
type Props = { type Props = {
types: any[], types: any[],
dialog_form: any, dialog_form: any,
@@ -51,33 +127,23 @@ const submit = () => {
comment: props.dialog_form.comment, comment: props.dialog_form.comment,
url: props.dialog_form.url, url: props.dialog_form.url,
} }
if (props.operate_code == '0') {
put_bookmark(params).then(response => {
emit('on-submit')
})
} else if (props.operate_code == '1') {
update_bookmark(params).then(response => {
emit('on-submit')
})
} else if (props.operate_code == '2') {
update_bookmark(params).then(response => {
emit('on-submit')
})
}
} }
doSearchType()
</script> </script>
<style scoped>.el-button--text { <style scoped>
.el-button--text {
margin-right: 15px; margin-right: 15px;
} }
.el-select { .el-select {
width: 300px; width: 300px;
} }
.el-input { .el-input {
width: 300px; width: 300px;
} }
.dialog-footer button:first-child { .dialog-footer button:first-child {
margin-right: 10px; margin-right: 10px;
} }
+49
View File
@@ -0,0 +1,49 @@
<template>
<div class="dashboard">
<el-input v-model="bookmark_type_name" placeholder="Please input" />
<!-- <template #footer> -->
<span class="dialog-footer">
<el-button type="primary" @click="submit">提交</el-button>
</span>
<!-- </template> -->
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { put_bookmark_type } from '../../api/bookmark_type'
const bookmark_type_name = ref<String>('')
const emit = defineEmits(['on-update'])
const submit = () => {
const params = {
bookmark_type_name: bookmark_type_name.value
}
put_bookmark_type(params).then(response => {
emit('on-update')
bookmark_type_name.value = ''
})
}
</script>
<style scoped>
.el-button--text {
margin-right: 15px;
}
.el-select {
width: 300px;
}
.el-input {
width: 300px;
}
.dialog-footer button:first-child {
margin-right: 10px;
}
</style>
+45 -23
View File
@@ -14,6 +14,7 @@
<div class="tag_list"> <div class="tag_list">
<el-tag class="ml-2 click-icon" :type="item.clicked ? 'danger' : 'info'" v-for="(item) in bookmark_types" <el-tag class="ml-2 click-icon" :type="item.clicked ? 'danger' : 'info'" v-for="(item) in bookmark_types"
@click="handleTags(item)">{{ item.bk_type_name }}</el-tag> @click="handleTags(item)">{{ item.bk_type_name }}</el-tag>
<el-button type="primary" @click="handleAddType" v-show="Tenant.account">增加</el-button>
<el-button type="primary" @click="handleManageType" v-show="Tenant.account">自定义</el-button> <el-button type="primary" @click="handleManageType" v-show="Tenant.account">自定义</el-button>
</div> </div>
</el-form> </el-form>
@@ -60,7 +61,11 @@
<delete_dialog :delete_id="currentDialogData.bk_id" @on-submit="doDelete"></delete_dialog> <delete_dialog :delete_id="currentDialogData.bk_id" @on-submit="doDelete"></delete_dialog>
</el-dialog> </el-dialog>
<!-- <el-dialog v-model="TypeDialogVisible"> <el-dialog v-model="createTypeDialogVisible">
<createType_dialog @on-update="doUpdate"></createType_dialog>
</el-dialog>
<!-- <el-dialog v-model="typeDialogVisible">
<bookmarkType_dialog :delete_id="currentDialogData.bk_id" @on-submit="doDelete"></bookmarkType_dialog> <bookmarkType_dialog :delete_id="currentDialogData.bk_id" @on-submit="doDelete"></bookmarkType_dialog>
</el-dialog> --> </el-dialog> -->
</div> </div>
@@ -69,9 +74,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { search_bookmark, delete_bookmark } from '../../api/bookmark' import { search_bookmark, delete_bookmark } from '../../api/bookmark'
import { bookmark_type } from '../../api/master' import { get_bookmark_type } from '../../api/bookmark_type'
import bookmark_dialog from './dialog.vue' import bookmark_dialog from './dialog.vue'
import bookmarkType_dialog from './Typedialog.vue' import bookmarkType_dialog from './Typedialog.vue'
import createType_dialog from './createTypedialog.vue'
import delete_dialog from '../../components/operate/deleteDialog.vue' import delete_dialog from '../../components/operate/deleteDialog.vue'
import type { ElTable } from 'element-plus' import type { ElTable } from 'element-plus'
import { CopyDocument } from "@element-plus/icons-vue"; import { CopyDocument } from "@element-plus/icons-vue";
@@ -82,19 +88,6 @@ import { useTenantStore } from '../../store/tenant'
// obtain user infomation // obtain user infomation
const Tenant = useTenantStore() const Tenant = useTenantStore()
const bookmark_types = reactive<any[]>([])
bookmark_type().then(response => {
response.data.forEach((element: String) => {
const item = element.split("|")
const row = {
bk_type_id: Number(item[0]),
bk_type_name: item[1],
clicked: false
}
bookmark_types.push(row)
})
})
// 定义书签格式 // 定义书签格式
type Bookmark = { type Bookmark = {
bk_id: string, bk_id: string,
@@ -140,16 +133,45 @@ const toggleSelection = (rows?: Bookmark[]) => {
} }
} }
const handleManageType = () => {
}
// dialog表示flag // dialog表示flag
let dialogFormVisible = ref(false) let dialogFormVisible = ref(false)
let dialogVisible = ref(false) let dialogVisible = ref(false)
let TypeDialogVisible = ref(false) let typeDialogVisible = ref(false)
let createTypeDialogVisible = ref(false)
/* click 自定义 */
const handleManageType = () => {
typeDialogVisible.value = true
}
/* click 增加 */
const handleAddType = () => {
createTypeDialogVisible.value = true
}
/* callback after we add bookmark_type */
const doUpdate = () => {
createTypeDialogVisible.value = false
doSearch()
dearchBookmarkType()
}
const bookmark_types = reactive<any[]>([])
const dearchBookmarkType = () => {
get_bookmark_type().then(response => {
bookmark_types.splice(0, bookmark_types.length)
response.data.forEach((element: String) => {
const item = element.split("|")
const row = {
bk_type_id: Number(item[0]),
bk_type_name: item[1],
clicked: false
}
bookmark_types.push(row)
})
})
}
// 操作-》添加 // 操作-》添加
const handleInsert = () => { const handleInsert = () => {
@@ -223,7 +245,6 @@ const doDelete = (delete_id: any) => {
dialogVisible.value = false dialogVisible.value = false
doSearch() doSearch()
}) })
} }
const closeDialog = () => { const closeDialog = () => {
@@ -242,6 +263,7 @@ const copyNumber = (record: Bookmark) => {
}) })
} }
doSearch() doSearch()
dearchBookmarkType()
</script> </script>
<style scoped> <style scoped>