setting.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!--
  2. * @description: 指标组件案例设计面板
  3. * @Date: 2022-08-17 16:53:28
  4. * @Author: xingheng
  5. -->
  6. <template>
  7. <div>
  8. <el-form
  9. ref="form"
  10. label-width="100px"
  11. label-position="left"
  12. :model="config"
  13. class="bs-el-form"
  14. >
  15. <SettingTitle>标题</SettingTitle>
  16. <div class="setting-wrap">
  17. <el-form-item
  18. label="标题"
  19. label-width="100px"
  20. >
  21. <el-input
  22. v-model="config.title"
  23. placeholder="请输入标题"
  24. />
  25. </el-form-item>
  26. </div>
  27. <SettingTitle>位置</SettingTitle>
  28. <div class="setting-wrap">
  29. <PosWhSetting :config="config" />
  30. </div>
  31. <SettingTitle v-if="config.border">边框</SettingTitle>
  32. <div class="lc-field-body">
  33. <BorderSetting
  34. v-if="config.border"
  35. label-width="100px"
  36. :config="config.border"
  37. :bigTitle='config.title'
  38. />
  39. </div>
  40. <SettingTitle>基础</SettingTitle>
  41. <div class="setting-wrap">
  42. <el-form-item
  43. label="字体大小"
  44. label-width="100px"
  45. >
  46. <el-input-number
  47. v-model="config.customize.fontSize"
  48. class="bs-el-input-number"
  49. placeholder="请输入字体大小"
  50. :min="0"
  51. />
  52. </el-form-item>
  53. <el-form-item
  54. label="字体权重"
  55. label-width="100px"
  56. >
  57. <el-input-number
  58. v-model="config.customize.fontWeight"
  59. class="bs-el-input-number"
  60. placeholder="请输入字体权重"
  61. />
  62. </el-form-item>
  63. <el-form-item
  64. label="字体颜色"
  65. label-width="100px"
  66. >
  67. <el-color-picker
  68. v-model="config.customize.color"
  69. class="bs-el-color-picker"
  70. popper-class="bs-el-color-picker"
  71. />
  72. </el-form-item>
  73. <el-form-item
  74. label="时间格式"
  75. label-width="100px"
  76. >
  77. <el-select
  78. v-model="config.dateFormat"
  79. placeholder="请选择时间格式"
  80. clearable
  81. >
  82. <el-option
  83. v-for="item in dateFormatList"
  84. :key="item.value"
  85. :label="item.label"
  86. :value="item.value"
  87. />
  88. </el-select>
  89. </el-form-item>
  90. </div>
  91. </el-form>
  92. </div>
  93. </template>
  94. <script>
  95. import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
  96. import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
  97. import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
  98. export default {
  99. name: 'CurrentTimeSetting',
  100. components: {
  101. PosWhSetting,
  102. SettingTitle,
  103. BorderSetting
  104. },
  105. data () {
  106. return {
  107. activeName: 'data',
  108. dateFormatList: [
  109. { label: '年-月-日 时:分:秒', value: 'YYYY-MM-DD HH:mm:ss' },
  110. { label: '年/月/日 时/分/秒', value: 'YYYY/MM/DD HH/mm/ss' }
  111. ],
  112. HeaderFontSizeList: [
  113. { label: '正常', value: 16 },
  114. { label: '较小', value: 14 },
  115. { label: '较大', value: 30 }
  116. ],
  117. numberFormatList: [
  118. { label: '原始数据', value: 'value' },
  119. { label: '千位分隔', value: 'kilobit' }
  120. ]
  121. }
  122. },
  123. computed: {
  124. config: {
  125. get () {
  126. return this.$store.state.bigScreen.activeItemConfig
  127. },
  128. set (val) {
  129. this.$store.state.bigScreen.activeItemConfig = val
  130. }
  131. }
  132. },
  133. watch: {
  134. },
  135. mounted () {},
  136. methods: {
  137. }
  138. }
  139. </script>
  140. <style lang="scss" scoped>
  141. @import "../../assets/style/settingWrap.scss";
  142. @import "../../assets/style/bsTheme.scss";
  143. .setting-wrap{
  144. padding: 12px 16px;
  145. }
  146. </style>