优化代码报错,以及修改保存iscs的数据的lineCode为mapId

This commit is contained in:
lVAL 2020-12-30 13:25:20 +08:00
parent 75fccbbd01
commit 79779e2a86
4 changed files with 11 additions and 9 deletions

View File

@ -58,7 +58,7 @@ export default {
mapPublishList: [],
pageTreeMap: {
'01': [],
'02': [
'114': [
{
// 线 线 线 线
name: '电力监控系统',

View File

@ -3,7 +3,7 @@
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="code:" prop="code">
<el-select v-model="form.code">
<el-option v-for="(item, index) in iscs.iscsTextList" :key="index" :label="item.code" :value="item.code" disabled />
<el-option v-for="(item, index) in iscsTextList" :key="index" :label="item.code" :value="item.code" disabled />
</el-select>
</el-form-item>
<el-form-item label="文字内容:" prop="context">
@ -106,7 +106,10 @@ export default {
computed:{
...mapGetters('iscs', [
'iscs'
])
]),
iscsTextList() {
return this.iscs ? this.iscs.iscsTextList || [] : [];
}
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
@ -141,7 +144,7 @@ export default {
x: this.form.x,
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsText', this.iscs.iscsTextList),
code: this.isUpdate ? this.form.code : getUID('IscsText', this.iscsTextList),
_type: 'IscsText',
context: this.form.context,
unit: this.form.unit,

View File

@ -112,8 +112,7 @@ export default {
handleSave(data) {
const param = {
graphData: data,
lineCode: this.$route.query.lineCode,
stationCode: '',
mapId: this.$route.query.mapId,
system: this.$route.query.system,
totalSystem: this.$route.query.mode,
userInterface: this.$route.query.part

View File

@ -35,8 +35,8 @@
<div class="mainHouseTwo">
<div class="station-list-button" :class="{'active': selectStation == 'mainHouseTwo'}" @click="changeStation('mainHouseTwo')" />
</div>
<div class="mainHouseOneName">黄山主所</div>
<div class="mainHouseTwoName">茶亭主所</div>
<div class="mainHouseOneName">主所1</div>
<div class="mainHouseTwoName">主所2</div>
</div>
</div>
</div>
@ -328,7 +328,7 @@ export default {
res.data.forEach(station => {
if (!station.depot && station.visible) {
const param = {
name: station.name.includes('站') ? station.name : `${station.name}`,
name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}`,
id: station.code
};