diff --git a/jero-web/src/components/jero/JAreaLinkage.vue b/jero-web/src/components/jero/JAreaLinkage.vue
index b00cbd8d..7141f456 100644
--- a/jero-web/src/components/jero/JAreaLinkage.vue
+++ b/jero-web/src/components/jero/JAreaLinkage.vue
@@ -117,7 +117,7 @@ export default {
const data = this.pcaa[value]
if (data) {
for (const key in data) {
- if (data.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
options.push({ value: key, label: data[key] })
}
}
diff --git a/jero-web/src/components/jero/JEditableTable.vue b/jero-web/src/components/jero/JEditableTable.vue
index 1eadb12b..05848c01 100644
--- a/jero-web/src/components/jero/JEditableTable.vue
+++ b/jero-web/src/components/jero/JEditableTable.vue
@@ -946,7 +946,9 @@ export default {
showClearSelectButton () {
let count = 0
for (const key in this.disabledRows) {
- if (this.disabledRows.hasOwnProperty(key)) count++
+ if (Object.prototype.hasOwnProperty.call(this.disabledRows, key)) {
+ count++
+ }
}
return count > 0
},
@@ -1318,7 +1320,8 @@ export default {
// 解析disabledRows
for (const columnKey in this.disabledRows) {
// 判断是否有该属性
- if (this.disabledRows.hasOwnProperty(columnKey) && data.hasOwnProperty(columnKey)) {
+ // if (this.disabledRows.hasOwnProperty(columnKey) && data.hasOwnProperty(columnKey)) {
+ if (Object.prototype.hasOwnProperty.call(this.disabledRows, columnKey) && Object.prototype.hasOwnProperty.call(data, columnKey)) {
if (disabled !== true) {
const temp = this.disabledRows[columnKey]
// 禁用规则可以是一个数组
@@ -1659,7 +1662,8 @@ export default {
if (asyncCount === 0) {
clearInterval(timer)
if (typeof callback === 'function') {
- callback({ error, values })
+ const params = { error, values }
+ callback(params)
}
}
}, 10)
@@ -1741,7 +1745,7 @@ export default {
let { rowKey, values: newValues } = item
rowKey = this.getCleanId(rowKey)
for (const newValueKey in newValues) {
- if (newValues.hasOwnProperty(newValueKey)) {
+ if (Object.prototype.hasOwnProperty.call(newValues, newValueKey)) {
let edited = false // 已被修改
for (const column of this.columns) {
if (column.key === newValueKey) {
@@ -1749,7 +1753,7 @@ export default {
this.inputValues.forEach(value => {
// 在inputValues中找到了该字段
if (rowKey === this.getCleanId(value.id)) {
- if (value.hasOwnProperty(newValueKey)) {
+ if (Object.prototype.hasOwnProperty.call(value, newValueKey)) {
edited = true
value[newValueKey] = newValue
}
@@ -1839,10 +1843,10 @@ export default {
},
valuesHasOwnProperty (values, ownProperty) {
const key = ownProperty
- if (values.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(values, key)) {
return key
}
- if (values.hasOwnProperty(key + this.tempId)) {
+ if (Object.prototype.hasOwnProperty.call(values, key + this.tempId)) {
return key + this.tempId
}
return null
@@ -1900,7 +1904,8 @@ export default {
}
if (typeof callback === 'function') {
- callback([tooltips[inputId], notPassedIds])
+ const param = [tooltips[inputId], notPassedIds]
+ callback(param)
}
}
@@ -2026,7 +2031,7 @@ export default {
const { idx } = tr.dataset
const value = this.inputValues[idx]
for (const key in value) {
- if (value.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(value, key)) {
const elid = `${key}${value.id}`
const el = document.getElementById(elid)
if (el) {
@@ -2052,7 +2057,7 @@ export default {
// 重新计算单个统计列
recalcOneStatisticsColumn (key) {
if (this.hasStatisticsColumn) {
- if (this.statisticsColumns.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(this.statisticsColumns, key)) {
// 计算合计值
let count = 0
this.inputValues.forEach(item => {
@@ -2073,7 +2078,7 @@ export default {
/** 获取某个统计字段的值 */
getStatisticsValue (key) {
if (this.hasStatisticsColumn) {
- if (this.statisticsColumns.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(this.statisticsColumns, key)) {
return this.statisticsColumns[key]
}
}
@@ -2707,7 +2712,7 @@ export default {
// 解析props
if (typeof col.props === 'object') {
for (const prop in col.props) {
- if (col.props.hasOwnProperty(prop)) {
+ if (Object.prototype.hasOwnProperty.call(col.props, prop)) {
props[prop] = this.replaceProps(col, col.props[prop])
}
}
diff --git a/jero-web/src/components/jero/JSlider.vue b/jero-web/src/components/jero/JSlider.vue
index da0f2340..7b2da771 100644
--- a/jero-web/src/components/jero/JSlider.vue
+++ b/jero-web/src/components/jero/JSlider.vue
@@ -101,11 +101,11 @@ export default {
.drag_bg{
background-color: #7ac23c;
height: 34px;
- width: 0px;
+ width: 0;
}
.drag_text{
position: absolute;
- top: 0px;
+ top: 0;
width: 100%;text-align: center;
-moz-user-select: none;
-webkit-user-select: none;
diff --git a/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js b/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js
index af29d3c6..40251fab 100644
--- a/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js
+++ b/jero-web/src/components/jero/JVxeTable/components/JVxeTable.js
@@ -178,7 +178,7 @@ export default {
}
// slot 组件特殊处理
if (column.$type === JVXETypes.slot) {
- if (this.$scopedSlots.hasOwnProperty(column.slotName)) {
+ if (Object.prototype.hasOwnProperty.call(this.$scopedSlots, column.slotName)) {
renderOptions.slot = this.$scopedSlots[column.slotName]
renderOptions.target = this
}
@@ -264,7 +264,7 @@ export default {
// 用户传递的事件,进行合并操作
Object.keys(this.$listeners).forEach(key => {
let listen = this.$listeners[key]
- if (events.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(events, key)) {
if (Array.isArray(listen)) {
listen.push(events[key])
} else {
diff --git a/jero-web/src/components/jero/JVxeTable/install.js b/jero-web/src/components/jero/JVxeTable/install.js
index d5037179..e28a31cc 100644
--- a/jero-web/src/components/jero/JVxeTable/install.js
+++ b/jero-web/src/components/jero/JVxeTable/install.js
@@ -1,5 +1,5 @@
import Vue from 'vue'
-import { getEventPath } from '@/utils/util'
+import { getEventPath, evil } from '@/utils/util'
import JVxeTable, { AllCells, JVXETypes } from './index'
import './less/j-vxe-table.less'
// 引入 vxe-table
@@ -14,7 +14,7 @@ import { getEnhancedMixins, installAllCell, installOneCell } from '@/components/
const VxeGridMethodsMap = {}
Object.keys(Grid.methods).forEach(key => {
// 使用eval可以避免闭包(但是要注意不要写es6的代码)
- VxeGridMethodsMap[key] = eval(`(function(){return this.$refs.vxe.${key}.apply(this.$refs.vxe,arguments)})`)
+ VxeGridMethodsMap[key] = evil(`(function(){return this.$refs.vxe.${key}.apply(this.$refs.vxe,arguments)})`)
})
// 将Grid所有的方法都映射(继承)到JVxeTable上
JVxeTable.methods = Object.assign({}, VxeGridMethodsMap, JVxeTable.methods)
diff --git a/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js b/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js
index 68b5c709..cfdee88a 100644
--- a/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js
+++ b/jero-web/src/components/jero/JVxeTable/mixins/JVxeCellMixins.js
@@ -105,7 +105,9 @@ export default {
const res = this.enhanced.translate.handler.call(this, value)
// 异步翻译,目前仅【多级联动】使用
if (res instanceof Promise) {
- res.then(value => this.innerValue = value)
+ res.then(value => {
+ this.innerValue = value
+ })
} else {
this.innerValue = res
}
diff --git a/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js b/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js
index 44a3032d..9b8b0675 100644
--- a/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js
+++ b/jero-web/src/components/jero/JVxeTable/utils/cellUtils.js
@@ -99,7 +99,7 @@ export function getEnhancedMixins (type, name) {
if (enhanced) {
Object.keys(defEnhanced).forEach(key => {
const def = defEnhanced[key]
- if (enhanced.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(enhanced, key)) {
// 方法如果存在就不覆盖
if (typeof def !== 'function' && typeof def !== 'string') {
enhanced[key] = Object.assign({}, def, enhanced[key])
diff --git a/jero-web/src/components/jero/index.js b/jero-web/src/components/jero/index.js
index a699c7a0..9369eaaf 100644
--- a/jero-web/src/components/jero/index.js
+++ b/jero-web/src/components/jero/index.js
@@ -34,6 +34,8 @@ import JSelectRole from '../jerobiz/JSelectRole.vue'
import JSelectUserByDep from '../jerobiz/JSelectUserByDep.vue'
// 引入需要全局注册的js函数和变量
import { Modal, notification, message } from 'ant-design-vue'
+
+// eslint-disable-next-line camelcase
import lodash_object from 'lodash'
import debounce from 'lodash/debounce'
import pick from 'lodash.pick'
@@ -81,6 +83,7 @@ export default {
Vue.prototype.$Jnotification = notification
Vue.prototype.$Jmodal = Modal
Vue.prototype.$Jmessage = message
+ // eslint-disable-next-line camelcase
Vue.prototype.$Jlodash = lodash_object
Vue.prototype.$Jdebounce = debounce
Vue.prototype.$Jpick = pick
diff --git a/jero-web/src/components/layouts/IframePageView.vue b/jero-web/src/components/layouts/IframePageView.vue
index 8afb4843..ef4c9b5c 100644
--- a/jero-web/src/components/layouts/IframePageView.vue
+++ b/jero-web/src/components/layouts/IframePageView.vue
@@ -1,7 +1,5 @@
-
-
-
+