整理

上级 d966794a
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-container[data-v-1eaf2085]{height:60px;border-bottom:1px solid #eaeaea}.layout-header-left-img[data-v-1eaf2085]{height:50px}.layout-aside-container[data-v-71932282]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-71932282]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-15b8f4b2]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-15b8f4b2]{color:#333}.pagination[data-v-15b8f4b2]{margin-top:16px;text-align:right}.arrow-button[data-v-15b8f4b2]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-15b8f4b2]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-15b8f4b2]{pointer-events:none;opacity:.1}.el-header[data-v-117cdd0e]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-117cdd0e]{color:#333}.pagination[data-v-117cdd0e]{margin-top:16px;text-align:right}.header-button-item[data-v-117cdd0e]{margin-right:15px;font-size:20px}.backtop[data-v-117cdd0e]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-117cdd0e]:hover{background-color:#0050a0}.el-header[data-v-e4f703a0]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-e4f703a0]{color:#333}.pagination[data-v-e4f703a0]{margin-top:16px;text-align:right}.header-button-item[data-v-e4f703a0]{margin-right:15px;font-size:20px}.red-title[data-v-e4f703a0]{line-height:24px;font-size:18px;color:red}.backtop[data-v-e4f703a0]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-e4f703a0]{width:100%;text-align:left}.backtop[data-v-e4f703a0]:hover{background-color:#0050a0}.el-header[data-v-047b0f9a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-047b0f9a]{color:#333}.pagination[data-v-047b0f9a]{margin-top:16px;text-align:right}.header-button-item[data-v-047b0f9a]{margin-right:15px;font-size:20px}.red-title[data-v-047b0f9a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-047b0f9a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-047b0f9a]{width:100%;text-align:left}.backtop[data-v-047b0f9a]:hover{background-color:#0050a0}.el-header[data-v-b9c27f4a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-b9c27f4a]{color:#333}.pagination[data-v-b9c27f4a]{margin-top:16px;text-align:right}.header-button-item[data-v-b9c27f4a]{margin-right:15px;font-size:20px}.red-title[data-v-b9c27f4a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-b9c27f4a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-b9c27f4a]{width:100%;text-align:left}.backtop[data-v-b9c27f4a]:hover{background-color:#0050a0}.el-header[data-v-685ce184]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-685ce184]{color:#333}.pagination[data-v-685ce184]{margin-top:16px;text-align:right}.header-button-item[data-v-685ce184]{margin-right:15px;font-size:20px}.red-title[data-v-685ce184]{line-height:24px;font-size:18px;color:red}.backtop[data-v-685ce184]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-685ce184]{width:100%;text-align:left}.backtop[data-v-685ce184]:hover{background-color:#0050a0}.el-header[data-v-2dbbf5e8]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-2dbbf5e8]{color:#333}.pagination[data-v-2dbbf5e8]{margin-top:16px;text-align:right}.header-button-item[data-v-2dbbf5e8]{margin-right:15px;font-size:20px}.red-title[data-v-2dbbf5e8]{line-height:24px;font-size:18px;color:red}.backtop[data-v-2dbbf5e8]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-2dbbf5e8]{width:100%;text-align:left}.backtop[data-v-2dbbf5e8]:hover{background-color:#0050a0}.button-container[data-v-9d5d30a4]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-ddc6c3e0]{display:flex;justify-content:center;align-items:center;height:30vh}
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-container[data-v-1eaf2085]{height:60px;border-bottom:1px solid #eaeaea}.layout-header-left-img[data-v-1eaf2085]{height:50px}.layout-aside-container[data-v-71932282]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-71932282]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-15b8f4b2]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-15b8f4b2]{color:#333}.pagination[data-v-15b8f4b2]{margin-top:16px;text-align:right}.arrow-button[data-v-15b8f4b2]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-15b8f4b2]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-15b8f4b2]{pointer-events:none;opacity:.1}.el-header[data-v-06991ced]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-06991ced]{color:#333}.pagination[data-v-06991ced]{margin-top:16px;text-align:right}.header-button-item[data-v-06991ced]{margin-right:15px;font-size:20px}.backtop[data-v-06991ced]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-06991ced]:hover{background-color:#0050a0}.el-header[data-v-c5d18cf4]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-c5d18cf4]{color:#333}.pagination[data-v-c5d18cf4]{margin-top:16px;text-align:right}.header-button-item[data-v-c5d18cf4]{margin-right:15px;font-size:20px}.red-title[data-v-c5d18cf4]{line-height:24px;font-size:18px;color:red}.backtop[data-v-c5d18cf4]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-c5d18cf4]{width:100%;text-align:left}.backtop[data-v-c5d18cf4]:hover{background-color:#0050a0}.el-header[data-v-3f842b70]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-3f842b70]{color:#333}.pagination[data-v-3f842b70]{margin-top:16px;text-align:right}.header-button-item[data-v-3f842b70]{margin-right:15px;font-size:20px}.red-title[data-v-3f842b70]{line-height:24px;font-size:18px;color:red}.backtop[data-v-3f842b70]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-3f842b70]{width:100%;text-align:left}.backtop[data-v-3f842b70]:hover{background-color:#0050a0}.el-header[data-v-6bb76c1c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-6bb76c1c]{color:#333}.pagination[data-v-6bb76c1c]{margin-top:16px;text-align:right}.header-button-item[data-v-6bb76c1c]{margin-right:15px;font-size:20px}.red-title[data-v-6bb76c1c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-6bb76c1c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-6bb76c1c]{width:100%;text-align:left}.backtop[data-v-6bb76c1c]:hover{background-color:#0050a0}.el-header[data-v-d1510630]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-d1510630]{color:#333}.pagination[data-v-d1510630]{margin-top:16px;text-align:right}.header-button-item[data-v-d1510630]{margin-right:15px;font-size:20px}.red-title[data-v-d1510630]{line-height:24px;font-size:18px;color:red}.backtop[data-v-d1510630]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-d1510630]{width:100%;text-align:left}.backtop[data-v-d1510630]:hover{background-color:#0050a0}.el-header[data-v-77361692]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-77361692]{color:#333}.pagination[data-v-77361692]{margin-top:16px;text-align:right}.header-button-item[data-v-77361692]{margin-right:15px;font-size:20px}.red-title[data-v-77361692]{line-height:24px;font-size:18px;color:red}.backtop[data-v-77361692]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-77361692]{width:100%;text-align:left}.backtop[data-v-77361692]:hover{background-color:#0050a0}.button-container[data-v-9d5d30a4]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-ddc6c3e0]{display:flex;justify-content:center;align-items:center;height:30vh}
/*!
* Bootstrap v4.5.0 (https://getbootstrap.com/)
......
<!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="/kwan.png"><title>kwan</title><link href="/css/app.2057b031.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.bedb4db6.js" rel="preload" as="script"><link href="/js/chunk-vendors.8385d186.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.2057b031.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.8385d186.js"></script><script src="/js/app.bedb4db6.js"></script></body></html>
\ No newline at end of file
<!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="/kwan.png"><title>kwan</title><link href="/css/app.ac53a82d.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.f519624b.js" rel="preload" as="script"><link href="/js/chunk-vendors.8385d186.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.ac53a82d.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.8385d186.js"></script><script src="/js/app.f519624b.js"></script></body></html>
\ No newline at end of file
(function(e){function t(t){for(var o,i,l=t[0],s=t[1],c=t[2],m=0,d=[];m<l.length;m++)i=l[m],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&d.push(a[i][0]),a[i]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);u&&u(t);while(d.length)d.shift()();return n.push.apply(n,c||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],o=!0,l=1;l<r.length;l++){var s=r[l];0!==a[s]&&(o=!1)}o&&(n.splice(t--,1),e=i(i.s=r[0]))}return e}var o={},a={app:0},n=[];function i(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=o,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(r,o,function(t){return e[t]}.bind(null,o));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var u=s;n.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},"0157":function(e,t,r){"use strict";r("808c")},"022e":function(e,t,r){"use strict";r("12df")},"0ecc":function(e,t,r){"use strict";r("7a1a")},"0f43":function(e,t,r){},"12df":function(e,t,r){},"12ff":function(e,t,r){"use strict";r("2597")},"155e":function(e,t,r){},"16b4":function(e,t,r){},"22e8":function(e,t,r){},2597:function(e,t,r){},3871:function(e,t,r){"use strict";r("22e8")},"38b7":function(e,t,r){},4461:function(e,t,r){"use strict";r("0f43")},"4b4f":function(e,t,r){"use strict";r("895b")},5060:function(e,t,r){"use strict";r("7f28")},"556f":function(e,t,r){"use strict";r("ba4e")},"56d7":function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d"),r("4de4");var o=r("2b0e"),a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("router-view")},n=[],i={name:"MyApp"},l=i,s=r("2877"),c=Object(s["a"])(l,a,n,!1,null,"633dd7d9",null),u=c.exports,m=r("8c4f"),d=["/home","/home/pic"],f=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-container"},[r("div",{staticClass:"login-box"},[e._m(0),r("div",{staticClass:"form-login p-4"},[r("div",{staticClass:"form-group form-inline"},[r("label",{attrs:{for:"username"}},[e._v("登录名称")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.username,expression:"username",modifiers:{trim:!0}}],staticClass:"form-control ml-2",attrs:{type:"text",id:"username",placeholder:"请输入登录名称",autocomplete:"off"},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})]),r("div",{staticClass:"form-group form-inline"},[r("label",{attrs:{for:"password"}},[e._v("登录密码")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.password,expression:"password",modifiers:{trim:!0}}],staticClass:"form-control ml-2",attrs:{type:"password",id:"password",placeholder:"请输入登录密码"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})]),r("div",{staticClass:"form-group form-inline d-flex justify-content-end"},[r("button",{staticClass:"btn btn-secondary mr-2",attrs:{type:"button"},on:{click:e.reset}},[e._v("重置")]),r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.login}},[e._v("登录")])])])])])},p=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"text-center avatar-box"},[o("img",{staticClass:"img-thumbnail avatar",attrs:{src:r("7678"),alt:"kwan的解忧杂货铺"}})])}],g={name:"MyLogin",data:function(){return{username:"",password:""}},methods:{reset:function(){this.username="",this.password=""},login:function(){"admin"===this.username&&"666666"===this.password?(localStorage.setItem("token","Bearer xxxx"),this.$router.push("/home")):localStorage.removeItem("token")}}},h=g,b=(r("12ff"),Object(s["a"])(h,f,p,!1,null,"1be4e8ce",null)),y=b.exports,v=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-container",[r("el-header",[r("MyHeader")],1),r("el-container",[r("el-aside",{staticStyle:{overflow:"hidden","padding-top":"24px"},attrs:{width:"200px"}},[r("MyAside")],1),r("el-main",{staticStyle:{padding:"0"}},[r("router-view")],1)],1)],1)},w=[],k=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"layout-header-container d-flex justify-content-between align-items-center p-3"},[e._m(0),r("h2",{staticClass:"layout-header-left-title ml-3",style:{color:e.textColor}},[e._v(e._s(e.randomAlgorithmic.poetryText))]),r("el-row",[r("el-col",{attrs:{inline:!0,span:24}},[r("el-button",{staticClass:"el-button-header",attrs:{type:"success",round:""},on:{click:e.myHome}},[e._v("我的主页")]),r("el-button",{staticClass:"el-button-header",attrs:{type:"primary",round:""},on:{click:e.logout}},[e._v("退出登录")])],1)],1)],1)},_=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"layout-header-left d-flex align-items-center user-select-none"},[o("img",{staticClass:"layout-header-left-img",attrs:{src:r("7678"),alt:""}}),o("h4",{staticClass:"layout-header-left-title ml-3"},[e._v("kwan的解忧杂货铺")])])}],x=r("1da1"),C=(r("96cf"),r("cee4")),I={name:"MyHeader",data:function(){return{randomAlgorithmic:{poetryText:""},color:["red","blue","green","yellow","purple","orange","pink","brown","cyan","magenta","maroon","navy","olive","teal","lime","aqua","silver","gray","white","indigo","violet","lavender","coral","gold","salmon","turquoise","orchid","khaki","slategray","thistle","burlywood","cadetblue","chartreuse","chocolate","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dodgerblue","firebrick","forestgreen","fuchsia","gold","greenyellow","hotpink","indianred","lawngreen","lightcoral","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","orangered","palegoldenrod","palegreen","paleturquoise","palevioletred","peru","powderblue","rosybrown","saddlebrown","seagreen","sienna","skyblue","slateblue","springgreen","tan","thistle","tomato","turquoise","violet"],textColor:"skyblue",loading:!1}},watch:{"randomAlgorithmic.poetryText":{handler:function(e,t){e!==t&&(this.textColor=this.getRandomColor())},deep:!0}},created:function(){this.startInterviewRandomTimer()},destroyed:function(){this.stopInterviewRandomTimer()},methods:{logout:function(){localStorage.removeItem("token"),this.$router.push("/login")},myHome:function(){window.open("http://qinyingjie.top/")},interviewRandom:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/random",{params:{}});case 3:r=t.sent,o=r.data,200===o.code&&(e.randomAlgorithmic.poetryText=o.result.poetryText),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},startInterviewRandomTimer:function(){var e=this;this.interviewRandom(),this.interviewRandomTimer=setInterval((function(){e.interviewRandom()}),1e4)},stopInterviewRandomTimer:function(){clearInterval(this.interviewRandomTimer)},getRandomColor:function(){var e=Math.floor(Math.random()*this.color.length);return this.color[e]}}},S=I,T=(r("9290"),Object(s["a"])(S,k,_,!1,null,"1eaf2085",null)),q=T.exports,P=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-menu",{staticClass:"layout-aside-container",attrs:{"default-active":"$route.path","background-color":"#fff","text-color":"#000","active-text-color":"#42b983"}},[r("router-link",{attrs:{to:"/home/interview"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/interview"}},[r("i",{staticClass:"el-icon-question"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("面试题管理")])])],1),r("router-link",{attrs:{to:"/home/algorithmic"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/algorithmic"}},[r("i",{staticClass:"el-icon-info"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("算法题管理")])])],1),r("router-link",{attrs:{to:"/home/aphorismPoetry"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/aphorismPoetry"}},[r("i",{staticClass:"el-icon-document"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("诗词管理")])])],1),r("router-link",{attrs:{to:"/home/chat"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/chat"}},[r("i",{staticClass:"el-icon-chat-line-square"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("CHAT管理")])])],1),r("router-link",{attrs:{to:"/home/pic"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/pic"}},[r("i",{staticClass:"el-icon-setting"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("图片管理")])])],1),r("router-link",{attrs:{to:"/home/csdnUser"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/csdnUser"}},[r("i",{staticClass:"el-icon-user"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("用户管理")])])],1),r("router-link",{attrs:{to:"/home/tripletDayInfo"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/tripletDayInfo"}},[r("i",{staticClass:"el-icon-user"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("三连管理")])])],1)],1)},N=[],V={name:"MyAside"},R=V,D=(r("5060"),Object(s["a"])(R,P,N,!1,null,"71932282",null)),O=D.exports,L={name:"MyHome",components:{MyHeader:q,MyAside:O}},$=L,M=(r("c3dd"),Object(s["a"])($,v,w,!1,null,null,null)),F=M.exports,j=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-select",{attrs:{placeholder:"请选择"},on:{change:e.queryPic},model:{value:e.picType,callback:function(t){e.picType=t},expression:"picType"}},e._l(e.options,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.picList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{prop:"picName",label:"图片名字",width:"240","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("img",{staticStyle:{cursor:"pointer"},attrs:{src:t.row.picUrl,alt:"图片",height:"100px"},on:{click:function(r){return e.showImageDialog(t.row.picUrl,t.$index)}}})]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])})],1),r("el-dialog",{attrs:{visible:e.imageDialogVisible,width:"30%"},on:{"update:visible":function(t){e.imageDialogVisible=t}}},[r("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"space-between"}},[r("button",{staticClass:"arrow-button",class:{disabled:0===e.imageIndex},attrs:{disabled:0===e.imageIndex},on:{click:e.showBeforeImage}},[r("el-icon",{staticClass:"custom-icon",attrs:{name:"arrow-left"}})],1),r("img",{staticStyle:{width:"80%"},attrs:{src:e.enlargedImageUrl,alt:"放大图片"}}),r("button",{staticClass:"arrow-button",class:{disabled:e.imageIndex===e.picList.length-1},attrs:{disabled:e.imageIndex===e.picList.length-1},on:{click:e.showNextImage}},[r("el-icon",{staticClass:"custom-icon",attrs:{name:"arrow-right"}})],1)])]),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1)],1)],1)},A=[],W={name:"MyPic",data:function(){return{picList:[],loading:!1,elementui_page_component_key:0,currentPage:1,pageSize:6,total:0,imageDialogVisible:!1,enlargedImageUrl:"",imageIndex:0,options:[{value:0,label:"宝宝照片"},{value:1,label:"学习照片"},{value:2,label:"风景照片"},{value:3,label:"美女照片"},{value:99,label:"其他照片"}],picType:0}},created:function(){this.queryPic()},methods:{showBeforeImage:function(){this.imageIndex>0&&(this.imageIndex--,this.enlargedImageUrl=this.picList[this.imageIndex].picUrl,this.imageDialogVisible=!0)},showNextImage:function(){this.imageIndex<this.picList.length-1&&(this.imageIndex++,this.enlargedImageUrl=this.picList[this.imageIndex].picUrl,this.imageDialogVisible=!0)},showImageDialog:function(e,t){this.enlargedImageUrl=e,this.imageDialogVisible=!0,this.imageIndex=t},queryPic:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/picInfo/page",{params:{page:e.currentPage,pageSize:e.pageSize,picType:e.picType}});case 3:r=t.sent,o=r.data,200===o.code&&(e.picList=o.result.records,e.total=o.result.total),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.queryPic()}}},U=W,E=(r("0157"),Object(s["a"])(U,j,A,!1,null,"15b8f4b2",null)),z=E.exports,Q=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.initCartList.apply(null,arguments)}},model:{value:e.formInline.question,callback:function(t){e.$set(e.formInline,"question",t)},expression:"formInline.question"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.initCartList}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.addChat.apply(null,arguments)}}},[e._v("新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.userlist}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{prop:"question",label:"问题",width:"240","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"response",label:"答案","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"详情",label:"详情",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success"},on:{click:function(r){return r.preventDefault(),e.gotoDetail(t.row.id)}}},[e._v("详情")]),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.onDelete(t.row.id)}}},[e._v("删除")])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},H=[],B=(r("a9e3"),{name:"MyChat",data:function(){return{userlist:[],loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("lastPage"))||1,pageSize:9,total:0,formInline:{question:""}}},watch:{"formInline.question":function(e){""!=e&&(this.currentPage=1,localStorage.setItem("lastPage",this.currentPage),this.initCartList())}},created:function(){var e=this;this.$nextTick((function(){var t=e.$route.query.back,r=e.$route.query.add;"back"===t&&"add"!=r?(e.currentPage=Number(localStorage.getItem("lastPage"))||1,e.formInline.question=localStorage.getItem("lastQuestion")||""):(localStorage.setItem("lastPage",1),localStorage.setItem("lastQuestion",""),e.currentPage=1,e.formInline.question=""),e.initCartList()}))},mounted:function(){this.currentPage=Number(localStorage.getItem("lastPage"))||1,this.formInline.question=localStorage.getItem("lastQuestion"),this.elementui_page_component_key++},methods:{onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.loading=!0,r.next=3,C["a"].get("http://120.79.36.53:8888/chatbot/delete",{params:{id:e}});case 3:o=r.sent,o.data,t.initCartList(),t.loading=!1;case 7:case"end":return r.stop()}}),r)})))()},refreshPage:function(){location.reload()},gotoDetail:function(e){this.$router.push("/home/chatinfo/"+e)},addChat:function(){this.$router.push("/home/addChat/")},initCartList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/chatbot/page",{params:{page:e.currentPage,pageSize:e.pageSize,question:e.formInline.question}});case 3:r=t.sent,o=r.data,console.log(o),200===o.code&&(e.userlist=o.result.content,e.total=o.result.totalElements,localStorage.setItem("lastPage",e.currentPage),localStorage.setItem("lastQuestion",e.formInline.question)),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.initCartList()}}}),Y=B,G=(r("d65b"),Object(s["a"])(Y,Q,H,!1,null,"117cdd0e",null)),J=G.exports,K=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增面试问题",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"面试问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1),r("br"),r("el-form-item",{staticClass:"form-item",attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择活动区域"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增面试问题(多个问题换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"面试问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1),r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.interviewPage.apply(null,arguments)}},model:{value:e.formInline.question,callback:function(t){e.$set(e.formInline,"question",t)},expression:"formInline.question"}})],1),r("el-select",{attrs:{placeholder:"请选择"},on:{change:e.interviewPage},model:{value:e.questionType,callback:function(t){e.questionType=t},expression:"questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.interviewPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.userlist}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{prop:"question",label:"面试问题","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"questionTypeName",label:"问题类型","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{style:{color:e.getColorForValue(t.row.questionTypeName)},domProps:{innerHTML:e._s(t.row.questionTypeName)}})]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.question,t.row.questionTypeName)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑面试问题",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{attrs:{label:"面试问题","label-width":e.formLabelWidth}},[r("el-input",{staticClass:"custom-textarea",staticStyle:{"text-align":"left"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1),r("el-form-item",{attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{staticStyle:{"text-align":"left"},attrs:{placeholder:"请选择问题类型"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除吗")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},X=[],Z=(r("d3b7"),r("25f0"),r("159b"),r("b0c0"),{name:"MyInterview",data:function(){return{userlist:[],loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("interviewLastPage"))||1,pageSize:9,total:0,formInline:{question:""},options:[],questionType:0,dialogFormVisible:!1,dialogMutiFormVisible:!1,form:{question:"",questionType:0},formLabelWidth:"120px",dialogVisible:!1,editVisible:!1,currentRowId:null,colorMap:{}}},watch:{"formInline.question":function(e){""!=e&&(this.currentPage=1,localStorage.setItem("interviewLastPage",this.currentPage),this.getQuestionType())},currentPage:function(e){localStorage.setItem("interviewLastPage",e.toString())}},created:function(){this.getQuestionType()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.question="",this.form.questionType=0,this.dialogFormVisible=!0},prepareMutiAdd:function(){this.form.question="",this.form.questionType=0,this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},preEdit:function(e,t,r){this.form.question=t;var o={};this.options.forEach((function(e){o[e.name]=e.questionType})),this.form.questionType=o[r],this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addQuestion(e)},addQuestion:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/interviewQuestion/add",{addType:e,question:t.form.question,questionType:t.form.questionType});case 4:o=r.sent,a=o.data,200===a.code?(t.currentPage=1,t.form.question="",t.form.questionType=0,t.getQuestionType()):(console.error("Received non-200 status code",a),t.errorMsg(a.message)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the question:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/interviewQuestion/update",{id:e.currentRowId,question:e.form.question,questionType:e.form.questionType});case 4:r=t.sent,o=r.data,200===o.code?(e.form.question="",e.form.questionType=0,e.editVisible=!1,e.getQuestionType()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the question:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/interviewQuestion/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.getQuestionType(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},refreshPage:function(){this.getQuestionType(),location.reload()},getQuestionType:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/interviewQuestion/questionType",{params:{}});case 2:r=t.sent,o=r.data,200===o.code&&(e.options=o.result,e.interviewPage());case 5:case"end":return t.stop()}}),t)})))()},interviewPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/interviewQuestion/page",{params:{page:e.currentPage,pageSize:e.pageSize,question:e.formInline.question,questionType:e.questionType}});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,a={},e.options.forEach((function(e){a[e.questionType]=e.name})),o.result.content.forEach((function(e){e.questionTypeName=a[e.questionType]||"Unknown"})),e.userlist=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.getQuestionType()},getColorForValue:function(e){return this.colorMap[e]||(this.colorMap[e]=this.getRandomColor()),this.colorMap[e]},getRandomColor:function(){var e=["red","blue","green","yellow","purple","orange","pink","brown","cyan","magenta","maroon","navy","olive","teal","lime","aqua","silver","gray","white","indigo","violet","lavender","coral","gold","salmon","turquoise","orchid","khaki","slategray","thistle","burlywood","cadetblue","chartreuse","chocolate","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dodgerblue","firebrick","forestgreen","fuchsia","gold","greenyellow","hotpink","indianred","lawngreen","lightcoral","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","orangered","palegoldenrod","palegreen","paleturquoise","palevioletred","peru","powderblue","rosybrown","saddlebrown","seagreen","sienna","skyblue","slateblue","springgreen","tan","thistle","tomato","turquoise","violet"],t=Math.floor(Math.random()*e.length);return e[t]}}}),ee=Z,te=(r("3871"),Object(s["a"])(ee,K,X,!1,null,"e4f703a0",null)),re=te.exports,oe=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增算法问题",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"算法问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.questionName,callback:function(t){e.$set(e.form,"questionName",t)},expression:"form.questionName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择活动区域"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"重要程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfImportance,callback:function(t){e.$set(e.form,"degreeOfImportance",t)},expression:"form.degreeOfImportance"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfDifficulty,callback:function(t){e.$set(e.form,"degreeOfDifficulty",t)},expression:"form.degreeOfDifficulty"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易分数","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.difficultyOfScore,callback:function(t){e.$set(e.form,"difficultyOfScore",t)},expression:"form.difficultyOfScore"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣题号","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeNumber,callback:function(t){e.$set(e.form,"leetcodeNumber",t)},expression:"form.leetcodeNumber"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣链接","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeLink,callback:function(t){e.$set(e.form,"leetcodeLink",t)},expression:"form.leetcodeLink"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增算法问题(多个问题换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"算法问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.questionName,callback:function(t){e.$set(e.form,"questionName",t)},expression:"form.questionName"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"随机一题",visible:e.randomFormVisible},on:{"update:visible":function(t){e.randomFormVisible=t}}},[r("el-descriptions",{staticClass:"margin-top",attrs:{title:"随机选择的题目如下:",column:3,border:""}},[r("el-descriptions-item",{model:{value:e.randomAlgorithmic.questionName,callback:function(t){e.$set(e.randomAlgorithmic,"questionName",t)},expression:"randomAlgorithmic.questionName"}},[r("template",{slot:"label"},[e._v("题目名称")]),e._v(" "+e._s(e.randomAlgorithmic.questionName)+" ")],2),r("el-descriptions-item",[r("template",{slot:"label"},[e._v("力扣题号")]),e._v(" "+e._s(e.randomAlgorithmic.leetcodeNumber)+" ")],2),r("el-descriptions-item",{attrs:{"show-overflow-tooltip":""}},[r("template",{slot:"label"},[e._v("力扣链接")]),r("a",{attrs:{href:e.randomAlgorithmic.leetcodeLink,target:"_blank"}},[e._v(e._s(e.randomAlgorithmic.leetcodeLink))])],2)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.randomFormVisible=!1}}},[e._v("取 消")])],1)],1),r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.interviewPage.apply(null,arguments)}},model:{value:e.formInline.questionName,callback:function(t){e.$set(e.formInline,"questionName",t)},expression:"formInline.questionName"}})],1),r("el-select",{attrs:{placeholder:"请选择"},on:{change:e.interviewPage},model:{value:e.questionType,callback:function(t){e.questionType=t},expression:"questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.interviewPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareRandom}},[e._v("随机一题")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.algorithmicList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"80",sortable:""}}),r("el-table-column",{attrs:{prop:"questionName",label:"算法问题","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"questionTypeName",label:"问题类型","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{style:{color:e.getColorForValue(t.row.questionTypeName)},domProps:{innerHTML:e._s(t.row.questionTypeName)}})]}}])}),r("el-table-column",{attrs:{prop:"degreeOfImportance",label:"重要程度","show-overflow-tooltip":"",width:50}}),r("el-table-column",{attrs:{prop:"degreeOfDifficulty",label:"难易程度","show-overflow-tooltip":"",width:50}}),r("el-table-column",{attrs:{prop:"difficultyOfScore",label:"难易分数","show-overflow-tooltip":"",width:80}}),r("el-table-column",{attrs:{prop:"leetcodeNumber",label:"力扣题号","show-overflow-tooltip":"",width:50}}),r("el-table-column",{attrs:{label:"力扣链接","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{attrs:{href:t.row.leetcodeLink,target:"_blank"}},[e._v(e._s(t.row.leetcodeLink))])]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.questionName,t.row.questionTypeName,t.row.degreeOfImportance,t.row.degreeOfDifficulty,t.row.difficultyOfScore,t.row.leetcodeNumber,t.row.leetcodeLink)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑算法问题",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"算法问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.questionName,callback:function(t){e.$set(e.form,"questionName",t)},expression:"form.questionName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择活动区域"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"重要程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfImportance,callback:function(t){e.$set(e.form,"degreeOfImportance",t)},expression:"form.degreeOfImportance"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfDifficulty,callback:function(t){e.$set(e.form,"degreeOfDifficulty",t)},expression:"form.degreeOfDifficulty"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易分数","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.difficultyOfScore,callback:function(t){e.$set(e.form,"difficultyOfScore",t)},expression:"form.difficultyOfScore"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣题号","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeNumber,callback:function(t){e.$set(e.form,"leetcodeNumber",t)},expression:"form.leetcodeNumber"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣链接","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeLink,callback:function(t){e.$set(e.form,"leetcodeLink",t)},expression:"form.leetcodeLink"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除吗")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},ae=[],ne={name:"MyInterview",data:function(){return{algorithmicList:[],randomAlgorithmic:{questionName:"",leetcodeNumber:"",leetcodeLink:""},loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("algorithmLastPage"))||1,pageSize:9,total:0,formInline:{questionName:""},options:[],allOptions:[],questionType:0,dialogFormVisible:!1,randomFormVisible:!1,dialogMutiFormVisible:!1,form:{questionName:"",questionType:0,degreeOfImportance:5,degreeOfDifficulty:1,difficultyOfScore:1200,leetcodeNumber:"",leetcodeLink:""},formLabelWidth:"120px",dialogVisible:!1,editVisible:!1,currentRowId:null,colorMap:{}}},watch:{"formInline.questionName":function(e){""===e&&(this.currentPage=1,localStorage.setItem("algorithmLastPage",this.currentPage),this.getQuestionType())},currentPage:function(e){localStorage.setItem("algorithmLastPage",e.toString())}},created:function(){this.getQuestionType(),this.getAllQuestionType()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.questionName="",this.form.questionType=0,this.dialogFormVisible=!0,this.getAllQuestionType()},prepareRandom:function(){this.randomAlgorithmic=[],this.randomFormVisible=!0,this.interviewRandom()},prepareMutiAdd:function(){this.form.questionName="",this.form.questionType=0,this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},preEdit:function(e,t,r,o,a,n,i,l){this.form.questionName=t,this.form.degreeOfImportance=o,this.form.degreeOfDifficulty=a,this.form.difficultyOfScore=n,this.form.leetcodeNumber=i,this.form.leetcodeLink=l;var s={};this.options.forEach((function(e){s[e.name]=e.questionType})),this.form.questionType=s[r],this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addQuestion(e)},addQuestion:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/algorithmicProblem/add",{addType:e,questionName:t.form.questionName,questionType:t.form.questionType,degreeOfImportance:t.form.degreeOfImportance,degreeOfDifficulty:t.form.degreeOfDifficulty,difficultyOfScore:t.form.difficultyOfScore,leetcodeNumber:t.form.leetcodeNumber,leetcodeLink:t.form.leetcodeLink});case 4:o=r.sent,a=o.data,200===a.code?(t.currentPage=1,t.form.questionName="",t.form.questionType=0,t.form.degreeOfImportance=5,t.form.degreeOfDifficulty=1,t.form.difficultyOfScore=1200,t.form.leetcodeNumber="",t.form.leetcodeLink="",t.getQuestionType()):(console.error("Received non-200 status code",a),t.errorMsg(a.message)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the questionName:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/algorithmicProblem/update",{id:e.currentRowId,questionName:e.form.questionName,questionType:e.form.questionType,degreeOfImportance:e.form.degreeOfImportance,degreeOfDifficulty:e.form.degreeOfDifficulty,difficultyOfScore:e.form.difficultyOfScore,leetcodeNumber:e.form.leetcodeNumber,leetcodeLink:e.form.leetcodeLink});case 4:r=t.sent,o=r.data,200===o.code?(e.form.questionName="",e.form.questionType=0,e.editVisible=!1,e.getQuestionType()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the questionName:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.getQuestionType(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},refreshPage:function(){this.getQuestionType(),location.reload()},getQuestionType:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/questionType",{params:{}});case 2:r=t.sent,o=r.data,200===o.code&&(e.options=o.result,console.log(e.options),e.interviewPage());case 5:case"end":return t.stop()}}),t)})))()},getAllQuestionType:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/allQuestionType",{params:{}});case 2:r=t.sent,o=r.data,200===o.code&&(e.allOptions=o.result);case 5:case"end":return t.stop()}}),t)})))()},interviewPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/page",{params:{page:e.currentPage,pageSize:e.pageSize,questionName:e.formInline.questionName,questionType:e.questionType}});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,a={},e.options.forEach((function(e){a[e.questionType]=e.name})),o.result.content.forEach((function(e){e.questionTypeName=a[e.questionType]})),e.algorithmicList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},interviewRandom:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/random",{params:{}});case 3:r=t.sent,o=r.data,200===o.code&&(e.randomAlgorithmic.questionName=o.result.questionName,e.randomAlgorithmic.leetcodeNumber=o.result.leetcodeNumber,e.randomAlgorithmic.leetcodeLink=o.result.leetcodeLink),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.getQuestionType()},getColorForValue:function(e){return this.colorMap[e]||(this.colorMap[e]=this.getRandomColor()),this.colorMap[e]},getRandomColor:function(){var e=["red","blue","green","yellow","purple","orange","pink","brown","cyan","magenta","maroon","navy","olive","teal","lime","aqua","silver","gray","white","indigo","violet","lavender","coral","gold","salmon","turquoise","orchid","khaki","slategray","thistle","burlywood","cadetblue","chartreuse","chocolate","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dodgerblue","firebrick","forestgreen","fuchsia","gold","greenyellow","hotpink","indianred","lawngreen","lightcoral","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","orangered","palegoldenrod","palegreen","paleturquoise","palevioletred","peru","powderblue","rosybrown","saddlebrown","seagreen","sienna","skyblue","slateblue","springgreen","tan","thistle","tomato","turquoise","violet"],t=Math.floor(Math.random()*e.length);return e[t]}}},ie=ne,le=(r("4b4f"),Object(s["a"])(ie,oe,ae,!1,null,"047b0f9a",null)),se=le.exports,ce=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增诗词",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"诗词内容","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.poetryText,callback:function(t){e.$set(e.form,"poetryText",t)},expression:"form.poetryText"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增诗词内容(多个诗词换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"诗词内容","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.poetryText,callback:function(t){e.$set(e.form,"poetryText",t)},expression:"form.poetryText"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"随机一诗词",visible:e.randomFormVisible},on:{"update:visible":function(t){e.randomFormVisible=t}}},[r("el-descriptions",{staticClass:"margin-top",attrs:{title:"随机选择的诗词如下:",column:3,border:""}},[r("el-descriptions-item",{model:{value:e.randomAlgorithmic.poetryText,callback:function(t){e.$set(e.randomAlgorithmic,"poetryText",t)},expression:"randomAlgorithmic.poetryText"}},[r("template",{slot:"label"},[e._v("诗词内容")]),e._v(" "+e._s(e.randomAlgorithmic.poetryText)+" ")],2)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.randomFormVisible=!1}}},[e._v("取 消")])],1)],1),r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.interviewPage.apply(null,arguments)}},model:{value:e.formInline.poetryText,callback:function(t){e.$set(e.formInline,"poetryText",t)},expression:"formInline.poetryText"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.interviewPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareRandom}},[e._v("随机一题")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.algorithmicList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"80",sortable:""}}),r("el-table-column",{attrs:{prop:"poetryText",label:"内容","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.poetryText)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑算法问题",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"内容","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.poetryText,callback:function(t){e.$set(e.form,"poetryText",t)},expression:"form.poetryText"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除吗")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},ue=[],me={name:"MyInterview",data:function(){return{algorithmicList:[],randomAlgorithmic:{poetryText:""},loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("poetryLastPage"))||1,pageSize:9,total:0,formInline:{poetryText:""},dialogFormVisible:!1,randomFormVisible:!1,dialogMutiFormVisible:!1,form:{poetryText:""},formLabelWidth:"120px",dialogVisible:!1,editVisible:!1,currentRowId:null}},watch:{"formInline.poetryText":function(e){""===e&&(this.currentPage=1,localStorage.setItem("poetryLastPage",this.currentPage),this.interviewPage())},currentPage:function(e){localStorage.setItem("poetryLastPage",e.toString())}},created:function(){this.interviewPage()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.poetryText="",this.dialogFormVisible=!0},prepareRandom:function(){this.randomAlgorithmic=[],this.randomFormVisible=!0,this.interviewRandom()},prepareMutiAdd:function(){this.form.poetryText="",this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},preEdit:function(e,t){this.form.poetryText=t,this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addQuestion(e)},addQuestion:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/aphorismPoetry/add",{addType:e,poetryText:t.form.poetryText,degreeOfImportance:t.form.degreeOfImportance,degreeOfDifficulty:t.form.degreeOfDifficulty,difficultyOfScore:t.form.difficultyOfScore,leetcodeNumber:t.form.leetcodeNumber,leetcodeLink:t.form.leetcodeLink});case 4:o=r.sent,a=o.data,200===a.code?(t.form.poetryText="",t.currentPage=1,t.interviewPage()):(console.error("Received non-200 status code",a),t.errorMsg(a.message)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the poetryText:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/aphorismPoetry/update",{id:e.currentRowId,poetryText:e.form.poetryText});case 4:r=t.sent,o=r.data,200===o.code?(e.form.poetryText="",e.editVisible=!1,e.interviewPage()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the poetryText:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.interviewPage(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},refreshPage:function(){this.interviewPage(),location.reload()},interviewPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/page",{params:{page:e.currentPage,pageSize:e.pageSize,poetryText:e.formInline.poetryText}});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,e.algorithmicList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},interviewRandom:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/random",{params:{}});case 3:r=t.sent,o=r.data,200===o.code&&(e.randomAlgorithmic.poetryText=o.result.poetryText),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.interviewPage()}}},de=me,fe=(r("0ecc"),Object(s["a"])(de,ce,ue,!1,null,"b9c27f4a",null)),pe=fe.exports,ge=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入用户名"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.userPage.apply(null,arguments)}},model:{value:e.formInline.userName,callback:function(t){e.$set(e.formInline,"userName",t)},expression:"formInline.userName"}})],1),r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入用户昵称"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.userPage.apply(null,arguments)}},model:{value:e.formInline.nickName,callback:function(t){e.$set(e.formInline,"nickName",t)},expression:"formInline.nickName"}})],1),r("el-select",{attrs:{placeholder:"请选择权重"},on:{change:e.userPage},model:{value:e.formInline.userWeight,callback:function(t){e.$set(e.formInline,"userWeight",t)},expression:"formInline.userWeight"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("el-select",{attrs:{placeholder:"请选择文章类型"},on:{change:e.userPage},model:{value:e.formInline.articleType,callback:function(t){e.$set(e.formInline,"articleType",t)},expression:"formInline.articleType"}},e._l(e.articleType,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1),r("el-select",{attrs:{placeholder:"请选择点赞状态"},on:{change:e.userPage},model:{value:e.formInline.likeStatus,callback:function(t){e.$set(e.formInline,"likeStatus",t)},expression:"formInline.likeStatus"}},e._l(e.likeStatus,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("el-select",{attrs:{placeholder:"请选择收藏状态"},on:{change:e.userPage},model:{value:e.formInline.collectStatus,callback:function(t){e.$set(e.formInline,"collectStatus",t)},expression:"formInline.collectStatus"}},e._l(e.collectStatus,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("el-select",{attrs:{placeholder:"请选择评论状态"},on:{change:e.userPage},model:{value:e.formInline.commentStatus,callback:function(t){e.$set(e.formInline,"commentStatus",t)},expression:"formInline.commentStatus"}},e._l(e.commentStatus,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("br"),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.userPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAllTriplet}},[e._v("三连")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.allTripletDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.allTripletDialogVisible=t}}},[r("span",[e._v("确认三连吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.allTripletDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.allTriplet()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"warning"},on:{click:e.prepareReset}},[e._v("重置全员状态")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.resetDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetDialogVisible=t}}},[r("span",[e._v("确认重置全员状态吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.reset()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareResetUser}},[e._v("新的一天")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.resetUserDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetUserDialogVisible=t}}},[r("span",[e._v("确认重置新一天用户状态吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetUserDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.resetUser()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"success"},on:{click:e.prepareAutoReply}},[e._v("自动评论")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.autoReplyDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.autoReplyDialogVisible=t}}},[r("span",[e._v("确认自动评论吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.autoReplyDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.autoReply()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")]),r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增用户",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"用户名称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),r("br"),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户昵称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.nickName,callback:function(t){e.$set(e.form,"nickName",t)},expression:"form.nickName"}})],1),r("br"),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户权重","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.userWeight,callback:function(t){e.$set(e.form,"userWeight",t)},expression:"form.userWeight"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")]),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增用户(多个用户换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"用户名称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1)],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.csdnUserList}},[r("el-table-column",{attrs:{prop:"userName",label:"用户名称","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"nickName",label:"用户昵称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{attrs:{href:t.row.userHomeUrl,target:"_blank"}},[e._v(e._s(t.row.nickName))])]}}])}),r("el-table-column",{attrs:{prop:"likeStatusName",label:"点赞状态","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"collectStatusName",label:"收藏状态","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"commentStatusName",label:"评论状态","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"userWeightName",label:"用户权重","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"articleType",label:"文章类型","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"更新时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.updateTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"310px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"primary"},on:{click:function(r){return e.prepareTriplet(t.row.userName)}}},[e._v("三连")]),r("el-dialog",{attrs:{title:"提示",visible:e.tripletVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.tripletVisible=t}}},[r("span",[e._v("确认三连?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.tripletVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.triplet(e.currentUserName)}}},[e._v("确 定")])],1)]),r("el-button",{attrs:{type:"warning"},on:{click:function(r){return e.prepareResetUserDayStatus(t.row.userName)}}},[e._v("重置")]),r("el-dialog",{attrs:{title:"提示",visible:e.resetUserDayStatusVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetUserDayStatusVisible=t}}},[r("span",[e._v("确认重置?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetUserDayStatusVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.resetUserDayStatus(e.currentUserName)}}},[e._v("确 定")])],1)]),r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.userName,t.row.nickName,t.row.userWeight)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑用户信息",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"用户名称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户昵称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.nickName,callback:function(t){e.$set(e.form,"nickName",t)},expression:"form.nickName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户权重","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.userWeight,callback:function(t){e.$set(e.form,"userWeight",t)},expression:"form.userWeight"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},he=[],be={name:"MyCsdnUser",data:function(){return{form:{userName:"",nickName:"",userWeight:null},formInline:{userName:"",nickName:"",articleType:"",likeStatus:null,collectStatus:null,commentStatus:null},allOptions:[{type:-1,name:"全部"},{type:9,name:"铁子"},{type:8,name:"闺蜜"},{type:7,name:"基友"},{type:0,name:"默认"}],articleType:["全部","blog","blink","download","ask"],likeStatus:[{type:-1,name:"全部"},{type:0,name:"未处理"},{type:1,name:"已经点过赞"},{type:2,name:"点赞已满"},{type:3,name:"取消点赞"},{type:9,name:"点赞成功"}],collectStatus:[{type:-1,name:"全部"},{type:0,name:"未处理"},{type:1,name:"已经收藏过"},{type:2,name:"收藏已满"},{type:3,name:"参数缺失"},{type:9,name:"收藏成功"}],commentStatus:[{type:-1,name:"全部"},{type:0,name:"未处理"},{type:1,name:"已经评论过"},{type:2,name:"评论已满"},{type:3,name:"禁言"},{type:4,name:"评论太快"},{type:5,name:"评论已经到了49条"},{type:8,name:"其他错误"},{type:9,name:"评论成功"}],dialogFormVisible:!1,dialogMutiFormVisible:!1,dialogVisible:!1,editVisible:!1,tripletVisible:!1,allTripletDialogVisible:!1,resetDialogVisible:!1,autoReplyDialogVisible:!1,resetUserDialogVisible:!1,resetUserDayStatusVisible:!1,csdnUserList:[],loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("csdnUserPage"))||1,pageSize:9,total:0,formLabelWidth:"120px",currentRowId:null,currentUserName:null}},watch:{"formInline.userName":function(e){""!=e&&(this.currentPage=1,localStorage.setItem("csdnUserPage",this.currentPage),this.userPage())},"formInline.nickName":function(e){""!=e&&(this.currentPage=1,localStorage.setItem("csdnUserPage",this.currentPage),this.userPage())},currentPage:function(e){localStorage.setItem("csdnUserPage",e.toString())}},created:function(){this.userPage()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.userName="",this.form.nickName="",this.dialogFormVisible=!0},prepareAllTriplet:function(){this.allTripletDialogVisible=!0},prepareResetUserDayStatus:function(e){this.resetUserDayStatusVisible=!0,this.currentUserName=e},prepareReset:function(){this.resetDialogVisible=!0},prepareAutoReply:function(){this.autoReplyDialogVisible=!0},prepareResetUser:function(){this.resetUserDialogVisible=!0},prepareMutiAdd:function(){this.form.userName="",this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},prepareTriplet:function(e){this.currentUserName=e,this.tripletVisible=!0},preEdit:function(e,t,r,o){this.form.userName=t,this.form.nickName=r,this.form.userWeight=o,this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addUser(e)},addUser:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/csdn/user/add",{addType:e,userName:t.form.userName,nickName:t.form.nickName,userWeight:t.form.userWeight});case 4:o=r.sent,a=o.data,200===a.code?(t.currentPage=1,t.form.userName="",t.form.nickName="",t.form.userWeight=null,t.userPage()):(t.errorMsg(a.message),console.error("Received non-200 status code",a)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the questionName:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/csdn/user/update",{id:e.currentRowId,userName:e.form.userName,nickName:e.form.nickName,userWeight:e.form.userWeight});case 4:r=t.sent,o=r.data,200===o.code?(e.form.userName="",e.form.nickName="",e.form.userWeight=null,e.editVisible=!1,e.userPage()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the questionName:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},autoReply:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,e.autoReplyDialogVisible=!1,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/autoReply");case 4:r=t.sent,o=r.data,200===o.code?e.userPage():console.error("Received non-200 status code",o),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},allTriplet:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,e.allTripletDialogVisible=!1,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/multiTriplet");case 4:r=t.sent,o=r.data,200===o.code?e.userPage():console.error("Received non-200 status code",o),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},triplet:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.loading=!0,t.currentUserName=null,t.tripletVisible=!1,r.next=5,C["a"].get("http://120.79.36.53:8888/csdn/singleTriplet?username="+e);case 5:o=r.sent,a=o.data,200===a.code?t.userPage():console.error("Received non-200 status code",a),t.loading=!1;case 9:case"end":return r.stop()}}),r)})))()},resetUserDayStatus:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.loading=!0,t.currentUserName=null,t.resetUserDayStatusVisible=!1,r.next=5,C["a"].get("http://120.79.36.53:8888/csdn/resetCsdnUserInfo?username="+e);case 5:o=r.sent,a=o.data,200===a.code?t.userPage():console.error("Received non-200 status code",a),t.loading=!1;case 9:case"end":return r.stop()}}),r)})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/csdn/user/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.userPage(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},reset:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.resetDialogVisible=!1,e.loading=!0,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/resetAllCurrentStatus");case 4:r=t.sent,r.data,e.userPage(),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},resetUser:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.resetUserDialogVisible=!1,e.loading=!0,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/resetUserDayStatus");case 4:r=t.sent,r.data,e.userPage(),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},refreshPage:function(){this.userPage(),location.reload()},userPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o,a,n,i,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].post("http://120.79.36.53:8888/csdn/user/page",{page:e.currentPage,pageSize:e.pageSize,userName:e.formInline.userName,nickName:e.formInline.nickName,articleType:"全部"==e.formInline.articleType?"":e.formInline.articleType,userWeight:-1==e.formInline.userWeight?null:e.formInline.userWeight,likeStatus:-1==e.formInline.likeStatus?null:e.formInline.likeStatus,collectStatus:-1==e.formInline.collectStatus?null:e.formInline.collectStatus,commentStatus:-1==e.formInline.commentStatus?null:e.formInline.commentStatus});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,a={},e.allOptions.forEach((function(e){a[e.type]=e.name})),o.result.content.forEach((function(e){e.userWeightName=a[e.userWeight]})),n={},e.likeStatus.forEach((function(e){n[e.type]=e.name})),o.result.content.forEach((function(e){e.likeStatusName=n[e.likeStatus]})),i={},e.collectStatus.forEach((function(e){i[e.type]=e.name})),o.result.content.forEach((function(e){e.collectStatusName=i[e.collectStatus]})),l={},e.commentStatus.forEach((function(e){l[e.type]=e.name})),o.result.content.forEach((function(e){e.commentStatusName=l[e.commentStatus]})),e.csdnUserList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.userPage()}}},ye=be,ve=(r("556f"),Object(s["a"])(ye,ge,he,!1,null,"685ce184",null)),we=ve.exports,ke=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-date-picker",{attrs:{type:"date",placeholder:"选择开始日期","value-format":"yyyy-MM-dd"},model:{value:e.formInline.startDate,callback:function(t){e.$set(e.formInline,"startDate",t)},expression:"formInline.startDate"}})],1),r("el-form-item",[r("el-date-picker",{attrs:{type:"date",placeholder:"选择结束日期","value-format":"yyyy-MM-dd"},model:{value:e.formInline.endDate,callback:function(t){e.$set(e.formInline,"endDate",t)},expression:"formInline.endDate"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.tripletDayInfoPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareReset}},[e._v("重置")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.resetDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetDialogVisible=t}}},[r("span",[e._v("确认重置吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.reset()}}},[e._v("确 定")])],1)])],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.tripletDayInfoList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{label:"三连时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateDayFormat")(t.row.tripletDate))+" ")]}}])}),r("el-table-column",{attrs:{prop:"likeNum",label:"点赞数量","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"collectNum",label:"收藏数量","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"commentNum",label:"评论数量","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"创建时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{label:"更新时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.updateTime))+" ")]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},_e=[],xe={name:"MyTripletDayInfo",data:function(){return{formInline:{startDate:null,endDate:null},tripletDayInfoList:[],loading:!1,resetDialogVisible:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("csdnTripletDayInfoPage"))||1,pageSize:9,total:0}},watch:{"formInline.startDate":function(e){""!=e&&(this.currentPage=1,localStorage.setItem("csdnTripletDayInfoPage",this.currentPage),this.tripletDayInfoPage())},"formInline.endDate":function(e){""!=e&&(this.currentPage=1,localStorage.setItem("csdnTripletDayInfoPage",this.currentPage),this.tripletDayInfoPage())},currentPage:function(e){localStorage.setItem("csdnTripletDayInfoPage",e.toString())}},created:function(){this.tripletDayInfoPage()},mounted:function(){this.currentPage=1},methods:{prepareReset:function(){this.resetDialogVisible=!0},tripletDayInfoPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].post("http://120.79.36.53:8888/dayInfo/page",{page:e.currentPage,pageSize:e.pageSize,startDate:e.formInline.startDate,endDate:e.formInline.endDate});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,e.tripletDayInfoList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},reset:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/dayInfo/add");case 3:r=t.sent,r.data,e.resetDialogVisible=!1,e.tripletDayInfoPage(),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.tripletDayInfoPage()},refreshPage:function(){this.tripletDayInfoPage(),location.reload()}}},Ce=xe,Ie=(r("4461"),Object(s["a"])(Ce,ke,_e,!1,null,"2dbbf5e8",null)),Se=Ie.exports,Te=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-button",{attrs:{type:"primary",plain:"",size:"medium"},on:{click:e.goBack}},[e._v("后退")]),r("h4",{staticClass:"text-center"},[e._v("ChatGpt问答详情 --- "+e._s(e.id))]),r("el-container",[r("el-main",[r("el-table",{attrs:{border:"",data:e.list}},[r("el-table-column",{attrs:{label:"序号",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.id))])]}}])}),r("el-table-column",{attrs:{label:"问题",width:"240"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.question))])]}}])}),r("el-table-column",{attrs:{label:"回答"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{attrs:{id:"td-response"}},[e._v(e._s(t.row.response))])]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e._f("dateFormat")(t.row.createTime)))])]}}])})],1)],1)],1),r("div",{staticClass:"button-container"},[r("el-button",{attrs:{type:"primary",round:""},on:{click:e.copyCode}},[e._v("复制回答")])],1)],1)},qe=[],Pe={name:"MyChatDetail",props:["id"],data:function(){return{list:[]}},created:function(){this.initChatList()},methods:{goBack:function(){var e={back:"back"};this.$router.push({path:"/home/chat",query:e})},initChatList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/chatbot/"+e.id);case 2:r=t.sent,o=r.data,200===o.code&&(e.list=[{id:o.result.id,question:o.result.question,response:o.result.response,createTime:o.result.createTime}]);case 5:case"end":return t.stop()}}),t)})))()},copyCode:function(){var e=document.getElementById("td-response"),t=document.createRange();t.selectNode(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(t),document.execCommand("copy"),r.removeAllRanges(),this.$message.success("代码已复制到剪贴板")}}},Ne=Pe,Ve=(r("022e"),Object(s["a"])(Ne,Te,qe,!1,null,"9d5d30a4",null)),Re=Ve.exports,De=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-button",{attrs:{type:"primary",plain:"",size:"medium"},on:{click:e.goBack}},[e._v("后退")]),r("h4",{staticClass:"text-center"},[e._v("新增ChatGpt问答")]),r("el-container",{staticClass:"container"},[r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"问题"}},[r("el-input",{model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1),r("el-form-item",{attrs:{label:"答案"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.form.response,callback:function(t){e.$set(e.form,"response",t)},expression:"form.response"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("立即创建")]),r("el-button",{on:{click:e.clearContent}},[e._v("取消")])],1)],1)],1)],1)},Oe=[],Le={name:"AddChatDetail",data:function(){return{form:{question:"",response:""}}},methods:{clearContent:function(){this.form.question="",this.form.response=""},onSubmit:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r={question:e.form.question,response:e.form.response},C["a"].post("http://120.79.36.53:8888/chatbot",r).then((function(t){200===t.data.code&&(e.$message.success({message:"问题和答案新增成功",duration:1e3}),e.goBack())})).catch((function(t){e.$message.error("系统异常")}));case 2:case"end":return t.stop()}}),t)})))()},goBack:function(){var e={back:"back",add:"add"};this.$router.push({path:"/home/chat",query:e})}}},$e=Le,Me=(r("66f9"),Object(s["a"])($e,De,Oe,!1,null,"ddc6c3e0",null)),Fe=Me.exports;o["default"].use(m["a"]);var je=new m["a"]({routes:[{path:"/",redirect:"/login"},{path:"/login",component:y,meta:{title:"登录"}},{path:"/home",component:F,redirect:"/home/interview",children:[{path:"interview",component:re,meta:{title:"面试题"}},{path:"algorithmic",component:se,meta:{title:"算法题"}},{path:"aphorismpoetry",component:pe,meta:{title:"名言警句"}},{path:"chat",component:J,meta:{title:"chatgpt记录"}},{path:"pic",component:z,meta:{title:"图片"}},{path:"csdnUser",component:we,meta:{title:"用户管理"}},{path:"tripletDayInfo",component:Se,meta:{title:"三连管理"}},{path:"chatinfo/:id",component:Re,props:!0,meta:{title:"chat信息"}},{path:"addChat",component:Fe,meta:{title:"添加chat信息"}}]}]});je.beforeEach((function(e,t,r){if(-1!==d.indexOf(e.path)){var o=localStorage.getItem("token");o?r():r("/login")}else r()}));var Ae=je,We=r("5c96"),Ue=r.n(We),Ee=(r("0fae"),r("16b4"),r("a766"),r("5a0c")),ze=r.n(Ee);o["default"].prototype.$dayjs=ze.a,o["default"].filter("dateFormat",(function(e){var t=ze()(e).format("YYYY-MM-DD HH:mm:ss");return t})),o["default"].filter("dateDayFormat",(function(e){var t=ze()(e).format("YYYY-MM-DD");return t})),o["default"].use(Ue.a),o["default"].config.productionTip=!1,Ae.beforeEach((function(e,t,r){e.meta.title&&(document.title=e.meta.title),r()})),new o["default"]({render:function(e){return e(u)},router:Ae}).$mount("#app")},"66f9":function(e,t,r){"use strict";r("155e")},7678:function(e,t,r){e.exports=r.p+"img/kwan.80e90605.png"},"7a1a":function(e,t,r){},"7f28":function(e,t,r){},"808c":function(e,t,r){},"895b":function(e,t,r){},9290:function(e,t,r){"use strict";r("b8d3")},a766:function(e,t,r){},b6cc:function(e,t,r){},b8d3:function(e,t,r){},ba4e:function(e,t,r){},c3dd:function(e,t,r){"use strict";r("38b7")},d65b:function(e,t,r){"use strict";r("b6cc")}});
//# sourceMappingURL=app.bedb4db6.js.map
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
(function(e){function t(t){for(var o,i,l=t[0],s=t[1],c=t[2],m=0,d=[];m<l.length;m++)i=l[m],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&d.push(a[i][0]),a[i]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);u&&u(t);while(d.length)d.shift()();return n.push.apply(n,c||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],o=!0,l=1;l<r.length;l++){var s=r[l];0!==a[s]&&(o=!1)}o&&(n.splice(t--,1),e=i(i.s=r[0]))}return e}var o={},a={app:0},n=[];function i(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=o,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(r,o,function(t){return e[t]}.bind(null,o));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var u=s;n.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},"0157":function(e,t,r){"use strict";r("808c")},"022e":function(e,t,r){"use strict";r("12df")},"12df":function(e,t,r){},"12ff":function(e,t,r){"use strict";r("2597")},"155e":function(e,t,r){},1619:function(e,t,r){},"16b4":function(e,t,r){},2597:function(e,t,r){},"38b7":function(e,t,r){},4341:function(e,t,r){"use strict";r("1619")},5060:function(e,t,r){},50603:function(e,t,r){"use strict";r("7f28")},"56d7":function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d"),r("4de4");var o=r("2b0e"),a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("router-view")},n=[],i={name:"MyApp"},l=i,s=r("2877"),c=Object(s["a"])(l,a,n,!1,null,"633dd7d9",null),u=c.exports,m=r("8c4f"),d=["/home","/home/pic"],f=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-container"},[r("div",{staticClass:"login-box"},[e._m(0),r("div",{staticClass:"form-login p-4"},[r("div",{staticClass:"form-group form-inline"},[r("label",{attrs:{for:"username"}},[e._v("登录名称")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.username,expression:"username",modifiers:{trim:!0}}],staticClass:"form-control ml-2",attrs:{type:"text",id:"username",placeholder:"请输入登录名称",autocomplete:"off"},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})]),r("div",{staticClass:"form-group form-inline"},[r("label",{attrs:{for:"password"}},[e._v("登录密码")]),r("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.password,expression:"password",modifiers:{trim:!0}}],staticClass:"form-control ml-2",attrs:{type:"password",id:"password",placeholder:"请输入登录密码"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}})]),r("div",{staticClass:"form-group form-inline d-flex justify-content-end"},[r("button",{staticClass:"btn btn-secondary mr-2",attrs:{type:"button"},on:{click:e.reset}},[e._v("重置")]),r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.login}},[e._v("登录")])])])])])},p=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"text-center avatar-box"},[o("img",{staticClass:"img-thumbnail avatar",attrs:{src:r("7678"),alt:"kwan的解忧杂货铺"}})])}],g={name:"MyLogin",data:function(){return{username:"",password:""}},methods:{reset:function(){this.username="",this.password=""},login:function(){"admin"===this.username&&"666666"===this.password?(localStorage.setItem("token","Bearer xxxx"),this.$router.push("/home")):localStorage.removeItem("token")}}},h=g,b=(r("12ff"),Object(s["a"])(h,f,p,!1,null,"1be4e8ce",null)),y=b.exports,v=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-container",[r("el-header",[r("MyHeader")],1),r("el-container",[r("el-aside",{staticStyle:{overflow:"hidden","padding-top":"24px"},attrs:{width:"200px"}},[r("MyAside")],1),r("el-main",{staticStyle:{padding:"0"}},[r("router-view")],1)],1)],1)},w=[],k=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"layout-header-container d-flex justify-content-between align-items-center p-3"},[e._m(0),r("h2",{staticClass:"layout-header-left-title ml-3",style:{color:e.textColor}},[e._v(e._s(e.randomAlgorithmic.poetryText))]),r("el-row",[r("el-col",{attrs:{inline:!0,span:24}},[r("el-button",{staticClass:"el-button-header",attrs:{type:"success",round:""},on:{click:e.myHome}},[e._v("我的主页")]),r("el-button",{staticClass:"el-button-header",attrs:{type:"primary",round:""},on:{click:e.logout}},[e._v("退出登录")])],1)],1)],1)},_=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"layout-header-left d-flex align-items-center user-select-none"},[o("img",{staticClass:"layout-header-left-img",attrs:{src:r("7678"),alt:""}}),o("h4",{staticClass:"layout-header-left-title ml-3"},[e._v("kwan的解忧杂货铺")])])}],x=r("1da1"),C=(r("96cf"),r("cee4")),I={name:"MyHeader",data:function(){return{randomAlgorithmic:{poetryText:""},color:["red","blue","green","yellow","purple","orange","pink","brown","cyan","magenta","maroon","navy","olive","teal","lime","aqua","silver","gray","white","indigo","violet","lavender","coral","gold","salmon","turquoise","orchid","khaki","slategray","thistle","burlywood","cadetblue","chartreuse","chocolate","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dodgerblue","firebrick","forestgreen","fuchsia","gold","greenyellow","hotpink","indianred","lawngreen","lightcoral","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","orangered","palegoldenrod","palegreen","paleturquoise","palevioletred","peru","powderblue","rosybrown","saddlebrown","seagreen","sienna","skyblue","slateblue","springgreen","tan","thistle","tomato","turquoise","violet"],textColor:"skyblue",loading:!1}},watch:{"randomAlgorithmic.poetryText":{handler:function(e,t){e!==t&&(this.textColor=this.getRandomColor())},deep:!0}},created:function(){this.startInterviewRandomTimer()},destroyed:function(){this.stopInterviewRandomTimer()},methods:{logout:function(){localStorage.removeItem("token"),this.$router.push("/login")},myHome:function(){window.open("http://qinyingjie.top/")},interviewRandom:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/random",{params:{}});case 3:r=t.sent,o=r.data,200===o.code&&(e.randomAlgorithmic.poetryText=o.result.poetryText),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},startInterviewRandomTimer:function(){var e=this;this.interviewRandom(),this.interviewRandomTimer=setInterval((function(){e.interviewRandom()}),1e4)},stopInterviewRandomTimer:function(){clearInterval(this.interviewRandomTimer)},getRandomColor:function(){var e=Math.floor(Math.random()*this.color.length);return this.color[e]}}},S=I,T=(r("9290"),Object(s["a"])(S,k,_,!1,null,"1eaf2085",null)),q=T.exports,P=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-menu",{staticClass:"layout-aside-container",attrs:{"default-active":"$route.path","background-color":"#fff","text-color":"#000","active-text-color":"#42b983"}},[r("router-link",{attrs:{to:"/home/interview"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/interview"}},[r("i",{staticClass:"el-icon-question"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("面试题管理")])])],1),r("router-link",{attrs:{to:"/home/algorithmic"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/algorithmic"}},[r("i",{staticClass:"el-icon-info"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("算法题管理")])])],1),r("router-link",{attrs:{to:"/home/aphorismPoetry"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/aphorismPoetry"}},[r("i",{staticClass:"el-icon-document"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("诗词管理")])])],1),r("router-link",{attrs:{to:"/home/chat"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/chat"}},[r("i",{staticClass:"el-icon-chat-line-square"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("CHAT管理")])])],1),r("router-link",{attrs:{to:"/home/pic"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/pic"}},[r("i",{staticClass:"el-icon-setting"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("图片管理")])])],1),r("router-link",{attrs:{to:"/home/csdnUser"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/csdnUser"}},[r("i",{staticClass:"el-icon-user"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("用户管理")])])],1),r("router-link",{attrs:{to:"/home/tripletDayInfo"}},[r("el-menu-item",{staticClass:"left-aside-item",attrs:{index:"/tripletDayInfo"}},[r("i",{staticClass:"el-icon-user"}),r("span",{attrs:{slot:"title"},slot:"title"},[e._v("三连管理")])])],1)],1)},N=[],V={name:"MyAside"},R=V,D=(r("50603"),Object(s["a"])(R,P,N,!1,null,"71932282",null)),O=D.exports,L={name:"MyHome",components:{MyHeader:q,MyAside:O}},$=L,M=(r("c3dd"),Object(s["a"])($,v,w,!1,null,null,null)),F=M.exports,j=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-select",{attrs:{placeholder:"请选择"},on:{change:e.queryPic},model:{value:e.picType,callback:function(t){e.picType=t},expression:"picType"}},e._l(e.options,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.picList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{prop:"picName",label:"图片名字",width:"240","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("img",{staticStyle:{cursor:"pointer"},attrs:{src:t.row.picUrl,alt:"图片",height:"100px"},on:{click:function(r){return e.showImageDialog(t.row.picUrl,t.$index)}}})]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])})],1),r("el-dialog",{attrs:{visible:e.imageDialogVisible,width:"30%"},on:{"update:visible":function(t){e.imageDialogVisible=t}}},[r("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"space-between"}},[r("button",{staticClass:"arrow-button",class:{disabled:0===e.imageIndex},attrs:{disabled:0===e.imageIndex},on:{click:e.showBeforeImage}},[r("el-icon",{staticClass:"custom-icon",attrs:{name:"arrow-left"}})],1),r("img",{staticStyle:{width:"80%"},attrs:{src:e.enlargedImageUrl,alt:"放大图片"}}),r("button",{staticClass:"arrow-button",class:{disabled:e.imageIndex===e.picList.length-1},attrs:{disabled:e.imageIndex===e.picList.length-1},on:{click:e.showNextImage}},[r("el-icon",{staticClass:"custom-icon",attrs:{name:"arrow-right"}})],1)])]),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1)],1)],1)},A=[],W={name:"MyPic",data:function(){return{picList:[],loading:!1,elementui_page_component_key:0,currentPage:1,pageSize:6,total:0,imageDialogVisible:!1,enlargedImageUrl:"",imageIndex:0,options:[{value:0,label:"宝宝照片"},{value:1,label:"学习照片"},{value:2,label:"风景照片"},{value:3,label:"美女照片"},{value:99,label:"其他照片"}],picType:0}},created:function(){this.queryPic()},methods:{showBeforeImage:function(){this.imageIndex>0&&(this.imageIndex--,this.enlargedImageUrl=this.picList[this.imageIndex].picUrl,this.imageDialogVisible=!0)},showNextImage:function(){this.imageIndex<this.picList.length-1&&(this.imageIndex++,this.enlargedImageUrl=this.picList[this.imageIndex].picUrl,this.imageDialogVisible=!0)},showImageDialog:function(e,t){this.enlargedImageUrl=e,this.imageDialogVisible=!0,this.imageIndex=t},queryPic:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/picInfo/page",{params:{page:e.currentPage,pageSize:e.pageSize,picType:e.picType}});case 3:r=t.sent,o=r.data,200===o.code&&(e.picList=o.result.records,e.total=o.result.total),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.queryPic()}}},U=W,E=(r("0157"),Object(s["a"])(U,j,A,!1,null,"15b8f4b2",null)),z=E.exports,Q=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.initCartList.apply(null,arguments)}},model:{value:e.formInline.question,callback:function(t){e.$set(e.formInline,"question",t)},expression:"formInline.question"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.initCartList}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.addChat.apply(null,arguments)}}},[e._v("新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.userlist}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{prop:"question",label:"问题",width:"240","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"response",label:"答案","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"详情",label:"详情",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success"},on:{click:function(r){return r.preventDefault(),e.gotoDetail(t.row.id)}}},[e._v("详情")]),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.onDelete(t.row.id)}}},[e._v("删除")])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},H=[],B=(r("a9e3"),{name:"MyChat",data:function(){return{userlist:[],loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("lastPage"))||1,pageSize:9,total:0,formInline:{question:""}}},watch:{"formInline.question":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("lastPage",this.currentPage),this.initCartList())}},created:function(){var e=this;this.$nextTick((function(){var t=e.$route.query.back,r=e.$route.query.add;"back"===t&&"add"!=r?(e.currentPage=Number(localStorage.getItem("lastPage"))||1,e.formInline.question=localStorage.getItem("lastQuestion")||""):(localStorage.setItem("lastPage",1),localStorage.setItem("lastQuestion",""),e.currentPage=1,e.formInline.question=""),e.initCartList()}))},mounted:function(){this.currentPage=Number(localStorage.getItem("lastPage"))||1,this.formInline.question=localStorage.getItem("lastQuestion"),this.elementui_page_component_key++},methods:{onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.loading=!0,r.next=3,C["a"].get("http://120.79.36.53:8888/chatbot/delete",{params:{id:e}});case 3:o=r.sent,o.data,t.initCartList(),t.loading=!1;case 7:case"end":return r.stop()}}),r)})))()},refreshPage:function(){location.reload()},gotoDetail:function(e){this.$router.push("/home/chatinfo/"+e)},addChat:function(){this.$router.push("/home/addChat/")},initCartList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/chatbot/page",{params:{page:e.currentPage,pageSize:e.pageSize,question:e.formInline.question}});case 3:r=t.sent,o=r.data,console.log(o),200===o.code&&(e.userlist=o.result.content,e.total=o.result.totalElements,localStorage.setItem("lastPage",e.currentPage),localStorage.setItem("lastQuestion",e.formInline.question)),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.initCartList()}}}),Y=B,G=(r("86c2"),Object(s["a"])(Y,Q,H,!1,null,"06991ced",null)),J=G.exports,K=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增面试问题",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"面试问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1),r("br"),r("el-form-item",{staticClass:"form-item",attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择活动区域"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增面试问题(多个问题换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"面试问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1),r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.interviewPage.apply(null,arguments)}},model:{value:e.formInline.question,callback:function(t){e.$set(e.formInline,"question",t)},expression:"formInline.question"}})],1),r("el-select",{attrs:{placeholder:"请选择"},on:{change:e.interviewPage},model:{value:e.questionType,callback:function(t){e.questionType=t},expression:"questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.interviewPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.userlist}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{prop:"question",label:"面试问题","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"questionTypeName",label:"问题类型","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{style:{color:e.getColorForValue(t.row.questionTypeName)},domProps:{innerHTML:e._s(t.row.questionTypeName)}})]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.question,t.row.questionTypeName)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑面试问题",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{attrs:{label:"面试问题","label-width":e.formLabelWidth}},[r("el-input",{staticClass:"custom-textarea",staticStyle:{"text-align":"left"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1),r("el-form-item",{attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{staticStyle:{"text-align":"left"},attrs:{placeholder:"请选择问题类型"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除吗")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},X=[],Z=(r("d3b7"),r("25f0"),r("159b"),r("b0c0"),{name:"MyInterview",data:function(){return{userlist:[],loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("interviewLastPage"))||1,pageSize:9,total:0,formInline:{question:""},options:[],questionType:0,dialogFormVisible:!1,dialogMutiFormVisible:!1,form:{question:"",questionType:0},formLabelWidth:"120px",dialogVisible:!1,editVisible:!1,currentRowId:null,colorMap:{}}},watch:{"formInline.question":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("interviewLastPage",this.currentPage),this.getQuestionType())},currentPage:function(e){localStorage.setItem("interviewLastPage",e.toString())}},created:function(){this.getQuestionType()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.question="",this.form.questionType=0,this.dialogFormVisible=!0},prepareMutiAdd:function(){this.form.question="",this.form.questionType=0,this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},preEdit:function(e,t,r){this.form.question=t;var o={};this.options.forEach((function(e){o[e.name]=e.questionType})),this.form.questionType=o[r],this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addQuestion(e)},addQuestion:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/interviewQuestion/add",{addType:e,question:t.form.question,questionType:t.form.questionType});case 4:o=r.sent,a=o.data,200===a.code?(t.currentPage=1,t.form.question="",t.form.questionType=0,t.getQuestionType()):(console.error("Received non-200 status code",a),t.errorMsg(a.message)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the question:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/interviewQuestion/update",{id:e.currentRowId,question:e.form.question,questionType:e.form.questionType});case 4:r=t.sent,o=r.data,200===o.code?(e.form.question="",e.form.questionType=0,e.editVisible=!1,e.getQuestionType()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the question:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/interviewQuestion/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.getQuestionType(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},refreshPage:function(){this.getQuestionType(),location.reload()},getQuestionType:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/interviewQuestion/questionType",{params:{}});case 2:r=t.sent,o=r.data,200===o.code&&(e.options=o.result,e.interviewPage());case 5:case"end":return t.stop()}}),t)})))()},interviewPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/interviewQuestion/page",{params:{page:e.currentPage,pageSize:e.pageSize,question:e.formInline.question,questionType:e.questionType}});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,a={},e.options.forEach((function(e){a[e.questionType]=e.name})),o.result.content.forEach((function(e){e.questionTypeName=a[e.questionType]||"Unknown"})),e.userlist=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.getQuestionType()},getColorForValue:function(e){return this.colorMap[e]||(this.colorMap[e]=this.getRandomColor()),this.colorMap[e]},getRandomColor:function(){var e=["red","blue","green","yellow","purple","orange","pink","brown","cyan","magenta","maroon","navy","olive","teal","lime","aqua","silver","gray","white","indigo","violet","lavender","coral","gold","salmon","turquoise","orchid","khaki","slategray","thistle","burlywood","cadetblue","chartreuse","chocolate","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dodgerblue","firebrick","forestgreen","fuchsia","gold","greenyellow","hotpink","indianred","lawngreen","lightcoral","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","orangered","palegoldenrod","palegreen","paleturquoise","palevioletred","peru","powderblue","rosybrown","saddlebrown","seagreen","sienna","skyblue","slateblue","springgreen","tan","thistle","tomato","turquoise","violet"],t=Math.floor(Math.random()*e.length);return e[t]}}}),ee=Z,te=(r("79c3"),Object(s["a"])(ee,K,X,!1,null,"c5d18cf4",null)),re=te.exports,oe=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增算法问题",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"算法问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.questionName,callback:function(t){e.$set(e.form,"questionName",t)},expression:"form.questionName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择活动区域"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"重要程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfImportance,callback:function(t){e.$set(e.form,"degreeOfImportance",t)},expression:"form.degreeOfImportance"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfDifficulty,callback:function(t){e.$set(e.form,"degreeOfDifficulty",t)},expression:"form.degreeOfDifficulty"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易分数","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.difficultyOfScore,callback:function(t){e.$set(e.form,"difficultyOfScore",t)},expression:"form.difficultyOfScore"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣题号","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeNumber,callback:function(t){e.$set(e.form,"leetcodeNumber",t)},expression:"form.leetcodeNumber"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣链接","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeLink,callback:function(t){e.$set(e.form,"leetcodeLink",t)},expression:"form.leetcodeLink"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增算法问题(多个问题换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"算法问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.questionName,callback:function(t){e.$set(e.form,"questionName",t)},expression:"form.questionName"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"随机一题",visible:e.randomFormVisible},on:{"update:visible":function(t){e.randomFormVisible=t}}},[r("el-descriptions",{staticClass:"margin-top",attrs:{title:"随机选择的题目如下:",column:3,border:""}},[r("el-descriptions-item",{model:{value:e.randomAlgorithmic.questionName,callback:function(t){e.$set(e.randomAlgorithmic,"questionName",t)},expression:"randomAlgorithmic.questionName"}},[r("template",{slot:"label"},[e._v("题目名称")]),e._v(" "+e._s(e.randomAlgorithmic.questionName)+" ")],2),r("el-descriptions-item",[r("template",{slot:"label"},[e._v("力扣题号")]),e._v(" "+e._s(e.randomAlgorithmic.leetcodeNumber)+" ")],2),r("el-descriptions-item",{attrs:{"show-overflow-tooltip":""}},[r("template",{slot:"label"},[e._v("力扣链接")]),r("a",{attrs:{href:e.randomAlgorithmic.leetcodeLink,target:"_blank"}},[e._v(e._s(e.randomAlgorithmic.leetcodeLink))])],2)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.randomFormVisible=!1}}},[e._v("取 消")])],1)],1),r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.interviewPage.apply(null,arguments)}},model:{value:e.formInline.questionName,callback:function(t){e.$set(e.formInline,"questionName",t)},expression:"formInline.questionName"}})],1),r("el-select",{attrs:{placeholder:"请选择"},on:{change:e.interviewPage},model:{value:e.questionType,callback:function(t){e.questionType=t},expression:"questionType"}},e._l(e.options,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.interviewPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareRandom}},[e._v("随机一题")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.algorithmicList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"80",sortable:""}}),r("el-table-column",{attrs:{prop:"questionName",label:"算法问题","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"questionTypeName",label:"问题类型","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{style:{color:e.getColorForValue(t.row.questionTypeName)},domProps:{innerHTML:e._s(t.row.questionTypeName)}})]}}])}),r("el-table-column",{attrs:{prop:"degreeOfImportance",label:"重要程度","show-overflow-tooltip":"",width:50}}),r("el-table-column",{attrs:{prop:"degreeOfDifficulty",label:"难易程度","show-overflow-tooltip":"",width:50}}),r("el-table-column",{attrs:{prop:"difficultyOfScore",label:"难易分数","show-overflow-tooltip":"",width:80}}),r("el-table-column",{attrs:{prop:"leetcodeNumber",label:"力扣题号","show-overflow-tooltip":"",width:50}}),r("el-table-column",{attrs:{label:"力扣链接","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{attrs:{href:t.row.leetcodeLink,target:"_blank"}},[e._v(e._s(t.row.leetcodeLink))])]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.questionName,t.row.questionTypeName,t.row.degreeOfImportance,t.row.degreeOfDifficulty,t.row.difficultyOfScore,t.row.leetcodeNumber,t.row.leetcodeLink)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑算法问题",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"算法问题","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.questionName,callback:function(t){e.$set(e.form,"questionName",t)},expression:"form.questionName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"问题类型","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择活动区域"},model:{value:e.form.questionType,callback:function(t){e.$set(e.form,"questionType",t)},expression:"form.questionType"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.questionType,attrs:{label:e.name,value:e.questionType}})})),1)],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"重要程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfImportance,callback:function(t){e.$set(e.form,"degreeOfImportance",t)},expression:"form.degreeOfImportance"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易程度","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.degreeOfDifficulty,callback:function(t){e.$set(e.form,"degreeOfDifficulty",t)},expression:"form.degreeOfDifficulty"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"难易分数","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.difficultyOfScore,callback:function(t){e.$set(e.form,"difficultyOfScore",t)},expression:"form.difficultyOfScore"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣题号","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeNumber,callback:function(t){e.$set(e.form,"leetcodeNumber",t)},expression:"form.leetcodeNumber"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"力扣链接","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.leetcodeLink,callback:function(t){e.$set(e.form,"leetcodeLink",t)},expression:"form.leetcodeLink"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除吗")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},ae=[],ne={name:"MyInterview",data:function(){return{algorithmicList:[],randomAlgorithmic:{questionName:"",leetcodeNumber:"",leetcodeLink:""},loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("algorithmLastPage"))||1,pageSize:9,total:0,formInline:{questionName:""},options:[],allOptions:[],questionType:0,dialogFormVisible:!1,randomFormVisible:!1,dialogMutiFormVisible:!1,form:{questionName:"",questionType:0,degreeOfImportance:5,degreeOfDifficulty:1,difficultyOfScore:1200,leetcodeNumber:"",leetcodeLink:""},formLabelWidth:"120px",dialogVisible:!1,editVisible:!1,currentRowId:null,colorMap:{}}},watch:{"formInline.questionName":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("algorithmLastPage",this.currentPage),this.getQuestionType())},currentPage:function(e){localStorage.setItem("algorithmLastPage",e.toString())}},created:function(){this.getQuestionType(),this.getAllQuestionType()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.questionName="",this.form.questionType=0,this.dialogFormVisible=!0,this.getAllQuestionType()},prepareRandom:function(){this.randomAlgorithmic=[],this.randomFormVisible=!0,this.interviewRandom()},prepareMutiAdd:function(){this.form.questionName="",this.form.questionType=0,this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},preEdit:function(e,t,r,o,a,n,i,l){this.form.questionName=t,this.form.degreeOfImportance=o,this.form.degreeOfDifficulty=a,this.form.difficultyOfScore=n,this.form.leetcodeNumber=i,this.form.leetcodeLink=l;var s={};this.options.forEach((function(e){s[e.name]=e.questionType})),this.form.questionType=s[r],this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addQuestion(e)},addQuestion:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/algorithmicProblem/add",{addType:e,questionName:t.form.questionName,questionType:t.form.questionType,degreeOfImportance:t.form.degreeOfImportance,degreeOfDifficulty:t.form.degreeOfDifficulty,difficultyOfScore:t.form.difficultyOfScore,leetcodeNumber:t.form.leetcodeNumber,leetcodeLink:t.form.leetcodeLink});case 4:o=r.sent,a=o.data,200===a.code?(t.currentPage=1,t.form.questionName="",t.form.questionType=0,t.form.degreeOfImportance=5,t.form.degreeOfDifficulty=1,t.form.difficultyOfScore=1200,t.form.leetcodeNumber="",t.form.leetcodeLink="",t.getQuestionType()):(console.error("Received non-200 status code",a),t.errorMsg(a.message)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the questionName:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/algorithmicProblem/update",{id:e.currentRowId,questionName:e.form.questionName,questionType:e.form.questionType,degreeOfImportance:e.form.degreeOfImportance,degreeOfDifficulty:e.form.degreeOfDifficulty,difficultyOfScore:e.form.difficultyOfScore,leetcodeNumber:e.form.leetcodeNumber,leetcodeLink:e.form.leetcodeLink});case 4:r=t.sent,o=r.data,200===o.code?(e.form.questionName="",e.form.questionType=0,e.editVisible=!1,e.getQuestionType()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the questionName:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.getQuestionType(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},refreshPage:function(){this.getQuestionType(),location.reload()},getQuestionType:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/questionType",{params:{}});case 2:r=t.sent,o=r.data,200===o.code&&(e.options=o.result,console.log(e.options),e.interviewPage());case 5:case"end":return t.stop()}}),t)})))()},getAllQuestionType:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/allQuestionType",{params:{}});case 2:r=t.sent,o=r.data,200===o.code&&(e.allOptions=o.result);case 5:case"end":return t.stop()}}),t)})))()},interviewPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/page",{params:{page:e.currentPage,pageSize:e.pageSize,questionName:e.formInline.questionName,questionType:e.questionType}});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,a={},e.options.forEach((function(e){a[e.questionType]=e.name})),o.result.content.forEach((function(e){e.questionTypeName=a[e.questionType]})),e.algorithmicList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},interviewRandom:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/algorithmicProblem/random",{params:{}});case 3:r=t.sent,o=r.data,200===o.code&&(e.randomAlgorithmic.questionName=o.result.questionName,e.randomAlgorithmic.leetcodeNumber=o.result.leetcodeNumber,e.randomAlgorithmic.leetcodeLink=o.result.leetcodeLink),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.getQuestionType()},getColorForValue:function(e){return this.colorMap[e]||(this.colorMap[e]=this.getRandomColor()),this.colorMap[e]},getRandomColor:function(){var e=["red","blue","green","yellow","purple","orange","pink","brown","cyan","magenta","maroon","navy","olive","teal","lime","aqua","silver","gray","white","indigo","violet","lavender","coral","gold","salmon","turquoise","orchid","khaki","slategray","thistle","burlywood","cadetblue","chartreuse","chocolate","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dodgerblue","firebrick","forestgreen","fuchsia","gold","greenyellow","hotpink","indianred","lawngreen","lightcoral","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","orangered","palegoldenrod","palegreen","paleturquoise","palevioletred","peru","powderblue","rosybrown","saddlebrown","seagreen","sienna","skyblue","slateblue","springgreen","tan","thistle","tomato","turquoise","violet"],t=Math.floor(Math.random()*e.length);return e[t]}}},ie=ne,le=(r("b630"),Object(s["a"])(ie,oe,ae,!1,null,"3f842b70",null)),se=le.exports,ce=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增诗词",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"诗词内容","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.poetryText,callback:function(t){e.$set(e.form,"poetryText",t)},expression:"form.poetryText"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增诗词内容(多个诗词换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"诗词内容","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.poetryText,callback:function(t){e.$set(e.form,"poetryText",t)},expression:"form.poetryText"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1),r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"随机一诗词",visible:e.randomFormVisible},on:{"update:visible":function(t){e.randomFormVisible=t}}},[r("el-descriptions",{staticClass:"margin-top",attrs:{title:"随机选择的诗词如下:",column:3,border:""}},[r("el-descriptions-item",{model:{value:e.randomAlgorithmic.poetryText,callback:function(t){e.$set(e.randomAlgorithmic,"poetryText",t)},expression:"randomAlgorithmic.poetryText"}},[r("template",{slot:"label"},[e._v("诗词内容")]),e._v(" "+e._s(e.randomAlgorithmic.poetryText)+" ")],2)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.randomFormVisible=!1}}},[e._v("取 消")])],1)],1),r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入问题"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.interviewPage.apply(null,arguments)}},model:{value:e.formInline.poetryText,callback:function(t){e.$set(e.formInline,"poetryText",t)},expression:"formInline.poetryText"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.interviewPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareRandom}},[e._v("随机一题")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.algorithmicList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"80",sortable:""}}),r("el-table-column",{attrs:{prop:"poetryText",label:"内容","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.poetryText)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑算法问题",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"内容","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.poetryText,callback:function(t){e.$set(e.form,"poetryText",t)},expression:"form.poetryText"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除吗")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},ue=[],me={name:"MyInterview",data:function(){return{algorithmicList:[],randomAlgorithmic:{poetryText:""},loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("poetryLastPage"))||1,pageSize:9,total:0,formInline:{poetryText:""},dialogFormVisible:!1,randomFormVisible:!1,dialogMutiFormVisible:!1,form:{poetryText:""},formLabelWidth:"120px",dialogVisible:!1,editVisible:!1,currentRowId:null}},watch:{"formInline.poetryText":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("poetryLastPage",this.currentPage),this.interviewPage())},currentPage:function(e){localStorage.setItem("poetryLastPage",e.toString())}},created:function(){this.interviewPage()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.poetryText="",this.dialogFormVisible=!0},prepareRandom:function(){this.randomAlgorithmic=[],this.randomFormVisible=!0,this.interviewRandom()},prepareMutiAdd:function(){this.form.poetryText="",this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},preEdit:function(e,t){this.form.poetryText=t,this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addQuestion(e)},addQuestion:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/aphorismPoetry/add",{addType:e,poetryText:t.form.poetryText,degreeOfImportance:t.form.degreeOfImportance,degreeOfDifficulty:t.form.degreeOfDifficulty,difficultyOfScore:t.form.difficultyOfScore,leetcodeNumber:t.form.leetcodeNumber,leetcodeLink:t.form.leetcodeLink});case 4:o=r.sent,a=o.data,200===a.code?(t.form.poetryText="",t.currentPage=1,t.interviewPage()):(console.error("Received non-200 status code",a),t.errorMsg(a.message)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the poetryText:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/aphorismPoetry/update",{id:e.currentRowId,poetryText:e.form.poetryText});case 4:r=t.sent,o=r.data,200===o.code?(e.form.poetryText="",e.editVisible=!1,e.interviewPage()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the poetryText:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.interviewPage(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},refreshPage:function(){this.interviewPage(),location.reload()},interviewPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/page",{params:{page:e.currentPage,pageSize:e.pageSize,poetryText:e.formInline.poetryText}});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,e.algorithmicList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},interviewRandom:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/aphorismPoetry/random",{params:{}});case 3:r=t.sent,o=r.data,200===o.code&&(e.randomAlgorithmic.poetryText=o.result.poetryText),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.interviewPage()}}},de=me,fe=(r("4341"),Object(s["a"])(de,ce,ue,!1,null,"6bb76c1c",null)),pe=fe.exports,ge=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入用户名"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.userPage.apply(null,arguments)}},model:{value:e.formInline.userName,callback:function(t){e.$set(e.formInline,"userName",t)},expression:"formInline.userName"}})],1),r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"请输入用户昵称"},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.userPage.apply(null,arguments)}},model:{value:e.formInline.nickName,callback:function(t){e.$set(e.formInline,"nickName",t)},expression:"formInline.nickName"}})],1),r("el-select",{attrs:{placeholder:"请选择权重"},on:{change:e.userPage},model:{value:e.formInline.userWeight,callback:function(t){e.$set(e.formInline,"userWeight",t)},expression:"formInline.userWeight"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("el-select",{attrs:{placeholder:"请选择文章类型"},on:{change:e.userPage},model:{value:e.formInline.articleType,callback:function(t){e.$set(e.formInline,"articleType",t)},expression:"formInline.articleType"}},e._l(e.articleType,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1),r("el-select",{attrs:{placeholder:"请选择点赞状态"},on:{change:e.userPage},model:{value:e.formInline.likeStatus,callback:function(t){e.$set(e.formInline,"likeStatus",t)},expression:"formInline.likeStatus"}},e._l(e.likeStatus,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("el-select",{attrs:{placeholder:"请选择收藏状态"},on:{change:e.userPage},model:{value:e.formInline.collectStatus,callback:function(t){e.$set(e.formInline,"collectStatus",t)},expression:"formInline.collectStatus"}},e._l(e.collectStatus,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("el-select",{attrs:{placeholder:"请选择评论状态"},on:{change:e.userPage},model:{value:e.formInline.commentStatus,callback:function(t){e.$set(e.formInline,"commentStatus",t)},expression:"formInline.commentStatus"}},e._l(e.commentStatus,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1),r("br"),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.userPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAllTriplet}},[e._v("三连")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.allTripletDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.allTripletDialogVisible=t}}},[r("span",[e._v("确认三连吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.allTripletDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.allTriplet()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"warning"},on:{click:e.prepareReset}},[e._v("重置全员状态")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.resetDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetDialogVisible=t}}},[r("span",[e._v("确认重置全员状态吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.reset()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareResetUser}},[e._v("新的一天")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.resetUserDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetUserDialogVisible=t}}},[r("span",[e._v("确认重置新一天用户状态吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetUserDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.resetUser()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"success"},on:{click:e.prepareAutoReply}},[e._v("自动评论")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.autoReplyDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.autoReplyDialogVisible=t}}},[r("span",[e._v("确认自动评论吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.autoReplyDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.autoReply()}}},[e._v("确 定")])],1)]),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareAdd}},[e._v("新增")]),r("el-dialog",{staticStyle:{width:"100%"},attrs:{title:"新增用户",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"用户名称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),r("br"),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户昵称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.nickName,callback:function(t){e.$set(e.form,"nickName",t)},expression:"form.nickName"}})],1),r("br"),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户权重","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.userWeight,callback:function(t){e.$set(e.form,"userWeight",t)},expression:"form.userWeight"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(0)}}},[e._v("确 定")])],1)],1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareMutiAdd}},[e._v("批量新增")]),r("el-dialog",{staticClass:"red-title",attrs:{visible:e.dialogMutiFormVisible},on:{"update:visible":function(t){e.dialogMutiFormVisible=t}}},[r("div",{staticClass:"red-title",attrs:{slot:"title"},slot:"title"},[e._v("批量新增用户(多个用户换行填写)")]),r("el-form",{staticClass:"custom-form",attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"用户名称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",autocomplete:"off",rows:5,cols:30},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogMutiFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm(1)}}},[e._v("确 定")])],1)],1)],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.csdnUserList}},[r("el-table-column",{attrs:{prop:"userName",label:"用户名称","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"nickName",label:"用户昵称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{attrs:{href:t.row.userHomeUrl,target:"_blank"}},[e._v(e._s(t.row.nickName))])]}}])}),r("el-table-column",{attrs:{prop:"likeStatusName",label:"点赞状态","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"collectStatusName",label:"收藏状态","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"commentStatusName",label:"评论状态","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"userWeightName",label:"用户权重","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"articleType",label:"文章类型","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"更新时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.updateTime))+" ")]}}])}),r("el-table-column",{attrs:{prop:"操作",label:"操作",width:"310px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"primary"},on:{click:function(r){return e.prepareTriplet(t.row.userName)}}},[e._v("三连")]),r("el-dialog",{attrs:{title:"提示",visible:e.tripletVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.tripletVisible=t}}},[r("span",[e._v("确认三连?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.tripletVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.triplet(e.currentUserName)}}},[e._v("确 定")])],1)]),r("el-button",{attrs:{type:"warning"},on:{click:function(r){return e.prepareResetUserDayStatus(t.row.userName)}}},[e._v("重置")]),r("el-dialog",{attrs:{title:"提示",visible:e.resetUserDayStatusVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetUserDayStatusVisible=t}}},[r("span",[e._v("确认重置?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetUserDayStatusVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.resetUserDayStatus(e.currentUserName)}}},[e._v("确 定")])],1)]),r("el-button",{attrs:{type:"success",width:"200"},on:{click:function(r){return r.preventDefault(),e.preEdit(t.row.id,t.row.userName,t.row.nickName,t.row.userWeight)}}},[e._v("编辑")]),r("el-dialog",{attrs:{title:"编辑用户信息",visible:e.editVisible},on:{"update:visible":function(t){e.editVisible=t}}},[r("el-form",{attrs:{model:e.form}},[r("el-form-item",{staticClass:"form-item",attrs:{label:"用户名称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户昵称","label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.form.nickName,callback:function(t){e.$set(e.form,"nickName",t)},expression:"form.nickName"}})],1),r("el-form-item",{staticClass:"form-item",attrs:{label:"用户权重","label-width":e.formLabelWidth}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.userWeight,callback:function(t){e.$set(e.form,"userWeight",t)},expression:"form.userWeight"}},e._l(e.allOptions,(function(e){return r("el-option",{key:e.type,attrs:{label:e.name,value:e.type}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.editVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.editConfirm}},[e._v("确 定")])],1)],1),r("el-button",{attrs:{type:"danger"},on:{click:function(r){return e.prepareDelete(t.row.id)}}},[e._v("删除")]),r("el-dialog",{attrs:{title:"提示",visible:e.dialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("span",[e._v("确认删除?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.onDelete(e.currentRowId)}}},[e._v("确 定")])],1)])]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},he=[],be={name:"MyCsdnUser",data:function(){return{form:{userName:"",nickName:"",userWeight:null},formInline:{userName:"",nickName:"",articleType:"",likeStatus:null,collectStatus:null,commentStatus:null},allOptions:[{type:-1,name:"全部"},{type:9,name:"铁子"},{type:8,name:"闺蜜"},{type:7,name:"基友"},{type:0,name:"默认"}],articleType:["全部","blog","blink","download","ask"],likeStatus:[{type:-1,name:"全部"},{type:0,name:"未处理"},{type:1,name:"已经点过赞"},{type:2,name:"点赞已满"},{type:3,name:"取消点赞"},{type:9,name:"点赞成功"}],collectStatus:[{type:-1,name:"全部"},{type:0,name:"未处理"},{type:1,name:"已经收藏过"},{type:2,name:"收藏已满"},{type:3,name:"参数缺失"},{type:9,name:"收藏成功"}],commentStatus:[{type:-1,name:"全部"},{type:0,name:"未处理"},{type:1,name:"已经评论过"},{type:2,name:"评论已满"},{type:3,name:"禁言"},{type:4,name:"评论太快"},{type:5,name:"评论已经到了49条"},{type:8,name:"其他错误"},{type:9,name:"评论成功"}],dialogFormVisible:!1,dialogMutiFormVisible:!1,dialogVisible:!1,editVisible:!1,tripletVisible:!1,allTripletDialogVisible:!1,resetDialogVisible:!1,autoReplyDialogVisible:!1,resetUserDialogVisible:!1,resetUserDayStatusVisible:!1,csdnUserList:[],loading:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("csdnUserPage"))||1,pageSize:9,total:0,formLabelWidth:"120px",currentRowId:null,currentUserName:null}},watch:{"formInline.userName":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("csdnUserPage",this.currentPage),this.userPage())},"formInline.nickName":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("csdnUserPage",this.currentPage),this.userPage())},currentPage:function(e){localStorage.setItem("csdnUserPage",e.toString())}},created:function(){this.userPage()},mounted:function(){this.currentPage=1},methods:{prepareAdd:function(){this.form.userName="",this.form.nickName="",this.dialogFormVisible=!0},prepareAllTriplet:function(){this.allTripletDialogVisible=!0},prepareResetUserDayStatus:function(e){this.resetUserDayStatusVisible=!0,this.currentUserName=e},prepareReset:function(){this.resetDialogVisible=!0},prepareAutoReply:function(){this.autoReplyDialogVisible=!0},prepareResetUser:function(){this.resetUserDialogVisible=!0},prepareMutiAdd:function(){this.form.userName="",this.dialogMutiFormVisible=!0},prepareDelete:function(e){this.currentRowId=e,this.dialogVisible=!0},prepareTriplet:function(e){this.currentUserName=e,this.tripletVisible=!0},preEdit:function(e,t,r,o){this.form.userName=t,this.form.nickName=r,this.form.userWeight=o,this.currentRowId=e,this.editVisible=!0},handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},handleConfirm:function(e){this.dialogFormVisible=!1,this.dialogMutiFormVisible=!1,this.addUser(e)},addUser:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,t.loading=!0,r.next=4,C["a"].post("http://120.79.36.53:8888/csdn/user/add",{addType:e,userName:t.form.userName,nickName:t.form.nickName,userWeight:t.form.userWeight});case 4:o=r.sent,a=o.data,200===a.code?(t.currentPage=1,t.form.userName="",t.form.nickName="",t.form.userWeight=null,t.userPage()):(t.errorMsg(a.message),console.error("Received non-200 status code",a)),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.error("An error occurred while adding the questionName:",r.t0);case 12:return r.prev=12,t.loading=!1,r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[0,9,12,15]])})))()},errorMsg:function(e){this.$message({showClose:!0,message:e,type:"error"})},editConfirm:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,t.next=4,C["a"].post("http://120.79.36.53:8888/csdn/user/update",{id:e.currentRowId,userName:e.form.userName,nickName:e.form.nickName,userWeight:e.form.userWeight});case 4:r=t.sent,o=r.data,200===o.code?(e.form.userName="",e.form.nickName="",e.form.userWeight=null,e.editVisible=!1,e.userPage()):console.error("Received non-200 status code",o),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("An error occurred while adding the questionName:",t.t0);case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})))()},autoReply:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,e.autoReplyDialogVisible=!1,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/autoReply");case 4:r=t.sent,o=r.data,200===o.code?e.userPage():console.error("Received non-200 status code",o),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},allTriplet:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,e.allTripletDialogVisible=!1,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/multiTriplet");case 4:r=t.sent,o=r.data,200===o.code?e.userPage():console.error("Received non-200 status code",o),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},triplet:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.loading=!0,t.currentUserName=null,t.tripletVisible=!1,r.next=5,C["a"].get("http://120.79.36.53:8888/csdn/singleTriplet?username="+e);case 5:o=r.sent,a=o.data,200===a.code?t.userPage():console.error("Received non-200 status code",a),t.loading=!1;case 9:case"end":return r.stop()}}),r)})))()},resetUserDayStatus:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.loading=!0,t.currentUserName=null,t.resetUserDayStatusVisible=!1,r.next=5,C["a"].get("http://120.79.36.53:8888/csdn/resetCsdnUserInfo?username="+e);case 5:o=r.sent,a=o.data,200===a.code?t.userPage():console.error("Received non-200 status code",a),t.loading=!1;case 9:case"end":return r.stop()}}),r)})))()},onDelete:function(e){var t=this;return Object(x["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.dialogVisible=!1,t.loading=!0,r.next=4,C["a"].get("http://120.79.36.53:8888/csdn/user/delete",{params:{id:e}});case 4:o=r.sent,o.data,t.userPage(),t.loading=!1;case 8:case"end":return r.stop()}}),r)})))()},reset:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.resetDialogVisible=!1,e.loading=!0,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/resetAllCurrentStatus");case 4:r=t.sent,r.data,e.userPage(),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},resetUser:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.resetUserDialogVisible=!1,e.loading=!0,t.next=4,C["a"].get("http://120.79.36.53:8888/csdn/resetUserDayStatus");case 4:r=t.sent,r.data,e.userPage(),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},refreshPage:function(){this.userPage(),location.reload()},userPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o,a,n,i,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].post("http://120.79.36.53:8888/csdn/user/page",{page:e.currentPage,pageSize:e.pageSize,userName:e.formInline.userName,nickName:e.formInline.nickName,articleType:"全部"==e.formInline.articleType?"":e.formInline.articleType,userWeight:-1==e.formInline.userWeight?null:e.formInline.userWeight,likeStatus:-1==e.formInline.likeStatus?null:e.formInline.likeStatus,collectStatus:-1==e.formInline.collectStatus?null:e.formInline.collectStatus,commentStatus:-1==e.formInline.commentStatus?null:e.formInline.commentStatus});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,a={},e.allOptions.forEach((function(e){a[e.type]=e.name})),o.result.content.forEach((function(e){e.userWeightName=a[e.userWeight]})),n={},e.likeStatus.forEach((function(e){n[e.type]=e.name})),o.result.content.forEach((function(e){e.likeStatusName=n[e.likeStatus]})),i={},e.collectStatus.forEach((function(e){i[e.type]=e.name})),o.result.content.forEach((function(e){e.collectStatusName=i[e.collectStatus]})),l={},e.commentStatus.forEach((function(e){l[e.type]=e.name})),o.result.content.forEach((function(e){e.commentStatusName=l[e.commentStatus]})),e.csdnUserList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.userPage()}}},ye=be,ve=(r("e97b"),Object(s["a"])(ye,ge,he,!1,null,"d1510630",null)),we=ve.exports,ke=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-container",[r("el-main",[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.formInline}},[r("el-form-item",[r("el-date-picker",{attrs:{type:"date",placeholder:"选择开始日期","value-format":"yyyy-MM-dd"},model:{value:e.formInline.startDate,callback:function(t){e.$set(e.formInline,"startDate",t)},expression:"formInline.startDate"}})],1),r("el-form-item",[r("el-date-picker",{attrs:{type:"date",placeholder:"选择结束日期","value-format":"yyyy-MM-dd"},model:{value:e.formInline.endDate,callback:function(t){e.$set(e.formInline,"endDate",t)},expression:"formInline.endDate"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.tripletDayInfoPage}},[e._v("查询")])],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.prepareReset}},[e._v("重置")])],1),r("el-dialog",{attrs:{title:"提示",visible:e.resetDialogVisible,width:"30%","before-close":e.handleClose},on:{"update:visible":function(t){e.resetDialogVisible=t}}},[r("span",[e._v("确认重置吗?")]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.resetDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return t.preventDefault(),e.reset()}}},[e._v("确 定")])],1)])],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{border:"",data:e.tripletDayInfoList}},[r("el-table-column",{attrs:{prop:"id",label:"序号",width:"100",sortable:""}}),r("el-table-column",{attrs:{label:"三连时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateDayFormat")(t.row.tripletDate))+" ")]}}])}),r("el-table-column",{attrs:{prop:"likeNum",label:"点赞数量","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"collectNum",label:"收藏数量","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"commentNum",label:"评论数量","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{label:"创建时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.createTime))+" ")]}}])}),r("el-table-column",{attrs:{label:"更新时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e._f("dateFormat")(t.row.updateTime))+" ")]}}])})],1),r("el-pagination",{key:e.elementui_page_component_key,staticClass:"pagination",attrs:{background:"","current-page":e.currentPage,"page-size":e.pageSize,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"current-change":e.handleCurrentChange}})],1),r("el-backtop",{staticClass:"backtop"})],1)],1)},_e=[],xe={name:"MyTripletDayInfo",data:function(){return{formInline:{startDate:null,endDate:null},tripletDayInfoList:[],loading:!1,resetDialogVisible:!1,elementui_page_component_key:0,currentPage:Number(localStorage.getItem("csdnTripletDayInfoPage"))||1,pageSize:9,total:0}},watch:{"formInline.startDate":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("csdnTripletDayInfoPage",this.currentPage),this.tripletDayInfoPage())},"formInline.endDate":function(e,t){e!==t&&(this.currentPage=1,localStorage.setItem("csdnTripletDayInfoPage",this.currentPage),this.tripletDayInfoPage())},currentPage:function(e){localStorage.setItem("csdnTripletDayInfoPage",e.toString())}},created:function(){this.tripletDayInfoPage()},mounted:function(){this.currentPage=1},methods:{prepareReset:function(){this.resetDialogVisible=!0},tripletDayInfoPage:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].post("http://120.79.36.53:8888/dayInfo/page",{page:e.currentPage,pageSize:e.pageSize,startDate:e.formInline.startDate,endDate:e.formInline.endDate});case 3:r=t.sent,o=r.data,200===o.code&&(e.total=o.result.totalElements,e.tripletDayInfoList=o.result.content),e.loading=!1;case 7:case"end":return t.stop()}}),t)})))()},reset:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,C["a"].get("http://120.79.36.53:8888/dayInfo/add");case 3:r=t.sent,r.data,e.resetDialogVisible=!1,e.tripletDayInfoPage(),e.loading=!1;case 8:case"end":return t.stop()}}),t)})))()},handleCurrentChange:function(e){this.currentPage=e,this.tripletDayInfoPage()},refreshPage:function(){this.tripletDayInfoPage(),location.reload()}}},Ce=xe,Ie=(r("f4fc"),Object(s["a"])(Ce,ke,_e,!1,null,"77361692",null)),Se=Ie.exports,Te=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-button",{attrs:{type:"primary",plain:"",size:"medium"},on:{click:e.goBack}},[e._v("后退")]),r("h4",{staticClass:"text-center"},[e._v("ChatGpt问答详情 --- "+e._s(e.id))]),r("el-container",[r("el-main",[r("el-table",{attrs:{border:"",data:e.list}},[r("el-table-column",{attrs:{label:"序号",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.id))])]}}])}),r("el-table-column",{attrs:{label:"问题",width:"240"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.question))])]}}])}),r("el-table-column",{attrs:{label:"回答"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{attrs:{id:"td-response"}},[e._v(e._s(t.row.response))])]}}])}),r("el-table-column",{attrs:{label:"创建时间",width:"170"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e._f("dateFormat")(t.row.createTime)))])]}}])})],1)],1)],1),r("div",{staticClass:"button-container"},[r("el-button",{attrs:{type:"primary",round:""},on:{click:e.copyCode}},[e._v("复制回答")])],1)],1)},qe=[],Pe={name:"MyChatDetail",props:["id"],data:function(){return{list:[]}},created:function(){this.initChatList()},methods:{goBack:function(){var e={back:"back"};this.$router.push({path:"/home/chat",query:e})},initChatList:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,C["a"].get("http://120.79.36.53:8888/chatbot/"+e.id);case 2:r=t.sent,o=r.data,200===o.code&&(e.list=[{id:o.result.id,question:o.result.question,response:o.result.response,createTime:o.result.createTime}]);case 5:case"end":return t.stop()}}),t)})))()},copyCode:function(){var e=document.getElementById("td-response"),t=document.createRange();t.selectNode(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(t),document.execCommand("copy"),r.removeAllRanges(),this.$message.success("代码已复制到剪贴板")}}},Ne=Pe,Ve=(r("022e"),Object(s["a"])(Ne,Te,qe,!1,null,"9d5d30a4",null)),Re=Ve.exports,De=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-button",{attrs:{type:"primary",plain:"",size:"medium"},on:{click:e.goBack}},[e._v("后退")]),r("h4",{staticClass:"text-center"},[e._v("新增ChatGpt问答")]),r("el-container",{staticClass:"container"},[r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"问题"}},[r("el-input",{model:{value:e.form.question,callback:function(t){e.$set(e.form,"question",t)},expression:"form.question"}})],1),r("el-form-item",{attrs:{label:"答案"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.form.response,callback:function(t){e.$set(e.form,"response",t)},expression:"form.response"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("立即创建")]),r("el-button",{on:{click:e.clearContent}},[e._v("取消")])],1)],1)],1)],1)},Oe=[],Le={name:"AddChatDetail",data:function(){return{form:{question:"",response:""}}},methods:{clearContent:function(){this.form.question="",this.form.response=""},onSubmit:function(){var e=this;return Object(x["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r={question:e.form.question,response:e.form.response},C["a"].post("http://120.79.36.53:8888/chatbot",r).then((function(t){200===t.data.code&&(e.$message.success({message:"问题和答案新增成功",duration:1e3}),e.goBack())})).catch((function(t){e.$message.error("系统异常")}));case 2:case"end":return t.stop()}}),t)})))()},goBack:function(){var e={back:"back",add:"add"};this.$router.push({path:"/home/chat",query:e})}}},$e=Le,Me=(r("66f9"),Object(s["a"])($e,De,Oe,!1,null,"ddc6c3e0",null)),Fe=Me.exports;o["default"].use(m["a"]);var je=new m["a"]({routes:[{path:"/",redirect:"/login"},{path:"/login",component:y,meta:{title:"登录"}},{path:"/home",component:F,redirect:"/home/interview",children:[{path:"interview",component:re,meta:{title:"面试题"}},{path:"algorithmic",component:se,meta:{title:"算法题"}},{path:"aphorismpoetry",component:pe,meta:{title:"名言警句"}},{path:"chat",component:J,meta:{title:"chatgpt记录"}},{path:"pic",component:z,meta:{title:"图片"}},{path:"csdnUser",component:we,meta:{title:"用户管理"}},{path:"tripletDayInfo",component:Se,meta:{title:"三连管理"}},{path:"chatinfo/:id",component:Re,props:!0,meta:{title:"chat信息"}},{path:"addChat",component:Fe,meta:{title:"添加chat信息"}}]}]});je.beforeEach((function(e,t,r){if(-1!==d.indexOf(e.path)){var o=localStorage.getItem("token");o?r():r("/login")}else r()}));var Ae=je,We=r("5c96"),Ue=r.n(We),Ee=(r("0fae"),r("16b4"),r("a766"),r("5a0c")),ze=r.n(Ee);o["default"].prototype.$dayjs=ze.a,o["default"].filter("dateFormat",(function(e){var t=ze()(e).format("YYYY-MM-DD HH:mm:ss");return t})),o["default"].filter("dateDayFormat",(function(e){var t=ze()(e).format("YYYY-MM-DD");return t})),o["default"].use(Ue.a),o["default"].config.productionTip=!1,Ae.beforeEach((function(e,t,r){e.meta.title&&(document.title=e.meta.title),r()})),new o["default"]({render:function(e){return e(u)},router:Ae}).$mount("#app")},"5df7":function(e,t,r){},"66f9":function(e,t,r){"use strict";r("155e")},7247:function(e,t,r){},7678:function(e,t,r){e.exports=r.p+"img/kwan.80e90605.png"},"79c3":function(e,t,r){"use strict";r("5df7")},"7f28":function(e,t,r){},"808c":function(e,t,r){},"80ff":function(e,t,r){},"86c2":function(e,t,r){"use strict";r("7247")},9290:function(e,t,r){"use strict";r("b8d3")},a766:function(e,t,r){},b630:function(e,t,r){"use strict";r("5060")},b8d3:function(e,t,r){},c021:function(e,t,r){},c3dd:function(e,t,r){"use strict";r("38b7")},e97b:function(e,t,r){"use strict";r("80ff")},f4fc:function(e,t,r){"use strict";r("c021")}});
//# sourceMappingURL=app.f519624b.js.map
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -161,384 +161,384 @@
<script>
import axios from 'axios'
export default {
name: 'MyInterview',
name: 'MyInterview',
data() {
return {
// 用户列表数据
algorithmicList: [],
randomAlgorithmic: {
questionName: '',
leetcodeNumber: '',
leetcodeLink: '',
},
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('algorithmLastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
questionName: '',
},
options: [],
allOptions: [],
questionType: 0,
// 新增的内容
dialogFormVisible: false,
randomFormVisible: false,
dialogMutiFormVisible: false,
form: {
questionName: '',
questionType: 0,
degreeOfImportance: 5,
degreeOfDifficulty: 1,
difficultyOfScore: 1200,
leetcodeNumber: '',
leetcodeLink: '',
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
colorMap: {}, // 创建一个空的颜色映射关系对象
}
},
watch: {
'formInline.questionName'(newVal) {
if (newVal === '') {
this.currentPage = 1
localStorage.setItem('algorithmLastPage', this.currentPage)
this.getQuestionType()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('algorithmLastPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.getQuestionType()
//获取问题类型的枚举
this.getAllQuestionType()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareAdd() {
this.form.questionName = ''
this.form.questionType = 0
this.dialogFormVisible = true
//获取问题类型的枚举
this.getAllQuestionType()
},
prepareRandom() {
this.randomAlgorithmic = []
this.randomFormVisible = true
this.interviewRandom()
},
prepareMutiAdd() {
this.form.questionName = ''
this.form.questionType = 0
this.dialogMutiFormVisible = true
},
data() {
return {
// 用户列表数据
algorithmicList: [],
randomAlgorithmic: {
questionName: '',
leetcodeNumber: '',
leetcodeLink: '',
},
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('algorithmLastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
questionName: '',
},
options: [],
allOptions: [],
questionType: 0,
// 新增的内容
dialogFormVisible: false,
randomFormVisible: false,
dialogMutiFormVisible: false,
form: {
questionName: '',
questionType: 0,
degreeOfImportance: 5,
degreeOfDifficulty: 1,
difficultyOfScore: 1200,
leetcodeNumber: '',
leetcodeLink: '',
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
colorMap: {}, // 创建一个空的颜色映射关系对象
}
},
watch: {
'formInline.questionName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('algorithmLastPage', this.currentPage)
this.getQuestionType()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('algorithmLastPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.getQuestionType()
//获取问题类型的枚举
this.getAllQuestionType()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareAdd() {
this.form.questionName = ''
this.form.questionType = 0
this.dialogFormVisible = true
//获取问题类型的枚举
this.getAllQuestionType()
},
prepareRandom() {
this.randomAlgorithmic = []
this.randomFormVisible = true
this.interviewRandom()
},
prepareMutiAdd() {
this.form.questionName = ''
this.form.questionType = 0
this.dialogMutiFormVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, questionName, questionTypeName, degreeOfImportance, degreeOfDifficulty, difficultyOfScore, leetcodeNumber, leetcodeLink) {
this.form.questionName = questionName
this.form.degreeOfImportance = degreeOfImportance
this.form.degreeOfDifficulty = degreeOfDifficulty
this.form.difficultyOfScore = difficultyOfScore
this.form.leetcodeNumber = leetcodeNumber
this.form.leetcodeLink = leetcodeLink
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, questionName, questionTypeName, degreeOfImportance, degreeOfDifficulty, difficultyOfScore, leetcodeNumber, leetcodeLink) {
this.form.questionName = questionName
this.form.degreeOfImportance = degreeOfImportance
this.form.degreeOfDifficulty = degreeOfDifficulty
this.form.difficultyOfScore = difficultyOfScore
this.form.leetcodeNumber = leetcodeNumber
this.form.leetcodeLink = leetcodeLink
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
async addQuestion(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/algorithmicProblem/add', {
addType: addType,
questionName: this.form.questionName,
questionType: this.form.questionType,
degreeOfImportance: this.form.degreeOfImportance,
degreeOfDifficulty: this.form.degreeOfDifficulty,
difficultyOfScore: this.form.difficultyOfScore,
leetcodeNumber: this.form.leetcodeNumber,
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.currentPage = 1
this.form.questionName = ''
this.form.questionType = 0
this.form.degreeOfImportance = 5
this.form.degreeOfDifficulty = 1
this.form.difficultyOfScore = 1200
this.form.leetcodeNumber = ''
this.form.leetcodeLink = ''
this.getQuestionType()
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/algorithmicProblem/update', {
id: this.currentRowId,
questionName: this.form.questionName,
questionType: this.form.questionType,
degreeOfImportance: this.form.degreeOfImportance,
degreeOfDifficulty: this.form.degreeOfDifficulty,
difficultyOfScore: this.form.difficultyOfScore,
leetcodeNumber: this.form.leetcodeNumber,
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.form.questionName = ''
this.form.questionType = 0
this.editVisible = false
currentRowId: null
this.getQuestionType()
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async addQuestion(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/algorithmicProblem/add', {
addType: addType,
questionName: this.form.questionName,
questionType: this.form.questionType,
degreeOfImportance: this.form.degreeOfImportance,
degreeOfDifficulty: this.form.degreeOfDifficulty,
difficultyOfScore: this.form.difficultyOfScore,
leetcodeNumber: this.form.leetcodeNumber,
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.currentPage = 1
this.form.questionName = ''
this.form.questionType = 0
this.form.degreeOfImportance = 5
this.form.degreeOfDifficulty = 1
this.form.difficultyOfScore = 1200
this.form.leetcodeNumber = ''
this.form.leetcodeLink = ''
this.getQuestionType()
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/algorithmicProblem/update', {
id: this.currentRowId,
questionName: this.form.questionName,
questionType: this.form.questionType,
degreeOfImportance: this.form.degreeOfImportance,
degreeOfDifficulty: this.form.degreeOfDifficulty,
difficultyOfScore: this.form.difficultyOfScore,
leetcodeNumber: this.form.leetcodeNumber,
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.form.questionName = ''
this.form.questionType = 0
this.editVisible = false
currentRowId: null
this.getQuestionType()
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/delete', {
params: {
id: id,
},
})
this.getQuestionType()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.getQuestionType()
location.reload()
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/delete', {
params: {
id: id,
},
})
this.getQuestionType()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.getQuestionType()
location.reload()
},
async getQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
console.log(this.options)
//获取问题列表
this.interviewPage()
}
},
async getQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
console.log(this.options)
//获取问题列表
this.interviewPage()
}
},
async getAllQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/allQuestionType', { params: {} })
if (res.code === 200) {
this.allOptions = res.result
}
},
async getAllQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/allQuestionType', { params: {} })
if (res.code === 200) {
this.allOptions = res.result
}
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
questionName: this.formInline.questionName,
questionType: this.questionType,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 algorithmicList 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((item) => {
item.questionTypeName = questionTypeToNameMap[item.questionType]
})
this.algorithmicList = res.result.content
}
this.loading = false
},
async interviewRandom() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/random', { params: {} })
if (res.code === 200) {
this.randomAlgorithmic.questionName = res.result.questionName
this.randomAlgorithmic.leetcodeNumber = res.result.leetcodeNumber
this.randomAlgorithmic.leetcodeLink = res.result.leetcodeLink
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.getQuestionType()
},
getColorForValue(value) {
// 检查颜色映射关系中是否已经有该值对应的颜色
if (!this.colorMap[value]) {
// 如果没有,随机生成一个颜色并将其关联到该值
this.colorMap[value] = this.getRandomColor()
}
// 返回值对应的颜色
return this.colorMap[value]
},
getRandomColor() {
// 从颜色数组中随机选取一个颜色
const colorArray = [
'red',
'blue',
'green',
'yellow',
'purple',
'orange',
'pink',
'brown',
'cyan',
'magenta',
'maroon',
'navy',
'olive',
'teal',
'lime',
'aqua',
'silver',
'gray',
'white',
'indigo',
'violet',
'lavender',
'coral',
'gold',
'salmon',
'turquoise',
'orchid',
'khaki',
'slategray',
'thistle',
'burlywood',
'cadetblue',
'chartreuse',
'chocolate',
'crimson',
'darkblue',
'darkcyan',
'darkgoldenrod',
'darkgray',
'darkgreen',
'darkkhaki',
'darkmagenta',
'darkolivegreen',
'darkorange',
'darkorchid',
'darkred',
'darksalmon',
'darkseagreen',
'darkslateblue',
'darkslategray',
'darkturquoise',
'darkviolet',
'deeppink',
'deepskyblue',
'dodgerblue',
'firebrick',
'forestgreen',
'fuchsia',
'gold',
'greenyellow',
'hotpink',
'indianred',
'lawngreen',
'lightcoral',
'lightgreen',
'lightpink',
'lightsalmon',
'lightseagreen',
'lightskyblue',
'lightslategray',
'lightsteelblue',
'mediumaquamarine',
'mediumblue',
'mediumorchid',
'mediumpurple',
'mediumseagreen',
'mediumslateblue',
'mediumspringgreen',
'mediumturquoise',
'mediumvioletred',
'midnightblue',
'orangered',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred',
'peru',
'powderblue',
'rosybrown',
'saddlebrown',
'seagreen',
'sienna',
'skyblue',
'slateblue',
'springgreen',
'tan',
'thistle',
'tomato',
'turquoise',
'violet',
]
const randomIndex = Math.floor(Math.random() * colorArray.length)
return colorArray[randomIndex]
},
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
questionName: this.formInline.questionName,
questionType: this.questionType,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 algorithmicList 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((item) => {
item.questionTypeName = questionTypeToNameMap[item.questionType]
})
this.algorithmicList = res.result.content
}
this.loading = false
},
async interviewRandom() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/algorithmicProblem/random', { params: {} })
if (res.code === 200) {
this.randomAlgorithmic.questionName = res.result.questionName
this.randomAlgorithmic.leetcodeNumber = res.result.leetcodeNumber
this.randomAlgorithmic.leetcodeLink = res.result.leetcodeLink
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.getQuestionType()
},
getColorForValue(value) {
// 检查颜色映射关系中是否已经有该值对应的颜色
if (!this.colorMap[value]) {
// 如果没有,随机生成一个颜色并将其关联到该值
this.colorMap[value] = this.getRandomColor()
}
// 返回值对应的颜色
return this.colorMap[value]
},
getRandomColor() {
// 从颜色数组中随机选取一个颜色
const colorArray = [
'red',
'blue',
'green',
'yellow',
'purple',
'orange',
'pink',
'brown',
'cyan',
'magenta',
'maroon',
'navy',
'olive',
'teal',
'lime',
'aqua',
'silver',
'gray',
'white',
'indigo',
'violet',
'lavender',
'coral',
'gold',
'salmon',
'turquoise',
'orchid',
'khaki',
'slategray',
'thistle',
'burlywood',
'cadetblue',
'chartreuse',
'chocolate',
'crimson',
'darkblue',
'darkcyan',
'darkgoldenrod',
'darkgray',
'darkgreen',
'darkkhaki',
'darkmagenta',
'darkolivegreen',
'darkorange',
'darkorchid',
'darkred',
'darksalmon',
'darkseagreen',
'darkslateblue',
'darkslategray',
'darkturquoise',
'darkviolet',
'deeppink',
'deepskyblue',
'dodgerblue',
'firebrick',
'forestgreen',
'fuchsia',
'gold',
'greenyellow',
'hotpink',
'indianred',
'lawngreen',
'lightcoral',
'lightgreen',
'lightpink',
'lightsalmon',
'lightseagreen',
'lightskyblue',
'lightslategray',
'lightsteelblue',
'mediumaquamarine',
'mediumblue',
'mediumorchid',
'mediumpurple',
'mediumseagreen',
'mediumslateblue',
'mediumspringgreen',
'mediumturquoise',
'mediumvioletred',
'midnightblue',
'orangered',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred',
'peru',
'powderblue',
'rosybrown',
'saddlebrown',
'seagreen',
'sienna',
'skyblue',
'slateblue',
'springgreen',
'tan',
'thistle',
'tomato',
'turquoise',
'violet',
]
const randomIndex = Math.floor(Math.random() * colorArray.length)
return colorArray[randomIndex]
},
},
}
</script>
......
......@@ -96,201 +96,201 @@
<script>
import axios from 'axios'
export default {
name: 'MyInterview',
name: 'MyInterview',
data() {
return {
// 用户列表数据
algorithmicList: [],
randomAlgorithmic: {
poetryText: '',
},
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('poetryLastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
poetryText: '',
},
// 新增的内容
dialogFormVisible: false,
randomFormVisible: false,
dialogMutiFormVisible: false,
form: {
poetryText: '',
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
}
},
watch: {
'formInline.poetryText'(newVal) {
if (newVal === '') {
this.currentPage = 1
localStorage.setItem('poetryLastPage', this.currentPage)
this.interviewPage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('poetryLastPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.interviewPage()
},
mounted() {
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('poetryLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
this.form.poetryText = ''
this.dialogFormVisible = true
},
prepareRandom() {
this.randomAlgorithmic = []
this.randomFormVisible = true
this.interviewRandom()
},
prepareMutiAdd() {
this.form.poetryText = ''
data() {
return {
// 用户列表数据
algorithmicList: [],
randomAlgorithmic: {
poetryText: '',
},
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('poetryLastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
poetryText: '',
},
// 新增的内容
dialogFormVisible: false,
randomFormVisible: false,
dialogMutiFormVisible: false,
form: {
poetryText: '',
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
}
},
watch: {
'formInline.poetryText'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('poetryLastPage', this.currentPage)
this.interviewPage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('poetryLastPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.interviewPage()
},
mounted() {
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('poetryLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
this.form.poetryText = ''
this.dialogFormVisible = true
},
prepareRandom() {
this.randomAlgorithmic = []
this.randomFormVisible = true
this.interviewRandom()
},
prepareMutiAdd() {
this.form.poetryText = ''
this.dialogMutiFormVisible = true
},
this.dialogMutiFormVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, poetryText) {
this.form.poetryText = poetryText
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, poetryText) {
this.form.poetryText = poetryText
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
async addQuestion(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/aphorismPoetry/add', {
addType: addType,
poetryText: this.form.poetryText,
async addQuestion(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/aphorismPoetry/add', {
addType: addType,
poetryText: this.form.poetryText,
degreeOfImportance: this.form.degreeOfImportance,
degreeOfDifficulty: this.form.degreeOfDifficulty,
difficultyOfScore: this.form.difficultyOfScore,
leetcodeNumber: this.form.leetcodeNumber,
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.form.poetryText = ''
this.currentPage = 1
this.interviewPage()
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the poetryText:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/aphorismPoetry/update', {
id: this.currentRowId,
poetryText: this.form.poetryText,
})
if (res.code === 200) {
this.form.poetryText = ''
this.editVisible = false
currentRowId: null
this.interviewPage()
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the poetryText:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
degreeOfImportance: this.form.degreeOfImportance,
degreeOfDifficulty: this.form.degreeOfDifficulty,
difficultyOfScore: this.form.difficultyOfScore,
leetcodeNumber: this.form.leetcodeNumber,
leetcodeLink: this.form.leetcodeLink,
})
if (res.code === 200) {
this.form.poetryText = ''
this.currentPage = 1
this.interviewPage()
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the poetryText:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/aphorismPoetry/update', {
id: this.currentRowId,
poetryText: this.form.poetryText,
})
if (res.code === 200) {
this.form.poetryText = ''
this.editVisible = false
currentRowId: null
this.interviewPage()
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the poetryText:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/aphorismPoetry/delete', {
params: {
id: id,
},
})
this.interviewPage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.interviewPage()
location.reload()
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/aphorismPoetry/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
poetryText: this.formInline.poetryText,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
this.algorithmicList = res.result.content
}
this.loading = false
},
async interviewRandom() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/aphorismPoetry/random', { params: {} })
if (res.code === 200) {
this.randomAlgorithmic.poetryText = res.result.poetryText
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.interviewPage()
},
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/aphorismPoetry/delete', {
params: {
id: id,
},
})
this.interviewPage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.interviewPage()
location.reload()
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/aphorismPoetry/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
poetryText: this.formInline.poetryText,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
this.algorithmicList = res.result.content
}
this.loading = false
},
async interviewRandom() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/aphorismPoetry/random', { params: {} })
if (res.code === 200) {
this.randomAlgorithmic.poetryText = res.result.poetryText
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.interviewPage()
},
},
}
</script>
......
......@@ -39,98 +39,98 @@
<script>
import axios from 'axios'
export default {
name: 'MyChat',
name: 'MyChat',
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
}
},
watch: {
'formInline.question'(newVal) {
if (newVal != '') {
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.initCartList()
}
},
},
created() {
this.$nextTick(() => {
const foo = this.$route.query.back
const add = this.$route.query.add
if (foo === 'back' && add != 'add') {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion') || ''
} else {
localStorage.setItem('lastPage', 1)
localStorage.setItem('lastQuestion', '')
this.currentPage = 1
this.formInline.question = ''
}
// 调用请求数据的方法
this.initCartList()
})
},
mounted() {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion')
this.elementui_page_component_key++
},
methods: {
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/delete', {
params: {
id: id,
},
})
this.initCartList()
this.loading = false
},
refreshPage() {
location.reload()
},
gotoDetail(id) {
this.$router.push('/home/chatinfo/' + id)
},
addChat() {
this.$router.push('/home/addChat/')
},
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
}
},
watch: {
'formInline.question'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.initCartList()
}
},
},
created() {
this.$nextTick(() => {
const foo = this.$route.query.back
const add = this.$route.query.add
if (foo === 'back' && add != 'add') {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion') || ''
} else {
localStorage.setItem('lastPage', 1)
localStorage.setItem('lastQuestion', '')
this.currentPage = 1
this.formInline.question = ''
}
// 调用请求数据的方法
this.initCartList()
})
},
mounted() {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion')
this.elementui_page_component_key++
},
methods: {
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/delete', {
params: {
id: id,
},
})
this.initCartList()
this.loading = false
},
refreshPage() {
location.reload()
},
gotoDetail(id) {
this.$router.push('/home/chatinfo/' + id)
},
addChat() {
this.$router.push('/home/addChat/')
},
async initCartList() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
},
})
console.log(res)
if (res.code === 200) {
this.userlist = res.result.content
this.total = res.result.totalElements
localStorage.setItem('lastPage', this.currentPage)
localStorage.setItem('lastQuestion', this.formInline.question)
}
this.loading = false
},
async initCartList() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
},
})
console.log(res)
if (res.code === 200) {
this.userlist = res.result.content
this.total = res.result.totalElements
localStorage.setItem('lastPage', this.currentPage)
localStorage.setItem('lastQuestion', this.formInline.question)
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.initCartList()
},
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.initCartList()
},
},
}
</script>
......
......@@ -286,15 +286,15 @@ export default {
}
},
watch: {
'formInline.userName'(newVal) {
if (newVal != '') {
'formInline.userName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.userPage()
}
},
'formInline.nickName'(newVal) {
if (newVal != '') {
'formInline.nickName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.userPage()
......
......@@ -105,332 +105,332 @@
<script>
import axios from 'axios'
export default {
name: 'MyInterview',
name: 'MyInterview',
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('interviewLastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
options: [],
questionType: 0,
// 新增的内容
dialogFormVisible: false,
dialogMutiFormVisible: false,
form: {
question: '',
questionType: 0,
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
colorMap: {}, // 创建一个空的颜色映射关系对象
}
},
watch: {
'formInline.question'(newVal) {
if (newVal != '') {
this.currentPage = 1
localStorage.setItem('interviewLastPage', this.currentPage)
this.getQuestionType()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('interviewLastPage', newPage.toString())
},
},
created() {
//获取问题列表
this.getQuestionType()
},
mounted() {
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('interviewLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogFormVisible = true
},
prepareMutiAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogMutiFormVisible = true
},
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('interviewLastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
options: [],
questionType: 0,
// 新增的内容
dialogFormVisible: false,
dialogMutiFormVisible: false,
form: {
question: '',
questionType: 0,
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
colorMap: {}, // 创建一个空的颜色映射关系对象
}
},
watch: {
'formInline.question'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('interviewLastPage', this.currentPage)
this.getQuestionType()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('interviewLastPage', newPage.toString())
},
},
created() {
//获取问题列表
this.getQuestionType()
},
mounted() {
this.currentPage = 1
// // 在页面加载时从localStorage中获取currentPage的值
// const storedPage = localStorage.getItem('interviewLastPage')
// if (storedPage) {
// this.currentPage = parseInt(storedPage)
// }
},
methods: {
prepareAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogFormVisible = true
},
prepareMutiAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogMutiFormVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, question, questionTypeName) {
this.form.question = question
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, question, questionTypeName) {
this.form.question = question
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
async addQuestion(addType) {
try {
this.loading = true
async addQuestion(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/interviewQuestion/add', {
addType: addType,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.currentPage = 1
this.form.question = ''
this.form.questionType = 0
this.getQuestionType() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/interviewQuestion/add', {
addType: addType,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.currentPage = 1
this.form.question = ''
this.form.questionType = 0
this.getQuestionType() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/interviewQuestion/update', {
id: this.currentRowId,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.form.question = ''
this.form.questionType = 0
this.editVisible = false
currentRowId: null
this.getQuestionType() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
const { data: res } = await axios.post('http://120.79.36.53:8888/interviewQuestion/update', {
id: this.currentRowId,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.form.question = ''
this.form.questionType = 0
this.editVisible = false
currentRowId: null
this.getQuestionType() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/delete', {
params: {
id: id,
},
})
this.getQuestionType()
this.loading = false
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/delete', {
params: {
id: id,
},
})
this.getQuestionType()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.getQuestionType()
location.reload()
},
refreshPage() {
//获取问题类型的枚举
this.getQuestionType()
location.reload()
},
async getQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
this.interviewPage()
}
},
async getQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
this.interviewPage()
}
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
questionType: this.questionType,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 userlist 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((user) => {
user.questionTypeName = questionTypeToNameMap[user.questionType] || 'Unknown'
})
this.userlist = res.result.content
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.getQuestionType()
},
getColorForValue(value) {
// 检查颜色映射关系中是否已经有该值对应的颜色
if (!this.colorMap[value]) {
// 如果没有,随机生成一个颜色并将其关联到该值
this.colorMap[value] = this.getRandomColor()
}
// 返回值对应的颜色
return this.colorMap[value]
},
getRandomColor() {
// 从颜色数组中随机选取一个颜色
const colorArray = [
'red',
'blue',
'green',
'yellow',
'purple',
'orange',
'pink',
'brown',
'cyan',
'magenta',
'maroon',
'navy',
'olive',
'teal',
'lime',
'aqua',
'silver',
'gray',
'white',
'indigo',
'violet',
'lavender',
'coral',
'gold',
'salmon',
'turquoise',
'orchid',
'khaki',
'slategray',
'thistle',
'burlywood',
'cadetblue',
'chartreuse',
'chocolate',
'crimson',
'darkblue',
'darkcyan',
'darkgoldenrod',
'darkgray',
'darkgreen',
'darkkhaki',
'darkmagenta',
'darkolivegreen',
'darkorange',
'darkorchid',
'darkred',
'darksalmon',
'darkseagreen',
'darkslateblue',
'darkslategray',
'darkturquoise',
'darkviolet',
'deeppink',
'deepskyblue',
'dodgerblue',
'firebrick',
'forestgreen',
'fuchsia',
'gold',
'greenyellow',
'hotpink',
'indianred',
'lawngreen',
'lightcoral',
'lightgreen',
'lightpink',
'lightsalmon',
'lightseagreen',
'lightskyblue',
'lightslategray',
'lightsteelblue',
'mediumaquamarine',
'mediumblue',
'mediumorchid',
'mediumpurple',
'mediumseagreen',
'mediumslateblue',
'mediumspringgreen',
'mediumturquoise',
'mediumvioletred',
'midnightblue',
'orangered',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred',
'peru',
'powderblue',
'rosybrown',
'saddlebrown',
'seagreen',
'sienna',
'skyblue',
'slateblue',
'springgreen',
'tan',
'thistle',
'tomato',
'turquoise',
'violet',
]
const randomIndex = Math.floor(Math.random() * colorArray.length)
return colorArray[randomIndex]
},
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
questionType: this.questionType,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 userlist 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((user) => {
user.questionTypeName = questionTypeToNameMap[user.questionType] || 'Unknown'
})
this.userlist = res.result.content
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.getQuestionType()
},
getColorForValue(value) {
// 检查颜色映射关系中是否已经有该值对应的颜色
if (!this.colorMap[value]) {
// 如果没有,随机生成一个颜色并将其关联到该值
this.colorMap[value] = this.getRandomColor()
}
// 返回值对应的颜色
return this.colorMap[value]
},
getRandomColor() {
// 从颜色数组中随机选取一个颜色
const colorArray = [
'red',
'blue',
'green',
'yellow',
'purple',
'orange',
'pink',
'brown',
'cyan',
'magenta',
'maroon',
'navy',
'olive',
'teal',
'lime',
'aqua',
'silver',
'gray',
'white',
'indigo',
'violet',
'lavender',
'coral',
'gold',
'salmon',
'turquoise',
'orchid',
'khaki',
'slategray',
'thistle',
'burlywood',
'cadetblue',
'chartreuse',
'chocolate',
'crimson',
'darkblue',
'darkcyan',
'darkgoldenrod',
'darkgray',
'darkgreen',
'darkkhaki',
'darkmagenta',
'darkolivegreen',
'darkorange',
'darkorchid',
'darkred',
'darksalmon',
'darkseagreen',
'darkslateblue',
'darkslategray',
'darkturquoise',
'darkviolet',
'deeppink',
'deepskyblue',
'dodgerblue',
'firebrick',
'forestgreen',
'fuchsia',
'gold',
'greenyellow',
'hotpink',
'indianred',
'lawngreen',
'lightcoral',
'lightgreen',
'lightpink',
'lightsalmon',
'lightseagreen',
'lightskyblue',
'lightslategray',
'lightsteelblue',
'mediumaquamarine',
'mediumblue',
'mediumorchid',
'mediumpurple',
'mediumseagreen',
'mediumslateblue',
'mediumspringgreen',
'mediumturquoise',
'mediumvioletred',
'midnightblue',
'orangered',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred',
'peru',
'powderblue',
'rosybrown',
'saddlebrown',
'seagreen',
'sienna',
'skyblue',
'slateblue',
'springgreen',
'tan',
'thistle',
'tomato',
'turquoise',
'violet',
]
const randomIndex = Math.floor(Math.random() * colorArray.length)
return colorArray[randomIndex]
},
},
}
</script>
......
......@@ -54,86 +54,86 @@
<script>
import axios from 'axios'
export default {
name: 'MyTripletDayInfo',
name: 'MyTripletDayInfo',
data() {
return {
formInline: {
startDate: null,
endDate: null,
},
// 用户列表数据
tripletDayInfoList: [],
loading: false,
resetDialogVisible: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1,
pageSize: 9,
total: 0,
}
},
watch: {
'formInline.startDate'(newVal) {
if (newVal != '') {
this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage()
}
},
'formInline.endDate'(newVal) {
if (newVal != '') {
this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnTripletDayInfoPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.tripletDayInfoPage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareReset() {
this.resetDialogVisible = true
},
async tripletDayInfoPage() {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/dayInfo/page', {
page: this.currentPage,
pageSize: this.pageSize,
startDate: this.formInline.startDate,
endDate: this.formInline.endDate,
})
if (res.code === 200) {
this.total = res.result.totalElements
this.tripletDayInfoList = res.result.content
}
this.loading = false
},
async reset() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/dayInfo/add')
this.resetDialogVisible = false
this.tripletDayInfoPage()
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.tripletDayInfoPage()
},
refreshPage() {
//获取问题类型的枚举
this.tripletDayInfoPage()
location.reload()
},
},
data() {
return {
formInline: {
startDate: null,
endDate: null,
},
// 用户列表数据
tripletDayInfoList: [],
loading: false,
resetDialogVisible: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1,
pageSize: 9,
total: 0,
}
},
watch: {
'formInline.startDate'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage()
}
},
'formInline.endDate'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnTripletDayInfoPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.tripletDayInfoPage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareReset() {
this.resetDialogVisible = true
},
async tripletDayInfoPage() {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/dayInfo/page', {
page: this.currentPage,
pageSize: this.pageSize,
startDate: this.formInline.startDate,
endDate: this.formInline.endDate,
})
if (res.code === 200) {
this.total = res.result.totalElements
this.tripletDayInfoList = res.result.content
}
this.loading = false
},
async reset() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/dayInfo/add')
this.resetDialogVisible = false
this.tripletDayInfoPage()
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.tripletDayInfoPage()
},
refreshPage() {
//获取问题类型的枚举
this.tripletDayInfoPage()
location.reload()
},
},
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册