@netang/quasar 0.2.37 → 0.2.39
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/components/uploader-query/index.vue +1 -1
- package/package.json +1 -1
- package/utils/$power.js +36 -7
- package/utils/$table.js +24 -19
- package/utils/config.js +4 -0
- package/utils/useSearch.js +2 -1
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
fit="fill"
|
|
124
124
|
>
|
|
125
125
|
<!-- 如果是外链 -->
|
|
126
|
-
<span class="n-uploader-query__item__net" v-if="fileItem.isNet && ! fileItem.isNetUploaded"
|
|
126
|
+
<span class="n-uploader-query__item__net" v-if="fileItem.isNet && ! fileItem.isNetUploaded">网络</span>
|
|
127
127
|
|
|
128
128
|
<!-- 内容 -->
|
|
129
129
|
<div
|
package/package.json
CHANGED
package/utils/$power.js
CHANGED
|
@@ -1171,30 +1171,59 @@ async function request(options) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
1173
|
// 判断是否有确认框
|
|
1174
|
-
|
|
1174
|
+
let isConfirm = $n_get(o.powerBtn.data, 'confirm')
|
|
1175
|
+
const isConfirmPassword = $n_get(o.powerBtn.data, 'confirmPassword')
|
|
1175
1176
|
if (
|
|
1176
1177
|
// 如果有确认框
|
|
1177
1178
|
isConfirm
|
|
1178
1179
|
// 如果有密码确认框
|
|
1179
|
-
||
|
|
1180
|
+
|| isConfirmPassword
|
|
1180
1181
|
) {
|
|
1182
|
+
// 如果是确认密码
|
|
1183
|
+
if (isConfirmPassword) {
|
|
1184
|
+
|
|
1185
|
+
const {
|
|
1186
|
+
confirmPassword,
|
|
1187
|
+
} = configs.power
|
|
1188
|
+
|
|
1189
|
+
// 如果确认密码方法存在
|
|
1190
|
+
if ($n_isFunction(confirmPassword)) {
|
|
1191
|
+
|
|
1192
|
+
// 确认框
|
|
1193
|
+
$n_confirm({
|
|
1194
|
+
message: $n_isValidString(isConfirmPassword) ? isConfirmPassword : '重要操作,请输入登录密码并确认后操作!',
|
|
1195
|
+
prompt: {
|
|
1196
|
+
model: '',
|
|
1197
|
+
isValid: val => val.length > 0,
|
|
1198
|
+
type: 'password',
|
|
1199
|
+
},
|
|
1200
|
+
persistent: true,
|
|
1201
|
+
})
|
|
1202
|
+
// 点击确认执行
|
|
1203
|
+
.onOk(function (e) {
|
|
1204
|
+
confirmPassword(e, onConfirmRequest)
|
|
1205
|
+
})
|
|
1206
|
+
return
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
// 否则为普通确认框
|
|
1210
|
+
isConfirm = true
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1181
1213
|
// 如果需要先弹出确认框
|
|
1182
1214
|
if (isConfirm) {
|
|
1183
|
-
|
|
1184
1215
|
// 确认框
|
|
1185
1216
|
$n_confirm({
|
|
1186
|
-
// 重要操作,请输入登录密码并确认后操作
|
|
1187
1217
|
message: $n_isValidString(isConfirm) ? isConfirm : '确认要执行该操作吗?',
|
|
1218
|
+
persistent: true,
|
|
1188
1219
|
})
|
|
1189
1220
|
// 点击确认执行
|
|
1190
1221
|
.onOk(onConfirmRequest)
|
|
1191
|
-
|
|
1192
|
-
return
|
|
1193
1222
|
}
|
|
1194
1223
|
}
|
|
1195
1224
|
|
|
1196
1225
|
// 否则执行确认请求事件
|
|
1197
|
-
|
|
1226
|
+
onConfirmRequest()
|
|
1198
1227
|
|
|
1199
1228
|
/**
|
|
1200
1229
|
* 确认请求事件
|
package/utils/$table.js
CHANGED
|
@@ -1286,20 +1286,31 @@ async function getViewData(options) {
|
|
|
1286
1286
|
}, options)
|
|
1287
1287
|
|
|
1288
1288
|
const _isValidValue = $n_isValidValue(httpValue)
|
|
1289
|
-
|
|
1289
|
+
const hasSearch = $n_has(httpData, 'n_search')
|
|
1290
|
+
if (_isValidValue || $n_isValidArray(httpValue) || hasSearch) {
|
|
1290
1291
|
|
|
1291
|
-
|
|
1292
|
-
let
|
|
1293
|
-
let compare
|
|
1292
|
+
const n_search = []
|
|
1293
|
+
let per_page = 1
|
|
1294
1294
|
|
|
1295
|
-
if (
|
|
1296
|
-
|
|
1297
|
-
value
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1295
|
+
if (! hasSearch) {
|
|
1296
|
+
|
|
1297
|
+
let value
|
|
1298
|
+
let compare
|
|
1299
|
+
|
|
1300
|
+
if (_isValidValue) {
|
|
1301
|
+
compare = dicts.SEARCH_COMPARE_TYPE__EQUAL
|
|
1302
|
+
value = httpValue
|
|
1303
|
+
} else {
|
|
1304
|
+
compare = dicts.SEARCH_COMPARE_TYPE__IN
|
|
1305
|
+
value = $n_uniq(httpValue)
|
|
1306
|
+
per_page = value.length
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
n_search.push({
|
|
1310
|
+
field,
|
|
1311
|
+
compare,
|
|
1312
|
+
value,
|
|
1313
|
+
})
|
|
1303
1314
|
}
|
|
1304
1315
|
|
|
1305
1316
|
const { status, data } = await $n_http({
|
|
@@ -1310,13 +1321,7 @@ async function getViewData(options) {
|
|
|
1310
1321
|
Pview: 1,
|
|
1311
1322
|
},
|
|
1312
1323
|
data: Object.assign({
|
|
1313
|
-
n_search
|
|
1314
|
-
{
|
|
1315
|
-
field,
|
|
1316
|
-
compare,
|
|
1317
|
-
value,
|
|
1318
|
-
},
|
|
1319
|
-
],
|
|
1324
|
+
n_search,
|
|
1320
1325
|
page: 1,
|
|
1321
1326
|
per_page,
|
|
1322
1327
|
}, httpData),
|
package/utils/config.js
CHANGED
package/utils/useSearch.js
CHANGED
|
@@ -6,7 +6,6 @@ import $n_isFunction from 'lodash/isFunction'
|
|
|
6
6
|
import $n_findIndex from 'lodash/findIndex'
|
|
7
7
|
|
|
8
8
|
import $n_forEach from '@netang/utils/forEach'
|
|
9
|
-
import $n_join from '@netang/utils/join'
|
|
10
9
|
import $n_split from '@netang/utils/split'
|
|
11
10
|
import $n_isJson from '@netang/utils/isJson'
|
|
12
11
|
import $n_json from '@netang/utils/json'
|
|
@@ -68,6 +67,8 @@ function setItemCompare(item) {
|
|
|
68
67
|
{ label: '!=', value: dicts.SEARCH_COMPARE_TYPE__NOT_EQUAL },
|
|
69
68
|
{ label: '>', value: dicts.SEARCH_COMPARE_TYPE__GT },
|
|
70
69
|
{ label: '≥', value: dicts.SEARCH_COMPARE_TYPE__GTE },
|
|
70
|
+
{ label: '<', value: dicts.SEARCH_COMPARE_TYPE__LT },
|
|
71
|
+
{ label: '≤', value: dicts.SEARCH_COMPARE_TYPE__LTE },
|
|
71
72
|
]
|
|
72
73
|
|
|
73
74
|
// 如果类型为日期
|