mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 17:00:30 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
8.7 KiB
JavaScript
1 line
8.7 KiB
JavaScript
webpackJsonp([30],{"3aBe":function(e,t,a){"use strict";var n=a("Dd8w"),r=a.n(n),o=a("yfAY"),i=a("pLnW"),s={data:function(){return{ifEdit:!1,loading:!1,dictTypes:[],allDicts:[],form:{}}},props:{show:{type:Boolean,default:!1}},computed:{msg:function(){return this.ifEdit?"编辑成功":"添加成功"},title:function(){return this.ifEdit?"编辑字典":"添加字典"}},created:function(){this.fetchOptions()},methods:{fetchOptions:function(){var e=this;o.b.dicts().then(function(t){e.dictTypes=t})},editRow:function(e){var t=this,a=e.id,n=e.name,r=e.typeCode,o=e.remark,i=e.code;this.form={id:a,name:n,typeCode:r,remark:o,code:i},this.ifEdit=!0,this.$nextTick(function(){t.$refs.ruleForm.clearValidate()})},fetchCreate:function(){var e=this,t=r()({},this.form);this.loading=!0,(this.ifEdit?i.a.edit(t):i.a.add(t)).then(function(t){e.loading=!1,e.$message.success(e.msg),e.handleClose(),e.$store.dispatch("FETCH_DICTS"),e.$emit("success")}).catch(function(t){e.loading=!1,e.$message.error(t.message)})},submit:function(){var e=this;this.$refs.ruleForm.validate(function(t){t&&e.fetchCreate()})},handleClose:function(){var e=this;this.form={},this.ifEdit=!1,this.$nextTick(function(){e.$refs.ruleForm.clearValidate(),e.$emit("update:show",!1)})}},components:{}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"cmt-wrp",attrs:{title:e.title,width:"500px",visible:e.show,"before-close":e.handleClose},on:{"update:visible":function(t){e.show=t}}},[a("el-form",{ref:"ruleForm",attrs:{model:e.form,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"字典名称",rules:[e.$rule.normalRule(),e.$rule.lenRule(1,64)],prop:"name"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{maxlength:"63"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"字典类型",rules:[e.$rule.normalRule()],prop:"typeCode"}},[a("el-select",{attrs:{disabled:e.ifEdit},model:{value:e.form.typeCode,callback:function(t){e.$set(e.form,"typeCode",t)},expression:"form.typeCode"}},e._l(e.dictTypes,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"字典编码",rules:[e.$rule.normalRule()],prop:"code"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{disabled:e.ifEdit},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",rules:[e.$rule.lenRule(0,255)],prop:"remark"}},[a("div",{staticClass:"word-limit-ctnr"},[a("el-input",{attrs:{maxlength:"255",type:"textarea",resize:"none"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}}),e._v(" "),a("span",{staticClass:"word-limit"},[e._v(e._s(e.form.remark&&e.form.remark.length||0)+"/255")])],1)]),e._v(" "),a("el-row",{staticStyle:{"text-align":"right"}},[a("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.submit}},[e._v("确定")]),e._v(" "),a("el-button",{on:{click:e.handleClose}},[e._v("取消")])],1)],1)],1)},staticRenderFns:[]};var c=a("VU/8")(s,l,!1,function(e){a("7vSS")},"data-v-3869f4f4",null);t.a=c.exports},"7vSS":function(e,t,a){var n=a("cHZR");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("67da8c1c",n,!0)},KpmU:function(e,t,a){var n=a("kh6d");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("00c0e045",n,!0)},WnXa:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("yfAY"),r=a("pLnW"),o=a("vMX1"),i=a("3aBe"),s=a("KH6O"),l={data:function(){return{total:10,tableData:[],tableLoading:!1,bools:[],dictTypes:[],statusOptions:[],roles:[],searchForm:{name:"",code:"",rowsOfPage:10,currentPage:1},showAdd:!1,showImport:!1}},created:function(){this.fetchData(),this.fetchOptions()},methods:{getdictTypeName:function(e){var t="";return this.dictTypes.map(function(a){a.value===e&&(t=a.label)}),t},fetchOptions:function(){var e=this;n.b.useStatus().then(function(t){e.statusOptions=t})},fetchData:function(){var e=this;this.tableLoading=!0,r.a.typeSearch(this.searchForm).then(function(t){setTimeout(function(){e.tableLoading=!1},500),e.tableData=t.data,e.total=t.total}).catch(function(t){e.tableLoading=!1})},handleNext:function(e){this.$router.push({path:"/dict/sub",query:{code:e.code,name:e.name}})},enable:function(e){var t=this;this.$set(e,"loading",!0),r.a.typeEnable(e.id).then(function(a){t.$set(e,"loading",!1),t.fetchData()}).catch(function(a){t.$message.error(a.message),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),r.a.typeDisable(e.id).then(function(a){t.$set(e,"loading",!1),t.fetchData()}).catch(function(a){t.$set(e,"loading",!1),t.$message.error(a.message),t.fetchData()})}).catch(function(){})},handleReset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.searchForm.currentPage=1,this.fetchData()}},components:{searchPage:o.a,addDialog:i.a,importDialog:s.a}},c={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,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",attrs:{inline:!0,model:e.searchForm}},[a("el-form-item",{attrs:{label:"字典类型",prop:"name"}},[a("div",{staticClass:"word-limit-ctnr"},[a("el-input",{attrs:{placeholder:"字典类型(模糊查询)",maxlength:32},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("div",{staticClass:"word-limit-ctnr"},[a("el-input",{attrs:{placeholder:"字典编码(精确查询)",maxlength:32},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",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.dictSearch],expression:"[$auth.dictSearch]"}],attrs:{type:"warning"},on:{click:e.handleQuery}},[e._v("查询")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.dictSearch],expression:"[$auth.dictSearch]"}],on:{click:e.handleReset}},[e._v("重置")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.dictBatch],expression:"[$auth.dictBatch]"}],attrs:{type:"primary"},on:{click:function(t){e.showImport=!0}}},[e._v("批量导入")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",staticStyle:{"margin-top":"20px"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"name",label:"字典类型"}}),e._v(" "),a("el-table-column",{attrs:{prop:"code",label:"字典编码"}}),e._v(" "),a("el-table-column",{attrs:{prop:"remark","show-overflow-tooltip":"",label:"字典含义"}}),e._v(" "),a("el-table-column",{attrs:{prop:"address",width:"160",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.dictSub],expression:"[$auth.dictSub]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text"},on:{click:function(a){return e.handleNext(t.row)}}},[e._v("字典维护")])]}}])})],1)],1)],1),e._v(" "),a("add-dialog",{ref:"addDialog",attrs:{show:e.showAdd},on:{success:e.fetchData,"update:show":function(t){e.showAdd=t}}}),e._v(" "),a("import-dialog",{ref:"importDialog",attrs:{show:e.showImport},on:{success:e.fetchData,"update:show":function(t){e.showImport=t}}})],1)},staticRenderFns:[]};var u=a("VU/8")(l,c,!1,function(e){a("KpmU")},"data-v-1bde3b8e",null);t.default=u.exports},cHZR:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"",""])},kh6d:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.left[data-v-1bde3b8e] {\n display: inline-block;\n margin-right: 20px;\n position: absolute;\n right: 110px;\n}\n",""])}}); |