chunk-3cb46b06.42c234fe.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3cb46b06"],{2592:function(e,t,a){},"2b1c":function(e,t,a){"use strict";a("c6ad")},"2ffe":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("div",[a("div",{staticClass:"title"},[a("el-row",[a("el-col",{staticClass:"left",attrs:{span:6}},[a("div",{staticClass:"searchBox"},[a("div",{staticClass:"searchTitle"},[e._v("网站名称")]),a("el-input",{staticClass:"input",attrs:{placeholder:"请输入网站名称"},model:{value:e.webSiteName_name,callback:function(t){e.webSiteName_name=t},expression:"webSiteName_name"}})],1)]),a("el-col",{staticClass:"left",attrs:{span:6}},[a("div",{staticClass:"searchBox"},[a("div",{staticClass:"searchTitle"},[e._v("底部导航名称")]),a("el-input",{staticClass:"input",attrs:{placeholder:"请输入底部导航名称"},model:{value:e.tabbarName,callback:function(t){e.tabbarName=t},expression:"tabbarName"}})],1)]),a("el-col",{staticClass:"right",attrs:{span:8}},[a("div",{staticClass:"btnList"},[a("button",{staticClass:"search",on:{click:e.goSearch}},[e._v("搜索")]),a("button",{staticClass:"reset",on:{click:e.goReset}},[e._v("重置")])])])],1)],1),a("div",{staticClass:"layerBox"},[a("tableTitle",{attrs:{name:e.tableDivTitle}}),a("button",{staticClass:"btn",on:{click:e.addWebsite}},[e._v("添加底部导航")]),a("el-row",[[a("el-table",{staticClass:"my-table",staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{fixed:"",prop:"id",label:"编号",width:"90"}}),a("el-table-column",{attrs:{prop:"website_name",label:"网站",width:""}}),a("el-table-column",{attrs:{prop:"name",label:"底部导航名称",width:""}}),a("el-table-column",{attrs:{prop:"created_at",label:"添加时间",width:""}}),a("el-table-column",{attrs:{prop:"updated_at",label:"修改时间",width:""}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"listBtnBox"},[a("div",{staticClass:"listDeleteBtn",on:{click:function(a){return e.deleteRow(t.row.id)}}},[a("i",{staticClass:"el-icon-delete"}),e._v(" 删除 ")]),a("div",{staticClass:"listEditBtn",on:{click:function(a){return e.goEdit(t.row.id,t.row)}}},[a("i",{staticClass:"el-icon-edit-outline"}),e._v(" 编辑 ")]),a("div",{staticClass:"listLookBtn",on:{click:function(a){return e.goLook(t.row.id,t.row)}}},[a("i",{staticClass:"el-icon-view"}),e._v(" 查看 ")])])]}}])})],1)]],2)],1),a("div",{staticClass:"alignBox"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-pagination",{attrs:{background:"","current-page":e.page,"page-size":e.pageSize,layout:"total, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)],1),a("el-dialog",{attrs:{title:e.dialogName,visible:e.dialogTableVisible,width:"50%",top:"8vh","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"120px"}},[a("div",{staticClass:"dialogText"},[a("el-form-item",{attrs:{label:"关联网站名称:",prop:"webName"}},[a("el-select",{attrs:{multiple:!1,"multiple-limit":1,filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入关联网站名称","remote-method":e.getWebNavList,loading:e.webSiteLoading},on:{change:e.detectionWebSite},model:{value:e.ruleForm.webName,callback:function(t){e.$set(e.ruleForm,"webName",t)},expression:"ruleForm.webName"}},e._l(e.webSiteList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"底部导航名称:",prop:"tabbarName"}},[a("el-input",{attrs:{placeholder:"请输入底部导航名称"},model:{value:e.ruleForm.tabbarName,callback:function(t){e.$set(e.ruleForm,"tabbarName",t)},expression:"ruleForm.tabbarName"}})],1),a("el-form-item",{attrs:{label:"页面类型:",prop:"pageType"}},[a("el-radio",{attrs:{label:"1",disabled:this.disabled},model:{value:e.ruleForm.pageType,callback:function(t){e.$set(e.ruleForm,"pageType",t)},expression:"ruleForm.pageType"}},[e._v("特殊列表页")]),a("el-radio",{attrs:{label:"0",disabled:this.disabled},model:{value:e.ruleForm.pageType,callback:function(t){e.$set(e.ruleForm,"pageType",t)},expression:"ruleForm.pageType"}},[e._v("特殊详情页")])],1)],1),a("div",{staticClass:"dialogBtn"},[a("el-button",{attrs:{type:"info"},on:{click:e.cancelForm}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("ruleForm")}}},[e._v("提交")])],1)])],1)],1)},o=[],s=a("b85c"),l=(a("b0c0"),a("863b")),r=(a("4b51"),a("9fa2")),n={components:{tableTitle:l["default"]},data:function(){var e=function(e,t,a){0==t.length?a(new Error("该项不能为空!")):a()};return{tableDivTitle:"底部导航列表",dialogTableVisible:!1,dialogName:"编辑",disabled:!1,tableData:[],webSiteList:[],webSiteLoading:!1,logoUrl:"",hovering:!1,value:"",activeid:"",type:"",page:1,pageSize:10,total:0,formLabelWidth:"",webSiteName_name:"",webSiteName_id:"",tabbarName:"",website_id:"",ruleForm:{webName:"",tabbarName:"",pageType:""},rules:{webName:[{required:!0,trigger:"blur",validator:e}],tabbarName:[{required:!0,trigger:"blur",validator:e}],pageType:[{required:!0,trigger:"blur",validator:e}]}}},methods:{getData:function(){var e=this;Object(r["d"])({page:this.page,pageSize:this.pageSize}).then((function(t){console.log(t),e.tableData=t.data.rows,e.total=t.data.count}))},deleteRow:function(e){var t=this;console.log(e);var a=new FormData;a.append("id",e),this.$confirm("注意:删除后,该条信息及其绑定关系全部删除","是否确认删除该条信息?",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){console.log("当前删除:"+e),Object(r["b"])({id:e}).then((function(e){console.log(e),(e.code=200)?(t.$message({message:"删除成功",type:"success"}),t.getData()):0==e.code&&t.$message({message:e.message,type:"error"})}))})).catch((function(){t.$message({type:"warning",message:"已取消删除"})}))},goGraph:function(){this.dialogVisible=!0},handleSizeChange:function(e){this.page=e,this.getData()},handleCurrentChange:function(e){this.page=e,this.getData()},goSearch:function(){var e=this;this.webSiteName_name&&this.tabbarName?Object(r["d"])({page:this.page,pageSize:this.pageSize,name:this.tabbarName,website_name:this.webSiteName_name}).then((function(t){console.log(t),e.tableData=t.data.rows,e.total=t.data.count})):this.webSiteName_name&&!this.tabbarName?Object(r["d"])({page:this.page,pageSize:this.pageSize,website_name:this.webSiteName_name}).then((function(t){console.log(t),e.tableData=t.data.rows,e.total=t.data.count})):!this.webSiteName_name&&this.tabbarName&&Object(r["d"])({page:this.page,pageSize:this.pageSize,name:this.tabbarName}).then((function(t){console.log(t),e.tableData=t.data.rows,e.total=t.data.count}))},goReset:function(){this.webSiteName_name="",this.tabbarName="",this.getData()},goEdit:function(e,t){this.dialogName="编辑",this.activeid=e,this.dialogTableVisible=!0,this.disabled=!0,console.log(e,t),console.log("状态",t),this.website_id=t.website_id,this.ruleForm.webName=t.website_name,this.ruleForm.tabbarName=t.name,0==t.type?this.ruleForm.pageType="0":1==t.type&&(this.ruleForm.pageType="1")},goLook:function(e,t){this.activeid=e,this.type=t.type,this.$router.push({path:"/tabbarDetail",query:{id:this.activeid,type:this.type}})},addWebsite:function(){this.dialogTableVisible=!0,this.dialogName="添加",this.disabled=!1,this.ruleForm.webName="",this.ruleForm.tabbarName="",this.ruleForm.pageType=""},submitForm:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return console.log("error submit!!"),!1;console.log("submit!")})),"添加"==this.dialogName&&Object(r["f"])({website_id:this.website_id,name:this.ruleForm.tabbarName,type:this.ruleForm.pageType}).then((function(e){if(console.log(e),200!=e.code)return e.code,t.$message({message:e.message,type:"error"}),void(t.dialogTableVisible=!0);t.$message({message:"添加成功",type:"success"}),t.dialogTableVisible=!1,t.getData()})),""==this.website_id&&(this.$message({message:"请输入并选择网站名称",type:"error"}),this.dialogVisible=!0),"编辑"==this.dialogName&&Object(r["g"])({website_id:this.website_id,name:this.ruleForm.tabbarName,id:this.activeid}).then((function(e){console.log(e),200==e.code&&(t.$message({message:"编辑成功",type:"success"}),t.dialogTableVisible=!1),0==e.code&&(t.$message({message:e.message,type:"error"}),t.dialogTableVisible=!0),t.getData()}))},cancelForm:function(){this.dialogTableVisible=!1},beforeAvatarUpload:function(e){var t=this,a="image/jpeg"===e.type,i="image/png"===e.type,o=e.size/1024/1024<2;if(!a&&!i)return this.$message.error("上传图片只能是 JPG 或 PNG 格式!"),!1;if(!o)return this.$message.error("上传图片大小不能超过 2MB!"),!1;var s=new FormData;return s.append("file",e),this.$store.dispatch("pool/uploadFile",s).then((function(e){t.logoUrl=e.data.imgUrl,t.ruleForm.adPhoto=e.data.imgUrl,console.log(e.data.imgUrl)})).catch((function(){t.$message({type:"info",message:"网络错误,请重试!"})})),!1},handleDelete:function(){this.logoUrl=""},selectWebSite:function(e){this.webSiteName_id=e},detectionWebSite:function(e){console.log(e),this.website_id=e,console.log(this.website_id)},getWebNavList:function(e){var t=this;if(""!==e){this.webSiteLoading=!0;var a={keyword:e},i=[];this.$store.dispatch("pool/getNavWebList",a).then((function(e){console.log(e.data);var a,o=Object(s["a"])(e.data);try{for(o.s();!(a=o.n()).done;){var l=a.value,r={};r.key=l.id,r.value=l.id,r.label=l.website_name,i.push(r)}}catch(n){o.e(n)}finally{o.f()}t.webSiteList=i,t.webSiteLoading=!1})).catch((function(){t.$message({type:"info",message:"网络错误,请重试!"})}))}else this.navList=[]}},mounted:function(){this.getData()}},c=n,u=(a("2b1c"),a("2877")),d=Object(u["a"])(c,i,o,!1,null,"73b37b2e",null);t["default"]=d.exports},"4b51":function(e,t,a){},"863b":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("div",{staticClass:"tableTitle"},[a("span",{staticClass:"tableFloatLine"}),e._v(" "+e._s(e.name)+" ")])},o=[],s={props:{name:{type:String,required:!0}},data:function(){return{someData:""}}},l=s,r=(a("a67c"),a("2877")),n=Object(r["a"])(l,i,o,!1,null,"1281540e",null);t["default"]=n.exports},"9fa2":function(e,t,a){"use strict";a.d(t,"d",(function(){return o})),a.d(t,"f",(function(){return s})),a.d(t,"g",(function(){return l})),a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return n})),a.d(t,"e",(function(){return c})),a.d(t,"h",(function(){return u})),a.d(t,"c",(function(){return d}));var i=a("b775"),o=function(e){return Object(i["a"])({url:"/footer/getFooterCategory",method:"post",data:e})},s=function(e){return Object(i["a"])({url:"/footer/addFooterCategory",method:"post",data:e})},l=function(e){return Object(i["a"])({url:"/footer/upFooterCategory",method:"post",data:e})},r=function(e){return Object(i["a"])({url:"/footer/delFooterCategory",method:"post",data:e})},n=function(e){return Object(i["a"])({url:"/footer/addFooterContent",method:"post",data:e})},c=function(e){return Object(i["a"])({url:"/footer/getFooterContent",method:"post",data:e})},u=function(e){return Object(i["a"])({url:"/footer/upFooterContent",method:"post",data:e})},d=function(e){return Object(i["a"])({url:"/footer/delFooterContent",method:"post",data:e})}},a67c:function(e,t,a){"use strict";a("2592")},c6ad:function(e,t,a){}}]);