doway-coms 1.1.22 → 1.1.25
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/lib/doway-coms.common.js +271 -249
- package/lib/doway-coms.umd.js +271 -249
- package/lib/doway-coms.umd.min.js +3 -3
- package/package.json +1 -1
package/lib/doway-coms.umd.js
CHANGED
|
@@ -78936,11 +78936,12 @@ __webpack_require__.d(__webpack_exports__, "replaceParam", function() { return /
|
|
|
78936
78936
|
__webpack_require__.d(__webpack_exports__, "setFrameColState", function() { return /* reexport */ setFrameColState; });
|
|
78937
78937
|
__webpack_require__.d(__webpack_exports__, "setFrameToolBtnState", function() { return /* reexport */ setFrameToolBtnState; });
|
|
78938
78938
|
__webpack_require__.d(__webpack_exports__, "showErrors", function() { return /* reexport */ showErrors; });
|
|
78939
|
-
__webpack_require__.d(__webpack_exports__, "getUuid", function() { return /* reexport */
|
|
78939
|
+
__webpack_require__.d(__webpack_exports__, "getUuid", function() { return /* reexport */ common_getUuid; });
|
|
78940
78940
|
__webpack_require__.d(__webpack_exports__, "getFormValidErrors", function() { return /* reexport */ getFormValidErrors; });
|
|
78941
78941
|
__webpack_require__.d(__webpack_exports__, "stringUrlQuery", function() { return /* reexport */ common_stringUrlQuery; });
|
|
78942
78942
|
__webpack_require__.d(__webpack_exports__, "getRouteFullPath", function() { return /* reexport */ getRouteFullPath; });
|
|
78943
78943
|
__webpack_require__.d(__webpack_exports__, "getGridValidErrors", function() { return /* reexport */ getGridValidErrors; });
|
|
78944
|
+
__webpack_require__.d(__webpack_exports__, "routeBeforeEach", function() { return /* reexport */ routeBeforeEach; });
|
|
78944
78945
|
__webpack_require__.d(__webpack_exports__, "timeAgo", function() { return /* reexport */ timeAgo; });
|
|
78945
78946
|
__webpack_require__.d(__webpack_exports__, "parseTime", function() { return /* reexport */ parseTime; });
|
|
78946
78947
|
__webpack_require__.d(__webpack_exports__, "formatTime", function() { return /* reexport */ formatTime; });
|
|
@@ -107011,247 +107012,6 @@ var srcvue_type_template_id_78416a63_scoped_true_staticRenderFns = []
|
|
|
107011
107012
|
|
|
107012
107013
|
// CONCATENATED MODULE: ./packages/BasePulldown/src/index.vue?vue&type=template&id=78416a63&scoped=true&
|
|
107013
107014
|
|
|
107014
|
-
// CONCATENATED MODULE: ./packages/utils/common.js
|
|
107015
|
-
/**
|
|
107016
|
-
* 替换掩码参数字符串
|
|
107017
|
-
* @param {参数字符串} paramString
|
|
107018
|
-
* @param {当前页面数据集} formData
|
|
107019
|
-
*/
|
|
107020
|
-
function replaceParamString(
|
|
107021
|
-
paramString,
|
|
107022
|
-
formData,
|
|
107023
|
-
currentModuleSelectInfo
|
|
107024
|
-
) {
|
|
107025
|
-
// hh添加
|
|
107026
|
-
let tempStr = paramString
|
|
107027
|
-
while (true) {
|
|
107028
|
-
if (tempStr.indexOf('@Fn(') < 0) {
|
|
107029
|
-
break
|
|
107030
|
-
}
|
|
107031
|
-
let tempReplaceParam = tempStr.substr(tempStr.indexOf('@Fn('))
|
|
107032
|
-
tempReplaceParam = tempReplaceParam.substr(
|
|
107033
|
-
0,
|
|
107034
|
-
tempReplaceParam.indexOf(')') + 1
|
|
107035
|
-
) // 查找掩码参数
|
|
107036
|
-
let tempDataFields = tempReplaceParam
|
|
107037
|
-
.substr(0, tempReplaceParam.length - 1)
|
|
107038
|
-
.substr(4)
|
|
107039
|
-
.split('.')
|
|
107040
|
-
let tempReplaceValue = null
|
|
107041
|
-
if (tempDataFields[0] === '') {
|
|
107042
|
-
// 取主表数据
|
|
107043
|
-
tempReplaceValue = formData[tempDataFields[1]]
|
|
107044
|
-
} else {
|
|
107045
|
-
if (formData[tempDataFields[0]] instanceof Array) {
|
|
107046
|
-
let tempSelectItemInfo = currentModuleSelectInfo.filter(filterItem => {
|
|
107047
|
-
return filterItem.attrDataName === tempDataFields[0]
|
|
107048
|
-
})
|
|
107049
|
-
if (tempSelectItemInfo.length > 0) {
|
|
107050
|
-
let tempKeyFieldValue =
|
|
107051
|
-
tempSelectItemInfo[0].selectItem[tempSelectItemInfo[0].keyField]
|
|
107052
|
-
let tempActualRow = formData[tempDataFields[0]].filter(filterItem => {
|
|
107053
|
-
return (
|
|
107054
|
-
filterItem[tempSelectItemInfo[0].keyField] === tempKeyFieldValue
|
|
107055
|
-
)
|
|
107056
|
-
})
|
|
107057
|
-
if (tempActualRow.length > 0) {
|
|
107058
|
-
tempReplaceValue = tempActualRow[0][tempDataFields[1]]
|
|
107059
|
-
}
|
|
107060
|
-
}
|
|
107061
|
-
} else {
|
|
107062
|
-
tempReplaceValue = formData[tempDataFields[0]][tempDataFields[1]]
|
|
107063
|
-
}
|
|
107064
|
-
}
|
|
107065
|
-
//刘松嗣临时处理
|
|
107066
|
-
if (tempReplaceValue == undefined) {
|
|
107067
|
-
tempReplaceValue = '0'
|
|
107068
|
-
}
|
|
107069
|
-
tempStr = tempStr.substr(
|
|
107070
|
-
tempStr.indexOf(tempReplaceParam) + tempReplaceParam.length
|
|
107071
|
-
)
|
|
107072
|
-
|
|
107073
|
-
if (typeof tempReplaceValue === 'string') {
|
|
107074
|
-
paramString = paramString.replace(
|
|
107075
|
-
tempReplaceParam,
|
|
107076
|
-
'"' + tempReplaceValue + '"'
|
|
107077
|
-
)
|
|
107078
|
-
tempStr = tempStr.replace(tempReplaceParam, '"' + tempReplaceValue + '"')
|
|
107079
|
-
} else {
|
|
107080
|
-
paramString = paramString.replace(tempReplaceParam, tempReplaceValue)
|
|
107081
|
-
tempStr = tempStr.replace(tempReplaceParam, tempReplaceValue)
|
|
107082
|
-
}
|
|
107083
|
-
}
|
|
107084
|
-
return paramString
|
|
107085
|
-
}
|
|
107086
|
-
|
|
107087
|
-
/**
|
|
107088
|
-
* 替换掩码参数字符串
|
|
107089
|
-
* @param {参数字符串} paramString
|
|
107090
|
-
* @param {当前页面数据集} formData
|
|
107091
|
-
*/
|
|
107092
|
-
function replaceParam(paramString, formData) {
|
|
107093
|
-
let tempStr = paramString
|
|
107094
|
-
while (true) {
|
|
107095
|
-
if (tempStr.indexOf('@Fn(') < 0) {
|
|
107096
|
-
break
|
|
107097
|
-
}
|
|
107098
|
-
let tempReplaceParam = tempStr.substr(tempStr.indexOf('@Fn('))
|
|
107099
|
-
tempReplaceParam = tempReplaceParam.substr(
|
|
107100
|
-
0,
|
|
107101
|
-
tempReplaceParam.indexOf(')') + 1
|
|
107102
|
-
) // 查找掩码参数
|
|
107103
|
-
let tempDataFields = tempReplaceParam
|
|
107104
|
-
.substr(0, tempReplaceParam.length - 1)
|
|
107105
|
-
.substr(4)
|
|
107106
|
-
.split('.')
|
|
107107
|
-
let tempReplaceValue = null
|
|
107108
|
-
if (tempDataFields[0] === '') {
|
|
107109
|
-
// 取主表数据
|
|
107110
|
-
tempReplaceValue = formData[tempDataFields[1]]
|
|
107111
|
-
} else {
|
|
107112
|
-
tempReplaceValue = formData[tempDataFields[0]][tempDataFields[1]]
|
|
107113
|
-
}
|
|
107114
|
-
tempStr = tempStr.substr(
|
|
107115
|
-
tempStr.indexOf(tempReplaceParam) + tempReplaceParam.length
|
|
107116
|
-
)
|
|
107117
|
-
|
|
107118
|
-
// if (typeof tempReplaceValue === 'string') {
|
|
107119
|
-
// paramString = paramString.replace(
|
|
107120
|
-
// tempReplaceParam,
|
|
107121
|
-
// '"' + tempReplaceValue + '"'
|
|
107122
|
-
// )
|
|
107123
|
-
// tempStr = tempStr.replace(tempReplaceParam, '"' + tempReplaceValue + '"')
|
|
107124
|
-
// } else {
|
|
107125
|
-
paramString = paramString.replace(tempReplaceParam, tempReplaceValue)
|
|
107126
|
-
tempStr = tempStr.replace(tempReplaceParam, tempReplaceValue)
|
|
107127
|
-
// }
|
|
107128
|
-
}
|
|
107129
|
-
return paramString
|
|
107130
|
-
}
|
|
107131
|
-
|
|
107132
|
-
function setFrameColState(formCols, formState, formStatus) {
|
|
107133
|
-
for (let prop in formCols) {
|
|
107134
|
-
if (formCols[prop].editStates instanceof Array) {
|
|
107135
|
-
let exists = formCols[prop].editStates.filter(item => {
|
|
107136
|
-
//editState:['add','edit']
|
|
107137
|
-
return item === formState // view === add|edit formState :view|add|edit
|
|
107138
|
-
}) //[]
|
|
107139
|
-
if (exists.length > 0) {
|
|
107140
|
-
formCols[prop].edit = true
|
|
107141
|
-
} else {
|
|
107142
|
-
formCols[prop].edit = false
|
|
107143
|
-
}
|
|
107144
|
-
}
|
|
107145
|
-
// 单据状态控制
|
|
107146
|
-
if (
|
|
107147
|
-
formStatus &&
|
|
107148
|
-
formCols[prop].editStatuss instanceof Array &&
|
|
107149
|
-
formCols[prop].editStatuss.length > 0 &&
|
|
107150
|
-
formCols[prop].edit === true
|
|
107151
|
-
) {
|
|
107152
|
-
let formStatusExists = formCols[prop].editStatuss.filter(item => {
|
|
107153
|
-
//editStatuss:[,'publish',]
|
|
107154
|
-
return item === formStatus // formStatus:'draft'
|
|
107155
|
-
})
|
|
107156
|
-
if (formStatusExists.length > 0) {
|
|
107157
|
-
formCols[prop].edit = true
|
|
107158
|
-
} else {
|
|
107159
|
-
formCols[prop].edit = false
|
|
107160
|
-
}
|
|
107161
|
-
}
|
|
107162
|
-
// Vue.set(formCols, i, formCols[i])
|
|
107163
|
-
}
|
|
107164
|
-
}
|
|
107165
|
-
function setFrameToolBtnState(toolBars, formState, formStatus) {
|
|
107166
|
-
for (let i = 0; i < toolBars.length; i++) {
|
|
107167
|
-
toolBars[i].visible = false
|
|
107168
|
-
toolBars[i].isPrimary = false
|
|
107169
|
-
if (
|
|
107170
|
-
toolBars[i].visibleStates &&
|
|
107171
|
-
toolBars[i].visibleStates.indexOf(formState) >= 0
|
|
107172
|
-
) {
|
|
107173
|
-
toolBars[i].visible = true
|
|
107174
|
-
}
|
|
107175
|
-
if (formStatus && toolBars[i].visibleStatuss && toolBars[i].visible) {
|
|
107176
|
-
toolBars[i].visible = toolBars[i].visibleStatuss.indexOf(formStatus) >= 0
|
|
107177
|
-
}
|
|
107178
|
-
}
|
|
107179
|
-
// 查找优先级最大的并且显示的设置按钮强调色
|
|
107180
|
-
let visibleBtns = toolBars.filter(filterItem => {
|
|
107181
|
-
return filterItem.visible === true
|
|
107182
|
-
})
|
|
107183
|
-
//循环数组查找出小于自身的priority优先级 优先级高设置按钮强调色
|
|
107184
|
-
for (let i = 0; i < visibleBtns.length; i++) {
|
|
107185
|
-
let tempPriority = visibleBtns[i].priority
|
|
107186
|
-
let tempBtns = visibleBtns.filter(filterItem => {
|
|
107187
|
-
return filterItem.priority < tempPriority
|
|
107188
|
-
})
|
|
107189
|
-
//如果找到小于自身优先级的数量>0就说明还有更小的跳出本次不设置true继续查找
|
|
107190
|
-
if (tempBtns.length > 0) {
|
|
107191
|
-
continue
|
|
107192
|
-
}
|
|
107193
|
-
visibleBtns[i].isPrimary = true
|
|
107194
|
-
}
|
|
107195
|
-
}
|
|
107196
|
-
function showErrors(errs) {
|
|
107197
|
-
let errors = ''
|
|
107198
|
-
for (let i = 0; i < errs.length; i++) {
|
|
107199
|
-
errors = errors + errs[i] + '\n'
|
|
107200
|
-
}
|
|
107201
|
-
notification.error({
|
|
107202
|
-
style: {
|
|
107203
|
-
whiteSpace: 'pre-wrap'
|
|
107204
|
-
},
|
|
107205
|
-
message: '错误',
|
|
107206
|
-
description: errors,
|
|
107207
|
-
placement: 'topRight'
|
|
107208
|
-
})
|
|
107209
|
-
}
|
|
107210
|
-
function getUuid() {
|
|
107211
|
-
let d = new Date().getTime()
|
|
107212
|
-
let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(
|
|
107213
|
-
c
|
|
107214
|
-
) {
|
|
107215
|
-
let r = (d + Math.random() * 16) % 16 | 0
|
|
107216
|
-
d = Math.floor(d / 16)
|
|
107217
|
-
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
|
|
107218
|
-
})
|
|
107219
|
-
return uuid
|
|
107220
|
-
}
|
|
107221
|
-
async function getFormValidErrors(formView) {
|
|
107222
|
-
let formErrors = []
|
|
107223
|
-
const validFormError = await formView.validate().catch(errMap => errMap)
|
|
107224
|
-
if (validFormError === false) {
|
|
107225
|
-
for (let errorProp in formView.errors) {
|
|
107226
|
-
for (let x = 0; x < formView.errors[errorProp].length; x++) {
|
|
107227
|
-
formErrors.push(errorProp + ':' + formView.errors[errorProp][x])
|
|
107228
|
-
}
|
|
107229
|
-
}
|
|
107230
|
-
}
|
|
107231
|
-
return formErrors
|
|
107232
|
-
}
|
|
107233
|
-
function common_stringUrlQuery(obj) {
|
|
107234
|
-
let strUrlQuery = ''
|
|
107235
|
-
for (let prop in obj) {
|
|
107236
|
-
strUrlQuery = strUrlQuery + prop + '=' + obj[prop] + '&'
|
|
107237
|
-
}
|
|
107238
|
-
if (strUrlQuery.length > 0) {
|
|
107239
|
-
strUrlQuery = strUrlQuery.substring(0, strUrlQuery.length - 1)
|
|
107240
|
-
}
|
|
107241
|
-
return strUrlQuery
|
|
107242
|
-
}
|
|
107243
|
-
function getRouteFullPath(route) {
|
|
107244
|
-
let fullPath = route.path + '?' + common_stringUrlQuery(route.query)
|
|
107245
|
-
return fullPath
|
|
107246
|
-
}
|
|
107247
|
-
async function getGridValidErrors(gridView) {
|
|
107248
|
-
const gridErrors = await gridView.fullValidate()
|
|
107249
|
-
return gridErrors
|
|
107250
|
-
}
|
|
107251
|
-
// EXTERNAL MODULE: ./node_modules/_axios@0.18.0@axios/index.js
|
|
107252
|
-
var _axios_0_18_0_axios = __webpack_require__("7f43");
|
|
107253
|
-
var _axios_0_18_0_axios_default = /*#__PURE__*/__webpack_require__.n(_axios_0_18_0_axios);
|
|
107254
|
-
|
|
107255
107015
|
// CONCATENATED MODULE: ./node_modules/_ant-design-vue@1.7.8@ant-design-vue/es/vc-notification/Notice.js
|
|
107256
107016
|
|
|
107257
107017
|
|
|
@@ -107378,7 +107138,7 @@ function Notification_noop() {}
|
|
|
107378
107138
|
var seed = 0;
|
|
107379
107139
|
var Notification_now = Date.now();
|
|
107380
107140
|
|
|
107381
|
-
function
|
|
107141
|
+
function getUuid() {
|
|
107382
107142
|
return 'rcNotification_' + Notification_now + '_' + seed++;
|
|
107383
107143
|
}
|
|
107384
107144
|
|
|
@@ -107407,7 +107167,7 @@ var Notification = {
|
|
|
107407
107167
|
return transitionName;
|
|
107408
107168
|
},
|
|
107409
107169
|
add: function add(notice) {
|
|
107410
|
-
var key = notice.key = notice.key ||
|
|
107170
|
+
var key = notice.key = notice.key || getUuid();
|
|
107411
107171
|
var maxCount = this.$props.maxCount;
|
|
107412
107172
|
|
|
107413
107173
|
this.setState(function (previousState) {
|
|
@@ -107785,7 +107545,269 @@ var api = {
|
|
|
107785
107545
|
});
|
|
107786
107546
|
|
|
107787
107547
|
api.warn = api.warning;
|
|
107788
|
-
/* harmony default export */ var
|
|
107548
|
+
/* harmony default export */ var notification = (api);
|
|
107549
|
+
// CONCATENATED MODULE: ./packages/utils/common.js
|
|
107550
|
+
|
|
107551
|
+
/**
|
|
107552
|
+
* 替换掩码参数字符串
|
|
107553
|
+
* @param {参数字符串} paramString
|
|
107554
|
+
* @param {当前页面数据集} formData
|
|
107555
|
+
*/
|
|
107556
|
+
function replaceParamString(
|
|
107557
|
+
paramString,
|
|
107558
|
+
formData,
|
|
107559
|
+
currentModuleSelectInfo
|
|
107560
|
+
) {
|
|
107561
|
+
// hh添加
|
|
107562
|
+
let tempStr = paramString
|
|
107563
|
+
while (true) {
|
|
107564
|
+
if (tempStr.indexOf('@Fn(') < 0) {
|
|
107565
|
+
break
|
|
107566
|
+
}
|
|
107567
|
+
let tempReplaceParam = tempStr.substr(tempStr.indexOf('@Fn('))
|
|
107568
|
+
tempReplaceParam = tempReplaceParam.substr(
|
|
107569
|
+
0,
|
|
107570
|
+
tempReplaceParam.indexOf(')') + 1
|
|
107571
|
+
) // 查找掩码参数
|
|
107572
|
+
let tempDataFields = tempReplaceParam
|
|
107573
|
+
.substr(0, tempReplaceParam.length - 1)
|
|
107574
|
+
.substr(4)
|
|
107575
|
+
.split('.')
|
|
107576
|
+
let tempReplaceValue = null
|
|
107577
|
+
if (tempDataFields[0] === '') {
|
|
107578
|
+
// 取主表数据
|
|
107579
|
+
tempReplaceValue = formData[tempDataFields[1]]
|
|
107580
|
+
} else {
|
|
107581
|
+
if (formData[tempDataFields[0]] instanceof Array) {
|
|
107582
|
+
let tempSelectItemInfo = currentModuleSelectInfo.filter(filterItem => {
|
|
107583
|
+
return filterItem.attrDataName === tempDataFields[0]
|
|
107584
|
+
})
|
|
107585
|
+
if (tempSelectItemInfo.length > 0) {
|
|
107586
|
+
let tempKeyFieldValue =
|
|
107587
|
+
tempSelectItemInfo[0].selectItem[tempSelectItemInfo[0].keyField]
|
|
107588
|
+
let tempActualRow = formData[tempDataFields[0]].filter(filterItem => {
|
|
107589
|
+
return (
|
|
107590
|
+
filterItem[tempSelectItemInfo[0].keyField] === tempKeyFieldValue
|
|
107591
|
+
)
|
|
107592
|
+
})
|
|
107593
|
+
if (tempActualRow.length > 0) {
|
|
107594
|
+
tempReplaceValue = tempActualRow[0][tempDataFields[1]]
|
|
107595
|
+
}
|
|
107596
|
+
}
|
|
107597
|
+
} else {
|
|
107598
|
+
tempReplaceValue = formData[tempDataFields[0]][tempDataFields[1]]
|
|
107599
|
+
}
|
|
107600
|
+
}
|
|
107601
|
+
//刘松嗣临时处理
|
|
107602
|
+
if (tempReplaceValue == undefined) {
|
|
107603
|
+
tempReplaceValue = '0'
|
|
107604
|
+
}
|
|
107605
|
+
tempStr = tempStr.substr(
|
|
107606
|
+
tempStr.indexOf(tempReplaceParam) + tempReplaceParam.length
|
|
107607
|
+
)
|
|
107608
|
+
|
|
107609
|
+
if (typeof tempReplaceValue === 'string') {
|
|
107610
|
+
paramString = paramString.replace(
|
|
107611
|
+
tempReplaceParam,
|
|
107612
|
+
'"' + tempReplaceValue + '"'
|
|
107613
|
+
)
|
|
107614
|
+
tempStr = tempStr.replace(tempReplaceParam, '"' + tempReplaceValue + '"')
|
|
107615
|
+
} else {
|
|
107616
|
+
paramString = paramString.replace(tempReplaceParam, tempReplaceValue)
|
|
107617
|
+
tempStr = tempStr.replace(tempReplaceParam, tempReplaceValue)
|
|
107618
|
+
}
|
|
107619
|
+
}
|
|
107620
|
+
return paramString
|
|
107621
|
+
}
|
|
107622
|
+
|
|
107623
|
+
/**
|
|
107624
|
+
* 替换掩码参数字符串
|
|
107625
|
+
* @param {参数字符串} paramString
|
|
107626
|
+
* @param {当前页面数据集} formData
|
|
107627
|
+
*/
|
|
107628
|
+
function replaceParam(paramString, formData) {
|
|
107629
|
+
let tempStr = paramString
|
|
107630
|
+
while (true) {
|
|
107631
|
+
if (tempStr.indexOf('@Fn(') < 0) {
|
|
107632
|
+
break
|
|
107633
|
+
}
|
|
107634
|
+
let tempReplaceParam = tempStr.substr(tempStr.indexOf('@Fn('))
|
|
107635
|
+
tempReplaceParam = tempReplaceParam.substr(
|
|
107636
|
+
0,
|
|
107637
|
+
tempReplaceParam.indexOf(')') + 1
|
|
107638
|
+
) // 查找掩码参数
|
|
107639
|
+
let tempDataFields = tempReplaceParam
|
|
107640
|
+
.substr(0, tempReplaceParam.length - 1)
|
|
107641
|
+
.substr(4)
|
|
107642
|
+
.split('.')
|
|
107643
|
+
let tempReplaceValue = null
|
|
107644
|
+
if (tempDataFields[0] === '') {
|
|
107645
|
+
// 取主表数据
|
|
107646
|
+
tempReplaceValue = formData[tempDataFields[1]]
|
|
107647
|
+
} else {
|
|
107648
|
+
tempReplaceValue = formData[tempDataFields[0]][tempDataFields[1]]
|
|
107649
|
+
}
|
|
107650
|
+
tempStr = tempStr.substr(
|
|
107651
|
+
tempStr.indexOf(tempReplaceParam) + tempReplaceParam.length
|
|
107652
|
+
)
|
|
107653
|
+
|
|
107654
|
+
// if (typeof tempReplaceValue === 'string') {
|
|
107655
|
+
// paramString = paramString.replace(
|
|
107656
|
+
// tempReplaceParam,
|
|
107657
|
+
// '"' + tempReplaceValue + '"'
|
|
107658
|
+
// )
|
|
107659
|
+
// tempStr = tempStr.replace(tempReplaceParam, '"' + tempReplaceValue + '"')
|
|
107660
|
+
// } else {
|
|
107661
|
+
paramString = paramString.replace(tempReplaceParam, tempReplaceValue)
|
|
107662
|
+
tempStr = tempStr.replace(tempReplaceParam, tempReplaceValue)
|
|
107663
|
+
// }
|
|
107664
|
+
}
|
|
107665
|
+
return paramString
|
|
107666
|
+
}
|
|
107667
|
+
|
|
107668
|
+
function setFrameColState(formCols, formState, formStatus) {
|
|
107669
|
+
for (let prop in formCols) {
|
|
107670
|
+
if (formCols[prop].editStates instanceof Array) {
|
|
107671
|
+
let exists = formCols[prop].editStates.filter(item => {
|
|
107672
|
+
//editState:['add','edit']
|
|
107673
|
+
return item === formState // view === add|edit formState :view|add|edit
|
|
107674
|
+
}) //[]
|
|
107675
|
+
if (exists.length > 0) {
|
|
107676
|
+
formCols[prop].edit = true
|
|
107677
|
+
} else {
|
|
107678
|
+
formCols[prop].edit = false
|
|
107679
|
+
}
|
|
107680
|
+
}
|
|
107681
|
+
// 单据状态控制
|
|
107682
|
+
if (
|
|
107683
|
+
formStatus &&
|
|
107684
|
+
formCols[prop].editStatuss instanceof Array &&
|
|
107685
|
+
formCols[prop].editStatuss.length > 0 &&
|
|
107686
|
+
formCols[prop].edit === true
|
|
107687
|
+
) {
|
|
107688
|
+
let formStatusExists = formCols[prop].editStatuss.filter(item => {
|
|
107689
|
+
//editStatuss:[,'publish',]
|
|
107690
|
+
return item === formStatus // formStatus:'draft'
|
|
107691
|
+
})
|
|
107692
|
+
if (formStatusExists.length > 0) {
|
|
107693
|
+
formCols[prop].edit = true
|
|
107694
|
+
} else {
|
|
107695
|
+
formCols[prop].edit = false
|
|
107696
|
+
}
|
|
107697
|
+
}
|
|
107698
|
+
// Vue.set(formCols, i, formCols[i])
|
|
107699
|
+
}
|
|
107700
|
+
}
|
|
107701
|
+
function setFrameToolBtnState(toolBars, formState, formStatus) {
|
|
107702
|
+
for (let i = 0; i < toolBars.length; i++) {
|
|
107703
|
+
toolBars[i].visible = false
|
|
107704
|
+
toolBars[i].isPrimary = false
|
|
107705
|
+
if (
|
|
107706
|
+
toolBars[i].visibleStates &&
|
|
107707
|
+
toolBars[i].visibleStates.indexOf(formState) >= 0
|
|
107708
|
+
) {
|
|
107709
|
+
toolBars[i].visible = true
|
|
107710
|
+
}
|
|
107711
|
+
if (formStatus && toolBars[i].visibleStatuss && toolBars[i].visible) {
|
|
107712
|
+
toolBars[i].visible = toolBars[i].visibleStatuss.indexOf(formStatus) >= 0
|
|
107713
|
+
}
|
|
107714
|
+
}
|
|
107715
|
+
// 查找优先级最大的并且显示的设置按钮强调色
|
|
107716
|
+
let visibleBtns = toolBars.filter(filterItem => {
|
|
107717
|
+
return filterItem.visible === true
|
|
107718
|
+
})
|
|
107719
|
+
//循环数组查找出小于自身的priority优先级 优先级高设置按钮强调色
|
|
107720
|
+
for (let i = 0; i < visibleBtns.length; i++) {
|
|
107721
|
+
let tempPriority = visibleBtns[i].priority
|
|
107722
|
+
let tempBtns = visibleBtns.filter(filterItem => {
|
|
107723
|
+
return filterItem.priority < tempPriority
|
|
107724
|
+
})
|
|
107725
|
+
//如果找到小于自身优先级的数量>0就说明还有更小的跳出本次不设置true继续查找
|
|
107726
|
+
if (tempBtns.length > 0) {
|
|
107727
|
+
continue
|
|
107728
|
+
}
|
|
107729
|
+
visibleBtns[i].isPrimary = true
|
|
107730
|
+
}
|
|
107731
|
+
}
|
|
107732
|
+
function showErrors(errs) {
|
|
107733
|
+
let errors = ''
|
|
107734
|
+
for (let i = 0; i < errs.length; i++) {
|
|
107735
|
+
errors = errors + errs[i] + '\n'
|
|
107736
|
+
}
|
|
107737
|
+
notification.error({
|
|
107738
|
+
style: {
|
|
107739
|
+
whiteSpace: 'pre-wrap'
|
|
107740
|
+
},
|
|
107741
|
+
message: '错误',
|
|
107742
|
+
description: errors,
|
|
107743
|
+
placement: 'topRight'
|
|
107744
|
+
})
|
|
107745
|
+
}
|
|
107746
|
+
function common_getUuid() {
|
|
107747
|
+
let d = new Date().getTime()
|
|
107748
|
+
let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(
|
|
107749
|
+
c
|
|
107750
|
+
) {
|
|
107751
|
+
let r = (d + Math.random() * 16) % 16 | 0
|
|
107752
|
+
d = Math.floor(d / 16)
|
|
107753
|
+
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
|
|
107754
|
+
})
|
|
107755
|
+
return uuid
|
|
107756
|
+
}
|
|
107757
|
+
async function getFormValidErrors(formView) {
|
|
107758
|
+
let formErrors = []
|
|
107759
|
+
const validFormError = await formView.validate().catch(errMap => errMap)
|
|
107760
|
+
if (validFormError === false) {
|
|
107761
|
+
for (let errorProp in formView.errors) {
|
|
107762
|
+
for (let x = 0; x < formView.errors[errorProp].length; x++) {
|
|
107763
|
+
formErrors.push(errorProp + ':' + formView.errors[errorProp][x])
|
|
107764
|
+
}
|
|
107765
|
+
}
|
|
107766
|
+
}
|
|
107767
|
+
return formErrors
|
|
107768
|
+
}
|
|
107769
|
+
function common_stringUrlQuery(obj) {
|
|
107770
|
+
let strUrlQuery = ''
|
|
107771
|
+
for (let prop in obj) {
|
|
107772
|
+
strUrlQuery = strUrlQuery + prop + '=' + obj[prop] + '&'
|
|
107773
|
+
}
|
|
107774
|
+
if (strUrlQuery.length > 0) {
|
|
107775
|
+
strUrlQuery = strUrlQuery.substring(0, strUrlQuery.length - 1)
|
|
107776
|
+
}
|
|
107777
|
+
return strUrlQuery
|
|
107778
|
+
}
|
|
107779
|
+
function getRouteFullPath(route) {
|
|
107780
|
+
let fullPath = route.path + '?' + common_stringUrlQuery(route.query)
|
|
107781
|
+
return fullPath
|
|
107782
|
+
}
|
|
107783
|
+
async function getGridValidErrors(gridView) {
|
|
107784
|
+
const gridErrors = await gridView.fullValidate()
|
|
107785
|
+
return gridErrors
|
|
107786
|
+
}
|
|
107787
|
+
function routeBeforeEach(to, from, next){
|
|
107788
|
+
if(to.params.aliveCacheKey){
|
|
107789
|
+
to.meta['aliveCacheKey'] = to.params.aliveCacheKey
|
|
107790
|
+
}
|
|
107791
|
+
if(!to.meta.aliveCacheKey){
|
|
107792
|
+
alert('防呆,子应用没有路由缓存键')
|
|
107793
|
+
}
|
|
107794
|
+
if (to.meta.moduleCode && !store.getters.moduleViewInfo[to.meta.moduleCode]) {
|
|
107795
|
+
store
|
|
107796
|
+
.dispatch('moduleLoadViewInfo', { moduleCode: to.meta.moduleCode })
|
|
107797
|
+
.then(() => {
|
|
107798
|
+
next()
|
|
107799
|
+
})
|
|
107800
|
+
.catch((err) => {
|
|
107801
|
+
console.debug(err)
|
|
107802
|
+
})
|
|
107803
|
+
} else {
|
|
107804
|
+
next()
|
|
107805
|
+
}
|
|
107806
|
+
}
|
|
107807
|
+
// EXTERNAL MODULE: ./node_modules/_axios@0.18.0@axios/index.js
|
|
107808
|
+
var _axios_0_18_0_axios = __webpack_require__("7f43");
|
|
107809
|
+
var _axios_0_18_0_axios_default = /*#__PURE__*/__webpack_require__.n(_axios_0_18_0_axios);
|
|
107810
|
+
|
|
107789
107811
|
// CONCATENATED MODULE: ./packages/utils/api.js
|
|
107790
107812
|
|
|
107791
107813
|
|
|
@@ -107972,7 +107994,7 @@ service.interceptors.response.use(
|
|
|
107972
107994
|
utils_store.dispatch('logOut')
|
|
107973
107995
|
return Promise.reject(res.msg)
|
|
107974
107996
|
}
|
|
107975
|
-
|
|
107997
|
+
notification.error({
|
|
107976
107998
|
message: '错误信息',
|
|
107977
107999
|
description: h => {
|
|
107978
108000
|
return h('div', null, [
|
|
@@ -108000,7 +108022,7 @@ service.interceptors.response.use(
|
|
|
108000
108022
|
} else {
|
|
108001
108023
|
errorMsg = error.msg
|
|
108002
108024
|
}
|
|
108003
|
-
|
|
108025
|
+
notification['error']({ message: '错误信息', description: errorMsg })
|
|
108004
108026
|
return Promise.reject(error)
|
|
108005
108027
|
}
|
|
108006
108028
|
)
|
|
@@ -113119,13 +113141,13 @@ function removeRefreshToken() {
|
|
|
113119
113141
|
beforeAvatarUpload(file) {
|
|
113120
113142
|
// const isPic = file.type === 'image/jpeg' || file.type === 'image/png'
|
|
113121
113143
|
if (file.size / 1024 / 1024 > this.limitSize) {
|
|
113122
|
-
|
|
113144
|
+
notification.error({
|
|
113123
113145
|
message: '错误',
|
|
113124
113146
|
description: '上传图片大小不能超过 ' + this.limitSize + 'MB!'
|
|
113125
113147
|
})
|
|
113126
113148
|
}
|
|
113127
113149
|
if (this.limitType.length > 0 && !this.limitType[file.type]) {
|
|
113128
|
-
|
|
113150
|
+
notification.error({
|
|
113129
113151
|
message: '错误',
|
|
113130
113152
|
description: '上传附件格式错误!'
|
|
113131
113153
|
})
|