mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-13 07:04:21 +08:00
Bugfix/dynamic import (#473)
* first test es-lint babel. * Update all dependencies and fix import dynamic import. * Add support to docstatus Co-authored-by: Edwin Betancourt <EdwinBetanc0urt@hotmail.com>
This commit is contained in:
parent
983d3642c3
commit
86fd3a432a
115
package.json
115
package.json
@ -44,77 +44,78 @@
|
|||||||
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
|
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adempiere/grpc-access-client": "^1.1.8",
|
"@adempiere/grpc-access-client": "^1.1.9",
|
||||||
"@adempiere/grpc-data-client": "^2.2.5",
|
"@adempiere/grpc-data-client": "^2.2.6",
|
||||||
"@adempiere/grpc-dictionary-client": "^1.3.9",
|
"@adempiere/grpc-dictionary-client": "^1.4.0",
|
||||||
"@adempiere/grpc-enrollment-client": "^1.0.7",
|
"@adempiere/grpc-enrollment-client": "^1.0.8",
|
||||||
"@adempiere/grpc-pos-client": "^1.0.8",
|
"@adempiere/grpc-pos-client": "^1.0.9",
|
||||||
"autoprefixer": "^9.5.1",
|
"axios": "0.19.2",
|
||||||
"axios": "0.18.0",
|
"clipboard": "2.0.6",
|
||||||
"clipboard": "2.0.4",
|
"codemirror": "5.53.2",
|
||||||
"codemirror": "5.45.0",
|
"core-js": "^3.6.5",
|
||||||
"driver.js": "0.9.5",
|
"driver.js": "0.9.8",
|
||||||
"dropzone": "5.5.1",
|
"dropzone": "5.7.0",
|
||||||
"echarts": "4.2.1",
|
"echarts": "4.7.0",
|
||||||
"element-ui": "2.13.0",
|
"element-ui": "2.13.1",
|
||||||
"file-saver": "2.0.1",
|
"file-saver": "2.0.2",
|
||||||
"fuse.js": "3.4.4",
|
"fuse.js": "5.2.3",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.1",
|
||||||
"jsonlint": "1.6.3",
|
"jsonlint": "1.6.3",
|
||||||
"jszip": "3.2.1",
|
"jszip": "3.4.0",
|
||||||
"mime-type": "^3.0.7",
|
"mime-type": "^3.0.7",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"normalize.css": "7.0.0",
|
"normalize.css": "8.0.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"path-to-regexp": "2.4.0",
|
"path-to-regexp": "6.1.0",
|
||||||
"screenfull": "4.2.0",
|
"screenfull": "5.0.2",
|
||||||
"showdown": "1.9.0",
|
"script-loader": "0.7.2",
|
||||||
"sortablejs": "1.10.1",
|
"showdown": "1.9.1",
|
||||||
|
"sortablejs": "1.10.2",
|
||||||
"tui-editor": "1.4.10",
|
"tui-editor": "1.4.10",
|
||||||
"v-markdown": "^1.0.2",
|
"v-markdown": "^1.0.2",
|
||||||
"vue": "2.6.10",
|
"vue": "2.6.11",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"vue-i18n": "7.3.2",
|
"vue-i18n": "8.17.4",
|
||||||
"vue-multipane": "^0.9.5",
|
"vue-multipane": "^0.9.5",
|
||||||
"vue-resize": "^0.4.5",
|
"vue-resize": "^0.5.0",
|
||||||
"vue-router": "3.0.4",
|
"vue-router": "3.1.6",
|
||||||
"vue-shortkey": "^3.1.7",
|
"vue-shortkey": "^3.1.7",
|
||||||
"vue-split-panel": "^1.0.4",
|
"vue-split-panel": "^1.0.4",
|
||||||
"vue-splitpane": "1.0.4",
|
"vue-splitpane": "1.0.6",
|
||||||
"vuedraggable": "^2.23.2",
|
"vuedraggable": "^2.23.2",
|
||||||
"vuex": "3.1.0",
|
"vuex": "3.3.0",
|
||||||
"xlsx": "0.14.1"
|
"xlsx": "0.15.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0",
|
"@babel/core": "7.9.0",
|
||||||
"@babel/register": "7.0.0",
|
"@babel/register": "7.9.0",
|
||||||
"@vue/cli-plugin-babel": "3.5.3",
|
"@vue/cli-plugin-babel": "4.3.1",
|
||||||
"@vue/cli-plugin-eslint": "3.5.1",
|
"@vue/cli-plugin-eslint": "4.3.1",
|
||||||
"@vue/cli-plugin-unit-jest": "^3.7.0",
|
"@vue/cli-plugin-unit-jest": "^4.3.1",
|
||||||
"@vue/cli-service": "3.5.3",
|
"@vue/cli-service": "4.3.1",
|
||||||
"@vue/test-utils": "1.0.0-beta.29",
|
"@vue/test-utils": "1.0.0-beta.33",
|
||||||
|
"autoprefixer": "^9.7.6",
|
||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-eslint": "^8.0.1",
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-jest": "^24.8.0",
|
"babel-jest": "^25.5.1",
|
||||||
"chalk": "2.4.2",
|
"chalk": "4.0.0",
|
||||||
"chokidar": "2.1.5",
|
"chokidar": "3.4.0",
|
||||||
"connect": "3.6.6",
|
"connect": "3.7.0",
|
||||||
"eslint": "^4.10.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-plugin-vue": "5.2.2",
|
"eslint-plugin-vue": "6.2.2",
|
||||||
"html-webpack-plugin": "3.2.0",
|
"html-webpack-plugin": "4.2.1",
|
||||||
"husky": "1.3.1",
|
"husky": "4.2.5",
|
||||||
"lint-staged": "8.1.5",
|
"lint-staged": "10.2.0",
|
||||||
"mockjs": "1.0.1-beta3",
|
"mockjs": "1.1.0",
|
||||||
"node-sass": "^4.9.0",
|
"node-sass": "^4.14.0",
|
||||||
"plop": "2.3.0",
|
"plop": "2.6.0",
|
||||||
"runjs": "^4.3.2",
|
"runjs": "^4.4.2",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^8.0.2",
|
||||||
"script-ext-html-webpack-plugin": "2.1.3",
|
"script-ext-html-webpack-plugin": "2.1.4",
|
||||||
"script-loader": "0.7.2",
|
"serve-static": "^1.14.1",
|
||||||
"serve-static": "^1.13.2",
|
"svg-sprite-loader": "4.2.7",
|
||||||
"svg-sprite-loader": "4.1.3",
|
"svgo": "1.3.2",
|
||||||
"svgo": "1.2.0",
|
"vue-template-compiler": "2.6.11"
|
||||||
"vue-template-compiler": "2.6.10"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9",
|
"node": ">=8.9",
|
||||||
|
@ -62,11 +62,10 @@ export default {
|
|||||||
return this.$store.state.app.device === 'mobile'
|
return this.$store.state.app.device === 'mobile'
|
||||||
},
|
},
|
||||||
templateDevice() {
|
templateDevice() {
|
||||||
let template = 'contextMenuDesktop'
|
|
||||||
if (this.isMobile) {
|
if (this.isMobile) {
|
||||||
template = 'contextMenuMobile'
|
return () => import('@/components/ADempiere/ContextMenu/contextMenuMobile')
|
||||||
}
|
}
|
||||||
return () => import(`@/components/ADempiere/ContextMenu/${template}`)
|
return () => import('@/components/ADempiere/ContextMenu/contextMenuDesktop')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
props: {
|
props: {
|
||||||
@ -47,10 +46,24 @@ export default {
|
|||||||
if (this.unsupportedDashboards.includes(this.metadata.fileName)) {
|
if (this.unsupportedDashboards.includes(this.metadata.fileName)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (isEmptyValue(this.metadata.fileName)) {
|
|
||||||
return () => import('@/components/ADempiere/Dashboard/calendar')
|
let dashboard
|
||||||
|
switch (this.metadata.fileName) {
|
||||||
|
case 'recentItems':
|
||||||
|
dashboard = () => import('@/components/ADempiere/Dashboard/recentItems')
|
||||||
|
break
|
||||||
|
case 'userfavorites':
|
||||||
|
dashboard = () => import('@/components/ADempiere/Dashboard/userfavorites')
|
||||||
|
break
|
||||||
|
case 'docstatus':
|
||||||
|
dashboard = () => import('@/components/ADempiere/Dashboard/docstatus')
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
dashboard = () => import('@/components/ADempiere/Dashboard/calendar')
|
||||||
|
break
|
||||||
}
|
}
|
||||||
return () => import(`@/components/ADempiere/Dashboard/${this.metadata.fileName}`)
|
return dashboard
|
||||||
|
// return () => import(`@/components/ADempiere/Dashboard/${this.metadata.fileName}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -668,7 +668,8 @@ export default {
|
|||||||
}
|
}
|
||||||
if (fieldIsDisplayed(field)) {
|
if (fieldIsDisplayed(field)) {
|
||||||
// const fieldReadOnlyAllForm = FIELDS_READ_ONLY_FORM.filter(item => {
|
// const fieldReadOnlyAllForm = FIELDS_READ_ONLY_FORM.filter(item => {
|
||||||
// return row.hasOwnProperty(item.columnName) && item.isChangedAllForm
|
// return item.isChangedAllForm &&
|
||||||
|
// Object.prototype.hasOwnProperty.call(row, item.columnName)
|
||||||
// })
|
// })
|
||||||
// // columnName: Processed, Processing
|
// // columnName: Processed, Processing
|
||||||
// if (fieldReadOnlyAllForm.length) {
|
// if (fieldReadOnlyAllForm.length) {
|
||||||
@ -678,7 +679,8 @@ export default {
|
|||||||
|
|
||||||
// columnName: IsActive
|
// columnName: IsActive
|
||||||
const fieldReadOnlyForm = FIELDS_READ_ONLY_FORM.find(item => {
|
const fieldReadOnlyForm = FIELDS_READ_ONLY_FORM.find(item => {
|
||||||
return row.hasOwnProperty(item.columnName) && !item.isChangedAllForm
|
return !item.isChangedAllForm &&
|
||||||
|
Object.prototype.hasOwnProperty.call(row, item.columnName)
|
||||||
})
|
})
|
||||||
if (fieldReadOnlyForm) {
|
if (fieldReadOnlyForm) {
|
||||||
const isReadOnlyRow = row[fieldReadOnlyForm.columnName] === fieldReadOnlyForm.valueIsReadOnlyForm && field.columnName !== fieldReadOnlyForm.columnName
|
const isReadOnlyRow = row[fieldReadOnlyForm.columnName] === fieldReadOnlyForm.valueIsReadOnlyForm && field.columnName !== fieldReadOnlyForm.columnName
|
||||||
@ -754,7 +756,7 @@ export default {
|
|||||||
async setFocus() {
|
async setFocus() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const fieldFocus = this.fieldsList.find(itemField => {
|
const fieldFocus = this.fieldsList.find(itemField => {
|
||||||
if (this.$refs.hasOwnProperty(itemField.columnName)) {
|
if (Object.prototype.hasOwnProperty.call(this.$refs, itemField.columnName)) {
|
||||||
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) {
|
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
|
||||||
import contextInfo from '@/components/ADempiere/Field/popover/contextInfo'
|
import contextInfo from '@/components/ADempiere/Field/popover/contextInfo'
|
||||||
import documentStatus from '@/components/ADempiere/Field/popover/documentStatus'
|
import documentStatus from '@/components/ADempiere/Field/popover/documentStatus'
|
||||||
import operatorComparison from '@/components/ADempiere/Field/popover/operatorComparison'
|
import operatorComparison from '@/components/ADempiere/Field/popover/operatorComparison'
|
||||||
@ -77,7 +76,6 @@ import translated from '@/components/ADempiere/Field/popover/translated'
|
|||||||
import calculator from '@/components/ADempiere/Field/popover/calculator'
|
import calculator from '@/components/ADempiere/Field/popover/calculator'
|
||||||
import { DEFAULT_SIZE } from '@/utils/ADempiere/references'
|
import { DEFAULT_SIZE } from '@/utils/ADempiere/references'
|
||||||
import { evalutateTypeField, fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
|
import { evalutateTypeField, fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
|
||||||
import { showMessage } from '@/utils/ADempiere/notification'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the base component for linking the components according to the
|
* This is the base component for linking the components according to the
|
||||||
@ -123,13 +121,51 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// load the component that is indicated in the attributes of received property
|
// load the component that is indicated in the attributes of received property
|
||||||
componentRender() {
|
componentRender() {
|
||||||
if (isEmptyValue(this.field.componentPath)) {
|
if (this.isEmptyValue(this.field.componentPath)) {
|
||||||
return () => import('@/components/ADempiere/Field/FieldText')
|
return () => import('@/components/ADempiere/Field/FieldText')
|
||||||
}
|
}
|
||||||
if (this.isSelectCreated) {
|
if (this.isSelectCreated) {
|
||||||
return () => import(`@/components/ADempiere/Field/FieldSelectMultiple`)
|
return () => import('@/components/ADempiere/Field/FieldSelectMultiple')
|
||||||
}
|
}
|
||||||
return () => import(`@/components/ADempiere/Field/${this.field.componentPath}`)
|
|
||||||
|
let field
|
||||||
|
switch (this.field.componentPath) {
|
||||||
|
case 'FieldBinary':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldBinary')
|
||||||
|
break
|
||||||
|
case 'FieldButton':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldButton')
|
||||||
|
break
|
||||||
|
case 'FieldColor':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldColor')
|
||||||
|
break
|
||||||
|
case 'FieldDate':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldDate')
|
||||||
|
break
|
||||||
|
case 'FieldImage':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldImage')
|
||||||
|
break
|
||||||
|
case 'FieldNumber':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldNumber')
|
||||||
|
break
|
||||||
|
case 'FieldSelect':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldSelect')
|
||||||
|
break
|
||||||
|
case 'FieldText':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldText')
|
||||||
|
break
|
||||||
|
case 'FieldTextLong':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldTextLong')
|
||||||
|
break
|
||||||
|
case 'FieldTime':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldTime')
|
||||||
|
break
|
||||||
|
case 'FieldYesNo':
|
||||||
|
field = () => import('@/components/ADempiere/Field/FieldYesNo')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return field
|
||||||
|
// return () => import(`@/components/ADempiere/Field/${this.field.componentPath}`)
|
||||||
},
|
},
|
||||||
fieldAttributes() {
|
fieldAttributes() {
|
||||||
return {
|
return {
|
||||||
@ -334,7 +370,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showMessage,
|
|
||||||
focusField() {
|
focusField() {
|
||||||
if (this.isDisplayed && !this.isReadOnly) {
|
if (this.isDisplayed && !this.isReadOnly) {
|
||||||
this.$refs[this.field.columnName].activeFocus()
|
this.$refs[this.field.columnName].activeFocus()
|
||||||
|
@ -17,9 +17,16 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// load the component that is indicated in the attributes of received property
|
// load the component that is indicated in the attributes of received property
|
||||||
componentRender() {
|
componentRender() {
|
||||||
|
let form
|
||||||
|
switch (this.metadata.fileName) {
|
||||||
|
case 'PriceChecking':
|
||||||
|
form = import('@/components/ADempiere/Form/PriceChecking')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
import(`@/components/ADempiere/Form/${this.metadata.fileName}`)
|
form
|
||||||
.then(formFile => {
|
.then(formFile => {
|
||||||
resolve(formFile)
|
resolve(formFile)
|
||||||
})
|
})
|
||||||
|
@ -384,7 +384,7 @@ export default {
|
|||||||
if (this.isPanelWindow) {
|
if (this.isPanelWindow) {
|
||||||
// TODO: use action notifyPanelChange with isShowedField in true
|
// TODO: use action notifyPanelChange with isShowedField in true
|
||||||
this.getterFieldList.forEach(fieldItem => {
|
this.getterFieldList.forEach(fieldItem => {
|
||||||
if (route.query.hasOwnProperty(fieldItem.columnName) && !fieldItem.isAdvancedQuery) {
|
if (Object.prototype.hasOwnProperty.call(route.query, fieldItem.columnName) && !fieldItem.isAdvancedQuery) {
|
||||||
fieldItem.isShowedFromUser = true
|
fieldItem.isShowedFromUser = true
|
||||||
fieldItem.value = parsedValueComponent({
|
fieldItem.value = parsedValueComponent({
|
||||||
fieldType: fieldItem.componentPath,
|
fieldType: fieldItem.componentPath,
|
||||||
@ -443,7 +443,7 @@ export default {
|
|||||||
route.params.isReadParameters = true
|
route.params.isReadParameters = true
|
||||||
}
|
}
|
||||||
// Only call get data if panel type is window
|
// Only call get data if panel type is window
|
||||||
if (!route.params.hasOwnProperty('isReadParameters') || route.params.isReadParameters) {
|
if (!Object.prototype.hasOwnProperty.call(route.params, 'isReadParameters') || route.params.isReadParameters) {
|
||||||
this.getData(parameters)
|
this.getData(parameters)
|
||||||
}
|
}
|
||||||
this.setTagsViewTitle(route.query.action)
|
this.setTagsViewTitle(route.query.action)
|
||||||
@ -451,7 +451,7 @@ export default {
|
|||||||
if (this.panelType === 'table' && route.query.action === 'advancedQuery') {
|
if (this.panelType === 'table' && route.query.action === 'advancedQuery') {
|
||||||
// TODO: use action notifyPanelChange with isShowedField in true
|
// TODO: use action notifyPanelChange with isShowedField in true
|
||||||
this.fieldList.forEach(fieldItem => {
|
this.fieldList.forEach(fieldItem => {
|
||||||
if (route.query.hasOwnProperty(fieldItem.columnName) && fieldItem.isAdvancedQuery) {
|
if (Object.prototype.hasOwnProperty.call(route.query, fieldItem.columnName) && fieldItem.isAdvancedQuery) {
|
||||||
fieldItem.isShowedFromUser = true
|
fieldItem.isShowedFromUser = true
|
||||||
|
|
||||||
if (route.query.action === 'advancedQuery' && fieldItem.isAdvancedQuery) {
|
if (route.query.action === 'advancedQuery' && fieldItem.isAdvancedQuery) {
|
||||||
@ -707,7 +707,7 @@ export default {
|
|||||||
async setFocus() {
|
async setFocus() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
const fieldFocus = this.getterFieldList.find(itemField => {
|
const fieldFocus = this.getterFieldList.find(itemField => {
|
||||||
if (this.$refs.hasOwnProperty(itemField.columnName)) {
|
if (Object.prototype.hasOwnProperty.call(this.$refs, itemField.columnName)) {
|
||||||
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable && itemField.componentPath !== 'FieldSelect') {
|
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable && itemField.componentPath !== 'FieldSelect') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ const languageControl = {
|
|||||||
getLanguageByParameter: (state) => (parameter) => {
|
getLanguageByParameter: (state) => (parameter) => {
|
||||||
const list = state.languagesList
|
const list = state.languagesList
|
||||||
list.forEach(language => {
|
list.forEach(language => {
|
||||||
if (language.hasOwnProperty(parameter)) {
|
if (Object.prototype.hasOwnProperty.call(language, parameter)) {
|
||||||
return language
|
return language
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -420,7 +420,7 @@ const panel = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Evaluate with hasOwnProperty if exits this value
|
// Evaluate with hasOwnProperty if exits this value
|
||||||
if (!newValues.hasOwnProperty(actionField.columnName)) {
|
if (!Object.prototype.hasOwnProperty.call(newValues, actionField.columnName)) {
|
||||||
if (!isChangedAllValues || withOutColumnNames.includes(actionField.columnName)) {
|
if (!isChangedAllValues || withOutColumnNames.includes(actionField.columnName)) {
|
||||||
// breaks if this value does not exist or ignore with out column names
|
// breaks if this value does not exist or ignore with out column names
|
||||||
return
|
return
|
||||||
@ -431,7 +431,7 @@ const panel = {
|
|||||||
|
|
||||||
if (isChangeFromCallout &&
|
if (isChangeFromCallout &&
|
||||||
actionField.componentPath === 'FieldSelect' &&
|
actionField.componentPath === 'FieldSelect' &&
|
||||||
!newValues.hasOwnProperty(`DisplayColumn_${actionField.columnName}`)) {
|
!Object.prototype.hasOwnProperty.call(newValues, `DisplayColumn_${actionField.columnName}`)) {
|
||||||
let lookup = rootGetters.getLookupItem({
|
let lookup = rootGetters.getLookupItem({
|
||||||
parentUuid,
|
parentUuid,
|
||||||
containerUuid,
|
containerUuid,
|
||||||
@ -566,6 +566,8 @@ const panel = {
|
|||||||
withOutColumnNames = [],
|
withOutColumnNames = [],
|
||||||
isChangeMultipleFields = false
|
isChangeMultipleFields = false
|
||||||
}) {
|
}) {
|
||||||
|
// TODO: https://eslint.org/docs/rules/no-async-promise-executor
|
||||||
|
// eslint-disable-next-line no-async-promise-executor
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
const panel = getters.getPanel(containerUuid, isAdvancedQuery)
|
const panel = getters.getPanel(containerUuid, isAdvancedQuery)
|
||||||
const { fieldList: fieldsList, tableName } = panel
|
const { fieldList: fieldsList, tableName } = panel
|
||||||
|
@ -14,7 +14,7 @@ const state = {
|
|||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
CHANGE_SETTING: (state, { key, value }) => {
|
CHANGE_SETTING: (state, { key, value }) => {
|
||||||
if (state.hasOwnProperty(key)) {
|
if (Object.prototype.hasOwnProperty.call(state, key)) {
|
||||||
state[key] = value
|
state[key] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,10 +189,10 @@ export const recursiveTreeSearch = ({
|
|||||||
const length = treeData.length
|
const length = treeData.length
|
||||||
while (index < length) {
|
while (index < length) {
|
||||||
let value = treeData[index]
|
let value = treeData[index]
|
||||||
if (!isEmptyValue(value) && value.hasOwnProperty(attributeName)) {
|
if (!isEmptyValue(value) && Object.prototype.hasOwnProperty.call(value, attributeName)) {
|
||||||
value = value[attributeName]
|
value = value[attributeName]
|
||||||
}
|
}
|
||||||
if (!isEmptyValue(value) && secondAttribute && value.hasOwnProperty(secondAttribute)) {
|
if (!isEmptyValue(value) && secondAttribute && Object.prototype.hasOwnProperty.call(value, secondAttribute)) {
|
||||||
value = value[secondAttribute]
|
value = value[secondAttribute]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,10 +218,10 @@ export const recursiveTreeSearch = ({
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let value = treeData
|
let value = treeData
|
||||||
if (!isEmptyValue(value) && value.hasOwnProperty(attributeName)) {
|
if (!isEmptyValue(value) && Object.prototype.hasOwnProperty.call(value, attributeName)) {
|
||||||
value = value[attributeName]
|
value = value[attributeName]
|
||||||
}
|
}
|
||||||
if (!isEmptyValue(value) && secondAttribute && value.hasOwnProperty(secondAttribute)) {
|
if (!isEmptyValue(value) && secondAttribute && Object.prototype.hasOwnProperty.call(value, secondAttribute)) {
|
||||||
value = value[secondAttribute]
|
value = value[secondAttribute]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ export function parsedValueComponent({
|
|||||||
if (isMandatory) {
|
if (isMandatory) {
|
||||||
returnValue = 0
|
returnValue = 0
|
||||||
}
|
}
|
||||||
} else if (typeof value === 'object' && value.hasOwnProperty('query')) {
|
} else if (typeof value === 'object' && Object.prototype.hasOwnProperty.call(value, 'query')) {
|
||||||
returnValue = value
|
returnValue = value
|
||||||
} else {
|
} else {
|
||||||
if (Array.isArray(value) && value.length) {
|
if (Array.isArray(value) && value.length) {
|
||||||
@ -287,7 +287,7 @@ export function parsedValueComponent({
|
|||||||
case 'FieldYesNo':
|
case 'FieldYesNo':
|
||||||
if (value === 'false' || value === 'N') {
|
if (value === 'false' || value === 'N') {
|
||||||
value = false
|
value = false
|
||||||
} else if (typeof value === 'object' && value.hasOwnProperty('query')) {
|
} else if (typeof value === 'object' && Object.prototype.hasOwnProperty.call(value, 'query')) {
|
||||||
returnValue = value
|
returnValue = value
|
||||||
}
|
}
|
||||||
returnValue = Boolean(value)
|
returnValue = Boolean(value)
|
||||||
@ -296,7 +296,7 @@ export function parsedValueComponent({
|
|||||||
// data type String
|
// data type String
|
||||||
case 'FieldText':
|
case 'FieldText':
|
||||||
case 'FieldTextArea':
|
case 'FieldTextArea':
|
||||||
if (typeof value === 'object' && value.hasOwnProperty('query')) {
|
if (typeof value === 'object' && Object.prototype.hasOwnProperty.call(value, 'query')) {
|
||||||
returnValue = value
|
returnValue = value
|
||||||
}
|
}
|
||||||
returnValue = value ? String(value) : undefined
|
returnValue = value ? String(value) : undefined
|
||||||
@ -314,7 +314,7 @@ export function parsedValueComponent({
|
|||||||
if (typeof value === 'number' || typeof value === 'string') {
|
if (typeof value === 'number' || typeof value === 'string') {
|
||||||
value = new Date(value)
|
value = new Date(value)
|
||||||
}
|
}
|
||||||
if (typeof value === 'object' && value.hasOwnProperty('query')) {
|
if (typeof value === 'object' && Object.prototype.hasOwnProperty.call(value, 'query')) {
|
||||||
returnValue = value
|
returnValue = value
|
||||||
}
|
}
|
||||||
returnValue = value
|
returnValue = value
|
||||||
|
@ -71,21 +71,21 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDownload() {
|
handleDownload() {
|
||||||
this.downloadLoading = true
|
this.downloadLoading = true
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
const multiHeader = [['Id', 'Main Information', '', '', 'Date']]
|
const multiHeader = [['Id', 'Main Information', '', '', 'Date']]
|
||||||
const header = ['', 'Title', 'Author', 'Readings', '']
|
const header = ['', 'Title', 'Author', 'Readings', '']
|
||||||
const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time']
|
const filterVal = ['id', 'title', 'author', 'pageviews', 'display_time']
|
||||||
const list = this.list
|
const list = this.list
|
||||||
const data = this.formatJson(filterVal, list)
|
const data = this.formatJson(filterVal, list)
|
||||||
const merges = ['A1:A2', 'B1:D1', 'E1:E2']
|
const merges = ['A1:A2', 'B1:D1', 'E1:E2']
|
||||||
excel.export_json_to_excel({
|
excel.export_json_to_excel({
|
||||||
multiHeader,
|
multiHeader,
|
||||||
header,
|
header,
|
||||||
merges,
|
merges,
|
||||||
data
|
data
|
||||||
})
|
|
||||||
this.downloadLoading = false
|
|
||||||
})
|
})
|
||||||
|
this.downloadLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
formatJson(filterVal, jsonData) {
|
formatJson(filterVal, jsonData) {
|
||||||
return jsonData.map(v => filterVal.map(j => {
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
|
@ -26,17 +26,17 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchData() {
|
fetchData() {
|
||||||
import('./content.js').then(data => {
|
import('./content.js').then(data => {
|
||||||
const { title } = data.default
|
const { title } = data.default
|
||||||
document.title = title
|
document.title = title
|
||||||
this.article = data.default
|
this.article = data.default
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
window.print()
|
window.print()
|
||||||
})
|
})
|
||||||
}, 3000)
|
}, 3000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user