var _extends = Object.assign || function (e) { for (var a = 1; a < arguments.length; a++){ var t = arguments[a]; for (var l in t) Object.prototype.hasOwnProperty.call(t, l) && (e[l] = t[l]) } return e }; Vue.component("pcb-uploader", {
props: { isshowtip: { type: Boolean, "default": !0 } }, data: function () { return { url: "/upfile?type=gerber", status: "鏈紑濮?, result: "", percentage: 0, percentageTemp: 0, name: "", size: 0 } }, computed: { "鏄剧ず鐨勫昂瀵?: function () { var e = this.size + " B"; return this.size > 1024 && (e = parseInt(this.size / 1024) + " KB"), this.size > 1048576 && (e = parseInt(this.size / 1048576) + " MB"), e }, progressColor: function () { return this.percentage > 95 ? "#67C23A" : "#68A9F0" } }, watch: { percentage: function (e) { e >= 100 && (this.percentage = 100, clearInterval(this.progressTimer)) } }, methods: {
onBeforeUpload: function (e) { this.status = "涓婁紶涓?, this.size = e.size, this.name = e.name }, onProgress: function (e) { var a = this, t = (.95 * e.percent).toFixed(1); this.percentage = Number(t), 100 == e.percent && (this.progressTimer = setInterval(function () { if (a.percentage < 100) { var e = a.杞竴浣嶅皬鏁?.1 * Math.floor(10 * Math.random())); a.percentage = a.杞竴浣嶅皬鏁?a.percentage + e) } }, 300)) }, onSuccess: function (e) {
var a = this; e.status ? (this.percentage = 100, setTimeout(function () {
a.status = "鏈紑濮?, a.result = "鎴愬姛",
a.$emit("success", { filePath: e.url, analyze_id: e.analyze_id })
}, 400)) : (this.percentage = 0, this.onError(), this.$message.error(e.msg))
}, onError: function () { this.status = "宸插畬鎴?, this.result = "澶辫触" }, reset: function () { this.status = "鏈紑濮?, this.result = "" }, "杞竴浣嶅皬鏁?: function (e) { return Number(e.toFixed(1)) }
}, template: '
涓€閿浠
涓婁紶Gerber/PCB鏂囦欢锛岀郴缁熷皢鑷姩鍒嗘瀽骞跺~鍏匬CB灏哄銆佹渶灏忓瓟寰勭瓑璁′环鍙傛暟
(.zip .rar鏍煎紡锛屽皬浜?0MB)
涓婁紶涓細{{name}} ({{鏄剧ず鐨勫昂瀵竲})
'
}), Vue.component("pcb-units", { props: { uiStyle: { type: String, "default": "radio" }, units: { type: Number, "default": 1 }, x: { type: Number, "default": 1 }, y: { type: Number, "default": 1 }, isReturnOrder: { type: Boolean, "default": !1 } }, data: function () { return { val: 1, realUnits: 1 } }, mounted: function () { var e = Number(this.units); 2 == e && (this.x > 1 || this.y > 1) && (e = 3), this.realUnits = e, this.val = e }, computed: { options: function () { var e = [{ value: 1, name: "鍗曠墖鍑鸿揣" }, { value: 2, name: "杩炵墖(灏忓井绉戞妧浠f嫾)" }, { value: 3, name: "杩炵墖(鎸夋枃浠?" }], a = [1, 3, 2], t = [], l = []; this.isReturnOrder && (3 == this.realUnits && t.push(1, 2), [1, 2].includes(this.realUnits) && t.push(3), 2 == this.realUnits && t.push(1, 3)); var i = !0, n = !1, o = void 0; try { for (var r, s = a[Symbol.iterator](); !(i = (r = s.next()).done); i = !0){ var u = r.value, d = t.includes(u); this.val == u && (d = !1); var h = e.find(function (e) { return e.value == u }).name; l.push({ value: u, name: h, disabled: d }) } } catch (c) { n = !0, o = c } finally { try { !i && s["return"] && s["return"]() } finally { if (n) throw o } } return l } }, methods: { handleChange: function () { this.$emit("change", this.val) } }, template: ' {{item.name}}
' }),
Vue.component("pcb-cross_board", { props: { area: { type: Number, "default": 0 }, layer: { type: Number, "default": 2 }, units: { type: Number, "default": 1 } }, data: function () { return { val: 1 } }, watch: { layer: "setDefVal", area: "setDefVal", units: "setDefVal" }, computed: { options: function () { var e = [{ value: 1, name: "鏄? }, { value: 2, name: "鍚? }], a = [1, 2], t = [], l = []; this.area < 3 && (t = [2]); var i = !0, n = !1, o = void 0; try { for (var r, s = a[Symbol.iterator](); !(i = (r = s.next()).done); i = !0){ var u = r.value, d = t.includes(u); this.val == u && (d = !1); var h = e.find(function (e) { return e.value == u }).name; l.push({ value: u, name: h, disabled: d }) } } catch (c) { n = !0, o = c } finally { try { !i && s["return"] && s["return"]() } finally { if (n) throw o } } return l } }, methods: { setDefVal: function () { (this.area < 3 || 1 == this.units) && (this.val = 1), this.handleChange() }, handleChange: function () { this.$emit("input", this.val) } }, template: '鏄惁鎺ュ彈鎵撳弶鏉匡細{{item.name}}' }),
Vue.component("pcb-layer", {
props: {
boardType: { type: String, "default": "閾濆熀鏉? },
value: { type: String, "default": 2 },
allDisabled: { type: Boolean, "default": !1 }
}, data: function () {
return { val: this.value }
}, computed: {
options: function () {
var e = [1, 2, 4, 6, 8, 10, 12];
return "FPC" == this.boardType && (e = [1, 2, 3, 4]),
"閾濆熀鏉? == this.boardType && (e = [1]), e
}
}, watch: {
boardType: function (e) {
"FR-4" == e ? this.val = 2 : this.val = 1, this.handleChange()
}, value: function (e) { this.val = e }
}, methods: { handleChange: function () { this.$emit("input", this.val) } },
template: ' {{item}} '
}),
Vue.component("tg-value", { props: { layer: { type: Number, "default": 0 }, brand: { type: String, "default": "" }, value: { type: String }, uiStyle: { type: String, "default": "radio" } }, data: function () { return { val: this.value } }, computed: { options: function e() { var a = { value: "TG130" }, t = { value: "TG150" }, l = { value: "TG170" }, e = [], i = this.layer; return e = i <= 4 ? [a, t] : i <= 8 ? [_extends({}, a, { disabled: !0 }), t, l] : [_extends({}, a, { disabled: !0 }), _extends({}, t, { disabled: !0 }), l] } }, watch: { layer: function (e) { var a = this.options[0] || ""; a = e <= 4 ? "TG130" : e <= 8 ? "TG150" : "TG170", this.val = a, this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: '\n \n \n {{item.value}}\n \n \n \n \n \n
' }),
Vue.component("gongyi-bian", { props: { direction: { type: String, "default": "鏃? }, width: { type: Number, "default": 0 }, disabled: { type: Boolean, "default": !1 } }, data: function () { return { value: { direction: this.direction, width: this.width }, options: [{ label: "宸﹀彸", value: "Y" }, { label: "涓婁笅", value: "X" }, { label: "鍥涜竟", value: "XY" }, { label: "鏃?, value: "鏃? }] } }, watch: { direction: function (e) { this.value.direction = e }, width: function (e) { this.value.width = e }, "value.direction": { handler: function (e) { "鏃? == e ? this.value.width = 0 : 0 == this.value.width && (this.value.width = 5), this.handleChange() } }, "value.width": { handler: function (e) { this.handleChange() } } }, methods: { validWidth: function (e) { console.log("宸ヨ壓杈规锛? + e), "鏃? != this.value.direction && (e < 3 && (this.$message.error("宸ヨ壓杈规渶灏?mm"), this.value.width = 3), e > 999 && (this.$message.error("宸ヨ壓杈规渶瀹?99mm"), this.value.width = 5)), 10 * e % 5 != 0 && (this.value.width = parseInt(10 * e / 5) / 10, this.$message.error("宸ヨ壓杈规浠呮敮鎸?.5鐨勫€嶆暟锛屾瘮濡?.5, 4 , 4.5")) }, handleChange: function () { this.$emit("change", this.value) } }, template: ' mm
' }),
Vue.component("pcb-height", { props: { value: { type: Number, "default": 1.6 }, layer: { type: Number, "default": 2 }, boardType: { type: String, "default": "FR-4" }, uiStyle: { type: String, "default": "radio" } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = [.6, .8, 1, 1.2, 1.6, 2, 2.5, 3, 3.2], a = [], t = [], l = []; if ("FR-4" == this.boardType) { var i = this.computePcbHeight(this.layer), n = i.min, o = i.max, r = i.exclude, s = !0, u = !1, d = void 0; try { for (var h, c = e[Symbol.iterator](); !(s = (h = c.next()).done); s = !0){ var p = h.value; p >= n && p <= o || a.push(p), p == r && t.push(p) } } catch (v) { u = !0, d = v } finally { try { !s && c["return"] && c["return"]() } finally { if (u) throw d } } } "FPC" == this.boardType && (e = [.15, .2]), "閾濆熀鏉? == this.boardType && (e = [.8, 1, 1.2, 1.6, 2]); var m = !0, f = !1, b = void 0; try { for (var y, g = e[Symbol.iterator](); !(m = (y = g.next()).done); m = !0){ var p = y.value; t.includes(p) || l.push({ name: p, value: p, disabled: a.includes(p) }) } } catch (v) { f = !0, b = v } finally { try { !m && g["return"] && g["return"]() } finally { if (f) throw b } } return l }, "灏忔暟浣?: function () { return "FPC" == this.boardType ? 2 : 1 } }, watch: { value: function (e) { this.val = Number(e) }, boardType: function (e) { if ("FR-4" == e) { var a = this.computePcbHeight(this.layer), t = a.def; this.val = t } "FPC" == e && (this.val = .15), "閾濆熀鏉? == e && (this.val = 1.6), this.handleChange() }, layer: function () { if ("FR-4" == this.boardType) { var e = this.computePcbHeight(this.layer), a = e.def; this.val = a } this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) }, computePcbHeight: function (e) { var a = .4, t = 3, l = 1.6, i = 0; switch (e) { case 1: a = .6, t = 2; break; case 2: a = .6, t = 2; break; case 4: a = .6, t = 2.5; break; case 6: a = 1, t = 2.5; break; case 8: a = 1.2, t = 2.5; break; case 10: a = 1.2, t = 2.5; break; case 12: a = 1.6, t = 2.5; break; case 14: a = 1.6, t = 3; break; case 16: a = 1.8, t = 3.2, l = 2; break; case 18: a = 2, t = 3.2, l = 2.5; break; case 20: a = 2, t = 3.2, l = 2.5 }return { min: a, max: t, def: l, exclude: i } } }, template: ' {{Number(item.name).toFixed(灏忔暟浣?}}
' }),
Vue.component("outer-copper", { props: { value: { type: Number, "default": 1 }, layer: { type: Number, "default": 2 }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = [1, 2], a = [], t = []; this.layer >= 12 && a.push(2); var l = !0, i = !1, n = void 0; try { for (var o, r = e[Symbol.iterator](); !(l = (o = r.next()).done); l = !0){ var s = o.value, u = a.includes(s); this.allDisabled && (u = !0, this.val == s && (u = !1)), t.push({ value: s, disabled: u }) } } catch (d) { i = !0, n = d } finally { try { !l && r["return"] && r["return"]() } finally { if (i) throw n } } return t }, "鍙€夐」": function () { return this.options.filter(function (e) { return !e.disabled }) } }, watch: { layer: function (e) { var a = this, t = this.options.find(function (e) { return e.value == a.val }); (void 0 === t || t && t.disabled) && (this.val = Number(this.鍙€夐」[0].value)), this.handleChange() }, value: function (e) { this.val = e } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: ' {{item.value}}oz ' }),
Vue.component("inside-copper", { props: { value: { type: Number, "default": .5 }, layer: { type: Number, "default": 2 }, copper: { type: Number, "default": 1 }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = [.5, 1, 2], a = [], t = []; this.copper < 2 && a.push(2); var l = !0, i = !1, n = void 0; try { for (var o, r = e[Symbol.iterator](); !(l = (o = r.next()).done); l = !0){ var s = o.value, u = a.includes(s); this.allDisabled && (u = !0, this.val == s && (u = !1)), t.push({ value: s, disabled: u }) } } catch (d) { i = !0, n = d } finally { try { !l && r["return"] && r["return"]() } finally { if (i) throw n } } if (!this.allDisabled && a.includes(this.val)) { var h = !0, c = !1, p = void 0; try { for (var v, m = t[Symbol.iterator](); !(h = (v = m.next()).done); h = !0){ var s = v.value; if (!s.disabled) { this.val = s.value, this.handleChange(); break } } } catch (d) { c = !0, p = d } finally { try { !h && m["return"] && m["return"]() } finally { if (c) throw p } } } return t }, "鍙€夐」": function () { return this.options.filter(function (e) { return !e.disabled }) } }, watch: { layer: function (e) { var a = this; if (e <= 4) this.val = .5; else if (e >= 6) this.val = 1; else { var t = this.options.find(function (e) { return e.value == a.val }); (void 0 === t || t && t.disabled) && (this.val = Number(this.鍙€夐」[0].value)) } this.handleChange() }, value: function (e) { this.val = e } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: ' {{item.value}}oz ' }),
Vue.component("line-weight", { props: { value: { type: Number, "default": 6 }, layer: { type: Number, "default": 2 }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = [6, 5, 4, 3.5], a = [], t = []; this.layer <= 2 && a.push(3.5), 1 == this.layer && a.push(4); var l = !0, i = !1, n = void 0; try { for (var o, r = e[Symbol.iterator](); !(l = (o = r.next()).done); l = !0){ var s = o.value, u = a.includes(s); this.allDisabled && (u = !0, this.val == s && (u = !1)), t.push({ value: s, disabled: u }) } } catch (d) { i = !0, n = d } finally { try { !l && r["return"] && r["return"]() } finally { if (i) throw n } } return t }, "鍙€夐」": function () { return this.options.filter(function (e) { return !e.disabled }) } }, watch: { value: function (e) { this.val = e }, layer: function () { var e = this, a = this.options.find(function (a) { return a.value == e.val }); (void 0 === a || a && a.disabled) && (this.val = Number(this.鍙€夐」[0].value)), this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: '{{item.value}}/{{item.value}}mil 鈫慄/i>' }),
Vue.component("pcb-vias", { props: { layer: { type: Number }, height: { type: Number }, allDisabled: { type: Boolean, "default": !1 }, value: { type: Number, "default": .3 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = [.3, .25, .2, .15], a = [], t = []; 1 == this.layer && a.push(.25, .2, .15), 2 == this.layer && a.push(.15), 1.6 != this.height && a.push(.15); var l = !0, i = !1, n = void 0; try { for (var o, r = e[Symbol.iterator](); !(l = (o = r.next()).done); l = !0){ var s = o.value, u = a.includes(s); this.allDisabled && (u = !0, this.val == s && (u = !1)), t.push({ value: s, disabled: u }) } } catch (d) { i = !0, n = d } finally { try { !l && r["return"] && r["return"]() } finally { if (i) throw n } } return t }, "鍙€夐」": function () { return this.options.filter(function (e) { return !e.disabled }) } }, watch: { value: function (e) { this.val = e }, options: function () { var e = this, a = this.options.find(function (a) { return a.value == e.val }); (void 0 === a || a && a.disabled) && (this.val = Number(this.鍙€夐」[0].value)), this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: '{{item.value}}mm 鈫慄/i>' }),
Vue.component("solder-mask-color", {
props: {
boardType: { type: String, "default": "FR-4锛堝叏娉㈢氦锛? },
value: { type: String, "default": "缁胯壊" },
uiStyle: { type: String, "default": "radio" }
}, computed: {
options: function a() {
var a = [];
return "FR-4锛堝叏娉㈢氦锛? == this.boardType && (a = [
{ value: "缁胯壊", name: "缁胯壊", color: "#090", "class": "green" },
{ value: "绾㈣壊", name: "绾㈣壊", color: "#c00", "class": "red" },
{ value: "榛勮壊", name: "榛勮壊", color: "#fc0", "class": "yellow" },
{ value: "鐧借壊", name: "鐧借壊", color: "#fff", "class": "white" },
{ value: "钃濊壊", name: "钃濊壊", color: "#0080ca", "class": "blue" },
{ value: "榛戣壊", name: "榛戣壊", color: "#111", "class": "black" },
{ value: "绱壊", name: "绱壊", color: "", "class": "purple" },
{ value: "鍝戦粦鑹?, name: "鍝戦粦鑹?, color: "#666", "class": "grey" },
{ value: "鍝戠豢鑹?, name: "鍝戠豢鑹?, color: "", "class": "yalv" },
{ value: "鏃?, name: "鏃?, color: "", "class": "" }
]),
"閾濆熀鏉? == this.boardType && (a = [
{ value: "鐧借壊", name: "鐧借壊(鏅€?", color: "#fff", "class": "white" },
{ value: "榛戣壊", name: "榛戣壊", color: "#111", "class": "black" },
{ value: "缁胯壊", name: "缁胯壊", color: "#090", "class": "green" }]),
"FPC" == this.boardType && (a = [
{ value: "鏃?, name: "鏃?, "class": "none" },
{ value: "缁胯壊", name: "缁胯壊", "class": "green" },
{ value: "榛勮壊", name: "榛勮壊", "class": "yellow" },
{ value: "姗欒壊", name: "姗欒壊", "class": "orange" },
{ value: "榛戣壊", name: "榛戣壊", "class": "black" },
{ value: "鐧借壊", name: "鐧借壊", "class": "white" },
{ value: "閾惰壊", name: "閾惰壊", "class": "yin" }]), a
}
}, data: function () { return { val: this.value } }, watch: { value: function (e) { this.val = e }, boardType: function (e) { "FR-4" == e ? this.val = "缁胯壊" : "閾濆熀鏉? == e ? this.val = "鐧借壊" : "FPC" == e && (this.val = "鏃?), this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: ' {{item.name}}
'
}),
Vue.component("char-color", {
props: {
boardType: { type: String, "default": "FR-4" },
color: { type: String, "default": "缁胯壊" },
value: { type: String, "default": "鐧借壊" }
}, computed: { isFPC: function () { return "FPC" === this.boardType } },
data: function () { return { val: this.value } }, watch: {
value: function (e) { this.val = e },
color: function (e) { "鐧借壊" == e ? this.val = "榛戣壊" : this.val = "鐧借壊", this.handleChange() }
}, methods: {
handleChange: function () { this.$emit("input", this.val) }
},
template: ' 榛戣壊 鐧借壊 '
}),
Vue.component("pcb-overlay", {
props: { value: { type: String, "default": "榛勮壊" } },
data: function () { return { val: this.value } }, watch: { value: function (e) { this.val = e } },
created: function () { this.$emit("input", this.val) },
methods: { handleChange: function () { this.$emit("input", this.val) } },
template: ' 榛勮壊 '
}),
Vue.component("solder-cover", { props: { value: { type: String, "default": "杩囧瓟鐩栨补" }, layer: { type: Number, "default": 2 }, validOptions: { type: Array, "default": function () { return [] } }, uiStyle: { type: String, "default": "radio" }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = ["杩囧瓟鐩栨补", "杩囧瓟寮€绐?, "閾濈墖濉炲瓟", "鏍戣剛濉炲瓟"], a = [], t = !0, l = !1, i = void 0; try { for (var n, o = e[Symbol.iterator](); !(t = (n = o.next()).done); t = !0){ var r = n.value, s = !this.validOptions.includes(r); this.allDisabled ? (s = !0, this.val == r && (s = !1)) : "鏍戣剛濉炲瓟" === r && (s = this.layer < 4, s && this.val == r && (this.val = "杩囧瓟鐩栨补", this.handleChange())), a.push({ value: r, disabled: s }) } } catch (u) { l = !0, i = u } finally { try { !t && o["return"] && o["return"]() } finally { if (l) throw i } } return a } }, watch: { value: function (e) { this.val = e } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: ' {{item.value}} 娉細Gerber鏂囦欢鎸夋枃浠跺姞宸ワ紝姝ら」鏃犳晥銆侟/span>
' }),
Vue.component("pcb-spray", { props: { bankong: { type: Number, "default": 0 }, layer: { type: Number, "default": 2 }, boardType: { type: String }, value: { type: String }, uiStyle: { type: String, "default": "radio" }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = ["鏈夐搮鍠烽敗", "鏃犻搮鍠烽敗", "娌夐噾", "OSP"], a = [], t = [], l = []; "FR-4" == this.boardType && 1 == this.bankong && a.push("OSP"); var i = !0, n = !1, o = void 0; try { for (var r, s = e[Symbol.iterator](); !(i = (r = s.next()).done); i = !0){ var u = r.value, d = !!a.includes(u); this.allDisabled && (d = !0, this.val == u && (d = !1)), t.includes(u) === !1 && l.push({ name: u, value: u, disabled: d }) } } catch (h) { n = !0, o = h } finally { try { !i && s["return"] && s["return"]() } finally { if (n) throw o } } return l }, "鍙€夐」": function () { return this.options.filter(function (e) { return !e.disabled }) } }, watch: { value: function (e) { this.val = e }, bankong: function (e) { var a = this, t = this.options.find(function (e) { return e.value == a.val }); 1 == e && t.disabled && (this.val = this.鍙€夐」[0].value, this.handleChange(), this.$alert("鏈夊崐瀛?鍖呰竟鐨勬澘瀛愶紝琛ㄩ潰澶勭悊涓嶈兘鍋? + t.name, "鎻愮ず", { lockScroll: !1, confirmButtonText: "鐭ラ亾浜? })), 0 == e && (this.val = "鏈夐搮鍠烽敗", this.handleChange()) }, boardType: function (e) { "FR-4" == e && (1 == this.bankong ? this.val = "娌夐噾" : this.val = "鏈夐搮鍠烽敗"), "閾濆熀鏉? == e && (this.val = "鏃犻搮鍠烽敗"), this.handleChange() }, layer: function (e) { "FR-4" == this.boardType && e > 8 ? this.val = "娌夐噾" : this.val = "鏈夐搮鍠烽敗", this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: ' {{item.name}}
' }),
Vue.component("pcb-impendance", { props: { value: { type: Number, "default": 0 }, copper: { type: Number }, uiStyle: { type: String, "default": "radio" }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, computed: { options: function () { var e = [0, 1], a = [], t = []; this.copper >= 2 && a.push(1); var l = !0, i = !1, n = void 0; try { for (var o, r = e[Symbol.iterator](); !(l = (o = r.next()).done); l = !0){ var s = o.value, u = !!a.includes(s); this.allDisabled && (u = !0, this.val == s && (u = !1)); var d = s > 0 ? "鏈? : "鏃?; t.push({ name: d, value: s, disabled: u }) } } catch (h) { i = !0, n = h } finally { try { !l && r["return"] && r["return"]() } finally { if (i) throw n } } return t } }, watch: { value: function (e) { this.val = e }, copper: function (e) { 2 == e && (this.val = 0), this.handleChange() } }, methods: { handleChange: function () { this.$emit("input", this.val) } }, template: ' {{item.name}}
' }),
Vue.component("ban-kong", { props: { value: { type: Number, "default": 0 }, layer: { type: Number }, uiStyle: { type: String, "default": "" }, allDisabled: { type: Boolean, "default": !1 } }, data: function () { return { val: this.value } }, watch: { value: function (e) { this.val = e }, layer: function (e) { 1 == e && (this.val = 0, this.$emit("input", 0)) } }, template: '鏃燑/el-radio>鏈堻/el-radio>
' }),
Vue.component("blind-kong", { props: { value: { type: Number, "default": 0 }, layer: { type: Number }, uiStyle: { type: String, "default": "radio" } }, data: function () { return { val: this.value } }, watch: { value: function (e) { this.val = e }, layer: function (e) { e < 4 && (this.val = 0, this.$emit("input", 0)) } }, template: '鏃燑/el-radio>鏈堻/el-radio>
' }),
Vue.component("test-mode", { props: { value: { type: String, "default": "鏍峰搧鍏嶈垂娴嬭瘯" }, options: { type: Array, "default": function () { return [] } }, uiStyle: { type: String, "default": "radio" } }, data: function () { return { val: this.value } }, watch: { value: function (e) { this.val = e }, options: function (e) { this.options = e } }, methods: { onChange: function () { this.$emit("change", this.val) } }, template: '{{item.word}}
' }),
Vue.component("choose-deltime", { props: { options: { type: Array, "default": function () { return [] } }, value: { type: String, "default": "" }, uiStyle: { type: String, "default": "table" }, recommend: { type: String, "default": "" } }, data: function () { return { val: "", skin: { "缁胯壊": "green", "钃濊壊": "blue", "绾㈣壊": "red", "榛勮壊": "yellow", "榛戣壊": "black", "浜氬厜榛戞补": "grey", "鐧借壊": "white" } } }, watch: { value: { immediate: !0, handler: function (e) { this.val = e } }, options: { immediate: !0, handler: function (e) { this.options = e } } }, methods: { handleChange: function () { this.$emit("change", this.val) }, rowClick: function (e) { this.val = e.name, this.handleChange() }, RowClassName: function (e) { var a = e.row; e.rowIndex; return a.name == this.val ? "current-row" : "" } }, template: '\n \n
\n \n \n \n
\n \n 0\n 鏃燑/span>\n 0\n 锟?.00\n
\n \n \n \n \n \n \n \n \n \n 娌瑰ⅷ?\n \n \n {{props.row.color.replace("浜氬厜榛戞补","浜氬厜")}}\n
\n \n \n \n \n 锟{props.row.fee}}\n 鏃燑/span>\n \n \n ' }),
Vue.component("product-report", { props: { value: { type: String, "default": "" }, layer: { type: Number, "default": 2 }, area: { type: Number, "default": 0 } }, data: function () { return { val: "" } }, computed: { hasReport: function () { return !this.value.includes("鍑鸿揣鎶ュ憡") } }, watch: { value: { immediate: !0, handler: function (e) { e.includes("鍑鸿揣鎶ュ憡") ? this.checked() : this.uncheck() } }, area: function (e) { this.hasReport && (e >= 2e5 ? this.checked() : this.uncheck()) } }, methods: { onChange: function () { var e = this.val ? "鍑鸿揣鎶ュ憡" : ""; this.$emit("input", e) }, checked: function () { this.val = "鍑鸿揣鎶ュ憡", this.onChange() }, uncheck: function () { this.val = "", this.onChange() } }, template: '鏃犻渶鍑鸿揣鎶ュ憡' }); var computePcbSize = function (e) { var a = _extends({}, e), t = a.bwidth, l = a.blength, i = a.units, n = a.layoutx, o = a.layouty, r = a.sidewidth, s = a.sidedirection, u = Number(t), d = Number(l); if (2 == i) { var h = n || 1, c = o || 1; d *= h, u *= c } return 3 != i && ("X" == s && (u += 2 * r / 10), "Y" == s && (d += 2 * r / 10), "XY" == s && (u += 2 * r / 10, d += 2 * r / 10)), d = +d.toFixed(2), u = +u.toFixed(2), { length: d, width: u } };