Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/64.d012f803a3e23755a2ad.js
T
反编译工作区 4f79e10bd6 chore: cleanup stray nested directories in frontend-source
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
2026-04-29 13:07:40 +08:00

1 line
3.2 KiB
JavaScript

webpackJsonp([64],{"/T6Z":function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.add-btn[data-v-f031bd00] {\n line-height: 36px;\n height: 36px;\n text-align: center;\n border: 1px dashed #999;\n margin: 20px 8px;\n cursor: pointer;\n color: #3399ff;\n}\n",""])},PEVS:function(e,t,a){var n=a("/T6Z");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("623c81b5",n,!0)},scdZ:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("pLnW"),r={data:function(){return{parentCode:this.$route.query.code,tableData:[{name:"",code:"",remark:""}]}},methods:{addRow:function(){this.tableData.push({name:"",code:"",remark:""})},remove:function(e){this.tableData.splice(e,1)},handleEdit:function(e){e.id&&this.$set(e,"saved",!1)},handleSave:function(e){var t=this,a=e.name,r=e.code,o=e.remark,s=e.id;if(a&&r)if(/#/.test(r))this.$message.error("编码不能包含#");else{var l=!!e.id;this.$set(e,"loading",!0);var i={id:s,name:a,code:r,remark:o,typeCode:this.parentCode};(l?n.a.edit(i):n.a.add(i)).then(function(a){e.loading=!1,a.data&&a.data.id&&t.$set(e,"id",a.data.id),t.$set(e,"saved",!0),t.$store.dispatch("FETCH_DICTS")}).catch(function(a){e.loading=!1,t.$message.error(a.message)})}else this.$message.error("字典名称或编码未填写")}},components:{}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-table",{staticClass:"table_expand",staticStyle:{"margin-top":"20px"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"name",label:"字典名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{maxlength:"63",disabled:t.row.saved},model:{value:t.row.name,callback:function(a){e.$set(t.row,"name",a)},expression:"scope.row.name"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"code",label:"字典编码"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{attrs:{maxlength:"32",disabled:!!t.row.id},model:{value:t.row.code,callback:function(a){e.$set(t.row,"code",a)},expression:"scope.row.code"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"remark",rules:[e.$rule.lenRule(0,255)],label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"word-limit-ctnr"},[a("el-input",{attrs:{maxlength:"255",disabled:t.row.saved},model:{value:t.row.remark,callback:function(a){e.$set(t.row,"remark",a)},expression:"scope.row.remark"}}),e._v(" "),a("span",{staticClass:"word-limit"},[e._v(e._s(t.row.remark&&t.row.remark.length||0)+"/255")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.saved?a("el-button",{attrs:{type:"text",loading:t.row.loading,size:"middle"},on:{click:function(a){return e.handleEdit(t.row)}}},[e._v("编辑")]):a("el-button",{attrs:{type:"text",loading:t.row.loading,size:"middle"},on:{click:function(a){return e.handleSave(t.row)}}},[e._v("保存")])]}}])})],1),e._v(" "),a("div",{staticClass:"add-btn",on:{click:e.addRow}},[a("i",{staticClass:"el-icon-plus"}),e._v(" 新增字典")])],1)},staticRenderFns:[]};var s=a("VU/8")(r,o,!1,function(e){a("PEVS")},"data-v-f031bd00",null);t.default=s.exports}});