af-mobile-client-vue3 1.0.69 → 1.0.71
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/.cursorrules +61 -0
- package/package.json +1 -1
- package/src/components/core/XGridDropOption/index.vue +151 -132
- package/src/components/core/XMultiSelect/index.vue +183 -185
- package/src/components/core/XSelect/index.vue +122 -123
- package/src/components/data/XCellList/index.vue +116 -57
- package/src/components/data/XCellListFilter/index.vue +240 -230
- package/src/components/data/XForm/index.vue +153 -147
- package/src/components/data/XFormGroup/index.vue +96 -75
- package/src/components/data/XFormItem/index.vue +638 -579
- package/src/components/data/XReportForm/index.vue +19 -0
- package/src/components/data/XSignature/index.vue +285 -0
- package/src/router/routes.ts +12 -0
- package/src/utils/authority-utils.ts +0 -1
- package/src/utils/runEvalFunction.ts +13 -0
- package/src/views/component/XCellListView/index.vue +96 -57
- package/src/views/component/XFormGroupView/index.vue +54 -0
- package/src/views/component/XFormView/index.vue +170 -58
- package/src/views/component/XReportFormView/index.vue +2 -284
- package/src/views/component/XSignatureView/index.vue +50 -0
- package/src/views/component/index.vue +9 -1
- package/vite.config.ts +1 -1
|
@@ -1,230 +1,240 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {defineEmits, defineModel, defineProps, onMounted, ref
|
|
3
|
-
import {
|
|
4
|
-
Button as VanButton,
|
|
5
|
-
Col as VanCol,
|
|
6
|
-
DropdownItem as VanDropdownItem,
|
|
7
|
-
DropdownMenu as VanDropdownMenu,
|
|
8
|
-
Icon as VanIcon,
|
|
9
|
-
Row as VanRow,
|
|
10
|
-
showFailToast,
|
|
11
|
-
} from 'vant'
|
|
12
|
-
import XGridDropOption from '@af-mobile-client-vue3/components/core/XGridDropOption/index.vue'
|
|
13
|
-
import XFormItem from '@af-mobile-client-vue3/components/data/XFormItem/index.vue'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'update:
|
|
25
|
-
'
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</VanCol>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
font-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineEmits, defineModel, defineProps, onMounted, ref } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
Button as VanButton,
|
|
5
|
+
Col as VanCol,
|
|
6
|
+
DropdownItem as VanDropdownItem,
|
|
7
|
+
DropdownMenu as VanDropdownMenu,
|
|
8
|
+
Icon as VanIcon,
|
|
9
|
+
Row as VanRow,
|
|
10
|
+
showFailToast,
|
|
11
|
+
} from 'vant'
|
|
12
|
+
import XGridDropOption from '@af-mobile-client-vue3/components/core/XGridDropOption/index.vue'
|
|
13
|
+
import XFormItem from '@af-mobile-client-vue3/components/data/XFormItem/index.vue'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
orderVal?: string
|
|
17
|
+
sortordVal?: string
|
|
18
|
+
orderList?: any[]
|
|
19
|
+
formQuery?: any[]
|
|
20
|
+
buttonState?: any
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits([
|
|
24
|
+
'update:orderVal',
|
|
25
|
+
'update:sortordVal',
|
|
26
|
+
'update:conditionParams',
|
|
27
|
+
'onRefresh',
|
|
28
|
+
'addOption',
|
|
29
|
+
])
|
|
30
|
+
// 排序字段
|
|
31
|
+
const currentOrderVal = defineModel('orderVal')
|
|
32
|
+
// 排序规则
|
|
33
|
+
const currentSortordVal = defineModel('sortordVal')
|
|
34
|
+
// 下拉菜单元素
|
|
35
|
+
const listFilterMenu = ref(null)
|
|
36
|
+
// 排序规则列表
|
|
37
|
+
const sortordList = ref([
|
|
38
|
+
{ title: '正序', value: 'ascend' },
|
|
39
|
+
{ title: '倒序', value: 'descend' },
|
|
40
|
+
])
|
|
41
|
+
const colFieldNames = {
|
|
42
|
+
text: 'title',
|
|
43
|
+
value: 'value',
|
|
44
|
+
}
|
|
45
|
+
// 查询条件参数 !!!!!建议最后点击确认的时候完成这个的整理
|
|
46
|
+
const conditionParams = ref({})
|
|
47
|
+
|
|
48
|
+
// 重置某个选项
|
|
49
|
+
function resetOptionItem(type) {
|
|
50
|
+
if (conditionParams.value[type] !== undefined)
|
|
51
|
+
conditionParams.value[type] = undefined
|
|
52
|
+
}
|
|
53
|
+
// 重置所有选项
|
|
54
|
+
function resetOption() {
|
|
55
|
+
currentOrderVal.value = undefined
|
|
56
|
+
currentSortordVal.value = undefined
|
|
57
|
+
// 条件参数
|
|
58
|
+
conditionParams.value = {}
|
|
59
|
+
}
|
|
60
|
+
function checkOrderOption() {
|
|
61
|
+
let isCheck = true
|
|
62
|
+
if (currentOrderVal.value) {
|
|
63
|
+
if (!currentSortordVal.value) {
|
|
64
|
+
showFailToast('排序规则不能为空')
|
|
65
|
+
isCheck = false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (currentSortordVal.value) {
|
|
69
|
+
if (!currentOrderVal.value) {
|
|
70
|
+
showFailToast('排序字段不能为空')
|
|
71
|
+
isCheck = false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return isCheck
|
|
75
|
+
}
|
|
76
|
+
// 确认筛选条件
|
|
77
|
+
function confirmOption() {
|
|
78
|
+
const isCheck = checkOrderOption()
|
|
79
|
+
if (isCheck) {
|
|
80
|
+
const isEmptyObject = Object.keys(conditionParams.value).length === 0
|
|
81
|
+
emit('update:conditionParams', isEmptyObject ? undefined : conditionParams.value)
|
|
82
|
+
emit('onRefresh', {})
|
|
83
|
+
listFilterMenu.value.toggle(false)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 新增按钮
|
|
88
|
+
function addOption() {
|
|
89
|
+
emit('addOption')
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onMounted(() => {
|
|
93
|
+
// currentOrderVal.value = props.orderVal
|
|
94
|
+
// currentSortordVal.value = props.sortordVal
|
|
95
|
+
// disposalData()
|
|
96
|
+
})
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<template>
|
|
100
|
+
<div id="XCellListFilter">
|
|
101
|
+
<VanDropdownMenu :close-on-click-outside="false">
|
|
102
|
+
<VanDropdownItem ref="listFilterMenu">
|
|
103
|
+
<template #title>
|
|
104
|
+
<VanIcon name="filter-o" size="20" />
|
|
105
|
+
</template>
|
|
106
|
+
<div class="order-condition">
|
|
107
|
+
<template v-if="props.orderList.length > 0">
|
|
108
|
+
<VanRow justify="space-between" class="filter-title">
|
|
109
|
+
<VanCol span="10">
|
|
110
|
+
排序字段
|
|
111
|
+
</VanCol>
|
|
112
|
+
<VanCol span="2">
|
|
113
|
+
<div class="reset-item" @click.stop="currentOrderVal = undefined">
|
|
114
|
+
重置
|
|
115
|
+
</div>
|
|
116
|
+
</VanCol>
|
|
117
|
+
</VanRow>
|
|
118
|
+
<XGridDropOption :columns="props.orderList" :columns-field-names="colFieldNames" />
|
|
119
|
+
<VanRow justify="space-between" class="filter-title">
|
|
120
|
+
<VanCol span="10">
|
|
121
|
+
排序规则
|
|
122
|
+
</VanCol>
|
|
123
|
+
<VanCol span="2">
|
|
124
|
+
<div class="reset-item" @click.stop="currentSortordVal = undefined">
|
|
125
|
+
重置
|
|
126
|
+
</div>
|
|
127
|
+
</VanCol>
|
|
128
|
+
</VanRow>
|
|
129
|
+
<XGridDropOption :columns="sortordList" :columns-field-names="colFieldNames" />
|
|
130
|
+
</template>
|
|
131
|
+
<template v-for="(item, index) in props.formQuery" :key="`${item.model}${index}`">
|
|
132
|
+
<VanRow justify="space-between" class="filter-title">
|
|
133
|
+
<VanCol span="10">
|
|
134
|
+
{{ item.name }}
|
|
135
|
+
</VanCol>
|
|
136
|
+
<VanCol span="2">
|
|
137
|
+
<div class="reset-item" @click.stop="resetOptionItem(item.model)">
|
|
138
|
+
重置
|
|
139
|
+
</div>
|
|
140
|
+
</VanCol>
|
|
141
|
+
</VanRow>
|
|
142
|
+
<XFormItem v-model="conditionParams[item.model]" :attr="item" :show-label="false" />
|
|
143
|
+
</template>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="operations-panel">
|
|
146
|
+
<VanButton type="default" @click="resetOption">
|
|
147
|
+
重置
|
|
148
|
+
</VanButton>
|
|
149
|
+
<VanButton v-if="props.buttonState.add && props.buttonState.add === true" type="primary" @click="addOption">
|
|
150
|
+
新增
|
|
151
|
+
</VanButton>
|
|
152
|
+
<VanButton type="primary" @click="confirmOption">
|
|
153
|
+
查询
|
|
154
|
+
</VanButton>
|
|
155
|
+
</div>
|
|
156
|
+
</VanDropdownItem>
|
|
157
|
+
</VanDropdownMenu>
|
|
158
|
+
</div>
|
|
159
|
+
</template>
|
|
160
|
+
|
|
161
|
+
<style scoped lang="less">
|
|
162
|
+
#XCellListFilter {
|
|
163
|
+
.order-condition {
|
|
164
|
+
// padding-bottom: 10px;
|
|
165
|
+
max-height: calc(var(--van-picker-toolbar-height) + var(--van-padding-base) + var(--van-tabs-line-height) + 35vh);
|
|
166
|
+
overflow-y: auto;
|
|
167
|
+
width: 100%;
|
|
168
|
+
background-color: white;
|
|
169
|
+
.filter-title {
|
|
170
|
+
height: 2rem;
|
|
171
|
+
font-size: 13px;
|
|
172
|
+
font-weight: 600;
|
|
173
|
+
line-height: 2rem;
|
|
174
|
+
margin: 5px 1rem 1px 1rem;
|
|
175
|
+
color: black;
|
|
176
|
+
}
|
|
177
|
+
.range-picker-list {
|
|
178
|
+
.range-picker-title {
|
|
179
|
+
height: 2rem;
|
|
180
|
+
font-size: 13px;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
line-height: 2rem;
|
|
183
|
+
margin: 5px 1rem 1px 1rem;
|
|
184
|
+
color: black;
|
|
185
|
+
}
|
|
186
|
+
.range-picker-time {
|
|
187
|
+
display: inline-block;
|
|
188
|
+
background: #f8f8f8;
|
|
189
|
+
border-radius: 8px;
|
|
190
|
+
font-size: 13px;
|
|
191
|
+
margin: 0 1rem;
|
|
192
|
+
height: 2rem;
|
|
193
|
+
line-height: 2rem;
|
|
194
|
+
width: 40vw;
|
|
195
|
+
text-align: center;
|
|
196
|
+
}
|
|
197
|
+
/* 已完成选择的时间 */
|
|
198
|
+
.active-picker-time {
|
|
199
|
+
color: blue;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/* 重置元素按钮 */
|
|
203
|
+
.reset-item {
|
|
204
|
+
font-weight: 500;
|
|
205
|
+
color: blue;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/* 下拉菜单的操作面板 */
|
|
209
|
+
.operations-panel {
|
|
210
|
+
display: flex;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
user-select: none;
|
|
213
|
+
padding: 10px;
|
|
214
|
+
gap: 12px;
|
|
215
|
+
|
|
216
|
+
& > .van-button {
|
|
217
|
+
flex: 1;
|
|
218
|
+
margin: 0;
|
|
219
|
+
|
|
220
|
+
//&:first-child {
|
|
221
|
+
// margin-right: 12px;
|
|
222
|
+
//}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/* 时间范围组件 */
|
|
226
|
+
.rangePicker-comp-box {
|
|
227
|
+
:deep(.van-calendar) {
|
|
228
|
+
height: 58vh;
|
|
229
|
+
}
|
|
230
|
+
:deep(.van-calendar__header-title) {
|
|
231
|
+
background-color: rgba(25, 137, 250, 0.1);
|
|
232
|
+
height: 8vh;
|
|
233
|
+
line-height: 8vh;
|
|
234
|
+
}
|
|
235
|
+
:deep(.van-calendar__month-mark) {
|
|
236
|
+
color: rgba(25, 137, 250, 0.1);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
</style>
|