@bdsoft/element 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BdElement.js +23111 -0
- package/package.json +2 -1
- package/global/index.ts +0 -6
- package/global/register-properties.ts +0 -10
- package/index.html +0 -13
- package/package-form/core/components/formCreate.js +0 -274
- package/package-form/core/components/fragment.js +0 -12
- package/package-form/core/factory/context.js +0 -257
- package/package-form/core/factory/creator.js +0 -63
- package/package-form/core/factory/maker.js +0 -17
- package/package-form/core/factory/manager.js +0 -79
- package/package-form/core/factory/node.js +0 -85
- package/package-form/core/factory/parser.js +0 -28
- package/package-form/core/frame/api.js +0 -599
- package/package-form/core/frame/attrs.js +0 -12
- package/package-form/core/frame/dataDriver.js +0 -76
- package/package-form/core/frame/fetch.js +0 -119
- package/package-form/core/frame/formCreate.js +0 -274
- package/package-form/core/frame/index.js +0 -760
- package/package-form/core/frame/provider.js +0 -288
- package/package-form/core/frame/util.js +0 -274
- package/package-form/core/handler/context.js +0 -380
- package/package-form/core/handler/effect.js +0 -122
- package/package-form/core/handler/index.js +0 -111
- package/package-form/core/handler/inject.js +0 -145
- package/package-form/core/handler/input.js +0 -197
- package/package-form/core/handler/lifecycle.js +0 -43
- package/package-form/core/handler/loader.js +0 -373
- package/package-form/core/handler/page.js +0 -46
- package/package-form/core/handler/render.js +0 -29
- package/package-form/core/index.js +0 -12
- package/package-form/core/package.json +0 -15
- package/package-form/core/parser/html.js +0 -17
- package/package-form/core/render/cache.js +0 -47
- package/package-form/core/render/index.js +0 -31
- package/package-form/core/render/render.js +0 -393
- package/package-form/element-form/components/checkbox/package.json +0 -17
- package/package-form/element-form/components/checkbox/src/component.jsx +0 -110
- package/package-form/element-form/components/checkbox/src/index.js +0 -3
- package/package-form/element-form/components/frame/package.json +0 -17
- package/package-form/element-form/components/frame/src/IconCircleClose.vue +0 -14
- package/package-form/element-form/components/frame/src/IconDelete.vue +0 -12
- package/package-form/element-form/components/frame/src/IconDocument.vue +0 -12
- package/package-form/element-form/components/frame/src/IconFolderOpened.vue +0 -12
- package/package-form/element-form/components/frame/src/IconView.vue +0 -12
- package/package-form/element-form/components/frame/src/component.jsx +0 -349
- package/package-form/element-form/components/frame/src/index.js +0 -3
- package/package-form/element-form/components/frame/src/style.css +0 -66
- package/package-form/element-form/components/group/package.json +0 -17
- package/package-form/element-form/components/group/src/component.jsx +0 -314
- package/package-form/element-form/components/group/src/index.js +0 -3
- package/package-form/element-form/components/group/src/style.css +0 -125
- package/package-form/element-form/components/index.js +0 -22
- package/package-form/element-form/components/radio/package.json +0 -17
- package/package-form/element-form/components/radio/src/component.jsx +0 -101
- package/package-form/element-form/components/radio/src/index.js +0 -3
- package/package-form/element-form/components/select/package.json +0 -17
- package/package-form/element-form/components/select/src/component.jsx +0 -52
- package/package-form/element-form/components/select/src/index.js +0 -3
- package/package-form/element-form/components/subform/package.json +0 -14
- package/package-form/element-form/components/subform/src/component.jsx +0 -76
- package/package-form/element-form/components/subform/src/index.js +0 -3
- package/package-form/element-form/components/tree/package.json +0 -17
- package/package-form/element-form/components/tree/src/component.jsx +0 -62
- package/package-form/element-form/components/tree/src/index.js +0 -3
- package/package-form/element-form/components/upload/package.json +0 -17
- package/package-form/element-form/components/upload/src/IconUpload.vue +0 -12
- package/package-form/element-form/components/upload/src/component.jsx +0 -129
- package/package-form/element-form/components/upload/src/index.js +0 -3
- package/package-form/element-form/components/upload/src/style.css +0 -11
- package/package-form/element-form/index.js +0 -8
- package/package-form/element-form/package.json +0 -16
- package/package-form/element-form/src/components/icon/IconWarning.vue +0 -12
- package/package-form/element-form/src/components/index.js +0 -22
- package/package-form/element-form/src/core/alias.js +0 -34
- package/package-form/element-form/src/core/api.js +0 -208
- package/package-form/element-form/src/core/config.js +0 -62
- package/package-form/element-form/src/core/index.js +0 -60
- package/package-form/element-form/src/core/maker.js +0 -76
- package/package-form/element-form/src/core/manager.js +0 -315
- package/package-form/element-form/src/core/provider.js +0 -79
- package/package-form/element-form/src/parsers/datePicker.js +0 -31
- package/package-form/element-form/src/parsers/hidden.js +0 -12
- package/package-form/element-form/src/parsers/index.js +0 -17
- package/package-form/element-form/src/parsers/input.js +0 -21
- package/package-form/element-form/src/parsers/row.js +0 -10
- package/package-form/element-form/src/parsers/select.js +0 -15
- package/package-form/element-form/src/parsers/slider.js +0 -21
- package/package-form/element-form/src/parsers/timePicker.js +0 -17
- package/package-form/element-form/src/style/index.css +0 -52
- package/src/App.vue +0 -28
- package/src/assets/css/element.scss +0 -196
- package/src/assets/css/layout.scss +0 -215
- package/src/assets/css/tailwind.scss +0 -67
- package/src/assets/images/banner.gif +0 -0
- package/src/assets/images/banner.png +0 -0
- package/src/assets/images/bg1.svg +0 -22
- package/src/assets/images/bg2.png +0 -0
- package/src/assets/images/ff.png +0 -0
- package/src/assets/images/home-file1.png +0 -0
- package/src/assets/images/ky.png +0 -0
- package/src/assets/images/menu/add.png +0 -0
- package/src/assets/images/menu/del.png +0 -0
- package/src/assets/images/menu/down.png +0 -0
- package/src/assets/images/menu/dr.png +0 -0
- package/src/assets/images/menu/edit.png +0 -0
- package/src/assets/images/menu/kx.png +0 -0
- package/src/assets/images/menu/mb.png +0 -0
- package/src/assets/images/menu/pz.png +0 -0
- package/src/assets/images/menu/save.png +0 -0
- package/src/assets/images/menu/sj.png +0 -0
- package/src/assets/images/menu/sjk.png +0 -0
- package/src/assets/images/menu/up.png +0 -0
- package/src/assets/images/po-i.png +0 -0
- package/src/assets/images/po1-i1.png +0 -0
- package/src/assets/images/po1-i2.png +0 -0
- package/src/assets/images/po1-i3.png +0 -0
- package/src/assets/images/po1-i4.png +0 -0
- package/src/assets/images/po1-i5.png +0 -0
- package/src/assets/images/po1-i6.png +0 -0
- package/src/assets/images/po1-i7.png +0 -0
- package/src/assets/images/po1-i8.png +0 -0
- package/src/assets/images/po2-i1.png +0 -0
- package/src/assets/images/po2-i2.png +0 -0
- package/src/assets/images/po3-i1.png +0 -0
- package/src/assets/images/po4-i1.png +0 -0
- package/src/assets/images/po5-i1.png +0 -0
- package/src/assets/images/po6-i1.png +0 -0
- package/src/assets/images/po6-i2.png +0 -0
- package/src/assets/images/po7-i1.png +0 -0
- package/src/assets/images/tj1.png +0 -0
- package/src/assets/images/tj2.png +0 -0
- package/src/assets/images/tj3.png +0 -0
- package/src/components/3dcloudwords/index.js +0 -346
- package/src/components/3dcloudwords/index.vue +0 -99
- package/src/components/3dcloudwords/readme.md +0 -66
- package/src/components/badge/index.js +0 -167
- package/src/components/badge/index.scss +0 -166
- package/src/components/badge/index.vue +0 -98
- package/src/components/badge/readme.md +0 -18
- package/src/components/basic/Finish.vue +0 -107
- package/src/components/basic/button.vue +0 -19
- package/src/components/basic/readme.md +0 -7
- package/src/components/button/index.vue +0 -48
- package/src/components/button/readme.md +0 -62
- package/src/components/carousel/index.vue +0 -104
- package/src/components/carousel/readme.md +0 -12
- package/src/components/chartconfig/index.vue +0 -141
- package/src/components/chartconfig/readme.md +0 -25
- package/src/components/contextMenu/hookContxtMenu.js +0 -41
- package/src/components/contextMenu/index.vue +0 -245
- package/src/components/contextMenu/readme.md +0 -55
- package/src/components/contextMenu/useElementBounding.js +0 -40
- package/src/components/countup/countUp.js +0 -196
- package/src/components/countup/index.vue +0 -114
- package/src/components/countup/readme.md +0 -9
- package/src/components/empty/assets/build.png +0 -0
- package/src/components/empty/assets/emptybg.gif +0 -0
- package/src/components/empty/assets/emptybg.png +0 -0
- package/src/components/empty/assets/emptybg2.jpg +0 -0
- package/src/components/empty/assets/emptybg3.jpg +0 -0
- package/src/components/empty/assets/wuxiao.png +0 -0
- package/src/components/empty/assets/wuxiao.webp +0 -0
- package/src/components/empty/building.vue +0 -117
- package/src/components/empty/empty.vue +0 -120
- package/src/components/empty/index.js +0 -12
- package/src/components/empty/invalid.vue +0 -56
- package/src/components/error/Error.vue +0 -79
- package/src/components/error/readme.md +0 -20
- package/src/components/form/Form.vue +0 -84
- package/src/components/form/FormItem.vue +0 -143
- package/src/components/form/data.js +0 -52
- package/src/components/form/readme.md +0 -69
- package/src/components/layout/banner.vue +0 -412
- package/src/components/layout/bar.vue +0 -43
- package/src/components/layout/layout1.vue +0 -60
- package/src/components/layout/layout2.vue +0 -134
- package/src/components/layout/layout3.vue +0 -107
- package/src/components/layout/layout4.vue +0 -66
- package/src/components/layout/nav.vue +0 -333
- package/src/components/layout/readme.md +0 -61
- package/src/components/loading/index.vue +0 -122
- package/src/components/loading/readme.md +0 -6
- package/src/components/notice/NoticeList.vue +0 -198
- package/src/components/notice/NoticeListPaging.vue +0 -281
- package/src/components/notice/NoticeView.vue +0 -92
- package/src/components/notice/readme.md +0 -1
- package/src/components/pagination/index.vue +0 -100
- package/src/components/pagination/readme.md +0 -19
- package/src/components/pagination/scroll-to.js +0 -51
- package/src/components/progress/bar.vue +0 -72
- package/src/components/progress/progress.vue +0 -58
- package/src/components/screenfull/index.js +0 -3
- package/src/components/screenfull/index.vue +0 -65
- package/src/components/screenfull/package.json +0 -15
- package/src/components/screenfull/readme.md +0 -6
- package/src/components/statisticalCount/index.vue +0 -80
- package/src/components/statisticalCount/readme.md +0 -21
- package/src/components/username/index.vue +0 -79
- package/src/components/username/readme.md +0 -22
- package/src/components/username//346/225/210/346/236/234/345/233/276.png +0 -0
- package/src/index.js +0 -88
- package/src/utils/index.js +0 -32
- package/src/xm_components/HeadSearch/hook/hookSearch.js +0 -96
- package/src/xm_components/HeadSearch/index.vue +0 -206
- package/src/xm_components/HeadSearch/readme.md +0 -12
- package/src/xm_components/HeadSearch//346/220/234/347/264/242/345/210/227/350/241/250.png +0 -0
- package/src/xm_components/Milestone/index.vue +0 -213
- package/src/xm_components/Milestone/readme.md +0 -15
- package/src/xm_components/MultiStatisticalCard/image.png +0 -0
- package/src/xm_components/MultiStatisticalCard/index.vue +0 -114
- package/src/xm_components/MultiStatisticalCard/readme.md +0 -29
- package/src/xm_components/StatisticalCard/image.png +0 -0
- package/src/xm_components/StatisticalCard/index.vue +0 -196
- package/src/xm_components/StatisticalCard/readme.md +0 -41
- package/src/xm_components/readme.md +0 -1
- package/utils/coms/load.jsx +0 -10
- package/utils/func.js +0 -32
- package/utils/hookDialog.js +0 -38
- package/utils/hookPage.js +0 -49
- package/utils/index.js +0 -5
- package/utils/lib/console.js +0 -39
- package/utils/lib/debounce.js +0 -19
- package/utils/lib/deepextend.js +0 -51
- package/utils/lib/deepset.js +0 -14
- package/utils/lib/extend.js +0 -28
- package/utils/lib/index.js +0 -13
- package/utils/lib/json.js +0 -90
- package/utils/lib/mergeprops.js +0 -62
- package/utils/lib/mitt.js +0 -43
- package/utils/lib/modify.js +0 -8
- package/utils/lib/slot.js +0 -19
- package/utils/lib/toarray.js +0 -5
- package/utils/lib/tocase.js +0 -11
- package/utils/lib/todate.js +0 -10
- package/utils/lib/toline.js +0 -10
- package/utils/lib/tostring.js +0 -7
- package/utils/lib/type.js +0 -45
- package/utils/lib/unique.js +0 -6
- package/utils/message.js +0 -164
- package/utils/package.json +0 -16
- package/utils/type.js +0 -45
- package/vite.config.js +0 -56
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { ref, reactive, onMounted, nextTick } from 'vue'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {*} prefix 前缀,解决项目冲突
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export default function useSearrch(prefix = '') {
|
|
9
|
-
const searchkeysArr = ref([])
|
|
10
|
-
const search_drop = ref(false)
|
|
11
|
-
const keyName = ref('')
|
|
12
|
-
/**
|
|
13
|
-
* 获取缓存搜索数据
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
const getStorageKeys = () => {
|
|
17
|
-
var keys = localStorage.getItem('searchRerportkeys')
|
|
18
|
-
|
|
19
|
-
if (keys && keys !== 'undefined' && keys !== 'null') {
|
|
20
|
-
keys = JSON.parse(keys)
|
|
21
|
-
return keys
|
|
22
|
-
}
|
|
23
|
-
return []
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 鼠标foucs
|
|
28
|
-
*/
|
|
29
|
-
const focusfns = (type) => {
|
|
30
|
-
searchkeysArr.value = getStorageKeys()
|
|
31
|
-
|
|
32
|
-
if (type === 1 && searchkeysArr.value.length > 0) {
|
|
33
|
-
search_drop.value = true
|
|
34
|
-
} else {
|
|
35
|
-
setTimeout(function () {
|
|
36
|
-
nextTick(function () {
|
|
37
|
-
search_drop.value = false
|
|
38
|
-
})
|
|
39
|
-
}, 200)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 保存搜索记录
|
|
45
|
-
* @param {*} key
|
|
46
|
-
*/
|
|
47
|
-
const setSearchKeys = (key) => {
|
|
48
|
-
if (!key || key == null || key == '' || key == 'null') return
|
|
49
|
-
let keys = localStorage.getItem('searchRerportkeys')
|
|
50
|
-
|
|
51
|
-
if (keys && keys !== 'undefined' && keys !== '{}') {
|
|
52
|
-
keys = JSON.parse(keys)
|
|
53
|
-
|
|
54
|
-
if (keys.length > 5 && keys instanceof Array) {
|
|
55
|
-
keys.splice(0, 1)
|
|
56
|
-
}
|
|
57
|
-
keys.push(key)
|
|
58
|
-
|
|
59
|
-
let keys2 = [...new Set(keys)]
|
|
60
|
-
|
|
61
|
-
localStorage.setItem('searchRerportkeys', JSON.stringify(keys2))
|
|
62
|
-
} else {
|
|
63
|
-
keys = []
|
|
64
|
-
keys.push(key)
|
|
65
|
-
localStorage.setItem('searchRerportkeys', JSON.stringify(keys))
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// 在hookSearch.js中添加
|
|
70
|
-
const deleteSearchItem = (index) => {
|
|
71
|
-
debugger
|
|
72
|
-
// 删除数组中对应索引的记录
|
|
73
|
-
searchkeysArr.value.splice(index, 1)
|
|
74
|
-
// 同步更新本地存储
|
|
75
|
-
localStorage.setItem('searchRerportkeys', JSON.stringify(searchkeysArr.value))
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* 赋值文本
|
|
80
|
-
* @param {*} val
|
|
81
|
-
*/
|
|
82
|
-
const setTxt = (val) => {
|
|
83
|
-
keyName.value = val
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
keyName,
|
|
88
|
-
searchkeysArr,
|
|
89
|
-
search_drop,
|
|
90
|
-
focusfns,
|
|
91
|
-
setTxt,
|
|
92
|
-
deleteSearchItem,
|
|
93
|
-
setSearchKeys,
|
|
94
|
-
getStorageKeys
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 搜索组件 todo
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2021-06-08 09 时
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div class="search_warp">
|
|
11
|
-
<img :src="logoUrl" v-if="logoUrl"
|
|
12
|
-
style="width: 40px; height: 40px;margin-right: 5px; vertical-align: middle; cursor: pointer" alt=""
|
|
13
|
-
@click="gohome" />
|
|
14
|
-
<div class="ipt_search">
|
|
15
|
-
<el-input :placeholder="placeholderTxt" v-model="keyName" clearable @focus="focusfns(1)" @blur="focusfns(-1)"
|
|
16
|
-
@keyup.enter="debouncedClick">
|
|
17
|
-
<template #append>
|
|
18
|
-
<el-button class="SearchBtn" @click="debouncedClick" type="primary" icon="Search">搜索</el-button>
|
|
19
|
-
</template>
|
|
20
|
-
</el-input>
|
|
21
|
-
<!-- 搜索记录 -->
|
|
22
|
-
<div v-show="search_drop" class="search_drop" v-if="searchkeysArr && searchkeysArr != ''">
|
|
23
|
-
<ul>
|
|
24
|
-
<li v-for="(item, index) in searchkeysArr" :key="index">
|
|
25
|
-
<span class="search-item-text" @click="setTxt(item)">{{ item }}</span>
|
|
26
|
-
<el-icon class="delete-btn" @click.stop="deleteSearchItem(index)">
|
|
27
|
-
<Delete />
|
|
28
|
-
</el-icon>
|
|
29
|
-
</li>
|
|
30
|
-
</ul>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
</div>
|
|
35
|
-
<!-- 搜索记录 -->
|
|
36
|
-
|
|
37
|
-
<div v-if="groupData && groupData != ''" class="ipt_search_tip">
|
|
38
|
-
搜索结果数:
|
|
39
|
-
<span v-show="props.ismodule">{{ Object.keys(groupData).length }}个系统, </span>
|
|
40
|
-
{{ searchNum }} 个相关页面模块
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
<script setup>
|
|
44
|
-
import { ref, reactive, computed, onMounted } from 'vue';
|
|
45
|
-
import { getUrlKey, debounce } from '../../../utils/func.js';
|
|
46
|
-
|
|
47
|
-
const emits = defineEmits(['getSearchList']);
|
|
48
|
-
//
|
|
49
|
-
import useSearrch from './hook/hookSearch.js';
|
|
50
|
-
// hook
|
|
51
|
-
const { keyName, searchkeysArr, search_drop, getStorageKeys, focusfns, setSearchKeys, deleteSearchItem, setTxt } = useSearrch();
|
|
52
|
-
|
|
53
|
-
const props = defineProps({
|
|
54
|
-
ismodule: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
// logo url
|
|
59
|
-
logoUrl: {
|
|
60
|
-
type: String,
|
|
61
|
-
// default: 'http://123.129.65.205:18012/RabbitDocService/Doc/ptIcon/View?filePath=20250911/006.png'
|
|
62
|
-
},
|
|
63
|
-
placeholderTxt: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: '请输入搜索内容'
|
|
66
|
-
},
|
|
67
|
-
groupData: {
|
|
68
|
-
type: Object
|
|
69
|
-
},
|
|
70
|
-
searchNum: {
|
|
71
|
-
type: Number
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
// 跳转到首页搜索
|
|
75
|
-
const gohome = () => {
|
|
76
|
-
// router.push('/');
|
|
77
|
-
};
|
|
78
|
-
onMounted(() => {
|
|
79
|
-
// 是否有限取浏览器中的值 isQueryFirst==>f
|
|
80
|
-
let keymc = getUrlKey('txtKey') || '';
|
|
81
|
-
|
|
82
|
-
setTxt(keymc);
|
|
83
|
-
// getModuleList(true);
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 触发上层搜索 keyName
|
|
88
|
-
* 处理防抖
|
|
89
|
-
*/
|
|
90
|
-
const getModuleList = (isfirst = false) => {
|
|
91
|
-
focusfns(-1);
|
|
92
|
-
// setCookieKey('searchKey', keyName.value);
|
|
93
|
-
setSearchKeys(keyName.value || '');
|
|
94
|
-
emits('getSearchList', keyName.value, isfirst);
|
|
95
|
-
};
|
|
96
|
-
// 防抖处理
|
|
97
|
-
const debouncedClick = debounce(getModuleList, 500);
|
|
98
|
-
|
|
99
|
-
defineExpose({
|
|
100
|
-
setTxt,
|
|
101
|
-
debouncedClick
|
|
102
|
-
});
|
|
103
|
-
</script>
|
|
104
|
-
<style lang="scss" scoped>
|
|
105
|
-
.search_warp {
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
justify-content: center;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.ipt_search {
|
|
112
|
-
width: 700px;
|
|
113
|
-
height: 40px;
|
|
114
|
-
position: relative;
|
|
115
|
-
|
|
116
|
-
// 样式重写
|
|
117
|
-
:deep(.el-input__inner) {
|
|
118
|
-
height: 40px !important;
|
|
119
|
-
outline: none;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
:deep(.el-input-group__append) {
|
|
123
|
-
background: linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
|
|
124
|
-
// border: 1px solid #ffffff !important;
|
|
125
|
-
color: #fff;
|
|
126
|
-
height: 40px;
|
|
127
|
-
margin-top: 1px;
|
|
128
|
-
box-shadow: none;
|
|
129
|
-
font-size: 17px;
|
|
130
|
-
border-radius: 0 8px 8px 0;
|
|
131
|
-
border: 0;
|
|
132
|
-
outline-width: 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:deep(.el-button [class*='el-icon'] + span) {
|
|
136
|
-
vertical-align: 3px;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.ipt_search_tip {
|
|
141
|
-
margin-left: 50px;
|
|
142
|
-
color: #ccc;
|
|
143
|
-
font-size: 13px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.search_drop {
|
|
147
|
-
position: absolute;
|
|
148
|
-
z-index: 99999;
|
|
149
|
-
width: 100%;
|
|
150
|
-
left: 2px;
|
|
151
|
-
max-width: 605px;
|
|
152
|
-
border: solid 1px #e4e7ed;
|
|
153
|
-
border-radius: 4px;
|
|
154
|
-
background-color: #fff;
|
|
155
|
-
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
156
|
-
box-sizing: border-box;
|
|
157
|
-
|
|
158
|
-
ul {
|
|
159
|
-
list-style: none;
|
|
160
|
-
padding: 6px 0;
|
|
161
|
-
margin: 0;
|
|
162
|
-
box-sizing: border-box;
|
|
163
|
-
text-align: left;
|
|
164
|
-
|
|
165
|
-
li {
|
|
166
|
-
font-size: 14px;
|
|
167
|
-
padding: 0 20px;
|
|
168
|
-
position: relative;
|
|
169
|
-
white-space: nowrap;
|
|
170
|
-
overflow: hidden;
|
|
171
|
-
text-overflow: ellipsis;
|
|
172
|
-
color: #606266;
|
|
173
|
-
height: 34px;
|
|
174
|
-
line-height: 34px;
|
|
175
|
-
box-sizing: border-box;
|
|
176
|
-
cursor: pointer;
|
|
177
|
-
position: relative;
|
|
178
|
-
padding-right: 50px; // 给删除按钮留出空间
|
|
179
|
-
|
|
180
|
-
.search-item-text {
|
|
181
|
-
display: inline-block;
|
|
182
|
-
width: calc(100% - 40px);
|
|
183
|
-
overflow: hidden;
|
|
184
|
-
text-overflow: ellipsis;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.delete-btn {
|
|
188
|
-
position: absolute;
|
|
189
|
-
right: 5px;
|
|
190
|
-
top: 50%;
|
|
191
|
-
transform: translateY(-50%);
|
|
192
|
-
width: 30px;
|
|
193
|
-
height: 24px;
|
|
194
|
-
padding: 0;
|
|
195
|
-
background: transparent;
|
|
196
|
-
color: #909399;
|
|
197
|
-
|
|
198
|
-
&:hover {
|
|
199
|
-
color: #f56c6c;
|
|
200
|
-
background: transparent;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
</style>
|
|
Binary file
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 里程碑组件
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2025-10-30
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div class="milestone-container">
|
|
11
|
-
<div class="milestone-track " v-if="milestones && milestones != ''">
|
|
12
|
-
<div v-for="(item, index) in milestones" :key="index" class="milestone-item"
|
|
13
|
-
:class="{ 'odd-item': index % 2 === 0, 'even-item': index % 2 !== 0 }" :style="{
|
|
14
|
-
left: `${calculatePosition(item.rq)}%`,
|
|
15
|
-
opacity: index === milestones.length - 1 && hideLast ? '0' : '1'
|
|
16
|
-
}">
|
|
17
|
-
<template v-if="index % 2 === 0">
|
|
18
|
-
<!-- 信息面板 -->
|
|
19
|
-
<div class="milestone-info">
|
|
20
|
-
<!-- <div class="milestone-date">{{ dayjs(item.rq).format('YYYY-MM-DD') }}</div> -->
|
|
21
|
-
<div class="milestone-name">{{ item.name }}</div>
|
|
22
|
-
</div>
|
|
23
|
-
<!-- 竖线连接 -->
|
|
24
|
-
<div class="milestone-line"></div>
|
|
25
|
-
<!-- 原点 -->
|
|
26
|
-
<div class="milestone-dot"></div>
|
|
27
|
-
</template>
|
|
28
|
-
<template v-else>
|
|
29
|
-
<!-- 原点 -->
|
|
30
|
-
<div class="milestone-dot"></div>
|
|
31
|
-
<!-- 竖线连接 -->
|
|
32
|
-
<div class="milestone-line"></div>
|
|
33
|
-
<!-- 信息面板 -->
|
|
34
|
-
<div class="milestone-info">
|
|
35
|
-
<div class="milestone-name">{{ item.name }}</div>
|
|
36
|
-
<!-- <div class="milestone-date">{{ dayjs(item.rq).format('YYYY-MM-DD') }}</div> -->
|
|
37
|
-
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="with-arrow"></div>
|
|
42
|
-
</div>
|
|
43
|
-
<BdEmpty v-else imgType="svg" :imgSize="50" des="没有查询到相关数据">
|
|
44
|
-
|
|
45
|
-
</BdEmpty>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<script setup>
|
|
50
|
-
import { ref, computed } from 'vue';
|
|
51
|
-
// import { dayjs } from '../../../index.js'
|
|
52
|
-
import BdEmpty from '../../components/empty/empty.vue'
|
|
53
|
-
// 接收父组件传递的里程碑数据 const bgColor = ref('#0ea5e9') // 0ea5e9
|
|
54
|
-
const props = defineProps({
|
|
55
|
-
// 标注色
|
|
56
|
-
bgColor: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: 'radial-gradient(circle, rgba(78, 171, 237, 1) 0%, rgb(81, 151, 244) 51%, rgba(78, 171, 237, 1) 100%)'
|
|
59
|
-
},
|
|
60
|
-
milestones: {
|
|
61
|
-
type: Array,
|
|
62
|
-
required: true,
|
|
63
|
-
default: () => []
|
|
64
|
-
},
|
|
65
|
-
hideLast: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: true
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// 计算是否显示终点箭头
|
|
72
|
-
const showArrow = computed(() => !props.hideLast);
|
|
73
|
-
|
|
74
|
-
// 计算每个节点的位置(基于起始日期的时间占比)
|
|
75
|
-
const calculatePosition = (startDate) => {
|
|
76
|
-
if (props.milestones.length === 0) return 0;
|
|
77
|
-
const firstDate = new Date(props.milestones[0].rq);
|
|
78
|
-
const lastDate = new Date(props.milestones[props.milestones.length - 1].rq);
|
|
79
|
-
const currentDate = new Date(startDate);
|
|
80
|
-
const totalDays = (lastDate - firstDate) / (1000 * 60 * 60 * 24);
|
|
81
|
-
const daysPassed = (currentDate - firstDate) / (1000 * 60 * 60 * 24);
|
|
82
|
-
return (daysPassed / totalDays) * 100;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
</script>
|
|
86
|
-
|
|
87
|
-
<style lang="scss" scoped>
|
|
88
|
-
$bgColor: v-bind(bgColor);
|
|
89
|
-
|
|
90
|
-
.milestone-container {
|
|
91
|
-
width: 99%;
|
|
92
|
-
// padding: 100px 0;
|
|
93
|
-
/* 增加上下内边距给上下节点留出空间 */
|
|
94
|
-
position: relative;
|
|
95
|
-
display: flex;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.milestone-track {
|
|
99
|
-
width: calc(100% - 100px);
|
|
100
|
-
height: 14px;
|
|
101
|
-
margin: 0 auto;
|
|
102
|
-
background-color: #e5e7eb;
|
|
103
|
-
position: relative;
|
|
104
|
-
// 新增:为轨道右侧留出箭头空间
|
|
105
|
-
padding-right: 16px;
|
|
106
|
-
margin-right: calc(50px - 16px);
|
|
107
|
-
margin-top: 100px;
|
|
108
|
-
|
|
109
|
-
.with-arrow {
|
|
110
|
-
position: absolute;
|
|
111
|
-
right: -16px; // 定位到轨道最右侧
|
|
112
|
-
top: 0;
|
|
113
|
-
height: 1px;
|
|
114
|
-
// width: 16px;
|
|
115
|
-
|
|
116
|
-
top: 50%;
|
|
117
|
-
// left: 0;
|
|
118
|
-
transform: translateY(-50%); // 垂直居中
|
|
119
|
-
// 使用边框实现实心三角形箭头
|
|
120
|
-
border-top: 13px solid transparent;
|
|
121
|
-
border-bottom: 13px solid transparent;
|
|
122
|
-
border-left: 22px solid#e5e7eb;
|
|
123
|
-
/* 箭头颜色与主题色一致 */
|
|
124
|
-
z-index: 999;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.milestone-item {
|
|
129
|
-
position: absolute;
|
|
130
|
-
// background-color: rgba(255, 0, 0, 0.285);
|
|
131
|
-
left: 0;
|
|
132
|
-
top: 0;
|
|
133
|
-
transform: translateX(-50%);
|
|
134
|
-
/* 只水平居中,垂直位置由odd/even控制 */
|
|
135
|
-
display: flex;
|
|
136
|
-
flex-direction: column;
|
|
137
|
-
align-items: center;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// 基数项(0,2,4...)在轨道上方
|
|
141
|
-
.odd-item {
|
|
142
|
-
top: -44px;
|
|
143
|
-
|
|
144
|
-
.milestone-info {
|
|
145
|
-
transform: translateY(calc(-100% - 1px));
|
|
146
|
-
/* 信息面板在原点上方 */
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// 偶数项(1,3,5...)在轨道下方
|
|
151
|
-
.even-item {
|
|
152
|
-
top: -3px;
|
|
153
|
-
|
|
154
|
-
.milestone-info {
|
|
155
|
-
transform: translateY(calc(100% + 2px));
|
|
156
|
-
/* 信息面板在原点下方 */
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// 竖线连接
|
|
161
|
-
.milestone-line {
|
|
162
|
-
width: 2px;
|
|
163
|
-
background: $bgColor;
|
|
164
|
-
position: absolute;
|
|
165
|
-
bottom: 0;
|
|
166
|
-
z-index: 1;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// 基数项竖线向上
|
|
170
|
-
.odd-item .milestone-line {
|
|
171
|
-
height: 50px;
|
|
172
|
-
bottom: 10px;
|
|
173
|
-
/* 从原点中心向上延伸 */
|
|
174
|
-
// transform: translateY(100%);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// 偶数项竖线向下
|
|
178
|
-
.even-item .milestone-line {
|
|
179
|
-
height: 50px;
|
|
180
|
-
top: 10px;
|
|
181
|
-
/* 从原点中心向下延伸 */
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.milestone-dot {
|
|
185
|
-
width: 20px;
|
|
186
|
-
height: 20px;
|
|
187
|
-
border-radius: 50%;
|
|
188
|
-
// background-color: #1652f8 ; //
|
|
189
|
-
background: $bgColor;
|
|
190
|
-
position: relative;
|
|
191
|
-
z-index: 2;
|
|
192
|
-
/* 确保原点在轨道上方 */
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.milestone-info {
|
|
196
|
-
text-align: center;
|
|
197
|
-
white-space: nowrap;
|
|
198
|
-
/* 防止文本换行 */
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.milestone-date {
|
|
202
|
-
font-size: 16px;
|
|
203
|
-
font-weight: bold;
|
|
204
|
-
color: #333;
|
|
205
|
-
margin-bottom: 4px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.milestone-name {
|
|
209
|
-
font-size: 15px;
|
|
210
|
-
color: #666;
|
|
211
|
-
font-weight: bold;
|
|
212
|
-
}
|
|
213
|
-
</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
## 里程碑组件
|
|
2
|
-
|
|
3
|
-
注意:最后一个时间为虚拟时间不显示,进行定位使用
|
|
4
|
-
|
|
5
|
-
import {Milestone} from '@bdsoft/element'
|
|
6
|
-
<Milestone :milestones="milestoneData" :hide-last="true"></Milestone >
|
|
7
|
-
|
|
8
|
-
const milestoneData = [
|
|
9
|
-
{ rq: '2018-7-5', name: '规划设计' },
|
|
10
|
-
{ rq: '2018-7-10', name: '钻试' },
|
|
11
|
-
{ rq: '2018-8-5', name: '测井' },
|
|
12
|
-
{ rq: '2018-8-11', name: '完井' },
|
|
13
|
-
{ rq: '2018-9-1', name: '投产' },
|
|
14
|
-
{ rq: '2018-9-8', name: '' }
|
|
15
|
-
];
|
|
Binary file
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @FileDescription: 核心指标统计组件
|
|
3
|
-
* @Author: 李兵泉
|
|
4
|
-
* @Date: 2025-11-26
|
|
5
|
-
* @LastEditors: 最后更新作者
|
|
6
|
-
* @LastEditTime: 最后更新时间
|
|
7
|
-
-->
|
|
8
|
-
<template>
|
|
9
|
-
<el-row :gutter="0" class="basicwarp" :style="{ height: height }">
|
|
10
|
-
<!-- 动态渲染指标项 valueColor-->
|
|
11
|
-
<el-col
|
|
12
|
-
v-for="(item, index) in indicators"
|
|
13
|
-
:key="index"
|
|
14
|
-
@click="handleIndicatorClick(item, index)"
|
|
15
|
-
:md="item.colSize || 4"
|
|
16
|
-
class="text-center mb-4"
|
|
17
|
-
style="cursor: pointer"
|
|
18
|
-
>
|
|
19
|
-
<BdCountUp
|
|
20
|
-
class="infor-intro-num user-created-count"
|
|
21
|
-
:title="item.title"
|
|
22
|
-
:id-name="item.key"
|
|
23
|
-
|
|
24
|
-
:endVal="item.value"
|
|
25
|
-
countSize="30px"
|
|
26
|
-
:color="item.valueColor || ''"
|
|
27
|
-
:countWeight="700"
|
|
28
|
-
@click="handleItemClick(item, index)"
|
|
29
|
-
>
|
|
30
|
-
</BdCountUp>
|
|
31
|
-
</el-col>
|
|
32
|
-
</el-row>
|
|
33
|
-
</template>
|
|
34
|
-
<script setup>
|
|
35
|
-
import { ref, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
|
36
|
-
// import { useTransition } from '@vueuse/core'
|
|
37
|
-
import BdCountUp from '../../components/countup/index.vue'
|
|
38
|
-
|
|
39
|
-
// 定义自定义事件,用于向父组件传递点击信息
|
|
40
|
-
const emit = defineEmits(['indicator-click'])
|
|
41
|
-
// 存储每个指标的过渡值
|
|
42
|
-
const indicatorValues = ref({})
|
|
43
|
-
// 组件props定义
|
|
44
|
-
const props = defineProps({
|
|
45
|
-
height: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: '200px'
|
|
48
|
-
},
|
|
49
|
-
// 指标数据列表
|
|
50
|
-
indicators: {
|
|
51
|
-
type: Array,
|
|
52
|
-
default: () => []
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
const handleItemClick = (item, index) => {
|
|
57
|
-
// 触发自定义事件,传递点击的指标项数据和索引
|
|
58
|
-
if (item.onClick) {
|
|
59
|
-
item.onClick(item, index)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// 处理指标项点击事件
|
|
63
|
-
const handleIndicatorClick = (item, index) => {
|
|
64
|
-
// 触发自定义事件,传递点击的指标项数据和索引
|
|
65
|
-
emit('indicator-click', {
|
|
66
|
-
item, // 点击的指标项完整数据
|
|
67
|
-
index // 点击的指标项索引
|
|
68
|
-
})
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
watch(
|
|
72
|
-
() => props.indicators,
|
|
73
|
-
(newIndicators) => {
|
|
74
|
-
if (newIndicators && newIndicators.length > 0) {
|
|
75
|
-
// nextTick(() => {
|
|
76
|
-
// props.indicators.forEach(item => {
|
|
77
|
-
// indicatorValues.value[item.key] = useNumberTransition(ref(0), {
|
|
78
|
-
// duration: item.duration || 1000,
|
|
79
|
-
// })
|
|
80
|
-
// })
|
|
81
|
-
// });
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
immediate: true
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
// 初始化过渡动画
|
|
90
|
-
onMounted(() => {})
|
|
91
|
-
</script>
|
|
92
|
-
|
|
93
|
-
<style lang="scss" scoped>
|
|
94
|
-
.basicwarp {
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
height: 100%;
|
|
98
|
-
width: 100%;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:deep(.el-statistic__head) {
|
|
102
|
-
font-size: 17px;
|
|
103
|
-
text-align: center;
|
|
104
|
-
color: #737070 !important;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:deep(.el-statistic__content) {
|
|
108
|
-
font-size: 28px;
|
|
109
|
-
text-align: center;
|
|
110
|
-
font-weight: 600;
|
|
111
|
-
color: #737070 !important;
|
|
112
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
113
|
-
}
|
|
114
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
## 多指标显示组件
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<MultiStatisticalCard :indicators="indicators" ></MultiStatisticalCard>
|
|
5
|
-
</template>
|
|
6
|
-
<script setup>
|
|
7
|
-
import { ref, reactive, computed, watch, onMounted } from "vue";
|
|
8
|
-
import { MultiStatisticalCard } from '@bdsoft/element'
|
|
9
|
-
|
|
10
|
-
const indicators = [
|
|
11
|
-
{ key: 'oil_prod_cum', title: '累计油量(t)', valueColor:'red',value: 5656 },
|
|
12
|
-
{ key: 'bncl', title: '本年产量(t)', valueColor:'red',value: 16 },
|
|
13
|
-
{ key: 'sncl', title: '上年产量(t)',valueColor:'red', value: 116 },
|
|
14
|
-
// { key: 'sncl2', title: '上年产量(t)', valueColor:'red',value: 116 },
|
|
15
|
-
{ key: 'zrcl', title: '昨日产量(t)',valueColor:'red', value: 2346 }
|
|
16
|
-
]
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
### 触发点击事件
|
|
20
|
-
|
|
21
|
-
<MultiStatisticalCard :indicators="indicators" @indicator-click="handleClick"></MultiStatisticalCard>
|
|
22
|
-
|
|
23
|
-
<script setup>
|
|
24
|
-
const handleClick = (data) => {
|
|
25
|
-
console.log('点击了指标项:', data.item);
|
|
26
|
-
console.log('指标项索引:', data.index);
|
|
27
|
-
// 处理点击逻辑
|
|
28
|
-
};
|
|
29
|
-
</script>
|
|
Binary file
|