three-trees-ui 1.0.99 → 1.1.1
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/LICENSE +21 -21
- package/lib/three-trees-ui.common.js +795 -978
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +795 -978
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +4 -5
- package/packages/Collapse/src/HtCollapse.vue +1 -4
- package/packages/CustomDialog/src/customDialog.vue +9 -26
- package/packages/CustomDialog/src/main.vue +115 -171
- package/packages/DimensionSelector/src/main.vue +43 -44
- package/packages/File/src/main.vue +120 -12
- package/packages/JobSelector/src/main.vue +81 -85
- package/packages/OnlineForm/src/Form.vue +5 -155
- package/packages/OrgSelector/src/main.vue +85 -87
- package/packages/PostSelector/src/main.vue +81 -86
- package/packages/Preview/src/FrameViewer.vue +5 -6
- package/packages/RoleSelector/src/main.vue +81 -87
- package/packages/TemplateForm/src/main.vue +0 -1
- package/packages/UserSelector/src/main.vue +101 -96
- package/src/directive/formulas.js +1 -7
- package/src/index.js +0 -2
- package/src/mixins/onlineSubtable.js +19 -63
- package/src/styles/selector.scss +2 -42
- package/src/styles/variables.scss +5 -6
- package/src/utils.js +0 -7
- package/packages/SubEditModeDialog/index.js +0 -7
- package/packages/SubEditModeDialog/src/main.vue +0 -115
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<van-popup
|
|
3
|
-
v-if="dialogVisible"
|
|
4
|
-
v-model="dialogVisible"
|
|
5
|
-
position="right"
|
|
6
|
-
get-container="body"
|
|
7
|
-
class="ht-sub-edit-mode-dialog"
|
|
8
|
-
>
|
|
9
|
-
<van-nav-bar
|
|
10
|
-
title="子表编辑"
|
|
11
|
-
left-arrow
|
|
12
|
-
@click-left="dialogVisible = false"
|
|
13
|
-
/>
|
|
14
|
-
<el-form
|
|
15
|
-
v-if="dialogVisible"
|
|
16
|
-
v-form="{
|
|
17
|
-
formItemAlign: 'top',
|
|
18
|
-
inputsDisplay: 'block',
|
|
19
|
-
roInputDisplayMode: 'text',
|
|
20
|
-
}"
|
|
21
|
-
class="sub-edit-main"
|
|
22
|
-
:data-vv-scope="searchFormScope"
|
|
23
|
-
label-position="top"
|
|
24
|
-
>
|
|
25
|
-
<slot :row="{ row, index: 0 }"></slot>
|
|
26
|
-
</el-form>
|
|
27
|
-
<div class="sub-edit-footer">
|
|
28
|
-
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
29
|
-
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
|
30
|
-
</div>
|
|
31
|
-
</van-popup>
|
|
32
|
-
</template>
|
|
33
|
-
<script>
|
|
34
|
-
import { cloneDeep } from 'lodash'
|
|
35
|
-
import utils from '@/utils.js'
|
|
36
|
-
|
|
37
|
-
export default {
|
|
38
|
-
name: 'HtSubEditModeDialog',
|
|
39
|
-
props: {},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
dialogVisible: false,
|
|
43
|
-
dialogType: 'add',
|
|
44
|
-
row: {},
|
|
45
|
-
orgRow: {}, // 存储原始数据,用来修改子表的数据
|
|
46
|
-
data: {}, // 主表数据,用来处理参数绑定、值回显等问题
|
|
47
|
-
permission: {},
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
computed: {
|
|
51
|
-
searchFormScope() {
|
|
52
|
-
return `Form${utils.guid()}`
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
showDialog({ type, data, mainData }) {
|
|
57
|
-
this.dialogVisible = true
|
|
58
|
-
this.permission = utils.getOnlineFormInstance(this).permission || {}
|
|
59
|
-
this.dialogType = type
|
|
60
|
-
this.orgRow = data
|
|
61
|
-
this.data = mainData
|
|
62
|
-
this.row = cloneDeep(data)
|
|
63
|
-
},
|
|
64
|
-
handleConfirm() {
|
|
65
|
-
utils
|
|
66
|
-
.validateForm(this, this.searchFormScope)
|
|
67
|
-
.then(() => {
|
|
68
|
-
this.dialogVisible = false
|
|
69
|
-
// 点击确认更新子表数据
|
|
70
|
-
const keys = Object.keys(this.orgRow || {})
|
|
71
|
-
keys.forEach((key) => {
|
|
72
|
-
if (this.orgRow[key] !== this.row[key]) {
|
|
73
|
-
this.orgRow[key] = this.row[key]
|
|
74
|
-
}
|
|
75
|
-
})
|
|
76
|
-
this.$emit('getSubEditModeData', this.row, this.dialogType)
|
|
77
|
-
})
|
|
78
|
-
.catch(() => {})
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
</script>
|
|
83
|
-
<style lang="scss" scoped>
|
|
84
|
-
::v-deep {
|
|
85
|
-
.el-row {
|
|
86
|
-
display: flex;
|
|
87
|
-
flex-wrap: wrap;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
</style>
|
|
91
|
-
<style lang="scss">
|
|
92
|
-
.ht-sub-edit-mode-dialog {
|
|
93
|
-
width: 100%;
|
|
94
|
-
height: 100vh;
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
|
|
98
|
-
.sub-edit-main {
|
|
99
|
-
flex: 1;
|
|
100
|
-
padding: 16px;
|
|
101
|
-
overflow-y: auto;
|
|
102
|
-
&.el-form--label-top .el-form-item__label {
|
|
103
|
-
padding-bottom: 0;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
.sub-edit-footer {
|
|
107
|
-
height: 46px;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
padding: 0 24px;
|
|
112
|
-
border-top: 1px solid #ebebeb;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
</style>
|