|
@@ -174,6 +174,7 @@ export default {
|
|
|
getFile(file) {
|
|
|
var formData = new FormData()
|
|
|
formData.append('file', file.file)
|
|
|
+ formData.append('uid', this.ruleForm.Url)
|
|
|
let postParams = formData
|
|
|
uploadImg({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
@@ -263,10 +264,12 @@ export default {
|
|
|
changeLineType(val) {
|
|
|
this.$set(this.ruleForm, 'LineDash', val)
|
|
|
this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
|
|
|
- this.$refs.select1.$el.children[0].children[0].setAttribute(
|
|
|
- 'style',
|
|
|
- 'background:url(' + this.borderLineOptionObject.src + ') center center no-repeat;color:transparent;'
|
|
|
- )
|
|
|
+ if (this.$refs.select1) {
|
|
|
+ this.$refs.select1.$el.children[0].children[0].setAttribute(
|
|
|
+ 'style',
|
|
|
+ 'background:url(' + this.borderLineOptionObject.src + ') center center no-repeat;color:transparent;'
|
|
|
+ )
|
|
|
+ }
|
|
|
if (this.view) {
|
|
|
this.view.lineType = val
|
|
|
}
|
|
@@ -275,10 +278,13 @@ export default {
|
|
|
changeLineWidth(val) {
|
|
|
this.$set(this.ruleForm, 'LineWidth', val)
|
|
|
this.linepxObject = val && this.linepxOption.find(item => item.id == val)
|
|
|
- this.$refs.select.$el.children[0].children[0].setAttribute(
|
|
|
- 'style',
|
|
|
- 'background:url(' + this.linepxObject.src + ') center center no-repeat;color:transparent;'
|
|
|
- )
|
|
|
+ if (this.$refs.select) {
|
|
|
+ this.$refs.select.$el.children[0].children[0].setAttribute(
|
|
|
+ 'style',
|
|
|
+ 'background:url(' + this.linepxObject.src + ') center center no-repeat;color:transparent;'
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
if (this.view) {
|
|
|
this.view.lineWidth = Number(val)
|
|
|
}
|