From 2025087a8dec8f2d301459b9d41c9ef00f6f9289 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 19 七月 2023 17:51:41 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue | 12 +++-
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java | 7 +-
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue | 2
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue | 38 +++++++++---
Source/UBCS-WEB/src/api/GetItem.js | 10 +++
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/application-dev.yml | 1
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 61 +++++++++++++-------
8 files changed, 94 insertions(+), 39 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/GetItem.js b/Source/UBCS-WEB/src/api/GetItem.js
index af5f940..875a9e8 100644
--- a/Source/UBCS-WEB/src/api/GetItem.js
+++ b/Source/UBCS-WEB/src/api/GetItem.js
@@ -56,6 +56,16 @@
}
})
}
+//瀵煎嚭
+export function exportCode(data){
+ return request({
+ url: 'api/ubcs-code/mdmEngineController/exportCode',
+ method: 'post',
+ params:{
+ ...data
+ }
+ })
+}
// 鎵归噺淇敼鏁版嵁
export function batchUpdateCode(data) {
return request({
diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index 1290ecb..12ec88d 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -77,7 +77,7 @@
<!-- 楂樼骇鏌ヨ-->
<advanced-query :options="this.options" :visible.sync="findvisible" @echoContion="echoContion"></advanced-query>
<!-- 瀵煎嚭-->
- <MasterTransfer :visible.sync="dialogPush" :tableHeadData="tableHeadFindData" :codeClassifyOid="codeClassifyOid" :tableData="tableData"></MasterTransfer>
+ <MasterTransfer :visible.sync="dialogPush" :tableHeadData="tableHeadFindData" :codeClassifyOid="codeClassifyOid" :tableData="tableData" :selectRow="selectRow"></MasterTransfer>
<!-- 鐩镐技椤�-->
<ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid"
:templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog>
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
index 9341b92..1663b08 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -1,8 +1,6 @@
<template>
<el-dialog :visible.sync="dialogPush" append-to-body :close-on-click-modal="false" @close="recoverPage" title="瀵煎嚭">
<div style="margin-bottom: 10px">
- <el-button type="success"
- @click="handleExcel">涓嬭浇 澶氱骇琛ㄥごexcel</el-button>
<el-radio-group v-model="radio">
<el-radio :label="0">閫夋嫨</el-radio>
<el-radio :label="1">鍏ㄩ儴</el-radio>
@@ -20,13 +18,18 @@
:data="data">
</el-transfer>
</div>
+ <div style="display: flex;justify-content: flex-end;">
+ <el-button size="small" plain type="success" @click="handleExcel">纭畾</el-button>
+ <el-button size="small" plain >鍙栨秷</el-button>
+ </div>
</el-dialog>
</template>
<script>
+import {exportCode} from '@/api/GetItem'
export default {
name: "MasterTransfer",
- props:['visible','tableHeadData','codeClassifyOid','tableData'],
+ props:['visible','tableHeadData','codeClassifyOid','tableData','selectRow'],
data(){
return {
data: [],
@@ -41,7 +44,7 @@
option:{
title: '鏂囨。鏍囬',
column: [{
- label: '澶氱骇琛ㄥご',
+ label: '涓绘暟鎹�',
prop: 'header',
children: []
}],
@@ -106,11 +109,28 @@
this.$emit('update:visible', false);
},
handleExcel(){
- this.$Export.excel({
- title: this.option.title,
- columns: this.option.column,
- data: this.option.data
- });
+ // this.$Export.excel({
+ // title: this.option.title,
+ // columns: this.option.column,
+ // data: this.option.data
+ // });
+ if(this.radio === 0){
+ if(this.selectRow.length<=0){
+ this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
+ }else {
+ const selectList=[]
+ let exportArr=[]
+ this.selectRow.forEach(item=>{
+ selectList.push(
+ item.oid
+ )
+ })
+ exportArr=this.value.map(index => this.tableHeadData[index].prop);
+ exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':selectList,'attrIdIndexMap[index]':exportArr}).then(res=>{
+ console.log(res)
+ })
+ }
+ };
},
}
}
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 43120ab..d5f83d3 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -234,11 +234,14 @@
<el-button size="small" type="primary" @click="addVisible=false">鍙栨秷</el-button>
</div>
</el-dialog>
+
<!-- 鍙傜収閰嶇疆-->
- <refer-config-form-dialog
- ref="referConfigFormDialog"
- @echoReferConfig="echoReferConfig"
- ></refer-config-form-dialog>
+ <refer-config-dialog
+ :display="referConfigVisble"
+ @setReferConfigValue="setReferConfigValue"
+ :referConfigOption="referConfigOption"
+ ></refer-config-dialog>
+
</div>
<el-table :data="ProData"
style="width: 100%"
@@ -356,6 +359,11 @@
},
data() {
return {
+ referConfigText:"",
+ referConfigVisble:false,
+ referConfigOption:{
+ referConfig:'',
+ },
screenWidth: document.documentElement.clientWidth, // 灞忓箷瀹藉害
//褰撳墠鍗曞厓鏍�
CurrentCell:'',
@@ -1332,7 +1340,8 @@
//鏃堕棿鏍煎紡涓嬫媺妗�
codeDataFlag:false,
// 缁勫悎瑙勫崟鍏冩牸缂栬緫鍥炲~
- componentRuleText:""
+ componentRuleText:"",
+
}
},
computed:{
@@ -1352,17 +1361,6 @@
}
},
mounted() {
- window.addEventListener(
- 'resize',
- () => {
- if(Math.abs(this.screenWidth - document.body.clientWidth) > 20) {
- this.$nextTick(() => {
- this.$refs.AddOriginPlace.refreshTable();
- })
- }
- this.screenWidth = document.body.clientWidth;
- }
- )
},
created() {
this.option.column.forEach((item,index) => {
@@ -1569,12 +1567,20 @@
this.rowOid = row.oid;
this.CurrentCell=row;
if(column.property == 'referConfig' ){
- this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
- this.$refs.referConfigFormDialog.onloadAttrData();
+ this.referConfigVisble= true;
+ this.referConfigOption = {
+ referConfig: this.referConfigText || '',
+ }
+ if(this.CurrentCell.referConfig == ''){
+ this.referConfigOption = {
+ referConfig:'',
+ }
+ }
+ console.log('--',this.referConfigOption)
+ // this.$refs.referConfigFormDialog.onloadAttrData();
}else if(column.property == 'classifyInvokeLevelName'){
this.injectVisible=true;
}else if(column.property == 'componentRule'){
-
if(this.CurrentCell){
this.CurrentCell.componentRule=this.componentRuleText;
}
@@ -1599,7 +1605,6 @@
},
saveRows() {
this.editingRows = null;
- console.log('1321')
},
// 鏋氫妇娉ㄥ叆娣诲姞涓�琛岀┖鏁版嵁
addRow() {
@@ -1761,7 +1766,12 @@
},
//琛ㄦ牸閲嶇疆
reset() {
- this.CrudRend()
+ // this.CrudRend(
+ this.referConfigVisble=true;
+ this.referConfigOption = {
+ referConfig: 'confing',
+ }
+ console.log(this.referConfigOption)
},
//鍚屾鍒板叾浠栨ā鏉�
syncHandle() {
@@ -1813,6 +1823,15 @@
}
},
+ setReferConfigValue(content){
+ let submitFormJson = JSON.stringify(content);
+ this.referConfigText=submitFormJson
+ if(this.CurrentCell){
+ this.$set(this.CurrentCell, 'referConfig', JSON.stringify(content))
+ }else {
+ this.$set(this.attrRow, 'referConfig', JSON.stringify(content))
+ }
+ },
// 鎺掑簭
sortChange(val) {
console.log(val)
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index 265d4ee..2ed6a7c 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -914,7 +914,6 @@
//涓氬姟绫诲瀷鎺ュ彛
btmdefaultRend(masterParameter){
referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
- // console.log(res)
this.BtmData=res.data.data.records
})
},
@@ -927,7 +926,6 @@
this.crudOid=row.oid;
this.crudLCStatus=row.lcStatus;
this.crudArray=selection;
- console.log(selection,row)
gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': row.oid}).then(res => {
this.ProData = res.data.data;
}).catch(res => {
diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
index c561341..3fadae7 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
@@ -24,17 +24,23 @@
components: {referConfigFormDialog, referConfigCrudDialog},
data() {
return {
-
};
},
watch:{
+ display:{
+ handler(newval,oldval){
+ console.log('newval',newval)
+ console.log('oldval',oldval)
+ }
+ },
referConfigOption (){
+ console.log(111)
if(func.notEmpty(this.referConfigOption.referConfig) || func.notEmpty(this.referConfigOption.referBtmId)){
this.openReconfigInterFace(this.referConfigOption);
}else{
this.openTipsChooseOrCust();
}
- }
+ },
},
methods: {
echoReferConfig(value) {
@@ -94,4 +100,4 @@
<style>
-</style>
\ No newline at end of file
+</style>
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
index 943eeda..d62a822 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -1015,7 +1015,6 @@
}
} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.TREE.getValue())) {//鏍戝舰
Map<String, Object> condtionMap = new HashMap<>();
- String parentFieldName=coderefersecSearchVO.getParentFieldName();
//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId));
@@ -1026,6 +1025,7 @@
String oidFieldName = StringUtils.isNotBlank(coderefersecSearchVO.getParentUsedField())?coderefersecSearchVO.getParentUsedField():coderefersecSearchVO.getValueField();
String parentValue =coderefersecSearchVO.getParentValue();
+ String parentFieldName =StringUtils.isBlank(coderefersecSearchVO.getParentFieldName())?"":coderefersecSearchVO.getParentFieldName();
List<CodeSrchCondConfigVO> codeSrchCondConfigVOList = coderefersecSearchVO.getCodeSrchCondConfigVOS();
List<CodeShowFieldConfigVO> codeShowFieldConfigVOS=coderefersecSearchVO.getCodeShowFieldConfigVOS();
if (!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) {
@@ -1072,7 +1072,7 @@
//鏌ヨ鍏ㄩ儴鐨勪俊鎭�
buildSqlwhere+= " and oid in (select oid from " +referTable + " START WITH " + coderefersecSearchVO.getParentFieldName() + " "+
parentOidSql +
- " CONNECT BY PRIOR " + oidFieldName + " = " + coderefersecSearchVO.getParentFieldName() + ")";
+ " CONNECT BY PRIOR " + oidFieldName + " = " + parentFieldName + ")";
/*}else{
if(StringUtils.isNotBlank(coderefersecSearchVO.getParentFieldName()) && StringUtils.isNotBlank(parentValue)){
@@ -1098,7 +1098,8 @@
String value = map.getOrDefault(valueField.toUpperCase(Locale.ROOT), "").toString();
String text = map.getOrDefault(textField.toUpperCase(Locale.ROOT), "").toString();
String description = map.getOrDefault("description".toUpperCase(Locale.ROOT), "").toString();
- CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, text, "", description);
+ String pid = map.getOrDefault(parentFieldName.toUpperCase(Locale.ROOT), "").toString();
+ CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, text, pid, description);
codeSectionValueVOList.add(sectionValueVO);
});
}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/application-dev.yml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/application-dev.yml
index 2b5de9c..f283218 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/application-dev.yml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/application-dev.yml
@@ -21,6 +21,7 @@
mybatis-plus:
configuration:
map-underscore-to-camel-case: false
+ call-setters-on-nulls: true
#椤跺眰鎵归噺鐢宠閰嶇疆
--
Gitblit v1.9.3