From 9d50e7641ecad235e8b98583d65d6f485adf712e Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 06 六月 2023 17:03:04 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/src/views/modeling/LinkType.vue | 160 ++-
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue | 3
Source/UBCS-WEB/src/components/Crud/Crud.vue | 186 +++-
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java | 9
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java | 102 +-
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILinkTypeAttributeService.java | 31
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeAttributeWrapper.java | 4
Source/UBCS-WEB/vue.config.js | 6
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java | 2
Source/UBCS-WEB/src/views/integration/integrationIndex.vue | 140 +--
Source/UBCS-WEB/src/views/integration/integrationTransfer.vue | 128 +++
Source/UBCS-WEB/package.json | 1
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeAttributeServiceImpl.java | 87 ++
Source/UBCS-WEB/src/views/modeling/Business.vue | 46
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeAttributeVO.java | 256 -----
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LinkTypeController.java | 8
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/LinkTypeAttribute.java | 2
Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java | 5
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java | 2
Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue | 388 +++++++++
Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue | 427 +++++++++
Source/UBCS-WEB/src/views/MasterData/items.vue | 186 +++-
Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeAttributeMapper.xml | 2
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java | 64 +
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue | 45
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeVO.java | 5
Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue | 14
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue | 35
Source/UBCS-WEB/src/components/FormTemplate/index.vue | 57
Source/UBCS-WEB/src/api/omd/linkType.js | 4
Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue | 6
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java | 76 +
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java | 4
Source/UBCS-WEB/src/main.js | 2
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 16
35 files changed, 1,809 insertions(+), 700 deletions(-)
diff --git a/Source/UBCS-WEB/package.json b/Source/UBCS-WEB/package.json
index 3133c95..4034a7f 100644
--- a/Source/UBCS-WEB/package.json
+++ b/Source/UBCS-WEB/package.json
@@ -17,6 +17,7 @@
"classlist-polyfill": "^1.2.0",
"crypto-js": "^4.0.0",
"element-ui": "^2.15.6",
+ "instead": "^1.0.3",
"js-base64": "^2.5.1",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
diff --git a/Source/UBCS-WEB/src/api/omd/linkType.js b/Source/UBCS-WEB/src/api/omd/linkType.js
index e69fc12..4212b92 100644
--- a/Source/UBCS-WEB/src/api/omd/linkType.js
+++ b/Source/UBCS-WEB/src/api/omd/linkType.js
@@ -11,7 +11,7 @@
return request({
url: '/api/ubcs-omd/link-type/get-from-table',
method: 'get',
- params: {
+ params: {
domain: domain
}
})
@@ -58,7 +58,7 @@
})
}
-export const btmPage = (current,size,params) => {
+export const linkPage = (current,size,params) => {
return request ({
url: '/api/ubcs-omd/link-type/page',
method: 'get',
diff --git a/Source/UBCS-WEB/src/components/Crud/Crud.vue b/Source/UBCS-WEB/src/components/Crud/Crud.vue
index aeccd29..b4b82c2 100644
--- a/Source/UBCS-WEB/src/components/Crud/Crud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/Crud.vue
@@ -1,60 +1,137 @@
<template>
<basic-container>
- <avue-crud ref="crud"
- v-loading="loading"
- :data="data"
- :option="option"
- :page="page"
- @sort-change="sortChange"
- @selection-change="selectionChange"
- @on-load="onLoad">
- <template slot="menu">
- <el-button type="text">鏂囧瓧鎸夐挳</el-button>
- </template>
- <template slot="menuLeft">
- <div>
- <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick" @cell-dblclick="dbclick">
- <div v-for="(item,index) in this.tableHeadData" :key="index">
- <el-table-column :label="item.label" :prop="item.prop">
-<!-- 缂栬緫鍜屽睍绀洪�昏緫 -->
- <template slot-scope="{ row }">
- <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>
- <span v-else>{{row[item.prop]}}</span>
- </template>
- </el-table-column>
- </div>
- <el-table-column fixed="right" label="鎿嶄綔" width="120">
- <template slot-scope="scope">
- <el-button size="small" type="text" @click.native.prevent="enumDeleteRow(scope.$index, tableData)">
- 绉婚櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <template>
- <div style="display: flex;justify-content: right;margin-top: 15px">
- <el-button type="primary" size="small">淇濆瓨</el-button>
- <el-button size="small" @click="enumVisible=false">鍙栨秷</el-button>
- </div>
- </template>
+<!-- <avue-crud ref="crud"-->
+<!-- v-loading="loading"-->
+<!-- :data="data"-->
+<!-- :option="option"-->
+<!-- :page="page"-->
+<!-- @sort-change="sortChange"-->
+<!-- @selection-change="selectionChange"-->
+<!-- @on-load="onLoad">-->
+<!-- <template slot="menu">-->
+<!-- <el-button type="text">鏂囧瓧鎸夐挳</el-button>-->
+<!-- </template>-->
+<!-- <template slot="menuLeft">-->
+<!-- </template>-->
+<!-- </avue-crud>-->
+
+ <div class="testbox">
+ <div style="margin-top: 10px;display: flex;flex-wrap: wrap;width: 100%;">
+ <el-button size="small" type="primary" plain @click="addvisible=true">澧炲姞
+ <FormTemplateDialog
+ :visible.sync="addvisible"
+ :type="add"
+ :templateOid="this.templateOid"
+ :codeClassifyOid="this.codeClassifyOid"
+ :codeRuleOid="this.codeRuleOid"
+ :disabledProp="disabledProp"
+ :rowOid="rowOid"
+ >
+ </FormTemplateDialog></el-button>
+
+ <el-button size="small" type="primary" plain @click="editvisible=true">缂栬緫
+ <FormTemplateDialog
+ :visible.sync="editvisible"
+ :type="edit"
+ :templateOid="this.templateOid"
+ :codeClassifyOid="this.codeClassifyOid"
+ :codeRuleOid="this.codeRuleOid"
+ :disabledProp="disabledProp"
+ :rowOid="rowOid"
+ ></FormTemplateDialog></el-button>
+
+ <el-button size="small" type="primary" plain>鎵归噺瀵煎叆鐢宠</el-button>
+ <el-button size="small" type="primary" plain>鍘嗗彶鏁版嵁瀵煎叆</el-button>
+ <el-button size="small" type="primary" plain>鎵归噺鐢宠缂栫爜</el-button>
+ <el-button size="small" type="primary" plain>鎵归噺鍙戝竷</el-button>
+ <el-button size="small" type="primary" plain>鏌ョ湅娴佺▼鍘嗗彶</el-button>
+ <el-button size="small" type="primary" plain>鍒犻櫎</el-button>
+ <el-button size="small" type="primary" plain>鍙戝竷</el-button>
+ <el-button size="small" type="primary" plain>鏁版嵁鏇存敼</el-button>
+ <el-button size="small" type="primary" plain>鍥炴敹</el-button>
+ <el-button size="small" type="primary" plain>瀵煎嚭
+ <transfer filter-placeholder="璇疯緭鍏ユ嫾闊冲叏鎷兼垨鑰呮嫾闊崇缉鍐�" ></transfer>
+ </el-button>
+ <el-button size="small" type="primary" plain @click="findvisible=true">鏌ヨ
+ <advancedQuery :visible.sync="findvisible" :options="this.options"></advancedQuery>
+ </el-button>
+ <el-button size="small" type="primary" plain>鐩镐技椤规煡璇�</el-button>
+ <el-button size="small" type="primary" plain style="margin-left: 1px;margin-top:10px">鍒锋柊</el-button>
+ <el-input placeholder="璇疯緭鍏ュ叧閿瓧鎸夊洖杞︽煡璇�" style="width: 180px;margin-left: 5px;margin-top:10px" size="small"></el-input>
+ </div>
+ <el-row style="height: 700px;width: 100%">
+ <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700" @selection-change="handleSelectionChange" @sort-change="sortChange">
+ <el-table-column
+ type="selection"
+ fixed
+ width="55">
+ </el-table-column>
+ <el-table-column
+ type="index"
+ fixed
+ label="搴忓彿"
+ width="55">
+ </el-table-column>
+ <div v-for="(item,index) in this.tableHeadData" :key="index">
+ <el-table-column :label="item.label" :prop="item.prop" :sortable="item.sortable" :width="item.width">
+ <!-- 缂栬緫鍜屽睍绀洪�昏緫 -->
+ <template slot-scope="{ row }">
+ <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>
+ <span v-else>{{row[item.prop]}}</span>
+ <el-switch
+ v-if="editShow === 'true'"
+ v-model="row[item.prop]"
+ active-color="#13ce66"
+ inactive-color="#ff4949">
+ </el-switch>
+ </template>
+ </el-table-column>
</div>
- </template>
- </avue-crud>
+<!-- <el-table-column fixed="right" label="鎿嶄綔" width="120" >-->
+<!-- <template slot-scope="scope" >-->
+<!-- <el-button size="small" type="text" @click.native.prevent="enumDeleteRow(scope.$index, tableData)">-->
+<!-- 绉婚櫎-->
+<!-- </el-button>-->
+<!-- </template>-->
+<!-- </el-table-column>-->
+ </el-table>
+
+ </el-row>
+ </div>
+ <div class="block" style="display: flex;justify-content: flex-end">
+ <el-pagination
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ :current-page="currentPage4"
+ :page-sizes="page.pageSizes"
+ :page-size="page.pageSizes"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="page.total">
+ </el-pagination>
+ </div>
</basic-container>
</template>
<script>
import {MasterTable, TableData} from "@/api/GetItem";
-
export default {
name: "Crud.vue",
data() {
return {
+ addvisible:false,
+ editvisible:false,
+ findvisible:false,
+ templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
+ codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
+ codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
+ rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9',
+ disabledProp: ["id"],
editingRow:null,
editShow: "",
editAttr:"",
loading: false,
data: [],
+ options:{},
option: {
//榛樿楂樺害,
align: 'center',
@@ -86,12 +163,7 @@
}
},
computed:{
- editable(){
- this.tableData.forEach(item=>{
- this.items=item
- })
- return this.editShow === this.editingRow[this.items.prop];
- }
+
},
created() {
this.CrudHeaderRend();
@@ -101,13 +173,15 @@
this.doLayout()
},
methods: {
+ handleSizeChange(val){
+ console.log(val)
+ },
// 鐩戝惉鍗曞厓鏍肩偣鍑讳簨浠跺苟瀛樺偍姝e湪缂栬緫鐨勮
handleCellClick(row, column) {
this.editingRow = row;
this.editShow = column.property;
- console.log( this.editingRow['name'], this.editShow)
},
- //鏋氫妇娉ㄥ叆鍒犻櫎
+ //鍒犻櫎
enumDeleteRow(row) {
console.log(row)
this.tableData.splice(row, 1)
@@ -128,6 +202,7 @@
functionId: 5,
_: 1685067339479
}).then(res => {
+ this.options=res.data.tableDefineVO.seniorQueryColumns
this.List = res.data.tableDefineVO.cols[0];
this.List.forEach(item => {
let columnItem = {
@@ -148,7 +223,7 @@
templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F",
codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
page: this.page.currentPage,
- limit: this.page.pageSize,
+ limit:9,
_: 1685089123575
}).then(res => {
this.page.total = res.data.total;
@@ -181,7 +256,6 @@
},
//鍒嗛〉鍒锋柊
async onLoad(val) {
- console.log(val)
await TableData({
templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F",
codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
@@ -193,13 +267,21 @@
})
},
//澶氶��
- selectionChange(row) {
+ handleSelectionChange(row) {
console.log(row)
}
}
}
</script>
-<style scoped>
+<style lang="scss" scoped>
+.testbox {
+ .el-table--scrollable-x .el-table__body-wrapper {
+ overflow: auto !important;
+ }
+ .el-table__fixed-right-patch {
+ background-color: #f5f7fa !important;
+ }
+}
</style>
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue b/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
index 8b84cca..e6f1f5b 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
@@ -1,7 +1,6 @@
<template>
<FormTempalte
ref="FormTempalte"
- :visible="visible"
:selfColumnType="selfColumnType"
:selfColumnConfig="selfColumnConfig"
:columnList="columnList"
@@ -10,14 +9,13 @@
<script>
import { getCodeRule } from "@/api/formTemplate.js";
-import FormTempalte from "./FormTempalte.vue";
export default {
name: "CodeApply",
- components: { FormTempalte },
+ components: { FormTempalte: () => import('./FormTempalte.vue') },
props: {
visible: {
type: Boolean,
- default: false
+ default: false,
},
codeClassifyOid: {
type: String,
@@ -59,7 +57,406 @@
},
},
},
- columnList: [],
+ columnList: [
+ {
+ btmname: "codebasicsec",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codeDateFormatStr: "",
+ codeFillFlag: "",
+ codeFillLength: "",
+ codeFillLimit: 0,
+ codeFillSeparator: "",
+ codeFillType: "",
+ codeFillTypeText: "",
+ codeGetValueType: "",
+ codeGetValueTypeText: "",
+ codeLevelType: "",
+ codeLevelTypeText: "",
+ codeLevelValue: 0,
+ codeSecLength: "10",
+ codeSecLengthType: "code_sec_length_variable",
+ codeSecLengthTypeText: "",
+ componentCodeFlag: "false",
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:23:33.000",
+ creator: "1",
+ customCodeSerialClass: "",
+ data: null,
+ description: "",
+ displayFlag: "false",
+ filterSql: "",
+ firstR: "1",
+ firstV: "1",
+ fixedValueVOList: [
+ {
+ btmname: "codefixedvalue",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codefixedsecoid: "5591ED23-D218-8B84-9789-1E5EB21A49B9",
+ codefixedsecoidName: null,
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:47:45.000",
+ creator: "1",
+ data: null,
+ description: "",
+ firstR: "1",
+ firstV: "1",
+ id: "002",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:47:45.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ name: "",
+ nameOid: "B8BB82F0-9B9E-3E7C-4324-62F13A64B369",
+ oid: "375AE030-DCB2-B116-1C71-DA1AB971E249",
+ ordernum: 0,
+ owner: "1",
+ revisionOid: "9BF1CABA-EB6D-0B80-0938-D4DC779D5AF0",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ ts: "2023-06-02 10:47:45.635",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ {
+ btmname: "codefixedvalue",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codefixedsecoid: "5591ED23-D218-8B84-9789-1E5EB21A49B9",
+ codefixedsecoidName: null,
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:47:42.000",
+ creator: "1",
+ data: null,
+ description: "",
+ firstR: "1",
+ firstV: "1",
+ id: "001",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:47:42.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ name: "",
+ nameOid: "804FA254-1158-C355-9CE2-7CA444955AFC",
+ oid: "821F6250-C763-FB0E-92F5-A9C07F1B951C",
+ ordernum: 0,
+ owner: "1",
+ revisionOid: "6CF50C9D-2606-948A-03B1-26158627CE33",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ ts: "2023-06-02 10:47:42.527",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ ],
+ getValueClass: "",
+ id: "0001",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:23:33.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ matchClassifyValueFlag: "",
+ name: "鍥哄畾鐮佹",
+ nameOid: "C01CA64B-8358-D3A7-D38D-9DE7A5D748C8",
+ nullableFlag: "false",
+ oid: "5591ED23-D218-8B84-9789-1E5EB21A49B9",
+ orderNum: 1,
+ owner: "1",
+ parentClassifySecOid: "",
+ parentClassifySecText: "",
+ pkCodeRule: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
+ referAttributeId: "",
+ referAttributeName: "",
+ referBtmId: "",
+ referBtmName: "",
+ referCodeClassifyOid: "",
+ referCodeClassifyOidName: "",
+ referConfig: "",
+ referValueInfo: "",
+ revisionOid: "EE7A9BC0-FEF3-061B-A750-132121D86D83",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ sectype: "codefixedsec",
+ sectypeText: "鍥哄畾鐮佹",
+ serialDependFlag: "false",
+ serialDependOrder: 0,
+ serialStart: "",
+ serialStep: 0,
+ ts: "2023-06-02 10:23:33.733",
+ valueCutLength: 0,
+ valueCutType: "code_cut_none",
+ valueCutTypeText: "涓嶆埅鍙�",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ {
+ btmname: "codebasicsec",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codeDateFormatStr: "",
+ codeFillFlag: "",
+ codeFillLength: "",
+ codeFillLimit: 0,
+ codeFillSeparator: "0",
+ codeFillType: "code_fill_right",
+ codeFillTypeText: "",
+ codeGetValueType: "",
+ codeGetValueTypeText: "",
+ codeLevelType: "",
+ codeLevelTypeText: "",
+ codeLevelValue: 0,
+ codeSecLength: "10",
+ codeSecLengthType: "",
+ codeSecLengthTypeText: "",
+ componentCodeFlag: "false",
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:24:07.000",
+ creator: "1",
+ customCodeSerialClass: "",
+ data: null,
+ description: "鍙彉鐮佹",
+ displayFlag: "false",
+ filterSql: "",
+ firstR: "1",
+ firstV: "1",
+ fixedValueVOList: null,
+ getValueClass: "",
+ id: "0002",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:24:07.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ matchClassifyValueFlag: "",
+ name: "鍙彉鐮佹",
+ nameOid: "02AED8DD-C40D-7E00-C88A-3DB65A3027A4",
+ nullableFlag: "false",
+ oid: "A4508759-4213-2F07-04ED-A8C224303F44",
+ orderNum: 2,
+ owner: "1",
+ parentClassifySecOid: "",
+ parentClassifySecText: "",
+ pkCodeRule: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
+ referAttributeId: "",
+ referAttributeName: "",
+ referBtmId: "",
+ referBtmName: "",
+ referCodeClassifyOid: "",
+ referCodeClassifyOidName: "",
+ referConfig: "",
+ referValueInfo: "",
+ revisionOid: "E4C77B6E-13AE-55EB-4147-64B4526BFEE4",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ sectype: "codevariablesec",
+ sectypeText: "鍙彉鐮佹",
+ serialDependFlag: "false",
+ serialDependOrder: 0,
+ serialStart: "",
+ serialStep: 0,
+ ts: "2023-06-02 10:24:07.804",
+ valueCutLength: 0,
+ valueCutType: "",
+ valueCutTypeText: "",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ {
+ btmname: "codebasicsec",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codeDateFormatStr: "",
+ codeFillFlag: "",
+ codeFillLength: "",
+ codeFillLimit: 0,
+ codeFillSeparator: "",
+ codeFillType: "",
+ codeFillTypeText: "",
+ codeGetValueType: "",
+ codeGetValueTypeText: "",
+ codeLevelType: "",
+ codeLevelTypeText: "",
+ codeLevelValue: 0,
+ codeSecLength: "10",
+ codeSecLengthType: "code_sec_length_static",
+ codeSecLengthTypeText: "",
+ componentCodeFlag: "false",
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:25:07.000",
+ creator: "1",
+ customCodeSerialClass: "",
+ data: null,
+ description: "鍒嗙被鐮佹瀛�",
+ displayFlag: "false",
+ filterSql: "",
+ firstR: "1",
+ firstV: "1",
+ fixedValueVOList: [
+ {
+ btmname: "codefixedvalue",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codefixedsecoid: "8FD660BF-BA04-AB4F-8076-B5C43845621B",
+ codefixedsecoidName: null,
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:43:44.000",
+ creator: "1",
+ data: null,
+ description: "",
+ firstR: "1",
+ firstV: "1",
+ id: "000101",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:43:44.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ name: "",
+ nameOid: "D135277F-E638-EB02-CEF1-AD99B889CA94",
+ oid: "F7FEFFB7-0832-8CAF-2965-50757D01B878",
+ ordernum: 0,
+ owner: "1",
+ revisionOid: "AF362124-06FD-F209-442F-8A13842CEB40",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ ts: "2023-06-02 10:43:44.838",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ {
+ btmname: "codefixedvalue",
+ checkInBy: "",
+ checkInTime: null,
+ checkOutBy: "",
+ checkOutTime: null,
+ codefixedsecoid: "8FD660BF-BA04-AB4F-8076-B5C43845621B",
+ codefixedsecoidName: null,
+ copyFromVersion: "",
+ createTime: "2023-06-02 10:43:49.000",
+ creator: "1",
+ data: null,
+ description: "",
+ firstR: "1",
+ firstV: "1",
+ id: "000102",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:43:49.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ name: "",
+ nameOid: "4F0F0F48-6146-5E62-7E4C-C1ED5E7D788C",
+ oid: "F11E47E7-1360-5914-BA03-B6844E37AFB4",
+ ordernum: 0,
+ owner: "1",
+ revisionOid: "B4797510-7232-B6FF-077D-918F9B36D3C3",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ ts: "2023-06-02 10:43:49.254",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ ],
+ getValueClass: "",
+ id: "00031",
+ lastModifier: "1",
+ lastModifyTime: "2023-06-02 10:25:07.000",
+ lastR: "1",
+ lastV: "1",
+ lcStatus: "Exist",
+ lcStatusText: "瀛樺湪",
+ lctid: "defaultLC",
+ matchClassifyValueFlag: "",
+ name: "鍒嗙被鐮佹瀛�",
+ nameOid: "69BEE3EC-F560-1C41-F56B-107F5B43C051",
+ nullableFlag: "false",
+ oid: "8FD660BF-BA04-AB4F-8076-B5C43845621B",
+ orderNum: 4,
+ owner: "1",
+ parentClassifySecOid: "",
+ parentClassifySecText: "",
+ pkCodeRule: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
+ referAttributeId: "",
+ referAttributeName: "",
+ referBtmId: "",
+ referBtmName: "",
+ referCodeClassifyOid: "",
+ referCodeClassifyOidName: "",
+ referConfig: "",
+ referValueInfo: "",
+ revisionOid: "EA98821E-60A0-1D18-4F70-96B0E0740B44",
+ revisionRule: "",
+ revisionSeq: 1,
+ revisionValue: "",
+ secretGrade: null,
+ secretGradeText: "",
+ sectype: "codefixedsec",
+ sectypeText: "鍥哄畾鐮佹",
+ serialDependFlag: "false",
+ serialDependOrder: 0,
+ serialStart: "",
+ serialStep: 0,
+ ts: "2023-06-02 10:25:07.764",
+ valueCutLength: 0,
+ valueCutType: "code_cut_none",
+ valueCutTypeText: "涓嶆埅鍙�",
+ versionRule: "0",
+ versionSeq: 1,
+ versionValue: "1",
+ },
+ ],
};
},
created() {
@@ -73,13 +470,14 @@
getCodeRule() {
getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
if (res.data && res.data.code === 200) {
- this.defaultValue = res.data.data;
- this.columnList = res.data.data.secVOList || [];
- console.log(res.data.data.secVOList, 'res.data.data.secVOList');
- this.codeRuleOid = res.data.data.oid;
+ // this.defaultValue = res.data.data;
+ // this.columnList = res.data.data.secVOList || [];
+ // this.codeRuleOid = res.data.data.oid;
this.$nextTick(() => {
- this.$refs.FormTempalte.init(res.data.data.secVOList)
- })
+ // 娴嬭瘯鏁版嵁灞曠ず
+ // this.$refs.FormTempalte.init(res.data.data.secVOList);
+ this.$refs.FormTempalte.init(this.columnList);
+ });
}
});
},
@@ -114,11 +512,10 @@
}
},
async validate() {
- return await this.$refs.FormTempalte.validate()
- }
+ return await this.$refs.FormTempalte.validate();
+ },
},
- watch: {
- },
+ watch: {},
};
</script>
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
index ec78c2f..18b9d68 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -197,7 +197,7 @@
tooltips: "璇疯緭鍏ユ暟瀛�",
type: "text",
unique: false,
- verify: "/[0-9]/",
+ verify: /^[0-9]+$/g,
},
{
comboxKey: null,
@@ -513,7 +513,9 @@
})
.then((res) => {
if (res.status === 200) {
- this.templateRender(res.data.formDefineVO.items);
+ this.templateRender(this.testItems);
+ // 娴嬭瘯鏁版嵁灞曠ず
+ // this.templateRender(res.data.formDefineVO.items);
this.$emit("getFormTemplateEnd", res.data);
}
})
@@ -575,14 +577,12 @@
format: formItem.dateFormate,
keyAttr: formItem.keyAttr,
value: formItem.defaultValue,
- // tip: formItem.tooltips,
- // tipPlacement: "right",
placeholder: formItem.inputTip,
comboxKey: formItem.comboxKey,
display: !formItem.hidden,
maxlength: formItem.maxlength,
filterable: true,
- referConfig:formItem.referConfig,
+ referConfig: formItem.referConfig,
change: () => {
this.changeFun(formItem.displayExtension, formItem.prop);
},
@@ -618,7 +618,8 @@
this.formIndex++;
this.loading = false;
this.geDictData(dictKeys);
- this.getFormDetail()
+ // 娴嬭瘯鏁版嵁灞曠ず
+ // this.getFormDetail();
},
// 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃�
resetFormConfig(formItem) {
@@ -709,26 +710,28 @@
});
},
// 琛ㄥ崟鏍¢獙
- validate() {
+ validate() {
return new Promise((resolve) => {
this.$refs.form.validate((valid, done, msg) => {
- console.error(msg, valid)
- if (valid) {
- resolve(true)
- } else {
- resolve(false);
- }
+ console.error(msg, valid);
+ if (valid) {
+ done();
+ resolve(true);
+ } else {
+ resolve(false);
+ }
+ });
});
- })
-
},
- // 鑾峰彇琛ㄥ崟鏁版嵁
+ // 鑾峰彇琛ㄥ崟璇︽儏鏁版嵁
getFormDetail() {
- if (this.type === 'add') return
- getFormDetail({templateOid: this.templateOid, oid: this.rowOid}).then(res => {
- console.log(res, 'res');
- })
- }
+ if (this.type === "add") return;
+ getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then(
+ (res) => {
+ console.log(res, "res");
+ }
+ );
+ },
},
watch: {
// 琛ㄥ崟鏁版嵁淇敼鍙嶉鍒扮埗缁勪欢
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
index 3aaf6fe..b5c685d 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
@@ -37,6 +37,7 @@
type="detail"
:visible.sync="formTemplateVisible"
:templateOid="this.resembleTemplateOid"
+ :rowOid="rowOid"
:codeClassifyOid="this.resembleCodeClassifyOid"
></FormTemplateDialog>
</div>
@@ -44,11 +45,10 @@
<script>
import { findLike } from "@/api/formTemplate.js";
-import FormTemplateDialog from "./index.vue";
export default {
name: "ResembleQuery",
- components: { FormTemplateDialog },
+ components: { FormTemplateDialog: () => import('./index.vue') },
props: {
column: {
type: Array,
@@ -79,10 +79,13 @@
return {
formTemplateVisible: false,
activeName: "findlike",
- tableData: [],
+ tableData: [
+ {id: '*****', materialclassifyText: '001', tuhao: 'tuhao', iod: '123123131312'}
+ ],
loading: false,
resembleTemplateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
resembleCodeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
+ rowOid: '',
defaultValue: {},
secVOList: [],
defaultKeys: [
@@ -136,12 +139,15 @@
params = Object.assign(params, defaultValue);
findLike(params).then((res) => {
this.loading = false;
- this.tableData = res.data.data || [];
+ // this.tableData = res.data.data || [];
});
},
openFormTemlpate(row) {
+ this.$forceUpdate()
+ console.log(row, 'row.oid');
this.codetemplateoid = row.codetemplateoid;
+ this.rowOid = row.oid
this.formTemplateVisible = true;
},
getDefaultValueAndFormValues(form) {
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index d04ed50..f99d7b4 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -13,14 +13,22 @@
v-bind="$attrs"
:visible="visible"
:type="type"
+ :rowOid="rowOid"
v-if="dialogVisible"
ref="FormTempalte"
@getFormTemplateEnd="getFormTemplate"
@getFormData="getFormData"
></FormTempalte>
- <div class="tab_box" v-if="type !== 'detail' && dialogVisible && (showCodeApply || showResembleQuery)">
- <el-tabs v-model="activeName" type="border-card">
+ <div
+ class="tab_box"
+ v-if="
+ type !== 'detail' &&
+ dialogVisible &&
+ (showCodeApply || showResembleQuery)
+ "
+ >
+ <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
<el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply">
<CodeApply
ref="CodeApply"
@@ -48,7 +56,10 @@
<el-button @click="submit()" type="primary" :loading="submitBtnLoading"
>纭� 瀹�</el-button
>
- <el-button @click="resembleQuerySubmit" type="primary" v-if="showResembleQuery"
+ <el-button
+ @click="resembleQuerySubmit"
+ type="primary"
+ v-if="showResembleQuery"
>鐩镐技鍍忔煡璇�</el-button
>
</div>
@@ -79,6 +90,7 @@
type: String,
default: "80%",
},
+ rowOid: ''
},
data() {
return {
@@ -88,6 +100,7 @@
resembleTableColumn: [],
secVOList: [],
form: {},
+ activeName: "",
};
},
created() {},
@@ -101,29 +114,25 @@
},
},
showCodeApply() {
- if (this.type === "add") {
- if (this.hasResemble && this.secVOList.length === 0) {
- return false;
- }
- } else {
- return false;
- }
+ // 娴嬭瘯鏁版嵁灞曠ず
+ // if (this.type === "add") {
+ // if (this.hasResemble && this.secVOList.length === 0) {
+ // return false;
+ // }
+ // } else {
+ // return false;
+ // }
return true;
},
showResembleQuery() {
return this.hasResemble;
- },
- activeName() {
- return (
- (this.showCodeApply && "codeApply") ||
- (this.showResembleQuery && "resembleQuery")
- );
},
},
methods: {
openDialog() {
this.$nextTick(() => {
this.$refs.FormTempalte.init();
+ this.$refs.CodeApply.getCodeRule();
});
},
close() {
@@ -138,6 +147,9 @@
data.resembleTableVO.cols &&
data.resembleTableVO.cols.length > 0;
this.resembleTableColumn = data.resembleTableVO.cols || [];
+ this.activeName =
+ (this.showCodeApply && "codeApply") ||
+ (this.showResembleQuery && "resembleQuery");
},
getFormData(form) {
this.form = form;
@@ -145,12 +157,21 @@
resembleQuerySubmit() {
this.$refs.resembleQueryRef.resembleQuery(this.form);
},
+ handleClick() {
+ if (this.activeName === 'resembleQuery') {
+ this.resembleQuerySubmit()
+ }
+ },
async submit() {
const formValidate = await this.$refs.FormTempalte.validate();
+ let codeValidate = true;
if (this.showCodeApply) {
- const codeValidate = this.$refs.CodeApply.validate();
- console.log(formValidate, codeValidate);
+ codeValidate = await this.$refs.CodeApply.validate();
}
+ this.$emit("submit", {
+ form: this.form,
+ flag: formValidate && codeValidate,
+ });
},
},
};
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index f3d1fd1..da70e18 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -412,8 +412,7 @@
}
})
//璋冪敤淇敼灞炴�у悕鏂规硶
- this.ModifyProperties(this.Treedata, 'text', 'label');
- this.ModifyProperties(this.CloneTreedata, 'text', 'label');
+ this.ModifyProperties(this.CloneTreedata, 'name', 'label');
}).catch(res => {
this.$message.error(res)
})
diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js
index 5ceed92..082a2cd 100644
--- a/Source/UBCS-WEB/src/main.js
+++ b/Source/UBCS-WEB/src/main.js
@@ -46,6 +46,7 @@
import TableCrud from "@/components/Crud/Crud"
import originalAdd from "@/views/modeling/originalAdd"
import FormTemplateDialog from "@/components/FormTemplate/index"
+import linkTypeAdd from "@/views/modeling/LinkTypeAdd"
// 灏嗗伐鍏峰嚱鏁版坊鍔犲埌鍏ㄥ眬
import utilFunc from './util/func'
@@ -93,6 +94,7 @@
Vue.component('referBtmTypeCrudDialog',referBtmTypeCrudDialog)
Vue.component('referSelectBtmAttrDialog',referSelectBtmAttrDialog)
Vue.component('FormTemplateDialog',FormTemplateDialog)
+Vue.component('LinkTypeAdd',linkTypeAdd)
// 鍔犺浇鐩稿叧url鍦板潃
Object.keys(urls).forEach(key => {
diff --git a/Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue b/Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue
index 1122205..c63bafa 100644
--- a/Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue
+++ b/Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue
@@ -10,6 +10,7 @@
:codeRuleOid="this.codeRuleOid"
:disabledProp="disabledProp"
:rowOid="rowOid"
+ @submit="submit"
></FormTemplateDialog>
<ResembleQueryDialog
:visible.sync="visible1"
@@ -40,5 +41,10 @@
rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9'
};
},
+ methods: {
+ submit(data) {
+ console.log(data);
+ }
+ }
};
</script>
diff --git a/Source/UBCS-WEB/src/views/MasterData/items.vue b/Source/UBCS-WEB/src/views/MasterData/items.vue
index 94b1072..fb59b6c 100644
--- a/Source/UBCS-WEB/src/views/MasterData/items.vue
+++ b/Source/UBCS-WEB/src/views/MasterData/items.vue
@@ -2,7 +2,12 @@
<el-container>
<el-aside>
<basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
- <avue-tree :option="option" :data="data" v-model="form" style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"></avue-tree>
+ <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
+ :option="Treeoption"
+ style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"
+ @node-click=" nodeClick"
+ @check-change="checkChange"
+ ></avue-tree>
</basic-container>
</el-aside>
<el-main>
@@ -12,61 +17,144 @@
</template>
<script>
+import {getAtrrList, TreeCheckDel, TreeDel, TreeSave} from "@/api/template/templateAttr";
+
export default {
name: "items.vue",
data(){
return{
- form:{},
- data:[
- {
- value:0,
- label:'涓�绾ч儴闂�',
- children:[
- {
- value:1,
- label:'涓�绾ч儴闂�1',
- },{
- value:2,
- label:'涓�绾ч儴闂�2',
- }
- ]
- },{
- value:3,
- label:'浜岀骇閮ㄩ棬',
- children:[
- {
- value:4,
- label:'浜岀骇閮ㄩ棬1',
- },{
- value:5,
- label:'浜岀骇閮ㄩ棬2',
- }
- ]
+ CloneTreeAvueform:{},
+ loading:false,
+ CloneTreedata:[],
+ Treeoption: {
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ defaultExpandAll: false,
+ menu: false,
+ // //杩欎釜鏄閫�
+ // multiple: true,
+ },
+ nodeClickList: "",
+ }
+ },
+ created() {
+ this.getAttr()
+ },
+ methods:{
+ getAttr() {
+ getAtrrList().then(res => {
+ this.Treedata = res.data;
+ this.CloneTreedata = res.data;
+ this.Treedata.forEach((item) => {
+ for (let i = 0; i < this.Treedata.length; i++) {
+ this.Treedata[i].value = i;
+ }
+ })
+ //璋冪敤淇敼灞炴�у悕鏂规硶
+ this.ModifyProperties(this.CloneTreedata, 'name', 'label');
+ }).catch(res => {
+ this.$message.error(res)
+ })
+ },
+ //瀹氫箟涓�涓慨鏀规暟鎹睘鎬у悕鐨勬柟娉�
+ ModifyProperties(obj, oldName, newName) {
+ for (let key in obj) {
+ if (key === oldName) {
+ obj[newName] = obj[key];
+ delete obj[key];
}
- ],
- option:{
- title:'鎴戞槸鏍囬',
- filterText:"鎼滅储鍏抽敭瀛楄嚜瀹氫箟",
- defaultExpandAll:true,
- addBtnText:'鏂板鑷畾涔夋枃妗�',
- editBtnText:'淇敼鑷畾涔夋枃妗�',
- delBtnText:'鍒犻櫎鑷畾涔夋枃妗�',
- defaultExpandedKeys:[1],
- height:900,
- formOption:{
- labelWidth:100,
- column:[{
- label:'鑷畾涔夐」',
- prop:'label'
- }],
- },
- props:{
- labelText:'鏍囬',
- label:'label',
- value:'value',
- children:'children'
+ if (typeof obj[key] === 'object') {
+ this.ModifyProperties(obj[key], oldName, newName);
}
}
+ },
+ //鏍戣妭鐐规坊鍔犳寜閽�
+ TreeAdd() {
+ this.TreeAddFormVisible = true;
+ // 鍒ゆ柇褰撳墠鏄惁鏈夌偣鍑诲瓙椤�
+ if (this.nodeClickList !== "") {
+ this.TreeFlag = true
+ }
+ },
+ //鏍戣妭鐐规坊鍔犱簨浠�
+ TreeAddHandler() {
+ const data = this.TreeAddform
+ this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid)
+ TreeSave(data).then(() => {
+ this.$message({
+ type: 'success',
+ message: '娣诲姞鎴愬姛!'
+ });
+ this.getAttr();
+ this.TreeAddFormVisible = false
+ this.TreeAddform = ""
+ }).catch(res => {
+ this.$message({
+ type: 'warning',
+ message: res
+ });
+ })
+ },
+ //鏍戣妭鐐瑰垹闄ゆ寜閽�
+ TreeDel() {
+ this.$confirm('鏄惁鍒犻櫎褰撳墠閫夋嫨鐨勫垎绫伙紝灏嗕細鎶婂瓙鍒嗙被涓�骞跺垹闄わ紝濡傛灉瀛樺湪缂栫爜鏁版嵁灏嗕笉鑳借鍒犻櫎锛屾槸鍚︾户缁紵', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ customClass: 'my-messagebox',
+ }).then(() => {
+ TreeCheckDel(this.nodeClickList).then(res => {
+ if (res.data.data) {
+ TreeDel(this.nodeClickList).then(() => {
+ this.$message({
+ type: 'success',
+ message: '鍒犻櫎鎴愬姛!'
+ });
+ this.getAttr();
+ }).catch(res => {
+ this.$message({
+ type: 'warning',
+ message: res
+ });
+ })
+ } else {
+ this.$confirm('褰撳墠鏁版嵁鍖呭惈鏈変笅绾ф暟鎹紝瑕佸垹闄ょ殑璇濅細鍜屼笅绾ф暟鎹竴璧峰垹闄わ紝浣犵‘璁ょ户缁�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ customClass: 'my-messageboxs',
+ }).then(() => {
+ TreeDel(this.nodeClickList).then(() => {
+ this.$message({
+ type: 'success',
+ message: '鍒犻櫎鎴愬姛!'
+ });
+ this.getAttr();
+ }).catch(res => {
+ this.$message({
+ type: 'warning',
+ message: res
+ });
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
+ },
+ nodeClick(data){
+ this.nodeClickList = data
+ console.log(data)
}
}
}
diff --git a/Source/UBCS-WEB/src/views/integration/integrationIndex.vue b/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
index c4ab675..b3ae9fc 100644
--- a/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
+++ b/Source/UBCS-WEB/src/views/integration/integrationIndex.vue
@@ -30,8 +30,8 @@
<el-card>
<avue-crud :table-loading="loading" :data="mappingData" :option="optionMapping" ref="crudMapping"
@row-update="handleMapingUpdate" @row-click="handleMapingClick"
- @row-dblclick="handleMapingRowClick" @selection-change="selectionChange"
- @select="setCurrentRow" @select-all="handleSelectAll">
+ @row-dblclick="handleMapingRowClick" @selection-change="selectionChange" @select="setCurrentRow"
+ @select-all="handleSelectAll">
<template slot="menuLeft">
<el-button icon="el-icon-plus" size="small" type="primary" :disabled="disabledPush" @click="dialogPush = true">鏂� 澧�
</el-button>
@@ -50,7 +50,7 @@
</el-card>
</el-main>
</el-container>
- <el-dialog title="缂栫爜灞炴��" :visible.sync="dialogPush" append-to-body="true" destroy-on-close width="30%"
+ <!-- <el-dialog title="缂栫爜灞炴��" :visible.sync="dialogPush" append-to-body="true" destroy-on-close width="30%"
:before-close="handleClose">
<el-form :model="form">
<el-form-item label="鏌ヨ鏉′欢" label-width="70px" size="small">
@@ -64,61 +64,21 @@
<el-button @click="dialogPush = false">鍙� 娑�</el-button>
<el-button type="primary" @click="handelTransferSave">淇� 瀛�</el-button>
</span>
- </el-dialog>
+ </el-dialog> -->
+ <integration-transfer :visible.sync="dialogPush" :data="transferData" :props="transferProps"
+ @save="handelTransferSave"></integration-transfer>
</div>
</template>
<script>
-import transfer from '@/components/transfer/index'
+import integrationTransfer from './integrationTransfer.vue'
import pinyin from 'js-pinyin'
import { referCodeClassifyTree, referTree, gridAttrMapping, gridAttrRanges, batchAddSave, listCodeAttributeByClassId, syncClassifyModel } from '@/api/integration/integration.js'
export default {
components: {
- transfer
+ integrationTransfer
},
- name:'Integration',
+ name: 'Integration',
data() {
- const mappingData = [
- { "oid": "38CF1759-FBF3-44E7-AC45-F6E9A9C3B322", "id": "", "name": "", "description": "", "revisionOid": "b9065e46-6d03-4d11-b1a6-6cffc54e6835", "nameOid": "e6e429f2-0539-4ada-8174-43b37625e7d9", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-799D8-6721-3D79-8EE3-75DAF0680B7E", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "createtime", "sourceAttrName": "鍒涘缓鏃堕棿", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 0 }, { "oid": "BB3FAA38-636E-410F-A995-F9BC38EBFF01", "id": "", "name": "", "description": "", "revisionOid": "c4500a61-0c5b-4d3e-b0ea-439203273255", "nameOid": "74d13371-e8b7-49c2-b184-f9b8339a4855", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-9368E-9BA8-38E8-73F3-7D0531A22009", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "lastmodifier", "sourceAttrName": "鏈�鍚庝慨鏀逛汉", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 1 }, { "oid": "B730F997-9D98-46DA-B783-ABF256898B2C", "id": "", "name": "", "description": "", "revisionOid": "df82c828-5c88-4725-b362-88863d28c273", "nameOid": "132ed359-3464-41cb-89bf-e36b30fb7b5e", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "lastmodifytime", "sourceAttrName": "鏈�鍚庝慨鏀规椂闂�", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 2 }, { "oid": "354864DA-D613-4013-AEE5-803F1A972F77", "id": "", "name": "", "description": "", "revisionOid": "2e819333-6af0-4cc5-bc35-27494f825d46", "nameOid": "21b1d215-20b2-47e1-9225-a6b5b8b825b5", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-0FED7-90B6-BAF8-B558-2A4693CAAD83", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "createcompany", "sourceAttrName": "鍒涘缓鍏徃", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 3 }, { "oid": "D8EDCA74-E0CB-452A-9E3C-7194061B9E8F", "id": "", "name": "", "description": "", "revisionOid": "d3474951-f35d-437b-818d-24dc1bd71e79", "nameOid": "b44b9c81-644f-47cb-babe-b19a9d532354", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-1469D-F1E9-6A31-21B9-E5FF7A03BBEA", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "kucunwl", "sourceAttrName": "搴撳瓨鐗╂枡", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 4 }, { "oid": "471DAA41-AD8B-4289-BDF0-023D6F9CB36C", "id": "", "name": "", "description": "", "revisionOid": "a54eb585-727c-41e3-b171-398a7458743b", "nameOid": "75bd7a1e-498c-4f7a-b70b-5741e4af0109", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-07512-3fff-4ff0-bf25-f13fcd2a4acf", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "id", "sourceAttrName": "缂栫爜", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 5 }, { "oid": "E53F6F6A-2F50-4C54-960B-B4FD428B375C", "id": "", "name": "", "description": "", "revisionOid": "0b01fc2f-a342-4177-bf6a-570aa8ac529c", "nameOid": "e2ee62eb-4508-41ec-8f5a-067e5ad81c16", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-1fe09-da6f-4412-b92f-f411d341e92d", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "lcstatus", "sourceAttrName": "鐘舵��", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 6 }, { "oid": "A929D6F9-88DB-43BE-BE9C-E079E980A69B", "id": "", "name": "", "description": "", "revisionOid": "76a72660-8f93-46d8-8d3c-3f88baf60108", "nameOid": "96b675b6-3a3a-415b-873c-fc8bc014c699", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-F8C09-A123-391B-E119-748B70028952", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "oldcode", "sourceAttrName": "鍘嗗彶缂栧彿", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 7 }, { "oid": "1CCC00C8-572A-40BC-AC6F-49A28D55FF4E", "id": "", "name": "", "description": "", "revisionOid": "6daea0b1-fe5c-460e-9541-c0ffffe894af", "nameOid": "98b38f61-a53a-425d-bb32-c9b8c05ce488", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-9ab10-a3bf-4b51-b8c5-337132018f1d", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890762", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "name", "sourceAttrName": "鐗╂枡鍚嶇О", "viewModelName": "", "viewName": "鍩烘湰瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 8 }, { "oid": "8968D5C3-4AE6-4A7B-9DCA-90382170C200", "id": "", "name": "", "description": "", "revisionOid": "e409f2df-88e5-4ee4-838e-3562d3e57625", "nameOid": "144d88b5-acd6-4235-be14-f3d1907eef1a", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-F0DDF-C5DB-8616-D752-20360970AFB6", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "materialclassify", "sourceAttrName": "鐗╂枡鍒嗙被", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 9 }, { "oid": "55CBC959-7DF1-4B3B-83BC-1BD6484CA967", "id": "", "name": "", "description": "", "revisionOid": "eef610b7-5c56-4357-a6ff-677f99388300", "nameOid": "def770a7-3a5a-4c8f-85a4-36519de4b77e", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-329e5-b881-4128-aea4-f1b8f67eb5e7", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "firstfl", "sourceAttrName": "涓�绾х鐞嗗垎绫�", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 10 }, { "oid": "BD0CA234-065B-43A1-AFEE-555368DF927D", "id": "", "name": "", "description": "", "revisionOid": "34b0de1a-634a-495f-8a2b-51fec7c4d502", "nameOid": "0d8563c8-7c4d-4adf-95ff-a583e8594a63", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-43fc3-a604-4fd8-a2c9-482712301285", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "secondfl", "sourceAttrName": "浜岀骇绠$悊鍒嗙被", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 11 }, { "oid": "C2F69279-BAD6-45B2-98A0-69F1E1DBD6E7", "id": "", "name": "", "description": "", "revisionOid": "4cb208a9-8e78-4d67-8498-c9a0f8430ad2", "nameOid": "2d14dfe4-272a-4884-9bb6-bb2461d37d5a", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-8e06b-b297-4738-ad6d-0b1b0064ae3e", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "thrifl", "sourceAttrName": "涓夌骇绠$悊鍒嗙被", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 12 }, { "oid": "75FDBBFD-A69F-4B09-925D-583C1AF96307", "id": "", "name": "", "description": "", "revisionOid": "5a64c3be-bf36-41ce-8feb-34eac91ff3d4", "nameOid": "06a63d3a-db67-4b97-970a-403f1db18021", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-618cd-475b-4235-8783-20fd3e19e397", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "xiaoshouwl", "sourceAttrName": "閿�鍞墿鏂�", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 13 }, { "oid": "6118CBF1-E0F1-4DE4-8801-4BB0E6C4F4EB", "id": "", "name": "", "description": "", "revisionOid": "b7216ddc-56bd-4f74-a247-b47c8fcbb661", "nameOid": "9772d9f8-93fa-4995-9802-79255bbbc6db", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-3de12-01e3-4a96-9323-ee025f57fe75", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "xinghaoguige", "sourceAttrName": "瑙勬牸鍨嬪彿", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 14 }, { "oid": "614E51BE-C77F-4723-9E3D-E6C73C85E4DA", "id": "", "name": "", "description": "", "revisionOid": "97b1e20e-ed0e-42a8-bf29-a009df5b5b08", "nameOid": "05626bfd-48f6-4401-b1fb-0b8ce5d4628b", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-059FA-B513-114A-318C-9D7FB3E06736", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "jiliangdw", "sourceAttrName": "璁¢噺鍗曚綅", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 15 }, { "oid": "D8FF1A88-D9E9-4585-A82F-B36B61EB89BF", "id": "", "name": "", "description": "", "revisionOid": "aaa415b8-3220-41b2-aeea-35dfe1d0f660", "nameOid": "6f167320-b672-45ba-985f-53bd2be5a7f6", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-4C611-FC2A-C4EB-D85E-74B008515EAB", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "chukufangshi", "sourceAttrName": "鍑哄簱鏂瑰紡", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 16 }, { "oid": "EF4ABCFB-755A-4F16-858E-43CF52FE6629", "id": "", "name": "", "description": "", "revisionOid": "589992f1-b6a9-4380-bab5-59f70c76b010", "nameOid": "57515957-02ed-40df-a0ad-745a59f87a67", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-43953-2216-4171-b1a6-139244e63a95", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "description", "sourceAttrName": "澶囨敞璇存槑", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 17 }, { "oid": "7EED66A2-9A94-4CDA-A475-964DA724F722", "id": "", "name": "", "description": "", "revisionOid": "70483c08-8c9a-4dc9-bd82-01f35bcebab1", "nameOid": "a568101c-6b70-4a3b-9022-7849c4167189", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-D6882-1BA9-BBA6-2344-B433A6FDCA39", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890763", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "hesuanfenlei", "sourceAttrName": "鏍哥畻鍒嗙被", "viewModelName": "", "viewName": "閲囪喘瑙嗗浘", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 18 }, { "oid": "2A6DA1F1-AD1C-46D2-BC81-1BB116F790BD", "id": "", "name": "", "description": "", "revisionOid": "1b50dd67-638a-467d-b315-608007e7e440", "nameOid": "5ff49028-0e07-4ab3-bcfd-0a1469435696", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-E34DA-ABF6-9813-8AB0-7651E4B2D54B", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "materialtype", "sourceAttrName": "鐗╂枡绫诲瀷", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 19 }, { "oid": "B6F71DAA-CAD0-498C-988D-6D14DDA55DED", "id": "", "name": "", "description": "", "revisionOid": "fb74ab8e-8f63-4542-925e-9d6c4ac9bc4c", "nameOid": "6e2ac133-2ac8-4739-b50b-6b4247f77881", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-38D7E-E51A-81B3-558D-FF1212DFC757", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "tuhao", "sourceAttrName": "鍥惧彿", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 20 }, { "oid": "1EE65761-7C78-4D1B-95FD-6CFEEA7A941E", "id": "", "name": "", "description": "", "revisionOid": "02a2f43f-e752-49d1-9abd-a67bbc563f67", "nameOid": "70937fe4-ca24-4afa-9517-09140811e4f7", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-BF978-7354-CE66-415B-16ABD3ED036D", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "zhibaoqi", "sourceAttrName": "璐ㄤ繚鏈�", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 21 }, { "oid": "6D33C42D-3754-427E-8963-C4BB381A7B30", "id": "", "name": "", "description": "", "revisionOid": "5060a52a-d967-47c8-af78-c7aadb453bc4", "nameOid": "710d539e-a753-4d3b-83da-d51906879f4c", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-46119-D74B-4818-9A89-6235E2234395", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "revisionvalue", "sourceAttrName": "鐗堟湰", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 22 }, { "oid": "4BE71AA3-F86B-4E7B-B1A8-60C77D6D0F9D", "id": "", "name": "", "description": "", "revisionOid": "79c57b17-8856-42da-8336-f7cc90c08ba0", "nameOid": "e8b61f38-9fd3-4344-9bec-45989173da90", "btmname": "japplyform", "lastR": "1", "firstR": "1", "lastV": "1", "firstV": "1", "creator": "0", "createTime": "2023-06-02 10:57:58", "lastModifier": "0", "lastModifyTime": "2023-06-02 10:57:58", "revisionRule": "", "revisionSeq": 1, "revisionValue": "", "versionRule": "0", "versionSeq": 1, "versionValue": "1", "lcStatus": "", "lcStatusText": "", "ts": "2023-06-02 10:57:58.648", "owner": "1", "copyFromVersion": "", "secretGrade": -1, "secretGradeText": "", "lctid": "", "data": {}, "defaultValue": "", "metaListId": "XJ-752FC-DC6E-361E-B960-607D7FF908E6", "sourceClassifyId": "XJ-FC9B6-FE27-241F-5FCA-ED4DC17CF95B", "sourceClassifyName": "浜у搧", "targetAttrId": "", "targetClassifyId": "D2DC11DD-B28A-8874-B656-10A1E0569FF3", "viewModeId": "XJ-B5416-4928-CFB8-84F5-1955AA890764", "viewModeName": "", "targetAttrKey": "", "targetAttrName": "", "sourceAttrKey": "creator", "sourceAttrName": "鍒涘缓浜�", "viewModelName": "", "viewName": "閿�鍞鍥�", "targetClassifyName": "铻烘爴", "dockingPreAttrRangeVoList": [], "$cellEdit": false, "$index": 23 }
- ]
- const rangeData = [
- {
- "oid": "2023022114232",
- "id": "",
- "name": "",
- "description": "",
- "revisionOid": "097DC30F-CC8F-595D-0530-7C86C176FC61",
- "nameOid": "D3FB491C-0571-3BB2-604E-563CC579CCAC",
- "btmname": "jrange",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "1",
- "createTime": "2023-03-30 23:35:13",
- "lastModifier": "1",
- "lastModifyTime": "2023-03-30 23:35:13",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lcStatus": "Exist",
- "lcStatusText": "",
- "ts": "2023-03-30 23:35:13.027",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "lctid": "defaultLC",
- "data": {},
- "metaListId": "XJ-752FC-DC6E-361E-B960-607D7FF908E6",
- "numText": "鏉愭枡",
- "numTextValue": "1001",
- "targetNumText": "鏉愭枡",
- "targetNumTextValue": "7"
- }
- ]
const options = {
menu: false,
delBtn: false,
@@ -132,30 +92,26 @@
cellBtn: true,
border: true,
searchMenuSpan: 8,
- highlightCurrentRow:true,
+ highlightCurrentRow: true,
}
return {
// 琛ㄥ崟鍊�
form: {
- // 鏂板灞炴�ф煡璇㈠��
- name: '',
// 闆嗗洟鏍戞樉绀哄��
groupValue: ''
},
// 妫�娴嬫柊澧炴寜閽姸鎬�
- disabledPush:true,
+ disabledPush: true,
// 琛ㄦ牸鍔犺浇涓�
loading: false,
// 绌挎妗嗘暟鎹�
transferData: [],
- // 绌挎妗嗗弻鍚戠粦瀹氭暟鎹�
- transferValue: [],
// dialog寮圭獥寮�鍏�
dialogPush: false,
// 灞炴�ф槧灏勮〃鏁版嵁
- mappingData: mappingData,
+ mappingData: [],
// 灞炴�ф槧灏勫彇鍊艰〃鏁版嵁
- rangeData: rangeData,
+ rangeData: [],
// 涓绘暟鎹爲鎼滅储杩囨护
filterText: '',
// 灞炴�ф槧灏勫彇鍊艰〃閰嶇疆
@@ -210,8 +166,8 @@
isLeaf: ''
},
transferProps: {
- key: 'value',
- label: 'label'
+ key: 'oid',
+ label: 'name'
},
// 闆嗗洟鍒嗙被鏍戝��
@@ -223,6 +179,7 @@
mappingForm: {},
// 瀹氭椂鍣�
times: null,
+
}
},
watch: {
@@ -270,7 +227,8 @@
this.rangeData = []
const response = await gridAttrRanges({ meatId: oid })
if (response.status === 200) {
- this.rangeData = response.data
+ console.log(response.data)
+ this.rangeData = response.data.data
}
},
// 鎺ュ彛鑾峰彇涓绘暟鎹垎绫诲睘鎬т俊鎭�
@@ -280,16 +238,7 @@
const response = await listCodeAttributeByClassId({ codeClassifyId: oid })
if (response.status === 200) {
const data = response.data.data
- let objs = data.map(item => {
- let pinYin = pinyin.getFullChars(item.name)
- let renPing = pinyin.getCamelChars(item.name)
- const { name, oid } = item
- const obj = { pinyins: pinYin, renPing: renPing, disabled: false, label: name, value: oid }
- return obj
- })
- this.transferData = objs
- this.optionMapping.column[4].dicData = objs
- console.log(objs)
+ this.transferData = data
}
},
// 鎺ュ彛鑾峰彇闆嗗洟鍒嗙被鏍�
@@ -319,41 +268,36 @@
// 淇濆瓨鎸夐挳
async handleSave() {
console.log(this.mappingData)
- // const response = await batchAddSave({ dockingPreAttrMappingVOList: this.tableData })
- // console.log(response)
+ const response = await batchAddSave({ dockingPreAttrMappingVOList: this.mappingData })
+ console.log(response)
+ if (response.status === 200) {
+ this.$message({
+ type: "success",
+ message: "淇濆瓨鎴愬姛!"
+ });
+ }
+
},
// 鍚屾鏁版嵁
async handleSync() {
const response = await syncClassifyModel({ dockingPreAttrMappingVOList: this.tableData })
},
- // 鏂板寮圭獥鏌ヨ鎸夐挳
- handleQuery(event) {
- this.form.name = event
- },
- handelTransferSave() {
+ handelTransferSave(event) {
let that = this
- console.log(that.mappingForm)
- if (Object.keys(that.mappingForm).length==0) {
+ console.log(event)
+ const transferValue = event.value
+ if (Object.keys(that.mappingForm).length == 0) {
this.$message({
type: "error",
message: "璇烽�夋嫨涓�鏉℃暟鎹�!"
});
} else {
const findRow = that.mappingData.findIndex(item => item.metaListId === that.mappingForm.metaListId)
- const findtra = that.transferData.findIndex(item => item.value === that.transferValue[0].value)
- console.log(findRow)
- that.mappingData[findRow].targetAttrName = that.transferValue[0].label
- that.mappingData[findRow].targetAttrId = that.transferValue[0].value
- that.transferData[findtra].disabled = true
- that.transferValue = []
- that.form.name = ''
- that.dialogPush = false
+ that.mappingData[findRow].targetAttrName = transferValue[0].name
+ that.mappingData[findRow].targetAttrId = transferValue[0].oid
+ this.dialogPush =false
}
- },
- // 绌挎妗嗘煡璇㈡暟鎹繃婊�
- filterMethod(query, item) {
- return item.pinyins.indexOf(this.form.name) > -1;
},
// 宸︿晶鏍戠偣鍑�
handelTreeCell(event) {
@@ -407,8 +351,11 @@
handleUpdate(row, index, done, loading) {
console.log(row)
console.log(index)
+ let data = []
const findRow = this.mappingData.findIndex(item => item.metaListId === row.metaListId)
- this.mappingData[findRow].dockingPreAttrRangeVoList = [row]
+ this.rangeData[index] = row
+ console.log(this.rangeData)
+ this.mappingData[findRow].dockingPreAttrRangeVoList = (this.rangeData)
console.log('淇敼鍚�', row)
this.$message({
showClose: true,
@@ -430,13 +377,15 @@
},
// 闆嗗洟鏄犲皠灞炴�ч�夋嫨锛堝崟閫夛級
selectionChange(selection) {
+ console.log(selection)
+ console.log(this.mappingForm)
if (selection.length > 1) {
const nowVal = selection.shift();
this.$refs.crudMapping.toggleRowSelection(nowVal, false);
} else if (selection.length === 1) {
// 瀵瑰崟閫夋暟鎹殑鎿嶄綔鍐欏湪杩欓噷
this.disabledPush = false
- // this.getGridAttrRanges(row.metaListId)
+ this.getGridAttrRanges(this.mappingForm.metaListId)
}
},
setCurrentRow(selection, row) {
@@ -452,11 +401,6 @@
}
</script>
<style lang="scss" scoped>
-.text_tip {
- padding: 10px 0;
- color: #F56C6C;
-}
-
.setstyle {
min-height: 200px;
padding: 0 !important;
diff --git a/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
new file mode 100644
index 0000000..6b311ce
--- /dev/null
+++ b/Source/UBCS-WEB/src/views/integration/integrationTransfer.vue
@@ -0,0 +1,128 @@
+<template>
+ <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" destroy-on-close width="30%"
+ @close="handelClose">
+ <el-form :model="form">
+ <el-form-item label="鏌ヨ鏉′欢" label-width="70px" size="small">
+ <el-input v-model="inputVal" autocomplete="off" @change="handleQuery"></el-input>
+ </el-form-item>
+ </el-form>
+ <p class="text_tip">*閫夋嫨鍒嗙被杩涜灞炴�ц繃婊�, 鎴栬�呰緭鍏ュ睘鎬х殑鍏ㄦ嫾鎴栬�呯畝鎷艰繘琛屾煡璇�! 濡�: 濮撳悕 (鍙緭鍏m鎴杧inming )</p>
+ <transfer v-model="transferValue" :data="newdata" :filter-method="filterMethod"
+ :filter-placeholder="filterPlaceholder" :props="props"></transfer>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="visible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="handelTransferSave">淇� 瀛�</el-button>
+ </span>
+ </el-dialog>
+</template>
+<script>
+import transfer from '@/components/transfer/index'
+import pinyin from 'js-pinyin'
+export default {
+ components: {
+ transfer
+ },
+ name: 'Integration',
+ props: {
+ // 鏄惁鎵撳紑
+ visible: {
+ typeof: Boolean,
+ default: false
+ },
+ title: {
+ typeof: String,
+ default: '缂栫爜灞炴��'
+ },
+ // 鏁版嵁婧�
+ data: {
+ typeof: Array,
+ default: () => []
+ },
+ // 鏁版嵁榛樿鍊煎緱props
+ props: {
+ typeof: Object,
+ default: () => {
+ return {
+ label: 'label',
+ key: 'key',
+ disabled: 'disabled'
+ };
+ }
+ },
+ // 鏌ヨ鏂囨湰妗嗙殑placeholder
+ filterPlaceholder: {
+ typeof: String,
+ default: '璇疯緭鍏ユ嫾闊冲叏鎷兼垨鑰呮嫾闊崇缉鍐�'
+ }
+ },
+ data() {
+ return {
+ inputVal: '',
+ transferValue: this.value,
+ dialogVisible: this.visible,
+ }
+ },
+ watch: {
+ visible(n) {
+ this.dialogVisible = n;
+ },
+ dialogVisible(n) {
+ this.$emit('update:visible', n)
+ },
+ },
+ computed: {
+ newdata() {
+ pinyin.setOptions({ checkPolyphone: false, charCase: 1 });
+ let name = this.props.label
+ let key = this.props.key
+ let objs = this.data.map(item => {
+ let pinYin = pinyin.getFullChars(item[this.props.label])
+ let renPing = pinyin.getCamelChars(item[this.props.label])
+ const obj = { pinyins: pinYin, renPing: renPing, disabled: false, [name]: item[this.props.label], [key]: item[this.props.key] }
+ return obj
+ })
+ console.log(objs)
+ return objs
+ }
+ },
+ methods: {
+ // 鏂板寮圭獥鏌ヨ鎸夐挳
+ handleQuery(event) {
+ this.inputVal = event
+ },
+ // 绌挎妗嗘煡璇㈡暟鎹繃婊わ紙鍙屾潯浠讹級
+ filterMethod(query, item) {
+ return item.pinyins.indexOf(this.inputVal) > -1 || item.renPing.indexOf(this.inputVal) > -1
+ },
+ // 鍏抽棴娓呴櫎鎵�鏈夋暟鎹�
+ handelClose() {
+ this.transferValue = []
+ this.inputVal = ''
+ this.visible = false
+ },
+ // 纭畾鎸夐挳锛岃繑鍥炲綋鍓嶆暟鎹拰淇敼鍚庣殑鏁版嵁
+ handelTransferSave() {
+ let that =this
+ let datas= that.newdata
+ const findtra = datas.findIndex(item => item.oid === that.transferValue[0].oid)
+ datas[findtra].disabled = true
+ const obj = {
+ // 褰撳墠閫夋嫨鐨勬暟鎹�
+ value: this.transferValue,
+ // 鎬绘暟鎹�
+ data: datas
+ }
+ that.$emit('save', obj)
+ that.transferValue = []
+ that.inputVal = ''
+ },
+ }
+}
+
+</script>
+<style lang="scss" scoped>
+.text_tip {
+ padding: 10px 0;
+ color: #F56C6C;
+}
+</style>
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue
index 476fe62..7b12feb 100644
--- a/Source/UBCS-WEB/src/views/modeling/Business.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -27,30 +27,30 @@
<basic-container>
<p style="margin-top: 10px;font-weight: 570;font-size: 19px">鍩烘湰淇℃伅</p>
<el-descriptions class="margin-top" :column="3" :size="size" border>
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-finished"></i>
+ <i :class="icons.key"></i>
鑻辨枃鍚嶇О
</template>
{{ obj.id }}
</el-descriptions-item>
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-info"></i>
+ <i :class="icons.name"></i>
涓枃鍚嶇О
</template>
{{ obj.name }}
</el-descriptions-item>
<el-descriptions-item>
- <template slot="label">
- <i class="el-icon-date"></i>
+ <template slot="label" :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
+ <i :class="icons.tableName"></i>
鏁版嵁搴撹〃鍚�
</template>
{{ obj.tableName }}
</el-descriptions-item>
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-folder-opened"></i>
+ <i :class="icons.domain"></i>
鎵�灞為鍩�
</template>
<el-tag size="small">
@@ -71,23 +71,23 @@
</template>
{{ obj.sss }}
</el-descriptions-item> -->
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-s-check"></i>
+ <i :class="icons.revisionRule"></i>
鐗堟湰瑙勫垯
</template>
{{ obj.versionRule }}
</el-descriptions-item>
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-refresh-right"></i>
+ <i :class="icons.lifeCycle"></i>
鐢熷懡鍛ㄦ湡
</template>
{{ obj.lifeCycleId }}
</el-descriptions-item>
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-view"></i>
+ <i :class="icons.view"></i>
瑙嗗浘
</template>
<el-tag size="small">
@@ -101,9 +101,9 @@
</template>
{{ obj.implClass }}
</el-descriptions-item> -->
- <el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-chat-line-square"></i>
+ <i :class="icons.desc"></i>
鎻忚堪
</template>
{{ obj.description }}
@@ -114,8 +114,8 @@
<basic-container>
<p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p>
<avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption">
- <template slot="attrDataType" slot-scope="{row}" >
- <el-tag>{{row.attrDataType}}</el-tag>
+ <template slot="attrDataTypeText" slot-scope="{row}" >
+ <el-tag>{{row.attrDataTypeText}}</el-tag>
</template>
</avue-crud>
</basic-container>
@@ -167,7 +167,7 @@
addBtn: false,
props: {
labelText: '',
- label: 'name',
+ label: 'label',
value: 'oid',
children: 'childList',
}
@@ -196,7 +196,7 @@
},
{
label: "绫诲瀷",
- prop: "attrDataType",
+ prop: "attrDataTypeText",
align: 'center',
slot: true
},
@@ -212,11 +212,15 @@
}
]
},
+ descriptionOption: {
+ labelStyle:'text-align:center;width:120px',
+ contentStyle: 'width:240px;text-align:center;word-break;break-all;'
+ },
domain: null,
domainOptions: [],
icons:{
key: 'el-icon-finished',
- name: 'el-icon-info',
+ name: 'el-icon-tickets',
tableName: 'el-icon-date',
domain: 'el-icon-folder-opened',
revisionRule: 'el-icon-s-check',
diff --git a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
index bb1501a..d61723b 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -7,9 +7,8 @@
width="70%"
style="height: 115vh;"
>
- <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm">
-
- <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" required="true">
+ <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm" :rules="rules" @resetFields="resetForm" status-icon="true">
+ <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" required="true" prop="id">
<el-input v-model="btmType.id" :prefix-icon="icons.key"></el-input>
</el-form-item>
<el-form-item label="涓枃鍚嶇О" label-width="100px">
@@ -18,7 +17,7 @@
<el-form-item label="鏁版嵁搴撹〃鍚�" label-width="100px">
<el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input>
</el-form-item>
- <el-form-item label="鎵�灞為鍩�" label-width="100px">
+ <el-form-item label="鎵�灞為鍩�" label-width="100px" prop="domain">
<el-select v-model="btmType.domain" :prefix-icon="icons.domain">
<el-option v-for="item in domainOption"
:label="item.label" :value="item.value" :key="item.value"></el-option>
@@ -85,8 +84,8 @@
@on-load="attrRefOnLoad"
@search-change="attrRefSearch"
@selection-change="selectionChange">
- <template slot="name" slot-scope="scope" >
- <el-tag>{{scope}}</el-tag>
+ <template slot="typeValue" slot-scope="scope" >
+ <el-tag>{{scope.row.typeValue}}</el-tag>
</template>
</avue-crud>
<div slot="footer" class="dialog-footer">
@@ -207,19 +206,20 @@
column: [
{
label: '鑻辨枃鍚嶇О',
- prop: 'key',
+ prop: 'id',
align: 'left',
search: true,
width: 230
}, {
label: '涓枃鍚嶇О',
- prop: 'label',
+ prop: 'name',
align: 'center',
},
{
label: "绫诲瀷",
prop: "typeValue",
- align: 'center'
+ align: 'center',
+ slot: true,
},
{
label: "榛樿鍊�",
@@ -315,6 +315,16 @@
]
},
},
+ rules: {
+ id: [
+ { required: true, message: '璇疯緭鍏ヤ笟鍔$被鍨嬬紪鍙�', trigger: 'blur' },
+ { pattern: /^[A-Za-z]+$/, message: '涓氬姟绫诲瀷缂栧彿鍙兘涓鸿嫳鏂�', trigger: 'blur' },
+ { min: 2, max: 15, message: '闀垮害鍦�2鍒�15涓瓧绗�', trigger: 'blur' }
+ ],
+ domain: [
+ { required: true, message: '璇烽�夋嫨鎵�灞為鍩�', trigger: 'blur' }
+ ]
+ },
}
},
created() {
@@ -328,6 +338,7 @@
this.btmType = {};
this.attrRef.selectData = [];
this.attrRef.queryNotIn = null;
+ this.resetForm();
},
// 鍏抽棴灞炴�ф睜鏌ヨ寮圭獥
closeAttrDialog(){
@@ -370,7 +381,7 @@
name: item.name,
typeValue: item.typeValue,
typeKey: item.typeValue,
- attrDataType : item.typeValue,
+ attrDataType : item.typeKey,
defaultValue: item.defaultValue,
description: item.description,
attributeLength: item.maxLength
@@ -465,6 +476,10 @@
this.$delete(this.btmType,'revisionRuleId');
this.$delete(this.btmType,'revisionRuleName');
this.$delete(this.btmType,'inputRevisionFlag');
+ },
+ resetForm(){
+ this.btmType = {};
+ this.$refs.form.resetFields();
}
}
}
diff --git a/Source/UBCS-WEB/src/views/modeling/LinkType.vue b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
index 18e6791..eec03bf 100644
--- a/Source/UBCS-WEB/src/views/modeling/LinkType.vue
+++ b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
@@ -2,21 +2,17 @@
<el-container>
<!-- 椤剁鎸夐挳 -->
<el-header class="businessHeader" style="height: 40px;">
- <el-button-group>
- <el-button type="primary" @click="linkTypeAdd" size="small">
- <i class="el-icon-plus"></i>
- 鏂板
- </el-button>
- <el-button type="primary" @click="linkTypeEdit" size="small">
- <i class="el-icon-edit"></i>
- 淇敼
- </el-button>
- <el-button type="primary" @click="selectFromTable" size="small">
- <i class="el-icon-thumb"></i>
- 浠庡凡鏈変腑鑾峰彇
- </el-button>
- </el-button-group>
- </el-header>
+ <el-button-group>
+ <el-button type="primary" @click="linkTypeAdd" size="small">
+ <i class="el-icon-plus"></i>
+ 鏂板
+ </el-button>
+ <el-button type="primary" @click="linkTypeEdit" size="small">
+ <i class="el-icon-edit"></i>
+ 淇敼
+ </el-button>
+ </el-button-group>
+ </el-header>
<!-- 渚ц竟鏍忔爲 -->
<el-container>
<el-aside width="240px">
@@ -38,34 +34,34 @@
<basic-container>
<p style="margin-top: 10px;font-weight: 570;font-size: 19px">鍩烘湰淇℃伅</p>
<el-descriptions class="margin-top" :column="2" size="medium" border>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-finished"></i>
+ <i :class="icons.id"></i>
鑻辨枃鍚嶇О
</template>
{{ obj.id }}
</el-descriptions-item>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-info"></i>
+ <i :class="icons.name"></i>
涓枃鍚嶇О
</template>
{{ obj.name }}
</el-descriptions-item>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-date"></i>
+ <i :class="icons.tableName"></i>
鏁版嵁搴撹〃鍚�
</template>
{{ obj.tableName }}
</el-descriptions-item>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-folder-opened"></i>
+ <i :class="icons.domain"></i>
鎵�灞為鍩�
</template>
<el-tag size="small">
@@ -74,71 +70,75 @@
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" direction="vertical" :column="2" border>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-sort-down"></i>
+ <i :class="icons.from"></i>
From绔被鍨�
</template>
<span v-for="item in obj.fromBtmTypes" style="margin-left:2px;">
- <el-tag size="small" effect="plain" style="width:130px;margin-top: 2px;">
+ <el-tag size="small" effect="plain" style="margin-top: 2px;">
{{ item.id + '锛�' + item.name + '锛�' }}
</el-tag>
</span>
</el-descriptions-item>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-sort-up"></i>
+ <i :class="icons.to"></i>
To娈电被鍨�
</template>
- <span v-for="item in obj.toBtmTypes" style="height:26px;width:140px;margin-left:2px">
- <el-tag size="small" effect="plain" style="width:130px;margin-top: 2px;">
+ <span v-for="item in obj.toBtmTypes" style="margin-left:2px">
+ <el-tag size="small" effect="plain" style="margin-top: 2px;">
{{ item.id + '锛�' + item.name + '锛�' }}
</el-tag>
</span>
</el-descriptions-item>
</el-descriptions>
- <el-descriptions class="margin-top" :column="2" size="medium" border>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions class="margin-top" :column="2" size="medium" border>
+ <!--
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-info"></i>
+ <i :class="icons.main"></i>
涓荤被鍨�
</template>
{{ obj.fromBtmTypeName }}
</el-descriptions-item>
- <el-descriptions-item labelStyle="text-align:center;width:120px"
- contentStyle="width:240px;text-align:center;word-break;break-all;">
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
<template slot="label">
- <i class="el-icon-info"></i>
+ <i :class="icons.main"></i>
涓荤被鍨�
</template>
{{ obj.toBtmTypeName }}
</el-descriptions-item>
+ -->
<el-descriptions-item span='2' labelStyle="text-align:center;width:120px">
<template slot="label">
- <i class="el-icon-chat-line-square"></i>
+ <i :class="icons.desc"></i>
鎻忚堪
</template>
{{ obj.description }}
</el-descriptions-item>
- </el-descriptions>
+ </el-descriptions>
</basic-container>
<!-- 灞炴�у垪琛�-->
<basic-container>
<p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p>
<avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption">
- <template slot="attrDataType" slot-scope="{row}">
- <el-tag>{{ row.attrDataType }}</el-tag>
+ <template slot="attrDataTypeText" slot-scope="{row}">
+ <el-tag>{{ row.attrDataTypeText }}</el-tag>
</template>
</avue-crud>
</basic-container>
</el-main>
</el-container>
</el-container>
-
+ <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons"
+ @refreshTable="initTreeOnLoad">
+ </link-type-add>
</el-container>
</template>
@@ -155,10 +155,26 @@
name: "LinkType",
data() {
return {
- treeData: [
- { id: "1", name: "2", label: "label" },
- { id: "a", name: "b", label: "c" }
- ],
+ addOption: {
+ linkType: {},
+ },
+ domain: null,
+ domainOptions: [],
+ icons: {
+ id: 'el-icon-finished',
+ name: 'el-icon-tickets',
+ tableName: 'el-icon-date',
+ domain: 'el-icon-folder-opened',
+ from: 'el-icon-sort-down',
+ to: 'el-icon-sort-up',
+ main: 'el-icon-warning-outline',
+ desc: 'el-icon-chat-line-square'
+ },
+ treeData: [],
+ descriptionOption: {
+ labelStyle: 'text-align:center;width:120px',
+ contentStyle: 'width:240px;text-align:center;word-break;break-all;'
+ },
loadOption: {
border: true,
height: 360,
@@ -180,7 +196,7 @@
},
{
label: '绫诲瀷',
- prop: 'attrDataType',
+ prop: 'attrDataTypeText',
align: 'center',
slot: true
},
@@ -196,27 +212,14 @@
}
]
},
- obj: {
- id: 'linkType',
- name: '閾炬帴绫诲瀷',
- tableName: 'PLLT_OMD_LINKTYPE',
- domain: 'ubcs-omd',
- domainText: '瀵硅薄寤烘ā',
- fromBtmTypes: [
- { id: 'btm', name: '涓氬姟绫诲瀷' },
- { id: 'btm2', name: '涓氬姟绫诲瀷2' }
- ],
- toBtmTypes: [{ id: 'btm', name: '涓氬姟绫诲瀷' }, { id: 'btm2', name: '涓氬姟绫诲瀷2' }],
- fromBtmTypeName: '',
- toBtmTypeName: '',
- },
+ obj: {},
treeOption: {
defaultExpandAll: true,
title: '閾炬帴绫诲瀷鏍�',
addBtn: false,
props: {
labelText: '',
- label: 'name',
+ label: 'label',
value: 'oid',
children: 'childList',
}
@@ -225,31 +228,42 @@
},
created() {
this.initTreeOnLoad();
- // this.initDomainOption();
+ this.initDomainOption();
},
methods: {
// 鏍戠偣鍑�
nodeClick(data) {
- console.log(data);
+ getDetail(data.oid).then(res => {
+ this.obj = res.data.data;
+ })
},
// 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢
linkTypeAdd() {
-
+ this.$refs.linkAdd.showSubmitDialog = true;
},
// 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
linkTypeEdit() {
-
+ this.addOption.linkType = this.obj;
+ this.$refs.linkAdd.linkType = this.addOption.linkType;
+ this.$refs.linkAdd.showSubmitDialog = true;
},
// 浠庡凡鏈変腑鑾峰彇鎸夐挳鐐瑰嚮浜嬩欢
selectFromTable() {
},
+ // 鍔犺浇鏈嶅姟鏍�
initTreeOnLoad() {
initTree().then(res => {
this.treeData = res.data.data;
});
- }
+ },
+ // 鍔犺浇鏈嶅姟涓嬫媺妗�
+ initDomainOption() {
+ getDomain().then(res => {
+ this.domainOptions = res.data.data;
+ })
+ },
}
}
diff --git a/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue b/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
new file mode 100644
index 0000000..8c7753a
--- /dev/null
+++ b/Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
@@ -0,0 +1,388 @@
+<template>
+ <el-dialog title="閾炬帴绫诲瀷" :visible.sync="showSubmitDialog" append-to-body @close="closeSubmitDialog" width="70%"
+ style="height: 115vh;">
+ <el-form ref="form" :model="linkType" show-message="true" inline size="medium" label-suffix=":"
+ class="linkTypeForm" :rules="rules" @resetFields="resetForm" status-icon="true">
+ <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" required="true" prop="id">
+ <el-input v-model="linkType.id" :prefix-icon="icons.id" maxlength="15" show-word-limit type="text"></el-input>
+ </el-form-item>
+ <el-form-item label="涓枃鍚嶇О" label-width="100px">
+ <el-input v-model="linkType.name" :prefix-icon="icons.name"></el-input>
+ </el-form-item>
+ <el-form-item label="鏁版嵁搴撹〃鍚�" label-width="100px">
+ <el-input v-model="linkType.tableName" :prefix-icon="icons.tableName"></el-input>
+ </el-form-item>
+ <el-form-item label="鎵�灞為鍩�" label-width="100px" prop="domain">
+ <el-select v-model="linkType.domain" :prefix-icon="icons.domain">
+ <el-option v-for="item in domainOption" :label="item.label" :value="item.value"
+ :key="item.value"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="From绔被鍨�" label-width="100px">
+ <!-- from绔笟鍔$被鍨嬮�夋嫨 -->
+ <el-select v-model="fromBtmValues" :value="fromBtmTypes" value-key="oid" placeholder="璇烽�夋嫨From绔被鍨�" filterable multiple collapse-tags @change="fromSelectChange">
+ <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name">
+ <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name"
+ :value="item">
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="To绔被鍨�" label-width="100px">
+ <!-- to绔笟鍔$被鍨嬮�夋嫨 -->
+ <el-select v-model="toBtmValues" :value="toBtmTypes" value-key="oid" placeholder="璇烽�夋嫨To绔被鍨�" filterable multiple collapse-tags @change="toSelectChange">
+ <el-option-group v-for="domain in domainList" :key="domain.id" :label="domain.name">
+ <el-option v-for="item in domain.childList" :key="item.oid" :label="item.id + item.name"
+ :value="item">
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎻忚堪" label-width="100px" class="description">
+ <el-input v-model="linkType.description" :prefix-icon="icons.desc" class="descClass" id="descId"></el-input>
+ </el-form-item>
+ </el-form>
+ <avue-crud :option="option" :data="linkType.attributes" :page.sync="page" ref="attrTable"
+ @cell-mouse-enter="cellEditClick" @cell-mouse-leave="cellEditSave">
+ <template slot-scope="scope" slot="menuLeft">
+ <el-button type="danger" icon="el-icon-plus" size="small" @click="rowAdd()">灞炴�ч�夋嫨</el-button>
+ </template>
+
+ </avue-crud>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitlinkType">纭畾</el-button>
+ <el-button @click="cancleSubmitlinkType">鍙栨秷</el-button>
+ </div>
+
+ <!-- 灞炴�ф睜鐨勯�夋嫨 -->
+ <el-dialog title="灞炴�ф睜" :visible="attrRef.visible" append-to-body @close="closeAttrDialog" width="80%">
+ <avue-crud class="attrRef" :option="attrRef.option" :data="attrRef.data" :page.sync="attrRef.page" ref="attrRef"
+ @on-load="attrRefOnLoad" @search-change="attrRefSearch" @selection-change="selectionChange">
+ <template slot="typeValue" slot-scope="scope">
+ <el-tag>{{ scope.row.typeValue }}</el-tag>
+ </template>
+ </avue-crud>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="confirmSelectAttr">纭畾</el-button>
+ <el-button @click="cancleSelectAttr">鍙栨秷</el-button>
+ </div>
+ </el-dialog>
+
+ </el-dialog>
+</template>
+
+
+<script>
+
+import { add, update } from '@/api/omd/linkType';
+import { queryPage } from '@/api/omd/OmdAttribute';
+import { getPage } from '@/api/omd/revisionRule';
+import { initTree } from "@/api/omd/btmType"
+export default {
+ name: 'LinkTypeAdd',
+ props: {
+ linkType: {
+ type: Object
+ },
+ domainOption: {
+ type: Array
+ },
+ icons: {
+ type: Array
+ }
+ },
+ data() {
+ return {
+ form: {},
+ showSubmitDialog: false,
+ option: {
+ height: "330px",
+ selection: true,
+ headerAlign: 'center',
+ border: true,
+ index: true,
+ rowKey: 'id',
+ tabs: true,
+ menu: false,
+ addBtn: false,
+ highlightCurrentRow: true,
+ column: [
+ {
+ label: '鑻辨枃鍚嶇О',
+ prop: 'id',
+ align: 'center'
+ }, {
+ label: '涓枃鍚嶇О',
+ prop: 'name',
+ align: 'center',
+ cell: true
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'attrDataType',
+ align: 'center',
+ slot: true
+ },
+ {
+ label: '榛樿鍊�',
+ prop: 'defaultValue',
+ align: 'center',
+ cell: true
+ },
+ {
+ label: '璇存槑',
+ prop: 'description',
+ align: 'center',
+ cell: true
+ }
+ ]
+ },
+ attrRef: {
+ visible: false,
+ page: {
+ currentPage: 1,
+ pageSize: 10,
+ },
+ key: null,
+ option: {
+ height: 360,
+ addBtn: false,
+ refreshBtn: false,
+ columnBtn: false,
+ selection: true,
+ menu: false,
+ border: true,
+ reserveSelection: true,
+ searchMenuSpan: 8,
+ highlightCurrentRow: true,
+ column: [
+ {
+ label: '鑻辨枃鍚嶇О',
+ prop: 'id',
+ align: 'left',
+ search: true,
+ width: 230
+ }, {
+ label: '涓枃鍚嶇О',
+ prop: 'name',
+ align: 'center',
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'typeValue',
+ align: 'center'
+ },
+ {
+ label: '榛樿鍊�',
+ prop: 'defaultValue',
+ align: 'center'
+ },
+ {
+ label: '鍏佽涓虹┖',
+ prop: 'nullable',
+ type: 'switch',
+ display: false,
+ hide: true,
+ labelWidth: 132,
+ dicData: [{
+ label: '鍚�',
+ value: 1
+ }, {
+ label: '鏄�',
+ value: 0
+ }]
+ },
+ {
+ label: '璇存槑',
+ prop: 'description',
+ cell: true,
+ align: 'center'
+ }
+ ]
+ },
+ data: [],
+ queryNotIn: null
+ },
+ fromBtmValues: [],
+ toBtmValues: [],
+ domainList: [],
+ rules: {
+ id: [
+ { required: true, message: '璇疯緭鍏ラ摼鎺ョ被鍨嬬紪鍙�', trigger: 'blur' },
+ { pattern: /^[A-Za-z]+$/, message: '閾炬帴绫诲瀷缂栧彿鍙兘涓鸿嫳鏂�', trigger: 'blur' },
+ { min: 2, max: 15, message: '闀垮害鍦�2鍒�15涓瓧绗�', trigger: 'blur' }
+ ],
+ domain: [
+ { required: true, message: '璇烽�夋嫨鎵�灞為鍩�', trigger: 'blur' }
+ ]
+ },
+ }
+ },
+ created() {
+ this.initTreeOnLoad();
+ },
+ methods: {
+ // 鍏抽棴缁勪欢寮圭獥
+ closeSubmitDialog() {
+ this.showSubmitDialog = false;
+ this.linkType.attributes = [];
+ this.linkType = {};
+ this.attrRef.selectData = [];
+ this.attrRef.queryNotIn = null;
+ this.resetForm();
+ },
+ // 鍏抽棴灞炴�ф睜鏌ヨ寮圭獥
+ closeAttrDialog() {
+ this.attrRef.visible = false;
+ },
+ initTreeOnLoad() {
+ initTree().then(res => {
+ this.domainList = res.data.data;
+ });
+ },
+ // 娣诲姞
+ rowAdd() {
+ this.attrRef.visible = true;
+ this.attrRefOnLoad();
+ },
+ // 灞炴�ф睜鍔犺浇
+ attrRefOnLoad() {
+ queryPage(this.attrRef.key, this.attrRef.queryNotIn, this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => {
+ const data = res.data.data;
+ this.attrRef.page.total = data.total;
+ this.attrRef.data = data.records;
+ });
+ this.$nextTick(() => {
+ this.$refs.attrRef.refreshTable();
+ });
+ },
+ // 灞炴�ф睜妫�绱�
+ attrRefSearch(form, done) {
+ this.attrRef.key = form.key
+ this.attrRefOnLoad();
+ done();
+ this.attrRef.key = null;
+ },
+ // 灞炴�ф睜鍕鹃�変簨浠�
+ selectionChange(list) {
+ this.attrRef.selectData = list;
+ },
+ // 纭灞炴�ф睜鍕鹃��
+ confirmSelectAttr() {
+ if(!this.linkType.attributes){
+ this.linkType.attributes = [];
+ }
+ this.attrRef.queryNotIn = "";
+ console.log(this.attrRef.selectData);
+ this.attrRef.selectData.forEach(item => {
+ this.linkType.attributes.push({
+ id: item.id,
+ name: item.name,
+ typeValue: item.typeValue,
+ typeKey: item.typeValue,
+ attrDataType: item.typeKey,
+ defaultValue: item.defaultValue,
+ description: item.description,
+ attributeLength: item.maxLength
+ });
+ this.attrRef.queryNotIn += (item.id + ",")
+ });
+ this.closeAttrDialog();
+ },
+ // 鍙栨秷灞炴�ф睜鍕鹃��
+ cancleSelectAttr() {
+ this.attrRef.selectData = [];
+ this.closeAttrDialog();
+ },
+ // 娣诲姞涓氬姟绫诲瀷
+ submitlinkType() {
+ add(this.linkType, true).then(res => {
+ // 娣诲姞瀹屾垚锛屽洖璋冪埗缁勪欢鐨勫埛鏂�
+ this.$message.success('淇濆瓨鎴愬姛');
+ this.cancleSubmitlinkType();
+ this.$emit('refreshTable');
+ })
+ },
+ // 鍙栨秷娣诲姞涓氬姟绫诲瀷
+ cancleSubmitlinkType() {
+ this.linkType = {};
+ this.linkType.attributes = [];
+ this.showSubmitDialog = false;
+ },
+ // 鍒锋柊灞炴�у垪琛�
+ refreshAttrTable() {
+ this.$nextTick(() => {
+ this.$refs.attrTable.refreshTable();
+ })
+ },
+ //
+ viewChange() {
+
+ },
+ // 鍒楄〃缂栬緫
+ cellEditClick(cell) {
+ cell.$cellEdit = true;
+ },
+ // 鍒楄〃缂栬緫淇濆瓨
+ cellEditSave(row) {
+ this.linkType.attributes[row.$index].name = row.name
+ this.linkType.attributes[row.$index].defaultValue = row.defaultValue;
+ this.linkType.attributes[row.$index].description = row.description;
+ row.$cellEdit = false;
+ },
+ fromSelectChange(dataList){
+ this.linkType.fromBtmTypes = [];
+ var fromBtmName = "";
+ var fromBtmType = "";
+ dataList.forEach(data => {
+ //this.linkType.fromBtmTypes.push(data);
+ fromBtmName += (data.name + ',');
+ fromBtmType += (data.id + ',');
+ })
+ this.linkType.fromBtmTypeName = fromBtmName;
+ this.linkType.fromBtmType = fromBtmType;
+ },
+ toSelectChange(dataList){
+ console.log(dataList);
+ this.linkType.toBtmTypes = [];
+ var toBtmName = "";
+ var toBtmType = "";
+ dataList.forEach(data => {
+ //this.linkType.toBtmTypes.push(data);
+ toBtmName += (data.name + ',');
+ toBtmType += (data.id + ',');
+ })
+ this.linkType.toBtmTypeName = toBtmName;
+ this.linkType.toBtmType = toBtmType;
+ console.log(this.linkType);
+ },
+ resetForm(){
+ this.linkType = {};
+ this.$refs.form.resetFields();
+ }
+ }
+}
+</script>
+
+<style>
+/* 灞炴�ф睜鍙傜収鍒楄〃 */
+.attrRef>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
+ display: none !important;
+}
+
+.revisionRef>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
+ display: none !important;
+}
+
+.linkTypeForm>.el-form-item>.el-form-item__content>.el-input>.el-input__inner {
+ width: 200px;
+}
+
+.descClass>.el-input__inner {
+ width: 57vw
+}
+
+#descId {
+ width: 57vw;
+}
+</style>
diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js
index 7543090..a5813f9 100644
--- a/Source/UBCS-WEB/vue.config.js
+++ b/Source/UBCS-WEB/vue.config.js
@@ -26,11 +26,11 @@
proxy: {
'/api': {
//鏈湴鏈嶅姟鎺ュ彛鍦板潃
- target: 'http://localhost:37000',
+ // target: 'http://localhost:37000',
// target: 'http://192.168.1.63:37000',
//target: 'http://192.168.3.7:37000',
- //target: 'http://dev.vci-tech.com:37000',
- //target: 'http://192.168.1.51:37000/',
+ target: 'http://dev.vci-tech.com:37000',
+ // target: 'http://192.168.1.51:37000/',
//杩滅▼婕旂ず鏈嶅姟鍦板潃,鍙敤浜庣洿鎺ュ惎鍔ㄩ」鐩�
// target: 'https://saber.bladex.vip/api',
ws: true,
diff --git a/Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java b/Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java
index 101f07f..3de4dc4 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-ddl-api/src/main/java/com/vci/ubcs/ddl/bo/DdlFieldMappingAttrBO.java
@@ -18,7 +18,8 @@
/**
* 绫诲瀷
*/
- private final String dataType;
+ @Setter
+ private String dataType;
/**
* 闀垮害
@@ -44,6 +45,8 @@
@Setter
private String defaultValue;
+ public DdlFieldMappingAttrBO() {
+ }
public DdlFieldMappingAttrBO(String dataType, Integer dataLength, Integer dataPrecision, Boolean nullable, String defaultValue) {
this.dataType = dataType;
diff --git a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/LinkTypeAttribute.java b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/LinkTypeAttribute.java
index 785b2f9..339579a 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/LinkTypeAttribute.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/entity/LinkTypeAttribute.java
@@ -15,7 +15,7 @@
* @date 2023/5/24
*/
@Data
-@TableName("pl_omd_link_type_attr")
+@TableName("pl_omd_link_type_attribute")
@ApiModel(value = "閾炬帴绫诲瀷鍖呭惈鐨勫睘鎬�", description = "閾炬帴绫诲瀷鍖呭惈鐨勫睘鎬�")
public class LinkTypeAttribute implements java.io.Serializable{
diff --git a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java
index 7e45251..ec137bf 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java
@@ -19,9 +19,11 @@
*/
private static final long serialVersionUID = -1243940048761060562L;
+ private String id;
+
private String name;
- private String id;
+ private String label;
private String oid;
diff --git a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeAttributeVO.java b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeAttributeVO.java
index f922f9c..0918d7e 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeAttributeVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeAttributeVO.java
@@ -1,5 +1,7 @@
package com.vci.ubcs.omd.vo;
+import lombok.Data;
+
import java.util.Date;
import java.util.Map;
@@ -8,6 +10,7 @@
* @author LiHang
* @date 2023/4/3
*/
+@Data
public class LinkTypeAttributeVO implements java.io.Serializable{
/**
@@ -24,6 +27,11 @@
* 鎵�灞炰笟鍔$被鍨�
*/
private String pkLinkType;
+
+ /**
+ * 閾炬帴绫诲瀷鐨勭紪鍙�
+ */
+ private String linkTypeId;
/**
* 灞炴�х殑瀛楁鍚嶇О
@@ -49,6 +57,11 @@
* 鏁版嵁绫诲瀷
*/
private String attrDataType;
+
+ /**
+ * 鏁版嵁绫诲瀷鏄剧ず瀵硅薄
+ */
+ private String attrDataTypeText;
/**
* 鏄惁鍙互涓虹┖
@@ -144,247 +157,4 @@
* 鏃堕棿鎴筹紝鏍煎紡鏄痽yyy-MM-dd HH:mm:ss.SSS
*/
private Date ts;
-
- public String getBtmName() {
- return btmName;
- }
-
- public void setBtmName(String btmName) {
- this.btmName = btmName;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public void setOwner(String owner) {
- this.owner = owner;
- }
-
- public void setOid(String oid) {
- this.oid = oid;
- }
-
- public void setPkLinkType(String pkLinkType) {
- this.pkLinkType = pkLinkType;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setAttrDataType(String attrDataType) {
- this.attrDataType = attrDataType;
- }
-
- public void setReferBtmTypeId(String referBtmTypeId) {
- this.referBtmTypeId = referBtmTypeId;
- }
-
- public void setReferBtmTypeName(String referBtmTypeName) {
- this.referBtmTypeName = referBtmTypeName;
- }
-
- public void setReferFlag(boolean referFlag) {
- this.referFlag = referFlag;
- }
-
- public void setEnumId(String enumId) {
- this.enumId = enumId;
- }
-
- public void setEnumName(String enumName) {
- this.enumName = enumName;
- }
-
- public void setEnumFlag(boolean enumFlag) {
- this.enumFlag = enumFlag;
- }
-
- public void setEnumItemMap(Map<String, String> enumItemMap) {
- this.enumItemMap = enumItemMap;
- }
-
- public void setCreator(String creator) {
- this.creator = creator;
- }
-
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
-
- public void setLastModifier(String lastModifier) {
- this.lastModifier = lastModifier;
- }
-
- public void setLastModifyTime(Date lastModifyTime) {
- this.lastModifyTime = lastModifyTime;
- }
-
- public void setTs(Date ts) {
- this.ts = ts;
- }
-
- public void setNullableFlag(boolean nullableFlag) {
- this.nullableFlag = nullableFlag;
- }
-
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- public void setPrecisionLength(Integer precisionLength) {
- this.precisionLength = precisionLength;
- }
-
-
- public String getOid() {
- return oid;
- }
-
- public String getPkLinkType() {
- return pkLinkType;
- }
-
-
- public String getDescription() {
- return description;
- }
-
- public String getAttrDataType() {
- return attrDataType;
- }
-
- public String getReferBtmTypeId() {
- return referBtmTypeId;
- }
-
- public String getReferBtmTypeName() {
- return referBtmTypeName;
- }
-
- public boolean isReferFlag() {
- return referFlag;
- }
-
- public String getEnumId() {
- return enumId;
- }
-
- public String getEnumName() {
- return enumName;
- }
-
- public boolean isEnumFlag() {
- return enumFlag;
- }
-
- public Map<String, String> getEnumItemMap() {
- return enumItemMap;
- }
-
- public String getCreator() {
- return creator;
- }
-
- public Date getCreateTime() {
- return createTime;
- }
-
- public String getLastModifier() {
- return lastModifier;
- }
-
- public Date getLastModifyTime() {
- return lastModifyTime;
- }
-
- public Date getTs() {
- return ts;
- }
-
- public boolean isNullableFlag() {
- return nullableFlag;
- }
-
- public String getDefaultValue() {
- return defaultValue;
- }
-
- public Integer getPrecisionLength() {
- return precisionLength;
- }
-
- public String getRange() {
- return range;
- }
-
- public void setRange(String range) {
- this.range = range;
- }
-
- public Integer getAttributeLength() {
- return attributeLength;
- }
-
- public void setAttributeLength(Integer attributeLength) {
- this.attributeLength = attributeLength;
- }
-
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Integer getScaleLength() {
- return scaleLength;
- }
-
- public void setScaleLength(Integer scaleLength) {
- this.scaleLength = scaleLength;
- }
-
- @Override
- public String toString() {
- return "OsLinkTypeAttributeVO{" +
- "oid='" + oid + '\'' +
- ", pkLinkType='" + pkLinkType + '\'' +
- ", id='" + id + '\'' +
- ", name='" + name + '\'' +
- ", description='" + description + '\'' +
- ", attributeLength=" + attributeLength +
- ", attrDataType='" + attrDataType + '\'' +
- ", nullableFlag=" + nullableFlag +
- ", defaultValue='" + defaultValue + '\'' +
- ", precisionLength=" + precisionLength +
- ", scaleLength=" + scaleLength +
- ", range='" + range + '\'' +
- ", referBtmTypeId='" + referBtmTypeId + '\'' +
- ", referBtmTypeName='" + referBtmTypeName + '\'' +
- ", referFlag=" + referFlag +
- ", enumId='" + enumId + '\'' +
- ", enumName='" + enumName + '\'' +
- ", enumFlag=" + enumFlag +
- ", enumItemMap=" + enumItemMap +
- ", btmname='" + btmName + '\'' +
- ", owner='" + owner + '\'' +
- ", creator='" + creator + '\'' +
- ", createTime=" + createTime +
- ", lastModifier='" + lastModifier + '\'' +
- ", lastModifyTime=" + lastModifyTime +
- ", ts=" + ts +
- '}';
- }
}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeVO.java b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeVO.java
index 423bac7..a47e1e1 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/LinkTypeVO.java
@@ -124,6 +124,11 @@
*/
private String domain;
+ /**
+ * 棰嗗煙鏄剧ず鍊�
+ */
+ private String domainText;
+
/**
* 鍖呭惈灞炴��
*/
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
index b8b06b3..2b2d1ea 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/IDdlService.java
@@ -36,13 +36,20 @@
void createDbTablesByOidCollection(Collection<String> oidCollection) throws VciBaseException;
/**
- * 鑾峰彇鍒涘缓鐨剆ql璇彞涓睘鎬ч儴鍒�
+ * 鑾峰彇鍒涘缓鐨剆ql璇彞涓睘鎬ч儴鍒� -- 涓氬姟绫诲瀷
* @param attributeVOList 灞炴�х殑绔嬬
* @return sql璇彞
*/
String getCreateSqlByAttributeForBtm(List<BtmTypeAttributeVO> attributeVOList);
/**
+ * 鑾峰彇鍒涘缓鐨剆ql璇彞涓睘鎬ч儴鍒� -- 閾炬帴绫诲瀷
+ * @param attributeVOList 灞炴�х殑绔嬬
+ * @return sql璇彞
+ */
+ String getCreateSqlByAttributeForLink(List<LinkTypeAttributeVO> attributeVOList);
+
+ /**
* 鎵归噺灏嗕笟鍔$被鍨嬪垱寤烘暟鎹簱琛�
* @param ids 涓氬姟绫诲瀷鐨勮嫳鏂囧悕绉�
* @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呭垱寤鸿〃鍑虹幇浜嗛敊璇殑鏃跺�欎細鎶涘嚭寮傚父
diff --git a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
index 3a8e185..cc39322 100644
--- a/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
@@ -185,6 +185,26 @@
}
/**
+ * 鍒涘缓閾炬帴绫诲瀷鐨勮〃鏍�
+ *
+ * @param linkTypeVO 閾炬帴绫诲瀷鐨勬樉绀哄璞�
+ * @throws VciBaseException 鎵ц鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
+ */
+ private void createDbTableForLink(LinkTypeVO linkTypeVO) throws VciBaseException {
+ VciBaseUtil.alertNotNull(linkTypeVO, "瑕佸垱寤鸿〃鏍兼墍灞炵殑涓氬姟绫诲瀷", linkTypeVO.getTableName(), "涓氬姟绫诲瀷鐨勮〃鏍煎悕绉�");
+ String tableName = linkTypeVO.getTableName();
+ if (!checkTableExistByTableName(tableName)) {
+ String attributeSql = getCreateSqlByAttributeForLink(linkTypeVO.getAttributes());
+ dllMapper.createTableBySql(tableName, attributeSql);
+ if (StringUtils.isNotBlank(linkTypeVO.getName())) {
+ dllMapper.commentTable(tableName, linkTypeVO.getName());
+ }
+ linkTypeVO.getAttributes().forEach(s -> {
+ dllMapper.commentColumnTable(tableName, s.getId(), s.getName());
+ });
+ }
+ }
+ /**
* 鑾峰彇鍒涘缓鐨剆ql璇彞涓睘鎬ч儴鍒�
*
* @param attributeVOList 灞炴�х殑绔嬬
@@ -196,7 +216,26 @@
attributeVOList.forEach(a -> {
sb.append(a.getId()).append(StringPool.SPACE);
VciFieldTypeEnum fieldTypeEnum = VciFieldTypeEnum.forValue(a.getAttrDataType());
- sb.append(dllMapper.getColumnTypeSql(fieldTypeEnum, a));
+ sb.append(dllMapper.getColumnTypeSql(fieldTypeEnum, a)).append(",");
+ });
+ return sb.substring(0, sb.lastIndexOf(","));
+ }
+
+ /**
+ * 鑾峰彇鍒涘缓鐨剆ql璇彞涓睘鎬ч儴鍒�
+ *
+ * @param attributeVOList 灞炴�х殑绔嬬
+ * @return sql璇彞
+ */
+ @Override
+ public String getCreateSqlByAttributeForLink(List<LinkTypeAttributeVO> attributeVOList) {
+ StringBuilder sb = new StringBuilder();
+ attributeVOList.forEach(a -> {
+ BtmTypeAttributeVO attributeVO = Optional.ofNullable(BeanUtil.copy(a, BtmTypeAttributeVO.class)).orElseGet(BtmTypeAttributeVO::new);
+ attributeVO.setPkBtmType(a.getPkLinkType());
+ sb.append(a.getId()).append(StringPool.SPACE);
+ VciFieldTypeEnum fieldTypeEnum = VciFieldTypeEnum.forValue(a.getAttrDataType());
+ sb.append(dllMapper.getColumnTypeSql(fieldTypeEnum, attributeVO)).append(",");
});
return sb.substring(0, sb.lastIndexOf(","));
}
@@ -210,19 +249,10 @@
@Override
public void createDbTablesById(String ids) throws VciBaseException {
VciBaseUtil.alertNotNull(ids, "涓氬姟绫诲瀷/閾炬帴绫诲瀷鐨勮嫳鏂囬泦鍚�");
- List<BtmTypeVO> btmTypeVOList = BtmTypeCache.selectByIdCollection(VciBaseUtil.str2List(ids));
-// List<OsLinkTypeVO> linkTypeVOList = linkTypeService.listLinkTypeByIdCollection(VciBaseUtil.str2List(ids));
- if (!CollectionUtils.isEmpty(btmTypeVOList)) {
- //璇存槑鏄笟鍔$被鍨�
- btmTypeVOList.forEach(this::createDbTableForBtm);
- }
- /*//璇曡瘯閾炬帴绫诲瀷
- if(!CollectionUtils.isEmpty(linkTypeVOList)){
- //鐨勭‘鏄摼鎺ョ被鍨�
- linkTypeVOList.stream().forEach( s -> {
- createDbTableForLink(s);
- });
- }*/
+ // 涓氬姟绫诲瀷
+ Func.toStrList(",",ids).stream().filter(idBtmMap::containsKey).map(idBtmMap::get).forEach(this::createDbTableForBtm);
+ // 閾炬帴绫诲瀷
+ Func.toStrList(",",ids).stream().filter(idLinkMap::containsKey).map(idLinkMap::get).forEach(this::createDbTableForLink);
}
/**
@@ -540,6 +570,7 @@
modifyAttributeInfo.setBeforeModifyAttributes(String.join(",", beforeList));
}
}
+ modifyAttributeInfoDOList.add(modifyAttributeInfo);
});
return modifyAttributeInfoDOList;
}
@@ -641,6 +672,7 @@
}
}
+ modifyAttributeInfoDOList.add(modifyAttributeInfo);
});
return modifyAttributeInfoDOList;
}
@@ -719,8 +751,8 @@
@Override
public void reflexDifferent(List<ModifyAttributeInfo> differentAttributeList, List<BtmTypeVO> btmTypeVOList, List<LinkTypeVO> linkTypeVOList) throws VciBaseException {
VciBaseUtil.alertNotNull(differentAttributeList, "瑕佹竻鐞嗙殑鏁版嵁搴撶殑淇℃伅涓虹┖");
- Map<String, BtmTypeVO> idBtmTypeMap = btmTypeVOList.stream().collect(Collectors.toMap(BtmTypeVO::getId, t -> t, (o1, o2) -> o1));
- Map<String, LinkTypeVO> idLinkTypeMap = linkTypeVOList.stream().collect(Collectors.toMap(LinkTypeVO::getId, t -> t, (o1, o2) -> o1));
+ Map<String, BtmTypeVO> idBtmTypeMap = Optional.ofNullable(btmTypeVOList).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(BtmTypeVO::getId, t -> t, (o1, o2) -> o1));
+ Map<String, LinkTypeVO> idLinkTypeMap = Optional.ofNullable(linkTypeVOList).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(LinkTypeVO::getId, t -> t, (o1, o2) -> o1));
differentAttributeList.forEach(s -> {
// BtmTypeVO btmType = idBtmTypeMap.get(id);
if (ModifyTableTaskEnum.CREATE.getValue().equalsIgnoreCase(s.getTaskName())) {
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LinkTypeController.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LinkTypeController.java
index 6d8170b..14c81d6 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LinkTypeController.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/LinkTypeController.java
@@ -3,11 +3,9 @@
import com.alibaba.cloud.commons.lang.StringUtils;
import com.alibaba.nacos.api.exception.NacosException;
import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.omd.constant.OmdCacheConstant;
-import com.vci.ubcs.omd.dto.LinkTypeDTO;
import com.vci.ubcs.omd.entity.LinkType;
import com.vci.ubcs.omd.repeater.DomainRepeater;
import com.vci.ubcs.omd.service.ILinkTypeService;
@@ -25,13 +23,11 @@
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.*;
-import java.util.stream.Collectors;
/**
* Description:閾炬帴绫诲瀷鎺у埗鍣�
@@ -79,7 +75,7 @@
@ApiOperationSupport(order = 2)
@ApiOperation(value = "鏌ヨ鍒楄〃", notes = "浼犲叆鏌ヨ")
public R<List<LinkTypeVO>> list(@ApiIgnore @RequestParam Map<String, Object> condition) {
- return R.data(LinkTypeWrapper.build().listEntityVO(linkTypeService.list(Condition.getQueryWrapper(condition, LinkType.class).lambda().orderByAsc(LinkType::getId))));
+ return R.data(LinkTypeWrapper.build().listEntityVO(linkTypeService.list(Condition.getQueryWrapper(condition, LinkType.class).lambda().orderByAsc(LinkType::getId)), null));
}
/**
@@ -100,7 +96,7 @@
IPage<LinkTypeVO> pageVO = new Page<>();
IPage<LinkType> page = linkTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, LinkType.class).lambda().orderByAsc(LinkType::getId));
BeanUtil.copy(page, pageVO);
- pageVO.setRecords(LinkTypeWrapper.build().listEntityVO(page.getRecords()));
+ pageVO.setRecords(LinkTypeWrapper.build().listEntityVO(page.getRecords(), null));
return R.data(pageVO);
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILinkTypeAttributeService.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILinkTypeAttributeService.java
index fb44a66..5929edb 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILinkTypeAttributeService.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/ILinkTypeAttributeService.java
@@ -1,10 +1,13 @@
package com.vci.ubcs.omd.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import com.vci.ubcs.omd.entity.LinkType;
import com.vci.ubcs.omd.entity.LinkTypeAttribute;
import com.vci.ubcs.omd.vo.LinkTypeAttributeVO;
+import com.vci.ubcs.omd.vo.LinkTypeVO;
import java.util.List;
+import java.util.Map;
/**
* Description: 閾炬帴绫诲瀷鍖呭惈灞炴�х殑鏈嶅姟鎺ュ彛
@@ -32,4 +35,32 @@
* @return 鏌ヨ缁撴灉
*/
LinkTypeAttribute selectByPrimaryKey(String oid);
+
+ /**
+ * 鏍规嵁閾炬帴绫诲瀷鑾峰彇榛樿瀛楁
+ * @param linkTypeVO 閾炬帴绫诲瀷
+ * @return 鎵ц缁撴灉
+ */
+ List<LinkTypeAttributeVO> getDefaultAttributes(LinkTypeVO linkTypeVO);
+
+ /**
+ * 鏍规嵁閾炬帴绫诲瀷鑾峰彇鎵�鏈夌殑瀛楁
+ * @param linkTypeVO 閾炬帴绫诲瀷
+ * @return 鎵ц缁撴灉
+ */
+ List<LinkTypeAttributeVO> getAllAttributes(LinkTypeVO linkTypeVO);
+
+ /**
+ * 鑾峰彇闈為粯璁ゅ瓧娈电殑閾炬帴绫诲瀷灞炴��
+ * @param linkTypeVO 閾炬帴绫诲瀷
+ * @return
+ */
+ List<LinkTypeAttributeVO> getAttributesNoDefault(LinkTypeVO linkTypeVO);
+
+ /**
+ * 鎵归噺鑾峰彇闈為粯璁ゅ瓧娈电殑閾炬帴绫诲瀷灞炴��
+ * @param linkTypeDOList 閾炬帴绫诲瀷
+ * @return 鎵ц缁撴灉
+ */
+ Map<String, List<LinkTypeAttributeVO>> batchGetAttributesNoDefault(List<LinkType> linkTypeDOList);
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
index 6742b49..af80c13 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -212,6 +212,8 @@
vo.setId(id);
vo.setName(name);
vo.setPkBtmType(btmType.getOid());
+ vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+ vo.setAttributeLength(150);
if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq","revisionvalue","versionvalue").contains(id)){
vo.setAttributeLength(5);
vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name());
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
index 2e7f48f..3444498 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
@@ -360,6 +360,7 @@
if (!existFieldMap.containsKey(k)){
BtmTypeLinkAttributesDTO attr = new BtmTypeLinkAttributesDTO();
attr.setId(k);
+ attr.setName(v);
attr.setAttrDataType(VciFieldTypeEnum.VTString.name());
attr.setAttributeLength(50);
attr.setNullableFlag(false);
@@ -507,10 +508,13 @@
afterAttributes = updateAttributeForBtm(btmTypeByOid.getOid(),beforeAttributes, attributes);
}
BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(btmTypeDO);
+ //鍦ㄥ垱寤鸿〃鐨勬椂鍊欒繕闇�瑕佹妸榛樿鐨勫瓧娈靛甫涓娿��
+ List<BtmTypeAttributeVO> defaultAttribute = btmTypeAttributeService.getDefaultAttribute(btmTypeVO);
+ afterAttributes.addAll(defaultAttribute);
btmTypeVO.setAttributes(afterAttributes);
try {
if (autoCreateTable) {
- checkTableSame(btmTypeVO);
+// checkTableSame(btmTypeVO);
R result = DomainRepeater.submitBtmType(btmTypeDTO.getDomain(), btmTypeVO);
if (result.isSuccess()){
List<ModifyAttributeInfo> infoList = new ArrayList<>();
@@ -598,7 +602,7 @@
new Object[]{btmTypeDTO.getRevisionRuleId(), btmTypeDTO.getRevisionRuleName()});
}
}
- btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.REVISION_MANAGE_FIELD_MAP));
+// btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.REVISION_MANAGE_FIELD_MAP));
}
if (btmTypeDTO.isLifeCycleFlag()){
// 闇�瑕佹帶鍒剁敓鍛藉懆鏈�
@@ -616,11 +620,11 @@
// new Object[]{btmTypeDTO.getSubLifeCycleId(), btmTypeDTO.getSubLifeCycleName()});
// }
// }
- btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.LIFECYCLE_MANAGE_FIELD_MAP));
+// btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.LIFECYCLE_MANAGE_FIELD_MAP));
}
if (btmTypeDTO.isSecretFlag()){
// 闇�瑕佹帶鍒跺瘑绾�
- btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.SECRET_MANAGE_FIELD_MAP));
+// btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.SECRET_MANAGE_FIELD_MAP));
}
}
@Override
@@ -650,12 +654,14 @@
String label = domain.get(k);
BtmTreeVO parent = new BtmTreeVO();
parent.setName(label);
+ parent.setLabel(label);
parent.setId(k);
parent.setChildList(v.stream().map(s -> {
BtmTreeVO child = new BtmTreeVO();
child.setOid(s.getOid());
- child.setName(s.getId() + " " + (s.getName() == null ? "" : s.getName()));
+ child.setName(s.getName());
child.setId(s.getId());
+ child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")"));
return child;
}).collect(Collectors.toList()));
treeList.add(parent);
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeAttributeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeAttributeServiceImpl.java
index f71b4d3..0908a51 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeAttributeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeAttributeServiceImpl.java
@@ -1,18 +1,27 @@
package com.vci.ubcs.omd.service.impl;
+import com.alibaba.cloud.commons.lang.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.omd.constant.BtmTypeFieldConstant;
+import com.vci.ubcs.omd.entity.LinkType;
import com.vci.ubcs.omd.entity.LinkTypeAttribute;
import com.vci.ubcs.omd.mapper.LinkTypeAttributeMapper;
import com.vci.ubcs.omd.service.IAttributeService;
import com.vci.ubcs.omd.service.ILinkTypeAttributeService;
+import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.omd.vo.LinkTypeAttributeVO;
+import com.vci.ubcs.omd.vo.LinkTypeVO;
+import com.vci.ubcs.omd.wrapper.LinkTypeAttributeWrapper;
+import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
/**
* Description: 閾炬帴绫诲瀷鍖呭惈灞炴�х殑鏈嶅姟
@@ -56,4 +65,80 @@
VciBaseUtil.alertNotNull(oid);
return baseMapper.selectOne(Wrappers.<LinkTypeAttribute>query().lambda().eq(LinkTypeAttribute::getOid,oid));
}
+
+ /**
+ * 鏍规嵁閾炬帴绫诲瀷鑾峰彇榛樿瀛楁
+ *
+ * @param linkTypeVO 閾炬帴绫诲瀷
+ * @return 鎵ц缁撴灉
+ */
+ @Override
+ public List<LinkTypeAttributeVO> getDefaultAttributes(LinkTypeVO linkTypeVO) {
+ Objects.requireNonNull(linkTypeVO,"閾炬帴绫诲瀷涓嶈兘涓虹┖");
+ List<LinkTypeAttributeVO> list = new ArrayList<>();
+ // 涓氬姟绫诲瀷鐨勫熀鏈瓧娈�
+ BtmTypeFieldConstant.LINK_TYPE_FIELD_MAP.forEach((id, name) -> {
+ LinkTypeAttributeVO vo = new LinkTypeAttributeVO();
+ vo.setId(id);
+ vo.setName(name);
+ vo.setPkLinkType(linkTypeVO.getOid());
+ if (StringUtils.equals(id,"oid")){
+ vo.setNullableFlag(false);
+ }else {
+ vo.setNullableFlag(true);
+ }
+ if (Arrays.asList("createtime","lastmodifytime","owner").contains(id)){
+ vo.setAttrDataType(VciFieldTypeEnum.VTDateTime.name());
+ vo.setAttributeLength(6);
+ }else {
+ vo.setAttrDataType(VciFieldTypeEnum.VTString.name());
+ vo.setAttributeLength(150);
+ }
+ list.add(vo);
+ });
+ return list;
+ }
+
+ /**
+ * 鏍规嵁閾炬帴绫诲瀷鑾峰彇鎵�鏈夌殑瀛楁
+ *
+ * @param linkTypeVO 閾炬帴绫诲瀷
+ * @return 鎵ц缁撴灉
+ */
+ @Override
+ public List<LinkTypeAttributeVO> getAllAttributes(LinkTypeVO linkTypeVO) {
+ Objects.requireNonNull(linkTypeVO,"閾炬帴绫诲瀷涓嶈兘涓虹┖");
+ List<LinkTypeAttributeVO> attributes = getAttributesNoDefault(linkTypeVO);
+ attributes.addAll(getDefaultAttributes(linkTypeVO));
+ return attributes;
+ }
+
+ /**
+ * 鑾峰彇闈為粯璁ゅ瓧娈电殑閾炬帴绫诲瀷灞炴��
+ *
+ * @param linkTypeVO 閾炬帴绫诲瀷
+ * @return
+ */
+ @Override
+ public List<LinkTypeAttributeVO> getAttributesNoDefault(LinkTypeVO linkTypeVO) {
+ Objects.requireNonNull(linkTypeVO,"閾炬帴绫诲瀷涓嶈兘涓虹┖");
+ return LinkTypeAttributeWrapper.build().listEntityVO(baseMapper.selectList(Wrappers.<LinkTypeAttribute>query().lambda().eq(LinkTypeAttribute::getPkLinkType, linkTypeVO.getOid())));
+ }
+
+ /**
+ * 鎵归噺鑾峰彇闈為粯璁ゅ瓧娈电殑閾炬帴绫诲瀷灞炴��
+ *
+ * @param linkTypeDOList 閾炬帴绫诲瀷
+ * @return 鎵ц缁撴灉
+ */
+ @Override
+ public Map<String, List<LinkTypeAttributeVO>> batchGetAttributesNoDefault(List<LinkType> linkTypeDOList) {
+ VciBaseUtil.alertNotNull(linkTypeDOList,"閾炬帴绫诲瀷闆嗗悎");
+ Set<String> oidSet = linkTypeDOList.stream().map(LinkType::getOid).collect(Collectors.toSet());
+ if (CollectionUtils.isEmpty(oidSet)){
+ return new HashMap<>();
+ }
+ List<LinkTypeAttribute> attributes = baseMapper.selectList(Wrappers.<LinkTypeAttribute>query().lambda().in(LinkTypeAttribute::getPkLinkType, oidSet));
+ return LinkTypeAttributeWrapper.build().listEntityVO(Optional.ofNullable(attributes).orElseGet(ArrayList::new)).stream().collect(Collectors.groupingBy(LinkTypeAttributeVO::getPkLinkType));
+ }
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java
index e616cd2..571c89d 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java
@@ -4,15 +4,8 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.api.exception.NacosException;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
-import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
-import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
-import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper;
-import com.baomidou.mybatisplus.extension.kotlin.KtQueryChainWrapper;
-import com.baomidou.mybatisplus.extension.kotlin.KtUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO;
@@ -27,7 +20,6 @@
import com.vci.ubcs.omd.repeater.DomainRepeater;
import com.vci.ubcs.omd.service.*;
import com.vci.ubcs.omd.vo.*;
-import com.vci.ubcs.omd.wrapper.BtmTypeWrapper;
import com.vci.ubcs.omd.wrapper.LinkTypeAttributeWrapper;
import com.vci.ubcs.omd.wrapper.LinkTypeWrapper;
import com.vci.ubcs.starter.exception.VciBaseException;
@@ -49,12 +41,11 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import org.springframework.util.CollectionUtils;
-import java.io.Serializable;
import java.util.*;
-import java.util.function.Function;
import java.util.stream.Collectors;
/**
@@ -169,7 +160,8 @@
if(!CollectionUtils.isEmpty(pkLinkTypeCollection)){
List<LinkType> linkTypeDOList = listLinkTypeDOByOidCollection(pkLinkTypeCollection);
if(!CollectionUtils.isEmpty(linkTypeDOList)) {
- return LinkTypeWrapper.build().listEntityVO(linkTypeDOList);
+ Map<String,List<LinkTypeAttributeVO>> pkLinkTypeAndAttributeMap = linkTypeAttributeService.batchGetAttributesNoDefault(linkTypeDOList);
+ return LinkTypeWrapper.build().listEntityVO(linkTypeDOList,pkLinkTypeAndAttributeMap);
}
}
return null;
@@ -194,6 +186,7 @@
linkTypeDOList.addAll(linkTypeDOS);
}
});
+ return linkTypeDOList;
}
return null;
}
@@ -241,7 +234,8 @@
if(!CollectionUtils.isEmpty(linkTypeIdCollection)){
List<LinkType> linkTypeDOList = listLinkTypeDOByIdCollection(linkTypeIdCollection);
if(!CollectionUtils.isEmpty(linkTypeDOList)) {
- return LinkTypeWrapper.build().listEntityVO(linkTypeDOList);
+ Map<String,List<LinkTypeAttributeVO>> pkLinkTypeAndAttributeMap = linkTypeAttributeService.batchGetAttributesNoDefault(linkTypeDOList);
+ return LinkTypeWrapper.build().listEntityVO(linkTypeDOList, pkLinkTypeAndAttributeMap);
}
}
return null;
@@ -352,6 +346,7 @@
* @throws VciBaseException 娣诲姞鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父
*/
@Override
+ @Transactional
public LinkTypeVO addSave(LinkTypeVO linkTypeVO, boolean autoCreateTable) throws VciBaseException {
TransactionStatus transaction = null;
if(autoCreateTable) {
@@ -398,20 +393,29 @@
}
LinkType linkTypeDO = new LinkType();
BeanUtil.copy(linkTypeVO, linkTypeDO);
+ if (StringUtils.isBlank(linkTypeDO.getTableName())){
+ linkTypeDO.setTableName(getTableName(linkTypeDO.getId(),linkTypeDO.getDomain()));
+ }
String creator = AuthUtil.getUserAccount();
Date now = new Date();
- linkTypeDO.setCreator(creator);
- linkTypeDO.setCreateTime(now);
- linkTypeDO.setOwner(creator);
- linkTypeDO.setBtmName(BtmTypeConstant.LINK_TYPE);
- linkTypeDO.setTs(now);
+ LinkTypeWrapper.build().setBeforeInsert(linkTypeDO,creator,now);
//澶勭悊灞炴��
- addAttributeForLink(linkTypeVO.getAttributes(),linkTypeDO.getOid(),creator,now);
+ List<LinkTypeAttributeVO> attributeVOList = addAttributeForLink(linkTypeVO.getAttributes(), linkTypeDO.getOid(), creator, now);
baseMapper.insert(linkTypeDO);
if(autoCreateTable) {
- dataSourceTransactionManager.commit(transaction);
+ LinkTypeVO typeVO = LinkTypeWrapper.build().entityVO(linkTypeDO);
+ typeVO.setAttributes(attributeVOList);
+ List<LinkTypeAttributeVO> attributes = typeVO.getAttributes();
+ attributes.addAll(linkTypeAttributeService.getDefaultAttributes(typeVO));
+ typeVO.setAttributes(attributes);
+ R r = DomainRepeater.submitLinkType(typeVO.getDomain(), typeVO);
+ if (!r.isSuccess()){
+ dataSourceTransactionManager.rollback(transaction);
+ }else {
+ dataSourceTransactionManager.commit(transaction);
+ }
}
}catch (VciBaseException e){
if(autoCreateTable) {
@@ -424,9 +428,9 @@
}
throw e;
}
- if(autoCreateTable) {
+ /*if(autoCreateTable) {
checkTableSame(linkTypeVO);
- }
+ }*/
return linkTypeVO;
}
@@ -437,11 +441,11 @@
* @param creator 鍒涘缓浜�
* @param now 褰撳墠鏃堕棿
*/
- private void addAttributeForLink(List<LinkTypeAttributeVO> attributesVOList,String pkLinkType,String creator,Date now){
+ private List<LinkTypeAttributeVO> addAttributeForLink(List<LinkTypeAttributeVO> attributesVOList,String pkLinkType,String creator,Date now){
List<LinkTypeAttribute> linkTypeAttributeDOList = new ArrayList<>();
if(!CollectionUtils.isEmpty(attributesVOList)) {
List<String> attributeIdList = new ArrayList<>();
- attributesVOList.stream().forEachOrdered(s -> {
+ attributesVOList.forEach(s -> {
linkTypeAttributeService.checkAttribute(s);
linkTypeAttributeDOList.add(LinkTypeAttributeWrapper.build().copyVO2DO(s, pkLinkType, creator, now));
attributeIdList.add(s.getId().toLowerCase().trim());
@@ -449,7 +453,9 @@
//妫�鏌ュ睘鎬ф槸鍚﹂兘瀛樺湪
attributeService.checkAttributeExists(attributeIdList);
linkTypeAttributeService.saveOrUpdateBatch(linkTypeAttributeDOList,10000);
+ return LinkTypeAttributeWrapper.build().listEntityVO(linkTypeAttributeDOList);
}
+ return null;
}
/**
@@ -478,8 +484,8 @@
}
if (!CollectionUtils.isEmpty(modifyAttributeInfoDOList)) {
modifyAttributeService.saveOrUpdateBatch(modifyAttributeInfoDOList);
+ modifyAttributeService.finishModify(modifyAttributeInfoDOList);
}
- modifyAttributeService.finishModify(modifyAttributeInfoDOList);
}
/**
@@ -542,15 +548,10 @@
if(StringUtils.isNotBlank(unExistBtmTypeId)){
throw new VciBaseException("閾炬帴绫诲瀷浣跨敤鐨勪笟鍔$被鍨媨0}涓嶅瓨鍦紝璇锋煡璇�",new Object[]{unExistBtmTypeId});
}
-
String creator = AuthUtil.getUserAccount();
Date now = new Date();
- linkTypeDO.setLastModifier(creator);
- linkTypeDO.setLastModifyTime(now);
- linkTypeDO.setTs(now);
+ linkTypeDO = LinkTypeWrapper.build().setBeforeUpdate(linkTypeDO,creator,now);
//澶勭悊灞炴��
-
-
LinkTypeWrapper.build().copyLinkTypeVO2DO(linkTypeVO,linkTypeDO,creator,new Date());
//鍏堟煡璇㈣繖涓摼鎺ョ被鍨嬪寘鍚灏戝睘鎬�
@@ -564,22 +565,23 @@
}
saveOrUpdate(linkTypeDO);
if(autoCreateTable) {
+ List<LinkTypeAttributeVO> defaultAttributes = linkTypeAttributeService.getDefaultAttributes(linkTypeVO);
+ List<LinkTypeAttributeVO> attributes = linkTypeVO.getAttributes();
+ attributes.addAll(defaultAttributes);
+ linkTypeVO.setAttributes(attributes);
+ BtmAndLinkTypeDdlDTO ddlDTO = new BtmAndLinkTypeDdlDTO();
+ DomainRepeater.checkDifferent(ddlDTO,linkTypeVO.getDomain());
dataSourceTransactionManager.commit(transaction);
}
- }catch (VciBaseException e){
+ } catch (Throwable e){
if(autoCreateTable) {
dataSourceTransactionManager.rollback(transaction);
}
- throw e;
- }catch (Throwable e) {
- if(autoCreateTable) {
- dataSourceTransactionManager.rollback(transaction);
- }
- throw e;
+ throw new VciBaseException(e.getMessage());
}
- if(autoCreateTable) {
+ /*if(autoCreateTable) {
checkTableSame(linkTypeVO);
- }
+ }*/
return linkTypeVO;
}
@@ -807,19 +809,19 @@
attributeVO.setLastModifier(creator);
attributeVO.setLastModifyTime(now);
attributeVO.setTs(now);
- //鏌ヨ閾炬帴绫诲瀷鏄惁瀛樺湪
linkTypeAttributeService.saveOrUpdate(attributeDO);
if (autoEdit2Table) {
BtmAndLinkTypeDdlDTO ddlDTO = new BtmAndLinkTypeDdlDTO();
-// ddlDTO.setLinkTypeList();
-// DomainRepeater.checkDifferent(,domain);
+ LinkTypeVO linkTypeVO = LinkTypeWrapper.build().entityVO(linkTypeDO);
+ ddlDTO.setLinkTypeList(Collections.singletonList(linkTypeVO));
+ DomainRepeater.checkDifferent(ddlDTO,domain);
dataSourceTransactionManager.commit(transaction);
}
-// }catch (NacosException e){
-// if(autoEdit2Table) {
-// dataSourceTransactionManager.rollback(transaction);
-// }
-// throw new RuntimeException(e);
+ }catch (NacosException e){
+ if(autoEdit2Table) {
+ dataSourceTransactionManager.rollback(transaction);
+ }
+ throw new RuntimeException(e);
}catch (Throwable e){
if(autoEdit2Table) {
dataSourceTransactionManager.rollback(transaction);
@@ -873,7 +875,7 @@
public List<BtmTreeVO> treeDomain() {
try {
Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel));
- List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll());
+ List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll(), null);
Map<String, List<LinkTypeVO>> domainMap = vos.stream().collect(Collectors.groupingBy(LinkTypeVO::getDomain));
List<BtmTreeVO> treeList = new ArrayList<>();
domainMap.forEach((k,v)-> {
@@ -882,11 +884,13 @@
BtmTreeVO parent = new BtmTreeVO();
parent.setName(label);
parent.setId(k);
+ parent.setLabel(label);
parent.setChildList(v.stream().map(s -> {
BtmTreeVO child = new BtmTreeVO();
child.setOid(s.getOid());
- child.setName(s.getId() + " " + (s.getName() == null ? "" : s.getName()));
+ child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")"));
child.setId(s.getId());
+ child.setName(s.getName());
return child;
}).collect(Collectors.toList()));
treeList.add(parent);
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
index f9574b3..086aeb0 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
@@ -1,5 +1,6 @@
package com.vci.ubcs.omd.wrapper;
+import com.vci.ubcs.omd.cache.EnumCache;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.BtmTypeAttribute;
@@ -34,6 +35,7 @@
public BtmTypeAttributeVO entityVO(BtmTypeAttribute entity) {
BtmTypeAttributeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeAttributeVO.class));
// 鍦ㄨ繖閲岃缃灇涓炬樉绀哄��
+ vo.setAttrDataTypeText(EnumCache.getValue("attributeType",vo.getAttrDataType()));
return vo;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeAttributeWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeAttributeWrapper.java
index 9186157..4b4222b 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeAttributeWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeAttributeWrapper.java
@@ -1,6 +1,7 @@
package com.vci.ubcs.omd.wrapper;
import com.alibaba.cloud.commons.lang.StringUtils;
+import com.vci.ubcs.omd.cache.EnumCache;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.entity.LinkTypeAttribute;
import com.vci.ubcs.omd.vo.LinkTypeAttributeVO;
@@ -29,6 +30,7 @@
@Override
public LinkTypeAttributeVO entityVO(LinkTypeAttribute entity) {
LinkTypeAttributeVO vo = BeanUtil.copy(entity, LinkTypeAttributeVO.class);
+ vo.setAttrDataTypeText(EnumCache.getValue("attributeType",vo.getAttrDataType()));
return vo;
}
@@ -49,6 +51,8 @@
attributeDO.setCreateTime(now);
attributeDO.setTs(now);
attributeDO.setOwner(creator);
+ attributeDO.setLastModifier(creator);
+ attributeDO.setLastModifyTime(now);
attributeDO.setBtmName(BtmTypeConstant.LINK_TYPE_ATTRIBUTE);
return attributeDO;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java
index 6086205..7406ba9 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java
@@ -1,15 +1,19 @@
package com.vci.ubcs.omd.wrapper;
+import com.vci.ubcs.omd.cache.BtmTypeCache;
import com.vci.ubcs.omd.constant.BtmTypeConstant;
import com.vci.ubcs.omd.entity.LinkType;
+import com.vci.ubcs.omd.vo.BtmTypeVO;
+import com.vci.ubcs.omd.vo.LinkTypeAttributeVO;
import com.vci.ubcs.omd.vo.LinkTypeVO;
+import com.vci.ubcs.starter.web.enumpck.NewAppConstantEnum;
+import com.vci.ubcs.starter.web.util.VciBaseUtil;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.util.CollectionUtils;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -26,13 +30,39 @@
@Override
public LinkTypeVO entityVO(LinkType entity) {
- LinkTypeVO vo = BeanUtil.copy(entity, LinkTypeVO.class);
+ LinkTypeVO vo = Optional.ofNullable(BeanUtil.copy(entity, LinkTypeVO.class)).orElseGet(LinkTypeVO::new);
+ List<String> fromIdList = Func.toStrList(",", vo.getFromBtmType());
+ List<String> toIdList = Func.toStrList(",", vo.getToBtmType());
+ Set<String> btmIdSet = new HashSet<>();
+ btmIdSet.addAll(fromIdList);
+ btmIdSet.addAll(toIdList);
+ List<BtmTypeVO> btmTypeVOList = BtmTypeCache.selectByIdCollection(new ArrayList<>(btmIdSet));
+ List<BtmTypeVO> fromBtm = new ArrayList<>();
+ List<BtmTypeVO> toBtm = new ArrayList<>();
+ Optional.ofNullable(btmTypeVOList).orElseGet(ArrayList::new).forEach(btm -> {
+ if (vo.getFromBtmType().contains(btm.getId())){
+ fromBtm.add(btm);
+ }
+ if (vo.getToBtmType().contains(btm.getId())){
+ toBtm.add(btm);
+ }
+ });
+ vo.setFromBtmTypes(fromBtm);
+ vo.setToBtmTypes(toBtm);
// 鏋氫妇澶勭悊
+ vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getDomain()));
return vo;
}
- public List<LinkTypeVO> listEntityVO(List<LinkType> entityList){
- return Optional.ofNullable(entityList).orElseGet(ArrayList::new).stream().map(this::entityVO).collect(Collectors.toList());
+ public List<LinkTypeVO> listEntityVO(List<LinkType> entityList, Map<String, List<LinkTypeAttributeVO>> pkLinkTypeAndAttributeMap){
+ List<LinkTypeVO> voList = Optional.ofNullable(entityList).orElseGet(ArrayList::new).stream().map(this::entityVO).collect(Collectors.toList());
+ if (!CollectionUtils.isEmpty(voList) && pkLinkTypeAndAttributeMap != null){
+ voList.forEach(vo -> {
+ List<LinkTypeAttributeVO> attributes = pkLinkTypeAndAttributeMap.getOrDefault(vo.getOid(), new ArrayList<>());
+ vo.setAttributes(attributes);
+ });
+ }
+ return voList;
}
public void copyLinkTypeVO2DO(LinkTypeVO linkTypeVO, LinkType linkTypeDO, String creator, Date now) {
@@ -51,4 +81,36 @@
linkTypeDO.setLastModifyTime(now);
linkTypeDO.setBtmName(BtmTypeConstant.LINK_TYPE);
}
+
+ /**
+ * 缂栬緫淇濆瓨鍓嶈缃粯璁ゅ瓧娈靛��
+ *
+ * @param linkTypeDO 閾炬帴绫诲瀷
+ * @param modifier 淇敼浜�
+ * @param modifyTime 淇敼鏃堕棿
+ * @return
+ */
+ public LinkType setBeforeUpdate(LinkType linkTypeDO, String modifier, Date modifyTime) {
+ linkTypeDO.setLastModifier(modifier);
+ linkTypeDO.setTs(modifyTime);
+ linkTypeDO.setLastModifyTime(modifyTime);
+ return linkTypeDO;
+ }
+
+ /**
+ * 鎻掑叆鍓嶈缃粯璁ゅ瓧娈�
+ * @param linkTypeDO 閾炬帴绫诲瀷
+ * @param creator 鍒涘缓浜�
+ * @param createTime 鍒涘缓鏃堕棿
+ */
+ public void setBeforeInsert(LinkType linkTypeDO, String creator, Date createTime) {
+ linkTypeDO.setOid(VciBaseUtil.getPk());
+ linkTypeDO.setCreator(creator);
+ linkTypeDO.setCreateTime(createTime);
+ linkTypeDO.setOwner(creator);
+ linkTypeDO.setBtmName(BtmTypeConstant.LINK_TYPE);
+ linkTypeDO.setTs(createTime);
+ linkTypeDO.setLastModifyTime(createTime);
+ linkTypeDO.setLastModifier(creator);
+ }
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeAttributeMapper.xml b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeAttributeMapper.xml
index 87e6848..d68ea8d 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeAttributeMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeAttributeMapper.xml
@@ -33,6 +33,6 @@
</sql>
<sql id="tableName">
- pl_omd_link_type_attr
+ pl_omd_link_type_attribute
</sql>
</mapper>
--
Gitblit v1.9.3