12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7b5365c7"],{"0353":function(e,t,a){"use strict";var i=a("6bf8"),n=RegExp.prototype.exec,o=String.prototype.replace,l=n,r="lastIndex",s=function(){var e=/a/,t=/b*/g;return n.call(e,"a"),n.call(t,"a"),0!==e[r]||0!==t[r]}(),c=void 0!==/()??/.exec("")[1],u=s||c;u&&(l=function(e){var t,a,l,u,d=this;return c&&(a=new RegExp("^"+d.source+"$(?!\\s)",i.call(d))),s&&(t=d[r]),l=n.call(d,e),s&&l&&(d[r]=d.global?l.index+l[0].length:t),c&&l&&l.length>1&&o.call(l[0],a,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(l[u]=void 0)})),l}),e.exports=l},"129d":function(e,t,a){"use strict";a("a210")},1663:function(e,t,a){var i=a("212e"),n=a("3ab0");e.exports=function(e){return function(t,a){var o,l,r=String(n(t)),s=i(a),c=r.length;return s<0||s>=c?e?"":void 0:(o=r.charCodeAt(s),o<55296||o>56319||s+1===c||(l=r.charCodeAt(s+1))<56320||l>57343?e?r.charAt(s):o:e?r.slice(s,s+2):l-56320+(o-55296<<10)+65536)}}},"43ec":function(e,t,a){"use strict";var i=a("1663")(!0);e.exports=function(e,t,a){return t+(a?i(e,t).length:1)}},"6bf8":function(e,t,a){"use strict";var i=a("a86f");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"804d":function(e,t,a){var i=a("9cff"),n=a("cea2"),o=a("839a")("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==n(e))}},9973:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-pagination",{attrs:{background:"","page-size":e.page_size?e.page_size:20,"current-page":e.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:e.total},on:{"current-change":e.getData,"size-change":e.handleSizeChange}})},n=[],o={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(e){this.page=e,this.$emit("pageChange")},handleSizeChange:function(e){this.$emit("pageChange",e)}},created:function(){}},l=o,r=(a("129d"),a("5d22")),s=Object(r["a"])(l,i,n,!1,null,null,null);t["a"]=s.exports},a210:function(e,t,a){},ab1c:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[e._m(0),a("div",{staticClass:"content"},[a("div",{staticClass:"filter"},[a("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入标题"},on:{clear:e.getData},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")])],1),a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{plain:"",icon:"el-icon-upload",type:"primary"},on:{click:function(t){e.dialogVisible1=!0}}},[e._v("导入")])],1),a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{plain:"",icon:"el-icon-download",type:"primary"},on:{click:e.download}},[e._v("导出")])],1),a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.add}},[e._v("添加学科")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:e.list,height:"50vh",border:"","default-expand-all":"","row-key":"id"}},[a("el-table-column",{attrs:{prop:"name",label:"学科名称"}}),a("el-table-column",{attrs:{prop:"desc",label:"学科简介",width:"1200px"}}),a("el-table-column",{attrs:{prop:"journal_name",label:"期刊数量"}}),a("el-table-column",{attrs:{prop:"zip",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"edit",attrs:{type:"text"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),a("el-button",{staticClass:"del",attrs:{type:"text"},on:{click:function(a){return e.del(t.row.id)}}},[e._v("删除")])]}}])})],1),a("Page",{ref:"pageButton",attrs:{current:e.form.page,page_size:e.form.page_size,total:e.total},on:{pageChange:e.gopage}})],1),a("el-dialog",{staticClass:"fu-dialog",attrs:{title:e.dialogTitle,"close-on-click-modal":!1,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form1",staticClass:"preview",attrs:{size:"small",inline:!1,"label-width":"80px",model:e.form1,rules:e.rules}},[a("el-form-item",{attrs:{label:"学科名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入学科名称",maxlength:"50","show-word-limit":""},model:{value:e.form1.name,callback:function(t){e.$set(e.form1,"name",t)},expression:"form1.name"}})],1),a("el-form-item",{attrs:{label:"学科简介",prop:"desc"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入学科简介"},model:{value:e.form1.desc,callback:function(t){e.$set(e.form1,"desc",t)},expression:"form1.desc"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1),a("el-dialog",{staticClass:"fu-dialog",attrs:{title:"导入",width:"400px","close-on-click-modal":!1,visible:e.dialogVisible1},on:{"update:visible":function(t){e.dialogVisible1=t}}},[a("el-upload",{staticClass:"upload-demo",attrs:{action:"/api/admin/uploadfile","show-file-list":!1,"on-success":e.handleAvatarSuccess1}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("只能上传.xls/.xlsx文件,且不超过500M")])],1),a("div",[e._v(e._s(e.file))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"normal"},on:{click:function(t){e.dialogVisible1=!1}}},[e._v("取消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.upload}},[e._v("确 定")])],1)],1)],1)},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[a("span",[e._v("刊群导览>")]),e._v("学科")])}],o=(a("fc02"),a("9973")),l=a("5d89"),r={components:{Page:o["a"],fuEditor:l["a"]},data:function(){return{form:{name:"",page:1,page_size:20},total:1,list:[{name:"2333"}],loading:!1,dialogTitle:"",dialogVisible:!1,dialogVisible1:!1,rules:{name:[{required:!0,message:"请输入学科名称",trigger:"blur"}],desc:[{required:!0,message:"请输入学科简介",trigger:"blur"}]},form1:{},file:""}},methods:{upload:function(){var e=this;this.$api.upSubjectData({file:this.file}).then((function(t){e.dialogVisible1=!1,e.getData(),e.$message({message:"上传成功",type:"success"})}))},download:function(){this.$api.getSubjectData().then((function(e){var t=document.createElement("a"),a=new Blob([e.data],{type:"application/vnd.ms-excel,charset=UTF-8"}),i=URL.createObjectURL(a),n=decodeURIComponent(e.headers["content-disposition"].split("=")[1]);console.log(n),t.download=n,t.style.display="none",t.href=i,document.body.appendChild(t),t.click(),document.body.removeChild(t)}))},handleAvatarSuccess1:function(e,t){this.file=t.response.data},handleAvatarSuccess:function(e,t){this.form1.img=t.response.data,console.log(this.form1.img)},search:function(){this.getData()},add:function(){this.form1={},this.dialogVisible=!0,this.dialogTitle="添加主办单位"},addArticle:function(){this.$router.push({path:"/article/article/add"})},gopage:function(e){e&&(this.form.page_size=e),this.form.page=this.$refs.pageButton.page,this.getData()},getData:function(){var e=this,t=this.form;this.loading=!0,this.$api.getSubjectList(t).then((function(t){console.log(t),e.list=t.data.data.list,e.loading=!1}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.delSubject({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))},edit:function(e){this.form1=e,this.dialogVisible=!0},save:function(){var e=this;this.$refs["form1"].validate((function(t){if(t){var a=e.form1,i=e.form1.id;a.receiver_id=JSON.stringify(a.receiver_id),i?e.$api.updateSubject(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1})):e.$api.addSubject(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1}))}}))}},created:function(){this.getData()}},s=r,c=(a("b8ef"),a("5d22")),u=Object(c["a"])(s,i,n,!1,null,"6d2ffba4",null);t["default"]=u.exports},b8ef:function(e,t,a){"use strict";a("be04")},be04:function(e,t,a){},bf73:function(e,t,a){"use strict";var i=a("0353");a("e99b")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},c46f:function(e,t,a){"use strict";a("bf73");var i=a("84e8"),n=a("065d"),o=a("0926"),l=a("3ab0"),r=a("839a"),s=a("0353"),c=r("species"),u=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var a="ab".split(e);return 2===a.length&&"a"===a[0]&&"b"===a[1]}();e.exports=function(e,t,a){var f=r(e),p=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),g=p?!o((function(){var t=!1,a=/a/;return a.exec=function(){return t=!0,null},"split"===e&&(a.constructor={},a.constructor[c]=function(){return a}),a[f](""),!t})):void 0;if(!p||!g||"replace"===e&&!u||"split"===e&&!d){var h=/./[f],m=a(l,f,""[e],(function(e,t,a,i,n){return t.exec===s?p&&!n?{done:!0,value:h.call(t,a,i)}:{done:!0,value:e.call(a,t,i)}:{done:!1}})),v=m[0],b=m[1];i(String.prototype,e,v),n(RegExp.prototype,f,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},f417:function(e,t,a){"use strict";var i=a("d445"),n=RegExp.prototype.exec;e.exports=function(e,t){var a=e.exec;if("function"===typeof a){var o=a.call(e,t);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(e))throw new TypeError("RegExp#exec called on incompatible receiver");return n.call(e,t)}},fc02:function(e,t,a){"use strict";var i=a("804d"),n=a("a86f"),o=a("1b0b"),l=a("43ec"),r=a("201c"),s=a("f417"),c=a("0353"),u=a("0926"),d=Math.min,f=[].push,p="split",g="length",h="lastIndex",m=4294967295,v=!u((function(){RegExp(m,"y")}));a("c46f")("split",2,(function(e,t,a,u){var b;return b="c"=="abbc"[p](/(b)*/)[1]||4!="test"[p](/(?:)/,-1)[g]||2!="ab"[p](/(?:ab)*/)[g]||4!="."[p](/(.?)(.?)/)[g]||"."[p](/()()/)[g]>1||""[p](/.?/)[g]?function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return a.call(n,e,t);var o,l,r,s=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,p=void 0===t?m:t>>>0,v=new RegExp(e.source,u+"g");while(o=c.call(v,n)){if(l=v[h],l>d&&(s.push(n.slice(d,o.index)),o[g]>1&&o.index<n[g]&&f.apply(s,o.slice(1)),r=o[0][g],d=l,s[g]>=p))break;v[h]===o.index&&v[h]++}return d===n[g]?!r&&v.test("")||s.push(""):s.push(n.slice(d)),s[g]>p?s.slice(0,p):s}:"0"[p](void 0,0)[g]?function(e,t){return void 0===e&&0===t?[]:a.call(this,e,t)}:a,[function(a,i){var n=e(this),o=void 0==a?void 0:a[t];return void 0!==o?o.call(a,n,i):b.call(String(n),a,i)},function(e,t){var i=u(b,e,this,t,b!==a);if(i.done)return i.value;var c=n(e),f=String(this),p=o(c,RegExp),g=c.unicode,h=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(v?"y":"g"),x=new p(v?c:"^(?:"+c.source+")",h),y=void 0===t?m:t>>>0;if(0===y)return[];if(0===f.length)return null===s(x,f)?[f]:[];var w=0,_=0,$=[];while(_<f.length){x.lastIndex=v?_:0;var C,k=s(x,v?f:f.slice(_));if(null===k||(C=d(r(x.lastIndex+(v?0:_)),f.length))===w)_=l(f,_,g);else{if($.push(f.slice(w,_)),$.length===y)return $;for(var S=1;S<=k.length-1;S++)if($.push(k[S]),$.length===y)return $;_=w=C}}return $.push(f.slice(w)),$}]}))}}]);
- //# sourceMappingURL=chunk-7b5365c7.fcd9b5da.js.map
|