Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
0329f9ba
提交
0329f9ba
编写于
11月 13, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init
上级
930130a1
变更
22
显示空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
2341 行增加
和
2 行删除
+2341
-2
package.json
app_web/package.json
+4
-0
app-avue-crud.less
app_web/src/components/app-avue-crud/app-avue-crud.less
+0
-0
app-avue-crud.vue
app_web/src/components/app-avue-crud/app-avue-crud.vue
+320
-0
decoder.js
app_web/src/components/app-avue-crud/decoder.js
+82
-0
deepClone.js
app_web/src/components/app-avue-crud/deepClone.js
+41
-0
dic.js
app_web/src/components/app-avue-crud/dic.js
+85
-0
option.js
app_web/src/components/app-avue-crud/option.js
+436
-0
store.js
app_web/src/components/app-avue-crud/store.js
+120
-0
validate.js
app_web/src/components/app-avue-crud/validate.js
+253
-0
app-form-json.less
app_web/src/components/app-form-json/app-form-json.less
+53
-0
app-form-json.vue
app_web/src/components/app-form-json/app-form-json.vue
+291
-0
app-treeselect-refreshview.less
...pp-treeselect-refreshview/app-treeselect-refreshview.less
+0
-0
app-treeselect-refreshview.vue
...app-treeselect-refreshview/app-treeselect-refreshview.vue
+257
-0
avue-component.less
app_web/src/components/avue-component/avue-component.less
+14
-0
avue-component.vue
app_web/src/components/avue-component/avue-component.vue
+116
-0
user-register.ts
app_web/src/user-register.ts
+8
-1
tsconfig.json
app_web/tsconfig.json
+10
-0
DevNamingRegister.java
.../src/main/java/cn/ibizlab/devsimul/DevNamingRegister.java
+57
-0
application-boot.yml
ibzdst-boot/src/main/resources/application-boot.yml
+14
-0
application.yml
ibzdst-boot/src/main/resources/application.yml
+1
-1
20201009053919_changelog.xml
...esources/liquibase/changelog/20201009053919_changelog.xml
+144
-0
20201113080245_changelog.xml
...esources/liquibase/changelog/20201113080245_changelog.xml
+35
-0
未找到文件。
app_web/package.json
浏览文件 @
0329f9ba
...
...
@@ -21,8 +21,10 @@
"@fullcalendar/vue"
:
"^4.4.0"
,
"vuedraggable"
:
"^2.23.2"
,
"async-validator"
:
"^3.3.0"
,
"@json-editor/json-editor"
:
"1.4.0-beta.0"
,
"@popperjs/core"
:
"^2.4.3"
,
"axios"
:
"^0.19.1"
,
"bootstrap-vue"
:
"^2.18.1"
,
"core-js"
:
"^3.4.4"
,
"echarts"
:
"^4.6.0"
,
"element-ui"
:
"^2.13.0"
,
...
...
@@ -31,6 +33,8 @@
"ibiz-gantt-elastic"
:
"^1.0.17"
,
"ibiz-vue-lib"
:
"^0.1.13"
,
"interactjs"
:
"^1.9.4"
,
"js-object-pretty-print"
:
"^0.3.0"
,
"v-jsoneditor"
:
"^1.4.1"
,
"moment"
:
"^2.24.0"
,
"path-to-regexp"
:
"^6.1.0"
,
"qs"
:
"^6.9.1"
,
...
...
app_web/src/components/app-avue-crud/app-avue-crud.less
0 → 100644
浏览文件 @
0329f9ba
app_web/src/components/app-avue-crud/app-avue-crud.vue
0 → 100644
浏览文件 @
0329f9ba
<
template
>
<div
class=
"crud"
>
<div
class=
"avue-crud__menu"
>
<div
class=
"avue-crud__left"
>
<el-button-group>
<el-button
type=
"primary"
size=
"medium"
@
click=
"open('table','表格配置')"
>
表格配置
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click=
"open('menu','操作配置')"
>
操作配置
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click=
"open('dialog','弹框配置')"
>
弹框配置
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click=
"open('btn','按钮配置')"
>
按钮配置
</el-button>
</el-button-group>
</div>
<div
class=
"avue-crud__right"
>
<el-button
type=
"text"
size=
"medium"
icon=
"el-icon-document"
@
click=
"handleAvueDoc"
>
Avue文档
</el-button>
<el-button
type=
"text"
size=
"medium"
icon=
"el-icon-upload2"
@
click=
"importJsonVisible = true"
>
导入JSON
</el-button>
<el-button
type=
"text"
size=
"medium"
icon=
"el-icon-download"
@
click=
"handleGenerateJson"
>
保存JSON
</el-button>
<el-button
type=
"text"
size=
"medium"
icon=
"el-icon-view"
@
click=
"handlePreview"
>
预览
</el-button>
<el-button
class=
"danger"
type=
"text"
size=
"medium"
icon=
"el-icon-delete"
@
click=
"handleClear"
>
清空
</el-button>
</div>
</div>
<!-- 配置 -->
<el-drawer
:title=
"title"
show-close
append-to-body
size=
"50%"
:visible
.
sync=
"box"
>
<el-scrollbar
style=
"height:100%"
>
<avue-form
:option=
"tableOption"
v-model=
"tableForm"
v-if=
"type==='table'"
></avue-form>
<avue-form
:option=
"menuOption"
v-model=
"menuForm"
v-else-if=
"type==='menu'"
></avue-form>
<avue-form
:option=
"dialogOption"
v-model=
"dialogForm"
v-else-if=
"type==='dialog'"
></avue-form>
<avue-form
:option=
"btnOption"
v-model=
"btnForm"
v-else-if=
"type==='btn'"
></avue-form>
</el-scrollbar>
</el-drawer>
<avue-crud
:option=
"option"
style=
"margin-top:30px;"
v-model=
"form"
ref=
"crud"
@
row-save=
"rowSave"
@
row-update=
"rowUpdate"
@
row-del=
"rowDel"
@
sortable-change=
"sortableChange"
:data=
"list"
:before-open=
"beforeOpen"
></avue-crud>
<!-- 导入JSON -->
<el-drawer
title=
"导入JSON"
append-to-body
:visible
.
sync=
"importJsonVisible"
size=
"50%"
destroy-on-close
>
<v-json-editor
v-model=
"importJson"
height=
"82vh"
></v-json-editor>
<div
class=
"drawer-foot"
>
<el-button
size=
"medium"
type=
"primary"
@
click=
"handleImportJsonSubmit"
>
确定
</el-button>
<el-button
size=
"medium"
type=
"danger"
@
click=
"importJsonVisible = false"
>
取消
</el-button>
</div>
</el-drawer>
<!-- 生成JSON -->
<el-drawer
title=
"生成JSON"
append-to-body
:visible
.
sync=
"generateJsonVisible"
size=
"50%"
destroy-on-close
>
<v-json-editor
v-model=
"widgetFormPreview"
height=
"82vh"
></v-json-editor>
<div
class=
"drawer-foot"
>
<el-button
size=
"medium"
type=
"primary"
@
click=
"handleCopy"
>
保存
</el-button>
<el-button
size=
"medium"
type=
"danger"
@
click=
"generateJsonVisible = false"
>
取消
</el-button>
</div>
</el-drawer>
<!-- 预览 -->
<el-drawer
title=
"预览"
size=
"70%"
:visible
.
sync=
"drawer"
>
<avue-crud
:option=
"codeOption"
:data=
"codeList"
></avue-crud>
</el-drawer>
</div>
</
template
>
<
script
>
import
{
setStore
,
getStore
}
from
'./store'
import
{
option
,
tableOption
,
menuOption
,
dialogOption
,
btnOption
}
from
'./option'
import
{
pretty
}
from
'js-object-pretty-print'
import
{
crudDecoder
}
from
'./decoder.js'
import
VJsonEditor
from
'v-jsoneditor'
const
Mock
=
require
(
'mockjs'
);
export
default
{
name
:
'crud'
,
components
:
{
VJsonEditor
},
data
()
{
return
{
drawer
:
false
,
importJsonVisible
:
false
,
generateJsonVisible
:
false
,
widgetFormPreview
:
{},
importJson
:
{},
title
:
''
,
box
:
false
,
type
:
''
,
form
:
{},
activeName
:
0
,
tableForm
:
{},
tableOption
:
tableOption
,
menuForm
:
{},
menuOption
:
menuOption
,
dialogForm
:
{},
dialogOption
:
dialogOption
,
btnForm
:
{},
btnOption
:
btnOption
,
option
:
option
,
list
:
[],
optionData
:
''
}
},
props
:{
colOptions
:{
type
:
Array
}
},
created
()
{
},
mounted
(){
},
computed
:
{
codemirror
()
{
return
this
.
$refs
.
myCm
.
codemirror
},
codeList
()
{
let
list
=
[];
//const Mock = window.Mock;
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
let
obj
=
{};
this
.
list
.
forEach
(
ele
=>
{
let
result
=
''
;
if
(
ele
.
type
==
'number'
)
{
result
=
Mock
.
mock
({
"number|1-100"
:
100
})
}
else
{
result
=
Mock
.
mock
(
'@cname'
);
}
obj
[
ele
.
prop
]
=
result
})
list
.
push
(
obj
)
}
return
list
},
codeOption
()
{
let
jsStr
=
this
.
code
();
var
jsObj
=
eval
(
'('
+
jsStr
+
')'
);
return
jsObj
},
},
watch
:
{
optionData
(
value
)
{
let
columnOb
=
eval
(
'('
+
value
+
')'
);
//转换页面js回 option 对象
let
optionObj
=
crudDecoder
.
decode
(
columnOb
);
this
.
list
=
optionObj
;
},
colOptions
(
value
)
{
if
(
value
){
this
.
list
=
value
;
}
},
list
(
value
){
if
(
value
.
length
>
0
){
if
(
value
){
this
.
$emit
(
'change'
,
value
);
}
}
}
},
methods
:
{
// 生成JSON - 弹窗
handleGenerateJson
()
{
this
.
widgetFormPreview
=
this
.
codeOption
;
this
.
generateJsonVisible
=
true
;
},
// 导入JSON - 弹窗 - 确定
handleImportJsonSubmit
()
{
this
.
list
=
this
.
importJson
.
column
;
this
.
importJsonVisible
=
false
},
// 生成JSON - 弹窗 - 拷贝
handleCopy
()
{
this
.
$emit
(
'listChange'
,
this
.
widgetFormPreview
);
console
.
log
(
this
.
widgetFormPreview
);
},
// 清空
handleClear
()
{
if
(
this
.
list
.
length
!==
0
)
{
this
.
$confirm
(
'确定要清空吗?'
,
'警告'
,
{
type
:
'warning'
}).
then
(()
=>
{
this
.
list
=
[];
})
}
else
this
.
$message
.
error
(
"没有需要清空的内容"
)
},
handleAvueDoc
()
{
window
.
open
(
'https://avuejs.com/doc/crud/crud-doc'
,
'_blank'
)
},
handlePreview
()
{
this
.
drawer
=
true
;
},
code
()
{
function
vaild
(
option
=
{},
ele
=
''
)
{
const
result
=
option
[
ele
]
+
''
||
''
;
return
!
result
||
ele
.
includes
(
'$'
)
}
let
option
=
{};
option
=
this
.
deepClone
(
Object
.
assign
(
this
.
tableForm
,
this
.
menuForm
,
this
.
dialogForm
,
this
.
btnForm
)
||
{});
Object
.
keys
(
option
).
forEach
(
ele
=>
{
if
(
vaild
(
option
,
ele
))
delete
option
[
ele
];
})
option
.
column
=
this
.
deepClone
(
this
.
list
||
[]);
option
.
column
.
forEach
(
ele
=>
{
Object
.
keys
(
ele
).
forEach
(
key
=>
{
if
(
vaild
(
ele
,
key
))
delete
ele
[
key
];
})
})
let
jsStr
=
pretty
(
option
,
4
,
"PRINT"
,
true
)
//stringifyObject(option)// JSON.stringify(option, null, 4);
this
.
optionData
=
jsStr
;
return
jsStr
;
},
beforeOpen
(
done
)
{
done
();
},
open
(
type
,
title
)
{
this
.
title
=
title
;
this
.
type
=
type
;
this
.
box
=
true
;
},
sortableChange
(
oldindex
,
)
{
const
oldrow
=
this
.
list
.
splice
(
oldindex
,
1
)[
0
];
this
.
list
.
splice
(
oldindex
,
1
,
oldrow
)
},
resetForm
(
row
)
{
Object
.
keys
(
row
).
forEach
(
ele
=>
{
if
(
ele
.
includes
(
'$'
))
delete
row
[
ele
];
})
return
row
;
},
rowDel
(
row
,
index
)
{
this
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
list
.
splice
(
index
,
1
);
}).
catch
(()
=>
{
});
},
rowUpdate
(
row
,
index
,
done
)
{
this
.
list
.
splice
(
index
,
1
,
row
);
done
();
},
rowSave
(
row
,
done
)
{
this
.
list
.
push
(
row
)
done
();
}
}
}
</
script
>
<
style
scoped
>
.drawer-foot
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
right
:
0
;
padding
:
20px
;
display
:
flex
;
}
.drawer-foot
.el-button
{
flex
:
1
;
}
</
style
>
app_web/src/components/app-avue-crud/decoder.js
0 → 100644
浏览文件 @
0329f9ba
import
{
option
}
from
'./option'
import
{
dicList
}
from
'./dic'
import
{
deepClone
}
from
'./deepClone'
export
const
crudDecoder
=
{
getOptionKV
:
function
()
{
// option.column
let
kvObj
=
new
Object
();
let
selectTypeList
=
new
Array
()
option
.
group
.
forEach
(
ele
=>
{
if
(
ele
.
hasOwnProperty
(
'column'
))
{
ele
.
column
.
forEach
(
e
=>
{
// console.log(JSON.stringify(e))
kvObj
[
e
.
prop
]
=
""
;
if
(
e
.
type
===
'select'
)
{
selectTypeList
.
push
(
e
.
prop
);
}
})
}
})
selectTypeList
.
forEach
(
e
=>
{
kvObj
[
'$'
+
e
]
=
""
;
})
return
kvObj
;
},
//根据输入框类型填充
prefillDicList
:
(
ele
)
=>
{
if
(
ele
.
hasOwnProperty
(
"type"
)
&&
ele
.
type
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
dicList
.
length
;
i
++
)
{
let
item
=
dicList
[
i
];
// console.log(JSON.stringify(item))
if
(
item
.
value
===
ele
.
type
)
{
ele
[
'$'
+
ele
.
type
]
=
item
.
label
break
;
}
}
}
else
{
ele
[
'type'
]
=
'input'
ele
[
'$type'
]
=
"输入框"
}
Object
.
keys
(
ele
).
forEach
(
e
=>
{
if
(
e
.
includes
(
'$'
))
{
let
key
=
e
.
replace
(
"$"
,
""
)
if
(
ele
[
key
]
===
'true'
)
{
ele
[
e
]
=
'是'
}
else
if
(
ele
[
key
]
===
'true'
)
{
ele
[
e
]
=
'否'
}
}
})
//console.log("prefillDicList:"+JSON.stringify(ele))
},
decode
:
function
(
opt
,
boolAsStr
=
false
)
{
//boolAsStr bool 是否按字符串处理,默认不按字符处理
// console.log(opt)
if
(
Object
.
keys
(
opt
).
length
==
0
)
return
;
var
column
=
opt
.
column
;
let
objList
=
new
Array
()
let
optKV
=
this
.
getOptionKV
();
for
(
var
i
=
0
;
i
<
column
.
length
;
i
++
)
{
var
e
=
column
[
i
];
let
obj
=
deepClone
(
optKV
);
Object
.
keys
(
e
).
forEach
(
key
=>
{
// console.log("key:"+key+","+e[key])
if
(
boolAsStr
&&
(
e
[
key
]
===
true
||
e
[
key
]
===
false
))
{
//boolean 转为字符串方式,不然form 的select 报错
e
[
key
]
=
""
+
e
[
key
]
}
obj
[
key
]
=
e
[
key
];
})
this
.
prefillDicList
(
obj
)
objList
.
push
(
obj
)
}
//console.log("decoder decode:"+JSON.stringify(objList))
return
objList
;
}
}
\ No newline at end of file
app_web/src/components/app-avue-crud/deepClone.js
0 → 100644
浏览文件 @
0329f9ba
export
const
deepClone
=
data
=>
{
var
type
=
getObjType
(
data
);
var
obj
;
if
(
type
===
'array'
)
{
obj
=
[];
}
else
if
(
type
===
'object'
)
{
obj
=
{};
}
else
{
//不再具有下一层次
return
data
;
}
if
(
type
===
'array'
)
{
for
(
var
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
obj
.
push
(
deepClone
(
data
[
i
]));
}
}
else
if
(
type
===
'object'
)
{
for
(
var
key
in
data
)
{
obj
[
key
]
=
deepClone
(
data
[
key
]);
}
}
return
obj
;
};
export
const
getObjType
=
obj
=>
{
var
toString
=
Object
.
prototype
.
toString
;
var
map
=
{
'[object Boolean]'
:
'boolean'
,
'[object Number]'
:
'number'
,
'[object String]'
:
'string'
,
'[object Function]'
:
'function'
,
'[object Array]'
:
'array'
,
'[object Date]'
:
'date'
,
'[object RegExp]'
:
'regExp'
,
'[object Undefined]'
:
'undefined'
,
'[object Null]'
:
'null'
,
'[object Object]'
:
'object'
};
if
(
obj
instanceof
Element
)
{
return
'element'
;
}
return
map
[
toString
.
call
(
obj
)];
};
\ No newline at end of file
app_web/src/components/app-avue-crud/dic.js
0 → 100644
浏览文件 @
0329f9ba
export
const
dicList
=
[{
label
:
'输入框'
,
value
:
'input'
},
{
label
:
'选择框'
,
value
:
'select'
},
{
label
:
'密码框'
,
value
:
'password'
},
{
label
:
'数字框'
,
value
:
'number'
},
{
label
:
'上传框'
,
value
:
'upload'
},
{
label
:
'颜色选择器'
,
value
:
'color'
},
{
label
:
'图标选择器'
,
value
:
'icon-select'
},
{
label
:
'树框'
,
value
:
'tree'
},
{
label
:
'单选框'
,
value
:
'radio'
},
{
label
:
'多选'
,
value
:
'checkbox'
},
{
label
:
'开关框'
,
value
:
'switch'
},
{
label
:
'文本框'
,
value
:
'textarea'
},
{
label
:
'时间框'
,
value
:
'time'
},
{
label
:
'时间范围'
,
value
:
'timerange'
},
{
label
:
'级联框'
,
value
:
'cascader'
},
{
label
:
'日期框'
,
value
:
'date'
},
{
label
:
'日期时间框'
,
value
:
'datetime'
},
{
label
:
'日期时间范围'
,
value
:
'datetimerange'
},
{
label
:
'多个日期'
,
value
:
'dates'
},
{
label
:
'月'
,
value
:
'month'
},
{
label
:
'周'
,
value
:
'week'
},
{
label
:
'年'
,
value
:
'year'
}]
export
const
ynList
=
[{
label
:
'否'
,
value
:
'false'
},
{
label
:
'是'
,
value
:
'true'
}]
export
const
alignList
=
[{
label
:
'居左'
,
value
:
'left'
},
{
label
:
'居中'
,
value
:
'center'
},
{
label
:
'居右'
,
value
:
'right'
}]
\ No newline at end of file
app_web/src/components/app-avue-crud/option.js
0 → 100644
浏览文件 @
0329f9ba
import
{
dicList
,
ynList
,
alignList
}
from
'./dic'
;
export
const
menuOption
=
{
menuBtn
:
false
,
column
:
[{
label
:
'显示'
,
prop
:
'menu'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'宽度'
,
prop
:
'menuWidth'
,
type
:
'input'
,
span
:
24
},
{
label
:
'对齐方式'
,
prop
:
'menuAlign'
,
type
:
'select'
,
dicData
:
alignList
,
span
:
24
},
{
label
:
'按钮类型'
,
prop
:
'menuType'
,
type
:
'select'
,
dicData
:
[
{
label
:
'button'
,
value
:
'button'
},
{
label
:
'icon'
,
value
:
'icon'
},
{
label
:
'text'
,
value
:
'text'
},
{
label
:
'menu'
,
value
:
'menu'
}
],
span
:
24
}]
}
export
const
dialogOption
=
{
menuBtn
:
false
,
column
:
[{
label
:
'宽度'
,
prop
:
'dialogWidth'
,
type
:
'input'
,
span
:
24
},
{
label
:
'高度'
,
prop
:
'dialogHeight'
,
type
:
'input'
,
span
:
24
},
{
label
:
'类型'
,
prop
:
'dialogType'
,
type
:
'select'
,
dicData
:
[{
label
:
'弹窗'
,
value
:
'dialog'
},
{
label
:
'抽屉'
,
value
:
'drawer'
}],
span
:
24
},
{
label
:
'顶部距离'
,
prop
:
'dialogTop'
,
type
:
'input'
,
span
:
24
},
{
label
:
'全屏'
,
prop
:
'dialogFullscreen'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'esc关闭'
,
prop
:
'dialogEscape'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'遮罩'
,
prop
:
'dialogModal'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'遮罩关闭'
,
prop
:
'dialogClickModal'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'关闭按钮'
,
prop
:
'dialogCloseBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
}]
}
export
const
btnOption
=
{
menuBtn
:
false
,
column
:
[{
label
:
'新增按钮'
,
prop
:
'addBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'编辑按钮'
,
prop
:
'editBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'查看按钮'
,
prop
:
'viewBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'删除按钮'
,
prop
:
'delBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'保存按钮'
,
prop
:
'saveBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'保存文案'
,
prop
:
'saveBtnTitle'
,
span
:
24
,
},
{
label
:
'更新按钮'
,
prop
:
'updateBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'更新文案'
,
prop
:
'updateBtnTitle'
,
span
:
24
,
},
{
label
:
'取消按钮'
,
prop
:
'cancelBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'取消文案'
,
prop
:
'cancelBtnTitle'
,
span
:
24
,
},
{
label
:
'搜索按钮'
,
prop
:
'searchBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'刷新按钮'
,
prop
:
'refreshBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'过滤按钮'
,
prop
:
'filterBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'打印按钮'
,
prop
:
'printBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'导出按钮'
,
prop
:
'excelBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'显隐按钮'
,
prop
:
'columnBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'日期按钮'
,
prop
:
'dateBtn'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
}]
}
export
const
tableOption
=
{
menuBtn
:
false
,
column
:
[{
label
:
'主键'
,
prop
:
'rowKey'
,
span
:
24
,
},
{
label
:
'提示'
,
prop
:
'tip'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'序号'
,
prop
:
'index'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'多选'
,
prop
:
'selection'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'边框'
,
prop
:
'border'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'折叠'
,
prop
:
'expand'
,
type
:
'select'
,
span
:
24
,
dicData
:
ynList
},
{
label
:
'表头对其'
,
prop
:
'headerAlign'
,
type
:
'select'
,
span
:
24
,
dicData
:
alignList
},
{
label
:
'对其方式'
,
prop
:
'align'
,
type
:
'select'
,
span
:
24
,
dicData
:
alignList
}]
}
export
const
option
=
{
dialogType
:
'drawer'
,
//dialogWidth: 800,
labelWidth
:
100
,
refreshBtn
:
false
,
dragHandler
:
true
,
sortable
:
true
,
group
:
[{
label
:
'基本参数'
,
prop
:
'jbcs'
,
column
:
[
{
label
:
'名称'
,
prop
:
'label'
,
rules
:
[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'change'
}
]
},
{
label
:
'prop值'
,
prop
:
'prop'
,
rules
:
[
{
required
:
true
,
message
:
'请输入名称'
,
trigger
:
'change'
}
]
},
{
label
:
'类型'
,
prop
:
'type'
,
type
:
'select'
,
dicData
:
dicList
,
rules
:
[
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
]
}
]
},
{
label
:
'位置设置'
,
prop
:
'wzsz'
,
column
:
[{
label
:
'span'
,
prop
:
'span'
},
{
label
:
'gutter'
,
prop
:
'gutter'
},
{
label
:
'size'
,
prop
:
'size'
}]
},
{
label
:
'表格属性'
,
prop
:
'bgsx'
,
column
:
[
{
label
:
'宽度'
,
prop
:
'width'
,
type
:
'input'
},
{
label
:
'最小宽度'
,
prop
:
'minwidth'
,
type
:
'input'
},
{
label
:
'对其方式'
,
prop
:
'align'
,
type
:
'select'
,
dicData
:
alignList
},
{
label
:
'冻结'
,
prop
:
'fixed'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'隐藏'
,
prop
:
'hide'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'超出省略'
,
prop
:
'overHidden'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'筛选'
,
prop
:
'filter'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'搜索'
,
prop
:
'search'
,
type
:
'select'
,
dicData
:
ynList
}
]
},
{
label
:
'字典属性'
,
prop
:
'zdsx'
,
column
:
[{
label
:
'字典类型'
,
prop
:
'dataType'
,
type
:
'select'
,
dicData
:
[{
label
:
'数字'
,
value
:
'number'
},
{
label
:
'字符串'
,
value
:
'string'
}]
}]
},
{
label
:
'表单属性'
,
prop
:
'bdsx'
,
column
:
[{
label
:
'辅助语'
,
prop
:
'placeholder'
,
},
{
label
:
'提示语'
,
prop
:
'tip'
,
},
{
label
:
'新增显示'
,
prop
:
'addDisplay'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'编辑显示'
,
prop
:
'editDisplay'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'新增禁止'
,
prop
:
'addDisabled'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'编辑禁止'
,
prop
:
'editDisabled'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'只读'
,
prop
:
'readonly'
,
type
:
'select'
,
dicData
:
ynList
},
{
label
:
'最大行'
,
prop
:
'maxRows'
,
type
:
'input'
,
},
{
label
:
'最小行'
,
prop
:
'minRows'
,
type
:
'input'
,
},
{
label
:
'多选'
,
prop
:
'multiple'
,
type
:
'select'
,
dicData
:
ynList
,
},
{
label
:
'精度'
,
prop
:
'precision'
,
type
:
'input'
,
},
{
label
:
'日期格式化'
,
prop
:
'format'
},
{
label
:
'日期格式化值'
,
prop
:
'valueFormat'
}]
}],
column
:
[
{
label
:
'名称'
,
prop
:
'label'
,
display
:
false
},
{
label
:
'prop值'
,
prop
:
'prop'
,
display
:
false
},
{
label
:
'类型'
,
prop
:
'type'
,
type
:
'select'
,
dicData
:
dicList
,
display
:
false
}
],
}
\ No newline at end of file
app_web/src/components/app-avue-crud/store.js
0 → 100644
浏览文件 @
0329f9ba
import
{
validatenull
}
from
'./validate'
;
const
keyName
=
'avue-'
;
/**
* 存储localStorage
*/
export
const
setStore
=
(
params
=
{})
=>
{
let
{
name
,
content
,
type
,
}
=
params
;
name
=
keyName
+
name
let
obj
=
{
dataType
:
typeof
(
content
),
content
:
content
,
type
:
type
,
datetime
:
new
Date
().
getTime
()
}
if
(
type
)
window
.
sessionStorage
.
setItem
(
name
,
JSON
.
stringify
(
obj
));
else
window
.
localStorage
.
setItem
(
name
,
JSON
.
stringify
(
obj
));
}
/**
* 获取localStorage
*/
export
const
getStore
=
(
params
=
{})
=>
{
let
{
name
,
debug
}
=
params
;
name
=
keyName
+
name
let
obj
=
{},
content
;
obj
=
window
.
sessionStorage
.
getItem
(
name
);
if
(
validatenull
(
obj
))
obj
=
window
.
localStorage
.
getItem
(
name
);
if
(
validatenull
(
obj
))
return
;
try
{
obj
=
JSON
.
parse
(
obj
);
}
catch
{
return
obj
;
}
if
(
debug
)
{
return
obj
;
}
if
(
obj
.
dataType
==
'string'
)
{
content
=
obj
.
content
;
}
else
if
(
obj
.
dataType
==
'number'
)
{
content
=
Number
(
obj
.
content
);
}
else
if
(
obj
.
dataType
==
'boolean'
)
{
content
=
eval
(
obj
.
content
);
}
else
if
(
obj
.
dataType
==
'object'
)
{
content
=
obj
.
content
;
}
return
content
;
}
/**
* 删除localStorage
*/
export
const
removeStore
=
(
params
=
{})
=>
{
let
{
name
,
type
}
=
params
;
name
=
keyName
+
name
if
(
type
)
{
window
.
sessionStorage
.
removeItem
(
name
);
}
else
{
window
.
localStorage
.
removeItem
(
name
);
}
}
/**
* 获取全部localStorage
*/
export
const
getAllStore
=
(
params
=
{})
=>
{
let
list
=
[];
let
{
type
}
=
params
;
if
(
type
)
{
for
(
let
i
=
0
;
i
<=
window
.
sessionStorage
.
length
;
i
++
)
{
list
.
push
({
name
:
window
.
sessionStorage
.
key
(
i
),
content
:
getStore
({
name
:
window
.
sessionStorage
.
key
(
i
),
type
:
'session'
})
})
}
}
else
{
for
(
let
i
=
0
;
i
<=
window
.
localStorage
.
length
;
i
++
)
{
list
.
push
({
name
:
window
.
localStorage
.
key
(
i
),
content
:
getStore
({
name
:
window
.
localStorage
.
key
(
i
),
})
})
}
}
return
list
;
}
/**
* 清空全部localStorage
*/
export
const
clearStore
=
(
params
=
{})
=>
{
let
{
type
}
=
params
;
if
(
type
)
{
window
.
sessionStorage
.
clear
();
}
else
{
window
.
localStorage
.
clear
()
}
}
\ No newline at end of file
app_web/src/components/app-avue-crud/validate.js
0 → 100644
浏览文件 @
0329f9ba
/**
* Created by jiachenpan on 16/11/18.
*/
export
function
isvalidUsername
(
str
)
{
const
valid_map
=
[
'admin'
,
'editor'
]
return
valid_map
.
indexOf
(
str
.
trim
())
>=
0
}
/* 合法uri*/
export
function
validateURL
(
textval
)
{
const
urlregex
=
/^
(
https
?
|ftp
)
:
\/\/([
a-zA-Z0-9.-
]
+
(
:
[
a-zA-Z0-9.&%$-
]
+
)
*@
)
*
((
25
[
0-5
]
|2
[
0-4
][
0-9
]
|1
[
0-9
]{2}
|
[
1-9
][
0-9
]?)(\.(
25
[
0-5
]
|2
[
0-4
][
0-9
]
|1
[
0-9
]{2}
|
[
1-9
]?[
0-9
])){3}
|
([
a-zA-Z0-9-
]
+
\.)
*
[
a-zA-Z0-9-
]
+
\.(
com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|
[
a-zA-Z
]{2}))(
:
[
0-9
]
+
)
*
(\/(
$|
[
a-zA-Z0-9.,?'
\\
+&%$#=~_-
]
+
))
*$/
return
urlregex
.
test
(
textval
)
}
/**
* 邮箱
* @param {*} s
*/
export
function
isEmail
(
s
)
{
return
/^
([
a-zA-Z0-9_-
])
+@
([
a-zA-Z0-9_-
])
+
((
.
[
a-zA-Z0-9_-
]{2,3}){1,2})
$/
.
test
(
s
)
}
/**
* 手机号码
* @param {*} s
*/
export
function
isMobile
(
s
)
{
return
/^1
[
0-9
]{10}
$/
.
test
(
s
)
}
/**
* 电话号码
* @param {*} s
*/
export
function
isPhone
(
s
)
{
return
/^
([
0-9
]{3,4}
-
)?[
0-9
]{7,8}
$/
.
test
(
s
)
}
/**
* URL地址
* @param {*} s
*/
export
function
isURL
(
s
)
{
return
/^http
[
s
]?
:
\/\/
.*/
.
test
(
s
)
}
/* 小写字母*/
export
function
validateLowerCase
(
str
)
{
const
reg
=
/^
[
a-z
]
+$/
return
reg
.
test
(
str
)
}
/* 大写字母*/
export
function
validateUpperCase
(
str
)
{
const
reg
=
/^
[
A-Z
]
+$/
return
reg
.
test
(
str
)
}
/* 大小写字母*/
export
function
validatAlphabets
(
str
)
{
const
reg
=
/^
[
A-Za-z
]
+$/
return
reg
.
test
(
str
)
}
/*验证pad还是pc*/
export
const
vaildatePc
=
function
()
{
const
userAgentInfo
=
navigator
.
userAgent
;
const
Agents
=
[
"Android"
,
"iPhone"
,
"SymbianOS"
,
"Windows Phone"
,
"iPad"
,
"iPod"
];
let
flag
=
true
;
for
(
var
v
=
0
;
v
<
Agents
.
length
;
v
++
)
{
if
(
userAgentInfo
.
indexOf
(
Agents
[
v
])
>
0
)
{
flag
=
false
;
break
;
}
}
return
flag
;
}
/**
* validate email
* @param email
* @returns {boolean}
*/
export
function
validateEmail
(
email
)
{
const
re
=
/^
(([^
<>()
\\
[
\]\\
.,;:
\s
@"
]
+
(\.[^
<>()
\\
[
\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
return
re
.
test
(
email
)
}
/**
* 判断身份证号码
*/
export
function
cardid
(
code
)
{
let
list
=
[];
let
result
=
true
;
let
msg
=
''
;
var
city
=
{
11
:
"北京"
,
12
:
"天津"
,
13
:
"河北"
,
14
:
"山西"
,
15
:
"内蒙古"
,
21
:
"辽宁"
,
22
:
"吉林"
,
23
:
"黑龙江 "
,
31
:
"上海"
,
32
:
"江苏"
,
33
:
"浙江"
,
34
:
"安徽"
,
35
:
"福建"
,
36
:
"江西"
,
37
:
"山东"
,
41
:
"河南"
,
42
:
"湖北 "
,
43
:
"湖南"
,
44
:
"广东"
,
45
:
"广西"
,
46
:
"海南"
,
50
:
"重庆"
,
51
:
"四川"
,
52
:
"贵州"
,
53
:
"云南"
,
54
:
"西藏 "
,
61
:
"陕西"
,
62
:
"甘肃"
,
63
:
"青海"
,
64
:
"宁夏"
,
65
:
"新疆"
,
71
:
"台湾"
,
81
:
"香港"
,
82
:
"澳门"
,
91
:
"国外 "
};
if
(
!
validatenull
(
code
))
{
if
(
code
.
length
==
18
)
{
if
(
!
code
||
!
/
(
^
\d{18}
$
)
|
(
^
\d{17}(\d
|X|x
)
$
)
/
.
test
(
code
))
{
msg
=
"证件号码格式错误"
;
}
else
if
(
!
city
[
code
.
substr
(
0
,
2
)])
{
msg
=
"地址编码错误"
;
}
else
{
//18位身份证需要验证最后一位校验位
code
=
code
.
split
(
''
);
//∑(ai×Wi)(mod 11)
//加权因子
var
factor
=
[
7
,
9
,
10
,
5
,
8
,
4
,
2
,
1
,
6
,
3
,
7
,
9
,
10
,
5
,
8
,
4
,
2
];
//校验位
var
parity
=
[
1
,
0
,
'X'
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
'x'
];
var
sum
=
0
;
var
ai
=
0
;
var
wi
=
0
;
for
(
var
i
=
0
;
i
<
17
;
i
++
)
{
ai
=
code
[
i
];
wi
=
factor
[
i
];
sum
+=
ai
*
wi
;
}
if
(
parity
[
sum
%
11
]
!=
code
[
17
])
{
msg
=
"证件号码校验位错误"
;
}
else
{
result
=
false
;
}
}
}
else
{
msg
=
"证件号码长度不为18位"
;
}
}
else
{
msg
=
"证件号码不能为空"
;
}
list
.
push
(
result
);
list
.
push
(
msg
);
return
list
;
}
/**
* 判断手机号码是否正确
*/
export
function
isvalidatemobile
(
phone
)
{
let
list
=
[];
let
result
=
true
;
let
msg
=
''
;
var
isPhone
=
/^0
\d{2,3}
-
?\d{7,8}
$/
;
//增加134 减少|1349[0-9]{7},增加181,增加145,增加17[678]
if
(
!
validatenull
(
phone
))
{
if
(
phone
.
length
==
11
)
{
if
(
isPhone
.
test
(
phone
))
{
msg
=
'手机号码格式不正确'
;
}
else
{
result
=
false
;
}
}
else
{
msg
=
'手机号码长度不为11位'
;
}
}
else
{
msg
=
'手机号码不能为空'
;
}
list
.
push
(
result
);
list
.
push
(
msg
);
return
list
;
}
/**
* 判断姓名是否正确
*/
export
function
validatename
(
name
)
{
var
regName
=
/^
[\u
4e00-
\u
9fa5
]{2,4}
$/
;
if
(
!
regName
.
test
(
name
))
return
false
;
return
true
;
}
/**
* 判断是否为整数
*/
export
function
validatenum
(
num
,
type
)
{
let
regName
=
/
[^\d
.
]
/g
;
if
(
type
==
1
)
{
if
(
!
regName
.
test
(
num
))
return
false
;
}
else
if
(
type
==
2
)
{
regName
=
/
[^\d]
/g
;
if
(
!
regName
.
test
(
num
))
return
false
;
}
return
true
;
}
/**
* 判断是否为小数
*/
export
function
validatenumord
(
num
,
type
)
{
let
regName
=
/
[^\d
.
]
/g
;
if
(
type
==
1
)
{
if
(
!
regName
.
test
(
num
))
return
false
;
}
else
if
(
type
==
2
)
{
regName
=
/
[^\d
.
]
/g
;
if
(
!
regName
.
test
(
num
))
return
false
;
}
return
true
;
}
/**
* 判断是否为空
*/
export
function
validatenull
(
val
)
{
if
(
typeof
val
==
'boolean'
)
{
return
false
;
}
if
(
typeof
val
==
'number'
)
{
return
false
;
}
if
(
val
instanceof
Array
)
{
if
(
val
.
length
==
0
)
return
true
;
}
else
if
(
val
instanceof
Object
)
{
if
(
JSON
.
stringify
(
val
)
===
'{}'
)
return
true
;
}
else
{
if
(
val
==
'null'
||
val
==
null
||
val
==
'undefined'
||
val
==
undefined
||
val
==
''
)
return
true
;
return
false
;
}
return
false
;
}
\ No newline at end of file
app_web/src/components/app-form-json/app-form-json.less
0 → 100644
浏览文件 @
0329f9ba
.app-form-json{
.btn-secondary {
color: black;
background-color: transparent;
border-color: transparent;
}
.form-control {
display: block;
height: calc(1.4em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-size: 13px;
font-weight: 400;
line-height: 1;
}
h3, .h3 {
font-size: 14px;
font-weight: 700;
margin-top: 5px;
}
.row{
> div {
> div{
display: flex;
}
}
}
.nav{
display: block;
> li{
border-radius: 5px;
padding: 5px;
cursor: pointer;
>
a:hover{
text-decoration: none;
}
}
.active{
background-color:#357AB3;
>
a{
color: #fff;
}
a:hover{
color: #fff;
}
}
}
.control-label{
min-width: 100px;
display: inline-block;
}
}
\ No newline at end of file
app_web/src/components/app-form-json/app-form-json.vue
0 → 100644
浏览文件 @
0329f9ba
<
template
>
<div
class=
"app-form-json"
>
<el-input
type=
"textarea"
:rows=
"2"
placeholder=
"请输入内容"
v-model=
"CurrentVal"
>
</el-input>
<div
id=
'editor_holder_json'
></div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
,
Model
,
Watch
}
from
"vue-property-decorator"
;
import
{
VNode
,
CreateElement
}
from
"vue"
;
import
{
interval
,
Subject
,
Subscription
}
from
"rxjs"
;
import
JSONEditor
from
"@json-editor/json-editor"
;
import
BootstrapVue
from
"bootstrap-vue"
;
import
"bootstrap/dist/css/bootstrap.css"
;
import
"bootstrap-vue/dist/bootstrap-vue.css"
;
import
"../app-form-json/app-form-json.less"
;
@
Component
({})
export
default
class
AppFormJson
extends
Vue
{
/**
* 双向绑定值
*
* @type {*}
* @memberof AppFormJson
*/
@
Model
(
"change"
)
itemValue
?:
any
;
/**
* 表单数据
*
* @type {*}
* @memberof AppFormJson
*/
@
Prop
()
public
data
!
:
any
;
/**
* 当前值
*
* @return {*}
* @memberof AppFormJson
*/
get
CurrentVal
()
{
return
this
.
itemValue
;
}
/**
* 设置值
*
* @param {*} [value]
* @memberof AppFormJson
*/
set
CurrentVal
(
val
:
any
)
{
this
.
$emit
(
"change"
,
val
);
}
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof AppFormJson
*/
@
Prop
()
public
formState
?:
Subject
<
any
>
;
/**
* 表单状态事件
*
* @private
* @type {(Unsubscribable | undefined)}
* @memberof AppFormJson
*/
private
formStateEvent
:
Subscription
|
undefined
;
/**
* Vue生命周期(实例销毁后)
*
* @memberof AppFormJson
*/
public
destroyed
()
{
if
(
this
.
editor
)
this
.
editor
=
null
;
}
/**
* Vue生命周期(实例挂载后)
*
* @memberof AppFormJson
*/
public
mounted
()
{
if
(
!
this
.
formState
)
{
return
;
}
this
.
formStateEvent
=
this
.
formState
.
subscribe
((
$event
:
any
)
=>
{
if
(
Object
.
is
(
$event
.
type
,
"load"
))
{
this
.
renderJsoneditor
();
}
});
}
/**
* 编辑器对象
*
* @type {*}
* @memberof AppFormJson
*/
public
editor
:
any
;
/**
* 编辑器生成
*
* @memberof AppFormJson
*/
public
renderJsoneditor
()
{
var
_this
=
this
;
var
element
=
document
.
getElementById
(
"editor_holder_json"
);
if
(
this
.
editor
)
{
this
.
editor
.
destroy
();
}
let
_schema
=
{
$ref
:
"#/definitions/model"
,
definitions
:
{
model
:
{
title
:
"模型"
,
headerTemplate
:
"{{ self.dataModelName }}"
,
type
:
"object"
,
format
:
"grid"
,
properties
:
{
dataModelName
:
{
title
:
"模型名"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
objectProperties
:
{
title
:
"对象参数集合"
,
type
:
"array"
,
format
:
"tabs"
,
uniqueItems
:
true
,
items
:
{
title
:
"对象"
,
headerTemplate
:
"{{ self.propertyName }}"
,
type
:
"object"
,
properties
:
{
propertyName
:
{
title
:
"对象"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
system
:
{
title
:
"系统"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
2
,
},
propertyEntity
:
{
title
:
"结构实体"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
3
,
},
propertyMappings
:
{
title
:
"对象关系映射"
,
type
:
"array"
,
format
:
"table"
,
uniqueItems
:
true
,
items
:
{
title
:
"映射"
,
type
:
"object"
,
properties
:
{
selfPropertyColumn
:
{
title
:
"列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
joinPropertyName
:
{
title
:
"关联对象"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
2
,
},
joinPropertyColumn
:
{
title
:
"关联列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
3
,
},
},
},
propertyOrder
:
4
,
},
},
},
propertyOrder
:
2
,
},
nestedDataModels
:
{
title
:
"嵌套子模型集合"
,
type
:
"array"
,
format
:
"tabs"
,
uniqueItems
:
true
,
items
:
{
title
:
"子模型"
,
$ref
:
"#/definitions/model"
,
},
propertyOrder
:
3
,
},
layerMappings
:
{
title
:
"模型上下级映射"
,
type
:
"array"
,
format
:
"table"
,
uniqueItems
:
true
,
items
:
{
title
:
"映射"
,
type
:
"object"
,
properties
:
{
selfPropertyColumn
:
{
title
:
"列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
parentPropertyColumn
:
{
title
:
"父模型列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
2
,
},
},
},
propertyOrder
:
4
,
},
},
},
},
};
let
opt
:
any
=
{
schema
:
_schema
,
theme
:
"bootstrap3"
,
iconlib
:
"fontawesome4"
,
disable_edit_json
:
true
,
display_required_only
:
true
,
disable_collapse
:
true
,
disable_array_delete_last_row
:
true
,
ajax
:
true
,
};
if
(
this
.
CurrentVal
)
{
opt
[
"startval"
]
=
JSON
.
parse
(
this
.
CurrentVal
);
}
this
.
editor
=
new
JSONEditor
(
element
,
opt
);
this
.
editor
.
on
(
"change"
,
()
=>
{
let
value
=
_this
.
editor
.
getValue
();
_this
.
CurrentVal
=
JSON
.
stringify
(
value
);
});
}
/**
* 设置编辑器值
*
* @param {*} [val]
* @memberof AppFormJson
*/
public
setEditValue
(
val
:
any
):
void
{
if
(
val
)
{
this
.
editor
.
setValue
(
val
);
}
else
{
this
.
editor
.
setValue
({});
}
}
}
</
script
>
\ No newline at end of file
app_web/src/components/app-treeselect-refreshview/app-treeselect-refreshview.less
0 → 100644
浏览文件 @
0329f9ba
app_web/src/components/app-treeselect-refreshview/app-treeselect-refreshview.vue
0 → 100644
浏览文件 @
0329f9ba
<
template
>
<div
style=
"margin-right: 16px;"
>
<!--树形下拉框-->
<el-select
:value=
"valueTitle"
:clearable=
"clearable"
@
clear=
"clearHandle"
>
<el-option
:value=
"valueTitle"
:label=
"valueTitle"
:key=
"valueId"
>
<el-tree
id=
"tree-option"
ref=
"selectTree"
:accordion=
"accordion"
:data=
"options"
:props=
"props"
:node-key=
"props.value"
:default-expanded-keys=
"defaultExpandedKey"
@
node-click=
"handleNodeClick"
>
</el-tree>
</el-option>
</el-select>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
,
Inject
,
}
from
"vue-property-decorator"
;
import
{
Subject
}
from
"rxjs"
;
@
Component
({})
export
default
class
AppTreeselectRefreshview
extends
Vue
{
/**
* 树数据
*
* @type {Array<*>}
* @memberof AppTreeselectRefreshview
*/
public
options
:
any
[]
=
[];
/**
* 树显示说明
*
* @type {*}
* @memberof AppTreeselectRefreshview
*/
public
props
:
any
=
{
value
:
"id"
,
// ID字段名
label
:
"label"
,
// 显示名称
children
:
"apps"
,
// 子级字段名
};
/**
* 下拉框初始值的key
*
* @type {*}
* @memberof AppTreeselectRefreshview
*/
public
valueId
:
any
=
null
;
/**
* 下拉框初始值
*
* @type {*}
* @memberof AppTreeselectRefreshview
*/
public
valueTitle
:
any
=
""
;
/**
* 默认展开节点key
*
* @type {Array<any>}
* @memberof AppTreeselectRefreshview
*/
public
defaultExpandedKey
:
any
[]
=
[];
/**
* 是否每次只打开一个同级树节点展开
*
* @type {boolean}
* @memberof AppTreeselectRefreshview
*/
public
accordion
:
boolean
=
false
;
/**
* 可清空选项
*
* @type {boolean}
* @memberof AppTreeselectRefreshview
*/
public
clearable
:
boolean
=
true
;
/**
* vue创建
*
* @memberof AppTreeselectRefreshview
*/
created
():
void
{}
/**
* vue挂载
*
* @memberof AppTreeselectRefreshview
*/
mounted
():
void
{
// 初始化数据
this
.
initHandle
();
}
/**
* 获取初始化数据
*
* @memberof AppTreeselectRefreshview
*/
public
initHandle
()
{
let
url
:
any
=
"/lite/sysapps"
;
this
.
$http
.
get
(
url
)
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
==
200
)
{
const
data
:
any
=
response
.
data
;
if
(
data
&&
data
.
length
>
0
)
{
// 处理数据,生成有相同结构的父子节点结构
let
tempData
:
any
=
[];
data
.
forEach
((
item
:
any
)
=>
{
let
tempItem
:
any
=
item
;
if
(
tempItem
.
pssystemid
)
{
tempItem
.
id
=
tempItem
.
pssystemid
;
tempItem
.
systemId
=
tempItem
.
pssystemid
;
}
if
(
tempItem
.
pssystemname
)
{
tempItem
.
label
=
tempItem
.
pssystemname
;
}
tempData
.
push
(
tempItem
);
});
// 给树赋值
this
.
options
=
tempData
;
// 下拉树
let
tree
:
any
=
this
.
$refs
.
selectTree
;
// 第一个叶子节点
let
firstNode
:
any
=
{};
if
(
tempData
[
0
].
apps
)
{
firstNode
=
tempData
[
0
].
apps
;
}
else
{
firstNode
=
tempData
[
0
];
}
// 从local中拿刷新前选中值
if
(
localStorage
.
getItem
(
"localdata"
))
{
const
localdata
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
"localdata"
)
as
string
);
this
.
valueId
=
localdata
.
dstappid
;
this
.
valueTitle
=
localdata
.
title
;
this
.
defaultExpandedKey
.
push
(
localdata
.
dstappid
);
// 设置下拉树选中值
tree
.
setCurrentKey
(
localdata
.
dstappid
);
}
else
{
// 设置下拉框默认值
this
.
valueId
=
firstNode
[
0
].
id
;
this
.
valueTitle
=
firstNode
[
0
].
systemId
+
"-"
+
firstNode
[
0
].
label
;
this
.
defaultExpandedKey
.
push
(
firstNode
[
0
].
id
);
// 设置下拉树选中值
tree
.
setCurrentKey
(
firstNode
[
0
].
id
);
}
}
}
else
{
console
.
warn
(
"加载数据错误"
);
}
})
.
catch
((
error
:
any
)
=>
{
console
.
warn
(
"加载数据错误,"
+
typeof
error
==
"string"
?
error
:
JSON
.
stringify
(
error
)
);
});
}
/**
* 注入加载行为
*
* @type {*}
* @memberof AppTreeselectRefreshview
*/
@
Inject
(
"reload"
)
reload
!
:
any
;
/**
* 处理下拉框选中项
*
* @param {*} node 节点对象
* @memberof AppTreeselectRefreshview
*/
public
handleNodeClick
(
node
:
any
)
{
// 父级节点不进行处理
if
(
node
.
apps
)
{
return
;
}
// 从local中拿刷新前选中值
if
(
localStorage
.
getItem
(
"localdata"
))
{
const
localdata
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
"localdata"
)
as
string
);
if
(
localdata
.
dstappid
==
node
[
this
.
props
.
value
])
{
return
;
}
}
// 重新赋值
this
.
valueId
=
node
[
this
.
props
.
value
];
const
dstsystemid
:
any
=
node
.
systemId
;
this
.
valueTitle
=
dstsystemid
+
"-"
+
node
[
this
.
props
.
label
];
// 添加本地应用数据
const
localdata
:
any
=
{
dstsystemid
:
dstsystemid
,
dstappid
:
this
.
valueId
,
title
:
this
.
valueTitle
,
};
this
.
$store
.
commit
(
"addLocalData"
,
localdata
);
// 调用App.vue的加载行为
// this.reload();
// 浏览器window的加载行为
window
.
location
.
reload
();
}
/**
* 清空选中项
*
* @memberof AppTreeselectRefreshview
*/
public
clearHandle
()
{
this
.
valueId
=
null
;
this
.
valueTitle
=
""
;
this
.
defaultExpandedKey
=
[];
// 清空当前选中节点
let
tree
:
any
=
this
.
$refs
.
selectTree
;
tree
.
setCurrentKey
(
null
);
// 收缩所有节点
this
.
$nextTick
(()
=>
{
for
(
let
i
=
0
;
i
<
this
.
options
.
length
;
i
++
)
{
tree
.
store
.
nodesMap
[
this
.
options
[
i
].
id
].
expanded
=
false
;
}
});
}
/**
* vue销毁之前
*
* @memberof AppTreeselectRefreshview
*/
beforeDestroy
():
void
{
this
.
valueId
=
null
;
this
.
valueTitle
=
""
;
this
.
defaultExpandedKey
=
[];
this
.
options
=
[];
}
}
</
script
>
<
style
lang=
'less'
>
@import "app-treeselect-refreshview.less";
</
style
>
\ No newline at end of file
app_web/src/components/avue-component/avue-component.less
0 → 100644
浏览文件 @
0329f9ba
.avue-component{
border:1px solid #f0f0f0;
padding:5px;
.form-designer{
.fields-list{
a{
color:#333!important;
}
a:hover{
color:#2d8cf0!important;
}
}
}
}
\ No newline at end of file
app_web/src/components/avue-component/avue-component.vue
0 → 100644
浏览文件 @
0329f9ba
<
template
>
<div
class=
"avue-component"
>
<div
v-if=
"type === 'DynamicForm'"
>
<avue-form-design
:widconfigProps=
"widconfigProps"
class=
"app-form-design"
style=
"height: 86vh;"
:options=
"formOpt"
@
change=
"handleChange"
></avue-form-design>
</div>
<div
v-else-if=
"type === 'DynamicSubForm'"
>
<avue-form-design
:widconfigProps=
"widconfigProps"
class=
"app-form-design"
style=
"height: 86vh;"
:options=
"formOpt"
@
change=
"handleChange"
></avue-form-design>
</div>
<div
v-else-if=
"type === 'DynamicGrid'"
>
<app-avue-crud
:colOptions=
"tableOpt"
@
change=
"handleChange"
></app-avue-crud>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
,
Watch
,
}
from
"vue-property-decorator"
;
import
{
Subject
,
Subscription
}
from
"rxjs"
;
import
{
component
}
from
"vue/types/umd"
;
import
"./avue-component.less"
;
@
Component
({})
export
default
class
AvueComponent
extends
Vue
{
@
Prop
()
public
type
?:
string
;
@
Prop
()
public
options
?:
any
;
@
Prop
()
public
formState
!
:
Subject
<
any
>
;
@
Prop
()
public
name
:
any
;
@
Prop
()
public
systemid
:
any
;
@
Prop
()
public
entityname
:
any
;
public
widconfigProps
:
Array
<
any
>
=
[];
public
formOpt
:
any
=
{};
public
tableOpt
:
any
=
[];
public
handleChange
(
val
:
any
)
{
let
value
:
any
;
if
(
typeof
val
===
"string"
)
{
value
=
val
;
}
else
{
value
=
JSON
.
stringify
(
val
);
}
let
params
:
any
=
{
name
:
this
.
name
,
value
:
value
};
this
.
$emit
(
"formitemvaluechange"
,
params
);
}
/**
* 订阅对象
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AvueComponent
*/
protected
formStateEvent
:
Subscription
|
undefined
;
public
created
()
{
let
that
:
any
=
this
;
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
type
,
data
})
=>
{
if
(
Object
.
is
(
"load"
,
type
))
that
.
load
();
});
}
}
public
load
()
{
let
that
:
any
=
this
;
let
url
:
string
=
"lite/Sample/entitys/CITY"
;
if
(
this
.
systemid
&&
this
.
entityname
)
{
url
=
`lite/
${
this
.
systemid
}
/entitys/
${
this
.
entityname
}
`
;
}
this
.
$http
.
get
(
url
).
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
data
)
{
let
arr
:
Array
<
any
>
=
[];
let
data
:
any
=
response
.
data
;
data
.
fields
.
forEach
((
field
:
any
)
=>
{
arr
.
push
({
value
:
field
.
codeName
.
toLowerCase
(),
label
:
field
.
showName
,
comment
:
field
.
comment
});
});
that
.
widconfigProps
=
arr
;
that
.
$forceUpdate
();
}
});
if
(
this
.
options
)
{
let
opt
:
any
=
this
.
options
.
replace
(
/
[\n\r]
/g
,
""
);
if
(
this
.
type
)
if
(
this
.
type
.
indexOf
(
"Form"
)
>
0
)
{
this
.
formOpt
=
JSON
.
parse
(
opt
);
}
else
{
this
.
tableOpt
=
JSON
.
parse
(
opt
);
}
}
}
}
</
script
>
\ No newline at end of file
app_web/src/user-register.ts
浏览文件 @
0329f9ba
import
AvueComponent
from
'./components/avue-component/avue-component.vue'
import
AppAvueCrud
from
'./components/app-avue-crud/app-avue-crud.vue'
import
AppFormJson
from
'./components/app-form-json/app-form-json.vue'
import
AppTreeselectRefreshview
from
'./components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
export
const
UserComponent
=
{
install
(
v
:
any
,
opt
:
any
)
{
v
.
component
(
'avue-component'
,
AvueComponent
);
v
.
component
(
'app-avue-crud'
,
AppAvueCrud
);
v
.
component
(
'app-treeselect-refreshview'
,
AppTreeselectRefreshview
);
v
.
component
(
'app-form-json'
,
AppFormJson
);
}
};
\ No newline at end of file
app_web/tsconfig.json
浏览文件 @
0329f9ba
...
...
@@ -10,6 +10,16 @@
"experimentalDecorators"
:
true
,
"allowSyntheticDefaultImports"
:
true
,
"sourceMap"
:
true
,
"allowJs"
:
true
,
"allowUnreachableCode"
:
true
,
"strictNullChecks"
:
false
,
"noImplicitAny"
:
false
,
//
不报告未使用的标签错误。
"allowUnusedLabels"
:
true
,
//
以严格模式解析并为每个源文件生成
"use strict"
语句
"alwaysStrict"
:
false
,
"baseUrl"
:
"."
,
"types"
:
[
"webpack-env"
...
...
ibzdst-boot/src/main/java/cn/ibizlab/devsimul/DevNamingRegister.java
0 → 100644
浏览文件 @
0329f9ba
package
cn
.
ibizlab
.
devsimul
;
import
com.alibaba.nacos.api.naming.NamingFactory
;
import
com.alibaba.nacos.api.naming.NamingService
;
import
com.alibaba.nacos.api.naming.pojo.Instance
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.StringUtils
;
import
java.util.Properties
;
@Slf4j
@Component
public
class
DevNamingRegister
implements
ApplicationRunner
{
@Value
(
"${spring.cloud.nacos.discovery.server-addr:127.0.0.1:8848}"
)
private
String
serverAddr
;
@Value
(
"${spring.application.name:ibzdst}"
)
private
String
serviceName
;
@Value
(
"${server.port:8080}"
)
private
Integer
port
;
@Value
(
"${ibiz.ref.service.dst:ibzdst-api}"
)
private
String
dstapi
;
@Value
(
"${spring.cloud.nacos.discovery.group:DEFAULT_GROUP}"
)
private
String
group
;
@Override
public
void
run
(
ApplicationArguments
args
)
{
try
{
Thread
.
sleep
(
10000
);
Properties
properties
=
new
Properties
();
properties
.
setProperty
(
"serverAddr"
,
serverAddr
);
NamingService
naming
=
NamingFactory
.
createNamingService
(
properties
);
Instance
instance
=
naming
.
selectOneHealthyInstance
(
serviceName
,
group
);
if
(
instance
!=
null
&&(!
StringUtils
.
isEmpty
(
instance
.
getIp
())))
{
naming
.
registerInstance
(
dstapi
,
group
,
instance
);
}
}
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"开发模式模拟微服务注册失败:"
,
ex
));
}
}
}
\ No newline at end of file
ibzdst-boot/src/main/resources/application-boot.yml
0 → 100644
浏览文件 @
0329f9ba
server
:
port
:
8087
spring
:
datasource
:
username
:
root
password
:
root
url
:
jdbc:mysql://172.16.100.77:3306/a_A_5d9d78509?useUnicode=true&characterEncoding=utf8&useSSL=false&nullCatalogMeansCurrent=true
isSyncDBSchema
:
true
cloud
:
nacos
:
discovery
:
server-addr
:
172.16.100.77:8848
redis
:
host
:
172.16.100.77
\ No newline at end of file
ibzdst-boot/src/main/resources/application.yml
浏览文件 @
0329f9ba
spring
:
profiles
:
include
:
sys ,nacos, web-dev, api-dev, dev
include
:
sys ,nacos, web-dev, api-dev, dev
, boot
application
:
name
:
ibzdst
main
:
...
...
ibzdst-core/src/main/resources/liquibase/changelog/20201009053919_changelog.xml
0 → 100644
浏览文件 @
0329f9ba
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro=
"http://www.liquibase.org/xml/ns/pro"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.8.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"
>
<changeSet
author=
"mac (generated)"
id=
"1602221967552-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"IBZCOMPONENT"
/>
</not>
</preConditions>
<createTable
tableName=
"IBZCOMPONENT"
>
<column
name=
"CID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_DST_COMPONENT_CID"
/>
</column>
<column
name=
"CNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"SYSTEMID"
type=
"VARCHAR(100)"
/>
<column
name=
"APPID"
type=
"VARCHAR(100)"
/>
<column
name=
"CTYPE"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYID"
type=
"VARCHAR(100)"
/>
<column
name=
"CFG"
type=
"CLOB"
/>
</createTable>
<createTable
tableName=
"IBZDATASET"
>
<column
name=
"DATASETID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_META_DATASET_DATASETID"
/>
</column>
<column
name=
"DATASETNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYID"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"DSCODE"
type=
"CLOB"
/>
<column
name=
"DSMODEL"
type=
"CLOB"
/>
</createTable>
<createTable
tableName=
"IBZDATASOURCE"
>
<column
name=
"DSID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_DST_DATASOURCE_DSID"
/>
</column>
<column
name=
"DSNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"DSTYPE"
type=
"VARCHAR(100)"
/>
<column
name=
"DSCFG"
type=
"VARCHAR(4000)"
/>
</createTable>
<createTable
tableName=
"IBZENTITY"
>
<column
name=
"ENTITYID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_META_ENTITY_ENTITYID"
/>
</column>
<column
name=
"ENTITYNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"LOGICNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"TABLENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"SYSTEMID"
type=
"VARCHAR(100)"
/>
<column
name=
"DSID"
type=
"VARCHAR(100)"
/>
</createTable>
<createTable
tableName=
"IBZFIELD"
>
<column
name=
"FIELDID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_META_FIELD_FIELDID"
/>
</column>
<column
name=
"FIELDNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYID"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"FIELDLOGICNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"REFFIELDID"
type=
"VARCHAR(100)"
/>
<column
name=
"REFFIELDNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"RELATIONID"
type=
"VARCHAR(100)"
/>
<column
name=
"RELATIONNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"KEYFIELD"
type=
"INT"
/>
<column
name=
"MAJORFIELD"
type=
"INT"
/>
<column
name=
"UNIONKEY"
type=
"VARCHAR(70)"
/>
<column
name=
"FIELDTYPE"
type=
"VARCHAR(70)"
/>
<column
name=
"PREDEFINED"
type=
"VARCHAR(70)"
/>
<column
name=
"DICT"
type=
"VARCHAR(100)"
/>
<column
name=
"NULLABLE"
type=
"INT"
/>
<column
name=
"PHYSICALFIELD"
type=
"INT"
/>
<column
name=
"DATATYPE"
type=
"VARCHAR(100)"
/>
<column
name=
"DATALENGTH"
type=
"INT"
/>
<column
name=
"DATAPRECI"
type=
"INT"
/>
<column
name=
"EXPRESSION"
type=
"VARCHAR(2000)"
/>
<column
name=
"EXTENSIONFIELD"
type=
"INT"
/>
<column
name=
"SHOWORDER"
type=
"INT"
/>
<column
name=
"ISENABLEAUDIT"
type=
"INTEGER"
/>
</createTable>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
</column>
<column
name=
"MODELNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"MODELCFG"
type=
"CLOB"
/>
</createTable>
<createTable
tableName=
"IBZRELATION"
>
<column
name=
"RELATIONID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_META_RELATION_RELATIONID"
/>
</column>
<column
name=
"RELATIONNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"RELTYPE"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYID"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"REFENTITYID"
type=
"VARCHAR(100)"
/>
<column
name=
"REFENTITYNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"NESTEDNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"LOOKUP"
type=
"CLOB"
/>
</createTable>
<createTable
tableName=
"IBZROUTER"
>
<column
name=
"ROUTERID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_DST_ROUTER_ROUTERID"
/>
</column>
<column
name=
"ROUTERNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"SYSTEMID"
type=
"VARCHAR(100)"
/>
<column
name=
"APPID"
type=
"VARCHAR(100)"
/>
<column
name=
"ROUTERPATH"
type=
"VARCHAR(255)"
/>
<column
name=
"PARENTID"
type=
"VARCHAR(100)"
/>
<column
name=
"META"
type=
"CLOB"
/>
<column
name=
"COMPONENT"
type=
"VARCHAR(2000)"
/>
</createTable>
<createTable
tableName=
"IBZVIEW"
>
<column
name=
"VIEWID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_DST_VIEW_VIEWID"
/>
</column>
<column
name=
"VIEWNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"VIEWPATH"
type=
"VARCHAR(255)"
/>
<column
name=
"SYSTEMID"
type=
"VARCHAR(100)"
/>
<column
name=
"APPID"
type=
"VARCHAR(100)"
/>
<column
name=
"ENTITYID"
type=
"VARCHAR(100)"
/>
<column
name=
"CFG"
type=
"CLOB"
/>
</createTable>
</changeSet>
<changeSet
author=
"mac (generated)"
id=
"1602221967552-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"IBZPSSYSTEM"
/>
</not>
</preConditions>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
</column>
<column
name=
"PSSYSTEMNAME"
type=
"VARCHAR(100)"
/>
<column
name=
"SYSSTRUCTURE"
type=
"CLOB"
/>
<column
name=
"APPS"
type=
"CLOB"
/>
<column
name=
"MD5CHECK"
type=
"VARCHAR(100)"
/>
<column
name=
"SHOWORDER"
type=
"INT"
/>
</createTable>
</changeSet>
</databaseChangeLog>
ibzdst-core/src/main/resources/liquibase/changelog/20201113080245_changelog.xml
0 → 100644
浏览文件 @
0329f9ba
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro=
"http://www.liquibase.org/xml/ns/pro"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.8.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"
>
<changeSet
author=
"mac (generated)"
id=
"1605254576612-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"IBZMODULE"
/>
</not>
</preConditions>
<createTable
tableName=
"IBZMODULE"
>
<column
name=
"MODULEID"
type=
"VARCHAR(100)"
>
<constraints
nullable=
"false"
primaryKey=
"true"
primaryKeyName=
"PK_META_MODULE_MODULEID"
/>
</column>
<column
name=
"MODULENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"CODENAME"
type=
"VARCHAR(100)"
/>
<column
name=
"SYSTEMID"
type=
"VARCHAR(100)"
/>
<column
name=
"SHOWORDER"
type=
"INT"
/>
</createTable>
</changeSet>
<changeSet
author=
"mac (generated)"
id=
"1605254576612-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"IBZENTITY"
columnName=
"MODULEID"
/>
</not>
</preConditions>
<addColumn
tableName=
"IBZENTITY"
>
<column
name=
"MODULEID"
type=
"VARCHAR(100 BYTE)"
/>
</addColumn>
<addColumn
tableName=
"IBZENTITY"
>
<column
name=
"EXTPARAMS"
type=
"CLOB(2147483647)"
/>
</addColumn>
<addColumn
tableName=
"IBZENTITY"
>
<column
name=
"SHOWORDER"
type=
"INTEGER"
/>
</addColumn>
</changeSet>
</databaseChangeLog>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录