Conflicts:
	vue.config.js
This commit is contained in:
lvleigang 2024-07-31 16:05:12 +08:00
commit bfa0b1ca6b
5 changed files with 476 additions and 432 deletions

View File

@ -1,46 +1,46 @@
<template> <template>
<div> <div>
<base-right-dialog <base-right-dialog
ref="baseRightDialog" ref="baseRightDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="dialogVisible" :dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'" :title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose" @handleClose="handleDialogClose"
:type="dialogType" :type="dialogType"
:submitShow="submitShow" :submitShow="submitShow"
:size="'65%'" :size="'65%'"
@handleConfirmClick="handleConfirmClick" @handleConfirmClick="handleConfirmClick"
> >
<base-form <base-form
ref="basicsForm" ref="basicsForm"
:formRow="formRow" :formRow="formRow"
:isFunBtn="false" :isFunBtn="false"
:rules="basicsRules" :rules="basicsRules"
class="dialog_form" class="dialog_form"
:spanWidth="`120px`" :spanWidth="`120px`"
:loading="vLoading" :loading="vLoading"
style="padding-bottom:20px;" style="padding-bottom:20px;"
> >
<div slot="sourceData" class="code-json-editor"> <div slot="sourceData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="sourceData" v-model="sourceData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onSourceDataJsonChange" @json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave" @json-save="onSourceDataSave"
@has-error="onSourceDataError" @has-error="onSourceDataError"
/> />
</div> </div>
<div slot="targetData" class="code-json-editor"> <div slot="targetData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="targetData" v-model="targetData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onTargetDataChange" @json-change="onTargetDataChange"
@json-save="onTargetDataSave" @json-save="onTargetDataSave"
@has-error="onTargetDataError" @has-error="onTargetDataError"
/> />
</div> </div>
</base-form> </base-form>
@ -49,25 +49,26 @@
</template> </template>
<script> <script>
import vueJsonEditor from "vue-json-editor"; import vueJsonEditor from 'vue-json-editor'
import baseRightDialog from "@/components/base/baseRightDialog"; import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from "@/components/base/baseNewForm"; import baseForm from '@/components/base/baseNewForm'
import baseTable from "@/components/base/baseTable"; import baseTable from '@/components/base/baseTable'
import configData from "./configData"; import configData from './configData'
import { authApi } from "@/api/apis/auth"; import { authApi } from '@/api/apis/auth'
import {getApiModuleApi} from "@/api/apiChunks/index.js"; import { getApiModuleApi } from '@/api/apiChunks/index.js'
export default { export default {
components: { components: {
baseRightDialog, baseRightDialog,
baseForm, baseForm,
baseTable, baseTable,
vueJsonEditor, vueJsonEditor
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
dialogTitle: "", dialogTitle: '',
dialogType: "", dialogType: '',
formRow: configData.formRow, formRow: configData.formRow,
basicsRules: configData.basicsRules, basicsRules: configData.basicsRules,
vLoading: false, vLoading: false,
@ -75,136 +76,137 @@ export default {
sourceData: {}, sourceData: {},
sourceDataFlag: true, sourceDataFlag: true,
targetData: {}, targetData: {},
targetDataFlag: true, targetDataFlag: true
}; }
}, },
methods: { methods: {
openDialog(type, row) { openDialog(type, row) {
this.querysysAppService(); this.querysysAppService()
// this.querysysAppApiService(); // this.querysysAppApiService();
this.formRow = configData.formRow; this.formRow = configData.formRow
this.submitShow = true; this.submitShow = true
// //
if (type == "edit") { if (type == 'edit') {
this.dialogTitle = "编辑"; this.dialogTitle = '编辑'
this.dialogType = "edit"; this.dialogType = 'edit'
this.messageLogGetById(row.id); this.messageLogGetById(row.id)
} }
// //
if (type == "show") { if (type == 'show') {
this.submitShow = false; this.submitShow = false
this.formRow = configData.formRowShow; this.formRow = configData.formRowShow
this.dialogTitle = "查看"; this.dialogTitle = '查看'
this.dialogType = "show"; this.dialogType = 'show'
this.messageLogGetById(row.id); this.messageLogGetById(row.id, row)
} }
this.dialogVisible = true; this.dialogVisible = true
}, },
// //
async messageLogGetById(id) { async messageLogGetById(id, row) {
let params = { let params = {
id: id, id: id,
}; status: row.status
}
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", 'sysMessageManageLogService',
"messageManage", 'messageManage',
"thirdInterfacequeryEntity", 'thirdInterfacequeryEntity',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute); this.$refs.basicsForm.incomingParameters(res.attribute)
}); })
} }
}, },
// //
onSourceDataJsonChange(value) { onSourceDataJsonChange(value) {
this.onSourceDataSave(value); this.onSourceDataSave(value)
}, },
onSourceDataSave(value) { onSourceDataSave(value) {
this.sourceData = value; this.sourceData = value
this.sourceDataFlag = true; this.sourceDataFlag = true
}, },
onSourceDataError(value) { onSourceDataError(value) {
this.sourceDataFlag = false; this.sourceDataFlag = false
}, },
checkSourceDataJson() { checkSourceDataJson() {
if (this.sourceDataFlag === false) { if (this.sourceDataFlag === false) {
return false; return false
} else { } else {
return true; return true
} }
}, },
// //
onTargetDataChange(value) { onTargetDataChange(value) {
this.onTargetDataSave(value); this.onTargetDataSave(value)
}, },
onTargetDataSave(value) { onTargetDataSave(value) {
this.targetData = value; this.targetData = value
this.targetDataFlag = true; this.targetDataFlag = true
}, },
onTargetDataError(value) { onTargetDataError(value) {
this.targetDataFlag = false; this.targetDataFlag = false
}, },
checkTargetDataJson() { checkTargetDataJson() {
if (this.targetDataFlag === false) { if (this.targetDataFlag === false) {
return false; return false
} else { } else {
return true; return true
} }
}, },
// //
handleDialogClose() { handleDialogClose() {
this.$refs.basicsForm.resetFields(); this.$refs.basicsForm.resetFields()
this.dialogVisible = false; this.dialogVisible = false
}, },
// //
handleConfirmClick() { handleConfirmClick() {
let checkSource = this.checkSourceDataJson(); let checkSource = this.checkSourceDataJson()
if (!checkSource) { if (!checkSource) {
this.$vmNews("源数据格式应为JSON格式", "warning"); this.$vmNews('源数据格式应为JSON格式', 'warning')
return; return
} }
let checkTarget = this.checkTargetDataJson(); let checkTarget = this.checkTargetDataJson()
if (!checkTarget) { if (!checkTarget) {
this.$vmNews("目标数据格式应为JSON格式", "warning"); this.$vmNews('目标数据格式应为JSON格式', 'warning')
return; return
} }
let params = { let params = {
...this.$refs.basicsForm.ruleForm, ...this.$refs.basicsForm.ruleForm,
sourceData: this.sourceData, sourceData: this.sourceData,
targetData: this.targetData, targetData: this.targetData
}; }
if (this.dialogType == "edit") { if (this.dialogType == 'edit') {
this.openLoading("submit"); this.openLoading('submit')
this.messageLogUpdateDto(params); this.messageLogUpdateDto(params)
} }
}, },
// //
async messageLogUpdateDto(params) { async messageLogUpdateDto(params) {
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", 'sysMessageManageLogService',
"messageManage", 'messageManage',
"updateEntity", 'updateEntity',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.handleDialogClose(); this.handleDialogClose()
this.$vmNews("更新成功", "success"); this.$vmNews('更新成功', 'success')
this.$emit("resetTable"); this.$emit('resetTable')
} }
}, },
// //
async querysysAppService() { async querysysAppService() {
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "sysApplicationService", tl: 'sysApplicationService',
as: "application", as: 'application',
dj: "thirdInterfacequeryApp" dj: 'thirdInterfacequeryApp'
}, { }, {
"pageNum": 1, 'pageNum': 1,
"pageSize": 999 'pageSize': 999
}) })
this.formRow[0].elCol[0].options = res.attribute.list this.formRow[0].elCol[0].options = res.attribute.list
// if (res.status == "200") { // if (res.status == "200") {
@ -216,29 +218,31 @@ export default {
async querysysAppApiService() { async querysysAppApiService() {
let params = { let params = {
pageSize: 9999, pageSize: 9999,
pageNum: 1, pageNum: 1
}; }
let res = await authApi( let res = await authApi(
"appApiService", 'appApiService',
"appApi", 'appApi',
"queryPage", 'queryPage',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
// this.formRow[1].elCol[1].options = res.attribute.list; // this.formRow[1].elCol[1].options = res.attribute.list;
// this.formRow[2].elCol[1].options = res.attribute.list; // this.formRow[2].elCol[1].options = res.attribute.list;
} }
}, }
}, }
}; }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.code-json-editor { .code-json-editor {
/* jsoneditor右上角默认有一个链接,加css去掉 */ /* jsoneditor右上角默认有一个链接,加css去掉 */
/deep/ .jsoneditor-poweredBy { /deep/ .jsoneditor-poweredBy {
display: none !important; display: none !important;
} }
/deep/ .ace-jsoneditor { /deep/ .ace-jsoneditor {
height: 150px !important; height: 150px !important;
} }
@ -249,6 +253,7 @@ export default {
::v-deep textarea.el-textarea__inner { ::v-deep textarea.el-textarea__inner {
min-height: 150px !important; min-height: 150px !important;
} }
.dialogList { .dialogList {
padding: 16px 0; padding: 16px 0;
border-top: 1px solid #dcdfe6; border-top: 1px solid #dcdfe6;

View File

@ -1,46 +1,46 @@
<template> <template>
<div> <div>
<base-right-dialog <base-right-dialog
ref="baseRightDialog" ref="baseRightDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="dialogVisible" :dialogVisible.sync="dialogVisible"
:title="dialogTitle + ' 消息管理日志'" :title="dialogTitle + ' 消息管理日志'"
@handleClose="handleDialogClose" @handleClose="handleDialogClose"
:type="dialogType" :type="dialogType"
:submitShow="submitShow" :submitShow="submitShow"
:size="'65%'" :size="'65%'"
@handleConfirmClick="handleConfirmClick" @handleConfirmClick="handleConfirmClick"
> >
<base-form <base-form
ref="basicsForm" ref="basicsForm"
:formRow="formRow" :formRow="formRow"
:isFunBtn="false" :isFunBtn="false"
:rules="basicsRules" :rules="basicsRules"
class="dialog_form" class="dialog_form"
:spanWidth="`120px`" :spanWidth="`120px`"
:loading="vLoading" :loading="vLoading"
style="padding-bottom:20px;" style="padding-bottom:20px;"
> >
<div slot="sourceData" class="code-json-editor"> <div slot="sourceData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="sourceData" v-model="sourceData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onSourceDataJsonChange" @json-change="onSourceDataJsonChange"
@json-save="onSourceDataSave" @json-save="onSourceDataSave"
@has-error="onSourceDataError" @has-error="onSourceDataError"
/> />
</div> </div>
<div slot="targetData" class="code-json-editor"> <div slot="targetData" class="code-json-editor">
<vue-json-editor <vue-json-editor
class="editor" class="editor"
v-model="targetData" v-model="targetData"
:showBtns="false" :showBtns="false"
:mode="'code'" :mode="'code'"
@json-change="onTargetDataChange" @json-change="onTargetDataChange"
@json-save="onTargetDataSave" @json-save="onTargetDataSave"
@has-error="onTargetDataError" @has-error="onTargetDataError"
/> />
</div> </div>
</base-form> </base-form>
@ -49,25 +49,26 @@
</template> </template>
<script> <script>
import vueJsonEditor from "vue-json-editor"; import vueJsonEditor from 'vue-json-editor'
import baseRightDialog from "@/components/base/baseRightDialog"; import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from "@/components/base/baseNewForm"; import baseForm from '@/components/base/baseNewForm'
import baseTable from "@/components/base/baseTable"; import baseTable from '@/components/base/baseTable'
import configData from "./configData"; import configData from './configData'
import { authApi } from "@/api/apis/auth"; import { authApi } from '@/api/apis/auth'
import {getApiModuleApi} from "@/api/apiChunks/index.js"; import { getApiModuleApi } from '@/api/apiChunks/index.js'
export default { export default {
components: { components: {
baseRightDialog, baseRightDialog,
baseForm, baseForm,
baseTable, baseTable,
vueJsonEditor, vueJsonEditor
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
dialogTitle: "", dialogTitle: '',
dialogType: "", dialogType: '',
formRow: configData.formRow, formRow: configData.formRow,
basicsRules: configData.basicsRules, basicsRules: configData.basicsRules,
vLoading: false, vLoading: false,
@ -75,136 +76,137 @@ export default {
sourceData: {}, sourceData: {},
sourceDataFlag: true, sourceDataFlag: true,
targetData: {}, targetData: {},
targetDataFlag: true, targetDataFlag: true
}; }
}, },
methods: { methods: {
openDialog(type, row) { openDialog(type, row) {
this.querysysAppService(); this.querysysAppService()
// this.querysysAppApiService(); // this.querysysAppApiService();
this.formRow = configData.formRow; this.formRow = configData.formRow
this.submitShow = true; this.submitShow = true
// //
if (type == "edit") { if (type == 'edit') {
this.dialogTitle = "编辑"; this.dialogTitle = '编辑'
this.dialogType = "edit"; this.dialogType = 'edit'
this.messageLogGetById(row.id); this.messageLogGetById(row.id, row)
} }
// //
if (type == "show") { if (type == 'show') {
this.submitShow = false; this.submitShow = false
this.formRow = configData.formRowShow; this.formRow = configData.formRowShow
this.dialogTitle = "查看"; this.dialogTitle = '查看'
this.dialogType = "show"; this.dialogType = 'show'
this.messageLogGetById(row.id); this.messageLogGetById(row.id, row)
} }
this.dialogVisible = true; this.dialogVisible = true
}, },
// //
async messageLogGetById(id) { async messageLogGetById(id, row) {
let params = { let params = {
id: id, id: id,
}; status: row.status
}
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", 'sysMessageManageLogService',
"messageManage", 'messageManage',
"thirdInterfacequeryEntity", 'thirdInterfacequeryEntity',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute); this.$refs.basicsForm.incomingParameters(res.attribute)
}); })
} }
}, },
// //
onSourceDataJsonChange(value) { onSourceDataJsonChange(value) {
this.onSourceDataSave(value); this.onSourceDataSave(value)
}, },
onSourceDataSave(value) { onSourceDataSave(value) {
this.sourceData = value; this.sourceData = value
this.sourceDataFlag = true; this.sourceDataFlag = true
}, },
onSourceDataError(value) { onSourceDataError(value) {
this.sourceDataFlag = false; this.sourceDataFlag = false
}, },
checkSourceDataJson() { checkSourceDataJson() {
if (this.sourceDataFlag === false) { if (this.sourceDataFlag === false) {
return false; return false
} else { } else {
return true; return true
} }
}, },
// //
onTargetDataChange(value) { onTargetDataChange(value) {
this.onTargetDataSave(value); this.onTargetDataSave(value)
}, },
onTargetDataSave(value) { onTargetDataSave(value) {
this.targetData = value; this.targetData = value
this.targetDataFlag = true; this.targetDataFlag = true
}, },
onTargetDataError(value) { onTargetDataError(value) {
this.targetDataFlag = false; this.targetDataFlag = false
}, },
checkTargetDataJson() { checkTargetDataJson() {
if (this.targetDataFlag === false) { if (this.targetDataFlag === false) {
return false; return false
} else { } else {
return true; return true
} }
}, },
// //
handleDialogClose() { handleDialogClose() {
this.$refs.basicsForm.resetFields(); this.$refs.basicsForm.resetFields()
this.dialogVisible = false; this.dialogVisible = false
}, },
// //
handleConfirmClick() { handleConfirmClick() {
let checkSource = this.checkSourceDataJson(); let checkSource = this.checkSourceDataJson()
if (!checkSource) { if (!checkSource) {
this.$vmNews("源数据格式应为JSON格式", "warning"); this.$vmNews('源数据格式应为JSON格式', 'warning')
return; return
} }
let checkTarget = this.checkTargetDataJson(); let checkTarget = this.checkTargetDataJson()
if (!checkTarget) { if (!checkTarget) {
this.$vmNews("目标数据格式应为JSON格式", "warning"); this.$vmNews('目标数据格式应为JSON格式', 'warning')
return; return
} }
let params = { let params = {
...this.$refs.basicsForm.ruleForm, ...this.$refs.basicsForm.ruleForm,
sourceData: this.sourceData, sourceData: this.sourceData,
targetData: this.targetData, targetData: this.targetData
}; }
if (this.dialogType == "edit") { if (this.dialogType == 'edit') {
this.openLoading("submit"); this.openLoading('submit')
this.messageLogUpdateDto(params); this.messageLogUpdateDto(params)
} }
}, },
// //
async messageLogUpdateDto(params) { async messageLogUpdateDto(params) {
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", 'sysMessageManageLogService',
"messageManage", 'messageManage',
"updateEntity", 'updateEntity',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.handleDialogClose(); this.handleDialogClose()
this.$vmNews("更新成功", "success"); this.$vmNews('更新成功', 'success')
this.$emit("resetTable"); this.$emit('resetTable')
} }
}, },
// //
async querysysAppService() { async querysysAppService() {
const res = await getApiModuleApi({ const res = await getApiModuleApi({
tl: "sysApplicationService", tl: 'sysApplicationService',
as: "application", as: 'application',
dj: "thirdInterfacequeryApp" dj: 'thirdInterfacequeryApp'
}, { }, {
"pageNum": 1, 'pageNum': 1,
"pageSize": 999 'pageSize': 999
}) })
this.formRow[0].elCol[0].options = res.attribute.list this.formRow[0].elCol[0].options = res.attribute.list
// if (res.status == "200") { // if (res.status == "200") {
@ -216,29 +218,31 @@ export default {
async querysysAppApiService() { async querysysAppApiService() {
let params = { let params = {
pageSize: 9999, pageSize: 9999,
pageNum: 1, pageNum: 1
}; }
let res = await authApi( let res = await authApi(
"appApiService", 'appApiService',
"appApi", 'appApi',
"queryPage", 'queryPage',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
// this.formRow[1].elCol[1].options = res.attribute.list; // this.formRow[1].elCol[1].options = res.attribute.list;
// this.formRow[2].elCol[1].options = res.attribute.list; // this.formRow[2].elCol[1].options = res.attribute.list;
} }
}, }
}, }
}; }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.code-json-editor { .code-json-editor {
/* jsoneditor右上角默认有一个链接,加css去掉 */ /* jsoneditor右上角默认有一个链接,加css去掉 */
/deep/ .jsoneditor-poweredBy { /deep/ .jsoneditor-poweredBy {
display: none !important; display: none !important;
} }
/deep/ .ace-jsoneditor { /deep/ .ace-jsoneditor {
height: 150px !important; height: 150px !important;
} }
@ -249,6 +253,7 @@ export default {
::v-deep textarea.el-textarea__inner { ::v-deep textarea.el-textarea__inner {
min-height: 150px !important; min-height: 150px !important;
} }
.dialogList { .dialogList {
padding: 16px 0; padding: 16px 0;
border-top: 1px solid #dcdfe6; border-top: 1px solid #dcdfe6;

View File

@ -49,24 +49,25 @@
</template> </template>
<script> <script>
import vueJsonEditor from "vue-json-editor"; import vueJsonEditor from 'vue-json-editor'
import baseRightDialog from "@/components/base/baseRightDialog"; import baseRightDialog from '@/components/base/baseRightDialog'
import baseForm from "@/components/base/baseNewForm"; import baseForm from '@/components/base/baseNewForm'
import baseTable from "@/components/base/baseTable"; import baseTable from '@/components/base/baseTable'
import configData from "./configData"; import configData from './configData'
import { authApi } from "@/api/apis/auth"; import { authApi } from '@/api/apis/auth'
export default { export default {
components: { components: {
baseRightDialog, baseRightDialog,
baseForm, baseForm,
baseTable, baseTable,
vueJsonEditor, vueJsonEditor
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
dialogTitle: "", dialogTitle: '',
dialogType: "", dialogType: '',
formRow: configData.formRow, formRow: configData.formRow,
basicsRules: configData.basicsRules, basicsRules: configData.basicsRules,
vLoading: false, vLoading: false,
@ -74,180 +75,183 @@ export default {
sourceData: {}, sourceData: {},
sourceDataFlag: true, sourceDataFlag: true,
targetData: {}, targetData: {},
targetDataFlag: true, targetDataFlag: true
}; }
}, },
methods: { methods: {
openDialog(type, row) { openDialog(type, row) {
this.querysysAppService(); this.querysysAppService()
this.querysysAppApiService(); this.querysysAppApiService()
this.formRow = configData.formRow; this.formRow = configData.formRow
this.submitShow = true; this.submitShow = true
// //
if (type == "edit") { if (type == 'edit') {
this.dialogTitle = "编辑"; this.dialogTitle = '编辑'
this.dialogType = "edit"; this.dialogType = 'edit'
this.messageLogGetById(row.id); this.messageLogGetById(row.id, row)
} }
// //
if (type == "show") { if (type == 'show') {
this.submitShow = false; this.submitShow = false
this.formRow = configData.formRowShow; this.formRow = configData.formRowShow
this.dialogTitle = "查看"; this.dialogTitle = '查看'
this.dialogType = "show"; this.dialogType = 'show'
this.messageLogGetById(row.id); this.messageLogGetById(row.id, row)
} }
this.dialogVisible = true; this.dialogVisible = true
}, },
// //
async messageLogGetById(id) { async messageLogGetById(id, row) {
let params = { let params = {
id: id, id: id,
}; status: row.status
}
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", 'sysMessageManageLogService',
"messageManage", 'messageManage',
"queryEntity", 'queryEntity',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.basicsForm.incomingParameters(res.attribute); this.$refs.basicsForm.incomingParameters(res.attribute)
this.sourceData = res.attribute.sourceData this.sourceData = res.attribute.sourceData
? JSON.parse(res.attribute.sourceData) ? JSON.parse(res.attribute.sourceData)
: {}; : {}
this.targetData = res.attribute.targetData this.targetData = res.attribute.targetData
? JSON.parse(res.attribute.targetData) ? JSON.parse(res.attribute.targetData)
: {}; : {}
}); })
} }
}, },
// //
onSourceDataJsonChange(value) { onSourceDataJsonChange(value) {
this.onSourceDataSave(value); this.onSourceDataSave(value)
}, },
onSourceDataSave(value) { onSourceDataSave(value) {
this.sourceData = value; this.sourceData = value
this.sourceDataFlag = true; this.sourceDataFlag = true
}, },
onSourceDataError(value) { onSourceDataError(value) {
this.sourceDataFlag = false; this.sourceDataFlag = false
}, },
checkSourceDataJson() { checkSourceDataJson() {
if (this.sourceDataFlag === false) { if (this.sourceDataFlag === false) {
return false; return false
} else { } else {
return true; return true
} }
}, },
// //
onTargetDataChange(value) { onTargetDataChange(value) {
this.onTargetDataSave(value); this.onTargetDataSave(value)
}, },
onTargetDataSave(value) { onTargetDataSave(value) {
this.targetData = value; this.targetData = value
this.targetDataFlag = true; this.targetDataFlag = true
}, },
onTargetDataError(value) { onTargetDataError(value) {
this.targetDataFlag = false; this.targetDataFlag = false
}, },
checkTargetDataJson() { checkTargetDataJson() {
if (this.targetDataFlag === false) { if (this.targetDataFlag === false) {
return false; return false
} else { } else {
return true; return true
} }
}, },
// //
handleDialogClose() { handleDialogClose() {
this.sourceData = {}; this.sourceData = {}
this.targetData = {}; this.targetData = {}
this.$refs.basicsForm.resetFields(); this.$refs.basicsForm.resetFields()
this.dialogVisible = false; this.dialogVisible = false
}, },
// //
handleConfirmClick() { handleConfirmClick() {
let checkSource = this.checkSourceDataJson(); let checkSource = this.checkSourceDataJson()
if (!checkSource) { if (!checkSource) {
this.$vmNews("源数据格式应为JSON格式", "warning"); this.$vmNews('源数据格式应为JSON格式', 'warning')
return; return
} }
let checkTarget = this.checkTargetDataJson(); let checkTarget = this.checkTargetDataJson()
if (!checkTarget) { if (!checkTarget) {
this.$vmNews("目标数据格式应为JSON格式", "warning"); this.$vmNews('目标数据格式应为JSON格式', 'warning')
return; return
} }
let params = { let params = {
...this.$refs.basicsForm.ruleForm, ...this.$refs.basicsForm.ruleForm,
sourceData: this.sourceData, sourceData: this.sourceData,
targetData: this.targetData, targetData: this.targetData
}; }
if (this.dialogType == "edit") { if (this.dialogType == 'edit') {
this.openLoading("submit"); this.openLoading('submit')
this.messageLogUpdateDto(params); this.messageLogUpdateDto(params)
} }
}, },
// //
async messageLogUpdateDto(params) { async messageLogUpdateDto(params) {
let res = await authApi( let res = await authApi(
"sysMessageManageLogService", 'sysMessageManageLogService',
"messageManage", 'messageManage',
"updateEntity", 'updateEntity',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.handleDialogClose(); this.handleDialogClose()
this.$vmNews("更新成功", "success"); this.$vmNews('更新成功', 'success')
this.$emit("resetTable"); this.$emit('resetTable')
} }
}, },
// //
async querysysAppService() { async querysysAppService() {
let params = { let params = {
pageSize: 9999, pageSize: 9999,
pageNum: 1, pageNum: 1
}; }
let res = await authApi( let res = await authApi(
"sysAppService", 'sysAppService',
"app", 'app',
"queryPageApp", 'queryPageApp',
"", '',
params params
); )
if (res.status == "200") { if (res.status == '200') {
this.formRow[1].elCol[0].options = res.attribute.list; this.formRow[1].elCol[0].options = res.attribute.list
this.formRow[2].elCol[0].options = res.attribute.list; this.formRow[2].elCol[0].options = res.attribute.list
} }
}, },
// //
async querysysAppApiService() { async querysysAppApiService() {
let params = { let params = {
pageSize: 9999, pageSize: 9999,
pageNum: 1, pageNum: 1
};
let res = await authApi(
"appApiService",
"appApi",
"queryPage",
"",
params
);
if (res.status == "200") {
this.formRow[1].elCol[1].options = res.attribute.list;
this.formRow[2].elCol[1].options = res.attribute.list;
} }
}, let res = await authApi(
}, 'appApiService',
}; 'appApi',
'queryPage',
'',
params
)
if (res.status == '200') {
this.formRow[1].elCol[1].options = res.attribute.list
this.formRow[2].elCol[1].options = res.attribute.list
}
}
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.code-json-editor { .code-json-editor {
/* jsoneditor右上角默认有一个链接,加css去掉 */ /* jsoneditor右上角默认有一个链接,加css去掉 */
/deep/ .jsoneditor-poweredBy { /deep/ .jsoneditor-poweredBy {
display: none !important; display: none !important;
} }
/deep/ .ace-jsoneditor { /deep/ .ace-jsoneditor {
height: 150px !important; height: 150px !important;
} }
@ -257,6 +261,7 @@ export default {
::v-deep textarea.el-textarea__inner { ::v-deep textarea.el-textarea__inner {
min-height: 150px !important; min-height: 150px !important;
} }
.dialogList { .dialogList {
padding: 16px 0; padding: 16px 0;
border-top: 1px solid #dcdfe6; border-top: 1px solid #dcdfe6;

View File

@ -2,38 +2,38 @@
<div class="wrap"> <div class="wrap">
<div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.18"> <div class="tree" v-if="$route.query.viewType === '1'" style="flex:0.18">
<BaseMenuTree <BaseMenuTree
:menuData="treeData" :menuData="treeData"
:filterShow="false" :filterShow="false"
:Allshow="false" :Allshow="false"
:treeButton="false" :treeButton="false"
:filterButtonShow="false" :filterButtonShow="false"
style="height: 100%" style="height: 100%"
:treeProps="treeProps" :treeProps="treeProps"
@handleNodeClick="homeHandleNodeClick" @handleNodeClick="homeHandleNodeClick"
ref="menuTree" ref="menuTree"
></BaseMenuTree> ></BaseMenuTree>
</div> </div>
<div class="main" :style="{flex:$route.query.viewType === '1'?0.82:1}" v-loading="mainLoading"> <div class="main" :style="{flex:$route.query.viewType === '1'?0.82:1}" v-loading="mainLoading">
<div class="top"> <div class="top">
<div class="search"> <div class="search">
<BaseNewForm <BaseNewForm
v-loading="searchLoading" v-loading="searchLoading"
refName="searchForm" refName="searchForm"
:formRow="searchFormRow" :formRow="searchFormRow"
:formRule="false" :formRule="false"
:ruleForm="searchForm" :ruleForm="searchForm"
:newFlag="true" :newFlag="true"
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:isFunBtn="false" :isFunBtn="false"
></BaseNewForm> ></BaseNewForm>
</div> </div>
<div class="btnList"> <div class="btnList">
<div class="btnItem" v-for="item in searchButton" :key="item.buttonType"> <div class="btnItem" v-for="item in searchButton" :key="item.buttonType">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="buttonHandle(item)" @click="buttonHandle(item)"
v-btnPermission="{ btnID: item.buttonType, routeId: $route.meta.id }" v-btnPermission="{ btnID: item.buttonType, routeId: $route.meta.id }"
>{{ item.buttonName }} >{{ item.buttonName }}
</el-button> </el-button>
</div> </div>
@ -41,18 +41,18 @@
</div> </div>
<div class="table"> <div class="table">
<BaseTable <BaseTable
ref="mainTable" ref="mainTable"
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:tableData="tableData" :tableData="tableData"
:tableColumn="tableColumn" :tableColumn="tableColumn"
:funData="mainFunData" :funData="mainFunData"
:funWidth="funWidth" :funWidth="funWidth"
:showIndex="true" :showIndex="true"
:tabLoading="mainTabLoading" :tabLoading="mainTabLoading"
@onFunc="tableButtonHandle" @onFunc="tableButtonHandle"
@selectValueGeT="selectValueGeTHandle" @selectValueGeT="selectValueGeTHandle"
:tableHeight="'67vh'" :tableHeight="'67vh'"
:border="false" :border="false"
> >
<template #data_status="{row}"> <template #data_status="{row}">
{{ data_status_dist[row.data_status] }} {{ data_status_dist[row.data_status] }}
@ -60,8 +60,8 @@
</BaseTable> </BaseTable>
<div class="nextPage"> <div class="nextPage">
<BasePage <BasePage
:pageModel="pageModel" :pageModel="pageModel"
@update:pageModel="currentChangeHandle" @update:pageModel="currentChangeHandle"
></BasePage> ></BasePage>
</div> </div>
</div> </div>
@ -72,15 +72,15 @@
</h1> </h1>
<div class="dialogForm" v-if="dialogShow" style="padding: 0 20px"> <div class="dialogForm" v-if="dialogShow" style="padding: 0 20px">
<BaseNewForm <BaseNewForm
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:loading="dialogCommitLoading" :loading="dialogCommitLoading"
:formRow="formRow" :formRow="formRow"
:ruleForm="ruleForm" :ruleForm="ruleForm"
:lookFlag="lookFlag" :lookFlag="lookFlag"
:newFlag="newFlag" :newFlag="newFlag"
@onSubmit="onSubmitHandele" @onSubmit="onSubmitHandele"
:isFunBtn="false" :isFunBtn="false"
ref="dialogForm" ref="dialogForm"
></BaseNewForm> ></BaseNewForm>
</div> </div>
<template v-for="(item, index) in dialogTabaleInfo"> <template v-for="(item, index) in dialogTabaleInfo">
@ -89,17 +89,17 @@
{{ item.title }} {{ item.title }}
</h1> </h1>
<BaseTableForm <BaseTableForm
:lookflag="lookFlag" :lookflag="lookFlag"
:showIndex="true" :showIndex="true"
:treeSelectInfo="treeSelectInfo" :treeSelectInfo="treeSelectInfo"
:indexOperate="true" :indexOperate="true"
:tableInfo="item" :tableInfo="item"
@newRow="dialogTableAddHandle" @newRow="dialogTableAddHandle"
@onFunc="dialogTableDeleHandle" @onFunc="dialogTableDeleHandle"
:funData="dialogfunData" :funData="dialogfunData"
:border="false" :border="false"
:formIndex="index" :formIndex="index"
table-height="30vh" table-height="30vh"
></BaseTableForm> ></BaseTableForm>
</div> </div>
@ -112,14 +112,14 @@
<div class="title">分发</div> <div class="title">分发</div>
<div class="value" style="margin-left: 20px"> <div class="value" style="margin-left: 20px">
<el-select <el-select
v-model="sendCheckboxList" v-model="sendCheckboxList"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option
v-for="item in sendTableData" v-for="item in sendTableData"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -129,14 +129,14 @@
<div class="title">类型</div> <div class="title">类型</div>
<div class="value" style="margin-left: 20px"> <div class="value" style="margin-left: 20px">
<el-select <el-select
v-model="sendCheckboxType" v-model="sendCheckboxType"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option
v-for="item in sendTableTypeOptions" v-for="item in sendTableTypeOptions"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -173,6 +173,8 @@ import BasePage from './compoments/basePage.vue'
import baseDialog from '@/views/integrationOption/compoments/baseDialog' import baseDialog from '@/views/integrationOption/compoments/baseDialog'
import BaseTableForm from './compoments/baseTableForm_v2.vue' import BaseTableForm from './compoments/baseTableForm_v2.vue'
import BaseMenuTree from '@/views/intergrationTask/compoments/baseMenuTree.vue' import BaseMenuTree from '@/views/intergrationTask/compoments/baseMenuTree.vue'
import { getInfo } from '@/utils/auth'
import { authApi } from '@/api/apis/auth'
export default { export default {
data() { data() {
@ -302,6 +304,31 @@ export default {
} }
}, },
methods: { methods: {
//
async getBtn() {
let userId = JSON.parse(getInfo()).id
const res = await authApi('sysButtonConfigService', '', 'getUserButton', '', {
menuId: this.$route.meta.id,
userId: userId
})
let dist_arr = ['new', 'resize', 'search']
console.log(res, 'res')
this.searchButton = []
this.mainFunData = []
res.attribute.forEach(item => {
if (dist_arr.includes(item.nameEn)) {
this.searchButton.push({
buttonType: item.nameEn,
buttonName: item.nameCh
})
} else {
this.mainFunData.push({
text: item.nameCh,
type: item.nameEn
})
}
})
},
async init() { async init() {
this.mainLoading = true this.mainLoading = true
const res = await getUserModuleApi({ const res = await getUserModuleApi({
@ -451,12 +478,12 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.deleRowHanlde(row.id) this.deleRowHanlde(row.id)
}) })
.catch((error) => { .catch((error) => {
}) })
} else if (item.type === 'send') { } else if (item.type === 'send') {
this.sendHandle(row.id) this.sendHandle(row.id)
} }
@ -525,15 +552,15 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.dialogTabaleInfo[index].tableData.splice(row.index, 1) this.dialogTabaleInfo[index].tableData.splice(row.index, 1)
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
})
})
.catch((error) => {
}) })
})
.catch((error) => {
})
} }
}, },
//dialog //dialog
@ -667,20 +694,20 @@ export default {
showType: '4' showType: '4'
}) })
res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => { res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds.forEach(item => {
item.mdmModuleDbFiledsRules.forEach(ele => { item.mdmModuleDbFiledsRules.forEach(ele => {
if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') { if (ele.ruleCode === 'required' || ele.ruleCode === 'disabled') {
if (!ele.ruleValue) { if (!ele.ruleValue) {
item[ele.ruleCode] = false item[ele.ruleCode] = false
} else {
item[ele.ruleCode] = JSON.parse(ele.ruleValue)
}
} else { } else {
item[ele.ruleCode] = JSON.parse(ele.ruleValue) item[ele.ruleCode] = ele.ruleValue
} }
} else {
item[ele.ruleCode] = ele.ruleValue
}
item['id'] = item.enName item['id'] = item.enName
}) })
} }
) )
this.dialogFormName = res.attribute.mainMdmModuleDb.dbName this.dialogFormName = res.attribute.mainMdmModuleDb.dbName
this.formRow = [] this.formRow = []
@ -717,7 +744,7 @@ export default {
if (data.status === '200') { if (data.status === '200') {
this.ruleForm = data.attribute[this.mainTableName] this.ruleForm = data.attribute[this.mainTableName]
console.log(this.ruleForm, console.log(this.ruleForm,
'123' '123'
) )
console.log(this.ruleForm, this.mainTableName, data.attribute, '123') console.log(this.ruleForm, this.mainTableName, data.attribute, '123')
this.dialogTabaleInfo.forEach(table => { this.dialogTabaleInfo.forEach(table => {
@ -903,6 +930,7 @@ export default {
}, },
created() { created() {
this.init() this.init()
this.getBtn()
} }
, ,
components: { components: {

View File

@ -45,6 +45,7 @@ module.exports = {
// target: `http://192.168.2.78:9999`, // target: `http://192.168.2.78:9999`,
target: `http://192.168.2.85:9999`, target: `http://192.168.2.85:9999`,
// target: `http://192.168.2.78:8080`, // target: `http://192.168.2.78:8080`,
target: `http://192.168.2.78:9999`,
// target: `http://192.168.2.83:9999`, // target: `http://192.168.2.83:9999`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {