启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-3d8bee18.08ff7b3f.js

1 lines
5.9 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d8bee18"],{"881c":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,size:"small","label-width":"85px",inline:""}},[a("el-form-item",{attrs:{label:"关键字:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入名称/key",size:"small",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"上级分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.classifyOptions,props:{value:"config_classify_id",label:"classify_name",checkStrictly:!0}},on:{change:t.getList},model:{value:t.config_classify_id,callback:function(e){t.config_classify_id=e},expression:"config_classify_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"后台类型:",prop:"user_type"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:t.getList},model:{value:t.tableFrom.user_type,callback:function(e){t.$set(t.tableFrom,"user_type",e)},expression:"tableFrom.user_type"}},[a("el-option",{attrs:{label:"总后台配置",value:"0"}}),t._v(" "),a("el-option",{attrs:{label:"商户后台",value:"1"}})],1)],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加配置")]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{prop:"config_id",label:"ID","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{prop:"config_name",label:"配置名称","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{prop:"config_key",label:"配置key","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{prop:"info",label:"配置说明","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"typeName",label:"类型","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{prop:"user_type",label:"后台类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{domProps:{textContent:t._s(0===e.row.user_type?"总后台配置":"商户后台配置")}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.config_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.config_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],l=a("8593"),n={name:"Setting",data:function(){return{tableData:{data:[],total:0},tableFrom:{page:1,limit:20,keyword:"",user_type:""},listLoading:!0,classifyOptions:[],config_classify_id:[]}},mounted:function(){this.getList(""),this.getClassifyOptions()},methods:{searchReset:function(){this.config_classify_id="",this.$refs.searchForm.resetFields(),this.getList(1)},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,this.config_classify_id.length&&(this.tableFrom.config_classify_id=this.config_classify_id[this.config_classify_id.length-1]),Object(l["s"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onchangeIsShow:function(t){var e=this;Object(l["j"])(t.config_id,t.status).then((function(t){var a=t.message;e.$message.success(a)})).catch((function(t){var a=t.message;e.$message.error(a)}))},onAdd:function(){var t=this;this.$modalForm(Object(l["u"])()).then((function(){return t.getList(1)}))},onEdit:function(t){var e=this;this.$modalForm(Object(l["gb"])(t)).then((function(){return e.getList(1)}))},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(l["Z"])(t).then((function(t){var s=t.message;a.$message.success(s),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},getClassifyOptions:function(){var t=this;Object(l["r"])().then((function(e){t.classifyOptions=e.data})).catch((function(e){t.$message.error(e.message)}))}}},o=n,r=(a("d4dc"),a("2877")),c=Object(r["a"])(o,s,i,!1,null,"ff8aa5e4",null);e["default"]=c.exports},c399:function(t,e,a){},d4dc:function(t,e,a){"use strict";a("c399")}}]);