From 8310a8fb31e4a82cbbb8bb512e9815709f23d441 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 11 七月 2023 19:08:02 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/src/views/system/tenant.vue | 270 ++++++++++++------------
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue | 31 +-
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue | 11
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 95 ++-----
Source/UBCS-WEB/src/api/GetItem.js | 17 +
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 25 +
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue | 141 +++++++-----
Source/UBCS-WEB/vue.config.js | 4
Source/UBCS-WEB/src/components/Master/MasterTree.vue | 1
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 10
10 files changed, 310 insertions(+), 295 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/GetItem.js b/Source/UBCS-WEB/src/api/GetItem.js
index 6b82a9c..a6464c9 100644
--- a/Source/UBCS-WEB/src/api/GetItem.js
+++ b/Source/UBCS-WEB/src/api/GetItem.js
@@ -29,3 +29,20 @@
}
})
}
+// 鏂板鏁版嵁
+export function addSaveCode(data) {
+ return request({
+ url: 'api/ubcs-code/ubcs-code/mdmEngineController/addSaveCode',
+ method: 'post',
+ data
+ })
+}
+//淇敼鏁版嵁
+export function editSaveCode(data) {
+ return request({
+ url: 'api/ubcs-code/ubcs-code/mdmEngineController/editSaveCode',
+ method: 'put',
+ data
+ })
+}
+
diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index 75413c2..be3ea00 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -79,7 +79,7 @@
</basic-container>
</template>
<script>
-import {MasterTable, TableData, FindData} from "@/api/GetItem";
+import {MasterTable, TableData, FindData,addSaveCode,editSaveCode} from "@/api/GetItem";
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
import integrationTransfer from "@/views/integration/integrationTransfer";
import SetPersonnel from "@/components/template/SetPersonnel";
@@ -213,7 +213,8 @@
codeClassifyOid: {
handler(newval, oldval) {
this.codeClassifyOid = newval;
- this.parameter.vars.codeClassifyOid = newval
+ this.parameter.vars.codeClassifyOid = newval;
+ console.log('瀛�',newval)
},
deep: true,
},
@@ -421,6 +422,7 @@
},
//澶氶��
handleSelectionChange(row) {
+ console.log(row)
if (this.row) {
this.rowOid = row[0].oid;
} else {
@@ -485,16 +487,26 @@
}
},
//澧炲姞淇濆瓨
- AddSumbit() {
+ AddSumbit(val) {
this.addvisible = false;
+ console.log(val)
+ addSaveCode(val).then(res=>{
+ console.log(res)
+ this.onLoad()
+ })
},
EditSumbit(val) {
this.editvisible = false;
+ console.log(val)
+ editSaveCode(val).then(res=>{
+ console.log(res)
+ this.onLoad()
+ })
},
openBatchImport(type) {
- this.batchImportData.visible = true
- this.batchImportData.type = type
- this.batchImportData.codeClassifyOid = this.codeClassifyOid
+ this.batchImportData.visible = true;
+ this.batchImportData.type = type;
+ this.batchImportData.codeClassifyOid = this.codeClassifyOid;
}
},
};
@@ -505,7 +517,6 @@
.el-table--scrollable-x .el-table__body-wrapper {
overflow: auto !important;
}
-
.el-table__fixed-right-patch {
background-color: #f5f7fa !important;
}
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
index dd92b72..ea42225 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -156,6 +156,7 @@
this.TableRend(); // TableHeadRend() 鏂规硶瀹屾垚鍚庡啀鎵ц TableRend()
this.$emit('nodeClick',this.templateOids)
this.$emit("codeClassifyOid", this.nodeClickList.oid )
+ console.log('鏍�',this.nodeClickList.oid)
} catch (error) {
// 澶勭悊閿欒
this.$message.error(error)
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index faa8b02..92ee657 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1816,11 +1816,9 @@
</script>
<style scoped lang="scss" >
-///deep/ .el-button {
-// margin: 0 10px 10px 0;
-//}
-.app el-button{
- z-index: 1;
- margin: 0 10px 10px 0 !important;
+.app {
+ /deep/ .el-button {
+ margin: 0 10px 10px 0;
+ }
}
</style>
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index 5eb3f23..9a71b38 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -2,7 +2,7 @@
<div>
<avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'">
</avue-form>
- <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
+ <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
</avue-form>
<div>
<!-- 缂栫爜瑙勫垯-->
@@ -255,70 +255,7 @@
},
]
},
- options: {
- column: [
- {
- label: '涓婚搴�/鍒嗙被缂栧彿',
- prop: 'id',
- labelWidth:128,
- rules: [{
- required: true,
- message: "涓婚搴�/鍒嗙被缂栧彿",
- trigger: "blur"
- }]
- },
- {
- label: '涓婚搴�/鍒嗙被鍚嶇О',
- prop: 'name',
- labelWidth:128,
- rules: [{
- required: true,
- message: "涓婚搴�/鍒嗙被鍚嶇О",
- trigger: "blur"
- }]
- },
- {
- label:"鎻忚堪",
- prop:"description",
- labelWidth:128,
- },
- {
- label: '瀛樺偍鐨勪笟鍔$被鍨�',
- prop: 'btmtypename',
- labelWidth:128,
- focus:this.btmFoucus,
- readonly: true,
- display:false,
- rules: [{
- required: true,
- message: "瀛樺偍鐨勪笟鍔$被鍨�",
- trigger: "blur"
- }]
- },
- {
- label:"缂栫爜瑙勫垯",
- prop:"coderuleoidName",
- labelWidth:128,
- focus:this.CodeFoucus,
- readonly: true,
- },
- {
- label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
- prop:"codekeyattrrepeatoidName",
- labelWidth:128,
- focus:this.Keyfouce,
- readonly: true,
- },
- {
- label:"鐩镐技鏌ヨ瑙勫垯",
- prop:"codeResembleRuleOidName",
- labelWidth:128,
- focus: this.simFouce,
- readonly: true,
- },
- ]
- },
FormList: {},
masterSelectList:[],
KeySelectLIst:[],
@@ -326,6 +263,75 @@
btmSelectList:[]
}
},
+ computed:{
+ options(){
+ return{
+ column: [
+ {
+ label: '涓婚搴�/鍒嗙被缂栧彿',
+ prop: 'id',
+ labelWidth:128,
+ rules: [{
+ required: true,
+ message: "涓婚搴�/鍒嗙被缂栧彿",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '涓婚搴�/鍒嗙被鍚嶇О',
+ prop: 'name',
+ labelWidth:128,
+ rules: [{
+ required: true,
+ message: "涓婚搴�/鍒嗙被鍚嶇О",
+ trigger: "blur"
+ }]
+ },
+ {
+ label:"鎻忚堪",
+ prop:"description",
+ labelWidth:128,
+ },
+ {
+ label: '瀛樺偍鐨勪笟鍔$被鍨�',
+ prop: 'btmtypename',
+ labelWidth:128,
+ focus:this.btmFoucus,
+ // readonly: true,
+ display:this.TreeFlag,
+ rules: [{
+ required: true,
+ message: "瀛樺偍鐨勪笟鍔$被鍨�",
+ trigger: "blur"
+ }]
+ },
+ {
+ label:"缂栫爜瑙勫垯",
+ prop:"coderuleoidName",
+ labelWidth:128,
+ focus:this.CodeFoucus,
+ readonly: true,
+ },
+ {
+ label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
+ prop:"codekeyattrrepeatoidName",
+ labelWidth:128,
+ focus:this.Keyfouce,
+ readonly: true,
+ },
+ {
+ label:"鐩镐技鏌ヨ瑙勫垯",
+ prop:"codeResembleRuleOidName",
+ labelWidth:128,
+ focus: this.simFouce,
+ readonly: true,
+ },
+
+ ]
+
+ }
+ }
+ },
watch:{
nodeClickList:{
handler(newval,oldval){
@@ -333,6 +339,13 @@
},
deep:true,
immediate:true
+ },
+ TreeFlag:{
+ handler(newval,oldval){
+ console.log('鏍戠姸鎬�',newval,oldval)
+ },
+ deep:true,
+ immediate:true
}
},
created() {
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index 23167e8..c659dfa 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -3,8 +3,8 @@
<el-container>
<!-- 宸︿晶鑿滃崟-->
<el-aside >
- <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"@click.native="handleClickOutside" >
- <div @click.native="handleClickOutside">
+ <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
+ <div>
<div>
<div style="display: flex;justify-content: space-around">
<el-button plain size="small" type="primary" @click="TreeAdd">娣诲姞</el-button>
@@ -33,7 +33,7 @@
<el-form-item label="缂栫爜瑙勫垯锛�" label-width="150px">
<el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" @focus="CodeFoucus"></el-input>
</el-form-item>
- <el-form-item label="涓氬姟绫诲瀷锛�" label-width="150px" v-if="TreeFlag==false">
+ <el-form-item label="涓氬姟绫诲瀷锛�" label-width="150px" v-if="TreeFlagCode==false">
<el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" @focus="btmFoucus"></el-input>
</el-form-item>
<el-form-item label="鍏抽敭灞炴�ф煡璇㈣鍒欙細" label-width="150px">
@@ -52,7 +52,7 @@
</el-dialog>
<!-- 淇敼瀵硅瘽妗�-->
<el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="淇敼鍒嗙被">
- <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlag" ::nodeClickList="nodeClickList"></classifyTreeform>
+ <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlagCode" ::nodeClickList="nodeClickList"></classifyTreeform>
</el-dialog>
<avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
:option="Treeoption"
@@ -330,7 +330,7 @@
data() {
return {
//鏍戣妭鐐规樉绀洪殣钘�
- TreeFlag:false,
+ TreeFlagCode:false,
//缂栫爜瑙勫垯
MasterdialogVisible:false,
masterData:[],
@@ -633,6 +633,10 @@
if (e.target.nodeName !== 'SPAN') {
this.$refs.tree.setCurrentKey(null)
this.nodeClickList = {}
+ this.TreeList=[]
+ this.TreeFlagCode=false
+ console.log('鍚嶵reeList',this.TreeList)
+ console.log('鍚巒odeClickList',this.nodeClickList)
}
}, true)
},
@@ -682,18 +686,6 @@
}
},
methods: {
- //鏍戣妭鐐瑰け鍘荤劍鐐�
- handleClickOutside(event) {
- const treeElement = this.$refs.tree.$el;
- const targetElement = event.target;
- if (!treeElement.contains(targetElement)) {
- // 鍦ㄦ爲缁勪欢澶栭儴鐐瑰嚮锛屾竻绌洪�夋嫨鐘舵��
- // this.nodeClickList=[];
- // this.CloneTreeAvueform={}
- console.log(this.nodeClickList )
- console.log(this.CloneTreeAvueform)
- }
- },
//缂栫爜瑙勫垯澶辩劍
CodeFoucus(){
this.MasterdialogVisible=true;
@@ -1039,7 +1031,7 @@
},
//淇敼鍥炲~
TreeEdit() {
- if (this.nodeClickList == "") {
+ if ( Object.keys(this.nodeClickList).length<1) {
this.$message({
type: 'warning',
message: '璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�!'
@@ -1119,9 +1111,8 @@
//鏍戠偣鍑讳簨浠�
async nodeClick(data) {
//瀹氫箟涓�涓ā鏉垮睘鎬d锛屾暟鎹槸妯℃澘绠$悊琛ㄦ牸閲岄潰鐨刼id
- console.log('鏍�',data)
if(data.parentId == ""){
- this.TreeFlag=true;
+ this.TreeFlagCode=true;
}
this.nodeClickList = data
this.ProData=[]
diff --git a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
index 3a057e4..e8abccc 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -142,6 +142,15 @@
type: Array
}
},
+ watch:{
+ btmType:{
+ handler(newval,oldval){
+ console.log('鐩戝惉',newval,oldval)
+ },
+ deep:true,
+ immediate:true
+ }
+ },
data() {
return {
form: {},
@@ -359,7 +368,7 @@
},
// 灞炴�ф睜鍔犺浇
attrRefOnLoad(){
- if (!this.attrRef.queryNotIn || (this.attrRef.queryNotIn === '' && this.btmType.attributes !== [])){
+ if (this.attrRef.queryNotIn != ''){
this.attrRef.queryNotIn = '';
this.btmType.attributes.forEach(item => {
this.attrRef.queryNotIn += (item.id + ",")
diff --git a/Source/UBCS-WEB/src/views/system/tenant.vue b/Source/UBCS-WEB/src/views/system/tenant.vue
index 96ce15c..665513f 100644
--- a/Source/UBCS-WEB/src/views/system/tenant.vue
+++ b/Source/UBCS-WEB/src/views/system/tenant.vue
@@ -1,6 +1,6 @@
<template>
<basic-container>
- <avue-crud :option="option"
+ <avue-crud :option="this.option"
:table-loading="loading"
:data="data"
ref="crud"
@@ -61,7 +61,7 @@
<el-tag>{{ row.expireTime ? row.expireTime : '涓嶉檺鍒�' }}</el-tag>
</template>
</avue-crud>
-
+
<el-dialog title="绉熸埛鏁版嵁婧愰厤缃�"
append-to-body
:visible.sync="datasourceBox"
@@ -90,7 +90,7 @@
remove,
update,
add,
- setting,
+ // setting,
datasource,
packageInfo,
packageSetting
@@ -115,117 +115,6 @@
pageSize: 10,
currentPage: 1,
total: 0
- },
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- viewBtn: true,
- dialogWidth: 900,
- dialogClickModal: false,
- highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
- column: [
- {
- label: "绉熸埛ID",
- prop: "tenantId",
- width: 100,
- search: true,
- addDisplay: false,
- editDisplay: false,
- span: 24,
- rules: [{
- required: true,
- message: "璇疯緭鍏ョ鎴稩D",
- trigger: "blur"
- }]
- },
- {
- label: "鍏ㄧО",
- prop: "fullName",
- width: 120,
- span:24,
- rules: [{
- required: true,
- message: "璇疯緭鍏ュ叏绉�",
- trigger: "blur"
- }]
- },
- {
- label: "绉熸埛鍚嶇О",
- prop: "tenantName",
- search: true,
- width: 180,
- span: 24,
- rules: [{
- required: true,
- message: "璇疯緭鍏ュ弬鏁板悕绉�",
- trigger: "blur"
- }]
- },
- {
- label: "鑱旂郴浜�",
- prop: "linkman",
- width: 150,
- search: true,
- rules: [{
- required: true,
- message: "璇疯緭鍏ヨ仈绯讳汉",
- trigger: "blur"
- }]
- },
- {
- label: "鑱旂郴鐢佃瘽",
- prop: "contactNumber",
- width: 150,
- },
- {
- label: "鑱旂郴鍦板潃",
- prop: "address",
- span: 24,
- minRows: 2,
- type: "textarea",
- hide: true,
- },
- {
- label: '寮�鍚笁鍛�',
- prop: 'ssaEnable',
- type: 'radio',
- width: 100,
- value:0,
- disabled:Boolean,
- dicData: [{
- label: '寮�鍚�',
- value: 0
- }, {
- label: '涓嶅紑鍚�',
- value: 1
- },],
- },
- {
- label: "缁戝畾鍩熷悕",
- prop: "domainUrl",
- span: 24,
- },
- {
- label: "绯荤粺鑳屾櫙",
- prop: "backgroundUrl",
- type: 'upload',
- listType: 'picture-img',
- dataType: 'string',
- action: '/api/ubcs-resource/oss/endpoint/put-file',
- propsHttp: {
- res: 'data',
- url: 'link',
- },
- hide: true,
- span: 24,
- },
- ]
},
data: [],
settingForm: {},
@@ -298,14 +187,12 @@
},
]
},
+ BooleanFlag:Boolean,
};
},
created() {
- // 鑾峰彇鍒皌rue杩樻槸false鐩存帴璧嬪�硷紝瀹氫箟鏂规硶浼氬氨鏄幏鍙栦笉鍒帮紝涓嶇煡閬撲粈涔堥棶棰橈紝寮哄埗鐢↗SON.parse浼氬湪鍚庨潰杩藉姞涓�涓猟isabled锛屾墍浠ョ洿鎺ヨ幏鍙栥�傚悗鏈熷鏋滄坊鍔燾loumn浼氬嚭鐜癰ug锛岀敤foreach寰幆鍑篶olumn鍦ㄥ垽鏂璽ype鏄惁绛変簬radio锛岀劧鍚庡皢鍗曠嫭radio鐨刣isabled鏀逛负res.data.data
- this.$axios.get('/api/ubcs-system/tenant/find-ssa-enable').then(res => {
- this.option.column[6].disabled= res.data.data
- });
+ this.initBoolean()
},
watch: {
'packageForm.packageId'() {
@@ -336,9 +223,128 @@
},
tenantId() {
return this.selectionList[0].tenantId;
+ },
+ option(){
+ return{
+ height: 'auto',
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ dialogWidth: 900,
+ dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
+ column: [
+ {
+ label: "绉熸埛ID",
+ prop: "tenantId",
+ width: 100,
+ search: true,
+ addDisplay: false,
+ editDisplay: false,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ョ鎴稩D",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "鍏ㄧО",
+ prop: "fullName",
+ width: 120,
+ span:24,
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ュ叏绉�",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "绉熸埛鍚嶇О",
+ prop: "tenantName",
+ search: true,
+ width: 180,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ュ弬鏁板悕绉�",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "鑱旂郴浜�",
+ prop: "linkman",
+ width: 150,
+ search: true,
+ rules: [{
+ required: true,
+ message: "璇疯緭鍏ヨ仈绯讳汉",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "鑱旂郴鐢佃瘽",
+ prop: "contactNumber",
+ width: 150,
+ },
+ {
+ label: "鑱旂郴鍦板潃",
+ prop: "address",
+ span: 24,
+ minRows: 2,
+ type: "textarea",
+ hide: true,
+ },
+ {
+ label: '寮�鍚笁鍛�',
+ prop: 'ssaEnable',
+ type: 'radio',
+ width: 100,
+ value:0,
+ disabled:this.BooleanFlag ,
+ dicData: [{
+ label: '寮�鍚�',
+ value: 0
+ }, {
+ label: '涓嶅紑鍚�',
+ value: 1
+ },],
+ },
+ {
+ label: "缁戝畾鍩熷悕",
+ prop: "domainUrl",
+ span: 24,
+ },
+ {
+ label: "绯荤粺鑳屾櫙",
+ prop: "backgroundUrl",
+ type: 'upload',
+ listType: 'picture-img',
+ dataType: 'string',
+ action: '/api/ubcs-resource/oss/endpoint/put-file',
+ propsHttp: {
+ res: 'data',
+ url: 'link',
+ },
+ hide: true,
+ span: 24,
+ },
+ ]
+ }
}
},
methods: {
+ initBoolean(){
+ this.$axios.get('/api/ubcs-system/tenant/find-ssa-enable').then(res => {
+ this.BooleanFlag=res.data.data;
+ console.log('---',res)
+ });
+ },
initData() {
getMenuTree().then(res => {
const column = this.findObject(this.packageOption.column, "menuId");
@@ -510,20 +516,20 @@
handlePackageSetting() {
this.packageSettingBox = true;
},
- handleSubmit(form, done, loading) {
- setting(this.ids, form).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "閰嶇疆鎴愬姛!"
- });
- done();
- this.box = false;
- }, error => {
- window.console.log(error);
- loading();
- });
- },
+ // handleSubmit(form, done, loading) {
+ // setting(this.ids, form).then(() => {
+ // this.onLoad(this.page);
+ // this.$message({
+ // type: "success",
+ // message: "閰嶇疆鎴愬姛!"
+ // });
+ // done();
+ // this.box = false;
+ // }, error => {
+ // window.console.log(error);
+ // loading();
+ // });
+ // },
handleDatasourceSubmit(form, done, loading) {
datasource(this.tenantId, form.datasourceId).then(() => {
this.$message({
diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js
index 0991057..63a88c9 100644
--- a/Source/UBCS-WEB/vue.config.js
+++ b/Source/UBCS-WEB/vue.config.js
@@ -28,8 +28,8 @@
//鏈湴鏈嶅姟鎺ュ彛鍦板潃
// target: 'http://localhost:37000',
// target: 'http://192.168.1.51:37000',
- // target: 'http://192.168.1.46:37000',
- target: 'http://dev.vci-tech.com:37000',
+ target: 'http://192.168.1.46:37000',
+ // target: 'http://dev.vci-tech.com:37000',
// target: 'http://192.168.1.51:37000/',
// target: 'http://192.168.1.104:37000',
// target: 'http://192.168.1.63:37000',
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
index d7b784b..4699ed2 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -416,6 +416,11 @@
// //榛樿鐨勫睘鎬ч兘涓嶇敤浠庡墠绔嫹璐�
// //璁剧疆缂栫爜闇�瑕佺殑榛樿灞炴�х殑鍐呭
copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, false);
+ cbo.setOid(VciBaseUtil.getPk());
+ cbo.setCreateTime(new Date());
+ cbo.setLastModifyTime(new Date());
+ cbo.setCreator(AuthUtil.getUser().getUserName());
+ cbo.setLastModifier(AuthUtil.getUser().getUserName());
// //TODO:鍥犱负榛樿鐨勫睘鎬ч兘涓嶆嫹璐濓紝鐩墠闆嗗洟鐮佸彨name锛屽苟娌℃湁浠嶥TO鎷疯礉鍒癱bo閲屻�傚鍔犱竴涓崟鐙鐞嗭紝浠ュ悗鍐嶇湅瑕佷笉瑕佽皟鏁�
cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName());
// //end -- modify by lihang @20220407
@@ -799,35 +804,27 @@
// BeanUtils.
// BeanUtils.copyProperties(orderDTO.getData(),cbo);
// cbo.setMaterialtype(Short.valueOf("1001"));
-// orderDTO.getData().forEach((key, value) -> {
-// if (!edit || (!checkUnAttrUnEdit(key) &&
-// !VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) {
-// try {
-// cbo.setAttributeValue(key, value);
-// } catch (Exception e) {
-// logger.error("璁剧疆灞炴�х殑鍊奸敊璇�", e);
-// }
-// }
-// });
+ orderDTO.getData().forEach((key, value) -> {
+ if (!edit || (!checkUnAttrUnEdit(key) &&
+ !VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) {
+ try {
+ cbo.getData().put(cbo.getData().containsKey(key.toUpperCase())?key.toUpperCase():key, value);
+ } catch (Exception e) {
+ logger.error("璁剧疆灞炴�х殑鍊奸敊璇�", e);
+ }
+ }
+ });
// BeanMap beanMap = BeanMap.create(cbo);
// beanMap.putAll(orderDTO.getData());
try {
-
- BeanUtilForVCI.copyPropertiesIgnoreNull(BeanUtilForVCI.convertMap(BaseModel.class, orderDTO.getData()), cbo);
- Map<String, String> data = new HashMap<>();
- data.put(CODE_CLASSIFY_OID_FIELD, classifyFullInfo.getCurrentClassifyVO().getOid());
- data.put(CODE_TEMPLATE_OID_FIELD, templateVO.getOid());
- data.put(CODE_FULL_PATH_FILED, fullPath);
- cbo.setData(data);
- cbo.setOid(VciBaseUtil.getPk());
- cbo.setCreateTime(new Date());
+ Map<String, String> data = new HashMap<>();
+ data.put(cbo.getData().containsKey(CODE_CLASSIFY_OID_FIELD.toUpperCase())?CODE_CLASSIFY_OID_FIELD.toUpperCase():CODE_CLASSIFY_OID_FIELD, classifyFullInfo.getCurrentClassifyVO().getOid());
+ data.put(cbo.getData().containsKey(CODE_TEMPLATE_OID_FIELD.toUpperCase())?CODE_TEMPLATE_OID_FIELD.toUpperCase():CODE_TEMPLATE_OID_FIELD, templateVO.getOid());
+ data.put(cbo.getData().containsKey(CODE_FULL_PATH_FILED.toUpperCase())?CODE_FULL_PATH_FILED.toUpperCase():CODE_FULL_PATH_FILED, fullPath);
+ cbo.getData().putAll(data);
cbo.setLastModifyTime(new Date());
- cbo.setCreator(AuthUtil.getUser().getUserName());
cbo.setLastModifier(AuthUtil.getUser().getUserName());
-// cbo.setCodeclsfid(classifyFullInfo.getCurrentClassifyVO().getOid());
-// cbo.setTemplateOid(templateVO.getOid());
-// cbo.setCodeclsfpath(fullPath);
cbo.setTs(new Date());
if (!edit && StringUtils.isBlank(orderDTO.getLcStatus())) {
//TODO 鍏堝啓鍥哄畾锛屽悗闈㈢敓鍛藉懆鏈熷ソ浜嗗湪缂栧啓
@@ -2108,17 +2105,10 @@
if (CollectionUtils.isEmpty(cbos)) {
throw new VciBaseException(DATA_OID_NOT_EXIST);
}
-// QueryWrapper<CodeWupin> btmWrapper = new QueryWrapper<>();
-// btmWrapper.eq("OID",orderDTO.getOid());
-// CodeWupin cbo = codeWupinMapper.selectOne(btmWrapper);
BaseModel cbo = cbos.get(0);
-// CodeClstemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
-// CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(orderDTO.getCodeRuleOid());
-
- if (cbo != null) {
+ if (cbo == null) {
throw new VciBaseException(DATA_OID_NOT_EXIST);
}
-// ClientBusinessObject cbo = cbos.get(0);
if (!cbo.getTs().toString().contains(VciDateUtil.date2Str(orderDTO.getTs(), VciDateUtil.DateTimeFormat))) {
throw new VciBaseException("鏁版嵁涓嶆槸鏈�鏂扮殑锛屽彲鑳戒粬浜哄凡缁忎慨鏀癸紝璇峰埛鏂板悗鍐嶈瘯");
}
@@ -2128,9 +2118,16 @@
//娉ㄦ剰妯℃澘涓嶈兘浣跨敤鏁版嵁瀛樺偍鐨勬椂鍊欑殑妯℃澘锛屽洜涓哄彲鑳戒細鍙樺寲
- //1. 鍒ゆ柇蹇呰緭椤�
+ String codeClassifyOid=cbo.getData().get(CODE_CLASSIFY_OID_FIELD.toUpperCase());
+ orderDTO.setCodeClassifyOid(codeClassifyOid);
+// CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid());
+// CodeClassifyTemplateVO templateVO= this.getUsedTemplateByClassifyOid(orderDTO.getCodeClassifyOid());
+
+
CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
- checkRequiredAttrOnOrder(templateVO, orderDTO);
+ orderDTO.setTemplateOid(templateVO.getOid());
+ //1. 鍒ゆ柇蹇呰緭椤�
+ checkRequiredAttrOnOrder(templateVO, orderDTO);
//2.鍏堟敞鍏ワ紝鍐嶇粍鍚堬紝鏈�鍚庢牎楠�
switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO);
//3.澶勭悊缁勫悎瑙勫垯銆傜粍鍚堣鍒欎笉鑳戒娇鐢ㄧ紪鐮佺殑灞炴�э紝鍥犱负缂栫爜鐨勭敓鎴愬彲鑳芥槸闇�瑕佸睘鎬х殑
@@ -2147,46 +2144,18 @@
copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true);
//浼佷笟鐮佸拰闆嗗洟鐮佺殑涓嶄慨鏀�
cbo.setDescription(orderDTO.getDescription());
- cbo.setName(orderDTO.getName());
+// cbo.setName(orderDTO.getName());
try {
cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription()) ? "" : orderDTO.getDescription());
cbo.setName(orderDTO.getName());
-//// cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription());
-// cbo.setAttributeValue("name", orderDTO.getName());
} catch (Exception e) {
e.printStackTrace();
}
+// cbo.getData().putAll(orderDTO.getData());
cbo.setLastModifyTime(new Date());
cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), Collections.singletonList(cbo));
-// codeWupinMapper.updateById(cbo);
-//
-// List<CodeWupinEntity> cboList = new ArrayList<>();
-//
-// //澶囨敞
-// cbo.setDescription(orderDTO.getDescription());
-// cboList.add(cbo);
-////
-//// cboList.add(cbo);
-// List<String> codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(),cboList);
-//
-//
-// List<String> charList = new ArrayList<>();
-// for (CodeWupinEntity wupinEntity : cboList) {
-// charList.add(wupinEntity.getId());
-// }
-// batchSaveSelectChar(templateVO, charList);
-// return codeList.size() > 0 ? codeList.get(0) : "";
-
-
- //淇敼鐨勬椂鍊欙紝缂栫爜鏄笉鍙樼殑
-// BatchCBO batchCBO = new BatchCBO();
-// batchCBO.getUpdateCbos().add(cbo);
-// List<ClientBusinessObject> cboList = new ArrayList<>();
-// cboList.add(cbo);
-// boService.persistenceBatch(batchCBO);
batchSaveSelectChar(templateVO, Collections.singletonList(cbo));
-// batchSaveSelectChar(templateVO, Arrays.asList(cbo.getId()));
}
/**
--
Gitblit v1.9.3