You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.3 KiB
1 lines
6.3 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4bd9fbe5"],{"0d0e":function(t,e,a){"use strict";a("c207")},"816b":function(t,e,a){"use strict";var o=a("365c");function l(t){var e="/module/index";return o["a"].get(e,t)}function r(t){var e="/module/save";return o["a"].post(e,t)}function s(t){var e="/module/update";return o["a"].post(e,t)}function i(t){var e="/module/delete";return o["a"].post(e,t)}function d(t){var e="/module/read";return o["a"].get(e,t)}function n(t){var e="/category/getModuleCate";return o["a"].get(e,t)}function u(t){var e="/moduleField/index";return o["a"].get(e,t)}function c(t){var e="/moduleField/save";return o["a"].post(e,t)}function m(t){var e="/moduleField/update";return o["a"].post(e,t)}function p(t){var e="/moduleField/delete";return o["a"].post(e,t)}function b(t){var e="/moduleField/read";return o["a"].get(e,t)}function f(t){var e="/module/all";return o["a"].get(e,t)}function g(t){var e="/module/field";return o["a"].get(e,t)}e["a"]={moduleList:l,moduleSave:r,moduleUpdate:s,moduleDelete:i,moduleInfo:d,fieldList:u,fieldSave:c,fieldUpdate:m,fieldDelete:p,fieldInfo:b,getModuleCate:n,moduleTable:f,moduleField:g}},"946b":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"main-box",attrs:{id:"order"}},[a("el-button",{staticStyle:{"margin-bottom":"15px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.goAdd}},[t._v(" "+t._s(t.$t("添加"))+" ")]),a("BaseTable",{attrs:{request:t.request}},[a("el-table-column",{attrs:{label:"ID",prop:"id",width:"60px"}}),a("el-table-column",{attrs:{label:t.$t("模型名称"),prop:"title"}}),a("el-table-column",{attrs:{label:t.$t("表名"),prop:"table"}}),a("el-table-column",{attrs:{label:t.$t("附表"),prop:"database_table"}}),a("el-table-column",{attrs:{label:t.$t("模型类型"),prop:"type"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.type?a("span",[t._v(t._s(t.$t("独立模型")))]):t._e(),2==e.row.type?a("span",[t._v(t._s(t.$t("主表附表模型")))]):t._e()]}}])}),a("el-table-column",{attrs:{label:t.$t("状态"),width:"180px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":2,"active-text":t.$t("正常"),"inactive-text":t.$t("禁用"),"active-color":"var(--huocms-com-color-primary)","inactive-color":"rgba(0,0,0,0.2)"},on:{change:function(a){return t.disableUser(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),a("el-table-column",{attrs:{label:t.$t("操作"),width:"150px",fixed:"right",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("CheckBtn",{attrs:{"tips-content":t.$t("查看模型字段")},on:{click:function(a){return t.check(e.row)}}}),a("EditBtn",{on:{click:function(a){return t.editor(e.row)}}}),a("DelBtn",{attrs:{"confirm-content":t.$t("永久删除该模型")},on:{success:function(a){return t.del(e.row)}}})]}}])})],1),a("BaseDialog",{attrs:{title:t.id?t.$t("编辑"):t.$t("添加"),"dialog-show":t.dialogShow,width:"50%",footer:""},on:{"update:dialogShow":function(e){t.dialogShow=e},"update:dialog-show":function(e){t.dialogShow=e},submit:t.submit}},[a("el-form",{ref:"addForm",attrs:{model:t.addForm,rules:t.rules,"label-position":"top"}},[a("el-form-item",{attrs:{label:t.$t("名称"),prop:"title"}},[a("el-input",{model:{value:t.addForm.title,callback:function(e){t.$set(t.addForm,"title",e)},expression:"addForm.title"}})],1),a("el-form-item",{attrs:{label:t.$t("表名"),prop:"table"}},[a("el-input",{attrs:{disabled:!!t.id,placeholder:t.$t("表名由字母和下划线组成")},model:{value:t.addForm.table,callback:function(e){t.$set(t.addForm,"table",e)},expression:"addForm.table"}})],1),a("el-form-item",{attrs:{label:t.$t("模型类型"),prop:"type"}},[a("el-select",{model:{value:t.addForm.type,callback:function(e){t.$set(t.addForm,"type",e)},expression:"addForm.type"}},[a("el-option",{attrs:{label:t.$t("独立模型"),value:1,disabled:""}}),a("el-option",{attrs:{label:t.$t("主表附表模型"),value:2}})],1)],1),a("el-form-item",{attrs:{label:t.$t("描述"),prop:"description"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:4}},model:{value:t.addForm.description,callback:function(e){t.$set(t.addForm,"description",e)},expression:"addForm.description"}})],1),a("el-form-item",{attrs:{label:t.$t("状态")}},[a("el-select",{model:{value:t.addForm.status,callback:function(e){t.$set(t.addForm,"status",e)},expression:"addForm.status"}},[a("el-option",{attrs:{label:t.$t("正常"),value:1}}),a("el-option",{attrs:{label:t.$t("禁用"),value:2}})],1)],1)],1)],1)],1)},l=[],r=a("5530"),s=(a("a4d3"),a("e01a"),a("816b")),i={data:function(){return{request:s["a"].moduleList,dialogShow:!1,addForm:{title:"",table:"",database_table:"",description:"",type:2,status:""},rules:{title:[{required:"true",message:this.$t("请输入模型名"),trigger:"blur"}],table:[{required:"true",message:this.$t("请输入表名"),trigger:"blur"}],description:[{required:"true",message:this.$t("请输入模型描述"),trigger:"blur"}],type:[{required:"true",message:this.$t("请选择模型类型"),trigger:"change"}]},id:""}},methods:{disableUser:function(t){var e=this,a={title:t.title,table:t.table,database_table:t.database_table,description:t.description,type:t.type,id:t.id,status:""};1==t.status?a.status=1:a.status=2,s["a"].moduleUpdate(a).then((function(t){0==t.code&&e.$message.success(t.msg)}))},goAdd:function(){this.id="",this.addForm={},this.addForm.status=1,this.addForm.type=2,this.dialogShow=!0},editor:function(t){this.id=t.id,this.addForm=t,this.dialogShow=!0},submit:function(){var t=this;this.$refs.addForm.validate((function(e){e?t.addForm.id?s["a"].moduleUpdate(Object(r["a"])({},t.addForm)).then((function(e){0==e.code&&(t.$message.success(e.msg),t.dialogShow=!1,t.$refs.baseTable.getList("search"))})):s["a"].moduleSave(Object(r["a"])({},t.addForm)).then((function(e){0==e.code&&(t.$message.success(e.msg),t.dialogShow=!1,t.$refs.baseTable.getList("search"))})):t.$message.error(t.$t("请填写必要信息"))}))},check:function(t){this.$router.push({name:"modelField",query:{id:t.id}})},del:function(t){var e=this;s["a"].moduleDelete({id:t.id}).then((function(t){0==t.code&&(e.$message.success(t.msg),e.$refs.baseTable.getList())}))}}},d=i,n=(a("0d0e"),a("2877")),u=Object(n["a"])(d,o,l,!1,null,"1771efaa",null);e["default"]=u.exports},c207:function(t,e,a){}}]);
|