123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <!--
- * @description: 标题属性设置面板
- * @Date: 2022-08-17 16:53:28
- * @Author: shiyi
- -->
- <template>
- <div class="bs-setting-wrap">
- <el-form
- ref="form"
- label-width="100px"
- label-position="left"
- :model="config"
- :rules="rules"
- class="bs-el-form"
- >
- <SettingTitle>标题</SettingTitle>
- <div class="bs-setting-wrap">
- <el-form-item
- label="标题"
- label-width="100px"
- prop="title"
- >
- <el-input
- v-model="config.title"
- placeholder="请输入标题"
- clearable
- />
- </el-form-item>
- </div>
- <SettingTitle>位置</SettingTitle>
- <div class="lc-field-body">
- <PosWhSetting :config="config" />
- </div>
- <SettingTitle v-if="config.border">
- 边框
- </SettingTitle>
- <div class="lc-field-body">
- <BorderSetting
- v-if="config.border"
- label-width="100px"
- :config="config.border"
- :big-title="config.title"
- />
- </div>
- <SettingTitle>旋转</SettingTitle>
- <div class="lc-field-body">
- <RotateSetting
- :config="config"
- />
- </div>
- <SettingTitle>基础</SettingTitle>
- <div class="lc-field-body">
- <el-form-item
- label="字体大小"
- label-width="100px"
- >
- <el-input
- v-model="config.customize.fontSize"
- placeholder="请输入字体大小"
- clearable
- >
- <template slot="append">
- px
- </template>
- </el-input>
- </el-form-item>
- <el-form-item
- label="数字权重"
- label-width="100px"
- >
- <el-input-number
- v-model="config.customize.fontWeight"
- class="bs-el-input-number"
- placeholder="请输入数字权重"
- :min="0"
- :step="100"
- />
- </el-form-item>
- <el-form-item
- label="数字间距"
- label-width="100px"
- >
- <el-input-number
- v-model="config.customize.letterSpacing"
- class="bs-el-input-number"
- placeholder="请输入数字间距"
- />
- </el-form-item>
- <el-form-item
- label="字体类型"
- label-width="100px"
- >
- <el-select
- v-model="config.customize.fontFamily"
- popper-class="bs-el-select"
- class="bs-el-select"
- >
- <el-option
- v-for="item in fontFamilyList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- label="数字对齐方式"
- label-width="100px"
- >
- <el-select
- v-model="config.customize.align"
- popper-class="bs-el-select"
- class="bs-el-select"
- >
- <el-option
- v-for="item in alignList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- <!-- 是否开启语音播报 -->
- <el-form-item
- label="千分位分隔"
- label-width="100px"
- >
- <el-switch
- v-model="config.customize.thousands"
- :active-value="true"
- :inactive-value="false"
- class="bs-el-switch"
- />
- </el-form-item>
- <TextGradient
- v-model="config.customize.color"
- label="数字"
- />
- </div>
- </el-form>
- </div>
- </template>
- <script>
- import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
- import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
- import TextGradient from 'data-room-ui/BigScreenDesign/RightSetting/TextGradient/index'
- import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
- import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
- import fontList from 'data-room-ui/js/utils/fontList'
- import { mapMutations } from 'vuex'
- export default {
- name: 'NumberSetting',
- components: {
- TextGradient,
- PosWhSetting,
- SettingTitle,
- BorderSetting,
- RotateSetting
- },
- data () {
- return {
- fontFamilyList: fontList,
- alignList: [{
- label: '靠左',
- value: 'left'
- },
- {
- label: '居中',
- value: 'center'
- },
- {
- label: '靠右',
- value: 'right'
- }],
- rules: {
- title: [
- { required: true, message: '请输入标题', trigger: 'blur' }
- ]
- }
- }
- },
- computed: {
- config: {
- get () {
- return this.$store.state.bigScreen.activeItemConfig
- },
- set (val) {
- this.$store.state.bigScreen.activeItemConfig = val
- }
- }
- },
- watch: {
- },
- mounted () {},
- methods: {
- ...mapMutations({
- updateDataset: 'bigScreen/updateDataset',
- updateComputedDatas: 'bigScreen/updateComputedDatas'
- })
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "../../assets/style/settingWrap.scss";
- .bs-setting-wrap{
- padding-top: 16px;
- }
- .lc-field-body {
- padding: 12px 16px;
- }
- </style>
|