Merge remote-tracking branch 'origin/v1.3' into v1.3

This commit is contained in:
wangjiahao 2021-10-13 14:19:31 +08:00
commit e0b3e6a2c1
5 changed files with 50 additions and 12 deletions

View File

@ -22,7 +22,7 @@
</template>
<script>
import { fieldValues } from '@/api/dataset/dataset'
export default {
props: {
@ -68,6 +68,11 @@ export default {
},
created() {
this.options = this.element.options
if (this.options.attrs.fieldId) {
fieldValues(this.options.attrs.fieldId).then(res => {
this.options.attrs.datas = this.optionDatas(res.data)
})
}
// this.setCondition()
},
@ -105,9 +110,19 @@ export default {
},
styleChange() {
this.$store.commit('recordStyleChange')
},
optionDatas(datas) {
if (!datas) return null
return datas.filter(item => !!item).map(item => {
return {
id: item,
text: item
}
})
}
}
}
</script>

View File

@ -42,7 +42,7 @@
</template>
<script>
import { fieldValues } from '@/api/dataset/dataset'
export default {
props: {
@ -114,9 +114,16 @@ export default {
},
created() {
this.options = this.element.options
this.setMutiBox()
this.setRadioBox()
// this.setCondition()
if (this.options.attrs.fieldId) {
fieldValues(this.options.attrs.fieldId).then(res => {
this.options.attrs.datas = this.optionDatas(res.data)
this.setMutiBox()
this.setRadioBox()
})
} else {
this.setMutiBox()
this.setRadioBox()
}
},
mounted() {
// this.$nextTick(() => {
@ -212,6 +219,15 @@ export default {
// },
styleChange() {
this.$store.commit('recordStyleChange')
},
optionDatas(datas) {
if (!datas) return null
return datas.filter(item => !!item).map(item => {
return {
id: item,
text: item
}
})
}
}

View File

@ -35,10 +35,11 @@
</template>
<el-dropdown class="top-dropdown" style="display: flex;align-items: center; width:100px;" trigger="click">
<span class="el-dropdown-link" style="color: var(--TopTextColor);font-size: 14px;max-width: 80px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{ name }}
<i class="el-icon-arrow-down el-icon--right" />
</span>
<div class="el-dropdown-link" style="display: flex;color: var(--TopTextColor);font-size: 14px; width:100%;">
<span style="max-width:80px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">{{ name }}</span>
<span><i class="el-icon-arrow-down el-icon--right" /></span>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/person-info/index">
<el-dropdown-item>{{ $t('commons.personal_info') }}</el-dropdown-item>

View File

@ -21,6 +21,7 @@
import { loadTree } from '@/api/panel/share'
import { uuid } from 'vue-uuid'
import { get } from '@/api/panel/panel'
import bus from '@/utils/bus'
export default {
name: 'ShareTree',
props: {
@ -59,6 +60,7 @@ export default {
this.$store.commit('setCanvasStyle', JSON.parse(response.data.panelStyle))
this.$store.dispatch('panel/setPanelInfo', data)
bus.$emit('set-panel-is-share')
})
},
resetID(data) {

View File

@ -38,13 +38,13 @@
</el-tooltip>
</span>
<span v-if="!hasStar && panelInfo" style="float: right;margin-right: 10px">
<span v-if="!hasStar && panelInfo && !isShare" style="float: right;margin-right: 10px">
<el-tooltip :content="$t('panel.store')">
<el-button class="el-icon-star-off" size="mini" circle @click="star" />
</el-tooltip>
</span>
<span v-if="hasStar && panelInfo" style="float: right;margin-right: 10px">
<span v-if="hasStar && panelInfo && !isShare" style="float: right;margin-right: 10px">
<el-tooltip :content="$t('commons.cancel')">
<el-button class="el-icon-star-on" size="mini" circle @click="unstar" />
</el-tooltip>
@ -131,7 +131,8 @@ export default {
hasStar: false,
fullscreen: false,
pdfExportShow: false,
snapshotInfo: ''
snapshotInfo: '',
isShare: false
}
},
computed: {
@ -162,6 +163,9 @@ export default {
}
},
mounted() {
bus.$on('set-panel-is-share', () => {
this.isShare = true
})
this.initPdfTemplate()
},
methods: {