Browse Source

优化

master
陈裕财 2 years ago
parent
commit
8201f1c8fc
  1. 5
      src/components/mdp-ui/mixin/MdpTableMixin.js
  2. 11
      src/views/mdp/form/formData/Index.vue
  3. 8
      src/views/mdp/form/formDef/Form.vue
  4. 4
      src/views/mdp/form/formField/FieldCfg.vue
  5. 4
      src/views/mdp/form/formField/Index.vue

5
src/components/mdp-ui/mixin/MdpTableMixin.js

@ -516,6 +516,11 @@ export const MdpTableMixin = {
if(d[expandFieldName] && d[expandFieldName] instanceof String){
d[expandFieldName]=JSON.parse(d[expandFieldName])
}
if(d[expandFieldName] instanceof Array){
d[expandFieldName].forEach(k=>{
d[expandFieldName+"."+k.id]=k.value
})
}
})
}
},

11
src/views/mdp/form/formData/Index.vue

@ -1,7 +1,7 @@
<template>
<section class="border padding">
<el-row>
<mdp-select v-model="filters.fstate" width="8em" item-code="bizFlowState" placeholder="审批状态"/>
<mdp-select v-model="filters.fstate" width="8em" item-code="bizFlowState" placeholder="审批状态"/>
<mdp-select-tag v-model="filters['tagIds']" width="8em" clearable filterable placeholder="标签" />
<el-input v-model="filters.bizKey" style="width: 15em;" placeholder="业务编号查询 输入 *字符* >10 <9 等" clearable title="支持>、<、 >=、<=、!=、*字符*、$IS NULL、$IN 1,2,3、$between 1,5等操作符"/>
@ -255,9 +255,16 @@ export default {
if(datas){
datas.forEach(d=>{
if(d.extInfos){
d.extInfos=JSON.parse(d.extInfos)
var extInfos=JSON.parse(d.extInfos)
var extInfos2={}
extInfos.forEach(e=>{
extInfos2[e.id]=e.value
d['extInfos.'+e.id]=e.value
})
d.extInfos=extInfos2
}
})
}
},

8
src/views/mdp/form/formDef/Form.vue

@ -33,7 +33,7 @@
<mdp-select item-code="form_data_type" show-style="tag" v-model="editForm.dataType"></mdp-select>
</el-form-item>
<el-form-item label="主键" prop="pks">
<mdp-select show-style="tag" :multiple="true" @click.native="oldPks=editForm.pks" v-model="editForm.pks" :plus-options="pkOptions" :props="{id:'id',name:'title'}" split="," @change2="onPksChange"></mdp-select>
<mdp-select show-style="tag" :multiple="true" v-model="editForm.pks" :plus-options="pkOptions" :props="{id:'id',name:'title'}" split="," @change2="onPksChange"></mdp-select>
</el-form-item>
<span v-if="['2','3'].some(k=>k==editForm.dataType)">
<el-form-item label="表名">
@ -128,7 +128,6 @@ export default {
formFields:[],
editable:false,//
formFieldsVisible:false,
oldPks:'',//
}
},
methods: {
@ -148,12 +147,14 @@ export default {
this.formFields=data.formFields
this.currOpType='edit'
this.formFieldsVisible=true;
this.dataBak={...this.editForm}
}else{
this.editForm.id=this.formId
this.formFields=[]
this.currOpType='add'
this.formFieldsVisible=true;
this.editForm.dataField='extInfos'
this.dataBak={...this.editForm}
}
}else{
this.$notify.error(tips.msg)
@ -244,7 +245,8 @@ export default {
onPksChange(pks){
var pksCtimeList=pks.filter(k=>k.id.indexOf('ctime')>=0)
if(pksCtimeList && pksCtimeList.length>1){
this.editForm.pks=this.oldPks;
debugger
this.editForm.pks=this.dataBak.pks;
this.$notify.error("创建日期最多只能选一个作为主键")
}
}

4
src/views/mdp/form/formField/FieldCfg.vue

@ -248,8 +248,8 @@
return;
}
if(v.indexOf(".")>=0){
if(v.indexOf('ext_info.')!=0){
this.$notify.error('编码格式错误,前缀只支持【空前缀、ext_info.】两种')
if(v.indexOf('ext_infos.')!=0){
this.$notify.error('编码格式错误,前缀只支持【空前缀、ext_infos.】两种')
return;
}
}

4
src/views/mdp/form/formField/Index.vue

@ -602,6 +602,10 @@ export default {
getMyFieldList(list,children){
if(children && children.length>0){
children.forEach(k=>{
if(['card','tabs','row'].some(t=>t==k.extType)){
k.req='0'
k.bkey='0'
}
if(k.children && k.children.length>0){
var childs=k.children
childs.forEach(c=>c.pid=k.id)

Loading…
Cancel
Save