Commit 664ff973 by 庄冰

ui

parent 5a5b088b
.upload-img button[data-v-382f162a]{width:90px;height:32px;background:#1890ff;border-radius:1px;outline:none;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;cursor:pointer}.upload-img .box[data-v-382f162a]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:20px;min-width:580px}.upload-img .box .image-box[data-v-382f162a]{width:108px;height:90px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:1px;padding:10px 0;margin-bottom:10px;background:#f3f3f3}.upload-img .box .image-box img[data-v-382f162a]{width:100%;height:100%}.upload-img .box .checkedActive[data-v-382f162a]{background:#eff7ff;border:1px solid #1890ff}.upload-img .box .image-box[data-v-382f162a]:not(:nth-child(5n+1)){margin-left:10px}.ivu-modal-wrap[data-v-4ff16c68]{z-index:9999!important}.show_piclist>li[data-v-4ff16c68]{width:200px;height:200px;display:inline-block;margin-left:20px}.show_piclist>li>img[data-v-4ff16c68]{width:100%;height:100%}.pic-icon[data-v-4ff16c68]{display:inline-block;width:35px;height:35px;vertical-align:middle;margin-right:20px}.pic-icon img[data-v-4ff16c68]{width:100%;height:100%}.add-input>li:hover i[data-v-4ff16c68]{display:inline-block!important}
\ No newline at end of file
.upload-img button[data-v-382f162a]{width:90px;height:32px;background:#1890ff;border-radius:1px;outline:none;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;cursor:pointer}.upload-img .box[data-v-382f162a]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:20px;min-width:580px}.upload-img .box .image-box[data-v-382f162a]{width:108px;height:90px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:1px;padding:10px 0;margin-bottom:10px;background:#f3f3f3}.upload-img .box .image-box img[data-v-382f162a]{width:100%;height:100%}.upload-img .box .checkedActive[data-v-382f162a]{background:#eff7ff;border:1px solid #1890ff}.upload-img .box .image-box[data-v-382f162a]:not(:nth-child(5n+1)){margin-left:10px}.ivu-modal-wrap[data-v-7630520e]{z-index:9999!important}.show_piclist>li[data-v-7630520e]{width:200px;height:200px;display:inline-block;margin-left:20px}.show_piclist>li>img[data-v-7630520e]{width:100%;height:100%}.pic-icon[data-v-7630520e]{display:inline-block;width:35px;height:35px;vertical-align:middle;margin-right:20px}.pic-icon img[data-v-7630520e]{width:100%;height:100%}.add-input>li:hover i[data-v-7630520e]{display:inline-block!important}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><meta content=yes name=apple-mobile-web-app-capable><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=/ccc.png><link rel=stylesheet href=//at.alicdn.com/t/font_1996389_21r6b2e5cqci.css><title></title><link href=/css/chunk-04497344.c9ab9860.css rel=prefetch><link href=/css/chunk-0c20b306.305956e2.css rel=prefetch><link href=/css/chunk-0fb760a4.5c30cb40.css rel=prefetch><link href=/css/chunk-1021e4ee.17ba2048.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-29ebb6f1.d1f69246.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-2d3eb0f5.a10dee7d.css rel=prefetch><link href=/css/chunk-3008061c.6014cc43.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-3cca9940.6014cc43.css rel=prefetch><link href=/css/chunk-48aa254a.d360cbd2.css rel=prefetch><link href=/css/chunk-4f30412b.305956e2.css rel=prefetch><link href=/css/chunk-5a40d679.305956e2.css rel=prefetch><link href=/css/chunk-5da45f03.c6303bcf.css rel=prefetch><link href=/css/chunk-5fe8c66b.70decc8e.css rel=prefetch><link href=/css/chunk-6cc861f3.6014cc43.css rel=prefetch><link href=/css/chunk-7853917d.31190d0a.css rel=prefetch><link href=/css/chunk-78815fc8.770b5954.css rel=prefetch><link href=/css/chunk-9dc7e768.305956e2.css rel=prefetch><link href=/css/chunk-cc77621c.8797b2b5.css rel=prefetch><link href=/js/chunk-04497344.0c8a3138.js rel=prefetch><link href=/js/chunk-0c20b306.6b4867cf.js rel=prefetch><link href=/js/chunk-0fb760a4.def58650.js rel=prefetch><link href=/js/chunk-1021e4ee.d40517f9.js rel=prefetch><link href=/js/chunk-14b9857b.ae43b7c1.js rel=prefetch><link href=/js/chunk-1f11ec07.b7a911e5.js rel=prefetch><link href=/js/chunk-29ebb6f1.3760df0c.js rel=prefetch><link href=/js/chunk-2c359864.f1f45686.js rel=prefetch><link href=/js/chunk-2d210f61.6e56960a.js rel=prefetch><link href=/js/chunk-2d3eb0f5.878af947.js rel=prefetch><link href=/js/chunk-3008061c.d9225a5f.js rel=prefetch><link href=/js/chunk-3385141a.16d7705b.js rel=prefetch><link href=/js/chunk-3cca9940.f6b28725.js rel=prefetch><link href=/js/chunk-48aa254a.64498aea.js rel=prefetch><link href=/js/chunk-4f30412b.d815ccc1.js rel=prefetch><link href=/js/chunk-5a40d679.b0c0f73d.js rel=prefetch><link href=/js/chunk-5a4e13d5.6ebd883c.js rel=prefetch><link href=/js/chunk-5da45f03.c18ae604.js rel=prefetch><link href=/js/chunk-5fe8c66b.a0b6a30a.js rel=prefetch><link href=/js/chunk-6cc861f3.22028ceb.js rel=prefetch><link href=/js/chunk-780401d4.2594e2ad.js rel=prefetch><link href=/js/chunk-7853917d.925a1c1a.js rel=prefetch><link href=/js/chunk-78815fc8.737b80a9.js rel=prefetch><link href=/js/chunk-9dc7e768.c4ff4f32.js rel=prefetch><link href=/js/chunk-cc77621c.209c3f4a.js rel=prefetch><link href=/js/chunk-d710b6d2.9eff4b27.js rel=prefetch><link href=/css/app.e3db6847.css rel=preload as=style><link href=/css/chunk-vendors.a0428467.css rel=preload as=style><link href=/js/app.7d8a46a4.js rel=preload as=script><link href=/js/chunk-vendors.d7daa525.js rel=preload as=script><link href=/css/chunk-vendors.a0428467.css rel=stylesheet><link href=/css/app.e3db6847.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d7daa525.js></script><script src=/js/app.7d8a46a4.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><meta content=yes name=apple-mobile-web-app-capable><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><link rel=icon href=/ccc.png><link rel=stylesheet href=//at.alicdn.com/t/font_1996389_21r6b2e5cqci.css><title></title><link href=/css/chunk-04497344.c9ab9860.css rel=prefetch><link href=/css/chunk-0c20b306.305956e2.css rel=prefetch><link href=/css/chunk-0fb760a4.5c30cb40.css rel=prefetch><link href=/css/chunk-1021e4ee.17ba2048.css rel=prefetch><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-29ebb6f1.d1f69246.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-2d3eb0f5.a10dee7d.css rel=prefetch><link href=/css/chunk-3008061c.6014cc43.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-3cca9940.6014cc43.css rel=prefetch><link href=/css/chunk-48aa254a.d360cbd2.css rel=prefetch><link href=/css/chunk-4f30412b.305956e2.css rel=prefetch><link href=/css/chunk-5271b1f8.295a65c5.css rel=prefetch><link href=/css/chunk-5a40d679.305956e2.css rel=prefetch><link href=/css/chunk-5da45f03.c6303bcf.css rel=prefetch><link href=/css/chunk-5fe8c66b.70decc8e.css rel=prefetch><link href=/css/chunk-6cc861f3.6014cc43.css rel=prefetch><link href=/css/chunk-7853917d.31190d0a.css rel=prefetch><link href=/css/chunk-9dc7e768.305956e2.css rel=prefetch><link href=/css/chunk-cc77621c.8797b2b5.css rel=prefetch><link href=/js/chunk-04497344.0c8a3138.js rel=prefetch><link href=/js/chunk-0c20b306.6b4867cf.js rel=prefetch><link href=/js/chunk-0fb760a4.def58650.js rel=prefetch><link href=/js/chunk-1021e4ee.d40517f9.js rel=prefetch><link href=/js/chunk-14b9857b.ae43b7c1.js rel=prefetch><link href=/js/chunk-1f11ec07.b7a911e5.js rel=prefetch><link href=/js/chunk-29ebb6f1.3760df0c.js rel=prefetch><link href=/js/chunk-2c359864.f1f45686.js rel=prefetch><link href=/js/chunk-2d210f61.6e56960a.js rel=prefetch><link href=/js/chunk-2d3eb0f5.878af947.js rel=prefetch><link href=/js/chunk-3008061c.d9225a5f.js rel=prefetch><link href=/js/chunk-3385141a.16d7705b.js rel=prefetch><link href=/js/chunk-3cca9940.f6b28725.js rel=prefetch><link href=/js/chunk-48aa254a.64498aea.js rel=prefetch><link href=/js/chunk-4f30412b.d815ccc1.js rel=prefetch><link href=/js/chunk-5271b1f8.c13b76ef.js rel=prefetch><link href=/js/chunk-5a40d679.b0c0f73d.js rel=prefetch><link href=/js/chunk-5a4e13d5.6ebd883c.js rel=prefetch><link href=/js/chunk-5da45f03.c18ae604.js rel=prefetch><link href=/js/chunk-5fe8c66b.a0b6a30a.js rel=prefetch><link href=/js/chunk-6cc861f3.22028ceb.js rel=prefetch><link href=/js/chunk-780401d4.2594e2ad.js rel=prefetch><link href=/js/chunk-7853917d.925a1c1a.js rel=prefetch><link href=/js/chunk-9dc7e768.c4ff4f32.js rel=prefetch><link href=/js/chunk-cc77621c.209c3f4a.js rel=prefetch><link href=/js/chunk-d710b6d2.9eff4b27.js rel=prefetch><link href=/css/app.e3db6847.css rel=preload as=style><link href=/css/chunk-vendors.a0428467.css rel=preload as=style><link href=/js/app.3a9fbd52.js rel=preload as=script><link href=/js/chunk-vendors.d7daa525.js rel=preload as=script><link href=/css/chunk-vendors.a0428467.css rel=stylesheet><link href=/css/app.e3db6847.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d7daa525.js></script><script src=/js/app.3a9fbd52.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5271b1f8"],{"079e":function(e,t,o){},2484:function(e,t,o){"use strict";var i=o("079e"),r=o.n(i);r.a},"2bb8":function(e,t,o){"use strict";var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,o,n){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"===typeof e?s(a(e),(function(a){var n=encodeURIComponent(i(a))+o;return r(e[a])?s(e[a],(function(e){return n+encodeURIComponent(i(e))})).join(t):n+encodeURIComponent(i(e[a]))})).join(t):n?encodeURIComponent(i(n))+o+encodeURIComponent(i(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var o=[],i=0;i<e.length;i++)o.push(t(e[i],i));return o}var a=Object.keys||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.push(o);return t}},"391e":function(e,t,o){"use strict";var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],s=o("9ee1"),a=s["a"],n=o("9ca4"),c=Object(n["a"])(a,i,r,!1,null,null,null);t["a"]=c.exports},"5ee4":function(e,t,o){"use strict";t.decode=t.parse=o("a2d3"),t.encode=t.stringify=o("2bb8")},6729:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var i=t.adjustHeight;return[o("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:i-120,metaName:"product",packageName:"aggregation",modelName:"product",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{formevent:e.onformevent,onexec:e.onexec,oninitbtn:e.oninitbtn}}),o("Drawer",{ref:"addProductRawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},model:{value:e.showchildform,callback:function(t){e.showchildform=t},expression:"showchildform"}},[o("Card",{ref:"formcard",staticStyle:{"border-radius":"0px","padding-bottom":"60px",border:"none"},attrs:{"dis-hover":"",bordered:!1}},[o("p",{attrs:{slot:"title"},slot:"title"},[o("Icon",{attrs:{type:"ios-paper-outline"}}),e._v("产品详情\n ")],1),o("Form",{ref:"productForm",attrs:{model:e.formModel,"label-position":"left","show-message":"",rules:e.ruleValidate}},[o("FormItem",{attrs:{label:"产品名称",prop:"name"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["name"],expression:"formModel['name']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品名称"},domProps:{value:e.formModel["name"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"name",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品一类",prop:"p_product_type_id"}},[o("i-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择产品"},on:{"on-change":e.typeoneChange},model:{value:e.formModel.p_product_type_id,callback:function(t){e.$set(e.formModel,"p_product_type_id",t)},expression:"formModel.p_product_type_id"}},e._l(e.p_productTypeList,(function(t){return o("Option",{key:t.code,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1),o("FormItem",{attrs:{label:"产品二类",prop:"product_type_id"}},[o("i-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择产品"},on:{"on-change":e.typeChange},model:{value:e.formModel.product_type_id,callback:function(t){e.$set(e.formModel,"product_type_id",t)},expression:"formModel.product_type_id"}},e._l(e.productTypeList,(function(t){return o("Option",{key:t.code,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1),o("FormItem",{attrs:{label:"产品卖点",prop:"selling_point"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["selling_point"],expression:"formModel['selling_point']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品卖点"},domProps:{value:e.formModel["selling_point"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"selling_point",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品现价类型",prop:"price_type"}},[o("RadioGroup",{model:{value:e.formModel["price_type"],callback:function(t){e.$set(e.formModel,"price_type",t)},expression:"formModel['price_type']"}},[o("Radio",{key:"1",attrs:{label:"1"}},[e._v("起价")]),o("Radio",{key:"2",attrs:{label:"2"}},[e._v("定价")]),o("Radio",{key:"3",attrs:{label:"3"}},[e._v("面议")])],1)],1),o("FormItem",{attrs:{label:"产品现价",prop:"price"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["price"],expression:"formModel['price']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"number",placeholder:"请输入产品现价"},domProps:{value:e.formModel["price"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"price",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品原价",prop:"original_price"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["original_price"],expression:"formModel['original_price']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品原价"},domProps:{value:e.formModel["original_price"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"original_price",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品销量",prop:"sales_volume"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["sales_volume"],expression:"formModel['sales_volume']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品销量"},domProps:{value:e.formModel["sales_volume"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"sales_volume",t.target.value)}}})]),o("FormItem",{attrs:{label:"详情大图",prop:"product_detail_url"}},[o("Uploads",{ref:"product_detail_url",attrs:{propName:e.product_detail_url},model:{value:e.formModel.product_detail_url,callback:function(t){e.$set(e.formModel,"product_detail_url",t)},expression:"formModel.product_detail_url"}})],1),o("FormItem",{attrs:{label:"列表缩略图",prop:"list_thumbnail_url"}},[o("Uploads",{ref:"list_thumbnail_url",attrs:{propName:e.list_thumbnail_url},model:{value:e.formModel.list_thumbnail_url,callback:function(t){e.$set(e.formModel,"list_thumbnail_url",t)},expression:"formModel.list_thumbnail_url"}})],1),o("FormItem",{attrs:{label:"是否推荐",prop:"is_recommend"}},[o("RadioGroup",{model:{value:e.formModel["is_recommend"],callback:function(t){e.$set(e.formModel,"is_recommend",t)},expression:"formModel['is_recommend']"}},[o("Radio",{key:1,attrs:{label:1}},[e._v("是")]),o("Radio",{key:0,attrs:{label:0}},[e._v("否")])],1)],1),o("FormItem",{attrs:{label:"",prop:"is_server"}},[o("h3",[e._v("添加「服务介绍」")]),e.showchildform?o("div",{staticClass:"service"},[o("EditTxt",{attrs:{type:"dd",texxx:e.formModel.service_Introduction_info},on:{sendHtml:e.getService}})],1):e._e()]),o("FormItem",{attrs:{label:"",prop:"is_flow"}},[o("h3",[e._v("\n 添加「办理流程」\n "),o("Icon",{staticStyle:{"font-size":"30px",cursor:"pointer"},attrs:{type:"md-add-circle"},on:{click:e.addFlow}})],1),o("ol",{staticClass:"add-input"},e._l(e.flowList,(function(t,i){return o("li",{key:i},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.txt,expression:"item.txt"}],staticStyle:{margin:"10px 20px","min-width":"400px"},attrs:{type:"text"},domProps:{value:t.txt},on:{input:[function(o){o.target.composing||e.$set(t,"txt",o.target.value)},function(t){return e.flowText(t,i)}]}}),o("div",{staticClass:"pic-icon"},[o("img",{attrs:{src:t.pic_url,alt:""}})]),o("a",{attrs:{href:"##"},on:{click:function(t){return e.flowChooseIcon(i)}}},[e._v("选择图标")]),o("Icon",{staticStyle:{"font-size":"30px",display:"none",cursor:"pointer"},attrs:{type:"md-close-circle"},on:{click:function(t){return e.removeFlow(i)}}})],1)})),0)]),o("FormItem",{attrs:{label:"",prop:"is_materialList"}},[o("h3",[e._v("\n 添加「所需资料」\n "),o("Icon",{staticStyle:{"font-size":"30px",cursor:"pointer"},attrs:{type:"md-add-circle"},on:{click:e.addMateria}})],1),o("ol",{staticClass:"add-input"},e._l(e.materialList,(function(t,i){return o("li",{key:i},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.txt,expression:"item.txt"}],staticStyle:{margin:"10px 20px","min-width":"400px"},attrs:{type:"text"},domProps:{value:t.txt},on:{input:[function(o){o.target.composing||e.$set(t,"txt",o.target.value)},function(t){return e.materialText(t,i)}]}}),o("div",{staticClass:"pic-icon"},[o("img",{attrs:{src:t.pic_url,alt:""}})]),o("a",{attrs:{href:"##"},on:{click:function(t){return e.materialsChooseIcon(i)}}},[e._v("选择图标")]),o("Icon",{staticStyle:{"font-size":"30px",display:"none",cursor:"pointer"},attrs:{type:"md-close-circle"},on:{click:function(t){return e.removeMateria(i)}}})],1)})),0)]),o("FormItem",{attrs:{label:"",prop:"is_server"}},[o("h3",[e._v("添加「您可获得」")]),o("ul",{staticClass:"show_piclist"},e._l(e.checkedList,(function(e,t){return o("li",{key:t},[o("img",{attrs:{src:e.pic_url,alt:""}})])})),0),o("div",[o("Button",{attrs:{type:"primary"},on:{click:e.addMaterialsUpload}},[e._v("添加获得材料")])],1)]),o("FormItem",{attrs:{label:"",prop:"is_server"}},[o("h3",[e._v("添加「我们的优势」")]),e.showchildform?o("div",[o("EditTxt",{attrs:{type:"dd",texxx:e.formModel.our_advantage_info},on:{sendHtml:e.getAdvantage}})],1):e._e()])],1),o("div",{staticClass:"form-footer"},[e.isCreate?o("Button",{attrs:{type:"text"},on:{click:e.save}},[e._v("保存")]):e._e(),e.isUpdate?o("Button",{attrs:{type:"text"},on:{click:e.edit}},[e._v("保存")]):e._e(),o("Button",{attrs:{type:"text"},on:{click:e.childcancle}},[e._v("取消")])],1)],1),o("Modal",{attrs:{width:"620px",title:"图库"},on:{"on-ok":e.okImage,"on-cancel":e.cancel},model:{value:e.openImages,callback:function(t){e.openImages=t},expression:"openImages"}},[o("Gallery",{key:e.config.key,attrs:{config:e.config,currentShow:e.currentShow,cacheCheckedList:e.cacheCheckedList,max_checked:6},on:{getImageList:e.getImageList}})],1)],1)]}}])})},r=[],s=(o("5ab2"),o("6d57"),o("e10e"),o("2b45"),o("cc57"),o("ce3c")),a=o("06d3"),n=o("391e"),c=o("a98b"),l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"upload-img"},[o("Upload",{staticStyle:{display:"none"},attrs:{action:e.action,accept:"image/*",data:e.ossConf,"before-upload":e.uploadImg,"on-success":e.uploadSuccess}},[o("button",[e._v("上传")])]),o("div",{staticClass:"box"},e._l(e.listImg,(function(t,i){return o("div",{key:t.id,class:["image-box",t.flag?"checkedActive":""],on:{click:function(o){return e.chooseImg(t,i)}}},[o("img",{attrs:{src:t.pic_url,alt:""}})])})),0),[o("Page",{attrs:{total:e.page.total,"page-size":e.page.size,current:e.page.currentPage},on:{"on-change":e.updateMapdepot}})]],2)])},d=[],p=o("5748"),f=(o("e204"),o("9e76"),o("6a61"),o("cf7f")),u=(o("163d"),o("49a5"),o("6205")),m=(o("4c39"),{props:{changeConfig:{type:Function,default:function(){}},config:{type:Object},max_checked:{type:Number,default:8},currentShow:{type:Array}},data:function(){return{listImg:[],action:"",ossConf:{key:""},checkedList:[],page:{currentPage:1,total:0,size:20},cacheCheckList:[]}},mounted:function(){this.updateMapdepot(),this.getOss()},methods:{getOss:function(){var e=this;Object(u["f"])().then((function(t){e.ossConf=t.data,e.action=t.data.url}))},uploadImg:function(e){this.ossConf.key=this.setKey(),delete this.ossConf.url},updateMapdepot:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.page.currentPage=t;var o={actionType:"getImgList",actionBody:{pageInfo:{pageNo:t,pageSize:this.page.size}}};Object(u["e"])(o).then((function(t){var o=t.data.results.rows;e.page.total=t.data.results.count,console.log(e.currentShow,"77777777777777"),e.currentShow&&(e.checkedList=e.currentShow);e.checkedList.length;e.listImg=o.map((function(t,o){return t.flag=!1,e.checkedList.map((function(e){e.id==t.id&&(t.flag=!0)})),t}))}))},setKey:function(){var e=new Date,t="zc_gsb_"+Math.round(1e4*Math.random())+e.getTime()+e.getFullYear()+e.getMonth()+e.getDate()+".jpg";return t},uploadSuccess:function(){var e=Object(f["a"])(regeneratorRuntime.mark((function e(t,o,i){var r,s,a,n,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=/(?<=<Location>).*?(?=<\/Location>)/,s=t.match(r)[0],a=o.name,n=o.size,c={pic_url:s,name:a,pic_size:n},e.next=6,Object(u["a"])(c);case 6:this.updateMapdepot();case 7:case"end":return e.stop()}}),e,this)})));function t(t,o,i){return e.apply(this,arguments)}return t}(),chooseImg:function(e,t){if("image"==this.config.type){this.radioCheckedImg(e,t);var o=JSON.parse(JSON.stringify(this.config));o.url=e.pic_url,this.changeConfig(o)}else this.moreCheckedImg(e,t)},moreCheckedImg:function(e,t){if(console.log(e.id,"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"),this.checkedList.length>=this.max_checked)if(this.listImg[t]["flag"]){var o;this.listImg[t]["flag"]=!this.listImg[t]["flag"];var i=this.checkedList.findIndex((function(t){return e.id==t.id}));this.checkedList.splice(i,1);var r=this.checkedList.map((function(e){return e.id}));(o=console).log.apply(o,Object(p["a"])(r))}else{var s={content:"最多选择".concat(this.max_checked,"张")};this.$Message.warning(s)}else{if(this.listImg[t]["flag"]=!this.listImg[t]["flag"],this.checkedList.length)if(e.flag)this.checkedList.push(e);else{var a=this.checkedList.findIndex((function(t){return e.id==t.id}));this.checkedList.splice(a,1)}else this.checkedList=this.listImg.filter((function(e){return e.flag}));this.$emit("getImageList",this.checkedList)}},radioCheckedImg:function(e,t){for(var o in this.listImg)this.listImg[o]["flag"]=!1;this.listImg[t]["flag"]=!0,this.$emit("getImageList",this.listImg[t])}},computed:{}}),h=m,g=(o("696d"),o("9ca4")),_=Object(g["a"])(h,l,d,!1,null,"382f162a",null),v=_.exports,y=o("3b00"),b=o("a0f5"),M=(o("5ee4"),o("7e1e"));function w(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function L(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?w(Object(o),!0).forEach((function(t){Object(s["a"])(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var k={name:"product_page",data:function(){var e=this,t=function(t,o,i){var r=e.formModel["p_product_type_id"];r?i():i(new Error("请选择产品一类"))},o=function(t,o,i){var r=e.formModel["product_type_id"];r?i():i(new Error("请选择产品二类"))},i=function(t,o,i){var r=e.formModel["is_recommend"];0==r||1==e.formModel["is_recommend"]?i():i(new Error("请选择是否推荐"))};return{p_productTypeList:[],productTypeList:[],list_thumbnail_url:"",product_detail_url:"",showchildform:!1,isCreate:!1,isUpdate:!1,formModel:{},isRecomen:!1,openImages:!1,flowList:[],materialList:[],config:{type:"image",key:0,is:!1},serviceText:"",advantageText:"",checkedList:[],cacheCheckedList:[],currentShow:[],ruleValidate:{name:[{required:!0,message:"请输入产品名称",trigger:"blur"}],p_product_type_id:[Object(s["a"])({validator:t,trigger:"blur"},"trigger","change")],product_type_id:[Object(s["a"])({validator:o,trigger:"blur"},"trigger","change")],selling_point:[{required:!0,message:"请输入产品卖点",trigger:"blur"}],price_type:[{required:!0,message:"请选择产品现价类型",trigger:"change"}],price:[{required:!0,message:"请输入产品现价",trigger:"blur"}],sales_volume:[{required:!0,message:"请输入产品销量",trigger:"blur"}],product_detail_url:[{required:!0,message:"请上传详情大图",trigger:"blur"}],list_thumbnail_url:[{required:!0,message:"请上传列表缩略图",trigger:"blur"}],is_recommend:[Object(s["a"])({validator:i,trigger:"blur"},"trigger","change")]}}},components:{BizTable:a["a"],PageSpace:n["a"],Switchs:y["a"],Uploads:c["a"],EditTxt:b["a"],Gallery:v},mounted:function(){this.getProductType()},methods:{changeSwitch:function(e){},typeoneChange:function(e){for(var t=0;t<this.p_productTypeList.length;t++)this.p_productTypeList[t].id==e&&(this.formModel["p_product_type_id"]=this.p_productTypeList[t].id,this.formModel["p_product_type_code"]=this.p_productTypeList[t].code,this.formModel["p_product_type_name"]=this.p_productTypeList[t].name,this.productTypeList=this.p_productTypeList[t].children||[])},typeChange:function(e){for(var t=0;t<this.productTypeList.length;t++)this.productTypeList[t].id==e&&(this.formModel["product_type_id"]=this.productTypeList[t].id,this.formModel["product_type_code"]=this.productTypeList[t].code,this.formModel["product_type_name"]=this.productTypeList[t].name)},getProductType:function(){var e=this;Object(M["h"])("/web/aggregation/producttypeCtl/getProductTypeInfo").then((function(t){if(0==t.status){var o=t.data;e.p_productTypeList=o}}))},addFlow:function(){this.flowList.length<10&&this.flowList.push({})},addMateria:function(){this.materialList.length<10&&this.materialList.push({})},flowText:function(e,t){this.flowList[t]["txt"]=e.target.value,console.log(this.flowList)},materialText:function(e,t){this.materialList[t]["txt"]=e.target.value,console.log(this.materialList)},removeMateria:function(e){this.materialList.splice(e,1)},removeFlow:function(e){this.flowList.splice(e,1)},save:function(){var e=this;this.$refs["productForm"].validate((function(t){t&&(e.flowList&&e.flowList.length>0?e.formModel.process_flow_info=e.flowList:e.formModel.process_flow_info="",e.materialList&&e.materialList.length>0?e.formModel.information_required_info=e.materialList:e.formModel.information_required_info="",e.checkedList&&e.checkedList.length>0?e.formModel.can_get_info=e.checkedList:e.formModel.can_get_info="",Object(M["m"])("/web/aggregation/productCtl/create",e.formModel).then((function(t){var o=t.data;0==o.status?(e.$Message.success("保存成功"),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData()):(e.$Message.error(o.msg?o.msg:"当前操作失败,请稍后重试或联系管理员."),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData())})))}))},edit:function(){var e=this;console.log("edit"),this.$refs["productForm"].validate((function(t){t&&(e.flowList&&e.flowList.length>0?e.formModel.process_flow_info=e.flowList:e.formModel.process_flow_info="",e.materialList&&e.materialList.length>0?e.formModel.information_required_info=e.materialList:e.formModel.information_required_info="",e.checkedList&&e.checkedList.length>0?e.formModel.can_get_info=e.checkedList:e.formModel.can_get_info="",Object(M["m"])("/web/aggregation/productCtl/update",e.formModel).then((function(t){var o=t.data;0==o.status?(e.$Message.success("保存成功"),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData()):(e.$Message.error(o.msg?o.msg:"当前操作失败,请稍后重试或联系管理员."),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData())})))}))},okImage:function(){"image"!=this.config.type?this.checkedList=this.cacheCheckedList:this.config.is?this.flowList[this.config.idx]=L(L({},this.flowList[this.config.idx]),this.cacheCheckedList):this.materialList[this.config.idx]=L(L({},this.materialList[this.config.idx]),this.cacheCheckedList),console.log(this.materialList),console.log(this.flowList)},cancel:function(){},getImageList:function(e){console.log(e),this.cacheCheckedList=e},flowChooseIcon:function(e){this.config.type="image",this.config.is=!0,this.config.idx=e,this.config.key++,this.currentShow=[this.flowList[e]],this.openImages=!this.openImages},materialsChooseIcon:function(e){this.config.type="image",this.config.is=!1,this.config.idx=e,this.config.key++,this.currentShow=[this.materialList[e]],this.openImages=!this.openImages},addMaterialsUpload:function(){this.config.type="",this.currentShow=this.checkedList,this.config.key++,this.openImages=!this.openImages},childcancle:function(){this.showchildform=!1,this.formModel={},this.$refs.bt.fetchData()},getService:function(e){this.serviceText=e,this.formModel.service_Introduction_info=e,console.log(e)},getAdvantage:function(e){this.advantageText=e,this.formModel.our_advantage_info=e,console.log(e)},onformevent:function(e,t){},savebefore:function(e,t,o){return o(t)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,o){return o(t)},onexec:function(e,t){var o=this;if("auth"==e&&this.$router.push({name:"role_auth",query:{roleid:t.id,rolecode:t.code}}),"editProduct"==e&&(console.log(t,"editProduct++++++++++++++++++"),this.showchildform=!0,this.isCreate=!1,this.isUpdate=!0,this.formModel=t,this.formModel.price=this.formModel.price?this.formModel.price.toString():"",this.formModel.sales_volume=this.formModel.sales_volume?this.formModel.sales_volume.toString():"",this.formModel.process_flow_info&&this.formModel.process_flow_info.length>0?("string"==typeof this.formModel.process_flow_info&&(this.formModel.process_flow_info=JSON.parse(this.formModel.process_flow_info)),this.flowList=this.formModel.process_flow_info):this.flowList=[],this.formModel.information_required_info&&this.formModel.information_required_info.length>0?("string"==typeof this.formModel.information_required_info&&(this.formModel.information_required_info=JSON.parse(this.formModel.information_required_info)),this.materialList=this.formModel.information_required_info):this.materialList=[],this.formModel.can_get_info&&this.formModel.can_get_info.length>0?("string"==typeof this.formModel.can_get_info&&(this.formModel.can_get_info=JSON.parse(this.formModel.can_get_info)),this.checkedList=this.formModel.can_get_info):this.checkedList=[],this.formModel&&this.formModel.p_product_type_id))for(var i=0;i<this.p_productTypeList.length;i++)this.formModel.p_product_type_id==this.p_productTypeList[i].id&&(this.productTypeList=this.p_productTypeList[i].children||[]);"createProduct"==e&&(console.log(t,"createProduct++++++++++++++++++"),this.showchildform=!0,this.isCreate=!0,this.isUpdate=!1,this.flowList=[],this.materialList=[],this.checkedList=[]),"onself"==e&&Object(M["m"])("/web/aggregation/productCtl/update",{id:t.id,is_enabled:1}).then((function(e){var t=e.data;0==t.status?(o.$Message.success("上架成功"),o.$refs.bt.fetchData()):(o.$Message.error(t.msg?t.msg:"当前操作失败,请稍后重试或联系管理员."),o.$refs.bt.fetchData())})),"offself"==e&&Object(M["m"])("/web/aggregation/productCtl/update",{id:t.id,is_enabled:0}).then((function(e){var t=e.data;0==t.status?(o.$Message.success("下架成功"),o.$refs.bt.fetchData()):(o.$Message.error(t.msg?t.msg:"当前操作失败,请稍后重试或联系管理员."),o.$refs.bt.fetchData())}))},oninitbtn:function(e,t){switch(t.is_enabled){case 0:"offself"===e.key?e.ishide=!0:e.ishide=!1;break;case 1:"onself"===e.key?e.ishide=!0:e.ishide=!1;break}},formatCol:function(e,t,o){return"is_enabled"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},x=k,I=(o("2484"),Object(g["a"])(x,i,r,!1,null,"7630520e",null));t["default"]=I.exports},"696d":function(e,t,o){"use strict";var i=o("6c27"),r=o.n(i);r.a},"6c27":function(e,t,o){},"9ee1":function(e,t,o){"use strict";(function(e){o("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var o=e("#framediv"),i=o.get()[0]||0,r=window.innerHeight-i.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,o("a336"))},a2d3:function(e,t,o){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,o,s){t=t||"&",o=o||"=";var a={};if("string"!==typeof e||0===e.length)return a;var n=/\+/g;e=e.split(t);var c=1e3;s&&"number"===typeof s.maxKeys&&(c=s.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var d=0;d<l;++d){var p,f,u,m,h=e[d].replace(n,"%20"),g=h.indexOf(o);g>=0?(p=h.substr(0,g),f=h.substr(g+1)):(p=h,f=""),u=decodeURIComponent(p),m=decodeURIComponent(f),i(a,u)?r(a[u])?a[u].push(m):a[u]=[a[u],m]:a[u]=m}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78815fc8"],{"024c":function(e,t,o){},"2bb8":function(e,t,o){"use strict";var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,o,n){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"===typeof e?s(a(e),(function(a){var n=encodeURIComponent(i(a))+o;return r(e[a])?s(e[a],(function(e){return n+encodeURIComponent(i(e))})).join(t):n+encodeURIComponent(i(e[a]))})).join(t):n?encodeURIComponent(i(n))+o+encodeURIComponent(i(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var o=[],i=0;i<e.length;i++)o.push(t(e[i],i));return o}var a=Object.keys||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.push(o);return t}},"391e":function(e,t,o){"use strict";var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],s=o("9ee1"),a=s["a"],n=o("9ca4"),c=Object(n["a"])(a,i,r,!1,null,null,null);t["a"]=c.exports},"5ee4":function(e,t,o){"use strict";t.decode=t.parse=o("a2d3"),t.encode=t.stringify=o("2bb8")},6729:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var i=t.adjustHeight;return[o("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:i-120,metaName:"product",packageName:"aggregation",modelName:"product",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{formevent:e.onformevent,onexec:e.onexec,oninitbtn:e.oninitbtn}}),o("Drawer",{ref:"addProductRawer",attrs:{placement:"right",closable:!1,"mask-closable":!1,width:"70"},model:{value:e.showchildform,callback:function(t){e.showchildform=t},expression:"showchildform"}},[o("Card",{ref:"formcard",staticStyle:{"border-radius":"0px","padding-bottom":"60px",border:"none"},attrs:{"dis-hover":"",bordered:!1}},[o("p",{attrs:{slot:"title"},slot:"title"},[o("Icon",{attrs:{type:"ios-paper-outline"}}),e._v("产品详情\n ")],1),o("Form",{ref:"productForm",attrs:{model:e.formModel,"label-position":"left","show-message":"",rules:e.ruleValidate}},[o("FormItem",{attrs:{label:"产品名称",prop:"name"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["name"],expression:"formModel['name']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品名称"},domProps:{value:e.formModel["name"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"name",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品一类",prop:"p_product_type_id"}},[o("i-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择产品"},on:{"on-change":e.typeoneChange},model:{value:e.formModel.p_product_type_id,callback:function(t){e.$set(e.formModel,"p_product_type_id",t)},expression:"formModel.p_product_type_id"}},e._l(e.p_productTypeList,(function(t){return o("Option",{key:t.code,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1),o("FormItem",{attrs:{label:"产品二类",prop:"product_type_id"}},[o("i-select",{staticStyle:{width:"200px"},attrs:{placeholder:"请选择产品"},on:{"on-change":e.typeChange},model:{value:e.formModel.product_type_id,callback:function(t){e.$set(e.formModel,"product_type_id",t)},expression:"formModel.product_type_id"}},e._l(e.productTypeList,(function(t){return o("Option",{key:t.code,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1),o("FormItem",{attrs:{label:"产品卖点",prop:"selling_point"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["selling_point"],expression:"formModel['selling_point']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品卖点"},domProps:{value:e.formModel["selling_point"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"selling_point",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品现价类型",prop:"price_type"}},[o("RadioGroup",{model:{value:e.formModel["price_type"],callback:function(t){e.$set(e.formModel,"price_type",t)},expression:"formModel['price_type']"}},[o("Radio",{key:"1",attrs:{label:"1"}},[e._v("起价")]),o("Radio",{key:"2",attrs:{label:"2"}},[e._v("定价")]),o("Radio",{key:"3",attrs:{label:"3"}},[e._v("面议")])],1)],1),o("FormItem",{attrs:{label:"产品现价",prop:"price"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["price"],expression:"formModel['price']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"number",placeholder:"请输入产品现价"},domProps:{value:e.formModel["price"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"price",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品原价",prop:"original_price"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["original_price"],expression:"formModel['original_price']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品原价"},domProps:{value:e.formModel["original_price"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"original_price",t.target.value)}}})]),o("FormItem",{attrs:{label:"产品销量",prop:"sales_volume"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.formModel["sales_volume"],expression:"formModel['sales_volume']"}],staticStyle:{"padding-left":"6px"},attrs:{type:"text",placeholder:"请输入产品销量"},domProps:{value:e.formModel["sales_volume"]},on:{input:function(t){t.target.composing||e.$set(e.formModel,"sales_volume",t.target.value)}}})]),o("FormItem",{attrs:{label:"详情大图",prop:"product_detail_url"}},[o("Uploads",{ref:"product_detail_url",attrs:{propName:e.product_detail_url},model:{value:e.formModel.product_detail_url,callback:function(t){e.$set(e.formModel,"product_detail_url",t)},expression:"formModel.product_detail_url"}})],1),o("FormItem",{attrs:{label:"列表缩略图",prop:"list_thumbnail_url"}},[o("Uploads",{ref:"list_thumbnail_url",attrs:{propName:e.list_thumbnail_url},model:{value:e.formModel.list_thumbnail_url,callback:function(t){e.$set(e.formModel,"list_thumbnail_url",t)},expression:"formModel.list_thumbnail_url"}})],1),o("FormItem",{attrs:{label:"是否推荐",prop:"is_recommend"}},[o("RadioGroup",{model:{value:e.formModel["is_recommend"],callback:function(t){e.$set(e.formModel,"is_recommend",t)},expression:"formModel['is_recommend']"}},[o("Radio",{key:1,attrs:{label:1}},[e._v("是")]),o("Radio",{key:0,attrs:{label:0}},[e._v("否")])],1)],1),o("FormItem",{attrs:{label:"",prop:"is_server"}},[o("h3",[e._v("添加「服务介绍」")]),e.showchildform?o("div",{staticClass:"service"},[o("EditTxt",{attrs:{type:"dd",texxx:e.formModel.service_Introduction_info},on:{sendHtml:e.getService}})],1):e._e()]),o("FormItem",{attrs:{label:"",prop:"is_flow"}},[o("h3",[e._v("\n 添加「办理流程」\n "),o("Icon",{staticStyle:{"font-size":"30px",cursor:"pointer"},attrs:{type:"md-add-circle"},on:{click:e.addFlow}})],1),o("ol",{staticClass:"add-input"},e._l(e.flowList,(function(t,i){return o("li",{key:i},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.txt,expression:"item.txt"}],staticStyle:{margin:"10px 20px","min-width":"400px"},attrs:{type:"text"},domProps:{value:t.txt},on:{input:[function(o){o.target.composing||e.$set(t,"txt",o.target.value)},function(t){return e.flowText(t,i)}]}}),o("div",{staticClass:"pic-icon"},[o("img",{attrs:{src:t.pic_url,alt:""}})]),o("a",{attrs:{href:"##"},on:{click:function(t){return e.flowChooseIcon(i)}}},[e._v("选择图标")]),o("Icon",{staticStyle:{"font-size":"30px",display:"none",cursor:"pointer"},attrs:{type:"md-close-circle"},on:{click:function(t){return e.removeFlow(i)}}})],1)})),0)]),o("FormItem",{attrs:{label:"",prop:"is_materialList"}},[o("h3",[e._v("\n 添加「所需资料」\n "),o("Icon",{staticStyle:{"font-size":"30px",cursor:"pointer"},attrs:{type:"md-add-circle"},on:{click:e.addMateria}})],1),o("ol",{staticClass:"add-input"},e._l(e.materialList,(function(t,i){return o("li",{key:i},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.txt,expression:"item.txt"}],staticStyle:{margin:"10px 20px","min-width":"400px"},attrs:{type:"text"},domProps:{value:t.txt},on:{input:[function(o){o.target.composing||e.$set(t,"txt",o.target.value)},function(t){return e.materialText(t,i)}]}}),o("div",{staticClass:"pic-icon"},[o("img",{attrs:{src:t.pic_url,alt:""}})]),o("a",{attrs:{href:"##"},on:{click:function(t){return e.materialsChooseIcon(i)}}},[e._v("选择图标")]),o("Icon",{staticStyle:{"font-size":"30px",display:"none",cursor:"pointer"},attrs:{type:"md-close-circle"},on:{click:function(t){return e.removeMateria(i)}}})],1)})),0)]),o("FormItem",{attrs:{label:"",prop:"is_server"}},[o("h3",[e._v("添加「您可获得」")]),o("ul",{staticClass:"show_piclist"},e._l(e.checkedList,(function(e,t){return o("li",{key:t},[o("img",{attrs:{src:e.pic_url,alt:""}})])})),0),o("div",[o("Button",{attrs:{type:"primary"},on:{click:e.addMaterialsUpload}},[e._v("添加获得材料")])],1)]),o("FormItem",{attrs:{label:"",prop:"is_server"}},[o("h3",[e._v("添加「我们的优势」")]),e.showchildform?o("div",[o("EditTxt",{attrs:{type:"dd",texxx:e.formModel.our_advantage_info},on:{sendHtml:e.getAdvantage}})],1):e._e()])],1),o("div",{staticClass:"form-footer"},[e.isCreate?o("Button",{attrs:{type:"text"},on:{click:e.save}},[e._v("保存")]):e._e(),e.isUpdate?o("Button",{attrs:{type:"text"},on:{click:e.edit}},[e._v("保存")]):e._e(),o("Button",{attrs:{type:"text"},on:{click:e.childcancle}},[e._v("取消")])],1)],1),o("Modal",{attrs:{width:"620px",title:"图库"},on:{"on-ok":e.okImage,"on-cancel":e.cancel},model:{value:e.openImages,callback:function(t){e.openImages=t},expression:"openImages"}},[o("Gallery",{key:e.config.key,attrs:{config:e.config,currentShow:e.currentShow,cacheCheckedList:e.cacheCheckedList,max_checked:6},on:{getImageList:e.getImageList}})],1)],1)]}}])})},r=[],s=(o("5ab2"),o("6d57"),o("e10e"),o("2b45"),o("cc57"),o("ce3c")),a=o("06d3"),n=o("391e"),c=o("a98b"),l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"upload-img"},[o("Upload",{staticStyle:{display:"none"},attrs:{action:e.action,accept:"image/*",data:e.ossConf,"before-upload":e.uploadImg,"on-success":e.uploadSuccess}},[o("button",[e._v("上传")])]),o("div",{staticClass:"box"},e._l(e.listImg,(function(t,i){return o("div",{key:t.id,class:["image-box",t.flag?"checkedActive":""],on:{click:function(o){return e.chooseImg(t,i)}}},[o("img",{attrs:{src:t.pic_url,alt:""}})])})),0),[o("Page",{attrs:{total:e.page.total,"page-size":e.page.size,current:e.page.currentPage},on:{"on-change":e.updateMapdepot}})]],2)])},d=[],u=o("5748"),p=(o("e204"),o("9e76"),o("6a61"),o("cf7f")),f=(o("163d"),o("49a5"),o("6205")),m=(o("4c39"),{props:{changeConfig:{type:Function,default:function(){}},config:{type:Object},max_checked:{type:Number,default:8},currentShow:{type:Array}},data:function(){return{listImg:[],action:"",ossConf:{key:""},checkedList:[],page:{currentPage:1,total:0,size:20},cacheCheckList:[]}},mounted:function(){this.updateMapdepot(),this.getOss()},methods:{getOss:function(){var e=this;Object(f["f"])().then((function(t){e.ossConf=t.data,e.action=t.data.url}))},uploadImg:function(e){this.ossConf.key=this.setKey(),delete this.ossConf.url},updateMapdepot:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.page.currentPage=t;var o={actionType:"getImgList",actionBody:{pageInfo:{pageNo:t,pageSize:this.page.size}}};Object(f["e"])(o).then((function(t){var o=t.data.results.rows;e.page.total=t.data.results.count,console.log(e.currentShow,"77777777777777"),e.currentShow&&(e.checkedList=e.currentShow);e.checkedList.length;e.listImg=o.map((function(t,o){return t.flag=!1,e.checkedList.map((function(e){e.id==t.id&&(t.flag=!0)})),t}))}))},setKey:function(){var e=new Date,t="zc_gsb_"+Math.round(1e4*Math.random())+e.getTime()+e.getFullYear()+e.getMonth()+e.getDate()+".jpg";return t},uploadSuccess:function(){var e=Object(p["a"])(regeneratorRuntime.mark((function e(t,o,i){var r,s,a,n,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=/(?<=<Location>).*?(?=<\/Location>)/,s=t.match(r)[0],a=o.name,n=o.size,c={pic_url:s,name:a,pic_size:n},e.next=6,Object(f["a"])(c);case 6:this.updateMapdepot();case 7:case"end":return e.stop()}}),e,this)})));function t(t,o,i){return e.apply(this,arguments)}return t}(),chooseImg:function(e,t){if("image"==this.config.type){this.radioCheckedImg(e,t);var o=JSON.parse(JSON.stringify(this.config));o.url=e.pic_url,this.changeConfig(o)}else this.moreCheckedImg(e,t)},moreCheckedImg:function(e,t){if(console.log(e.id,"vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"),this.checkedList.length>=this.max_checked)if(this.listImg[t]["flag"]){var o;this.listImg[t]["flag"]=!this.listImg[t]["flag"];var i=this.checkedList.findIndex((function(t){return e.id==t.id}));this.checkedList.splice(i,1);var r=this.checkedList.map((function(e){return e.id}));(o=console).log.apply(o,Object(u["a"])(r))}else{var s={content:"最多选择".concat(this.max_checked,"张")};this.$Message.warning(s)}else{if(this.listImg[t]["flag"]=!this.listImg[t]["flag"],this.checkedList.length)if(e.flag)this.checkedList.push(e);else{var a=this.checkedList.findIndex((function(t){return e.id==t.id}));this.checkedList.splice(a,1)}else this.checkedList=this.listImg.filter((function(e){return e.flag}));this.$emit("getImageList",this.checkedList)}},radioCheckedImg:function(e,t){for(var o in this.listImg)this.listImg[o]["flag"]=!1;this.listImg[t]["flag"]=!0,this.$emit("getImageList",this.listImg[t])}},computed:{}}),h=m,g=(o("696d"),o("9ca4")),_=Object(g["a"])(h,l,d,!1,null,"382f162a",null),v=_.exports,y=o("3b00"),b=o("a0f5"),w=(o("5ee4"),o("7e1e"));function L(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function M(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?L(Object(o),!0).forEach((function(t){Object(s["a"])(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var k={name:"product_page",data:function(){var e=this,t=function(t,o,i){var r=e.formModel["p_product_type_id"];r?i():i(new Error("请选择产品一类"))},o=function(t,o,i){var r=e.formModel["product_type_id"];r?i():i(new Error("请选择产品二类"))},i=function(t,o,i){var r=e.formModel["is_recommend"];0==r||1==e.formModel["is_recommend"]?i():i(new Error("请选择是否推荐"))};return{p_productTypeList:[],productTypeList:[],list_thumbnail_url:"",product_detail_url:"",showchildform:!1,isCreate:!1,isUpdate:!1,formModel:{},isRecomen:!1,openImages:!1,flowList:[],materialList:[],config:{type:"image",key:0,is:!1},serviceText:"",advantageText:"",checkedList:[],cacheCheckedList:[],currentShow:[],ruleValidate:{name:[{required:!0,message:"请输入产品名称",trigger:"blur"}],p_product_type_id:[Object(s["a"])({validator:t,trigger:"blur"},"trigger","change")],product_type_id:[Object(s["a"])({validator:o,trigger:"blur"},"trigger","change")],selling_point:[{required:!0,message:"请输入产品卖点",trigger:"blur"}],price_type:[{required:!0,message:"请选择产品现价类型",trigger:"change"}],price:[{required:!0,message:"请输入产品现价",trigger:"blur"}],sales_volume:[{required:!0,message:"请输入产品销量",trigger:"blur"}],product_detail_url:[{required:!0,message:"请上传详情大图",trigger:"blur"}],list_thumbnail_url:[{required:!0,message:"请上传列表缩略图",trigger:"blur"}],is_recommend:[Object(s["a"])({validator:i,trigger:"blur"},"trigger","change")]}}},components:{BizTable:a["a"],PageSpace:n["a"],Switchs:y["a"],Uploads:c["a"],EditTxt:b["a"],Gallery:v},mounted:function(){this.getProductType()},methods:{changeSwitch:function(e){},typeoneChange:function(e){for(var t=0;t<this.p_productTypeList.length;t++)this.p_productTypeList[t].id==e&&(this.formModel["p_product_type_id"]=this.p_productTypeList[t].id,this.formModel["p_product_type_code"]=this.p_productTypeList[t].code,this.formModel["p_product_type_name"]=this.p_productTypeList[t].name,this.productTypeList=this.p_productTypeList[t].children||[])},typeChange:function(e){for(var t=0;t<this.productTypeList.length;t++)this.productTypeList[t].id==e&&(this.formModel["product_type_id"]=this.productTypeList[t].id,this.formModel["product_type_code"]=this.productTypeList[t].code,this.formModel["product_type_name"]=this.productTypeList[t].name)},getProductType:function(){var e=this;Object(w["h"])("/web/aggregation/producttypeCtl/getProductTypeInfo").then((function(t){if(0==t.status){var o=t.data;e.p_productTypeList=o}}))},addFlow:function(){this.flowList.length<10&&this.flowList.push({})},addMateria:function(){this.materialList.length<10&&this.materialList.push({})},flowText:function(e,t){this.flowList[t]["txt"]=e.target.value,console.log(this.flowList)},materialText:function(e,t){this.materialList[t]["txt"]=e.target.value,console.log(this.materialList)},removeMateria:function(e){this.materialList.splice(e,1)},save:function(){var e=this;this.$refs["productForm"].validate((function(t){t&&(e.flowList&&e.flowList.length>0?e.formModel.process_flow_info=e.flowList:e.formModel.process_flow_info="",e.materialList&&e.materialList.length>0?e.formModel.information_required_info=e.materialList:e.formModel.information_required_info="",e.checkedList&&e.checkedList.length>0?e.formModel.can_get_info=e.checkedList:e.formModel.can_get_info="",Object(w["m"])("/web/aggregation/productCtl/create",e.formModel).then((function(t){var o=t.data;0==o.status?(e.$Message.success("保存成功"),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData()):(e.$Message.error(o.msg?o.msg:"当前操作失败,请稍后重试或联系管理员."),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData())})))}))},edit:function(){var e=this;console.log("edit"),this.$refs["productForm"].validate((function(t){t&&(e.flowList&&e.flowList.length>0?e.formModel.process_flow_info=e.flowList:e.formModel.process_flow_info="",e.materialList&&e.materialList.length>0?e.formModel.information_required_info=e.materialList:e.formModel.information_required_info="",e.checkedList&&e.checkedList.length>0?e.formModel.can_get_info=e.checkedList:e.formModel.can_get_info="",Object(w["m"])("/web/aggregation/productCtl/update",e.formModel).then((function(t){var o=t.data;0==o.status?(e.$Message.success("保存成功"),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData()):(e.$Message.error(o.msg?o.msg:"当前操作失败,请稍后重试或联系管理员."),e.showchildform=!1,e.formModel={},e.flowList=[],e.materialList=[],e.checkedList=[],e.$refs.bt.fetchData())})))}))},okImage:function(){"image"!=this.config.type?this.checkedList=this.cacheCheckedList:this.config.is?this.flowList[this.config.idx]=M(M({},this.flowList[this.config.idx]),this.cacheCheckedList):this.materialList[this.config.idx]=M(M({},this.materialList[this.config.idx]),this.cacheCheckedList),console.log(this.materialList),console.log(this.flowList)},cancel:function(){},getImageList:function(e){console.log(e),this.cacheCheckedList=e},flowChooseIcon:function(e){this.config.type="image",this.config.is=!0,this.config.idx=e,this.config.key++,this.currentShow=[this.flowList[e]],this.openImages=!this.openImages},materialsChooseIcon:function(e){this.config.type="image",this.config.is=!1,this.config.idx=e,this.config.key++,this.currentShow=[this.materialList[e]],this.openImages=!this.openImages},addMaterialsUpload:function(){this.config.type="",this.currentShow=this.checkedList,this.config.key++,this.openImages=!this.openImages},childcancle:function(){this.showchildform=!1,this.formModel={},this.$refs.bt.fetchData()},getService:function(e){this.serviceText=e,this.formModel.service_Introduction_info=e,console.log(e)},getAdvantage:function(e){this.advantageText=e,this.formModel.our_advantage_info=e,console.log(e)},onformevent:function(e,t){},savebefore:function(e,t,o){return o(t)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,o){return o(t)},onexec:function(e,t){var o=this;if("auth"==e&&this.$router.push({name:"role_auth",query:{roleid:t.id,rolecode:t.code}}),"editProduct"==e&&(console.log(t,"editProduct++++++++++++++++++"),this.showchildform=!0,this.isCreate=!1,this.isUpdate=!0,this.formModel=t,this.formModel.price=this.formModel.price?this.formModel.price.toString():"",this.formModel.sales_volume=this.formModel.sales_volume?this.formModel.sales_volume.toString():"",this.formModel.process_flow_info&&this.formModel.process_flow_info.length>0?this.flowList=this.formModel.process_flow_info:this.flowList=[],this.formModel.information_required_info&&this.formModel.information_required_info.length>0?this.materialList=this.formModel.information_required_info:this.materialList=[],this.formModel.can_get_info&&this.formModel.can_get_info.length>0?this.checkedList=this.formModel.can_get_info:this.checkedList=[],this.formModel&&this.formModel.p_product_type_id))for(var i=0;i<this.p_productTypeList.length;i++)this.formModel.p_product_type_id==this.p_productTypeList[i].id&&(this.productTypeList=this.p_productTypeList[i].children||[]);"createProduct"==e&&(console.log(t,"createProduct++++++++++++++++++"),this.showchildform=!0,this.isCreate=!0,this.isUpdate=!1,this.flowList=[],this.materialList=[],this.checkedList=[]),"onself"==e&&Object(w["m"])("/web/aggregation/productCtl/update",{id:t.id,is_enabled:1}).then((function(e){var t=e.data;0==t.status?(o.$Message.success("上架成功"),o.$refs.bt.fetchData()):(o.$Message.error(t.msg?t.msg:"当前操作失败,请稍后重试或联系管理员."),o.$refs.bt.fetchData())})),"offself"==e&&Object(w["m"])("/web/aggregation/productCtl/update",{id:t.id,is_enabled:0}).then((function(e){var t=e.data;0==t.status?(o.$Message.success("下架成功"),o.$refs.bt.fetchData()):(o.$Message.error(t.msg?t.msg:"当前操作失败,请稍后重试或联系管理员."),o.$refs.bt.fetchData())}))},oninitbtn:function(e,t){switch(t.is_enabled){case 0:"offself"===e.key?e.ishide=!0:e.ishide=!1;break;case 1:"onself"===e.key?e.ishide=!0:e.ishide=!1;break}},formatCol:function(e,t,o){return"is_enabled"==t?"<span>".concat(e[t]?"是":"否","</span>"):"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},x=k,I=(o("d2f8"),Object(g["a"])(x,i,r,!1,null,"4ff16c68",null));t["default"]=I.exports},"696d":function(e,t,o){"use strict";var i=o("6c27"),r=o.n(i);r.a},"6c27":function(e,t,o){},"9ee1":function(e,t,o){"use strict";(function(e){o("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var o=e("#framediv"),i=o.get()[0]||0,r=window.innerHeight-i.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,o("a336"))},a2d3:function(e,t,o){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,o,s){t=t||"&",o=o||"=";var a={};if("string"!==typeof e||0===e.length)return a;var n=/\+/g;e=e.split(t);var c=1e3;s&&"number"===typeof s.maxKeys&&(c=s.maxKeys);var l=e.length;c>0&&l>c&&(l=c);for(var d=0;d<l;++d){var u,p,f,m,h=e[d].replace(n,"%20"),g=h.indexOf(o);g>=0?(u=h.substr(0,g),p=h.substr(g+1)):(u=h,p=""),f=decodeURIComponent(u),m=decodeURIComponent(p),i(a,f)?r(a[f])?a[f].push(m):a[f]=[a[f],m]:a[f]=m}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},d2f8:function(e,t,o){"use strict";var i=o("024c"),r=o.n(i);r.a}}]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment