长城期货
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
15 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c105623","chunk-2d0f022d"],{"0bec":function(t,e,a){},"3b62":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"container",attrs:{id:"order"}},[e("el-tabs",{staticClass:"tab-card tabs-white",attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.langList,(function(t){return e("el-tab-pane",{key:t.id,attrs:{label:t.lang,name:t.lang}})})),1),e("div",{staticClass:"content"},[e("TableSearch",{attrs:{model:t.params},scopedSlots:t._u([{key:"btn",fn:function(){return[e("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.handleRouterContent}},[t._v(" "+t._s(t.$t("新增内容"))+" ")]),e("el-button",{attrs:{type:"secondary"},on:{click:function(e){return t.handleOffline()}}},[t._v(" "+t._s(t.$t("批量禁用"))+" ")]),e("el-button",{attrs:{type:"secondary"},on:{click:function(e){return t.handleDelete()}}},[t._v(" "+t._s(t.$t("批量删除"))+" ")]),"手续费标准"==t.$route.meta.title?e("ImportButton",{attrs:{title:"导入手续费",request:"/ContentImport/commission",lang:t.activeName,loading:t.loading},on:{updateList:t.handleSearch,"update:loading":function(e){t.loading=e}}}):t._e(),"保证金标准"==t.$route.meta.title?e("ImportButton",{attrs:{title:"导入保证金",request:"/ContentImport/margin",lang:t.activeName,loading:t.loading},on:{updateList:t.handleSearch,"update:loading":function(e){t.loading=e}}}):t._e(),"品种基础"==t.$route.meta.title?e("ImportButton",{attrs:{title:"导入交易品种",request:"/ContentImport/variety",lang:t.activeName,loading:t.loading},on:{updateList:t.handleSearch,"update:loading":function(e){t.loading=e}}}):t._e(),"期货交易规则"==t.$route.meta.title?e("ImportButton",{attrs:{title:"导入交易规则",request:"/ContentImport/rule",lang:t.activeName,loading:t.loading},on:{updateList:t.handleSearch,"update:loading":function(e){t.loading=e}}}):t._e(),"交易日历"==t.$route.meta.title?e("ImportButton",{attrs:{title:"导入交易日历",request:"/ContentImport/calendar",lang:t.activeName,loading:t.loading},on:{updateList:t.handleSearch,"update:loading":function(e){t.loading=e}}}):t._e()]},proxy:!0}])},[[e("el-form-item",{attrs:{label:"".concat(t.$t("文章标题"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入文章标题"),size:"small"},model:{value:t.params.title,callback:function(e){t.$set(t.params,"title",e)},expression:"params.title"}})],1),e("el-form-item",{attrs:{label:"".concat(t.$t("状态"),":")}},[e("el-select",{model:{value:t.params.status,callback:function(e){t.$set(t.params,"status",e)},expression:"params.status"}},t._l(t.articleTypeEnums,(function(t,a){return e("el-option",{key:a,attrs:{label:t,value:a}})})),1)],1),e("el-form-item",{attrs:{label:"".concat(t.$t("研报编号"),":")}},[e("el-input",{attrs:{placeholder:t.$t("请输入研报编号"),size:"small"},model:{value:t.params.report_code,callback:function(e){t.$set(t.params,"report_code",e)},expression:"params.report_code"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSearch("search")}}},[t._v(" "+t._s(t.$t("搜索"))+" ")]),e("el-button",{attrs:{size:"small"},on:{click:t.handleReset}},[t._v(" "+t._s(t.$t("重置"))+" ")])],1)]],2),e("BaseTable",{ref:"baseTable",attrs:{request:t.request,params:t.params,"is-request":!1},on:{"update:params":function(e){t.params=e},"selection-change":t.handleSelectionChange}},[e("el-table-column",{attrs:{type:"selection",width:"50"}}),e("el-table-column",{attrs:{label:"ID",prop:"id",width:"80"}}),e("el-table-column",{attrs:{label:t.$t("标题"),prop:"title","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-link",{attrs:{href:a.row.url,target:"_blank"}},[t._v(" "+t._s(a.row.title)+" ")])]}}])}),e("el-table-column",{attrs:{label:t.$t("研报编号"),prop:"report_code",width:"160px"}}),e("el-table-column",{attrs:{label:t.$t("栏目"),width:"120px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.getCategoryName(e.row.category))+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("排序"),prop:"sort",width:"60px"}}),e("el-table-column",{attrs:{label:t.$t("状态"),width:"150px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.articleTypeEnums[e.row.new_status])+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("缩略图"),width:"100px"},scopedSlots:t._u([{key:"default",fn:function(a){return[a.row.thumbnail?e("el-image",{staticStyle:{width:"100%",height:"auto"},attrs:{src:a.row.thumbnail.url,fit:"cover","preview-src-list":[a.row.thumbnail.url]}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("i",{staticClass:"el-icon-picture-outline"})])]):t._e()]}}])}),e("el-table-column",{attrs:{label:t.$t("发布时间"),prop:"publish_time",width:"160px"}}),e("el-table-column",{attrs:{label:t.$t("点击量"),prop:"hits",width:"70px"}}),e("el-table-column",{attrs:{label:t.$t("操作"),fixed:"right",width:"150px",align:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("EditBtn",{on:{click:function(e){return t.editor(a.row)}}}),e("DelBtn",{attrs:{"confirm-content":t.$t("内容放入回收站")},on:{success:function(e){return t.handleDelete(a.row.id)}}}),e("BaseDropdown",{on:{command:function(e){return t.operationCommand(e,a.row)}}},[1===a.row.new_status?e("el-dropdown-item",{attrs:{command:"disabled"}},[t._v(" "+t._s(t.$t("禁用"))+" ")]):t._e(),5===a.row.new_status?e("el-dropdown-item",{attrs:{command:"un-disabled"}},[t._v(" "+t._s(t.$t("启用"))+" ")]):t._e(),e("el-dropdown-item",{attrs:{command:"copy"}},[t._v(" "+t._s(t.$t("复制"))+" ")]),e("el-dropdown-item",{attrs:{command:"preview"}},[t._v(" "+t._s(t.$t("预览"))+" ")])],1)]}}])})],1)],1)],1)},r=[],i=a("5530"),o=a("c14f"),s=a("1da1"),l=(a("99af"),a("a15b"),a("d81d"),a("14d9"),a("b0c0"),a("e9f5"),a("ab43"),a("d3b7"),a("7632")),u=a("816b"),c=a("7f6c"),d=a("9d0b"),m=a("9aa0"),p={components:{ImportButton:m["default"]},data:function(){return{request1:"/ContentImport/commission",request2:"/ContentImport/margin",request3:"/ContentImport/variety",request4:"/ContentImport/rule",request5:l["a"].calendar,request6:l["a"].intermediary,request:l["a"].contentList,loading:!1,articleTypeEnums:d["a"],columnDataSource:[],params:{website_id:"",lang:"",category_id:[],title:"",report_code:""},list:[],options:[],contentData:[],moduleData:"",checkedKeys:[],val:{},totalAmount:"",category_id:"",activeName:"zh",langList:[],tableSelectionData:[]}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:function(t,e){this.siteId=t,t&&(this.params.website_id=t,this.$router.push({query:{}}),this.params.category_id=[],this.getLang())}},created:function(){this.siteId=this.$store.getters.siteId;var t=this.$route.query.lang;if(t&&(this.activeName=t),this.$route.query.category_id)if(Array.isArray(this.$route.query.category_id))this.params.category_id=this.$route.query.category_id;else{var e=this.$route.query.category_id+"";this.params.category_id=[e]}this.siteId&&(this.getLang(),this.params.website_id=this.siteId),this.getModule()},methods:{handlePreview:function(t){var e="".concat(this.$store.getters.updateURL,"preview?id=").concat(t.id,"&cid=").concat(t.category_id,"&lang=").concat(t.lang,"&website_id=").concat(this.params.website_id);window.open(e)},importMargin:function(){},operationCommand:function(t,e){switch(t){case"disabled":this.handleOffline(e.id);break;case"un-disabled":this.handleOffline(e.id,"online");break;case"copy":this.handleCopy(e);break;case"preview":this.handlePreview(e);break}},handleSelectionChange:function(t){this.tableSelectionData=t},handleDelete:function(t){var e=this;return Object(s["a"])(Object(o["a"])().m((function a(){var n,r;return Object(o["a"])().w((function(a){while(1)switch(a.n){case 0:if(t){a.n=1;break}if(e.tableSelectionData.length){a.n=1;break}return e.$message.error(e.$t("请先选中数据")),a.a(2);case 1:return n=e.tableSelectionData.map((function(t){return t.id})),a.n=2,l["a"].deleteContent({ids:t||n});case 2:r=a.v,0==r.code&&(e.$message.success(r.msg),e.getContent());case 3:return a.a(2)}}),a)})))()},handleOffline:function(t,e){var a=this;return Object(s["a"])(Object(o["a"])().m((function n(){var r,i,s;return Object(o["a"])().w((function(n){while(1)switch(n.n){case 0:if(t){n.n=1;break}if(a.tableSelectionData.length){n.n=1;break}return a.$message.error(a.$t("请先选中数据")),n.a(2);case 1:return n.n=2,a.$confirm("".concat(a.$t("此操作将该内容")).concat("online"===e?a.$t("启用"):a.$t("禁用"),", ").concat(a.$t("是否继续")),a.$t("提示"),{confirmButtonText:a.$t("确定"),cancelButtonText:a.$t("取消")}).catch((function(t){}));case 2:if(r=n.v,!r){n.n=4;break}return i=a.tableSelectionData.map((function(t){return t.id})),n.n=3,l["a"].changeContentStatus({id:t||i,status:"online"===e?1:2});case 3:s=n.v,0==s.code&&(a.$message.success(r.msg),a.getContent());case 4:return n.a(2)}}),n)})))()},handleReset:function(){this.params.title="",this.params.category_id=[],this.params.status="",this.params.report_code="",this.$refs.baseTable.getList("search")},getCategoryName:function(t){return t.map((function(t){return t.title})).join(",")},handleRouterContent:function(){var t=this.$route.meta.category_id;this.$router.push({path:"/addCustomContent/"+t,query:{lang:0==this.activeName?"zh":this.activeName,category_id:t}})},getCategoryList:function(){var t=this;return Object(s["a"])(Object(o["a"])().m((function e(){var a,n;return Object(o["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,u["a"].getModuleCate(Object(i["a"])(Object(i["a"])({},t.params),{},{site_id:[t.siteId],lang:0==t.activeName?"zh":t.activeName}));case 1:n=e.v,t.columnDataSource=(null===(a=n.data)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.category)||[];case 2:return e.a(2)}}),e)})))()},topOpt:function(t){var e=this,a={id:t.id,is_top:t.is_top};l["a"].topOpt(a).then((function(t){0==t.code&&e.$message.success(t.msg)}))},recommend:function(t){var e=this,a={id:t.id,is_recommend:t.is_recommend,type:"recommend"};l["a"].recommendAndStatus(a).then((function(t){0==t.code&&e.$message.success(t.msg)}))},getLang:function(){var t=this;c["a"].langInfo({site_id:this.siteId}).then((function(e){var a;(t.langList=e.data,t.$route.query.lang)||(t.activeName=null===(a=e.data[0])||void 0===a?void 0:a.lang);e.data.length>0&&(t.params.lang=t.activeName),t.params.category_id=t.$route.meta.category_id?[t.$route.meta.category_id]:[],t.getCategoryList(),t.getContent("search")}))},handleClick:function(t){this.activeName=t.name,this.params.lang=t.name,this.getCategoryList(),this.handleReset()},handleSearch:function(){this.$router.push({query:{category_id:this.params.category_id}}),this.getContent("search")},getContent:function(t){this.$refs.baseTable.getList(t)},getModule:function(){var t=this;u["a"].moduleList({website_id:this.website_id}).then((function(e){t.moduleData=e.data}))},handleCommand:function(t){this.$router.push({name:"ColumnInfo",query:{id:t,website_id:this.siteId}})},handleCopy:function(t){this.$router.push({name:"updateCustomContent"+this.$route.meta.category_id,query:{id:t.id,lang:this.activeName,module_id:t.module_id,website_id:this.siteId,type:"copy",category_id:t.category_id}})},editor:function(t){var e=this,a={id:t.id,module_id:t.module_id,lang:this.activeName,website_id:this.siteId};l["a"].contentInfo(a).then((function(a){if(0==a.code){var n=a.data.content.website,r=a.data.content.category;e.$router.push({name:"updateCustomContent"+e.$route.meta.category_id,query:{id:t.id,category_id:r,module_id:t.module_id,lang:e.activeName,siteId:n}})}}))},check:function(t){this.$router.push({name:"ColumnInfo",query:{id:this.siteId}})}}},h=p,f=(a("8f6d"),a("2877")),g=Object(f["a"])(h,n,r,!1,null,"8afa97a0",null);e["default"]=g.exports},"7f6c":function(t,e,a){"use strict";var n=a("365c");function r(t){var e="/websiteSetting/read";return n["a"].get(e,t)}function i(t){var e="/websiteSetting/update";return n["a"].post(e,t)}function o(t){var e="/websiteLang/index";return n["a"].get(e,t)}function s(t){var e="/websiteLang/save";return n["a"].post(e,t)}function l(t){var e="/websiteLang/system";return n["a"].get(e,t)}function u(t){var e="/websiteServer/read";return n["a"].get(e,t)}function c(t){var e="/websiteServer/update";return n["a"].post(e,t)}e["a"]={basicInfo:r,basicUpdate:i,langInfo:o,langUpdate:s,systemLang:l,serverInfo:u,serverUpdate:c}},"816b":function(t,e,a){"use strict";var n=a("365c");function r(t){var e="/module/index";return n["a"].get(e,t)}function i(t){var e="/module/save";return n["a"].post(e,t)}function o(t){var e="/module/update";return n["a"].post(e,t)}function s(t){var e="/module/delete";return n["a"].post(e,t)}function l(t){var e="/module/read";return n["a"].get(e,t)}function u(t){var e="/category/getModuleCate";return n["a"].get(e,t)}function c(t){var e="/moduleField/index";return n["a"].get(e,t)}function d(t){var e="/moduleField/save";return n["a"].post(e,t)}function m(t){var e="/moduleField/update";return n["a"].post(e,t)}function p(t){var e="/moduleField/delete";return n["a"].post(e,t)}function h(t){var e="/moduleField/read";return n["a"].get(e,t)}function f(t){var e="/module/all";return n["a"].get(e,t)}function g(t){var e="/module/field";return n["a"].get(e,t)}function v(t){var e="/preview";return n["a"].get(e,t)}function b(t){var e="/moduleField/relationValueList";return n["a"].get(e,t)}e["a"]={moduleList:r,moduleSave:i,moduleUpdate:o,moduleDelete:s,moduleInfo:l,fieldList:c,fieldSave:d,fieldUpdate:m,fieldDelete:p,fieldInfo:h,getModuleCate:u,moduleTable:f,moduleField:g,preview:v,relationValueList:b}},"8f6d":function(t,e,a){"use strict";a("0bec")},"9aa0":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("el-upload",{staticClass:"avatar-uploader",attrs:{headers:t.myHeaders,data:t.uploadData,action:t.$store.getters.updateURL+t.importRequest,"show-file-list":!1,"on-error":t.uploadError,"http-request":t.upload}},[e("el-button",[t._v(" "+t._s(t.$t(t.title))+" ")])],1)},r=[],i=(a("d3b7"),a("7632"),a("bc3a")),o=a.n(i),s=a("5f87"),l={props:{title:{type:String,default:"批量导入"},request:{},lang:{default:"zh"}},data:function(){return{myHeaders:{Authorization:"Bearer ".concat(this.$store.getters.token)},uploadData:{lang:this.lang},importRequest:""}},watch:{request:{handler:function(t){this.importRequest=t},immediate:!0}},created:function(){},methods:{upload:function(t){var e,a=this;this.$emit("update:loading",!0);var n=o.a.create({baseURL:"",timeout:9e4}),r=new FormData;r.append("lang",null===(e=t.data)||void 0===e?void 0:e.lang),r.append("file",t.file),n.interceptors.request.use((function(t){return a.$store.getters.token&&(t.headers["Authorization"]="Bearer "+Object(s["a"])()),t}),(function(t){return Promise.reject(t)})),n.post(this.request,r).then((function(t){0==t.data.code?(a.$message.success(t.data.msg),a.$emit("updateList")):a.$message.error(t.data.msg),a.$emit("update:loading",!1)}))},handleAvatarSuccess:function(t){0==t.code?this.$emit("updateList"):this.$message.error(t.msg)},uploadError:function(){this.$message.error("导入失败")}}},u=l,c=a("2877"),d=Object(c["a"])(u,n,r,!1,null,"64615579",null);e["default"]=d.exports},"9d0b":function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i}));var n={1:"已发布",2:"待发布",3:"待审核",4:"被驳回",5:"已下线",6:"草稿"},r={2:"审核中",3:"审核通过",4:"审核拒绝",5:"已下线"},i={1:"内容审核",2:"删除审核"}}}]);