mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
webpackJsonp([177],{aKn0:function(e,t,a){var n=a("m03W");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("414b1922",n,!0)},aqNl:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("yfAY"),r=a("vMX1"),s=a("D8sR"),o=a("x1DN"),i={data:function(){return{total:0,isShow:!1,tableData:[],tableLoading:!1,cardTypes:[],orgTypes:[],statusType:[],personType:[],searchForm:{certType:null,level:null,status:null,type:null,rowsOfPage:10,currentPage:1},showImport:!1}},created:function(){this.fetchData(),this.fetchOptions()},methods:{fetchOptions:function(){var e=this;n.b.status().then(function(t){e.statusType=t}),this.cardTypes=this.$dict("certificateType",!0,!0),this.orgTypes=this.$dict("orgType",!0),this.personType=this.$dict("peopleType",!0,!0)},fetchData:function(){var e=this;this.tableLoading=!0,s.a.search(this.searchForm).then(function(t){setTimeout(function(){e.tableData=t.data,e.total=t.total,e.tableLoading=!1},500)}).catch(function(t){e.tableLoading=!1})},goDetail:function(e){this.$router.push({path:"/person/detail",query:{id:e.id,hash:Date.now()}})},enable:function(e){var t=this;this.$set(e,"loading",!0),s.a.enable(e.id).then(function(a){t.$message.success("启用成功"),t.$set(e,"loading",!1),t.$message.success("启用成功"),t.fetchData()}).catch(function(a){t.$set(e,"loading",!1),t.fetchData()})},disable:function(e){var t=this;this.$confirm("确认禁用此人员?","确认禁用",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$set(e,"loading",!0),s.a.disable(e.id).then(function(a){t.$message.success("禁用成功"),t.$set(e,"loading",!1),t.$message.success("禁用成功"),t.fetchData()}).catch(function(a){t.$set(e,"loading",!1),t.fetchData()})}).catch(function(){})},deleteRow:function(e){var t=this;this.$confirm("确认删除此人员?","确认删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$set(e,"deleteloading",!0),s.a.delete(e.id).then(function(a){t.$set(e,"deleteloading",!1),t.fetchData()}).catch(function(a){t.$set(e,"deleteloading",!1),t.fetchData()})}).catch(function(){})},handleReset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.searchForm.currentPage=1,this.fetchData()},transterPerson:function(e){if(e){var t=e.split("#"),a=t.length>1?t[1]:"";return this.personType.some(function(e){if(e.value===a)return a=e.label,!0}),a}return""}},components:{searchPage:r.a,cascader:o.a}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-card",{attrs:{shadow:"hover"}},[a("search-page",{attrs:{pageSize:e.searchForm.rowsOfPage,pageNum:e.searchForm.currentPage,limit:"",total:e.total},on:{"update:pageSize":function(t){return e.$set(e.searchForm,"rowsOfPage",t)},"update:page-size":function(t){return e.$set(e.searchForm,"rowsOfPage",t)},"update:pageNum":function(t){return e.$set(e.searchForm,"currentPage",t)},"update:page-num":function(t){return e.$set(e.searchForm,"currentPage",t)},change:e.fetchData}},[a("el-form",{ref:"queryForm",staticClass:"form-info search",attrs:{inline:"true",model:e.searchForm}},[a("div",{staticClass:"search-input"},[a("el-form-item",{attrs:{label:"所属机构",prop:"orgId"}},[a("cascader",{model:{value:e.searchForm.orgId,callback:function(t){e.$set(e.searchForm,"orgId",t)},expression:"searchForm.orgId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"人员姓名",prop:"name"}},[a("el-input",{attrs:{placeholder:"人员姓名"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.searchForm.name,callback:function(t){e.$set(e.searchForm,"name","string"==typeof t?t.trim():t)},expression:"searchForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"人员编号",prop:"code"}},[a("el-input",{attrs:{placeholder:"人员编号(精确查询)"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.searchForm.code,callback:function(t){e.$set(e.searchForm,"code","string"==typeof t?t.trim():t)},expression:"searchForm.code"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{label:"人员类型",prop:"type"}},[a("el-select",{model:{value:e.searchForm.type,callback:function(t){e.$set(e.searchForm,"type",t)},expression:"searchForm.type"}},e._l(e.personType,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{label:"证件类型",prop:"certType"}},[a("el-select",{model:{value:e.searchForm.certType,callback:function(t){e.$set(e.searchForm,"certType",t)},expression:"searchForm.certType"}},e._l(e.cardTypes,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{prop:"certNo",label:"证件号码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}}},[a("el-input",{attrs:{placeholder:"证件号(精确查询)"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.searchForm.certNo,callback:function(t){e.$set(e.searchForm,"certNo","string"==typeof t?t.trim():t)},expression:"searchForm.certNo"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{label:"人员状态",prop:"status"}},[a("el-select",{model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},e._l(e.statusType,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1)],1),e._v(" "),a("div",{staticClass:"search-button"},[a("el-form-item",[a("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isShow,expression:"!isShow"}],staticStyle:{position:"relative",top:"2px",left:"3px"},attrs:{type:"text"},on:{click:function(t){e.isShow=!0}}},[e._v("\n 展开\n "),a("el-icon",{staticClass:"el-icon-arrow-down"})],1),e._v(" "),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],staticStyle:{position:"relative",top:"2px",left:"3px",margin:"0px"},attrs:{type:"text"},on:{click:function(t){e.isShow=!1}}},[e._v("\n 收起\n "),a("el-icon",{staticClass:"el-icon-arrow-up"})],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personSearch],expression:"[$auth.personSearch]"}],attrs:{type:"warning"},on:{click:e.handleQuery}},[e._v("查询")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personSearch],expression:"[$auth.personSearch]"}],on:{click:e.handleReset}},[e._v("重置")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personAdd],expression:"[$auth.personAdd]"}],attrs:{type:"primary"},on:{click:function(t){return e.$router.push("/person/add")}}},[e._v("新建")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personBatch],expression:"[$auth.personBatch]"}],attrs:{type:"primary"},on:{click:function(t){return e.$router.push("/person/import")}}},[e._v("批量导入")])],1)],1)]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{type:"index",label:"序号",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"code","show-overflow-tooltip":"",label:"人员编号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name","show-overflow-tooltip":"",label:"人员姓名"}}),e._v(" "),a("el-table-column",{attrs:{prop:"orgName",label:"所属机构","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"type",label:"人员类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("DICT")(t.row.type,"peopleType",!0))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"type",label:"VIP等级"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("VIP")(t.row))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"certNo","show-overflow-tooltip":"",label:"证件号码"}}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"人员状态"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("status-point",{attrs:{disabled:2==e.row.status,value:e.row.status}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",width:"190",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personDetail],expression:"[$auth.personDetail]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v("详情")]),e._v(" "),1==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personEnable],expression:"[$auth.personEnable]"}],staticClass:"btn-border-right",attrs:{size:"middle",loading:t.row.loading,type:"text"},on:{click:function(a){return e.disable(t.row)}}},[e._v("禁用")]):a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.personEnable],expression:"[$auth.personEnable]"}],staticClass:"btn-border-right",attrs:{size:"middle",loading:t.row.loading,type:"text"},on:{click:function(a){return e.enable(t.row)}}},[e._v("启用")]),e._v(" "),1!=t.row.status?a("el-button",{staticClass:"btn-border-right",attrs:{size:"middle",loading:t.row.loading,type:"text"},on:{click:function(a){return e.deleteRow(t.row)}}},[e._v("删除")]):e._e()]}}])})],1)],1)],1)],1)},staticRenderFns:[]};var c=a("VU/8")(i,l,!1,function(e){a("aKn0")},"data-v-49ada23e",null);t.default=c.exports},m03W:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.left[data-v-49ada23e] {\n display: inline-block;\n margin-right: 20px;\n position: absolute;\n right: 110px;\n}\n.form-info[data-v-49ada23e] .el-input {\n width: 200px;\n}\n",""])}}); |