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

View File

@ -42,7 +42,7 @@
</template> </template>
<script> <script>
import { fieldValues } from '@/api/dataset/dataset'
export default { export default {
props: { props: {
@ -114,9 +114,16 @@ export default {
}, },
created() { created() {
this.options = this.element.options this.options = this.element.options
this.setMutiBox() if (this.options.attrs.fieldId) {
this.setRadioBox() fieldValues(this.options.attrs.fieldId).then(res => {
// this.setCondition() this.options.attrs.datas = this.optionDatas(res.data)
this.setMutiBox()
this.setRadioBox()
})
} else {
this.setMutiBox()
this.setRadioBox()
}
}, },
mounted() { mounted() {
// this.$nextTick(() => { // this.$nextTick(() => {
@ -212,6 +219,15 @@ export default {
// }, // },
styleChange() { styleChange() {
this.$store.commit('recordStyleChange') 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> </template>
<el-dropdown class="top-dropdown" style="display: flex;align-items: center; width:100px;" trigger="click"> <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;"> <div class="el-dropdown-link" style="display: flex;color: var(--TopTextColor);font-size: 14px; width:100%;">
{{ name }}
<i class="el-icon-arrow-down el-icon--right" /> <span style="max-width:80px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">{{ name }}</span>
</span> <span><i class="el-icon-arrow-down el-icon--right" /></span>
</div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<router-link to="/person-info/index"> <router-link to="/person-info/index">
<el-dropdown-item>{{ $t('commons.personal_info') }}</el-dropdown-item> <el-dropdown-item>{{ $t('commons.personal_info') }}</el-dropdown-item>

View File

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

View File

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