Merge remote-tracking branch 'origin/fix-bug-202303' into fix-bug-202303
This commit is contained in:
+24
-1
@@ -1,13 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-config-provider :locale="locale">
|
<a-config-provider :locale="locale">
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view/>
|
<a-spin :spinning="isImporting || isExporting" :tip="tipText" class="port-spin">
|
||||||
|
<router-view/>
|
||||||
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||||
import enquireScreen from '@/utils/device'
|
import enquireScreen from '@/utils/device'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
@@ -15,6 +18,21 @@ export default {
|
|||||||
locale: zhCN
|
locale: zhCN
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState({
|
||||||
|
isImporting: state => state.app.isImporting,
|
||||||
|
isExporting: state => state.app.isExporting
|
||||||
|
}),
|
||||||
|
tipText () {
|
||||||
|
if (this.isImporting) {
|
||||||
|
return '正在导入,请稍候...'
|
||||||
|
}
|
||||||
|
if (this.isExporting) {
|
||||||
|
return '正在导出,请稍候...'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
created () {
|
created () {
|
||||||
const that = this
|
const that = this
|
||||||
enquireScreen(deviceType => {
|
enquireScreen(deviceType => {
|
||||||
@@ -37,4 +55,9 @@ export default {
|
|||||||
#app {
|
#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.port-spin > div > .ant-spin {
|
||||||
|
height: 100vh!important;
|
||||||
|
max-height: unset!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -9977,6 +9977,7 @@
|
|||||||
btnUrl: "/online/cgform/head/enhanceButton/",
|
btnUrl: "/online/cgform/head/enhanceButton/",
|
||||||
btnList: [],
|
btnList: [],
|
||||||
url: "/online/cgform/head/enhanceJava/",
|
url: "/online/cgform/head/enhanceJava/",
|
||||||
|
addUrl: "/online/cgform/head/addEnhanceJava/",
|
||||||
urlByButtonCode: "/online/cgform/head/enhanceJavaByButtonCode/",
|
urlByButtonCode: "/online/cgform/head/enhanceJavaByButtonCode/",
|
||||||
model: {
|
model: {
|
||||||
buttonCode: "add",
|
buttonCode: "add",
|
||||||
@@ -9995,7 +9996,7 @@
|
|||||||
if (e.confirmLoading = !0, e.model.id) {
|
if (e.confirmLoading = !0, e.model.id) {
|
||||||
var a = Object.assign(e.model, n);
|
var a = Object.assign(e.model, n);
|
||||||
r = Object(o["g"])(e.url + e.code, a)
|
r = Object(o["g"])(e.url + e.code, a)
|
||||||
} else r = Object(o["f"])(e.url + e.code, n);
|
} else r = Object(o["f"])(e.addUrl + e.code, n);
|
||||||
r.then((function(t) {
|
r.then((function(t) {
|
||||||
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message)) : e.$message.warning(
|
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message)) : e.$message.warning(
|
||||||
t.message)
|
t.message)
|
||||||
@@ -10275,7 +10276,8 @@
|
|||||||
url: {
|
url: {
|
||||||
loadFormItems: "/online/cgform/api/getErpFormItem/",
|
loadFormItems: "/online/cgform/api/getErpFormItem/",
|
||||||
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
||||||
optPre: "/online/cgform/api/form/"
|
optPre: "/online/cgform/api/form/",
|
||||||
|
optPreUpdate: "/online/cgform/api/form/update/"
|
||||||
},
|
},
|
||||||
schema: {},
|
schema: {},
|
||||||
uiSchema: {
|
uiSchema: {
|
||||||
@@ -10408,8 +10410,8 @@
|
|||||||
edit: function(e, t) {
|
edit: function(e, t) {
|
||||||
var that = this;
|
var that = this;
|
||||||
this.titleText = "编辑", this.uiSchema.method = "post", this.uiSchema.formTemplate = e, this.uiSchema.url =
|
this.titleText = "编辑", this.uiSchema.method = "post", this.uiSchema.formTemplate = e, this.uiSchema.url =
|
||||||
this.url.optPre + this.code, this.uiSchema = c({}, this.uiSchema), this.visible = !0, this.disableSubmit = !
|
this.url.optPreUpdate + this.code, this.uiSchema = c({}, this.uiSchema), this.visible = !0, this.disableSubmit = !
|
||||||
1, Object(o["c"])(this.url.optPre + this.code + "/" + t).then((function(e) {
|
1, Object(o["c"])(this.url.optPreUpdate + this.code + "/" + t).then((function(e) {
|
||||||
if (e.success) {
|
if (e.success) {
|
||||||
var t = e.result;
|
var t = e.result;
|
||||||
that.$refs.onlineForm.edit(t)
|
that.$refs.onlineForm.edit(t)
|
||||||
@@ -19301,6 +19303,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: "/online/cgform/head/enhanceJs/",
|
url: "/online/cgform/head/enhanceJs/",
|
||||||
|
addUrl: "/online/cgform/head/addEnhanceJs/",
|
||||||
model: {},
|
model: {},
|
||||||
cgJsType: [],
|
cgJsType: [],
|
||||||
cgJs: "",
|
cgJs: "",
|
||||||
@@ -19324,7 +19327,7 @@
|
|||||||
if (this.model.id) {
|
if (this.model.id) {
|
||||||
var r = Object.assign({}, this.model, n);
|
var r = Object.assign({}, this.model, n);
|
||||||
t = Object(i["g"])(this.url + this.code, r)
|
t = Object(i["g"])(this.url + this.code, r)
|
||||||
} else t = Object(i["f"])(this.url + this.code, n);
|
} else t = Object(i["f"])(this.addUrl + this.code, n);
|
||||||
t.then((function(t) {
|
t.then((function(t) {
|
||||||
e.confirmLoading = !1, t.success ? (e.addLocalRecord(n), e.visible = !1, e.$message.success(t.message)) :
|
e.confirmLoading = !1, t.success ? (e.addLocalRecord(n), e.visible = !1, e.$message.success(t.message)) :
|
||||||
e.$message.warning(t.message)
|
e.$message.warning(t.message)
|
||||||
@@ -20310,7 +20313,8 @@
|
|||||||
url: {
|
url: {
|
||||||
loadFormItems: "/online/cgform/api/getFormItemBytbname/",
|
loadFormItems: "/online/cgform/api/getFormItemBytbname/",
|
||||||
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
||||||
optPre: "/online/cgform/api/form/"
|
optPre: "/online/cgform/api/form/",
|
||||||
|
optPreUpdateUrl: "/online/cgform/api/form/update/"
|
||||||
},
|
},
|
||||||
schema: {},
|
schema: {},
|
||||||
uiSchema: {},
|
uiSchema: {},
|
||||||
@@ -20331,7 +20335,7 @@
|
|||||||
var n = {
|
var n = {
|
||||||
formTemplate: t.result.head.formTemplate,
|
formTemplate: t.result.head.formTemplate,
|
||||||
method: "post",
|
method: "post",
|
||||||
url: e.url.optPre + t.result.head.id
|
url: e.url.optPreUpdateUrl + t.result.head.id
|
||||||
};
|
};
|
||||||
e.schema = Object.assign({}, t.result.schema, n);
|
e.schema = Object.assign({}, t.result.schema, n);
|
||||||
var r = e.url.optPre + t.result.head.id + "/" + e.dataId;
|
var r = e.url.optPre + t.result.head.id + "/" + e.dataId;
|
||||||
@@ -26855,6 +26859,7 @@
|
|||||||
loading: !1,
|
loading: !1,
|
||||||
dataSource: w,
|
dataSource: w,
|
||||||
url: "/online/cgform/api/authData",
|
url: "/online/cgform/api/authData",
|
||||||
|
editUrl: "/online/cgform/api/editAuthData",
|
||||||
columnList: [],
|
columnList: [],
|
||||||
columns: [{
|
columns: [{
|
||||||
title: "启用",
|
title: "启用",
|
||||||
@@ -27024,7 +27029,7 @@
|
|||||||
},
|
},
|
||||||
editAuthData: function(e) {
|
editAuthData: function(e) {
|
||||||
var t = this;
|
var t = this;
|
||||||
Object(_["g"])(this.url, e).then((function(e) {
|
Object(_["g"])(this.editUrl, e).then((function(e) {
|
||||||
e.success ? (t.visible = !1, t.loadAuthData(), t.$message.success(e.message)) : t.$message.warning(e.message)
|
e.success ? (t.visible = !1, t.loadAuthData(), t.$message.success(e.message)) : t.$message.warning(e.message)
|
||||||
})).finally((function() {
|
})).finally((function() {
|
||||||
t.confirmLoading = !1
|
t.confirmLoading = !1
|
||||||
@@ -27649,6 +27654,7 @@
|
|||||||
btnUrl: "/online/cgform/head/enhanceButton/",
|
btnUrl: "/online/cgform/head/enhanceButton/",
|
||||||
btnList: [],
|
btnList: [],
|
||||||
url: "/online/cgform/head/enhanceSql/",
|
url: "/online/cgform/head/enhanceSql/",
|
||||||
|
addUrl: "/online/cgform/head/addEnhanceSql/",
|
||||||
model: {},
|
model: {},
|
||||||
tableName: ""
|
tableName: ""
|
||||||
}
|
}
|
||||||
@@ -27662,7 +27668,7 @@
|
|||||||
if (e.confirmLoading = !0, e.model.id) {
|
if (e.confirmLoading = !0, e.model.id) {
|
||||||
var a = Object.assign(e.model, n);
|
var a = Object.assign(e.model, n);
|
||||||
r = Object(i["g"])(e.url + e.code, a)
|
r = Object(i["g"])(e.url + e.code, a)
|
||||||
} else r = Object(i["f"])(e.url + e.code, n);
|
} else r = Object(i["f"])(e.addUrl + e.code, n);
|
||||||
r.then((function(t) {
|
r.then((function(t) {
|
||||||
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message)) : e.$message.warning(
|
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message)) : e.$message.warning(
|
||||||
t.message)
|
t.message)
|
||||||
@@ -40091,7 +40097,8 @@
|
|||||||
urls: {
|
urls: {
|
||||||
loadFormItems: "/online/cgform/api/getFormItem/",
|
loadFormItems: "/online/cgform/api/getFormItem/",
|
||||||
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
||||||
optPre: "/online/cgform/api/form/"
|
optPre: "/online/cgform/api/form/",
|
||||||
|
optPreUpdate: "/online/cgform/api/form/update/"
|
||||||
},
|
},
|
||||||
formSchema: {},
|
formSchema: {},
|
||||||
uiSchema: {
|
uiSchema: {
|
||||||
@@ -40154,8 +40161,8 @@
|
|||||||
edit: function(e, t) {
|
edit: function(e, t) {
|
||||||
var n = this;
|
var n = this;
|
||||||
this.titleText = "编辑", this.uiSchema.method = "post", this.uiSchema.formTemplate = e, this.uiSchema.url =
|
this.titleText = "编辑", this.uiSchema.method = "post", this.uiSchema.formTemplate = e, this.uiSchema.url =
|
||||||
this.urls.optPre + this.code, this.uiSchema = v({}, this.uiSchema), this.visible = !0, this.disableSubmit = !
|
this.urls.optPreUpdate + this.code, this.uiSchema = v({}, this.uiSchema), this.visible = !0, this.disableSubmit = !
|
||||||
1, Object(i["c"])(this.urls.optPre + this.code + "/" + t).then((function(e) {
|
1, Object(i["c"])(this.urls.optPreUpdate + this.code + "/" + t).then((function(e) {
|
||||||
if (e.success) {
|
if (e.success) {
|
||||||
var t = e.result;
|
var t = e.result;
|
||||||
n.$refs.onlineFormTab.edit(t)
|
n.$refs.onlineFormTab.edit(t)
|
||||||
@@ -41620,6 +41627,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: "/online/cgform/head/enhanceJava/",
|
url: "/online/cgform/head/enhanceJava/",
|
||||||
|
addUrl: "/online/cgform/head/addEnhanceJava/",
|
||||||
model: {
|
model: {
|
||||||
buttonCode: "add",
|
buttonCode: "add",
|
||||||
event: "end",
|
event: "end",
|
||||||
@@ -41652,7 +41660,7 @@
|
|||||||
if (e.confirmLoading = !0, e.model.id) {
|
if (e.confirmLoading = !0, e.model.id) {
|
||||||
var a = Object.assign(e.model, n);
|
var a = Object.assign(e.model, n);
|
||||||
r = Object(o["g"])(e.url + e.code, a)
|
r = Object(o["g"])(e.url + e.code, a)
|
||||||
} else r = Object(o["f"])(e.url + e.code, n);
|
} else r = Object(o["f"])(e.addUrl + e.code, n);
|
||||||
r.then((function(t) {
|
r.then((function(t) {
|
||||||
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message), e.$emit("ok")) :
|
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message), e.$emit("ok")) :
|
||||||
e.$message.warning(t.message)
|
e.$message.warning(t.message)
|
||||||
@@ -42888,6 +42896,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: "/online/cgform/head/enhanceSql/",
|
url: "/online/cgform/head/enhanceSql/",
|
||||||
|
addUrl: "/online/cgform/head/addEnhanceSql/",
|
||||||
model: {
|
model: {
|
||||||
buttonCode: "add",
|
buttonCode: "add",
|
||||||
cgbSql: "",
|
cgbSql: "",
|
||||||
@@ -42923,7 +42932,7 @@
|
|||||||
if (e.confirmLoading = !0, e.model.id) {
|
if (e.confirmLoading = !0, e.model.id) {
|
||||||
var a = Object.assign(e.model, n);
|
var a = Object.assign(e.model, n);
|
||||||
r = Object(o["g"])(e.url + e.code, a)
|
r = Object(o["g"])(e.url + e.code, a)
|
||||||
} else r = Object(o["f"])(e.url + e.code, n);
|
} else r = Object(o["f"])(e.addUrl + e.code, n);
|
||||||
r.then((function(t) {
|
r.then((function(t) {
|
||||||
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message), e.$emit("ok")) :
|
e.confirmLoading = !1, t.success ? (e.visible = !1, e.$message.success(t.message), e.$emit("ok")) :
|
||||||
e.$message.warning(t.message)
|
e.$message.warning(t.message)
|
||||||
@@ -73533,7 +73542,8 @@
|
|||||||
url: {
|
url: {
|
||||||
loadFormItems: "/online/cgform/api/getFormItem/",
|
loadFormItems: "/online/cgform/api/getFormItem/",
|
||||||
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
loadEnhanceJs: "/online/cgform/api/getEnhanceJs/",
|
||||||
optPre: "/online/cgform/api/form/"
|
optPre: "/online/cgform/api/form/",
|
||||||
|
optPreUpdate: "/online/cgform/api/form/update/"
|
||||||
},
|
},
|
||||||
schema: {},
|
schema: {},
|
||||||
uiSchema: {
|
uiSchema: {
|
||||||
@@ -73615,8 +73625,8 @@
|
|||||||
edit: function(e, t) {
|
edit: function(e, t) {
|
||||||
var n = this;
|
var n = this;
|
||||||
this.titleText = "编辑", this.uiSchema.method = "post", this.uiSchema.formTemplate = e, this.uiSchema.url =
|
this.titleText = "编辑", this.uiSchema.method = "post", this.uiSchema.formTemplate = e, this.uiSchema.url =
|
||||||
this.url.optPre + this.code, this.uiSchema = c({}, this.uiSchema), this.visible = !0, this.disableSubmit = !
|
this.url.optPreUpdate + this.code, this.uiSchema = c({}, this.uiSchema), this.visible = !0, this.disableSubmit = !
|
||||||
1, Object(o["c"])(this.url.optPre + this.code + "/" + t).then((function(e) {
|
1, Object(o["c"])(this.url.optPreUpdate + this.code + "/" + t).then((function(e) {
|
||||||
if (e.success) {
|
if (e.success) {
|
||||||
var t = e.result;
|
var t = e.result;
|
||||||
n.$refs.onlineForm.edit(t)
|
n.$refs.onlineForm.edit(t)
|
||||||
|
|||||||
@@ -270,6 +270,8 @@ export const JeroListMixin = {
|
|||||||
param.selections = this.selectedRowKeys.join(',')
|
param.selections = this.selectedRowKeys.join(',')
|
||||||
}
|
}
|
||||||
console.log('导出参数', param)
|
console.log('导出参数', param)
|
||||||
|
// 添加全局遮罩
|
||||||
|
this.$store.commit('SET_IS_EXPORTING', true)
|
||||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
this.$message.warning('文件下载失败')
|
this.$message.warning('文件下载失败')
|
||||||
@@ -288,15 +290,22 @@ export const JeroListMixin = {
|
|||||||
document.body.removeChild(link) // 下载完成移除元素
|
document.body.removeChild(link) // 下载完成移除元素
|
||||||
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
// 去掉全局遮罩
|
||||||
|
this.$store.commit('SET_IS_EXPORTING', false)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/* 导入 */
|
/* 导入 */
|
||||||
handleImportExcel (info) {
|
handleImportExcel (info) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
// 添加全局遮罩
|
||||||
|
this.$store.commit('SET_IS_IMPORTING', true)
|
||||||
if (info.file.status !== 'uploading') {
|
if (info.file.status !== 'uploading') {
|
||||||
console.log(info.file, info.fileList)
|
console.log(info.file, info.fileList)
|
||||||
}
|
}
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
|
// 去掉全局遮罩
|
||||||
|
this.$store.commit('SET_IS_IMPORTING', false)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (info.file.response.success) {
|
if (info.file.response.success) {
|
||||||
// this.$message.success(`${info.file.name} 文件上传成功`);
|
// this.$message.success(`${info.file.name} 文件上传成功`);
|
||||||
@@ -319,6 +328,8 @@ export const JeroListMixin = {
|
|||||||
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
|
this.$message.error(`${info.file.name} ${info.file.response.message}.`)
|
||||||
}
|
}
|
||||||
} else if (info.file.status === 'error') {
|
} else if (info.file.status === 'error') {
|
||||||
|
// 去掉全局遮罩
|
||||||
|
this.$store.commit('SET_IS_IMPORTING', false)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (info.file.response.status === 500) {
|
if (info.file.response.status === 500) {
|
||||||
const data = info.file.response
|
const data = info.file.response
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ const app = {
|
|||||||
autoHideHeader: false,
|
autoHideHeader: false,
|
||||||
color: null,
|
color: null,
|
||||||
weak: false,
|
weak: false,
|
||||||
multipage: true // 默认多页签模式
|
multipage: true, // 默认多页签模式
|
||||||
|
isImporting: false, // 是否正在导入
|
||||||
|
isExporting: false // 是否正在导出
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_SIDEBAR_TYPE: (state, type) => {
|
SET_SIDEBAR_TYPE: (state, type) => {
|
||||||
@@ -78,6 +80,12 @@ const app = {
|
|||||||
SET_MULTI_PAGE (state, multipageFlag) {
|
SET_MULTI_PAGE (state, multipageFlag) {
|
||||||
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
||||||
state.multipage = multipageFlag
|
state.multipage = multipageFlag
|
||||||
|
},
|
||||||
|
SET_IS_IMPORTING (state, isImporting) {
|
||||||
|
state.isImporting = isImporting
|
||||||
|
},
|
||||||
|
SET_IS_EXPORTING (state, isExporting) {
|
||||||
|
state.isExporting = isExporting
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user