1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-74db99be"],{"0d2b":function(e,t,i){"use strict";var a=i("2a95");i("8237"),t.a={props:{options:{type:Array,default:function(){return[]}},value:{type:String|Number|Array,default:""},placeholder:{type:String,default:""},title:{type:String,default:""},type:{type:String,default:"text"},suffix:{type:String,default:""},prefix:{type:String,default:""},styleModel:{type:String,default:""},className:{type:String,default:""},field:{type:String,default:""},timerType:{type:String,default:"timerange"},timerFormat:{type:String,default:"HH:mm:ss"},info:{type:String,default:""},on:{type:Object,default:function(){return{}}},validate:{type:Object,default:function(){return{}}},errorsValidate:{type:Array,default:function(){return[]}}},data:function(){return{valueModel:this.value,errorMessage:"",exampleImage:{site_logo:"/statics/system/adminSet01.png",site_logo_square:"/statics/system/adminSet02.png",login_logo:"/statics/system/adminSet03.png",admin_login_slide:"/statics/system/adminSet04.png",start_login_logo:"/statics/system/adminSet05.png",wap_login_logo:"/statics/system/mobileSet01.png",wechat_share_img:"/statics/system/mobileSet02.png",pc_logo:"/statics/system/pcSet01.png",pay_weixin_client_cert:{text:'更多详情请查看:<br><a href="https://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank" rel="noopener noreferrer">https://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a>',image:"/statics/system/wxSet01.png"},pay_weixin_client_key:{text:'更多详情请查看:<br><a href="https://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank" rel="noopener noreferrer">https://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a>',image:"/statics/system/wxSet01.png"},terminal_number:"/statics/system/yilianyunPrinter.png",config_export_siid:"/statics/system/kuadi100Dump.png",product_poster_title:"/statics/system/productSharePoster.png",product_video_status:"/statics/system/productVideo.png"},exampleSize:{site_logo:364,site_logo_square:364,login_logo:364,admin_login_slide:364,start_login_logo:364,wap_login_logo:256,wechat_share_img:256,pc_logo:364,terminal_number:364,config_export_siid:364,product_poster_title:256}}},watch:{errorsValidate:{handler:function(e){var t=this;if(e){var i=e.find((function(e){return e.field===t.field}));this.errorMessage=i?i.message:""}else this.errorMessage=""},deep:!0}},methods:{getClassName:function(){var e=["input-build-"+this.field];return this.errorMessage&&e.push("ivu-form-item-error"),(this.validate[this.field]?this.validate[this.field].filter((function(e){return!0===e.required})):[]).length&&e.push("ivu-form-item-required"),e},changeEvent:function(e,t){"change"===e&&this.$emit("changeValue",{field:this.field,value:this.valueModel}),this.on[e]&&this.on[e](t),this.validator(e)},validator:function(e){var t=this;if((this.validate[this.field]?this.validate[this.field].filter((function(t){return t.trigger===e})):[]).length){var i,l,s,n=new a.a(this.validate),o=(i={},l=this.field,s=this.valueModel,l in i?Object.defineProperty(i,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[l]=s,i);n.validate(o,(function(e,i){if(e){var a=e.find((function(e){return e.field===t.field}));t.errorMessage=a?a.message:""}else t.errorMessage=""}))}}}}},a3ce:function(e,t,i){"use strict";i.r(t);var a=i("b0e7"),l=i("0d2b"),s={name:"diyTabelBuild",components:{uploadPictures:a.a},mixins:[l.a],watch:{valueModel:{handler:function(e){this.changeValue()},deep:!0}},data:function(){return{gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},data:[],modalPic:!1,isChoice:"单选",tableIndex:0,keyName:"icon"}},mounted:function(){},methods:{modalPicTap:function(e,t){this.modalPic=!0,this.tableIndex=t,this.keyName=e.key},getPic:function(e){this.valueModel[this.tableIndex][this.keyName]=e.att_dir,this.modalPic=!1},add:function(){var e={};this.options.map((function(t){"sort"===t.key?e[t.key]=0:e[t.key]=""})),this.valueModel.push(e)},del:function(e){this.valueModel.splice(e,1)},changeValue:function(){this.$emit("changeValue",{field:this.field,value:this.valueModel}),this.on.change&&this.on.change(this.valueModel)}},computed:{columns:function(){var e=[];return this.options.map((function(t){e.push({title:t.name,slot:t.key,align:t.alert||"left"})})),e.push({title:"操作",slot:"action",width:100,align:"left"}),e}}},n=(i("c666"),i("2877")),o=Object(n.a)(s,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"diy-table"},[i("FormItem",{staticClass:"input-build",class:e.getClassName(),attrs:{label:e.title}},[i("Table",{staticClass:"diy_table",attrs:{columns:e.columns,data:e.valueModel,width:750},scopedSlots:e._u([e._l(e.options,(function(t){return{key:t.key,fn:function(a){a.row;var l=a.index;return["image"===t.type?[i("div",{on:{click:function(i){return e.modalPicTap(t,l)}}},[e.valueModel[l][t.key]?i("div",{staticClass:"pictrueTab"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.valueModel[l][t.key],expression:"valueModel[index][item.key]"}]})]):i("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[i("Icon",{attrs:{type:"ios-camera-outline",size:"21"}})],1)])]:"input"===t.type?[i("Input",{staticStyle:{width:"150px"},attrs:{type:"text"},model:{value:e.valueModel[l][t.key],callback:function(i){e.$set(e.valueModel[l],t.key,i)},expression:"valueModel[index][item.key]"}})]:"select"===t.type?[i("Select",{model:{value:e.valueModel[l][t.key],callback:function(i){e.$set(e.valueModel[l],t.key,i)},expression:"valueModel[index][item.key]"}},e._l(t.props.options||[],(function(t){return i("Option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])})),1)]:"inputNumber"===t.type?[i("InputNumber",{staticStyle:{width:"150px"},attrs:{editable:t.props.editable||!1,name:e.field,min:0},model:{value:e.valueModel[l][t.key],callback:function(i){e.$set(e.valueModel[l],t.key,i)},expression:"valueModel[index][item.key]"}})]:"switch"===t.type?[i("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:e.valueModel[l][t.key],callback:function(i){e.$set(e.valueModel[l],t.key,i)},expression:"valueModel[index][item.key]"}},[i("span",{attrs:{slot:"open"},slot:"open"},[e._v("开启")]),i("span",{attrs:{slot:"close"},slot:"close"},[e._v("关闭")])])]:e._e()]}}})),{key:"action",fn:function(t){t.row;var a=t.index;return[i("span",{staticClass:"delete",on:{click:function(t){return e.del(a)}}},[e._v("删除")])]}}],null,!0)}),i("div",{staticClass:"diy-button"},[i("Button",{attrs:{type:"primary"},on:{click:e.add}},[e._v("添加")])],1)],1),i("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:e.modalPic,callback:function(t){e.modalPic=t},expression:"modalPic"}},[e.modalPic?i("uploadPictures",{attrs:{isChoice:e.isChoice,gridBtn:e.gridBtn,gridPic:e.gridPic},on:{getPic:e.getPic}}):e._e()],1)],1)}),[],!1,null,"668c9181",null);t.default=o.exports},c666:function(e,t,i){"use strict";var a=i("e000");i.n(a).a},e000:function(e,t,i){}}]);
|