1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-807b1b32"],{"155d":function(t,e,a){},"24fd":function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n})),a.d(e,"e",(function(){return o})),a.d(e,"c",(function(){return l})),a.d(e,"d",(function(){return s}));var r=a("b775");function i(t){return Object(r["a"])({url:"/org/addOrg",method:"post",data:t})}function n(t){return Object(r["a"])({url:"/org/deleteOrg/"+t,method:"delete"})}function o(t){return Object(r["a"])({url:"/org/updateOrg",method:"put",data:t})}function l(t){return Object(r["a"])({url:"/org/getOrg",method:"get",params:t})}function s(t){return Object(r["a"])({url:"/org/getOrgList",method:"post",data:t})}},"564c":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container-child"},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:"组织名..."},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleFilter(e)}},model:{value:t.filterQuery.orgName,callback:function(e){t.$set(t.filterQuery,"orgName",e)},expression:"filterQuery.orgName"}}),a("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"组织备注..."},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleFilter(e)}},model:{value:t.filterQuery.orgDescript,callback:function(e){t.$set(t.filterQuery,"orgDescript",e)},expression:"filterQuery.orgDescript"}}),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.handleFilter}},[t._v("搜索")]),a("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:t.handleCreate}},[t._v("添加组织")])],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{align:"center",label:"ID",width:"100",type:"index"}}),a("el-table-column",{attrs:{label:"组织名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.orgName||""==e.row.orgName?a("span",[t._v("暂无信息")]):a("span",[t._v(" "+t._s(e.row.orgName))])]}}])}),a("el-table-column",{attrs:{label:"组织备注",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.orgDescript||""==e.row.orgDescript?a("span",[t._v("暂无信息")]):a("span",[t._v(" "+t._s(e.row.orgDescript))])]}}])}),a("el-table-column",{attrs:{align:"center",prop:"created_at",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(a){return t.handleUpdate(e.row)}}},[t._v("编辑")]),a("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(a){return t.deleteDate(e.row)}}},[t._v("删除")])]}}])})],1),a("div",{staticStyle:{float:"right","margin-top":"30px"}},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.form,rules:t.rules}},[a("el-form-item",{staticClass:"dialogShow",attrs:{label:"组织名称:",prop:"orgName","label-width":t.formLabelWidth}},[a("el-input",{attrs:{placeholder:"请输入组织名称",autocomplete:"off"},model:{value:t.form.orgName,callback:function(e){t.$set(t.form,"orgName",e)},expression:"form.orgName"}})],1),a("el-form-item",{staticClass:"dialogShow",attrs:{label:"组织备注:","label-width":t.formLabelWidth}},[a("el-input",{attrs:{placeholder:"请输入组织备注",autocomplete:"off"},model:{value:t.form.orgDescript,callback:function(e){t.$set(t.form,"orgDescript",e)},expression:"form.orgDescript"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.handleCancle}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){"create"==t.dialogStatus?t.createData():t.updateData()}}},[t._v("确 定")])],1)],1)],1)},i=[],n=a("24fd"),o={data:function(){return{list:null,tempList:{},tempArr:[],tempUserWX:{},key:"",tempIndex:0,departmentList:{},feedTypeParentName:"",listLoading:!0,dialogFormVisible:!1,dialogStatus:"",textMap:{create:"添加组织",update:"修改组织"},form:{orgName:"",phone:"",userDescript:"",departmentId:0},formLabelWidth:"150px",total:0,currentPage:1,filterQuery:{pageNum:1,pageSize:10},limitUpload:1,excelQuery:{},excelList:{},rules:{orgName:[{required:!0,message:"组织名称不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,this.clearDialogData(),this.listLoading=!1,Object(n["d"])(this.filterQuery).then((function(e){t.list=e.data.list,t.listLoading=!1}))},handleCreate:function(){var t=this;this.clearDialogData(),this.dialogFormVisible=!0,this.dialogStatus="create",this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},handleUpdate:function(t){var e=this;this.dialogStatus="update",Object(n["c"])({orgId:t.orgId}).then((function(t){e.form=t.data})),this.dialogFormVisible=!0},handleFilter:function(){console.log("搜索"),this.getList()},handleCancle:function(){this.clearDialogData(),this.dialogFormVisible=!1},clearDialogData:function(){this.form={}},createData:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&Object(n["a"])(t.form).then((function(e){t.$notify({title:"组织添加",message:e.msg,type:"success",duration:2e3}),200===e.status&&(t.dialogFormVisible=!1,t.getList())}))}))},deleteDate:function(t){var e=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(n["b"])(t.orgId).then((function(t){e.$notify({title:"删除用户",message:t.msg,type:200===t.status?"success":"error",duration:2e3}),200===t.status&&e.getList()}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},updateData:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&Object(n["e"])(t.form).then((function(e){t.dialogFormVisible=!1,t.clearDialogData(),t.$notify({title:"更新部门",message:e.msg,type:200===e.status?"success":"error",duration:2e3}),t.getList()}))}))},handleSizeChange:function(t){console.log("每页 ".concat(t," 条")),this.filterQuery.pageSize=t,this.getList()},handleCurrentChange:function(t){console.log("当前页: ".concat(t)),this.filterQuery.pageNum=t,this.getList()}}},l=o,s=(a("e9ca"),a("4023")),c=Object(s["a"])(l,r,i,!1,null,null,null);e["default"]=c.exports},e9ca:function(t,e,a){"use strict";var r=a("155d"),i=a.n(r);i.a}}]);
|