setting.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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="lc-field-body">
  42. <RotateSetting
  43. :config="config"
  44. />
  45. </div>
  46. <SettingTitle>基础</SettingTitle>
  47. <div class="setting-wrap">
  48. <el-form-item
  49. label="字体大小"
  50. label-width="100px"
  51. >
  52. <el-input-number
  53. v-model="config.customize.fontSize"
  54. class="bs-el-input-number"
  55. placeholder="请输入字体大小"
  56. :min="0"
  57. />
  58. </el-form-item>
  59. <el-form-item
  60. label="字体权重"
  61. label-width="100px"
  62. >
  63. <el-input-number
  64. v-model="config.customize.fontWeight"
  65. class="bs-el-input-number"
  66. placeholder="请输入字体权重"
  67. />
  68. </el-form-item>
  69. <el-form-item
  70. label="字体颜色"
  71. label-width="100px"
  72. >
  73. <el-color-picker
  74. v-model="config.customize.color"
  75. class="bs-el-color-picker"
  76. popper-class="bs-el-color-picker"
  77. />
  78. </el-form-item>
  79. <el-form-item
  80. label="时间格式"
  81. label-width="100px"
  82. >
  83. <el-select
  84. v-model="config.dateFormat"
  85. placeholder="请选择时间格式"
  86. clearable
  87. >
  88. <el-option
  89. v-for="item in dateFormatList"
  90. :key="item.value"
  91. :label="item.label"
  92. :value="item.value"
  93. />
  94. </el-select>
  95. </el-form-item>
  96. </div>
  97. </el-form>
  98. </div>
  99. </template>
  100. <script>
  101. import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
  102. import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
  103. import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
  104. import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
  105. export default {
  106. name: 'CurrentTimeSetting',
  107. components: {
  108. PosWhSetting,
  109. SettingTitle,
  110. BorderSetting,
  111. RotateSetting
  112. },
  113. data () {
  114. return {
  115. activeName: 'data',
  116. dateFormatList: [
  117. { label: '年-月-日 时:分:秒', value: 'YYYY-MM-DD HH:mm:ss' },
  118. { label: '年/月/日 时/分/秒', value: 'YYYY/MM/DD HH/mm/ss' }
  119. ],
  120. HeaderFontSizeList: [
  121. { label: '正常', value: 16 },
  122. { label: '较小', value: 14 },
  123. { label: '较大', value: 30 }
  124. ],
  125. numberFormatList: [
  126. { label: '原始数据', value: 'value' },
  127. { label: '千位分隔', value: 'kilobit' }
  128. ]
  129. }
  130. },
  131. computed: {
  132. config: {
  133. get () {
  134. return this.$store.state.bigScreen.activeItemConfig
  135. },
  136. set (val) {
  137. this.$store.state.bigScreen.activeItemConfig = val
  138. }
  139. }
  140. },
  141. watch: {
  142. },
  143. mounted () {},
  144. methods: {
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. @import "../../assets/style/settingWrap.scss";
  150. @import "../../assets/style/bsTheme.scss";
  151. .setting-wrap{
  152. padding: 12px 16px;
  153. }
  154. </style>