启程易购后端代码
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-828900a4.458cf280.js

1 lines
5.7 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-828900a4"],{"12e6":function(t,e,a){"use strict";a.r(e);var i=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:{inline:"",size:"small",model:t.tableFrom,"label-width":"85px"}},[a("el-form-item",{attrs:{label:"平台分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.cateList,props:{checkStrictly:!0,emitPath:!0},clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.cate_ids,callback:function(e){t.$set(t.tableFrom,"cate_ids",e)},expression:"tableFrom.cate_ids"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"模板名称:",prop:"template_name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入参数模板名称"},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.template_name,callback:function(e){t.$set(t.tableFrom,"template_name",e)},expression:"tableFrom.template_name"}})],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:"template_id",label:"ID","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"template_name",label:"参数模板名称","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"svip_number",label:"关联分类","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.cate_name.toString()))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"80",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.template_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetail(e.row.template_id)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.template_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),t._v(" "),a("el-dialog",{attrs:{title:t.title,visible:t.dialogVisible,width:"400px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticStyle:{"min-height":"500px"}},[a("div",{staticClass:"description"},[a("div",{staticClass:"acea-row"},[a("div",{staticClass:"description-term title"},[a("span",{staticClass:"name"},[t._v("参数名称")]),t._v(" "),a("span",{staticClass:"value"},[t._v("参数值")])]),t._v(" "),t._l(t.specsInfo.parameter,(function(e,i){return a("div",{key:i,staticClass:"description-term"},[a("span",{staticClass:"name"},[t._v(t._s(e.name))]),t._v(" "),a("span",{staticClass:"value"},[t._v(t._s(e.value))])])}))],2)])])])],1)},s=[],n=(a("ac6a"),a("83d6")),l=a("c4c8"),o={name:"SpecsList",data:function(){return{listLoading:!0,cateList:[],tableData:{data:[],total:0},tableFrom:{cate_ids:[],page:1,limit:20},specsInfo:{},dialogVisible:!1,title:""}},mounted:function(){this.getCategorySelect(),this.getList("")},methods:{searchReset:function(){this.tableFrom.cate_ids=[],this.$refs.searchForm.resetFields(),this.getList(1)},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(l["lb"])(this.tableFrom).then((function(t){t.data.list.forEach((function(t,e){t.cate_name=[],t.cateId.forEach((function(e,a){var i=e.category?e.category.cate_name:"";t.cate_name.push(i)}))})),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("")},getCategorySelect:function(){var t=this;Object(l["w"])().then((function(e){t.cateList=e.data})).catch((function(e){t.$message.error(e.message)}))},onAdd:function(){this.$router.push("".concat(n["roterPre"],"/product/specs/create"))},onEdit:function(t){this.$router.push("".concat(n["roterPre"],"/product/specs/create/").concat(t))},onDetail:function(t){var e=this;Object(l["kb"])(t).then((function(t){e.specsInfo=t.data,e.title=t.data.template_name.length>10?t.data.template_name.slice(0,10)+"...":t.data.template_name,e.dialogVisible=!0})).catch((function(t){e.$message.error(t.message)}))},handleDelete:function(t,e){var a=this;this.$modalSure("确定删除该模板").then((function(){Object(l["zb"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList("")})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},r=o,c=(a("6c08"),a("2877")),m=Object(c["a"])(r,i,s,!1,null,"46380442",null);e["default"]=m.exports},1739:function(t,e,a){},"6c08":function(t,e,a){"use strict";a("1739")}}]);