hd-idevvue3 3.0.2 → 3.0.4
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/assets/index.9c127719.css +1 -0
- package/dist/hd-idevvue3.mjs +3521 -3305
- package/dist/hd-idevvue3.umd.js +29 -29
- package/npminstall-debug.log +2 -10
- package/package.json +4 -2
- package/pnpm-lock.yaml +37 -4
- package/src/App.vue +11 -15
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +9 -10
- package/src/demo/dropdemo.vue +42 -43
- package/src/demo/extsets.vue +140 -39
- package/src/demo/formedit.vue +157 -145
- package/src/demo/hightquery.vue +263 -66
- package/src/demo/inlineedit.vue +129 -35
- package/src/demo/selfdrop.vue +32 -15
- package/src/directive/el-dragDialog/drag.js +13 -13
- package/src/directive/el-dragDialog/index.js +13 -13
- package/src/errorLog.js +3 -3
- package/src/hdcom/BigGrid.js +54 -48
- package/src/hdcom/BillShow.vue +84 -63
- package/src/hdcom/BillUpload.vue +144 -86
- package/src/hdcom/BtnRight.vue +26 -23
- package/src/hdcom/ErrHint.vue +36 -24
- package/src/hdcom/ExtendColumn.vue +97 -90
- package/src/hdcom/ExtendCommon.js +24 -13
- package/src/hdcom/ExtendForm.vue +107 -80
- package/src/hdcom/FacePicUpload.vue +59 -50
- package/src/hdcom/FaceRecTest.vue +87 -77
- package/src/hdcom/GridChart.vue +175 -162
- package/src/hdcom/GridExField.vue +328 -234
- package/src/hdcom/GridShow.vue +89 -39
- package/src/hdcom/HdAside.vue +192 -145
- package/src/hdcom/HdBtn.vue +44 -32
- package/src/hdcom/HdButton.vue +141 -117
- package/src/hdcom/HdComFaceRec.vue +80 -32
- package/src/hdcom/HdComGrid.vue +329 -229
- package/src/hdcom/HdComQuery.vue +179 -90
- package/src/hdcom/HdComQueryDetail.vue +159 -115
- package/src/hdcom/HdComSortDetail.vue +136 -130
- package/src/hdcom/HdDatePicker.vue +32 -16
- package/src/hdcom/HdDialog.vue +62 -44
- package/src/hdcom/HdDrop.vue +163 -138
- package/src/hdcom/HdFileUpload.vue +138 -119
- package/src/hdcom/HdFilterBox.vue +62 -62
- package/src/hdcom/HdFooter.vue +152 -119
- package/src/hdcom/HdForm.vue +276 -203
- package/src/hdcom/HdFormBtn.vue +81 -39
- package/src/hdcom/HdFormItem.vue +14 -10
- package/src/hdcom/HdGrid.vue +353 -156
- package/src/hdcom/HdGridEditBtn.vue +34 -20
- package/src/hdcom/HdGridExt.js +78 -47
- package/src/hdcom/HdGridSel.vue +227 -193
- package/src/hdcom/HdHeader.vue +149 -117
- package/src/hdcom/HdHotKey.vue +70 -67
- package/src/hdcom/HdInputHint.vue +40 -36
- package/src/hdcom/HdMain.vue +25 -27
- package/src/hdcom/HdMessage.vue +180 -171
- package/src/hdcom/HdNum.vue +67 -57
- package/src/hdcom/HdPopSel.vue +46 -24
- package/src/hdcom/HdRightMenu.vue +63 -61
- package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
- package/src/hdcom/HdTableColumn.vue +156 -109
- package/src/hdcom/HdTempSave.vue +138 -116
- package/src/hdcom/HdTree.vue +89 -72
- package/src/hdcom/HdTreeTable/eval.js +8 -3
- package/src/hdcom/HdTreeTable/index.vue +229 -174
- package/src/hdcom/ImportExcel.vue +69 -34
- package/src/hdcom/index.js +39 -44
- package/src/idev.common.js +54 -47
- package/src/index.js +3 -6
- package/src/utils/HdQuery.js +25 -14
- package/src/utils/comutils.js +50 -28
- package/src/utils/gogocodeTransfer.js +59 -0
- package/src/utils/utils.js +30 -19
- package/src/vendor/Blob.js +187 -179
- package/src/vendor/Export2Excel.js +231 -220
- package/src/vendor/Export2Zip.js +25 -22
- package/src/views/layout/AppMain.vue +34 -32
- package/src/views/layout/HdLayout.vue +64 -52
- package/src/views/layout/header/ElasticSearch.vue +196 -159
- package/src/views/layout/header/HZRecorder.js +163 -135
- package/src/views/layout/header/HeaderSearch.vue +165 -145
- package/src/views/layout/header/Levelbar.vue +55 -49
- package/src/views/layout/header/MainHeader.vue +233 -189
- package/src/views/layout/header/Navbar.vue +74 -78
- package/src/views/layout/header/ScrollPane.vue +103 -81
- package/src/views/layout/header/TagsView.vue +169 -164
- package/src/views/layout/header/VocRec.vue +86 -78
- package/src/views/layout/header/changepswform.vue +98 -64
- package/src/views/layout/index.js +5 -7
- package/src/views/layout/menu/Hamburger.vue +63 -45
- package/src/views/layout/menu/HdMenu.vue +155 -118
- package/src/views/layout/menu/index.vue +21 -19
- package/src/views/privilege/commsg/commsg.vue +115 -41
- package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
- package/src/views/privilege/commsg/commsgRole.vue +180 -109
- package/src/views/privilege/commsg/commsgform.vue +125 -101
- package/src/views/privilege/commsg/commsgiframe.vue +30 -23
- package/src/views/privilege/commsg/commsgto.vue +163 -84
- package/src/views/privilege/commsg/commsgtoform.vue +64 -58
- package/src/views/privilege/commsg/commsgtrans.vue +187 -115
- package/src/views/privilege/exfield/comexcolumn.vue +133 -43
- package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
- package/src/views/privilege/exfield/comexfield.vue +15 -17
- package/src/views/privilege/exfield/comexfieldform.vue +71 -53
- package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
- package/src/views/privilege/index.js +19 -20
- package/src/views/privilege/menu/comMenu.vue +49 -41
- package/src/views/privilege/menu/menu.vue +166 -49
- package/src/views/privilege/menu/menuinfo.vue +41 -34
- package/src/views/privilege/menu/rolelist.vue +78 -33
- package/src/views/privilege/menu/userlist.vue +76 -33
- package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
- package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
- package/src/views/privilege/orgDept/authOrgn.vue +157 -65
- package/src/views/privilege/orgDept/authorgnform.vue +50 -38
- package/src/views/privilege/orgDept/orgDept.vue +38 -37
- package/src/views/privilege/orgDept/orgTree.vue +99 -88
- package/src/views/privilege/orgDept/orgnselect.vue +132 -111
- package/src/views/privilege/personDept/authuser.vue +197 -91
- package/src/views/privilege/personDept/authuserform.vue +123 -71
- package/src/views/privilege/personDept/facerec.vue +128 -83
- package/src/views/privilege/personDept/orgncascader.vue +134 -115
- package/src/views/privilege/personDept/personDept.vue +9 -7
- package/src/views/privilege/quartz/comquartzjob.vue +123 -38
- package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
- package/src/views/privilege/quartz/comquartzlog.vue +116 -32
- package/src/views/privilege/role/btnRole.vue +123 -67
- package/src/views/privilege/role/menuRole.vue +65 -45
- package/src/views/privilege/role/orgnRole.vue +63 -41
- package/src/views/privilege/role/role.vue +26 -9
- package/src/views/privilege/role/rolelist.vue +114 -45
- package/src/views/privilege/role/roleselect.vue +34 -17
- package/src/views/privilege/search/comsearch.vue +164 -73
- package/src/views/privilege/search/menu.vue +38 -22
- package/src/views/privilege/syscode/syscode.vue +157 -69
- package/src/views/privilege/syscode/sysfield.vue +96 -43
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
- package/src/views/privilege/syslog/menulog.vue +38 -22
- package/src/views/privilege/syslog/syslog.vue +145 -78
- package/src/views/privilege/syslog/syslogconfig.vue +91 -24
- package/src/views/privilege/syslog/syslogform.vue +45 -43
- package/src/views/privilege/syslog/syslogframe.vue +26 -26
- package/src/views/privilege/userRole/userRole.vue +187 -89
- package/vite.config.js +7 -0
- package/dist/assets/index.774ef40e.css +0 -1
- package/src/views/privilege.zip +0 -0
package/src/hdcom/HdTempSave.vue
CHANGED
|
@@ -1,103 +1,127 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
<el-dropdown @command="handleCommand">
|
|
4
|
+
<span class="el-dropdown-link">
|
|
5
|
+
<a @click="save">{{ $t('存盘') }}</a>
|
|
6
|
+
<el-icon class="el-icon--right"><el-icon-arrow-down /></el-icon
|
|
7
|
+
></span>
|
|
8
|
+
<el-dropdown-menu
|
|
9
|
+
slot="dropdown"
|
|
10
|
+
style="max-height: 400px; overflow: auto"
|
|
11
|
+
>
|
|
12
|
+
<el-dropdown-item :command="lastAuto" v-if="lastAuto">{{
|
|
13
|
+
lastAuto.title
|
|
14
|
+
}}</el-dropdown-item>
|
|
15
|
+
<el-dropdown-item divided></el-dropdown-item>
|
|
16
|
+
<el-dropdown-item
|
|
17
|
+
v-for="(item, key, index) in allTemp"
|
|
18
|
+
:key="item.id"
|
|
19
|
+
:command="item"
|
|
20
|
+
>
|
|
21
|
+
<div v-if="!item.isEdit">
|
|
22
|
+
{{ item.title }} <el-icon><el-icon-edit /></el-icon>
|
|
23
|
+
<el-icon><el-icon-delete /></el-icon>
|
|
24
|
+
</div>
|
|
25
|
+
</el-dropdown-item>
|
|
26
|
+
</el-dropdown-menu>
|
|
27
|
+
</el-dropdown>
|
|
28
|
+
</span>
|
|
20
29
|
</template>
|
|
21
30
|
|
|
22
31
|
<script>
|
|
32
|
+
import {
|
|
33
|
+
ArrowDown as ElIconArrowDown,
|
|
34
|
+
Edit as ElIconEdit,
|
|
35
|
+
Delete as ElIconDelete,
|
|
36
|
+
} from '@element-plus/icons'
|
|
37
|
+
export default {
|
|
38
|
+
components: {
|
|
39
|
+
ElIconArrowDown,
|
|
40
|
+
ElIconEdit,
|
|
41
|
+
ElIconDelete,
|
|
42
|
+
},
|
|
43
|
+
name: 'HdTempSave',
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
allTemp: [],
|
|
47
|
+
lastAuto: {},
|
|
48
|
+
timeInterval: null,
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
inheritAttrs: false,
|
|
23
52
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
53
|
+
* Props
|
|
54
|
+
* @prop {Function} saveFun 备份时的存储
|
|
55
|
+
* @prop {event} reload 还原时的触发事件
|
|
56
|
+
* @prop {boolean} auto true会自动保存(5秒),弹窗必须加v-if 来关闭定时
|
|
26
57
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
58
|
+
props: ['saveFun', 'auto'],
|
|
59
|
+
mounted() {
|
|
60
|
+
this.find()
|
|
61
|
+
this.findAuto()
|
|
62
|
+
},
|
|
63
|
+
beforeDestroy() {
|
|
64
|
+
console.info('close')
|
|
65
|
+
this.close()
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
save() {
|
|
69
|
+
let ts = new Date().getTime()
|
|
70
|
+
//id是唯一标识,disName是当前页面区分
|
|
71
|
+
let obj = {
|
|
72
|
+
id: ts,
|
|
73
|
+
disName: this.$route.name,
|
|
74
|
+
title: new Date().format('MM-dd HH:mm'),
|
|
75
|
+
result: this.saveFun(),
|
|
34
76
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
*/
|
|
43
|
-
props: ['saveFun', 'auto'],
|
|
44
|
-
mounted() {
|
|
77
|
+
let tempStore = localStorage.getItem('HdTempStore')
|
|
78
|
+
let storeObj = []
|
|
79
|
+
if (tempStore) {
|
|
80
|
+
storeObj = JSON.parse(tempStore)
|
|
81
|
+
}
|
|
82
|
+
storeObj.unshift(obj)
|
|
83
|
+
localStorage.setItem('HdTempStore', JSON.stringify(storeObj))
|
|
45
84
|
this.find()
|
|
46
|
-
this.findAuto()
|
|
47
85
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
86
|
+
saveForAuto() {
|
|
87
|
+
let ts = new Date().getTime()
|
|
88
|
+
//id是唯一标识,disName是当前页面区分
|
|
89
|
+
let obj = {
|
|
90
|
+
id: ts,
|
|
91
|
+
disName: this.$route.name,
|
|
92
|
+
title: this.$t('自动存盘') + new Date().format('MM-dd HH:mm'),
|
|
93
|
+
result: this.saveFun(),
|
|
94
|
+
}
|
|
95
|
+
localStorage.setItem(
|
|
96
|
+
'HdTempAutoStore' + this.$route.name,
|
|
97
|
+
JSON.stringify(obj)
|
|
98
|
+
)
|
|
51
99
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
localStorage.setItem('HdTempAutoStore' + this.$route.name, JSON.stringify(obj))
|
|
76
|
-
},
|
|
77
|
-
find() {
|
|
78
|
-
let tempStore = localStorage.getItem('HdTempStore')
|
|
79
|
-
if (!tempStore) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
let storeObj = JSON.parse(tempStore)
|
|
83
|
-
this.allTemp = storeObj.filter(v => v.disName == this.$route.name)
|
|
84
|
-
},
|
|
85
|
-
findAuto() {
|
|
86
|
-
let tempStore = localStorage.getItem('HdTempAutoStore' + this.$route.name)
|
|
87
|
-
this.lastAuto = JSON.parse(tempStore)
|
|
88
|
-
},
|
|
89
|
-
remove(item) {
|
|
90
|
-
let tempStore = localStorage.getItem('HdTempStore')
|
|
91
|
-
let storeObj = JSON.parse(tempStore)
|
|
92
|
-
let newSt = storeObj.filter(v => v.id != item.id)
|
|
93
|
-
localStorage.setItem('HdTempStore', JSON.stringify(newSt))
|
|
94
|
-
this.find()
|
|
95
|
-
},
|
|
96
|
-
rename(item) {
|
|
97
|
-
this.$prompt(this.$t('请输入名称'), this.$t('提示'), {}).then(({value}) => {
|
|
100
|
+
find() {
|
|
101
|
+
let tempStore = localStorage.getItem('HdTempStore')
|
|
102
|
+
if (!tempStore) {
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
let storeObj = JSON.parse(tempStore)
|
|
106
|
+
this.allTemp = storeObj.filter((v) => v.disName == this.$route.name)
|
|
107
|
+
},
|
|
108
|
+
findAuto() {
|
|
109
|
+
let tempStore = localStorage.getItem('HdTempAutoStore' + this.$route.name)
|
|
110
|
+
this.lastAuto = JSON.parse(tempStore)
|
|
111
|
+
},
|
|
112
|
+
remove(item) {
|
|
113
|
+
let tempStore = localStorage.getItem('HdTempStore')
|
|
114
|
+
let storeObj = JSON.parse(tempStore)
|
|
115
|
+
let newSt = storeObj.filter((v) => v.id != item.id)
|
|
116
|
+
localStorage.setItem('HdTempStore', JSON.stringify(newSt))
|
|
117
|
+
this.find()
|
|
118
|
+
},
|
|
119
|
+
rename(item) {
|
|
120
|
+
this.$prompt(this.$t('请输入名称'), this.$t('提示'), {})
|
|
121
|
+
.then(({ value }) => {
|
|
98
122
|
let tempStore = localStorage.getItem('HdTempStore')
|
|
99
123
|
let storeObj = JSON.parse(tempStore)
|
|
100
|
-
let newSt = storeObj.map(v => {
|
|
124
|
+
let newSt = storeObj.map((v) => {
|
|
101
125
|
if (v.id == item.id) {
|
|
102
126
|
v.title = value
|
|
103
127
|
}
|
|
@@ -105,36 +129,34 @@
|
|
|
105
129
|
})
|
|
106
130
|
localStorage.setItem('HdTempStore', JSON.stringify(newSt))
|
|
107
131
|
this.find()
|
|
108
|
-
}).catch(() => {
|
|
109
132
|
})
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
close() {
|
|
117
|
-
if (this.timeInterval)
|
|
118
|
-
clearInterval(this.timeInterval)
|
|
119
|
-
this.timeInterval = null
|
|
120
|
-
},
|
|
121
|
-
handleCommand(cmd) {
|
|
122
|
-
if (cmd && cmd.result)
|
|
123
|
-
this.$emit('reload', cmd.result)
|
|
124
|
-
}
|
|
133
|
+
.catch(() => {})
|
|
134
|
+
},
|
|
135
|
+
autoSave() {
|
|
136
|
+
this.timeInterval = setInterval(() => {
|
|
137
|
+
this.saveForAuto()
|
|
138
|
+
}, 5000)
|
|
125
139
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
close() {
|
|
141
|
+
if (this.timeInterval) clearInterval(this.timeInterval)
|
|
142
|
+
this.timeInterval = null
|
|
143
|
+
},
|
|
144
|
+
handleCommand(cmd) {
|
|
145
|
+
if (cmd && cmd.result) this.$emit('reload', cmd.result)
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
watch: {
|
|
149
|
+
auto: {
|
|
150
|
+
//定时执行
|
|
151
|
+
immediate: true,
|
|
152
|
+
handler(newVal) {
|
|
153
|
+
if (newVal) {
|
|
154
|
+
this.autoSave()
|
|
155
|
+
} else {
|
|
156
|
+
this.close()
|
|
135
157
|
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
}
|
|
140
162
|
</script>
|
package/src/hdcom/HdTree.vue
CHANGED
|
@@ -1,86 +1,103 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div style="height: 100%;overflow: auto">
|
|
3
|
-
<el-tree
|
|
4
|
-
|
|
2
|
+
<div style="height: 100%; overflow: auto">
|
|
3
|
+
<el-tree
|
|
4
|
+
:expand-on-click-node="false"
|
|
5
|
+
:renderContent="myrenderContent"
|
|
6
|
+
highlight-current
|
|
7
|
+
node-key="id"
|
|
8
|
+
ref="eltree"
|
|
9
|
+
v-bind="$attrs"
|
|
10
|
+
v-on="$listeners"
|
|
11
|
+
>
|
|
5
12
|
</el-tree>
|
|
6
13
|
</div>
|
|
7
14
|
</template>
|
|
8
15
|
|
|
9
16
|
<script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* HdTree 对 ElTree 封装了一些样式 idev8请使用EzTreeBean,能控制到展示与伸缩 可参考orgTree和orgnselect(下拉树)
|
|
19
|
+
* @module HdNum
|
|
20
|
+
*/
|
|
21
|
+
export default {
|
|
22
|
+
name: 'HdTree',
|
|
23
|
+
data() {
|
|
24
|
+
return {}
|
|
25
|
+
},
|
|
26
|
+
inheritAttrs: false,
|
|
27
|
+
updated() {
|
|
28
|
+
const treeData = this.$attrs.data
|
|
29
|
+
const rs = []
|
|
30
|
+
this.initChecked(treeData, rs)
|
|
31
|
+
if (rs) {
|
|
32
|
+
this.$refs.eltree.setCheckedNodes(rs)
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
getCheckedNodes(onlyLeaf = true) {
|
|
37
|
+
return this.$refs.eltree.getCheckedNodes(onlyLeaf)
|
|
18
38
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const rs = []
|
|
23
|
-
this.initChecked(treeData, rs)
|
|
24
|
-
if (rs) {
|
|
25
|
-
this.$refs.eltree.setCheckedNodes(rs)
|
|
39
|
+
initChecked(treeData, rs) {
|
|
40
|
+
if (!treeData) {
|
|
41
|
+
return false
|
|
26
42
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
initChecked(treeData, rs) {
|
|
33
|
-
if (!treeData) {
|
|
34
|
-
return false
|
|
35
|
-
}
|
|
36
|
-
for (let i = 0; i < treeData.length; i++) {
|
|
37
|
-
const one = treeData[i]
|
|
38
|
-
if (one.checked == 'Y') {
|
|
39
|
-
rs.push(one)
|
|
40
|
-
}
|
|
41
|
-
if (one.children) {
|
|
42
|
-
this.initChecked(one.children, rs)
|
|
43
|
-
}
|
|
43
|
+
for (let i = 0; i < treeData.length; i++) {
|
|
44
|
+
const one = treeData[i]
|
|
45
|
+
if (one.checked == 'Y') {
|
|
46
|
+
rs.push(one)
|
|
44
47
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (data.state == 'open') {
|
|
48
|
-
node.expanded = true
|
|
48
|
+
if (one.children) {
|
|
49
|
+
this.initChecked(one.children, rs)
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
myrenderContent(h, { node, data, store }) {
|
|
54
|
+
if (data.state == 'open') {
|
|
55
|
+
node.expanded = true
|
|
56
|
+
}
|
|
57
|
+
// if (data.checked == 'Y') {
|
|
58
|
+
//
|
|
59
|
+
// //node.checked = true
|
|
60
|
+
// // let par = node.parent
|
|
61
|
+
// // while (par) {
|
|
62
|
+
// // if (par.checked) {
|
|
63
|
+
// // break;
|
|
64
|
+
// // }
|
|
65
|
+
// // par.indeterminate = true
|
|
66
|
+
// // par = par.parent
|
|
67
|
+
// // }
|
|
68
|
+
// }
|
|
69
|
+
return h(
|
|
70
|
+
'span',
|
|
71
|
+
{
|
|
72
|
+
class: {
|
|
73
|
+
'el-tree-node__label': true,
|
|
65
74
|
},
|
|
66
75
|
style: {
|
|
67
|
-
|
|
68
|
-
'padding-right': '10px'
|
|
69
|
-
}
|
|
70
|
-
}, [h('i', {
|
|
71
|
-
'class': {
|
|
72
|
-
'el-icon-star-off': true
|
|
76
|
+
width: 'auto',
|
|
77
|
+
'padding-right': '10px',
|
|
73
78
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
},
|
|
80
|
+
[
|
|
81
|
+
h('i', {
|
|
82
|
+
class: {
|
|
83
|
+
'el-icon-star-off': true,
|
|
84
|
+
},
|
|
85
|
+
style: {
|
|
86
|
+
paddingRight: '4px',
|
|
87
|
+
},
|
|
88
|
+
}),
|
|
89
|
+
h(
|
|
90
|
+
'span',
|
|
91
|
+
{
|
|
92
|
+
class: {
|
|
93
|
+
'el-tree-node__label': true,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
data.text
|
|
97
|
+
),
|
|
98
|
+
]
|
|
99
|
+
)
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
}
|
|
86
103
|
</script>
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
* @Date: 2017-10-12 12:06:49
|
|
4
4
|
*/
|
|
5
5
|
'use strict'
|
|
6
|
-
import {createApp} from 'vue'
|
|
6
|
+
import { createApp } from 'vue'
|
|
7
7
|
const Vue = createApp({})
|
|
8
8
|
|
|
9
|
-
export default function treeToArray(
|
|
9
|
+
export default function treeToArray(
|
|
10
|
+
data,
|
|
11
|
+
expandAll,
|
|
12
|
+
parent = null,
|
|
13
|
+
level = null
|
|
14
|
+
) {
|
|
10
15
|
let tmp = []
|
|
11
|
-
Array.from(data).forEach(function(record) {
|
|
16
|
+
Array.from(data).forEach(function (record) {
|
|
12
17
|
if (record.state === 'open') {
|
|
13
18
|
record._expanded = true
|
|
14
19
|
}
|