fix eslint: expected '!==' but instead saw '!=', expected '===' but instead saw '=='

This commit is contained in:
chengshiwen 2020-12-12 00:01:35 +08:00
parent cfcae24958
commit e7501f75e3
42 changed files with 120 additions and 120 deletions

View File

@ -384,7 +384,7 @@
let state = dom.find('.state-p') let state = dom.find('.state-p')
let depState = '' let depState = ''
taskList.forEach(item => { taskList.forEach(item => {
if (item.name == v1.name) { if (item.name === v1.name) {
depState = item.state depState = item.state
} }
}) })
@ -511,7 +511,7 @@
}, },
_closeDAG () { _closeDAG () {
let $name = this.$route.name let $name = this.$route.name
if ($name && $name.indexOf('definition') != -1) { if ($name && $name.indexOf('definition') !== -1) {
this.$router.push({ name: 'projects-definition-list' }) this.$router.push({ name: 'projects-definition-list' })
} else { } else {
this.$router.push({ name: 'projects-instance-list' }) this.$router.push({ name: 'projects-instance-list' })
@ -521,7 +521,7 @@
let tasks = value let tasks = value
let bool = true let bool = true
tasks.map(v => { tasks.map(v => {
if (v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] == '' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] == '' || v.conditionResult.failedNode[0] == null)) { if (v.type === 'CONDITIONS' && (v.conditionResult.successNode[0] === '' || v.conditionResult.successNode[0] === null || v.conditionResult.failedNode[0] === '' || v.conditionResult.failedNode[0] === null)) {
bool = false bool = false
return false return false
} }
@ -694,7 +694,7 @@
this.nodeDrawer = true this.nodeDrawer = true
}, },
removeEventModelById ($id) { removeEventModelById ($id) {
if (eventModel && this.taskId == $id) { if (eventModel && this.taskId === $id) {
eventModel.remove() eventModel.remove()
} }
}, },

View File

@ -522,7 +522,7 @@
this.$message.warning(`${i18n.$t('Please enter name (required)')}`) this.$message.warning(`${i18n.$t('Please enter name (required)')}`)
return false return false
} }
if (this.successBranch != '' && this.successBranch != null && this.successBranch == this.failedBranch) { if (this.successBranch !== '' && this.successBranch !== null && this.successBranch === this.failedBranch) {
this.$message.warning(`${i18n.$t('Cannot select the same node for successful branch flow and failed branch flow')}`) this.$message.warning(`${i18n.$t('Cannot select the same node for successful branch flow and failed branch flow')}`)
return false return false
} }
@ -538,9 +538,9 @@
}, },
_verifWorkGroup () { _verifWorkGroup () {
let item = this.store.state.security.workerGroupsListAll.find(item => { let item = this.store.state.security.workerGroupsListAll.find(item => {
return item.id == this.workerGroup return item.id === this.workerGroup
}) })
if (item == undefined) { if (item === undefined) {
this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`) this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`)
return false return false
} }
@ -601,7 +601,7 @@
let currentConnects = plumbIns.getAllConnections() let currentConnects = plumbIns.getAllConnections()
let len = currentConnects.length let len = currentConnects.length
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
if (this.preTasksToDelete.indexOf(currentConnects[i].sourceId) > -1 && currentConnects[i].targetId == targetId) { if (this.preTasksToDelete.indexOf(currentConnects[i].sourceId) > -1 && currentConnects[i].targetId === targetId) {
plumbIns.deleteConnection(currentConnects[i]) plumbIns.deleteConnection(currentConnects[i])
i -= 1 i -= 1
len -= 1 len -= 1
@ -727,12 +727,12 @@
var hasMatch = false var hasMatch = false
for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) { for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) {
var workerGroup = this.store.state.security.workerGroupsListAll[i].id var workerGroup = this.store.state.security.workerGroupsListAll[i].id
if (o.workerGroup == workerGroup) { if (o.workerGroup === workerGroup) {
hasMatch = true hasMatch = true
break break
} }
} }
if (o.workerGroup == undefined) { if (o.workerGroup === undefined) {
this.store.dispatch('dag/getTaskInstanceList', { this.store.dispatch('dag/getTaskInstanceList', {
pageSize: 10, pageNo: 1, processInstanceId: this.nodeData.instanceId, name: o.name pageSize: 10, pageNo: 1, processInstanceId: this.nodeData.instanceId, name: o.name
}).then(res => { }).then(res => {

View File

@ -61,7 +61,7 @@
}, },
created () { created () {
this.$nextTick(() => { this.$nextTick(() => {
if (this.sqlType != 0) { if (this.sqlType !== 0) {
this.sqlTypeId = this.sqlType this.sqlTypeId = this.sqlType
} else { } else {
this.sqlTypeId = this.sqlTypeList[0].id this.sqlTypeId = this.sqlTypeList[0].id

View File

@ -152,7 +152,7 @@
// Process instance return status display matches by key // Process instance return status display matches by key
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => { _.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => {
$(`#${o.id}`).siblings().each(function () { $(`#${o.id}`).siblings().each(function () {
if (v1.depTasks == $(this).text()) { if (v1.depTasks === $(this).text()) {
v1.state = $(this).attr('data-dependent-depstate') v1.state = $(this).attr('data-dependent-depstate')
} }
}) })

View File

@ -453,7 +453,7 @@
this.xms = o.params.xms || 1 this.xms = o.params.xms || 1
this.xmx = o.params.xmx || 1 this.xmx = o.params.xmx || 1
// backfill // backfill
if (o.params.customConfig == 0) { if (o.params.customConfig === 0) {
this.customConfig = 0 this.customConfig = 0
this.enable = false this.enable = false
this.dsType = o.params.dsType || '' this.dsType = o.params.dsType || ''

View File

@ -356,12 +356,12 @@
}, },
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id === id) {
return element return element
} else if (element.children != null) { } else if (element.children !== null) {
var i var i
var result = null var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id) result = this.searchTree(element.children[i], id)
} }
return result return result
@ -390,7 +390,7 @@
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
backResource.forEach(item1 => { backResource.forEach(item1 => {
if (item == item1.id || item == item1.res) { if (item === item1.id || item === item1.res) {
optionsCmp.push(item1) optionsCmp.push(item1)
} }
}) })
@ -447,7 +447,7 @@
let result = [] let result = []
resourceIdArr.forEach(item => { resourceIdArr.forEach(item => {
this.allNoResources.forEach(item1 => { this.allNoResources.forEach(item1 => {
if (item.id == item1.id) { if (item.id === item1.id) {
// resultBool = true // resultBool = true
result.push(item1) result.push(item1)
} }
@ -485,7 +485,7 @@
this.mainClass = o.params.mainClass || '' this.mainClass = o.params.mainClass || ''
if (o.params.mainJar.res) { if (o.params.mainJar.res) {
this.marjarId(o.params.mainJar.res) this.marjarId(o.params.mainJar.res)
} else if (o.params.mainJar.res == '') { } else if (o.params.mainJar.res === '') {
this.mainJar = '' this.mainJar = ''
} else { } else {
this.mainJar = o.params.mainJar.id || '' this.mainJar = o.params.mainJar.id || ''

View File

@ -153,7 +153,7 @@
httpMethod: 'GET', httpMethod: 'GET',
httpMethodList: [{ code: 'GET' }, { code: 'POST' }, { code: 'HEAD' }, { code: 'PUT' }, { code: 'DELETE' }], httpMethodList: [{ code: 'GET' }, { code: 'POST' }, { code: 'HEAD' }, { code: 'PUT' }, { code: 'DELETE' }],
httpCheckCondition: 'STATUS_CODE_DEFAULT', httpCheckCondition: 'STATUS_CODE_DEFAULT',
httpCheckConditionList: cookies.get('language') == 'en_US' ? [{ code: 'STATUS_CODE_DEFAULT', value: 'Default response code 200' }, { code: 'STATUS_CODE_CUSTOM', value: 'Custom response code' }, { code: 'BODY_CONTAINS', value: 'Content includes' }, { code: 'BODY_NOT_CONTAINS', value: 'Content does not contain' }] : [{ code: 'STATUS_CODE_DEFAULT', value: '默认响应码200' }, { code: 'STATUS_CODE_CUSTOM', value: '自定义响应码' }, { code: 'BODY_CONTAINS', value: '内容包含' }, { code: 'BODY_NOT_CONTAINS', value: '内容不包含' }] httpCheckConditionList: cookies.get('language') === 'en_US' ? [{ code: 'STATUS_CODE_DEFAULT', value: 'Default response code 200' }, { code: 'STATUS_CODE_CUSTOM', value: 'Custom response code' }, { code: 'BODY_CONTAINS', value: 'Content includes' }, { code: 'BODY_NOT_CONTAINS', value: 'Content does not contain' }] : [{ code: 'STATUS_CODE_DEFAULT', value: '默认响应码200' }, { code: 'STATUS_CODE_CUSTOM', value: '自定义响应码' }, { code: 'BODY_CONTAINS', value: '内容包含' }, { code: 'BODY_NOT_CONTAINS', value: '内容不包含' }]
} }
}, },
props: { props: {
@ -243,7 +243,7 @@
this.condition = o.params.condition || '' this.condition = o.params.condition || ''
this.connectTimeout = o.params.connectTimeout this.connectTimeout = o.params.connectTimeout
this.socketTimeout = o.params.socketTimeout this.socketTimeout = o.params.socketTimeout
if (this.connectTimeout != 60000 || this.socketTimeout != 60000) { if (this.connectTimeout !== 60000 || this.socketTimeout !== 60000) {
this.timeoutSettings = true this.timeoutSettings = true
} }
// backfill localParams // backfill localParams

View File

@ -190,12 +190,12 @@
}, },
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id === id) {
return element return element
} else if (element.children != null) { } else if (element.children !== null) {
var i var i
var result = null var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id) result = this.searchTree(element.children[i], id)
} }
return result return result
@ -224,7 +224,7 @@
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
backResource.forEach(item1 => { backResource.forEach(item1 => {
if (item == item1.id || item == item1.res) { if (item === item1.id || item === item1.res) {
optionsCmp.push(item1) optionsCmp.push(item1)
} }
}) })
@ -324,7 +324,7 @@
let result = [] let result = []
resourceIdArr.forEach(item => { resourceIdArr.forEach(item => {
this.allNoResources.forEach(item1 => { this.allNoResources.forEach(item1 => {
if (item.id == item1.id) { if (item.id === item1.id) {
// resultBool = true // resultBool = true
result.push(item1) result.push(item1)
} }
@ -358,7 +358,7 @@
this.mainClass = o.params.mainClass || '' this.mainClass = o.params.mainClass || ''
if (o.params.mainJar.res) { if (o.params.mainJar.res) {
this.marjarId(o.params.mainJar.res) this.marjarId(o.params.mainJar.res)
} else if (o.params.mainJar.res == '') { } else if (o.params.mainJar.res === '') {
this.mainJar = '' this.mainJar = ''
} else { } else {
this.mainJar = o.params.mainJar.id || '' this.mainJar = o.params.mainJar.id || ''

View File

@ -195,12 +195,12 @@
}, },
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id === id) {
return element return element
} else if (element.children != null) { } else if (element.children !== null) {
var i var i
var result = null var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id) result = this.searchTree(element.children[i], id)
} }
return result return result
@ -229,7 +229,7 @@
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
backResource.forEach(item1 => { backResource.forEach(item1 => {
if (item == item1.id || item == item1.res) { if (item === item1.id || item === item1.res) {
optionsCmp.push(item1) optionsCmp.push(item1)
} }
}) })
@ -280,7 +280,7 @@
let result = [] let result = []
resourceIdArr.forEach(item => { resourceIdArr.forEach(item => {
this.allNoResources.forEach(item1 => { this.allNoResources.forEach(item1 => {
if (item.id == item1.id) { if (item.id === item1.id) {
// resultBool = true // resultBool = true
result.push(item1) result.push(item1)
} }

View File

@ -204,12 +204,12 @@
}, },
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id === id) {
return element return element
} else if (element.children != null) { } else if (element.children !== null) {
var i var i
var result = null var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id) result = this.searchTree(element.children[i], id)
} }
return result return result
@ -238,7 +238,7 @@
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
backResource.forEach(item1 => { backResource.forEach(item1 => {
if (item == item1.id || item == item1.res) { if (item === item1.id || item === item1.res) {
optionsCmp.push(item1) optionsCmp.push(item1)
} }
}) })
@ -289,7 +289,7 @@
let result = [] let result = []
resourceIdArr.forEach(item => { resourceIdArr.forEach(item => {
this.allNoResources.forEach(item1 => { this.allNoResources.forEach(item1 => {
if (item.id == item1.id) { if (item.id === item1.id) {
// resultBool = true // resultBool = true
result.push(item1) result.push(item1)
} }

View File

@ -301,12 +301,12 @@
}, },
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id === id) {
return element return element
} else if (element.children != null) { } else if (element.children !== null) {
var i var i
var result = null var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id) result = this.searchTree(element.children[i], id)
} }
return result return result
@ -335,7 +335,7 @@
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
backResource.forEach(item1 => { backResource.forEach(item1 => {
if (item == item1.id || item == item1.res) { if (item === item1.id || item === item1.res) {
optionsCmp.push(item1) optionsCmp.push(item1)
} }
}) })
@ -478,7 +478,7 @@
let result = [] let result = []
resourceIdArr.forEach(item => { resourceIdArr.forEach(item => {
this.allNoResources.forEach(item1 => { this.allNoResources.forEach(item1 => {
if (item.id == item1.id) { if (item.id === item1.id) {
// resultBool = true // resultBool = true
result.push(item1) result.push(item1)
} }
@ -519,7 +519,7 @@
this.mainClass = o.params.mainClass || '' this.mainClass = o.params.mainClass || ''
if (o.params.mainJar.res) { if (o.params.mainJar.res) {
this.marjarId(o.params.mainJar.res) this.marjarId(o.params.mainJar.res)
} else if (o.params.mainJar.res == '') { } else if (o.params.mainJar.res === '') {
this.mainJar = '' this.mainJar = ''
} else { } else {
this.mainJar = o.params.mainJar.id || '' this.mainJar = o.params.mainJar.id || ''

View File

@ -214,7 +214,7 @@
*/ */
_onSqlType (a) { _onSqlType (a) {
this.sqlType = a this.sqlType = a
if (a == 0) { if (a === 0) {
this.showType = ['TABLE'] this.showType = ['TABLE']
} }
}, },
@ -262,24 +262,24 @@
if (!this.$refs.refDs._verifDatasource()) { if (!this.$refs.refDs._verifDatasource()) {
return false return false
} }
if (this.sqlType == 0 && !this.showType.length) { if (this.sqlType === 0 && !this.showType.length) {
this.$message.warning(`${i18n.$t('One form or attachment must be selected')}`) this.$message.warning(`${i18n.$t('One form or attachment must be selected')}`)
return false return false
} }
if (this.sqlType == 0 && !this.title) { if (this.sqlType === 0 && !this.title) {
this.$message.warning(`${i18n.$t('Mail subject required')}`) this.$message.warning(`${i18n.$t('Mail subject required')}`)
return false return false
} }
if (this.sqlType == 0 && !this.receivers.length) { if (this.sqlType === 0 && !this.receivers.length) {
this.$message.warning(`${i18n.$t('Recipient required')}`) this.$message.warning(`${i18n.$t('Recipient required')}`)
return false return false
} }
// receivers Subcomponent verification // receivers Subcomponent verification
if (this.sqlType == 0 && !this.$refs.refEmail._manualEmail()) { if (this.sqlType === 0 && !this.$refs.refEmail._manualEmail()) {
return false return false
} }
// receiversCc Subcomponent verification // receiversCc Subcomponent verification
if (this.sqlType == 0 && !this.$refs.refCc._manualEmail()) { if (this.sqlType === 0 && !this.$refs.refCc._manualEmail()) {
return false return false
} }
// udfs Subcomponent verification Verification only if the data type is HIVE // udfs Subcomponent verification Verification only if the data type is HIVE
@ -414,10 +414,10 @@
watch: { watch: {
// Listening to sqlType // Listening to sqlType
sqlType (val) { sqlType (val) {
if (val == 0) { if (val === 0) {
this.showType = [] this.showType = []
} }
if (val != 0) { if (val !== 0) {
this.title = '' this.title = ''
this.receivers = [] this.receivers = []
this.receiversCc = [] this.receiversCc = []
@ -447,7 +447,7 @@
this.sqlType = o.params.sqlType this.sqlType = o.params.sqlType
this.connParams = o.params.connParams || '' this.connParams = o.params.connParams || ''
this.localParams = o.params.localParams || [] this.localParams = o.params.localParams || []
if (o.params.showType == '') { if (o.params.showType === '') {
this.showType = [] this.showType = []
} else { } else {
this.showType = o.params.showType.split(',') || [] this.showType = o.params.showType.split(',') || []

View File

@ -1170,10 +1170,10 @@
watch: { watch: {
// Listening to sqlType // Listening to sqlType
sqlType (val) { sqlType (val) {
if (val == 0) { if (val === 0) {
this.showType = [] this.showType = []
} }
if (val != 0) { if (val !== 0) {
this.title = '' this.title = ''
this.receivers = [] this.receivers = []
this.receiversCc = [] this.receiversCc = []

View File

@ -186,7 +186,7 @@
this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`) this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`)
return false return false
} }
if (this.resourceNameVal.resourceList && this.resourceNameVal.resourceList.length == 0) { if (this.resourceNameVal.resourceList && this.resourceNameVal.resourceList.length === 0) {
this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`) this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`)
return false return false
} }
@ -201,7 +201,7 @@
let master = this.master let master = this.master
let masterUrl = this.masterUrl let masterUrl = this.masterUrl
if (this.deployMode == 'local') { if (this.deployMode === 'local') {
master = 'local' master = 'local'
masterUrl = '' masterUrl = ''
deployMode = 'client' deployMode = 'client'
@ -246,12 +246,12 @@
}, },
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id === id) {
return element return element
} else if (element.children != null) { } else if (element.children !== null) {
var i var i
var result = null var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id) result = this.searchTree(element.children[i], id)
} }
return result return result
@ -280,7 +280,7 @@
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
backResource.forEach(item1 => { backResource.forEach(item1 => {
if (item == item1.id || item == item1.res) { if (item === item1.id || item === item1.res) {
optionsCmp.push(item1) optionsCmp.push(item1)
} }
}) })
@ -314,9 +314,9 @@
}, },
master: { master: {
handler (code) { handler (code) {
if (code == 'spark://') { if (code === 'spark://') {
this.masterUrlState = true this.masterUrlState = true
} else if (code == 'mesos://') { } else if (code === 'mesos://') {
this.masterUrlState = true this.masterUrlState = true
} else { } else {
this.masterUrlState = false this.masterUrlState = false
@ -344,7 +344,7 @@
let result = [] let result = []
resourceIdArr.forEach(item => { resourceIdArr.forEach(item => {
this.allNoResources.forEach(item1 => { this.allNoResources.forEach(item1 => {
if (item.id == item1.id) { if (item.id === item1.id) {
// resultBool = true // resultBool = true
result.push(item1) result.push(item1)
} }

View File

@ -51,7 +51,7 @@
}, },
mounted () { mounted () {
let result = this.itemList.some(item => { let result = this.itemList.some(item => {
if (item.id == this.value) { if (item.id === this.value) {
return true return true
} }
}) })

View File

@ -329,7 +329,7 @@
return false return false
} }
if (!this.database && this.showdDatabase == false) { if (!this.database && this.showdDatabase === false) {
this.$message.warning(`${i18n.$t('Please enter database name')}`) this.$message.warning(`${i18n.$t('Please enter database name')}`)
return false return false
} }
@ -451,16 +451,16 @@
}, },
watch: { watch: {
type (value) { type (value) {
if (value == 'POSTGRESQL') { if (value === 'POSTGRESQL') {
this.showdDatabase = true this.showdDatabase = true
} else { } else {
this.showdDatabase = false this.showdDatabase = false
} }
if (value == 'ORACLE' && !this.item.id) { if (value === 'ORACLE' && !this.item.id) {
this.showConnectType = true this.showConnectType = true
this.connectType = 'ORACLE_SERVICE_NAME' this.connectType = 'ORACLE_SERVICE_NAME'
} else if (value == 'ORACLE' && this.item.id) { } else if (value === 'ORACLE' && this.item.id) {
this.showConnectType = true this.showConnectType = true
} else { } else {
this.showConnectType = false this.showConnectType = false
@ -471,7 +471,7 @@
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.store.dispatch('datasource/getKerberosStartupState').then(res => { this.store.dispatch('datasource/getKerberosStartupState').then(res => {
this.isShowPrincipal = res this.isShowPrincipal = res
if ((value == 'HIVE' || value == 'SPARK') && this.isShowPrincipal == true) { if ((value === 'HIVE' || value === 'SPARK') && this.isShowPrincipal === true) {
this.showPrincipal = false this.showPrincipal = false
} else { } else {
this.showPrincipal = true this.showPrincipal = true

View File

@ -128,7 +128,7 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getDatasourcesListP(this.searchParams).then(res => { this.getDatasourcesListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.datasourcesList = [] this.datasourcesList = []

View File

@ -106,10 +106,10 @@
let error = 0 let error = 0
_.forEach(res.data, (v, i) => { _.forEach(res.data, (v, i) => {
let key = _.keys(v) let key = _.keys(v)
if (key[0] == 'errorCount') { if (key[0] === 'errorCount') {
error = error + v.errorCount error = error + v.errorCount
} }
if (key[1] == 'normalCount') { if (key[1] === 'normalCount') {
normal = normal + v.normalCount normal = normal + v.normalCount
} }
} }

View File

@ -214,7 +214,7 @@
scheduleTime: this.scheduleTime.length && this.scheduleTime.join(',') || '', scheduleTime: this.scheduleTime.length && this.scheduleTime.join(',') || '',
failureStrategy: this.failureStrategy, failureStrategy: this.failureStrategy,
warningType: this.warningType, warningType: this.warningType,
warningGroupId: this.warningGroupId == '' ? 0 : this.warningGroupId, warningGroupId: this.warningGroupId === '' ? 0 : this.warningGroupId,
execType: this.execType ? 'COMPLEMENT_DATA' : null, execType: this.execType ? 'COMPLEMENT_DATA' : null,
startNodeList: this.startNodeList, startNodeList: this.startNodeList,
taskDependType: this.taskDependType, taskDependType: this.taskDependType,

View File

@ -228,7 +228,7 @@
failureStrategy: this.failureStrategy, failureStrategy: this.failureStrategy,
warningType: this.warningType, warningType: this.warningType,
processInstancePriority: this.processInstancePriority, processInstancePriority: this.processInstancePriority,
warningGroupId: this.warningGroupId == '' ? 0 : this.warningGroupId, warningGroupId: this.warningGroupId === '' ? 0 : this.warningGroupId,
receivers: this.receivers.join(',') || '', receivers: this.receivers.join(',') || '',
receiversCc: this.receiversCc.join(',') || '', receiversCc: this.receiversCc.join(',') || '',
workerGroup: this.workerGroup workerGroup: this.workerGroup
@ -319,7 +319,7 @@
if (this.timingData.item.crontab !== null) { if (this.timingData.item.crontab !== null) {
this.crontab = this.timingData.item.crontab this.crontab = this.timingData.item.crontab
} }
if (this.timingData.type == 'timing') { if (this.timingData.type === 'timing') {
let date = new Date() let date = new Date()
let year = date.getFullYear() let year = date.getFullYear()
let month = date.getMonth() + 1 let month = date.getMonth() + 1

View File

@ -109,14 +109,14 @@
* get data list * get data list
*/ */
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getProcessListP(this.searchParams).then(res => { this.getProcessListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.processListP = [] this.processListP = []

View File

@ -78,7 +78,7 @@
</span> </span>
</el-tooltip> </el-tooltip>
<el-tooltip :content="scope.row.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')" placement="top" :enterable="false"> <el-tooltip :content="scope.row.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')" placement="top" :enterable="false">
<span><el-button type="warning" size="mini" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state != 'STOP'" :icon="scope.row.state === 'STOP' ? 'el-icon-video-play' : 'el-icon-close'" @click="_stop(scope.row,scope.$index)" circle></el-button></span> <span><el-button type="warning" size="mini" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'STOP'" :icon="scope.row.state === 'STOP' ? 'el-icon-video-play' : 'el-icon-close'" @click="_stop(scope.row,scope.$index)" circle></el-button></span>
</el-tooltip> </el-tooltip>
<el-tooltip :content="scope.row.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')" placement="top" :enterable="false"> <el-tooltip :content="scope.row.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')" placement="top" :enterable="false">
<span><el-button type="error" size="mini" :icon="scope.row.state === 'PAUSE' ? 'el-icon-video-play' : 'el-icon-video-pause'" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'PAUSE'" @click="_suspend(scope.row,scope.$index)" circle></el-button></span> <span><el-button type="error" size="mini" :icon="scope.row.state === 'PAUSE' ? 'el-icon-video-play' : 'el-icon-video-pause'" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'PAUSE'" @click="_suspend(scope.row,scope.$index)" circle></el-button></span>
@ -154,7 +154,7 @@
<span> <span>
<el-button <el-button
style="padding: 0 3px" style="padding: 0 3px"
v-show="(scope.row.state === 'PAUSE' || scope.row.state == 'STOP') && buttonType === 'suspend'" v-show="(scope.row.state === 'PAUSE' || scope.row.state === 'STOP') && buttonType === 'suspend'"
type="warning" type="warning"
size="mini" size="mini"
circle circle
@ -165,7 +165,7 @@
<!--Recovery Suspend--> <!--Recovery Suspend-->
<el-button <el-button
v-show="(scope.row.state === 'PAUSE' || scope.row.state == 'STOP') && buttonType !== 'suspend'" v-show="(scope.row.state === 'PAUSE' || scope.row.state === 'STOP') && buttonType !== 'suspend'"
type="warning" type="warning"
size="mini" size="mini"
circle circle
@ -312,7 +312,7 @@
* @param STOP * @param STOP
*/ */
_stop (item, index) { _stop (item, index) {
if (item.state == 'STOP') { if (item.state === 'STOP') {
this._countDownFn({ this._countDownFn({
id: item.id, id: item.id,
executeType: 'RECOVER_SUSPENDED_PROCESS', executeType: 'RECOVER_SUSPENDED_PROCESS',

View File

@ -119,7 +119,7 @@
_getProcessInstanceListP (flag) { _getProcessInstanceListP (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getProcessInstance(this.searchParams).then(res => { this.getProcessInstance(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.processInstanceList = [] this.processInstanceList = []
@ -148,7 +148,7 @@
* @desc Prevent functions from being called multiple times * @desc Prevent functions from being called multiple times
*/ */
_debounceGET: _.debounce(function (flag) { _debounceGET: _.debounce(function (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true

View File

@ -107,7 +107,7 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getProjectsList(this.searchParams).then(res => { this.getProjectsList(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.projectsList = [] this.projectsList = []

View File

@ -114,7 +114,7 @@
*/ */
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
if (this.searchParams.pageNo == undefined) { if (this.searchParams.pageNo === undefined) {
this.$router.push({ path: '/projects/index' }) this.$router.push({ path: '/projects/index' })
return false return false
} }
@ -132,7 +132,7 @@
* @desc Prevent functions from being called multiple times * @desc Prevent functions from being called multiple times
*/ */
_debounceGET: _.debounce(function (flag) { _debounceGET: _.debounce(function (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true

View File

@ -101,14 +101,14 @@
this.searchParams.pageSize = val this.searchParams.pageSize = val
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => { this.getResourcesListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.fileResourcesList = res.totalList this.fileResourcesList = res.totalList

View File

@ -107,14 +107,14 @@
this.searchParams.pageSize = val this.searchParams.pageSize = val
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => { this.getResourcesListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.fileResourcesList = res.totalList this.fileResourcesList = res.totalList

View File

@ -217,7 +217,7 @@
this.filterEmptyDirectory(item.children) this.filterEmptyDirectory(item.children)
} }
} }
return array.filter(n => ((/\.jar$/.test(n.name) && n.children.length == 0) || (!/\.jar$/.test(n.name) && n.children.length > 0))) return array.filter(n => ((/\.jar$/.test(n.name) && n.children.length === 0) || (!/\.jar$/.test(n.name) && n.children.length > 0)))
}, },
// filterJarFile // filterJarFile
filterJarFile (array) { filterJarFile (array) {

View File

@ -112,14 +112,14 @@
this._debounceGET() this._debounceGET()
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getUdfFuncListP(this.searchParams).then(res => { this.getUdfFuncListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.udfFuncList = [] this.udfFuncList = []

View File

@ -107,14 +107,14 @@
this._debounceGET() this._debounceGET()
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => { this.getResourcesListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.udfResourcesList = [] this.udfResourcesList = []

View File

@ -116,14 +116,14 @@
this._debounceGET() this._debounceGET()
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => { this.getResourcesListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.udfResourcesList = [] this.udfResourcesList = []

View File

@ -121,14 +121,14 @@
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getQueueListP(this.searchParams).then(res => { this.getQueueListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.queueList = [] this.queueList = []

View File

@ -123,14 +123,14 @@
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getTenantListP(this.searchParams).then(res => { this.getTenantListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.tenementList = [] this.tenementList = []

View File

@ -175,7 +175,7 @@
return false return false
} }
// password // password
if (this.userPassword != '' && this.item) { if (this.userPassword !== '' && this.item) {
if (!regPassword.test(this.userPassword)) { if (!regPassword.test(this.userPassword)) {
this.$message.warning(`${i18n.$t('Password consists of at least two combinations of numbers, letters, and characters, and the length is between 6-22')}`) this.$message.warning(`${i18n.$t('Password consists of at least two combinations of numbers, letters, and characters, and the length is between 6-22')}`)
return false return false
@ -247,7 +247,7 @@
let queueCode = '' let queueCode = ''
// get queue code // get queue code
if (this.queueName != '') { if (this.queueName !== '') {
queueCode = this.queueList.length > 0 ? _.find(this.queueList, ['id', this.queueName]).code : '' queueCode = this.queueList.length > 0 ? _.find(this.queueList, ['id', this.queueName]).code : ''
} }
let param = { let param = {

View File

@ -28,7 +28,7 @@
<el-table-column prop="email" :label="$t('Email')" min-width="120"></el-table-column> <el-table-column prop="email" :label="$t('Email')" min-width="120"></el-table-column>
<el-table-column prop="phone" :label="$t('Phone')" min-width="90"></el-table-column> <el-table-column prop="phone" :label="$t('Phone')" min-width="90"></el-table-column>
<el-table-column :label="$t('State')"> <el-table-column :label="$t('State')">
{{state == 1 ? `${$t('Enable')}` : `${$t('Disable')}`}} {{state === 1 ? `${$t('Enable')}` : `${$t('Disable')}`}}
</el-table-column> </el-table-column>
<el-table-column :label="$t('Create Time')" min-width="120"> <el-table-column :label="$t('Create Time')" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -196,7 +196,7 @@
let result = [] let result = []
let getLeaf = (data) => { let getLeaf = (data) => {
data.forEach(item => { data.forEach(item => {
if (item.children.length == 0) { if (item.children.length === 0) {
result.push(item) result.push(item)
} else { } else {
getLeaf(item.children) getLeaf(item.children)
@ -215,7 +215,7 @@
let fileSourceList = [] let fileSourceList = []
let udfSourceList = [] let udfSourceList = []
data[0].forEach((value, index, array) => { data[0].forEach((value, index, array) => {
if (value.type == 'FILE') { if (value.type === 'FILE') {
fileSourceList.push(value) fileSourceList.push(value)
} else { } else {
udfSourceList.push(value) udfSourceList.push(value)
@ -233,7 +233,7 @@
} }
}) })
data[1].forEach((value, index, array) => { data[1].forEach((value, index, array) => {
if (value.type == 'FILE') { if (value.type === 'FILE') {
fileTargetList.push(value) fileTargetList.push(value)
} else { } else {
udfTargetList.push(value) udfTargetList.push(value)

View File

@ -122,14 +122,14 @@
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getUsersListP(this.searchParams).then(res => { this.getUsersListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.userList = [] this.userList = []

View File

@ -124,14 +124,14 @@
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getAlertgroupP(this.searchParams).then(res => { this.getAlertgroupP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.alertgroupList = [] this.alertgroupList = []

View File

@ -83,7 +83,7 @@
let reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/ let reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
let valdata = ips.split(',') let valdata = ips.split(',')
for (let i = 0; i < valdata.length; i++) { for (let i = 0; i < valdata.length; i++) {
if (reg.test(valdata[i]) == false) { if (reg.test(valdata[i]) === false) {
return false return false
} }
} }

View File

@ -100,7 +100,7 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getWorkerGroups(this.searchParams).then(res => { this.getWorkerGroups(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.workerGroupList = [] this.workerGroupList = []

View File

@ -122,14 +122,14 @@
}, },
_getList (flag) { _getList (flag) {
if (sessionStorage.getItem('isLeft') == 0) { if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false this.isLeft = false
} else { } else {
this.isLeft = true this.isLeft = true
} }
this.isLoading = !flag this.isLoading = !flag
this.getTokenListP(this.searchParams).then(res => { this.getTokenListP(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1 this.searchParams.pageNo = this.searchParams.pageNo - 1
} else { } else {
this.tokenList = [] this.tokenList = []

View File

@ -58,7 +58,7 @@ function jsonp (url, opts, fn) {
var id = opts.name || (prefix + (count++)) var id = opts.name || (prefix + (count++))
var param = opts.param || 'callback' var param = opts.param || 'callback'
var timeout = opts.timeout != null ? opts.timeout : 60000 var timeout = opts.timeout !== null ? opts.timeout : 60000
var enc = encodeURIComponent var enc = encodeURIComponent
/* istanbul ignore next */ /* istanbul ignore next */
var target = document.getElementsByTagName('script')[0] || document.head var target = document.getElementsByTagName('script')[0] || document.head

View File

@ -90,7 +90,7 @@
*/ */
getParent (data2, nodeId2) { getParent (data2, nodeId2) {
var arrRes = [] var arrRes = []
if (data2.length == 0) { if (data2.length === 0) {
if (nodeId2) { if (nodeId2) {
arrRes.unshift(data2) arrRes.unshift(data2)
} }
@ -99,7 +99,7 @@
let rev = (data, nodeId) => { let rev = (data, nodeId) => {
for (var i = 0, length = data.length; i < length; i++) { for (var i = 0, length = data.length; i < length; i++) {
let node = data[i] let node = data[i]
if (node.id == nodeId) { if (node.id === nodeId) {
arrRes.unshift(node) arrRes.unshift(node)
rev(data2, node.pid) rev(data2, node.pid)
break break
@ -180,7 +180,7 @@
if (i2 !== -1) { if (i2 !== -1) {
this.cacheSourceList.splice(i2, 1) this.cacheSourceList.splice(i2, 1)
} }
if (this.checkedValue == 'fileResource') { if (this.checkedValue === 'fileResource') {
this.fileTarget = this.targetList this.fileTarget = this.targetList
this.fileSource = this.sourceList this.fileSource = this.sourceList
} else { } else {
@ -198,7 +198,7 @@
if (i2 !== -1) { if (i2 !== -1) {
this.cacheTargetList.splice(i2, 1) this.cacheTargetList.splice(i2, 1)
} }
if (this.checkedValue == 'fileResource') { if (this.checkedValue === 'fileResource') {
this.fileSource = this.sourceList this.fileSource = this.sourceList
this.fileTarget = this.targetList this.fileTarget = this.targetList
} else { } else {