|
@@ -23,12 +23,12 @@
|
|
|
<div
|
|
|
v-else-if='ruleForm.Type=="Zone" '
|
|
|
class='model'
|
|
|
- :style='`background:${ruleForm.color};border-width:${ruleForm.linepx}px;border-style:${ruleForm.borderLine}; border-color:${ruleForm.borderColor};`'
|
|
|
+ :style='`background:${ruleForm.FillColor};border-width:${ruleForm.LineWidth}px;border-style:${ruleForm.LineDash}; border-color:${ruleForm.Color};`'
|
|
|
></div>
|
|
|
<div
|
|
|
v-else
|
|
|
class='model1'
|
|
|
- :style='`border-width:${ruleForm.linepx}px;border-style:${ruleForm.borderLine}; border-color:${ruleForm.borderColor};`'
|
|
|
+ :style='`border-width:${ruleForm.LineWidth}px;border-style:${ruleForm.LineDash}; border-color:${ruleForm.Color};`'
|
|
|
>
|
|
|
<!-- <img :src='linepxObject.src' alt v-if='linepxObject.src' />
|
|
|
<img :src='borderLineOptionObject.src' alt v-if='borderLineOptionObject.src' />-->
|
|
@@ -43,11 +43,11 @@
|
|
|
<span class='form3-span5'>边框粗细</span>
|
|
|
</div>
|
|
|
<div class='form3-bottom'>
|
|
|
- <el-color-picker v-if='ruleForm.Type=="Zone"' v-model='ruleForm.color' show-alpha style='margin:0 172px 0 10px'></el-color-picker>
|
|
|
- <el-color-picker v-model='ruleForm.borderColor' show-alpha style='margin:0 90px 0 10px'></el-color-picker>
|
|
|
+ <el-color-picker v-if='ruleForm.Type=="Zone"' v-model='ruleForm.FillColor' show-alpha style='margin:0 172px 0 10px'></el-color-picker>
|
|
|
+ <el-color-picker v-model='ruleForm.Color' show-alpha style='margin:0 90px 0 10px'></el-color-picker>
|
|
|
|
|
|
<el-select
|
|
|
- v-model='ruleForm.borderLine'
|
|
|
+ v-model='ruleForm.LineDash'
|
|
|
placeholder='请选择'
|
|
|
size='small'
|
|
|
style='width:160px;margin-right:24px'
|
|
@@ -58,7 +58,7 @@
|
|
|
<img :src='item.src' alt />
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-select v-model='ruleForm.linepx' placeholder='请选择' size='small' style='width:160px;' ref='select' @change='changeSelection'>
|
|
|
+ <el-select v-model='ruleForm.LineWidth' placeholder='请选择' size='small' style='width:160px;' ref='select' @change='changeSelection'>
|
|
|
<el-option v-for='item in linepxOption' :key='item.id' :label='item.src' :value='item.id'>
|
|
|
<img :src='item.src' alt />
|
|
|
</el-option>
|
|
@@ -171,14 +171,13 @@ export default {
|
|
|
uploadImg({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.imgSrc = res.EntityList[0]
|
|
|
-
|
|
|
this.$message.success('图标上传成功!')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
changeSelection(val) {
|
|
|
console.log(val)
|
|
|
- this.ruleForm.linepx = val
|
|
|
+ this.ruleForm.LineWidth = val
|
|
|
this.linepxObject = val && this.linepxOption.find(item => item.id == val)
|
|
|
this.$refs.select.$el.children[0].children[0].setAttribute(
|
|
|
'style',
|
|
@@ -187,7 +186,7 @@ export default {
|
|
|
},
|
|
|
changeSelection1(val) {
|
|
|
console.log(val)
|
|
|
- this.ruleForm.borderLine = val
|
|
|
+ this.ruleForm.LineDash = val
|
|
|
this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
|
|
|
this.$refs.select1.$el.children[0].children[0].setAttribute(
|
|
|
'style',
|
|
@@ -197,13 +196,7 @@ export default {
|
|
|
create() {
|
|
|
//新增
|
|
|
let postParams = {
|
|
|
- Content: [
|
|
|
- {
|
|
|
- Name: this.ruleForm.Name,
|
|
|
- Type: this.ruleForm.Type,
|
|
|
- Unit: this.ruleForm.Unit
|
|
|
- }
|
|
|
- ]
|
|
|
+ Content: [this.ruleForm]
|
|
|
}
|
|
|
createLegend({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
@@ -214,7 +207,9 @@ export default {
|
|
|
},
|
|
|
update() {
|
|
|
//修改
|
|
|
- let postParams = this.ruleForm
|
|
|
+ let postParams = {
|
|
|
+ Content: [this.ruleForm]
|
|
|
+ }
|
|
|
updateLegend({ postParams }).then(res => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message.success('图例修改成功!')
|
|
@@ -269,7 +264,7 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- .model {
|
|
|
+ .model1 {
|
|
|
width: 56px;
|
|
|
height: 6px;
|
|
|
}
|