From d5bafa63b4dcc7ad6840560134dd41f38ded1390 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期五, 30 六月 2023 18:09:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue | 2
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue | 37 +++-----
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 28 ++----
Source/UBCS-WEB/src/api/MasterData/master.js | 1
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 6 +
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue | 72 ++++++++---------
Source/UBCS-WEB/src/views/work/process/leave/handle.vue | 2
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeWupinMapper.xml | 8 +-
Source/UBCS-WEB/src/components/work/BusinessWork.vue | 5
Source/UBCS-WEB/src/api/template/templateAttr.js | 8 ++
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 28 ++++++
12 files changed, 110 insertions(+), 89 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/MasterData/master.js b/Source/UBCS-WEB/src/api/MasterData/master.js
index 6480a77..ac79efc 100644
--- a/Source/UBCS-WEB/src/api/MasterData/master.js
+++ b/Source/UBCS-WEB/src/api/MasterData/master.js
@@ -9,6 +9,7 @@
}
})
}
+//缂栫爜瑙勫垯
export const defaultReferDataGrid = (params) => {
return request({
url: '/api/ubcs-code/mdmEngineController/defaultReferDataGrid',
diff --git a/Source/UBCS-WEB/src/api/template/templateAttr.js b/Source/UBCS-WEB/src/api/template/templateAttr.js
index b0d6a1d..238a09d 100644
--- a/Source/UBCS-WEB/src/api/template/templateAttr.js
+++ b/Source/UBCS-WEB/src/api/template/templateAttr.js
@@ -110,6 +110,14 @@
data:data
})
}
+//鏍戜慨鏀�
+export const TreeEditSave = (data) =>{
+ return request({
+ url:'/api/ubcs-code/codeClassify/editSave',
+ method: 'post',
+ data:data
+ })
+}
//鍩烘湰淇℃伅琛ㄥ崟鏁版嵁
export const getObjectByOid = (oid) =>{
return request({
diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index fa8b390..21a5b5f 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -530,4 +530,10 @@
background-color: #f5f7fa !important;
}
}
+
+/deep/ .el-button {
+ margin: 0 10px 10px 0;
+}
+
+
</style>
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 7649338..942a15c 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -247,6 +247,7 @@
<el-table-column v-for="item in this.option.column" :key="item.id"
:label="item.label"
:prop="item.prop"
+ :formatter="formAttr"
:width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
:show-overflow-tooltip="true"
align="center"
@@ -254,6 +255,11 @@
<template slot-scope="{ row }">
<el-input v-if="editingRows === row && editShows== item.prop" v-model="row[item.prop]"
@blur="saveRows"></el-input>
+ <el-switch
+ v-if="item.label === 'true' || item.label === 'false'"
+ active-color="#13ce66"
+ inactive-color="#ff4949">
+ </el-switch>
<span v-else>{{ row[item.prop] }}</span>
</template>
</el-table-column>
@@ -1161,9 +1167,23 @@
},
methods: {
-
+ formAttr(row, column) {
+ console.log(row,column)
+ // if (column.property === "keyAttrFlag"
+ // ||column.property === "queryAttrFlag"
+ // ||column.property === "seniorQueryAttrFlag"
+ // ||column.property === "sameRepeatAttrFlag"
+ // ||column.property === "requireFlag"
+ // ||column.property === "formDisplayFlag"
+ // ||column.property === "tableDisplayFlag"
+ // ||column.property === "sortAttrFlag") {
+ // return row[column.property] =='true'? "鏄�" : "鍚�";
+ // }
+ // return row[column.property];
+ },
//灞炴�у垎缁勬寜閽�
attrVisibleHandle() {
+ this.formatBoolean()
if (this.CrudSelect.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
} else if (this.CrudSelect < 1) {
@@ -1454,6 +1474,8 @@
}
</script>
-<style scoped>
-
+<style scoped lang="scss">
+/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 d0270c8..ffa58b5 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -2,19 +2,10 @@
<div>
<avue-form v-model="loneTreeNewForm" :option="option" @submit="submit" v-if="flag == 'renonly'">
</avue-form>
- <avue-form v-model="loneTreeNewForm" :option="options" @submit="submit" v-else-if="flag == 'edit'">
+ <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
</avue-form>
<div>
<el-dialog :visible.sync="dialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
- <div>
- <el-input placeholder="璇烽�夋嫨鍐呭" v-model="masterInput" class="input-with-select">
- <el-select v-model="MasterSearchSelects" placeholder="璇烽�夋嫨">
- <el-option label="鑻辨枃鍚嶇О" value="0"></el-option>
- <el-option label="涓枃鍚嶇О" value="1"></el-option>
- </el-select>
- <el-button slot="append" icon="el-icon-search"></el-button>
- </el-input>
- </div>
<avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud>
<div style="padding-top: 10px;display: flex; justify-content: flex-end" >
<el-button type="primary" size="small" @click="MasterHandlerClick">纭畾</el-button>
@@ -27,30 +18,23 @@
<script>
import {defaultReferDataGrid} from '@/api/MasterData/master'
+import {TreeEditSave} from '@/api/template/templateAttr'
export default {
name: "classifyTreeform.vue",
props: ['loneTreeNewForm','flag'],
data() {
return {
+ name:"",
+ oid:"",
masterInput:'',
MasterSearchSelects:"",
- masterData:[
- {
- id:'001',
- name:'001',
- description:'001'
- },
- {
- id:'002',
- name:'002',
- description:'002'
- }
- ],
+ masterData:[],
masterOption:{
addBtn:false,
index:true,
border:true,
selection:true,
+ menu:false,
height:380,
column:[
{
@@ -80,7 +64,7 @@
{
label: '涓婚搴�/鍒嗙被缂栧彿',
prop: 'btmtypeid',
- labelWidth:128,
+ labelWidth:135,
readonly: true,
rules: [{
required: true,
@@ -92,7 +76,7 @@
label: '涓婚搴�/鍒嗙被鍚嶇О',
prop: 'name',
readonly: true,
- labelWidth:128,
+ labelWidth:135,
rules: [{
required: true,
message: "涓婚搴�/鍒嗙被鍚嶇О",
@@ -137,8 +121,6 @@
]
},
options: {
- submitBtn:false,
- emptyBtn:false,
column: [
{
label: '涓婚搴�/鍒嗙被缂栧彿',
@@ -199,11 +181,16 @@
}
},
created() {
-
+ this.defaultRend()
},
methods: {
- submit(form, done) {
- this.$message.success(JSON.stringify(form));
+ submits(form,done){
+ console.log(this.loneTreeNewForm)
+ TreeEditSave(this.loneTreeNewForm).then(res=>{
+ this.$message.success('淇敼鎴愬姛');
+ }).catch(res=>{
+ this.$message.error(res)
+ })
done()
},
error(err) {
@@ -215,26 +202,35 @@
console.log(this.dialogVisible)
},
MasterHandlerClick(){
+ if(this.masterSelectList.length>1){
+ this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
+ }else if(this.masterSelectList.length<=0){
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ }else {
+ this.dialogVisible=false;
+ this.masterSelectList=[]
+ this.loneTreeNewForm.codeRuleOidName=this.name;
+ this.loneTreeNewForm.codeRuleOid=this.oid;
+ console.log(this.masterSelectList)
+ }
+ },
+ defaultRend(){
defaultReferDataGrid({
referType:'coderule',
isMuti:'false',
'conditionMap["lcstatus"]':'Released'
}).then(res=>{
console.log('---',res)
+ this.masterData=res.data.records;
+
})
- // if(this.masterSelectList.length>1){
- // this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- // }else if(this.masterSelectList.length<=0){
- // this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- // }else {
- // this.dialogVisible=false;
- // console.log(this.masterInput)
- // console.log(this.MasterSearchSelect)
- // }
},
masterSelect(row){
console.log(row)
this.masterSelectList=row;
+ this.name=row[0].name;
+ this.oid=row[0].oid;
+ console.log('oid',this.oid)
}
}
}
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index 6793b75..a95f7dd 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -433,14 +433,11 @@
mounted() {
this.type = this.tabOption.column[0];
this.getAttr();
- console.log('11',this.nodeClickList)
},
computed:{
crudTreeOption(){
return{
index: true,
- indexClassName:"搴忓彿",
- indexLabelClassName:'搴忓彿',
border: true,
height:180,
selection:true,
@@ -460,11 +457,13 @@
},
{
label:"鐗堟湰鍙�",
- prop:"revisionSeq"
+ prop:"revisionSeq",
+ display:false
},
{
label:"鐘舵��",
- prop:"lcStatusText"
+ prop:"lcStatusText",
+ display:false
}
]
}
@@ -477,7 +476,6 @@
this.crudArray=selection;
gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => {
this.ProData = res.data.data;
- console.log(this.ProData)
}).catch(res => {
this.$message.error(res)
})
@@ -595,16 +593,14 @@
},
//淇敼鍥炲~
TreeEdit() {
- // if (this.nodeClickList == "") {
- // this.$message({
- // type: 'warning',
- // message: '璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�!'
- // });
- // } else {
- // this.TreeEditFormVisible = true;
- // console.log('---',this.CloneTreedata)
- // }
- this.TreeEditFormVisible=true;
+ if (this.nodeClickList == "") {
+ this.$message({
+ type: 'warning',
+ message: '璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�!'
+ });
+ } else {
+ this.TreeEditFormVisible = true;
+ }
},
//鏍戝埛鏂�
flushed() {
@@ -677,7 +673,6 @@
async nodeClick(data) {
//瀹氫箟涓�涓ā鏉垮睘鎬d锛屾暟鎹槸妯℃澘绠$悊琛ㄦ牸閲岄潰鐨刼id
this.nodeClickList = data
- console.log(data)
this.ProData=[]
try {
await TreeObjcet(data.oid).then(res => {
@@ -694,7 +689,7 @@
}
})
}).catch(res => {
- console.log(res)
+ this.$message.error(res)
})
// 鍩烘湰淇℃伅琛ㄥ崟鏁版嵁
await getObjectByOid(this.nodeClickList.oid).then(res => {
@@ -703,13 +698,12 @@
this.$message.error(res)
})
} catch (error) {
- console.log(error)
+ this.$message.error(error)
}
},
//鍏嬮殕妯℃澘鏍戠殑鐐瑰嚮鍒囨崲鏁版嵁
async ClonenodeClick(data){
this.ClonenodeClickList=data;
- console.log("aaa",this.ClonenodeClickList.oid)
await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res=>{
this.CloneFormlist = res.data.data.filter(item => {
if (item.codeclassifyoid != "") {
@@ -824,7 +818,7 @@
});
done()
}).catch(res => {
- console.log(res)
+ this.$message.error(res)
})
},
//妯℃澘绠$悊鍒犻櫎
@@ -840,7 +834,6 @@
},
//妯℃澘绠$悊琛ㄦ牸鏌ヨ
EnterFind() {
- console.log(this.Formlist)
if (this.FindText == "") {
gridCodeClassifyTemplate().then(res => {
this.Formlist = res.data.data
diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
index 0b8fa27..08ab794 100644
--- a/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
+++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
@@ -24,7 +24,7 @@
</template>
</avue-crud>
<div class="avue-dialog__footer">
- <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div>
+ <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }} </div>
<el-button @click="visible=false">鍙� 娑�</el-button>
<el-button @click="setValue" type="primary">纭� 瀹�</el-button>
</div>
diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
index 178c19f..4968fdf 100644
--- a/Source/UBCS-WEB/src/components/work/BusinessWork.vue
+++ b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
@@ -36,7 +36,7 @@
ids:{
handler(newval,oldval){
this.BuinessOids=newval;
- this.HandlerRend()
+ this.BuinseseRend()
console.log(newval)
console.log(this.BuinessOids)
},
@@ -44,12 +44,13 @@
}
},
created() {
- // this.HandlerRend()
},
mounted() {
},
methods:{
HandlerRend(){
+ },
+ BuinseseRend(){
businese({
btmType:'wupin',
'conditionMap[oid]':this.BuinessOids.toString()
diff --git a/Source/UBCS-WEB/src/views/work/process/leave/handle.vue b/Source/UBCS-WEB/src/views/work/process/leave/handle.vue
index ffcad37..50f4ae3 100644
--- a/Source/UBCS-WEB/src/views/work/process/leave/handle.vue
+++ b/Source/UBCS-WEB/src/views/work/process/leave/handle.vue
@@ -5,7 +5,7 @@
<el-card class="dialogwarp_tab_card">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="涓氬姟鏁版嵁淇℃伅" name="first">
- <businesswork :ids="ids" :templateId="templateId"></businesswork>
+ <businesswork ref="businesswork":ids="ids" :templateId="templateId"></businesswork>
</el-tab-pane>
<el-tab-pane label="娴佺▼璺熻釜" name="second">
<avue-crud :data="flowList" :option="option" ref="crud">
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 55fac7f..834bb02 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
@@ -1577,7 +1577,7 @@
List<CodeClassifyTemplateAttrVO> referAttrVOs = templateVO.getAttributes().stream().filter(
s -> StringUtils.isNotBlank(s.getReferBtmId()) || StringUtils.isNotBlank(s.getReferConfig())
).collect(Collectors.toList());
- Map<String/**鍙傜収鐨勫睘鎬�**/, String/**瀹為檯鐨勫瓧娈�**/> referFieldMap = new HashMap<>();
+ Map<String/**鍙傜収鐨勫睘鎬�**/, String/**瀹為檯鐨勫瓧娈�**/> referFieldMap = new ConcurrentHashMap<>();
if (!CollectionUtils.isEmpty(referAttrVOs)) {
referAttrVOs.parallelStream().forEach(attrVO -> {
UIFormReferVO referVO = null;
@@ -1610,11 +1610,7 @@
});
}
R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getDefaultAttrByBtmId(btmType);
-// Optional.ofNullable(allAttributeByBtmId.getData()).orElseGet(allAttributeByBtmId.getData().getAttributes()).stream().forEach(attrId -> {
-// if (!selectFieldList.contains(attrId.getOid()) && !"secretgrade".equalsIgnoreCase(attrId.getOid())) {
-// selectFieldList.add(attrId.getOid());
-// }
-// });
+
if (allAttributeByBtmId.getData() != null) {
for (BtmTypeAttributeVO attribute : allAttributeByBtmId.getData().getAttributes()) {
if (!selectFieldList.contains(attribute.getId()) && !"secretgrade".equalsIgnoreCase(attribute.getId())) {
@@ -1861,13 +1857,13 @@
return (field.contains(".") ? "" : "t.") + field + SPACE + "= '" + getStringValueInWhere(field, value, attrVOMap) + "'" + SPACE;
}
} else {
- if (referFieldMap.containsKey(key)) {
- //璇存槑鏄弬鐓х殑锛屾垜浠弬鐓х殑鏌ヨ閮借涓烘槸瀛楃涓诧紝濡傛灉鏄椂闂存牸寮忕殑鏌ヨ鑲畾鏈夐棶棰橈紝
- String selectKey = referFieldMap.get(key);
- return getSqlByValue(selectKey, value, null, btmType);
- } else {
+// if (referFieldMap.containsKey(key)) {
+// //璇存槑鏄弬鐓х殑锛屾垜浠弬鐓х殑鏌ヨ閮借涓烘槸瀛楃涓诧紝濡傛灉鏄椂闂存牸寮忕殑鏌ヨ鑲畾鏈夐棶棰橈紝
+// String selectKey = referFieldMap.get(key);
+// return getSqlByValue(selectKey, value, null, btmType);
+// } else {
return getSqlByValue(key, value, attrVOMap, btmType);
- }
+// }
}
}
return "";
@@ -1921,7 +1917,7 @@
}
if (field.contains(".") && attrVOMap != null && attrVOMap.containsKey(field.split("\\.")[0].toLowerCase(Locale.ROOT))) {
//鏄弬鐓�
- return value;
+ return "'" + value + "'";
} else {
return value;
}
@@ -1945,13 +1941,13 @@
|| VciFieldTypeEnum.VTInteger.equals(fieldTypeEnum)) {
return value;
} else {
- return value;
+ return "'" + value + "'";
}
} else {
if ((value.startsWith("(") && value.endsWith(")")) || (value.startsWith("'") && value.endsWith("'"))) {
return value;
}
- return value;
+ return "'" + value + "'";
}
}
@@ -2075,9 +2071,7 @@
.append(SPACE)
.append(QueryOptionConstant.EQUAL)
.append(SPACE)
- //.append("'")
.append(value);
- // .append("'");
}
sql.append(SPACE);
return sql.toString();
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
index ff970e7..ad6059a 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -2209,7 +2209,7 @@
} else if (StringUtils.isNotBlank(orderDTO.getCopyFromVersion())) {
sql[0] += " and oid != '" + orderDTO.getCopyFromVersion() + "'";
}
- sql[0] += " and islastR = '1' and islastV = '1' ";
+ sql[0] += " and lastR = '1' and lastV = '1' ";
if (commonsMapper.queryCountBySql(sql[0]) > 0) {
String ruleInfoMsg = keyRuleVO == null ? "" : "鏌ヨ瑙勫垯锛氬幓闄ょ┖鏍�--{0},蹇界暐澶у皬鍐�--{1},蹇界暐鍏ㄥ崐瑙�--{2},蹇界暐鍏ㄩ儴绌烘牸--{3}";
String[] objs = new String[]{trim ? "鏄�" : "鍚�", ignoreCase ? "鏄�" : "鍚�", ignoreWidth ? "鏄�" : "鍚�", trimAll ? "鏄�" : "鍚�"};
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeWupinMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeWupinMapper.xml
index 83592ad..124812f 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeWupinMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeWupinMapper.xml
@@ -8,10 +8,10 @@
<result column="REVISIONOID" property="revisionOid"/>
<result column="NAMEOID" property="nameOid"/>
<result column="BTMNAME" property="btmname"/>
- <result column="ISLASTR" property="lastR"/>
- <result column="ISFIRSTR" property="firstR"/>
- <result column="ISLASTV" property="lastV"/>
- <result column="ISFIRSTV" property="firstV"/>
+ <result column="LASTR" property="lastR"/>
+ <result column="FIRSTR" property="firstR"/>
+ <result column="LASTV" property="lastV"/>
+ <result column="FIRSTV" property="firstV"/>
<result column="CREATOR" property="creator"/>
<result column="CREATETIME" property="createTime"/>
<result column="LASTMODIFIER" property="lastModifier"/>
--
Gitblit v1.9.3