chunk-1bb467bc.c7550e05.js 11 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1bb467bc"],{"0981":function(t,e,a){"use strict";a("56ba")},"0c3c":function(t,e,a){"use strict";a("7c762")},"1b2c":function(t,e,a){},"1c4c":function(t,e,a){"use strict";a.d(e,"i",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"k",(function(){return i})),a.d(e,"d",(function(){return s})),a.d(e,"g",(function(){return c})),a.d(e,"h",(function(){return u})),a.d(e,"a",(function(){return l})),a.d(e,"j",(function(){return d})),a.d(e,"f",(function(){return m})),a.d(e,"c",(function(){return f})),a.d(e,"e",(function(){return b}));var n=a("b775");function r(t){return Object(n["a"])({url:"source/data/categories/",method:"post",data:t})}function o(t){return Object(n["a"])({url:"source/data/categories/create/",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/source/data/category/update",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/source/data/category/delete",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/source/data/category/info",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/source/data/search",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/source/data/create",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/source/data/update",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/source/data/info",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/source/data/delete",method:"post",data:t})}function b(t){return Object(n["a"])({url:"/source/data/find",method:"post",data:t})}},2262:function(t,e,a){"use strict";a("be83")},"2f15":function(t,e,a){"use strict";a("1b2c")},"56ba":function(t,e,a){},"610d":function(t,e,a){"use strict";a.d(e,"d",(function(){return r})),a.d(e,"a",(function(){return o})),a.d(e,"f",(function(){return i})),a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return c})),a.d(e,"e",(function(){return u}));var n=a("b775");function r(t){return Object(n["a"])({url:"/admin/role/search",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/admin/role/create",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/admin/role/update",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/admin/auth/selectInfo",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/admin/role/delete",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/permissions/selectPermissions",method:"post",data:t})}},"7c762":function(t,e,a){},"8261e":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"project-search"},[a("dataSearch",{on:{bindSetQuery:t.setQuery}}),a("dataList",{attrs:{queryForm:t.queryForm}})],1)},r=[],o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-search"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.queryForm}},[a("el-form-item",{attrs:{label:"分类名称:"}},[a("el-input",{attrs:{placeholder:"请选择分类名称"},model:{value:t.queryForm.name,callback:function(e){t.$set(t.queryForm,"name",e)},expression:"queryForm.name"}})],1),a("el-form-item",{attrs:{label:"分类状态:"}},[a("el-select",{staticClass:"m-2",attrs:{placeholder:"请选择分类状态",size:"large",clearable:""},model:{value:t.queryForm.status,callback:function(e){t.$set(t.queryForm,"status",e)},expression:"queryForm.status"}},t._l(t.statusOptions,(function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[a("svg-icon",{attrs:{"icon-class":"search"}}),t._v(" 搜索")],1),a("el-button",{attrs:{type:"success"},on:{click:t.onCreate}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v(" 创建分类")],1)],1)],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"",width:"50%","custom-class":"prod-verify",title:"创建原始数据分类"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("dataInfo",{on:{onClose:t.onClose}})],1)],1)},i=[],s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-info"},[a("el-card",[a("el-form",{attrs:{model:t.dataForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"分类名称:"}},[a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入分类名称"},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1)],1)],1),a("div",{staticStyle:{"text-align":"right","margin-top":"20px","margin-bottom":"20px"}},[a("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)},c=[],u=(a("a9e3"),a("1c4c")),l={emits:["onClose"],props:{id:{type:Number,default:0}},watch:{id:{handler:function(t){null==t||t<=0||this.initCategoryInfo(t)},immediate:!0,deep:!0}},data:function(){return{statusOptions:[{value:5,label:"启用"},{value:6,label:"停用"}],dataForm:{code:"",name:"",intro:"",id:0}}},mounted:function(){},methods:{btnSave:function(t){var e=this;e.dataForm.id>0?Object(u["k"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("分类信息更新成功"),e.$emit("onClose"))})):Object(u["b"])(e.dataForm).then((function(t){200==t.status&&(e.$alert("分类信息创建成功"),e.$emit("onClose"))}))},onChangeStatus:function(t){this.dataForm.status=t},initCategoryInfo:function(t){var e=this;Object(u["g"])({id:t}).then((function(t){200==t.status&&(e.dataForm=t.data)}))}}},d=l,m=(a("0981"),a("2877")),f=Object(m["a"])(d,s,c,!1,null,"4b8e6e28",null),b=f.exports,h=a("a888"),p={components:{dataInfo:b},directives:{elDragDialog:h["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",status:""}}}},data:function(){return{statusOptions:[{value:5,label:"启用"},{value:6,label:"停用"}],dialogVisible:!1}},created:function(){},methods:{onCreate:function(t){this.dialogVisible=!0},onClose:function(){this.dialogVisible=!1,this.queryForm.isUpdate=!this.queryForm.isUpdate,this.onSubmit()},onSubmit:function(){this.$emit("bindSetQuery",this.$props.queryForm)}}},g=p,v=(a("2f15"),Object(m["a"])(g,o,i,!1,null,"01f60281",null)),y=v.exports,F=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"data-list"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,"header-row-class-name":"headerBg","empty-text":"没有分类信息"}},[a("el-table-column",{attrs:{prop:"id",label:"ID",align:"center",width:"80"}}),a("el-table-column",{attrs:{prop:"name",label:"分类名称",align:"center","min-width":"180"}}),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间",align:"center","min-width":"180"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",align:"center","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"btns"},[e.row.edit?a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.btnEdit(e.row)}}},[a("svg-icon",{attrs:{"icon-class":"edit"}}),t._v("编辑")],1):t._e(),e.row.delete?a("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(a){return t.onDelete(e.row.id)}}},[a("svg-icon",{attrs:{"icon-class":"delete"}}),t._v("删除")],1):t._e()],1)]}}])})],1),a("div",{staticClass:"page-info"},[a("el-pagination",{attrs:{currentPage:t.queryForm.page,"page-size":t.queryForm.pageSize,total:t.recordCount,"page-count":t.pageTotal,background:"",layout:"prev, pager, next"},on:{"current-change":t.ChangePage}})],1),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{visible:t.dialogVisible,"append-to-body":"",width:"50%","custom-class":"prod-verify",title:"修改原始数据分类 "},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-card",[a("el-form",{attrs:{model:t.dataForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"分类名称:"}},[a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入分类名称"},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1)],1)],1),a("div",{staticStyle:{"text-align":"right","margin-top":"20px","margin-bottom":"20px"}},[a("el-button",{attrs:{type:"warning"},on:{click:t.btnSave}},[t._v("确认保存")])],1)],1)],1)},O=[],j=a("5530"),w=(a("b0c0"),a("d3b7"),a("ac1f"),a("841c"),a("159b"),a("610d")),C={components:{dataInfo:b},directives:{elDragDialog:h["a"]},props:{queryForm:{type:Object,default:function(){return{page:1,pageSize:10,name:"",status:""}}}},watch:{queryForm:{handler:function(t){this.search()},immediate:!0,deep:!0}},data:function(){return{dialogVisible:!1,currentDataId:0,recordCount:0,pageTotal:1,dataList:[],currentData:{},authorityList:[],dataForm:{name:""}}},mounted:function(){this.search()},methods:{btnSave:function(){var t=this;t.currentDataId?Object(u["k"])(Object(j["a"])({id:t.currentDataId},this.dataForm)).then((function(){200==res.status&&(t.dialogVisible=!1,t.$message.success("分类信息更新成功"),t.dataForm={},t.search())})):Object(u["b"])(this.dataForm).then((function(){200==res.status&&(t.dialogVisible=!1,t.$message.success("分类信息创建成功"),t.dataForm={},t.search())}))},authority:function(){var t=this;Object(w["c"])({id:this.$store.state.user.roleInfo.id}).then((function(e){t.authorityList=e.data}))},onFocusVal:function(t){var e=this;e.currentDataId=t.target.dataset.id},onChangeVal:function(t){var e=this;e.currentDataId},onClose:function(){var t=this;t.dialogVisible=!1,t.search()},onDelete:function(t){var e=this,a={id:t};e.$confirm("您是否确认删除该记录?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(t){Object(u["d"])(a).then((function(t){e.search()}))})).catch((function(){}))},btnEdit:function(t){var e=this;e.dataForm.name=t.name,e.currentDataId=t.id,e.dialogVisible=!0},handleClose:function(){var t=this;t.currentData={},t.dialogVisible=!1},search:function(){var t=this,e=this;Object(u["i"])(e.queryForm).then((function(a){a&&("admin"==t.$store.state.user.name?a.data.sourcecategories.forEach((function(t){e.$set(t,"edit",!0),e.$set(t,"delete",!0)})):Object(w["c"])({id:t.$store.state.user.roleInfo.id}).then((function(t){t&&t.data.source_cate_auth.forEach((function(t){a.data.sourcecategories.forEach((function(a){t.id===a.id?(e.$set(a,"edit",!0),e.$set(a,"delete",!0)):(e.$set(a,"edit",!1),e.$set(a,"delete",!1))}))}))})),e.dataList=a.data.sourcecategories,console.log(e.dataList),e.recordCount=a.data.total,e.pageTotal=a.data.totalPage)}))},ChangePage:function(t){var e=this;e.queryForm.page=t,e.search()}}},$=C,x=(a("0c3c"),Object(m["a"])($,F,O,!1,null,null,null)),S=x.exports,q={components:{dataSearch:y,dataList:S},data:function(){return{queryForm:{page:1,pageSize:10,name:"",status:""}}},methods:{setQuery:function(t){this.queryForm=t}}},_=q,k=(a("2262"),Object(m["a"])(_,n,r,!1,null,null,null));e["default"]=k.exports},be83:function(t,e,a){}}]);