Compare commits

...

9 Commits

Author SHA1 Message Date
hyt 23f95f2bda 会计事项平台更新 2025-08-07 15:37:39 +08:00
hyt 671effa4a5 会计事项平台更新 2025-08-04 16:36:51 +08:00
caorui 86a6a25bf3 场景中心代码迭代 2025-08-01 14:59:22 +08:00
caorui 583759c70b 适配场景中心查看页面表单样式 2025-07-31 10:26:22 +08:00
caorui df74cbd87c 场景中心变更 2025-07-31 10:22:16 +08:00
hyt 64cca71663 会计事项平台更新 2025-07-31 09:10:09 +08:00
hyt 41ebc173f3 会计事项平台更新 2025-07-31 09:03:55 +08:00
hyt 94ccbe3221 会计事项平台更新 2025-07-30 14:25:20 +08:00
hyt 0959c962d3 会计事项平台更新 2025-07-30 14:15:54 +08:00
34 changed files with 3895 additions and 538 deletions

View File

@ -23,3 +23,25 @@ export function queryDetailsByBillCodeAPI(data) {
data,
});
}
export function queryBillFiledsAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryBillFileds",
method: "post",
data,
});
}
export function queryBillPagedAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryBillPaged",
method: "post",
data,
});
}
export function queryDetailsByBillCodeAndMdmIdAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/push/log/queryDetailsByBillCodeAndMdmId",
method: "post",
data,
});
}

View File

@ -1,8 +1,9 @@
import request from "@/utils/request";
import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage/index.vue'
export default {
components: { baseTree }
components: { basePage, baseTree }
}
//业务模块

BIN
src/assets/images/left1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -7,7 +7,7 @@
<el-form validate-on-rule-change :model="ruleForm" :rules="rules" label-position="top" ref="ruleForm"
label-width="100px"
>
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" style="margin-bottom: 17px;">
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" :style="{marginBottom: isSence ?'0': '17px'}">
<el-col v-for="(row, indexRow) in item.elCol" :span="row.span ? row.span : spanNumber" :key="indexRow">
<el-form-item :prop="row.prop" :style="`display: flex;margin-bottom: ${marginBottom}px;`"
v-if="row.show != false" :class="(rules[row.prop] ? 'ruleFormClass ' : '')"
@ -16,7 +16,7 @@
<div class="single label" v-if="row.label" slot="label"
:style="`width: ${spanWidth};` + `justify-content: ${justifyContent};`" flex
>
<span class="label">{{ row.label }}</span>
<span class="label" :style="{color: isSence ? '#999':'#333',fontSize: isSence ? '14px':'13px'}">{{ row.label }}</span>
</div>
<el-input v-model="ruleForm[row.prop]" v-if="row.tag === 'password'" type="password" show-password clearable
auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin"
@ -204,6 +204,10 @@ export default {
type: Boolean,
default: true
},
isSence: {
type: Boolean,
default: false
},
formdata: {
type: Object
},

View File

@ -35,12 +35,14 @@ export default {
sizeChange(val) {
let pageModel = this.pageModel
pageModel.pageSize = val
pageModel.limit = val
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
currentChange(val) {
let pageModel = this.pageModel
pageModel.pageIndex = val
pageModel.page = val
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
}

View File

@ -47,7 +47,11 @@ export default {
return data[4];
}else if (url.includes("businessMatter")) {
return data[5];
} else {
}else if (url.includes("accountantMatter")) {
return data[6];
}
else {
return empty;
}
} else {

View File

@ -115,7 +115,8 @@ export default {
this.currentPath.includes("IntegrationTaskCenter") ||
this.currentPath.includes("businessCenter") ||
this.currentPath.includes("ApplicationCenter")||
this.currentPath.includes("businessMatter")
this.currentPath.includes("businessMatter") ||
this.currentPath.includes("accountantMatter")
) {
route.meta.affix = true;
@ -186,6 +187,12 @@ export default {
icon: "el-icon-postcard",
show: false,
},
{
title: "财资事项平台",
path: "/accountantMatter",
icon: "el-icon-postcard",
show: false,
},
],
};
},
@ -198,7 +205,8 @@ export default {
url.includes("IntegrationTaskCenter") ||
url.includes("businessCenter") ||
url.includes("ApplicationCenter") ||
url.includes("businessMatter")
url.includes("businessMatter") ||
url.includes("accountantMatter")
) {
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
@ -277,7 +285,8 @@ export default {
item.path.includes("IntegrationTaskCenter") ||
item.path.includes("businessCenter") ||
item.path.includes("ApplicationCenter") ||
item.path.includes("businessMatter")
item.path.includes("businessMatter") ||
item.path.includes("accountantMatter")
) {
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",

View File

@ -135,7 +135,11 @@ export default {
currentData = data[4]
} else if (url.includes('businessMatter')) {
currentData = data[5]
} else {
} else if (url.includes('accountantMatter')) {
currentData = data[6]
}
else {
currentData = []
}
} else {
@ -266,6 +270,8 @@ export default {
currentData = data[4]
} else if (url.includes('businessMatter')) {
currentData = data[5]
}else if (url.includes('accountantMatter')) {
currentData = data[6]
}
}
if (this.isActive(view)) {
@ -290,6 +296,8 @@ export default {
INDEX = 4
} else if (url.includes('businessMatter')) {
INDEX = 5
} else if (url.includes('accountantMatter')) {
INDEX = 6
}
}
@ -322,6 +330,8 @@ export default {
INDEX = 4
} else if (url.includes('businessMatter')) {
INDEX = 5
}else if (url.includes('accountantMatter')) {
INDEX = 6
}
}
if (INDEX != null) {
@ -361,6 +371,8 @@ export default {
INDEX = 4
} else if (url.includes('businessMatter')) {
INDEX = 5
} else if (url.includes('accountantMatter')) {
INDEX = 6
}
}
if (INDEX != null) {

View File

@ -172,6 +172,15 @@ export const constantRoutes = [{
title: '会计事项平台',
icon: 'dashboard'
}
},
{
path: 'accountantMatter',
component: () => import('@/views/newVersionView/accountantMatter/index'),
name: 'accountantMatter',
meta: {
title: '财资事项平台',
icon: 'dashboard'
}
}
]
},

View File

@ -7,6 +7,7 @@ const state = {
[],
[],
[],
[]
],
cachedViews: [
[],
@ -15,6 +16,7 @@ const state = {
[],
[],
[],
[]
],
iframeViews: [
[],
@ -22,6 +24,7 @@ const state = {
[],
[],
[],
[],
[]
],
@ -46,6 +49,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -73,6 +78,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -109,6 +116,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -134,6 +143,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -162,6 +173,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -185,6 +198,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -209,6 +224,8 @@ const mutations = {
Index = 4
}else if (url.includes("businessMatter")) {
Index = 5;
}else if (url.includes("accountantMatter")) {
Index = 6;
}
}
if (Index != null) {
@ -233,7 +250,9 @@ const mutations = {
} else if (url.includes("ApplicationCenter")) {
INDEX = 4
}else if (url.includes("businessMatter")) {
Index = 5;
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
@ -263,6 +282,8 @@ const mutations = {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
@ -287,6 +308,8 @@ const mutations = {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
@ -309,6 +332,8 @@ const mutations = {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
@ -331,6 +356,8 @@ const mutations = {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
@ -358,6 +385,8 @@ const mutations = {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {
@ -398,6 +427,8 @@ const mutations = {
INDEX = 4
}else if (url.includes("businessMatter")) {
INDEX = 5;
}else if (url.includes("accountantMatter")) {
INDEX = 6;
}
}
if (INDEX != null) {

View File

@ -19,9 +19,9 @@
</div>
<div class="showList">
<div class="showItem" v-for="(item,index) in voucherList" :key="index"
:class="{active:item.id === voucherClickId}" @click="voucherCliclHandle(item.id,item.name)"
:class="{active:item.id === voucherClickId}" @click="voucherCliclHandle(item.id,item.name,item.def1)"
>
<div class="name">{{ item.name }}</div>
<div class="name">{{ item.name }}{{ item.def1 === 'Y' ? '①' : '' }}</div>
<div class="icon">
<i class="el-icon-edit" @click.stop="voucherDialogEditHandle(item)" style="margin-right: 10px"></i>
<i class="el-icon-delete" style="color: red" @click.stop="voucherDialogDelHandle(item)"></i>
@ -119,6 +119,13 @@
type="primary"
>保存
</el-button>
<el-button
size="small"
icon="el-icon-check"
@click="copyOperate"
type="primary"
>复制
</el-button>
<el-button
size="small"
icon="el-icon-delete"
@ -418,6 +425,28 @@
{{ row.row.pkCashflow }}
</div>
</template>
<template #def1="{row}">
<div v-if="editFlag">
<el-select
class="w-100"
v-model="row.row.def1"
filterable
:clearable="true"
placeholder="请选择"
>
<el-option
v-for="(el, index) in [{label:'是',value:'Y'},{label:'否',value:'N'}]"
:key="el.value"
:label="el.label"
:value="el.value"
>
</el-option>
</el-select>
</div>
<div v-else>
{{ row.row.def1 === 'Y' ? '是' : '否' }}
</div>
</template>
<!-- 备注-->
<template #remark="{row}">
<div v-if="editFlag">
@ -702,6 +731,29 @@
></baseChoice>
</div>
</base-dialog>
<!-- 20250704新增凭证-->
<base-dialog
:dialogVisible.sync="voucherDialogShow"
:closeModal="false"
:footerShow="true"
:title="passwordDialogTitle+'凭证类型'"
width="400px"
top="20vh"
@handleConfirmClick="voucherDialogClickHandle"
>
<div class="rightDialogClass_main"
style="background-color: #fff;display: flex;align-content: flex-start;justify-content: flex-start;flex-direction: column"
>
<div class="addDialog">
<div class="nameTitle">凭证类型名称</div>
<el-input v-model="billTypeADDName"></el-input>
</div>
<div class="addDialog" style="align-items: center;display: flex;margin-top: 10px;justify-content: flex-start">
<div class="nameTitle">单笔生成</div>
<el-switch v-model="def1" active-value="Y" inactive-value="N"></el-switch>
</div>
</div>
</base-dialog>
</div>
</template>
@ -755,6 +807,7 @@ export default {
//
voucherClickId: '',
voucherClickName: '',
voucherClickdef1: '',
voucherDialogShow: false,
voucherList: [],
subClassOptions: [],//
@ -783,6 +836,7 @@ export default {
width: '100'
}
],
def1: 'N',
pkglbookOptions: [],
treePropsproperty: {
children: 'sublistMdmModuleDbFileds',
@ -800,7 +854,7 @@ export default {
clickRowKey: '',
activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)','if(*?:)'],
//text
textarea: '',
textareaEn: '',
@ -1001,28 +1055,28 @@ export default {
],
exchangeRate: [
{ required: true, message: '请输入汇率', trigger: 'change' }
],
jNumField: [
{ required: true, message: '请选择借方数量字段', trigger: 'change' }
],
jYbSumField: [
{ required: true, message: '请选择借方原币金额字段', trigger: 'change' }
],
jBbSumField: [
{ required: true, message: '请选择借方本币金额字段', trigger: 'change' }
],
dNumField: [
{ required: true, message: '请选择贷方数量字段', trigger: 'change' }
],
dYbSumField: [
{ required: true, message: '请选择贷方原币金额字段', trigger: 'change' }
],
dBbSumField: [
{ required: true, message: '请选择贷方本币金额字段', trigger: 'change' }
],
pkCashflow: [
{ required: true, message: '请选择现金流量项目主键', trigger: 'change' }
]
// jNumField: [
// { required: true, message: '', trigger: 'change' }
// ],
// jYbSumField: [
// { required: true, message: '', trigger: 'change' }
// ],
// jBbSumField: [
// { required: true, message: '', trigger: 'change' }
// ],
// dNumField: [
// { required: true, message: '', trigger: 'change' }
// ],
// dYbSumField: [
// { required: true, message: '', trigger: 'change' }
// ],
// dBbSumField: [
// { required: true, message: '', trigger: 'change' }
// ],
// pkCashflow: [
// { required: true, message: '', trigger: 'change' }
// ]
},
fixedValueForm: [
@ -1144,6 +1198,11 @@ export default {
prop: 'pkCashflow',
width: 150
},
{
label: '是否计算科目余额',
prop: 'def1',
width: 150
},
{
label: '备注',
prop: 'remark',
@ -1230,7 +1289,8 @@ export default {
}
let obj = this.$refs.baseChoice2.optionData
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', obj[this.fixedValueClickRow.namefieldname])
this.textarea += `@@$${this.fixedValueClickRow.dbName}:${this.fixedValueClickRow.tablepkname}=${obj[this.fixedValueClickRow.tablepkname]}`
console.log(this.fixedValueClickRow, 'this.fixedValueClickRow')
this.textarea += `@@$${this.fixedValueClickRow.dbName}:id=${obj.id}`
// this.$set(this.clickRow, `factorid${this.clickNum}`, this.$refs.baseChoice.optionData[this.clickObj.key])
// this.$set(this.clickRow, `factorname${this.clickNum}`, this.$refs.baseChoice.optionData[this.clickObj.labelKey])
// this.$set(this.clickRow, `factorpk${this.clickNum}`, this.$refs.baseChoice.optionData['id'])
@ -1280,9 +1340,10 @@ export default {
this.selected[0].assistEntityList.push({})
},
//
voucherCliclHandle(id, name) {
voucherCliclHandle(id, name, def1) {
this.voucherClickId = id
this.voucherClickName = name
this.voucherClickdef1 = def1
this.resetTable()
},
voucherDialogDelHandle(item) {
@ -1301,6 +1362,7 @@ export default {
voucherDialogEditHandle(item) {
this.billTypeADDID = item.id
this.billTypeADDName = item.name
this.def1 = item.def1
this.voucherDialogShow = true
this.passwordDialogTitle = '编辑'
},
@ -1323,7 +1385,8 @@ export default {
if (this.passwordDialogTitle === '新增') {
const res = await typeSaveAPI({
name: this.billTypeADDName,
mdmId: this.billTypeClickID
mdmId: this.billTypeClickID,
def1: this.def1
})
this.$vmNews('保存成功', 'success')
this.getVoucherListHandle()
@ -1331,7 +1394,8 @@ export default {
const res = await typeUpdateAPI({
id: this.billTypeADDID,
name: this.billTypeADDName,
mdmId: this.billTypeClickID
mdmId: this.billTypeClickID,
def1: this.def1
})
this.$vmNews('保存成功', 'success')
this.getVoucherListHandle()
@ -1342,6 +1406,7 @@ export default {
this.voucherDialogShow = true
this.passwordDialogTitle = '新增'
this.billTypeADDName = ''
this.def1 = 'N'
this.billTypeADDID = ''
},
//
@ -1366,6 +1431,21 @@ export default {
this.editFlag = false
this.getTableData()
},
//
async copyOperate() {
if (!this.selected.length) {
this.$vmNews('请至少选择一条数据')
return
}
let copyTarget = JSON.parse(JSON.stringify(this.selected[0]))
console.log(copyTarget.assistEntityList, 'copyTarget')
//id
delete copyTarget.id
copyTarget.assistEntityList.forEach(item => {
delete item.id
})
this.tableData.push(copyTarget)
},
//
closeOperate() {
this.editFlag = false
@ -2223,7 +2303,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
@ -2324,7 +2404,7 @@ export default {
'nameEn': 'delOperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -1779,7 +1779,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
@ -1880,7 +1880,7 @@ export default {
'nameEn': 'delOperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -1567,7 +1567,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
@ -1668,7 +1668,7 @@ export default {
'nameEn': 'delOperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -0,0 +1,415 @@
<template>
<div class="editorItem">
<el-form-item>
<div class="editor-header" :style="indentStyle">
<span
v-if="row.children && row.children.length > 0"
class="toggle-btn"
@click="toggleCollapse"
>
<i
:class="
isCollapsed ? 'el-icon-caret-right' : 'el-icon-caret-bottom'
"
></i>
</span>
<span class="column-title"
>{{ row.column_name }}
<span style="font-size: 12px; margin-left: 5px; font-weight: bold">{{
row.column_comment
}}</span></span
>
</div>
<div class="editor-container" :style="indentStyle">
<div
class="content-editor"
:ref="'contentEditor' + row.column_name + rowIndex"
:contenteditable="!viewFlag"
@keydown="handleKeyDown($event, row.column_name, rowIndex)"
@input="handleInput($event, row.column_name, rowIndex)"
@click="handleEditorClick($event, row.column_name, rowIndex)"
@paste="handlePaste($event, row.column_name, rowIndex)"
@focus="handleEditorFocus($event, row.column_name, rowIndex)"
@blur="handleEditorBlur($event, row.column_name, rowIndex)"
></div>
<div
v-if="!viewFlag"
class="editorIcon"
@click.stop="handleAddNodeToEditor(row.column_name, rowIndex)"
>
<i class="el-icon-circle-plus"></i>
</div>
<div
v-if="!viewFlag"
class="clearIcon"
@click.stop="handleClearNodeToEditor(row.column_name, rowIndex)"
>
<i class="el-icon-circle-close"></i>
</div>
</div>
</el-form-item>
<!-- 子项只有在展开时才显示 -->
<EditorItem
v-if="!isCollapsed"
v-for="(child, index) in row.children"
:key="index"
:row="child"
:row-index="`${rowIndex}-${index}`"
v-bind="$attrs"
v-on="$listeners"
ref="childEditors"
ref-in-for
:viewFlag="viewFlag"
/>
</div>
</template>
<script>
export default {
name: "EditorItem",
props: {
row: Object,
rowIndex: [String, Number],
viewFlag: {
type: Boolean,
default: false,
},
},
data() {
return {
isCollapsed: false,
};
},
computed: {
indentLevel() {
return String(this.rowIndex).split("-").length - 1;
},
indentStyle() {
return {
paddingLeft: this.indentLevel * 20 + "px",
};
},
},
mounted() {
this.$nextTick(() => {
const refName = "contentEditor" + this.row.column_name + this.rowIndex;
const editor = this.$refs[refName];
// editor DOM undefined/
if (Array.isArray(editor)) {
if (editor.length > 0) {
this.$emit("register-editor", refName, editor[0]);
}
} else if (editor) {
this.$emit("register-editor", refName, editor);
}
});
},
methods: {
//
getEditorContent() {
// DOM
const refName = "contentEditor" + this.row.column_name + this.rowIndex;
const editor = this.$refs[refName];
//
let html_label = "";
let whereCondition = "";
if (editor) {
html_label = editor.innerHTML.trim();
editor.childNodes.forEach((node) => {
if (node.nodeType === Node.TEXT_NODE) {
whereCondition += node.textContent;
} else if (node.nodeType === Node.ELEMENT_NODE) {
whereCondition += node.getAttribute("data-token-text") || "";
}
});
//
whereCondition = whereCondition
.replace(//g, ",")
.replace(//g, "(")
.replace(//g, ")");
}
//
let children = [];
if (this.$refs.childEditors && this.$refs.childEditors.length > 0) {
children = this.$refs.childEditors.map((childComp) =>
childComp.getEditorContent()
);
}
return {
character_maximum_length: this.row.character_maximum_length,
column_comment: this.row.column_comment,
column_name: this.row.column_name,
data_type: this.row.data_type,
html_label: this.row.html_label,
is_nullable: this.row.is_nullable,
fieldName: this.row.column_name,
whereCondition,
html_label,
children,
};
},
toggleCollapse() {
this.isCollapsed = !this.isCollapsed;
},
//
handleKeyDown(e, columnName, rowIndex) {
this.$emit("handle-keydown", e, columnName, rowIndex);
},
handleInput(e, columnName, rowIndex) {
this.$emit("handle-input", e, columnName, rowIndex);
},
handleEditorClick(e, columnName, rowIndex) {
this.$emit("handle-editor-click", e, columnName, rowIndex);
},
handlePaste(e, columnName, rowIndex) {
this.$emit("handle-paste", e, columnName, rowIndex);
},
handleEditorFocus(e, columnName, rowIndex) {
this.$emit("handle-editor-focus", e, columnName, rowIndex);
},
handleEditorBlur(e, columnName, rowIndex) {
this.$emit("handle-editor-blur", e, columnName, rowIndex);
},
handleAddNodeToEditor(columnName, rowIndex) {
this.$emit("handle-add-node", columnName, rowIndex);
},
handleClearNodeToEditor(columnName, rowIndex) {
this.$emit("handle-clear-node", columnName, rowIndex);
},
},
components: {
EditorItem: () => import("./EditorItem.vue"),
},
};
</script>
<style lang="scss" scoped>
// ------------------------
.editor-container {
flex: 1;
overflow: hidden;
position: relative;
}
.editorIcon {
position: absolute;
right: 10px;
top: 0;
font-size: 20px;
color: #999999;
}
.clearIcon {
display: none;
position: absolute;
top: 0;
right: 35px;
font-size: 20px;
color: #999999;
}
.editor-container:hover .clearIcon {
display: block;
}
/* hover 时显示 close-icon */
.editor-container:hover .close-icon {
display: inline-flex; /* 或 block根据你的布局 */
}
.content-editor {
border: 1px solid #e5e7eb;
border-radius: 4px;
min-height: 40px;
padding: 0 50px 0 10px;
background: #fff;
position: relative;
font-size: 12px;
// line-height: 1.6;
overflow-y: auto;
outline: none;
word-wrap: break-word;
}
.content-editor:focus {
border-color: #409eff;
}
.content-editor:empty:before {
content: attr(data-placeholder);
color: #9ca3af;
font-style: italic;
pointer-events: none;
}
.content-editor:focus:empty:before {
content: "";
}
/* 确保空编辑器也能显示光标 */
.content-editor:empty {
min-height: 40px;
}
.content-editor:focus {
outline: none;
}
// --------------------------------
::v-deep .content-token {
display: unset !important;
padding: 3px 4px !important;
border-radius: 3px;
margin: 0 2px !important;
cursor: pointer;
transition: all 0.2s ease;
vertical-align: middle;
font-size: 12px;
font-weight: 500;
user-select: none;
}
::v-deep .token-function {
background: #ecfdf5;
color: #047857;
border: 1px solid #10b981;
}
::v-deep .repContainer {
width: 100%;
height: 100%;
background: #f5f5f5;
padding: 10px;
position: relative;
}
.treeNodeBox {
height: calc(100% - 50px);
overflow-y: auto;
}
.closeRepContainer {
position: absolute;
top: 20px;
right: 12px;
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
i {
margin-right: 5px;
}
}
.closeRepContainer:hover {
color: #409eff;
}
.repItem {
display: flex;
align-items: center;
margin-bottom: 8px;
cursor: pointer;
}
.repItem:hover .repItemValue {
color: #409eff;
}
.repItemValue {
color: #6b7280;
font-size: 13px;
margin-left: 10px;
}
.token-editable-content {
display: inline-block;
min-width: 1em;
padding: 0 2px;
border-bottom: 1px dashed #aaa;
cursor: text;
outline: none;
}
::v-deep .content-token.token-edit {
display: inline-flex !important;
color: #5b21b6;
font-weight: bold;
padding: 0;
}
.Columnsbtn {
margin: 10px 0;
display: flex;
justify-content: flex-end;
}
.fixedChildTable {
height: calc(100vh - 360px);
overflow: auto;
}
.drawParent {
position: relative;
}
.TestResultDisplayArea {
width: 400px;
height: calc(100% - 10px);
position: absolute;
right: 10px;
top: 5px;
background-color: #fff;
box-sizing: border-box;
box-shadow: 0 0 8px #0000001a;
border-radius: 4px;
z-index: 100;
overflow: hidden;
}
.testResultBoxTitle {
display: flex;
padding: 15px 10px;
background: #333333;
font-size: 14px;
font-weight: bold;
color: #fff;
justify-content: space-between;
border-radius: 4px 4px 0 0;
.closeTextBox {
cursor: pointer;
}
}
.jsonTestResultBox {
height: calc(100% - 90px);
overflow: auto;
}
::v-deep .el-alert {
padding: 10px !important;
}
.editor-header {
display: flex;
align-items: center;
margin-bottom: 5px;
font-weight: 500;
}
.toggle-btn {
cursor: pointer;
margin-right: 8px;
color: #606266;
font-size: 14px;
}
.column-title {
font-size: 14px;
color: #333;
display: flex;
font-weight: bold;
}
</style>

View File

@ -12,16 +12,16 @@
title="新增账号"
>
<template #addButton>
<el-button type="primary" @click="VerifyAccount">验证账号</el-button>
<el-button type="primary" v-if="!submitShow" @click="VerifyAccount">验证账号</el-button>
</template>
<div class="rightDialogClass_main" style="background: #fff; padding: 10px">
<base-form
style="padding-top: 0 !important"
spanWidth="80px"
ref="customForm"
:formRow="accountFormRow"
:formRow="currentForm"
:isFunBtn="false"
:rules="accountRules"
:rules="currentRules"
alignAt="block"
:span="24"
>
@ -62,6 +62,8 @@ export default {
data() {
return {
dialogVisible: false,
currentForm: [],
currentRules: {},
accountFormRow: [
{
elCol: [
@ -188,26 +190,161 @@ export default {
},
],
},
accountOtherFormRow: [
{
elCol: [
{
label: "账号名称",
prop: "name",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "ip地址",
prop: "ipAddress",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "端口",
prop: "port",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "应用Key",
prop: "appKey",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "应用密钥",
prop: "appSecret",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "企业ID",
prop: "corpid",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "应用ID",
prop: "agentid",
tag: "elInput",
span: 24,
},
],
},
],
accountOtherRules: {
name: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
ipAddress: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
port: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
appKey: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
appSecret: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
corpid: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
agentid: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
},
appID: "",
sceneID: "",
stepID: "",
accountType: "",
submitShow: false, //
message: "",
appType: "",
};
},
methods: {
openDialog(appID, sceneID, stepID) {
this.submitShow = false;
openDialog(appID, sceneID, stepID, appType) {
this.appType = appType;
this.message = "";
this.queryDictionaryList();
this.appID = appID;
this.sceneID = sceneID;
this.stepID = stepID;
this.submitShow = false;
if (appType == "9") {
this.currentForm = this.accountFormRow;
this.currentRules = this.accountRules;
this.queryDictionaryList();
} else {
this.submitShow = true;
this.currentForm = this.accountOtherFormRow;
this.currentRules = this.accountOtherRules;
}
this.$nextTick(() => {
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.customForm?.resetFields("ruleForm");
});
});
},
async queryDictionaryList() {
let params = {
@ -230,6 +367,7 @@ export default {
if (valid) {
let params = {
...this.$refs.customForm.ruleForm,
appType: this.appType,
};
this.verifyDataBase(params);
} else {
@ -257,6 +395,7 @@ export default {
}
},
handleConfirmClick() {
this.openLoading("保存")
this.$refs.customForm.$refs["ruleForm"].validate((valid) => {
if (valid) {
let params = {
@ -265,6 +404,7 @@ export default {
status: 1,
flowId: this.sceneID,
stepId: this.stepID,
appType: this.appType,
};
this.SaveAccountData(params);
} else {

View File

@ -25,7 +25,7 @@
style="background: #fff"
>
<!-- 步骤画布 -->
<div class="drawCanvas" v-show="!representation">
<div class="drawCanvas drawParent" v-show="!representation">
<div
class="drawItem"
v-for="(ele, index) in drawShowList"
@ -120,6 +120,41 @@
<div @click="addDrwaItem" class="drawItem drawItemBtn">
添加新步骤
</div>
<!-- 测试结果展示区 -->
<div class="TestResultDisplayArea" v-if="TestResultDisplayArea">
<div class="testResultBoxTitle">
测试结果输出
<div class="closeTextBox" @click="closeTestResultArea">
<i class="el-icon-close"></i> 关闭
</div>
</div>
<div
class="testSuccessTip"
v-if="jsonTestResultData && jsonTestResultData.flag"
>
<el-alert
title="测试成功"
type="success"
show-icon
:closable="false"
>
</el-alert>
</div>
<div class="testFailTip" v-else>
<el-alert
title="测试失败"
type="error"
:description="jsonTestResultData.msg"
show-icon
:closable="false"
>
</el-alert>
</div>
<div class="jsonTestResultBox" v-if="jsonTestResultData.attribute">
<json-view :data="jsonTestResultData.attribute" />
</div>
</div>
</div>
<!-- 动态内容及其表达式 -->
<div
@ -521,6 +556,7 @@
label-width="80px"
label-position="top"
style="margin-bottom: 10px"
v-if="currentRowData.options.appType == '9'"
>
<el-form-item label="选择表">
<el-select
@ -528,6 +564,7 @@
placeholder="请选择表"
@change="outsideSelectChange"
style="width: 100%"
filterable
>
<el-option
v-for="(el, index) in outsideOptions"
@ -538,9 +575,62 @@
</el-select>
</el-form-item>
</el-form>
<div class="Columnsbtn">
<div
class="tabs"
v-if="
currentRowData.options &&
currentRowData.options.appType != '9'
"
>
<div
class="tabsItem"
:class="{ active: parameterType === 'header' }"
@click="switchTabs('header')"
>
Headers入参
</div>
<div
class="tabsItem"
:class="{ active: parameterType === 'query' }"
@click="switchTabs('query')"
>
Query入参
</div>
<div
class="tabsItem"
:class="{ active: parameterType === 'body' }"
@click="switchTabs('body')"
>
Body入参
</div>
</div>
<div class="Columnsbtn" v-if="outsideColumns.length > 0">
<el-button @click="saveTestTableEvent">暂存</el-button>
<el-button @click="hitTesting">点击测试</el-button>
<el-button @click="saveTestTableEvent('hit')"
>点击测试</el-button
>
</div>
<div
v-if="
currentRowData.options &&
currentRowData.options.appType == '9' &&
currentRowData.options.apiName.includes('查询')
"
>
<el-form
ref="pegeForm"
:model="pageFormData"
label-width="80px"
label-position="top"
style="margin-bottom: 10px"
>
<el-form-item label="页码">
<el-input v-model="pageFormData.rowNum"></el-input>
</el-form-item>
<el-form-item label="每页条数">
<el-input v-model="pageFormData.pageLimit"></el-input>
</el-form-item>
</el-form>
</div>
<div class="fixedChildTable">
<!-- 表字段 -->
@ -556,91 +646,29 @@
style="margin: 0 10px"
>
<div id="editorContainer">
<div
v-for="(row, rowIndex) in outsideColumns"
:key="rowIndex"
class="editorItem"
>
<el-form-item :label="row.column_name">
<div class="editor-container">
<div
class="content-editor"
:ref="
'contentEditor' + row.column_name + rowIndex
"
contenteditable="true"
@keydown="
handleKeyDown(
$event,
row.column_name,
rowIndex
)
"
@input="
handleInput(
$event,
row.column_name,
rowIndex
)
"
@click="
handleEditorClick(
$event,
row.column_name,
rowIndex
)
"
@paste="
handlePaste(
$event,
row.column_name,
rowIndex
)
"
@focus="
handleEditorFocus(
$event,
row.column_name,
rowIndex
)
"
@blur="
handleEditorBlur(
$event,
row.column_name,
rowIndex
)
"
></div>
<div
class="editorIcon"
@click.stop="
handleAddNodeToEditor(
row.column_name,
rowIndex
)
"
>
<i class="el-icon-circle-plus"></i>
</div>
<div
class="clearIcon"
@click.stop="
handleClearNodeToEditor(
row.column_name,
rowIndex
)
"
>
<i class="el-icon-circle-close"></i>
</div>
</div>
</el-form-item>
</div>
<EditorItem
v-for="(row, index) in outsideColumns"
:key="index"
:row="row"
:row-index="index"
@register-editor="registerEditorRef"
@handle-keydown="handleKeyDown"
@handle-input="handleInput"
@handle-editor-click="handleEditorClick"
@handle-paste="handlePaste"
@handle-editor-focus="handleEditorFocus"
@handle-editor-blur="handleEditorBlur"
@handle-add-node="handleAddNodeToEditor"
@handle-clear-node="handleClearNodeToEditor"
ref="editorRefs"
ref-in-for
/>
</div>
</el-form>
</el-collapse-item>
</el-collapse>
<el-empty v-else description="暂无数据"></el-empty>
</div>
</div>
</el-tab-pane>
@ -670,6 +698,8 @@ import addAccount from "./addAccount.vue";
import baseForm from "@/components/base/baseNewForm";
import treeNode from "./TreeNode";
import IconsDialog from "../../tool/build/IconsDialog.vue";
import jsonView from "vue-json-views";
import EditorItem from "./EditorItem.vue";
export default {
components: {
editSence,
@ -679,6 +709,8 @@ export default {
baseForm,
treeNode,
IconsDialog,
jsonView,
EditorItem,
},
data() {
return {
@ -750,65 +782,75 @@ export default {
representation: false,
selectedNode: "",
representationActiveName: "first",
treeData: {
user: {
id: 1001,
profile: {
name: "李四",
email: "lisi@example.com",
settings: {
theme: "dark",
notifications: {
email: true,
sms: false,
push: true,
},
},
},
permissions: ["read", "write", "admin"],
metadata: {
created_at: "2023-01-15T10:30:00Z",
updated_at: "2024-03-20T15:45:30Z",
version: 2.1,
},
},
config: {
database: {
host: "localhost",
port: 5432,
ssl: false,
},
features: {
experimental: ["ai_assist", "real_time_sync"],
stable: ["user_management", "data_export"],
},
},
},
treeData: {},
currenrActiveNodeRef: "",
lastSelectedTokenIndex: -1,
representationData: representationData,
savedRange: null, // range
TestResultDisplayArea: false, //
jsonTestResultData: {},
pageFormData: {
rowNum: "1",
pageLimit: "100",
},
parameterType: "body", //
editorRefs: {}, // editor DOM
};
},
methods: {
async saveTestTableEvent() {
if (!this.outsideFormData.tableName) {
switchTabs(val) {
this.parameterType = val;
//
if (this.currentRowData.options.appType != "9") {
this.queryApiConfig("tab");
}
},
async saveTestTableEvent(type) {
if (
this.currentRowData.options.appType == "9" &&
!this.outsideFormData.tableName
) {
this.$vmNews("请先选择表");
return;
}
this.openLoading("暂存");
// 使 HTML DOM
const root = document.querySelector("#editorContainer");
const parsed = this.extractEditorItems(root);
const parsed = this.extractEditorItems();
let data = this.currentRowData.options;
let params = {
let params = {};
if (data && data.appType == "9") {
params = {
detailList: parsed,
flowId: this.sceneID,
stepID: data.stepID,
stepAccountId: data.step_acc_id,
actionName: data.apiName || data.plugName,
tableName: this.outsideFormData.tableName,
appType: data.appType,
};
if (data.apiName.includes("查询")) {
params.rowNum = this.pageFormData.rowNum;
params.pageLimit = this.pageFormData.pageLimit;
}
} else {
params = {
flowId: this.sceneID,
stepID: data.stepID,
headerIn: "", //
queryIn: "", //query
bodyIn: "", //bodyIn
};
if (this.parameterType == "body") {
params.bodyIn = parsed;
} else if (this.parameterType == "header") {
params.headerIn = parsed;
} else if (this.parameterType == "query") {
params.queryIn = parsed;
}
}
let res = await authApi(
"sysFlowStepConfigService",
"",
@ -817,41 +859,54 @@ export default {
params
);
if (res.status == "200") {
this.$vmNews("暂存成功!","success")
if (type == "hit") {
this.hitTesting();
} else {
this.$vmNews("暂存成功!", "success");
}
}
},
extractEditorItems(rootElement) {
const result = [];
const items = rootElement.querySelectorAll(".editorItem");
items.forEach((item) => {
const fieldName =
item.querySelector(".el-form-item__label")?.innerText.trim() || "";
const editor = item.querySelector(".content-editor");
if (!editor) return;
extractEditorItems() {
if (!this.$refs.editorRefs) return [];
const html_label = editor.innerHTML.trim(); //
let whereCondition = "";
editor.childNodes.forEach((node) => {
if (node.nodeType === Node.TEXT_NODE) {
whereCondition += node.textContent;
} else if (node.nodeType === Node.ELEMENT_NODE) {
whereCondition += node.getAttribute("data-token-text") || "";
}
});
//
whereCondition = whereCondition
.replace(//g, ",")
.replace(//g, "(")
.replace(//g, ")");
result.push({ fieldName, whereCondition, html_label });
});
return result;
return this.$refs.editorRefs.map((editorComp) =>
editorComp.getEditorContent()
);
},
hitTesting(){
async hitTesting() {
if (
this.currentRowData.options.appType == "9" &&
!this.outsideFormData.tableName
) {
this.$vmNews("请先选择表");
return;
}
this.openLoading("测试");
this.representation = false;
let data = this.currentRowData.options;
let params = {
stepID: data.stepID,
tableName: this.outsideFormData.tableName,
appType: this.currentRowData.options.appType,
};
if (this.currentRowData.options.appType == "9") {
delete params.tableName;
}
let res = await authApi(
"sysFlowStepConfigService",
"",
"testSql",
"",
params
);
if (res.status == "200") {
this.TestResultDisplayArea = true;
this.jsonTestResultData = res || {};
}
},
closeTestResultArea() {
this.TestResultDisplayArea = false;
this.jsonTestResultData = {};
},
/**
* 打开弹窗
@ -871,6 +926,10 @@ export default {
this.triggerMode = triggerMode;
//
this.examineOperateDialog = true;
this.representation = false;
this.TestResultDisplayArea = false;
this.jsonTestResultData = {};
this.parameterType = "body";
//
this.sceneLoading = true;
// 5
@ -1088,6 +1147,10 @@ export default {
this.apiIDActiv = "";
this.userActivId = "";
this.CurrentAppRow = {};
// editor DOM
this.editorRefs = {};
this.parameterType= "body"
if (index === 0) {
this.activeTabName = "选择操作";
} else {
@ -1097,9 +1160,30 @@ export default {
//
await this.getAppList();
//
await this.queryNodeList();
//
await this.GetSceneStepData();
}
},
/**
* 获取场景映射动态关系
*/
async queryNodeList() {
let params = {
flowId: this.sceneID,
stepId: this.currentRowData.options.stepID,
};
let res = await authApi(
"sysFlowStepConfigService",
"",
"queryNodeList",
"",
params
);
if (res.status == "200") {
this.treeData = res.attribute || {};
}
},
/**
* 获取场景步骤数据
*/
@ -1139,6 +1223,8 @@ export default {
this.pluginList = [];
//
this.userList = [];
//
this.outsideColumns = [];
if (this.currentRowData.options.appId) {
// ID
this.appActivIndex = this.currentRowData.options.appId;
@ -1166,6 +1252,10 @@ export default {
if (this.currentRowData.options.apiId) {
// API ID
this.apiIdActiv = this.currentRowData.options.apiId;
//
if (this.currentRowData.options.appType != "9") {
this.queryApiConfig();
}
} else {
// API ID
this.apiIdActiv = "";
@ -1185,8 +1275,10 @@ export default {
//
this.CurrentAppRow.step_acc_name =
this.currentRowData.options.step_acc_name;
if (this.currentRowData.options.appType == "9") {
//
this.queryTables(this.userActivId);
}
} else {
// ID
this.userActivId = "";
@ -1324,18 +1416,21 @@ export default {
* @param {any} value 标签页值
*/
handleOtherTabClick(value) {
console.log(
this.activeOtherTabName,
this.userActivId,
this.outsideFormData.tableName
);
if (
this.activeOtherTabName == "配置应用" &&
this.userActivId &&
this.outsideFormData.tableName
this.outsideFormData.tableName &&
this.currentRowData.options.appType == "9"
) {
this.queryColumns(this.outsideFormData.tableName);
}
if (
this.activeOtherTabName == "配置应用" &&
this.apiIdActiv &&
this.currentRowData.options.appType != "9"
) {
this.getStepConfig();
}
},
/**
* 应用搜索
@ -1432,6 +1527,8 @@ export default {
this.pluginList = [];
this.userActivId = "";
this.userList = [];
this.jsonTestResultData = {};
this.TestResultDisplayArea = false;
//
this.matchAppData(row);
//
@ -1533,7 +1630,7 @@ export default {
this.activeApiPliginTabName = e;
},
// API
hangleApiClickEvent(item) {
async hangleApiClickEvent(item) {
this.pluginActiv = "";
this.currentRowData.options.plugId = "";
this.currentRowData.options.plugName = "";
@ -1548,7 +1645,11 @@ export default {
//
this.currentRowData.options.actionType = this.activeApiPliginTabName;
//
if (this.userActivId) {
this.activeOtherTabName = "配置应用";
} else {
this.activeOtherTabName = "选择账号";
}
let params = {
flowId: this.sceneID,
id: this.currentRowData.options.stepID,
@ -1559,7 +1660,39 @@ export default {
apiName: item.apiName,
};
//
this.SaveSceneStepData(params);
await this.SaveSceneStepData(params);
//
if (this.currentRowData.options.appType != "9") {
this.queryApiConfig();
}
},
//
async queryApiConfig(type) {
if (!this.currentRowData.options.apiId) {
return;
}
this.outsideColumns = [];
let params = {
stepId: this.currentRowData.options.stepID, //id
apiId: this.currentRowData.options.apiId,
type: this.parameterType,
};
let res = await authApi(
"sysFlowStepApiConfigService",
"",
"queryApiConfig",
"",
params
);
this.drawMask = false;
if (res.status == "200") {
this.outsideColumns = res.attribute || [];
this.$nextTick(() => {
if (type == "tab") {
this.getStepConfig();
}
});
}
},
//
hanglePluginClickEvent(item) {
@ -1602,7 +1735,8 @@ export default {
this.$refs.addAccount.openDialog(
this.appActivIndex,
this.sceneID,
this.currentRowData.options.stepID
this.currentRowData.options.stepID,
this.currentRowData.options.appType
);
},
/**
@ -1636,17 +1770,19 @@ export default {
id: this.currentRowData.options.stepID,
step_acc_name: item.name,
step_acc_id: item.id,
tableName: "",
tableName: "-1",
};
//
await this.SaveSceneStepData(params);
//
this.activeOtherTabName = "配置应用";
if (this.currentRowData.options.appType == "9") {
//
await this.queryTables(item.id);
this.$nextTick(() => {
this.resetForm("outsideForm");
});
}
},
/**
* 重置表单
@ -1730,30 +1866,77 @@ export default {
params
);
if (res.status == "200") {
const root = document.querySelector("#editorContainer");
let detailList = [];
if (
res.attribute &&
res.attribute.detailList &&
res.attribute.detailList.length > 0
this.currentRowData.options.appType &&
this.currentRowData.options.appType == "9"
) {
res.attribute.detailList.forEach((item) => {
this.matchEditorItems(root, item.fieldName, item.html_label);
});
detailList = res.attribute?.detailList || [];
} else {
if (this.parameterType == "body") {
detailList = res.attribute?.bodyIn
? JSON.parse(res.attribute.bodyIn)
: [];
} else if (this.parameterType == "header") {
detailList = res.attribute?.headerIn
? JSON.parse(res.attribute.headerIn)
: [];
} else if (this.parameterType == "query") {
detailList = res.attribute?.queryIn
? JSON.parse(res.attribute.queryIn)
: [];
}
}
if (detailList.length > 0) {
this.recursivelyApplyHtmlLabel(this.outsideColumns, detailList);
}
if (
this.currentRowData.options &&
this.currentRowData.options.appType == "9" &&
this.currentRowData.options.apiName.includes("查询")
) {
this.pageFormData.rowNum = res.attribute.rowNum || "1";
this.pageFormData.pageLimit = res.attribute.pageLimit || "100";
}
}
},
matchEditorItems(rootElement, rootName, rootHtml) {
const items = rootElement.querySelectorAll(".editorItem");
items.forEach((item) => {
const fieldName =
item.querySelector(".el-form-item__label")?.innerText.trim() || "";
const editor = item.querySelector(".content-editor");
if (!editor) return;
if (rootName == fieldName) {
editor.innerHTML = rootHtml;
//
recursivelyApplyHtmlLabel(columns, detailList, path = []) {
columns.forEach((col, index) => {
const match = detailList.find(
(item) => item.fieldName === col.column_name
);
if (match && match.html_label) {
this.matchEditorItems(match, index, path);
}
if (
col.children &&
col.children.length > 0 &&
match.children &&
match.children.length > 0
) {
this.recursivelyApplyHtmlLabel(col.children, match.children, [
...path,
index,
]);
}
});
},
//
matchEditorItems(match, index, path = []) {
const refName =
"contentEditor" + match.fieldName + [...path, index].join("-");
// ref
const refEl = this.editorRefs[refName];
if (match && match.html_label && refEl) {
// refEl
if (Array.isArray(refEl)) {
refEl[0].innerHTML = match.html_label;
} else if (refEl instanceof HTMLElement) {
refEl.innerHTML = match.html_label;
}
}
},
/**
* 获取插件列表
* @param {string} appId 应用 ID
@ -1838,7 +2021,7 @@ export default {
editSceneName() {
//
let row = {
flowId: this.sceneID,
id: this.sceneID,
};
// DOM
this.$nextTick(() => {
@ -1905,10 +2088,20 @@ export default {
//
this.userList = [];
this.representation = false;
this.TestResultDisplayArea = false;
//
this.pageFormData = {
rowNum: "1",
pageLimit: "100",
};
},
registerEditorRef(refName, dom) {
this.$set(this.editorRefs, refName, dom);
},
representationChange() {
if (!this.currenrActiveNodeRef) return;
const editor = this.$refs[this.currenrActiveNodeRef][0];
const editor = this.editorRefs[this.currenrActiveNodeRef];
if (!editor) return;
// range selection
const range = document.createRange();
@ -1925,8 +2118,9 @@ export default {
this.saveRange();
},
handleKeyDown(e, columnName, rowIndex) {
const editor = this.$refs["contentEditor" + columnName + rowIndex][0];
const refName = "contentEditor" + columnName + rowIndex;
const editor = this.editorRefs[refName];
if (!editor) return;
if (e.key === "Backspace") {
// token
const selection = window.getSelection();
@ -1963,22 +2157,12 @@ export default {
},
//
handleEditorClick(e, columnName, rowIndex) {
const editor = this.$refs["contentEditor" + columnName + rowIndex][0];
this.currenrActiveNodeRef = "contentEditor" + columnName + rowIndex;
// // token
// if (
// !e.target.classList.contains("content-token") &&
// !e.target.closest(".content-token")
// ) {
// this.clearTokenSelection(columnName, rowIndex);
// }
// //
// if (e.target === editor || editor.contains(e.target)) {
const refName = "contentEditor" + columnName + rowIndex;
const editor = this.editorRefs[refName];
if (!editor) return;
this.currenrActiveNodeRef = refName;
editor.focus();
this.saveRange();
// }
},
//
handlePaste(e, columnName, rowIndex) {
@ -1987,7 +2171,9 @@ export default {
},
//
handleEditorFocus(e, columnName, rowIndex) {
const editor = this.$refs["contentEditor" + columnName + rowIndex][0];
const refName = "contentEditor" + columnName + rowIndex;
const editor = this.editorRefs[refName];
if (!editor) return;
//
if (this.isEmpty(columnName, rowIndex)) {
setTimeout(() => {
@ -2002,7 +2188,8 @@ export default {
},
//
isEmpty(columnName, rowIndex) {
const editor = this.$refs["contentEditor" + columnName + rowIndex][0];
const refName = "contentEditor" + columnName + rowIndex;
const editor = this.editorRefs[refName];
if (!editor) return true;
const content = editor.textContent.trim();
const hasTokens = editor.querySelectorAll(".content-token").length > 0;
@ -2013,10 +2200,10 @@ export default {
//
},
handleClearNodeToEditor(columnName, rowIndex) {
const editor = this.$refs["contentEditor" + columnName + rowIndex][0];
const refName = "contentEditor" + columnName + rowIndex;
const editor = this.editorRefs[refName];
if (!editor) return;
let nodeRef = "contentEditor" + columnName + rowIndex;
this.currenrActiveNodeRef = nodeRef;
this.currenrActiveNodeRef = refName;
editor.innerHTML = ""; //
this.$forceUpdate();
@ -2039,14 +2226,14 @@ export default {
//
handleAddNodeToEditor(columnName, rowIndex) {
let nodeRef = "contentEditor" + columnName + rowIndex;
this.currenrActiveNodeRef = nodeRef;
const refName = "contentEditor" + columnName + rowIndex;
const editor = this.editorRefs[refName];
if (!editor) return;
this.currenrActiveNodeRef = refName;
this.representation = true;
this.TestResultDisplayArea = false;
this.representationActiveName = "first";
// span
const editor = this.$refs[this.currenrActiveNodeRef][0];
if (!editor) return;
// range selection
const range = document.createRange();
const selection = window.getSelection();
@ -2072,7 +2259,7 @@ export default {
insertToken(text, type) {
if (!this.currenrActiveNodeRef) return;
const editor = this.$refs[this.currenrActiveNodeRef][0];
const editor = this.editorRefs[this.currenrActiveNodeRef];
if (!editor) return;
//
@ -2140,7 +2327,7 @@ export default {
setCursorToEnd() {
if (!this.currenrActiveNodeRef) return;
const editor = this.$refs[this.currenrActiveNodeRef][0];
const editor = this.editorRefs[this.currenrActiveNodeRef];
if (!editor) return;
const range = document.createRange();
@ -2185,7 +2372,7 @@ export default {
setCursorToEnd() {
//
if (!this.currenrActiveNodeRef) return;
const editor = this.$refs[this.currenrActiveNodeRef][0];
const editor = this.editorRefs[this.currenrActiveNodeRef];
if (!editor) return;
const range = document.createRange();
@ -2204,7 +2391,7 @@ export default {
},
mounted() {
//
const editor = this.$refs[this.currenrActiveNodeRef]?.[0];
const editor = this.editorRefs[this.currenrActiveNodeRef];
if (editor) {
editor.addEventListener("mouseup", this.saveRange);
editor.addEventListener("keyup", this.saveRange);
@ -2957,6 +3144,7 @@ export default {
::v-deep .el-collapse-item__header {
padding-left: 10px !important;
}
// ------------------------
.editor-container {
flex: 1;
@ -3113,6 +3301,74 @@ export default {
height: calc(100vh - 360px);
overflow: auto;
}
.drawParent {
position: relative;
}
.TestResultDisplayArea {
width: 400px;
height: calc(100% - 10px);
position: absolute;
right: 10px;
top: 5px;
background-color: #fff;
box-sizing: border-box;
box-shadow: 0 0 8px #0000001a;
border-radius: 4px;
z-index: 100;
overflow: hidden;
}
.testResultBoxTitle {
display: flex;
padding: 15px 10px;
background: #333333;
font-size: 14px;
font-weight: bold;
color: #fff;
justify-content: space-between;
border-radius: 4px 4px 0 0;
.closeTextBox {
cursor: pointer;
}
}
.jsonTestResultBox {
height: calc(100% - 90px);
overflow: auto;
}
::v-deep .el-alert {
padding: 10px !important;
}
.tabs {
display: flex;
align-items: center;
height: 32px;
background: #fff;
border-radius: 4px;
padding: 2px;
width: fit-content;
margin-top: 10px;
.tabsItem {
height: 28px;
line-height: 28px;
background: #fff;
border-radius: 3px;
font-size: 14px;
color: #999;
padding: 0 10px;
cursor: pointer;
}
.active {
background: #f5f5f5;
color: #333;
}
}
</style>

View File

@ -170,8 +170,8 @@ export default {
params
);
if (res.status == "200") {
this.$refs.senceForm.choiceAssignment(res.data[0]);
this.triggerModeId = res.data[0].triggerMode;
this.$refs.senceForm.choiceAssignment(res.attribute[0]);
this.triggerModeId = res.attribute[0].triggerMode;
}
},
choseType(row) {

View File

@ -44,23 +44,17 @@
</div>
</div>
</base-dialog>
<!-- <addDialogChunk
ref="addDialogChunk"
@examineHandleClose="examineHandleClose"
></addDialogChunk> -->
</div>
</template>
<script>
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
// import addDialogChunk from "./addDialogChunk";
import { authApi } from "@/api/apis/auth";
import baseForm from "@/components/base/baseNewForm";
export default {
components: {
baseDialog,
baseForm,
// addDialogChunk,
},
data() {
return {
@ -75,6 +69,7 @@ export default {
options: [],
optionValue: "id",
optionLabel: "name",
disabled:true
},
],
},
@ -169,8 +164,8 @@ export default {
params
);
if (res.status == "200") {
this.$refs.senceForm.choiceAssignment(res.data[0]);
this.triggerModeId = res.data[0].triggerMode;
this.$refs.senceForm.choiceAssignment(res.attribute[0]);
this.triggerModeId = res.attribute[0].triggerMode;
}
},
handleConfirmClick() {

File diff suppressed because it is too large Load Diff

View File

@ -358,6 +358,10 @@
ref="addDialogChunk"
@examineHandleClose="resetTable"
></addDialogChunk>
<viewDialogChunk
ref="viewDialogChunk"
@examineHandleClose="resetTable"
></viewDialogChunk>
</div>
</template>
@ -372,6 +376,7 @@ import addSence from "@/views/LinkUp/compoment/addSence.vue";
import projectClassificationRightDialog from "@/views/projectClassification/rightDialog.vue";
import authorizationDialog from "@/views/projectClassification/authorizationDialog.vue";
import addDialogChunk from "./compoment/addDialogChunk.vue";
import viewDialogChunk from "./compoment/viewDialogChunk.vue";
export default {
components: {
baseLayout,
@ -381,6 +386,7 @@ export default {
projectClassificationRightDialog,
authorizationDialog,
addDialogChunk,
viewDialogChunk
},
data() {
return {
@ -524,17 +530,9 @@ export default {
//
getFuncBtn(btnEven) {
if (btnEven.menuName == "新增") {
// this.$refs.addDialogChunk.openDialog(
// "-4252471217359269890",
// "3-33003",
// "add",
// 3
// );
this.$refs.addSence.openDialog("", "add", this.projectClassificationID);
}
},
//hyt 2024/08/14
onFixedBtn(flag) {
this.$refs.layoutNew.pageClear();
this.pageModel.page = 1;

View File

@ -1025,7 +1025,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -1,9 +1,9 @@
<template>
<div>
<base-dialog :dialogVisible.sync="dialogVisible" :closeModal="false" :footerShow="true" :title="'查看分录信息'"
width="800px" top="15vh">
width="90%" top="10vh">
<div class="rightDialogClass_main" style="background-color: #fff;">
<base-table ref="assistTable" :showIndex="false" :slotrow="false" tableHeight="calc(60vh - 80px)"
<base-table ref="assistTable" :showIndex="false" :slotrow="false" tableHeight="calc(75vh - 80px)"
:tableData="tableData" :tableColumn="tableColumn" id="printMe">
</base-table>

View File

@ -0,0 +1,86 @@
<template>
<div>
<base-dialog :dialogVisible.sync="dialogVisible" :closeModal="false" :footerShow="true" :title="'选择生成日期'"
width="300px" top="10vh"
@handleConfirmClick="handleConfirmClick"
>
<div class="rightDialogClass_main" style="background-color: #fff;">
<el-date-picker v-model="date" align="right" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</base-dialog>
</div>
</template>
<script>
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
import baseTable from '@/components/base/baseTable/index.vue'
import { queryDetailsByBillCodeAPI } from '@/api/apis/businessVoucher'
export default {
components: {
baseDialog,
baseTable
},
data() {
return {
date: '',
dialogVisible: false,
tableData: [],
tableColumn: [{
label: '摘要',
prop: 'abstractStr'
},
{
label: '会计科目',
prop: 'subjdispname'
},
{
label: '辅助核算',
prop: 'assist'
},
{
label: '币种编码',
prop: 'currencyCode'
},
{
label: '币种名称',
prop: 'currencyName'
},
{
label: '借方原币',
prop: 'jybSum'
},
{
label: '借方本币',
prop: 'jbbSum'
},
{
label: '贷方原币',
prop: 'dybSum'
},
{
label: '贷方本币',
prop: 'dbbSum'
}
]
}
},
methods: {
async openDialog() {
this.dialogVisible = true
this.date = ''
},
handleConfirmClick() {
this.$emit('pickDateHandle', this.date)
this.dialogVisible = false
}
}
}
</script>
<style>
</style>

View File

@ -1,22 +1,31 @@
<script src="../../api/apis/operationalModule.js"></script>
<template>
<div class="recordContrast">
<div class="left">
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
<div>单据列表</div>
</div>
<div class="showList">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
:menuData="billTypeList" @handleNodeClick="billTypeClickHandle" :treeProps="treeProps"
></base-tree>
</div>
</div>
<!-- <div class="left">-->
<!-- <div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">-->
<!-- <div>单据列表</div>-->
<!-- </div>-->
<!-- <div class="showList">-->
<!-- <base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"-->
<!-- :menuData="billTypeList" @handleNodeClick="billTypeClickHandle" :treeProps="treeProps"-->
<!-- ></base-tree>-->
<!-- </div>-->
<!-- </div>-->
<div class="right" v-loading="tableLoading">
<div class="topBox" style="margin-bottom: 10px">
<div class="searchBox">
<div style="margin-left: 5px;display: flex;align-items: center;">
<div style="width: 100px">单据列表</div>
<el-cascader
v-model="searchObjTable.billTypeClickID"
:options="billTypeList"
:props="treeProps"
@change="billTypeListChangeHandle"
></el-cascader>
</div>
<div style="margin-left: 5px;display: flex;align-items: center;">
<div style="width: 100px">单据号</div>
<el-input v-model="searchObjTable.billCode" clearable></el-input>
<el-input v-model="searchObjTable.bill_code" clearable></el-input>
</div>
<div style="margin-left: 5px;display: flex;align-items: center">
<div>单据日期起</div>
@ -45,7 +54,10 @@
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="getTableData">查询</el-button>
<el-button type="primary" size="small" @click="resetTable">查询</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="coreDataOpenDialog">生成凭证</el-button>
</div>
</div>
<div style="display: flex;align-items: center;justify-content: flex-end;">
@ -55,30 +67,31 @@
<div>分录信息</div>
</div>
<div class="table">
<base-table ref="customtable" :showIndex="false" :slotrow="true"
<base-table ref="customtable" :showIndex="false" :slotrow="true" :showSelect="true"
tableHeight="calc(50vh - 100px)" :tableData="tableData" :tableColumn="tableColumn"
@radioChange="radioChange" id="printMe"
@radioChange="radioChange" id="printMe" @onSelectionChange="onSelectionChange"
>
<template #billStatus="{row}">
<div>{{ row.row.billStatus === 'Y' ? '已生成' : '未生成' }}</div>
<div>{{ row.billStatus === 'Y' ? '已生成' : '未生成' }}</div>
</template>
<template #operation="{row}">
<div @click="generateHandle(row.row)" style="cursor: pointer">
{{row.row.billStatus === 'Y' ? '查看' : '生成'}}
<div @click="generateHandle(row)" style="cursor: pointer;color: #4876ed">
{{ row.billStatus === 'Y' ? '查看' : '生成' }}
</div>
</template>
</base-table>
<base-page :pageModel.sync="pageModel" @onPageChange="pageChange"></base-page>
</div>
<!-- 辅助核算-->
<template v-if="this.selected.length">
<div class="table">
<base-table ref="assistTable" :showIndex="false" :slotrow="false"
tableHeight="calc(50vh - 100px)" :tableData="assistTableData"
tableHeight="calc(50vh - 150px)" :tableData="assistTableData"
:tableColumn="assistTableColumn"
id="printMe"
>
<template #operate="{row}">
<div @click="expandOperate(row)" style="cursor: pointer">
<div @click="expandOperate(row)" style="cursor: pointer;color: #4876ed">
查看凭证明细
</div>
</template>
@ -89,11 +102,14 @@
</div>
<customFormDialog ref="customFormDialog"></customFormDialog>
<assistTableDialog ref="assistTableDialog"></assistTableDialog>
<datePickDialog ref="datePickDialog" @pickDateHandle="coreData"></datePickDialog>
</div>
</template>
<script>
import datePickDialog from '@/views/businessVoucher/compoments/datePickDialog.vue'
import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage/index.vue'
import baseChoice from '@/components/base/baseChoice/index.vue'
@ -129,14 +145,32 @@ import {
tempupdateAPI, typeDeleteAPI, typeSaveAPI, typeUpdateAPI
} from '@/api/apis/ItemEntryTemplate'
import { subjectClassificationqueryAllAPI } from '@/api/apis/classifyDefinition'
import { logqueryBillAPI,coreGenerateAPI,queryDetailsByBillCodeAPI } from '@/api/apis/businessVoucher'
import {
logqueryBillAPI,
coreGenerateAPI,
queryDetailsByBillCodeAPI,
queryBillFiledsAPI, queryBillPageddsAPI, queryBillPagedAPI, queryDetailsByBillCodeAndMdmIdAPI
} from '@/api/apis/businessVoucher'
import customFormDialog from './compoments/customFormDialog'
import assistTableDialog from './compoments/assistTableDialog'
export default {
name: 'recordContrast',
components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree,customFormDialog,assistTableDialog },
components: {
baseDialog,
baseChoice,
basePage,
baseTable,
baseRightDialog,
baseForm,
baseTree,
customFormDialog,
assistTableDialog,
datePickDialog
},
data() {
return {
checkBoxList: [],
searchObjTable: {},
addTableColumn2: [],
addTableData2: [],
@ -190,7 +224,7 @@ export default {
clickRowKey: '',
activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)','if(*?:)'],
//text
textarea: '',
textareaEn: '',
@ -217,26 +251,42 @@ export default {
prop: 'voucherNo',
width: 100
},
{
label: '会计科目',
prop: 'subjdispname',
width: 100
},
{
label: '辅助核算',
prop: 'assist',
width: 100
},
{
label: '摘要',
prop: 'abstractStr',
width: 160
width: 100
},
{
label: '借方',
prop: 'jYbSum',
width: 120
label: '借方本币金额',
prop: 'jbbSum',
width: 100
},
{
label: '贷方',
prop: 'dYbSum',
width: 120
label: '借方原币金额',
prop: 'jybSum',
width: 100
},
{
label: '操作',
prop: 'operate',
width: 160
label: '贷方本币金额',
prop: 'dbbSum',
width: 100
},
{
label: '贷方原币金额',
prop: 'dybSum',
width: 100
},
],
billTypeClickCode: '',
masterTableData: [],
@ -492,17 +542,14 @@ export default {
pageModel: {
page: 1, //
limit: 20, //
prop7: '',
propValue7: '',
prop8: '',
propValue8: ''
total: 0
},
selected: [],
treeSelect: [],
tableColumn: [
{
label: '单据号',
prop: 'billCode'
prop: 'bill_code'
},
{
label: '单据日期',
@ -513,17 +560,17 @@ export default {
label: '生成状态',
prop: 'billStatus',
width: 120
},
{
label: '推送信息',
prop: 'pushInfo',
width: 250
},
{
label: '操作',
prop: 'operation',
width: '100'
}
// {
// label: '',
// prop: 'pushInfo',
// width: 250
// },
// {
// label: '',
// prop: 'operation',
// width: '100'
// }
],
tableData: [],
tableLoading: false,
@ -551,7 +598,8 @@ export default {
billTreeActiveFather: {},
treeProps: {
children: 'mdmModuleEntity',
label: 'name'
label: 'name',
value: 'id'
},
billTreeProps: {
children: 'sublistMdmModuleDbFileds',
@ -561,6 +609,31 @@ export default {
}
},
methods: {
coreDataOpenDialog() {
if (this.checkBoxList.length === 0) {
this.$vmNews('请选择单据')
return
}
let flag = this.checkBoxList.some((item, index) => {
if (item.billStatus == 'Y') {
this.$vmNews('已生成的单据不能生成')
return true
}
})
if (flag) {
return
}
this.$refs.datePickDialog.openDialog()
},
billTypeListChangeHandle() {
if (this.searchObjTable.billTypeClickID) {
console.log(this.searchObjTable.billTypeClickID, '?')
this.billTypeClickID = this.searchObjTable.billTypeClickID[this.searchObjTable.billTypeClickID.length - 1]
}
},
onSelectionChange(val) {
this.checkBoxList = val
},
//
async generateHandle(row) {
if (row.billStatus == 'Y') {
@ -574,54 +647,23 @@ export default {
// let res= await queryDetailsByBillCodeAPI({id:row.id})
// console.log(res)
},
async coreData(row){
async coreData(date) {
let arr = []
this.checkBoxList.forEach(item => {
arr.push(item.bill_code)
})
let params = {
mdmId: this.billTypeClickID,
billCode:row.billCode
bill_code: arr.join(','),
targetDate: date
}
this.openLoading()
let res = await coreGenerateAPI(params)
if (res.status == '200') {
this.$vmNews('生成成功', 'success')
this.resetTable()
}
},
async ixedValueFormelDialogClick(row) {
if (row.label === '参照') {
this.fixedValuelDialogClick(false)
} else {
if (!this.fixedValueClickRow.namefieldname) {
this.$vmNews('请选择参照值')
return
}
this.addTableColumn2 = [
{
label: '名称',
prop: this.fixedValueClickRow.namefieldname
},
{
label: '编码',
prop: this.fixedValueClickRow.codefieldname
}
]
this.addDialog = true
this.addTiTle = this.fixedValueClickRow.dbName
this.pageModel.propValue7 = ''
this.pageModel.propValue8 = ''
this.pageModel.prop7 = ''
this.pageModel.prop8 = ''
this.getAddTableData()
}
},
getTableAddList(val) {
// console.log(val, 'val', this.fixedValueClickRow)
this.pageModel.propValue7 = val
this.pageModel.propValue8 = val
this.pageModel.prop7 = this.fixedValueClickRow.codefieldname
this.pageModel.prop8 = this.fixedValueClickRow.namefieldname
this.getAddTableData()
},
addPickDialog() {
if (!this.$refs.baseChoice2.optionData[this.fixedValueClickRow.namefieldname]) {
this.$vmNews('请选择一条数据')
@ -636,21 +678,6 @@ export default {
// console.log(this.clickRow, 'this.clickRow')
this.addDialog = false
},
async getAddTableData() {
const res = await queryDataPagedByMapAPI({
...this.pageModel,
pageNum: this.pageModel.page,
pageSize: this.pageModel.limit,
tablename: this.fixedValueClickRow.tablename,
pkentityorg: this.pkglbookClickObj.pkentityorg
})
this.$refs.baseChoice2.pageModel.total = res.attribute.total
this.addTableData2 = res.attribute.list
},
addonQuery(res, pageModel) {
this.pageModel = pageModel
this.getAddTableData()
},
//
transitionRowHandle(item) {
let obj = item
@ -1360,23 +1387,43 @@ export default {
},
pageChange(model) {
this.pageModel.page = model.page
this.pageModel.limit = model.limit
console.log(model, 'model')
// this.pageModel.page = model.page
// this.pageModel.limit = model.limit
this.getTableData()
},
async getTableData() {
this.assistTableData = []
if (!this.billTypeClickID) return
const res = await logqueryBillAPI({
...this.searchObjTable,
const res2 = await queryBillFiledsAPI({
mdmId: this.billTypeClickID
})
this.tableData = res.attribute
this.tableColumn = []
res2.attribute.listList.forEach(item => {
item.label = item.chName
item['prop'] = item.enName
item.ruleList.forEach(ele => {
item[ele.ruleCode] = ele.ruleValue
})
})
this.tableColumn = res2.attribute.listList
console.log(this.tableColumn, 'this.tableColumn')
const res = await queryBillPagedAPI({
...this.searchObjTable,
mdmId: this.billTypeClickID,
pageNum: this.pageModel.page,
pageSize: this.pageModel.limit
})
console.log(res, '?')
this.tableData = res.attribute.list
this.pageModel.total = res.attribute.total
this.$nextTick(() => {
this.$refs.customtable.clearRadioIndex()
// this.$refs.customtable.clearSelection()
this.$refs.customtable.clearSelect()
this.selected = []
this.checkBoxList = []
})
},
resetTable() {
this.tableData = []
@ -1385,10 +1432,20 @@ export default {
this.getTableData()
},
//
radioChange(val) {
async radioChange(val) {
console.log(val, '?')
this.openLoading()
const res = await queryDetailsByBillCodeAndMdmIdAPI({
mdmId: this.billTypeClickID,
bill_code: val.bill_code
})
this.$set(val, 'logList', res.attribute)
// console.log(res, '?')
this.selected = []
this.selected.push(val)
console.log(val.logList, '?val.assistEntityList')
let row = {
props: {
children: 'sublistMdmModuleDbFileds',
@ -1609,7 +1666,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
@ -1710,7 +1767,7 @@ export default {
'nameEn': 'delOperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
@ -1773,6 +1830,10 @@ export default {
<style scoped lang="scss">
::v-deep .el-table__body-wrapper {
height: 100% !important;
}
.tabs {
width: 200px;
display: flex;
@ -1889,6 +1950,7 @@ export default {
margin-right: 5px;
display: flex;
align-items: center;
> div {
width: 140px;
text-align: right;

View File

@ -987,7 +987,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -387,6 +387,7 @@ export default {
})
})
this.tableColumn = res.attribute.listList
console.log(this.tableColumn,'this.tableColumn')
this.initTableData(this.mainTableName)
this.mainLoading = false
},

View File

@ -3,10 +3,26 @@
<div class="loginBg">
<main>
<div class="left">
<img src="../assets/images/login-page.png" alt="" />
<img src="../assets/images/login1.png" alt="" />
</div>
<div class="right">
<div class="title">您好!欢迎来到 用安数智中台</div>
<div
style="
width: 60%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<div class="imgBox">
<img src="../assets/images/left1.png" alt="" />
<img
src="../assets/images/right1.png"
style="border-left: 1px solid #eee; width: 200px;"
alt=""
/>
</div>
<div class="login">
<el-form
:hide-required-asterisk="true"
@ -62,6 +78,7 @@
</el-form>
</div>
</div>
</div>
</main>
</div>
</template>
@ -259,7 +276,6 @@ export default {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
console.log(123,'123')
this.loading = false;
this.$router
.push({
@ -318,7 +334,7 @@ export default {
<style lang="scss" scoped>
.loginBg {
background: url("../assets/images/login.png") no-repeat;
background: linear-gradient(to bottom right, #519af6, #84d3e5);
width: 100vw;
height: 100vh;
main {
@ -335,28 +351,30 @@ export default {
border-radius: 3vw;
margin: auto;
> .left {
width: 38vw;
height: 56vh;
min-height: 450px;
margin: 7vh 6.8vw 0 4.2vw;
width: 55%;
background-size: cover;
background-position: center center;
> img {
width: 100%;
height: 100%;
}
}
> .right {
margin-top: 158px;
> .title {
width: 228px;
height: 9vh;
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #1478f6;
line-height: 50px;
width: 45%;
display: flex;
align-items: center;
justify-content: center;
.imgBox {
display: flex;
margin-bottom: 10px;
img {
width: 160px;
height: 100px;
}
}
> .login {
margin-top: 6vh;
// width: 60%;
}
}
}

View File

@ -0,0 +1,172 @@
/**
desc 业务中心
*/
<template>
<div class="workbench">
<h3 class="workbench-title">全部应用</h3>
<el-tabs>
<el-tab-pane
v-for="(item, index) in routeData"
:key="index"
:label="item.meta ? item.meta.title : ''"
v-if="item.meta"
>
<div class="menuContainer">
<div
v-for="(list, listIndex) in item.children"
class="menuBox"
@click="goRoute(item, list)"
v-if="!list.meta.hidden"
>
<img class="menuIcon" :src="list.meta.icon" v-if="list.meta.icon" />
<img class="menuIcon" src="../logo1.png" v-else />
<p class="menuContent">{{ list.meta.title }}</p>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { TagsView } from "@/layout/components";
import request from "@/utils/request";
export default {
name: "ApplicationCenter",
components: {
TagsView,
},
created() {
this.$store.dispatch("settings/changeSetting", {
key: "showTagsView",
value: true,
});
},
data() {
return {
routeData: [], //
};
},
mounted() {
let routeList = localStorage.getItem("routeList")
? JSON.parse(localStorage.getItem("routeList"))
: [];
this.routeData = this.OrganizeMenus(routeList);
},
methods: {
goRoute(val, item) {
let routeData = this.$router.resolve({
path: item.path,
name: item.name,
query: { mdmCode: item.meta.mdmCode, viewType: item.meta.viewType },
});
window.open(routeData.href, "_self");
},
// icon
handlerIcon(item) {
let str = "";
if (item.includes("?")) {
str = item.split("?")[1];
} else {
str = item;
}
return str;
},
handlerIconColor(item) {
let color = "";
if (item.includes("?")) {
color = item.split("?")[0];
} else {
color = "#1478F6";
}
return color;
},
//
OrganizeMenus(data) {
let arrData = [];
//
let arrID = ["688293d5d76e432487f7516bf969a822"];
arrID.forEach((a) => {
data.forEach((b) => {
if (a === b.id) {
arrData.push(b);
}
});
});
arrData.forEach((bItem) => {
if (bItem.children && bItem.children.length > 0) {
bItem.children.forEach((cItem) => {
if (cItem.meta.icon) {
this.getLogoUrl(cItem.meta.icon).then((res) => {
let imageUrl =
"data:image/png/jpg;base64," +
btoa(
new Uint8Array(res).reduce(
(el, byte) => el + String.fromCharCode(byte),
""
)
);
this.$set(cItem.meta, "icon", imageUrl);
});
}
});
}
});
return arrData;
},
getLogoUrl(id) {
return request({
url:
"/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
method: "get",
responseType: "arraybuffer",
}).then((res) => {
return res;
});
},
},
};
</script>
<style lang="scss" scoped>
.workbench {
background: #fff;
padding: 15px;
//margin: 0 10px;
}
.workbench-title {
margin: 15px 0;
}
.menuContainer {
display: flex;
flex-wrap: wrap;
background-color: #fff;
}
.menuBox {
display: flex;
align-items: center;
background: #fafafa;
padding: 10px 15px;
border-radius: 10px;
width: 200px;
margin: 10px;
cursor: pointer;
}
.menuIcon {
width: 36px;
height: 36px;
line-height: 36px;
border-radius: 12px;
margin-right: 10px;
}
.menuContent {
font-size: 14px;
color: #333333;
}
</style>

View File

@ -551,7 +551,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -421,7 +421,7 @@ export default {
clickRowKey: '',
activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)','if(*?:)'],
fixedValueForm: [
{
elCol: [
@ -579,7 +579,7 @@ export default {
}
let obj = this.$refs.baseChoice2.optionData
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', obj[this.fixedValueClickRow.namefieldname])
this.textarea += `@@$${this.fixedValueClickRow.dbName}:${this.fixedValueClickRow.tablepkname}=${obj[this.fixedValueClickRow.tablepkname]}`
this.textarea += `@@$${this.fixedValueClickRow.dbName}:id=${obj.id}`
// this.$set(this.clickRow, `factorid${this.clickNum}`, this.$refs.baseChoice.optionData[this.clickObj.key])
// this.$set(this.clickRow, `factorname${this.clickNum}`, this.$refs.baseChoice.optionData[this.clickObj.labelKey])
// this.$set(this.clickRow, `factorpk${this.clickNum}`, this.$refs.baseChoice.optionData['id'])
@ -985,7 +985,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -595,7 +595,7 @@ export default {
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
'styles': 'danger',
'style': 'danger',
'btnFunction': 'delOperate',
'remark': null,
'userId': null,

View File

@ -43,6 +43,7 @@ module.exports = {
// target: `http://127.0.0.1:9081/`,
target: `http://192.168.2.189:10086`,//一凡
// target: `http://192.168.2.78:8080`,
// target: `http://b8bc6e8e.natappfree.cc`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''