refactor: 文件命名标准化

This commit is contained in:
wangjiahao 2022-11-07 15:39:50 +08:00
parent 343b3c82f1
commit a9d2e201ab
30 changed files with 195 additions and 160 deletions

View File

@ -24,7 +24,7 @@
>
<el-tooltip :content="item.tooltip">
<span style="float: left;">
<i :class="item.icon" />
<i :class="item.icon"/>
</span>
</el-tooltip>
</el-radio-button>
@ -47,7 +47,7 @@
:value="item.value"
>
<span style="float: left;">
<i :class="item.icon" />
<i :class="item.icon"/>
</span>
<span style="float: right; color: #8492a6; font-size: 12px">{{ item.label }}</span>
</el-option>
@ -233,7 +233,7 @@
@click="goColor"
/>
</el-tooltip>
<div :style="letterDivColor" />
<div :style="letterDivColor"/>
<el-color-picker
ref="colorPicker"
v-model="styleInfo.color"
@ -255,7 +255,7 @@
@click="goBoardColor"
/>
</el-tooltip>
<div :style="boardDivColor" />
<div :style="boardDivColor"/>
<el-color-picker
ref="boardColorPicker"
v-model="styleInfo.borderColor"
@ -278,7 +278,7 @@
@click="goBackgroundColor"
/>
</el-tooltip>
<div :style="backgroundDivColor" />
<div :style="backgroundDivColor"/>
<el-color-picker
ref="backgroundColorPicker"
v-model="styleInfo.backgroundColor"
@ -294,7 +294,7 @@
style="width: 20px;float: left;margin-top: 2px;margin-left: 2px;"
>
<el-tooltip :content="$t('panel.video_info')">
<VideoLinks :link-info="curComponent.videoLinks" />
<VideoLinks :link-info="curComponent.videoLinks"/>
</el-tooltip>
</div>
@ -303,7 +303,7 @@
style="width: 20px;float: left;margin-top: 2px;margin-left: 2px;"
>
<el-tooltip :content="$t('panel.stream_media_info')">
<StreamMediaLinks :link-info="curComponent.streamMediaLinks" />
<StreamMediaLinks :link-info="curComponent.streamMediaLinks"/>
</el-tooltip>
</div>
@ -312,7 +312,7 @@
style="width: 20px;float: left;margin-top: 2px;margin-left: 2px;"
>
<el-tooltip :content="$t('panel.web_addr')">
<FrameLinks :link-info="curComponent.frameLinks" />
<FrameLinks :link-info="curComponent.frameLinks"/>
</el-tooltip>
</div>
<div
@ -332,7 +332,7 @@
style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;"
>
<el-tooltip :content="$t('panel.tab_inner_style')">
<tab-style :style-info="styleInfo" />
<tab-style :style-info="styleInfo"/>
</el-tooltip>
</div>
@ -415,7 +415,7 @@ import StreamMediaLinks from '@/components/canvas/components/editor/StreamMediaL
import DateFormat from '@/components/canvas/components/editor/DateFormat'
import { COLOR_PANEL } from '@/views/chart/chart/chart'
import FrameLinks from '@/components/canvas/components/editor/FrameLinks'
import TitlePosition from '@/components/widget/DeWidget/TitlePosition'
import TitlePosition from '@/components/widget/deWidget/TitlePosition'
export default {
components: { TitlePosition, FrameLinks, DateFormat, VideoLinks, StreamMediaLinks },

View File

@ -120,7 +120,7 @@
:canvas-id="canvasId"
/>
<!-- 右击菜单 -->
<ContextMenu />
<ContextMenu/>
<!-- 对齐标线 -->
<span
@ -1790,7 +1790,6 @@ export default {
}
.edit {
/*outline: 1px solid gainsboro;*/
.component {
outline: none;
width: 100%;

View File

@ -114,7 +114,7 @@
v-if="(curComponent&&curComponent.auxiliaryMatrix&&(curComponent.optStatus.dragging||curComponent.optStatus.resizing))||(dragComponentInfo)"
/>
<!-- 右击菜单 -->
<ContextMenu />
<ContextMenu/>
<!-- 标线 (临时去掉标线 吸附等功能)-->
<!-- <MarkLine />-->
<!-- 选中区域 -->
@ -1855,7 +1855,6 @@ export default {
}
.edit {
/*outline: 1px solid gainsboro;*/
.component {
outline: none;
width: 100%;

View File

@ -59,7 +59,8 @@
</template>
<script>
import inputStyleMixin from '@/components/widget/DeWidget/inputStyleMixin'
import inputStyleMixin from '@/components/widget/deWidget/inputStyleMixin'
export default {
name: 'DeOutWidget',
mixins: [inputStyleMixin],
@ -70,7 +71,8 @@ export default {
},
element: {
type: Object,
default: () => {}
default: () => {
}
},
inDraw: {
type: Boolean,
@ -194,77 +196,90 @@ export default {
</script>
<style lang="scss" scoped>
.my-container {
position: relative;
overflow: auto !important;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
.ccondition-main {
position: absolute;
overflow: auto;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
display: flex;
}
.condition-title {
height: 2em;
cursor: -webkit-grab;
line-height: 2em;
white-space: nowrap;
}
.span-container {
overflow: hidden auto;
position: relative;
padding: 0 5px;
}
.condition-content {
overflow: auto hidden;
letter-spacing: 0px !important;
.my-container {
position: relative;
overflow: auto !important;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
.ccondition-main {
position: absolute;
overflow: auto;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
display: flex;
}
.condition-title {
height: 2em;
cursor: -webkit-grab;
line-height: 2em;
white-space: nowrap;
}
.span-container {
overflow: hidden auto;
position: relative;
padding: 0 5px;
}
.condition-content {
overflow: auto hidden;
letter-spacing: 0px !important;
width: 100%;
}
.condition-content-container {
position: relative;
display: table;
width: 100%;
height: 100%;
white-space: nowrap;
}
.first-element {
position: relative;
display: table-cell;
vertical-align: middle;
margin: 0px;
padding: 0px;
height: 100%;
}
.first-element-container {
width: calc(100% - 10px);
background: initial;
margin: 0 4px;
div {
width: 100%;
}
.condition-content-container {
position: relative;
display: table;
width: 100%;
height: 100%;
white-space: nowrap;
}
.first-element {
position: relative;
display: table-cell;
vertical-align: middle;
margin: 0px;
padding: 0px;
height: 100%;
}
.first-element-container {
width: calc(100% - 10px);
background: initial;
margin: 0 4px;
div {
width: 100%;
}
display: flex;
align-items: flex-end;
}
.first-element-grid-container {
background: #fff;
border: 1px solid #d7dae2;
top: 5px;
}
.condition-main-line {
height: 40px !important;
}
.condition-main {
display: flex;
padding-top: 5px;
}
.condition-content-default {
inset: 0px 0px 0px !important;
}
display: flex;
align-items: flex-end;
}
.first-element-grid-container {
background: #fff;
border: 1px solid #d7dae2;
top: 5px;
}
.condition-main-line {
height: 40px !important;
}
.condition-main {
display: flex;
padding-top: 5px;
}
.condition-content-default {
inset: 0px 0px 0px !important;
}
</style>

View File

@ -15,12 +15,15 @@
<p
v-if="startIndex === 0 && $attrs.multiple"
class="select-all"
><el-checkbox
v-model="selectAll"
v-customStyle="customStyle"
:indeterminate="isIndeterminate"
@change="selectAllChange"
>{{ $t('dataset.check_all') }}</el-checkbox></p>
>
<el-checkbox
v-model="selectAll"
v-customStyle="customStyle"
:indeterminate="isIndeterminate"
@change="selectAllChange"
>{{ $t('dataset.check_all') }}
</el-checkbox>
</p>
<el-option
v-for="item in options"
:key="item.id"
@ -34,9 +37,10 @@
</template>
<script>
import { handlerInputStyle } from '@/components/widget/DeWidget/serviceNameFn.js'
import { handlerInputStyle } from '@/components/widget/deWidget/serviceNameFn.js'
import { uuid } from 'vue-uuid'
export default {
name: 'ElVisualSelect',
model: {
@ -51,7 +55,8 @@ export default {
},
customStyle: {
type: Object,
default: () => {}
default: () => {
}
},
list: {
type: Array,
@ -234,26 +239,31 @@ export default {
overflow-x: hidden;
content-visibility: auto;
}
::-webkit-scrollbar {
background: #ffffff !important;
}
.el-select-height {
width: 1px;
position: absolute;
top: 0;
left: 0;
}
.el-select-dropdown__list {
width: 100%;
position: absolute;
top: 0;
left: 0;
}
.el-select-dropdown__wrap {
height: 0;
}
}
.select-all {
padding: 10px 20px 0 20px;
}
padding: 10px 20px 0 20px;
}
</style>

View File

@ -23,14 +23,10 @@
</template>
<script>
import {
ApplicationContext
} from '@/utils/ApplicationContext'
import {
timeSection
} from '@/utils'
import { ApplicationContext } from '@/utils/ApplicationContext'
import { timeSection } from '@/utils'
import bus from '@/utils/bus'
import customInput from '@/components/widget/DeWidget/customInput'
import customInput from '@/components/widget/deWidget/customInput'
export default {
mixins: [customInput],
@ -279,13 +275,13 @@ export default {
const defaultV = this.element.options.value === null ? '' : this.element.options.value.toString()
if (this.element.options.attrs.type === 'daterange') {
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV ===
'[object Object]') {
'[object Object]') {
return []
}
return defaultV.split(',').map(item => parseFloat(item))
} else {
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV ===
'[object Object]') {
'[object Object]') {
return null
}
return parseFloat(defaultV.split(',')[0])
@ -298,7 +294,7 @@ export default {
<style lang="scss">
.coustom-date-picker {
border:1px solid var(--BrDateColor, #dfe4ed) !important;
border: 1px solid var(--BrDateColor, #dfe4ed) !important;
background: var(--BgDateColor, #FFFFFF) !important;
.el-picker-panel__sidebar {
@ -323,7 +319,7 @@ export default {
.el-date-range-picker__time-picker-wrap,
.el-date-picker__time-header {
.el-input__inner {
border:1px solid var(--BrDateColor, #dfe4ed) !important;
border: 1px solid var(--BrDateColor, #dfe4ed) !important;
color: var(--DateColor, #606266);
background: var(--BgDateColor, #FFFFFF) !important;
}
@ -332,7 +328,7 @@ export default {
.el-picker-panel__link-btn:nth-child(2) {
color: var(--DateColor, #409eff);
background: var(--BgDateColor, #FFFFFF) !important;
border:1px solid var(--BrDateColor, #dfe4ed) !important;
border: 1px solid var(--BrDateColor, #dfe4ed) !important;
}
.popper__arrow,
@ -340,13 +336,13 @@ export default {
display: none !important;
}
.el-date-range-picker__content.is-left{
border-right:1px solid var(--BrDateColor, #e6ebf5) !important;
.el-date-range-picker__content.is-left {
border-right: 1px solid var(--BrDateColor, #e6ebf5) !important;
}
.el-date-table th,
.el-date-picker__header--bordered {
border-bottom:1px solid var(--BrDateColor, #e6ebf5) !important;
border-bottom: 1px solid var(--BrDateColor, #e6ebf5) !important;
}
.el-date-table td.in-range:not(.end-date):not(.start-date) div span {
@ -359,7 +355,7 @@ export default {
.el-month-table td .cell,
.el-year-table td .cell,
.el-picker-panel__icon-btn,
.el-date-picker__header-label{
.el-date-picker__header-label {
color: var(--DateColor, #606266);
}
@ -376,6 +372,7 @@ export default {
.el-time-spinner__wrapper {
width: 100% !important;
}
.el-scrollbar:nth-of-type(2) {
display: none;
}

View File

@ -45,8 +45,8 @@ import { linkMultFieldValues, multFieldValues } from '@/api/dataset/dataset'
import bus from '@/utils/bus'
import { isSameVueObj } from '@/utils'
import { getLinkToken, getToken } from '@/utils/auth'
import customInput from '@/components/widget/DeWidget/customInput'
import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
import customInput from '@/components/widget/deWidget/customInput'
import { textSelectWidget } from '@/components/widget/deWidget/serviceNameFn.js'
export default {
components: { ElVisualSelect },

View File

@ -24,7 +24,8 @@
v-model="checkAll"
:indeterminate="isIndeterminate"
@change="handleCheckAllChange"
/>{{ $t('commons.all') }}
/>
{{ $t('commons.all') }}
<el-checkbox-group
v-model="value"
@ -34,7 +35,8 @@
<el-checkbox
:key="item.id"
:label="item.id"
>{{ item.id }}</el-checkbox>
>{{ item.id }}
</el-checkbox>
<br :key="item.id">
</template>
</el-checkbox-group>
@ -66,11 +68,11 @@
</template>
<script>
import { multFieldValues, linkMultFieldValues } from '@/api/dataset/dataset'
import { linkMultFieldValues, multFieldValues } from '@/api/dataset/dataset'
import { getLinkToken, getToken } from '@/utils/auth'
import bus from '@/utils/bus'
import { isSameVueObj } from '@/utils'
import { attrsMap, styleAttrs, textSelectGridWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
import { attrsMap, styleAttrs, textSelectGridWidget } from '@/components/widget/deWidget/serviceNameFn.js'
export default {
props: {
@ -171,7 +173,7 @@ export default {
param.userId = this.panelInfo.proxy
}
this.element.options.attrs.fieldId &&
this.element.options.attrs.fieldId.length > 0 &&
this.element.options.attrs.fieldId.length > 0 &&
method(param).then(res => {
this.data = this.optionData(res.data)
this.changeInputStyle()
@ -214,7 +216,7 @@ export default {
param.userId = this.panelInfo.proxy
}
this.element.options.attrs.fieldId &&
this.element.options.attrs.fieldId.length > 0 &&
this.element.options.attrs.fieldId.length > 0 &&
method(param).then(res => {
this.data = this.optionData(res.data)
this.changeInputStyle()
@ -288,7 +290,10 @@ export default {
if (!token && linkToken) {
method = linkMultFieldValues
}
method({ fieldIds: this.element.options.attrs.fieldId.split(','), sort: this.element.options.attrs.sort }).then(res => {
method({
fieldIds: this.element.options.attrs.fieldId.split(','),
sort: this.element.options.attrs.sort
}).then(res => {
this.data = this.optionData(res.data)
this.changeInputStyle()
if (this.element.options.attrs.multiple) {
@ -336,10 +341,14 @@ export default {
fillValueDerfault() {
const defaultV = this.element.options.value === null ? '' : this.element.options.value.toString()
if (this.element.options.attrs.multiple) {
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') { return [] }
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') {
return []
}
return defaultV.split(',')
} else {
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') { return null }
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') {
return null
}
return defaultV.split(',')[0]
}
},
@ -377,44 +386,44 @@ export default {
</script>
<style lang="scss" scoped>
.de-select-grid-search {
::v-deep input {
border-radius: 0px;
.de-select-grid-search {
::v-deep input {
border-radius: 0px;
}
.el-input {
display: block !important;
}
}
.de-select-grid-class {
height: 100%;
.list {
overflow-y: auto;
width: 100%;
position: relative;
bottom: 0;
height: calc(100% - 40px);
text-align: left;
}
}
.radio-group-container>.el-radio-group>label {
.el-input {
display: block !important;
margin: 10px !important;
}
}
.de-select-grid-class {
height: 100%;
.list {
overflow-y: auto;
width: 100%;
position: relative;
bottom: 0;
height: calc(100% - 40px);
text-align: left;
}
}
.radio-group-container > .el-radio-group > label {
display: block !important;
margin: 10px !important;
}
.checkbox-group-container {
label.el-checkbox {
margin: 10px 10px 0 10px !important;
}
.checkbox-group-container {
label.el-checkbox {
margin: 10px 10px 0 10px !important;
}
.el-checkbox-group>label {
margin: 10px 10px 0 10px !important;
}
.el-checkbox-group > label {
margin: 10px 10px 0 10px !important;
}
}
</style>

View File

@ -29,8 +29,8 @@ import bus from '@/utils/bus'
import { isSameVueObj } from '@/utils'
import { getLinkToken, getToken } from '@/utils/auth'
import ElTreeSelect from '@/components/elTreeSelect'
import customInput from '@/components/widget/DeWidget/customInput'
import { textSelectWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
import customInput from '@/components/widget/deWidget/customInput'
import { textSelectWidget } from '@/components/widget/deWidget/serviceNameFn.js'
export default {
components: { ElTreeSelect },

View File

@ -1,5 +1,5 @@
// 通过控制css变量控制过滤组件弹框样式 de-select-grid除外
import { attrsMap, styleAttrs } from '@/components/widget/DeWidget/serviceNameFn.js'
import { attrsMap, styleAttrs } from '@/components/widget/deWidget/serviceNameFn.js'
export default {
data() {

View File

@ -1,5 +1,11 @@
// 通过控制 js 控制过滤组件输入框样式 如需额外处理 声明组件serviceName同名函数处理
import { timeDateRangeWidget, textInputWidget, attrsMap, styleAttrs } from '@/components/widget/DeWidget/serviceNameFn.js'
import {
attrsMap,
styleAttrs,
textInputWidget,
timeDateRangeWidget
} from '@/components/widget/deWidget/serviceNameFn.js'
export default {
data() {
return {