@zscreate/zhxy-app-component 1.0.387 → 1.0.392
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.
|
@@ -160,13 +160,13 @@ export default {
|
|
|
160
160
|
item.columns.forEach(el => {
|
|
161
161
|
if(el.list && el.list.length) {
|
|
162
162
|
el.list.forEach(el2 => {
|
|
163
|
-
if(['input', 'textarea', 'number', 'date', 'time'].includes(el2.type)) {
|
|
163
|
+
if(['input', 'textarea', 'number', 'date', 'time', 'select', 'radio', 'checkbox', 'cascaderSelect', 'cascader', 'deptSelector', 'userSelector', 'userSelectorByRole'].includes(el2.type)) {
|
|
164
164
|
this.formList.push(el2)
|
|
165
165
|
}
|
|
166
166
|
})
|
|
167
167
|
}
|
|
168
168
|
})
|
|
169
|
-
} else if (['input', 'textarea', 'number', 'date', 'time'].includes(item.type)) { //输入框
|
|
169
|
+
} else if (['input', 'textarea', 'number', 'date', 'time', 'select', 'radio', 'checkbox', 'cascaderSelect', 'cascader', 'deptSelector', 'userSelector', 'userSelectorByRole'].includes(item.type)) { //输入框
|
|
170
170
|
this.formList.push(item)
|
|
171
171
|
}
|
|
172
172
|
})
|
|
@@ -285,7 +285,9 @@ export default {
|
|
|
285
285
|
async recognizeField(field) {
|
|
286
286
|
const params = {
|
|
287
287
|
content: this.contentText.trim(),
|
|
288
|
-
|
|
288
|
+
name: field.name,
|
|
289
|
+
type: field.type,
|
|
290
|
+
options: field.options
|
|
289
291
|
};
|
|
290
292
|
|
|
291
293
|
try {
|
|
@@ -116,15 +116,10 @@
|
|
|
116
116
|
</view>
|
|
117
117
|
<view v-if="col.model == verifyNode" class="verify-cot">
|
|
118
118
|
<view class="verify-title">{{col.options.operation}}</view>
|
|
119
|
-
<view style="width:200rpx; flex-shrink: 0"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<u-select mode="single-column" :list="selectList[col.model]" v-model="selectShow[col.model]"
|
|
124
|
-
@confirm="selectConfirm($event,col)"></u-select>
|
|
125
|
-
<!-- <picker @change="bindPickerChange($event, item.model)" :value="pickerIndex" :range="selectDataTransForm(suggest)">
|
|
126
|
-
<view class="uni-input">{{models[item.model].operation ? models[item.model].operation : '请选择'}}</view>
|
|
127
|
-
</picker> -->
|
|
119
|
+
<view id="suggestSelect" style="width:200rpx; flex-shrink: 0; text-align: right; font-size: 26rpx; color: #333; line-height: 60rpx;"
|
|
120
|
+
@click="openSuggestSelect(col)">
|
|
121
|
+
{{suggestType[col.model] || '请点击选择'}}
|
|
122
|
+
<text style="font-size: 24rpx; color: #999; margin-left: 4rpx;">▼</text>
|
|
128
123
|
</view>
|
|
129
124
|
</view>
|
|
130
125
|
<view v-if="col.model !== verifyNode" class="verify-cot">
|
|
@@ -220,15 +215,10 @@
|
|
|
220
215
|
<!-- #endif -->
|
|
221
216
|
<view v-if="!warpVerifyDisable(item)" class="verify-cot">
|
|
222
217
|
<view class="verify-title">{{item.options.operation}}</view>
|
|
223
|
-
<view style="width:200rpx; flex-shrink: 0"
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<u-select mode="single-column" :list="selectList[item.model]" v-model="selectShow[item.model]"
|
|
228
|
-
@confirm="selectConfirm($event,item)"></u-select>
|
|
229
|
-
<!-- <picker @change="bindPickerChange($event, item.model)" :value="pickerIndex" :range="selectDataTransForm(suggest)">
|
|
230
|
-
<view class="uni-input">{{models[item.model].operation ? models[item.model].operation : '请选择'}}</view>
|
|
231
|
-
</picker> -->
|
|
218
|
+
<view id="suggestSelect" style="width:200rpx; flex-shrink: 0; text-align: right; font-size: 26rpx; color: #333; line-height: 60rpx;"
|
|
219
|
+
@click="openSuggestSelect(item)">
|
|
220
|
+
{{suggestType[item.model] || '请点击选择'}}
|
|
221
|
+
<text style="font-size: 24rpx; color: #999; margin-left: 4rpx;">▼</text>
|
|
232
222
|
</view>
|
|
233
223
|
</view>
|
|
234
224
|
<view v-if="warpVerifyDisable(item)" class="verify-cot">
|
|
@@ -750,6 +740,17 @@ export default {
|
|
|
750
740
|
}
|
|
751
741
|
})
|
|
752
742
|
},
|
|
743
|
+
// 打开操作类型选择
|
|
744
|
+
openSuggestSelect(item) {
|
|
745
|
+
const list = this.selectList[item.model] || this.suggest || [];
|
|
746
|
+
if (list.length === 0) return;
|
|
747
|
+
uni.showActionSheet({
|
|
748
|
+
itemList: list.map(opt => opt.label || opt.value),
|
|
749
|
+
success: (res) => {
|
|
750
|
+
this.selectConfirm([list[res.tapIndex]], item);
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
},
|
|
753
754
|
// 选择操作类型
|
|
754
755
|
selectConfirm(e, item) {
|
|
755
756
|
const { model, options, type } = item
|
|
@@ -1480,12 +1481,13 @@ export default {
|
|
|
1480
1481
|
}
|
|
1481
1482
|
})
|
|
1482
1483
|
// 子表单有必填校验 判断有没有添加行, 没有添加行需要手动添加行, 让它触发校验
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1484
|
+
tables.forEach(table => {
|
|
1485
|
+
if (!table.options.requiredAddDefaultRow) return
|
|
1486
|
+
const model = this.models[table.model]
|
|
1487
|
+
if ( !model || ( Array.isArray(model) && model.length === 0 )) {
|
|
1488
|
+
this.addToTableData(table, table.model, 'addModel')
|
|
1489
|
+
}
|
|
1490
|
+
})
|
|
1489
1491
|
},
|
|
1490
1492
|
/**
|
|
1491
1493
|
* @param {回调函数} fn 成功的回调函数
|
|
@@ -1559,7 +1561,7 @@ export default {
|
|
|
1559
1561
|
item = this.models[widget.model]
|
|
1560
1562
|
if (item && widget) {
|
|
1561
1563
|
let rules = {
|
|
1562
|
-
comments: widget.type === 'hnkj-confirm' ? widget.options.isConfirmComponent?[{ required: widget.options.confirmOpinionRequire, message: '请输入确认意见' }]:[ { required: widget.options.required , message: widget.options.placeholder }] : [{ required: widget.options.opinionRequire, message: '请输入审批意见' }],
|
|
1564
|
+
comments: widget.type === 'hnkj-confirm' ? (widget.options.isConfirmComponent?[{ required: widget.options.confirmOpinionRequire, message: '请输入确认意见' }]:[ { required: widget.options.required , message: widget.options.placeholder }]) : [{ required: widget.options.opinionRequire, message: '请输入审批意见' }],
|
|
1563
1565
|
operation: widget.type === 'hnkj-confirm' ? [ { required: widget.options.required , message: `请选择${widget.options.operation}` }] : []
|
|
1564
1566
|
}
|
|
1565
1567
|
utils.validateField(item, rules , Object.keys(rules), (success, errors) => {
|