Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
b323d925
Commit
b323d925
authored
Oct 20, 2020
by
骆瑛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改样式项目管理
parent
16b2f89a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
466 additions
and
394 deletions
+466
-394
zh-CN.js
i18n/locale/zh-CN.js
+1
-0
add.vue
pages/system/project/atom/add.vue
+430
-231
edit.vue
pages/system/project/atom/edit.vue
+9
-6
index.vue
pages/system/project/atom/index.vue
+2
-1
add.vue
pages/system/project/project/add.vue
+2
-81
edit.vue
pages/system/project/project/edit.vue
+22
-74
index.vue
pages/system/project/project/index.vue
+0
-1
No files found.
i18n/locale/zh-CN.js
View file @
b323d925
...
...
@@ -1265,5 +1265,6 @@ export default {
module
:
'模块'
,
version
:
'版本'
,
projectId
:
'项目id'
,
systemName
:
"系统业务"
}
}
\ No newline at end of file
pages/system/project/atom/add.vue
View file @
b323d925
...
...
@@ -57,112 +57,200 @@
<Icon
:type=
"iconType"
/>
{{
textUp
}}
</div>
</Row>
<Divider
orientation=
"left"
>
扩展属性
</Divider>
<Row
style=
"margin-bottom: 10px"
:gutter=
"10"
>
<Col
:span=
"6"
>
<AutoComplete
v-model=
"completeValue"
icon=
"ios-search"
placeholder=
"请搜索"
style=
"width: 100%"
<Row
style=
"margin-top: 10px"
>
<Tabs>
<TabPane
label=
"实体定义"
name=
"base"
>
</TabPane>
<TabPane
v-for=
"tab in content.dtos"
:key=
"tab.code"
:label=
"tab.name"
>
<Option
v-for=
"option in completeList"
:value=
"option.name"
:key=
"option.id"
</TabPane>
<Button
@
click=
"modal1 = true"
size=
"small"
slot=
"extra"
>
增加
</Button
>
<Modal
v-model=
"modal1"
title=
"增加"
@
on-ok=
"okModal('formline')"
@
on-cancel=
"cancelModal('formline')"
>
<Form
:model=
"formline"
ref=
"formline"
:rules=
"ruleInline"
:label-width=
"80"
>
<span
class=
"demo-auto-complete-title"
>
{{
option
.
name
}}
</span>
<span
class=
"demo-auto-complete-count"
style=
"float: right"
>
{{
option
.
code
}}
</span>
</Option>
</AutoComplete>
</Col>
<Col
:span=
"2"
>
<Button
type=
"primary"
@
click=
"importColumns"
>
导入
</Button>
</Col>
<p>
<FormItem
label=
"名称:"
prop=
"name"
>
<Input
v-model=
"formline.name"
placeholder=
"请输入名称"
></Input>
</FormItem>
</p>
<p>
<FormItem
label=
"编码:"
prop=
"code"
>
<Input
v-model=
"formline.code"
placeholder=
"请输入编码"
></Input>
</FormItem>
</p>
</Form>
</Modal>
</Tabs>
</Row>
<Table
:columns=
"columns"
:data=
"checkList"
border
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType == 1 || row.fieldType == 2"
>
{{
row
.
title
}}
</div>
<Input
v-model=
"row.title"
placeholder=
"请输入名称"
@
on-blur=
"setRow(row, index)"
v-if=
"row.fieldType == 3"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<Select
v-if=
"row.dataType == 3"
v-model=
"row.note"
clearable
transfer
@
on-change=
"setRow(row, index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option
<Row>
<Row
style=
"margin-bottom: 10px"
:gutter=
"10"
>
<Col
:span=
"6"
>
<AutoComplete
v-model=
"completeValue"
icon=
"ios-search"
placeholder=
"请搜索"
style=
"width: 100%"
>
</Select>
<span
v-else
>
{{
row
.
note
}}
</span>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
@
on-change=
"setRow(row, index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unitName"
>
<Dictionary
v-if=
"row.dataType == 1 || row.dataType == 2"
@
on-change=
"setRow(row, index)"
v-model=
"row.unitName"
code=
"material.main.unitName"
type=
"select"
placeholder=
"请选择单位"
:value=
"row.unitName"
:key=
"row.unitName"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row, index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row, index)"
></Checkbox>
</
template
>
<Option
v-for=
"option in completeList"
:value=
"option.name"
:key=
"option.id"
>
<span
class=
"demo-auto-complete-title"
>
{{
option
.
name
}}
</span>
<span
class=
"demo-auto-complete-count"
style=
"float: right"
>
{{
option
.
code
}}
</span>
</Option>
</AutoComplete>
</Col>
<Col
:span=
"2"
>
<Button
type=
"primary"
@
click=
"importColumns"
>
导入
</Button>
</Col>
</Row>
<Table
:columns=
"columns1"
:data=
"checkList"
border
:draggable=
"true"
@
on-drag-drop=
"onDragDrop"
>
<template
slot-scope=
"
{ row, index }" slot="columnDescription">
<Input
v-on:input=
'onIpnt(row, index)'
v-model=
"row.columnDescription"
@
on-change=
"setRow(row, index)"
placeholder=
"请输入"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<Dictionary
@
on-change=
"setRow(row, index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"propertyName"
>
<Input
v-on:input=
'onIpnt(row, index)'
v-model=
"row.propertyName"
@
on-change=
"setRow(row, index)"
placeholder=
"请输入"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"code"
>
<Input
@
on-change=
"setRow(row, index)"
v-model=
"row.code"
:disabled=
"row.dataType != 3 && row.dataType != 10"
placeholder=
"请输入"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isNullable"
>
<Checkbox
v-model=
"row.isNullable"
@
on-change=
"setRow(row, index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"unit"
>
<Dictionary
:disabled=
"row.dataType != 1 && row.dataType != 2"
@
on-change=
"setRow(row, index)"
v-model=
"row.unit"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"length"
>
<Input
v-model=
"row.length"
@
on-change=
"setRow(row, index)"
placeholder=
"请输入"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
<a
@
click=
"remove(index, row)"
style=
"color: #ff7a8b"
v-if=
"row.fieldType > 1"
>
删除
</a
>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew('{}')"
class=
"mt10"
>
新增属性
</Button
>
<
template
slot-scope=
"{ row, index }"
slot=
"link"
>
<Input
v-model=
"row.link"
@
on-change=
"setRow(row, index)"
placeholder=
"请输入"
number
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"systemName"
>
<div>
{{
row
.
systemName
}}
</div>
<!--
<Dictionary
@
on-change=
"setRow(row, index)"
v-model=
"row.systemName"
code=
"project.main.systemName"
type=
"select"
:value=
"row.systemName"
:key=
"row.systemName"
></Dictionary>
-->
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"list"
>
<Checkbox
v-model=
"row.list"
@
on-change=
"setRow(row, index)"
>
</Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"add"
>
<Checkbox
v-model=
"row.add"
@
on-change=
"setRow(row, index)"
>
</Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"uniqueness"
>
<Checkbox
v-model=
"row.uniqueness"
@
on-change=
"setRow(row, index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"defaultValue"
>
<Input
v-model=
"row.defaultValue"
placeholder=
"请输入"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
<a
@
click=
"remove(index, row)"
style=
"color: #ff7a8b"
v-if=
"row.fieldType > 1"
>
删除
</a
>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew(0, '{}')"
class=
"mt10"
>
新增属性
</Button
>
</Row>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
...
...
@@ -175,6 +263,15 @@ export default {
name
:
"Add"
,
data
()
{
return
{
formline
:
{
name
:
""
,
code
:
""
,
},
ruleInline
:
{
name
:
[{
required
:
true
,
message
:
"请输入名称"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"请输入编码"
,
trigger
:
"blur"
}],
},
modal1
:
false
,
iconType
:
"ios-arrow-up"
,
textUp
:
"收起"
,
upDrop
:
true
,
...
...
@@ -182,118 +279,148 @@ export default {
completeList
:
[],
codeList
:
[],
checkList
:
[
{
field
:
"code"
,
title
:
"编号"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
false
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"version"
,
title
:
"版本"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"secret"
,
title
:
"密级"
,
note
:
""
,
dataType
:
3
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"name"
,
title
:
"标题"
,
note
:
""
,
dataType
:
0
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
//共有属性(不能删除)
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
{
field
:
"description"
,
title
:
"文档详细说明"
,
note
:
""
,
dataType
:
8
,
unitName
:
""
,
required
:
true
,
isunique
:
false
,
fieldType
:
1
,
//共有属性(不能删除)
categoryId
:
0
,
action
:
1
,
add
:
0
,
//新增标识
},
// {
// // mid: maxId + 1,
// // field: "c" + maxId,
// systemName: 0,
// columnDescription: "", // 中文名称
// dbColumnName: "", // 字段名称
// dataType: 0, // 数据库中字段类型
// propertyName: "", //程序中的字段名称
// propertyType: "", // 程序中的字段类型
// code: "", // 数据字典编码
// isNullable: false, // 是否可空
// isKey: false, // 是否主键
// unit: 0, // 单位
// length: 0, //
// decimalDigits: 0, // 精度
// link: 0, //外键 表的
// defaultValue: "", // 默认值
// control: 0,
// add: 0,
// uniqueness: 0, // 唯一性 0 不限制 1 表内唯一 2 表内某条件下唯一
// ruleType: "", // 邮箱 ,电话,等,
// busType: 0, // 0 系统字段 1 业务字段 2 自定义字段
// fieldType: 3,
// action: 1,
// add: 0 //新增标识
// }
],
columns
:
[
columns
1
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
8
0
,
width
:
7
0
,
align
:
"center"
,
},
{
title
:
"属性名称"
,
key
:
"title"
,
slot
:
"title"
,
title
:
"名称(*)"
,
align
:
"center"
,
key
:
"columnDescription"
,
slot
:
"columnDescription"
,
width
:
150
,
renderHeader
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"span"
,
"名称("
),
h
(
"span"
,
{
style
:
{
color
:
"red"
}
},
"*"
),
h
(
"span"
,
")"
),
]);
},
},
{
title
:
"
属性
类型"
,
title
:
"类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
200
,
width
:
150
,
high
:
true
,
},
{
title
:
"属性(*)"
,
align
:
"center"
,
key
:
"propertyName"
,
slot
:
"propertyName"
,
high
:
false
,
renderHeader
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"span"
,
"属性("
),
h
(
"span"
,
{
style
:
{
color
:
"red"
}
},
"*"
),
h
(
"span"
,
")"
),
]);
},
},
{
title
:
"
设置
"
,
key
:
"
not
e"
,
title
:
"
关联
"
,
key
:
"
cod
e"
,
align
:
"center"
,
slot
:
"
not
e"
,
slot
:
"
cod
e"
,
},
{
title
:
"单位"
,
key
:
"unit
Name
"
,
key
:
"unit"
,
align
:
"center"
,
slot
:
"unitName"
,
width
:
"150"
,
slot
:
"unit"
,
},
{
title
:
"
必填
"
,
key
:
"
required
"
,
title
:
"
长度
"
,
key
:
"
length
"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
,
slot
:
"length"
,
},
{
title
:
"
唯一
"
,
key
:
"
isUniqu
e"
,
title
:
"
业务类型
"
,
key
:
"
systemNam
e"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
,
slot
:
"systemName"
,
width
:
190
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"span"
,
{},
this
.
sysDist
(
params
.
row
.
systemName
)),
]);
},
},
{
title
:
"是否可空"
,
key
:
"isNullable"
,
align
:
"center"
,
slot
:
"isNullable"
,
width
:
100
,
},
{
title
:
"业务设置"
,
align
:
"center"
,
children
:
[
{
title
:
"列表"
,
key
:
"list"
,
align
:
"center"
,
slot
:
"list"
,
width
:
70
,
},
{
title
:
"新增"
,
key
:
"add"
,
align
:
"center"
,
slot
:
"add"
,
width
:
70
,
},
{
title
:
"唯一"
,
key
:
"uniqueness"
,
align
:
"center"
,
slot
:
"uniqueness"
,
width
:
70
,
},
{
title
:
"默认值"
,
key
:
"defaultValue"
,
align
:
"center"
,
slot
:
"defaultValue"
,
},
],
},
{
width
:
80
,
title
:
"操作"
,
...
...
@@ -312,7 +439,6 @@ export default {
englishName
:
""
,
status
:
null
,
description
:
""
,
content
:
[],
inheritCategoryId
:
null
,
code
:
""
,
module
:
""
,
...
...
@@ -323,6 +449,10 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
content
:
{
base
:
[],
dtos
:
[],
},
};
},
props
:
{
...
...
@@ -330,12 +460,43 @@ export default {
eid
:
Number
,
},
mounted
()
{
this
.
seachChange
();
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
this
.
seachChange
();
}
},
methods
:
{
sysDist
(
value
)
{
if
(
value
==
0
)
{
return
"系统"
;
}
else
if
(
value
==
1
)
{
return
"业务"
;
}
else
if
(
value
==
2
)
{
return
"扩展"
;
}
},
okModal
(
name
)
{
this
.
$refs
[
name
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
obj
=
{
name
:
this
.
formline
.
name
,
code
:
this
.
formline
.
code
,
list
:
[],
};
this
.
content
.
dtos
.
push
(
obj
);
console
.
log
(
this
.
content
.
dtos
);
this
.
$refs
[
name
].
resetFields
();
this
.
modal1
=
false
;
}
});
},
cancelModal
(
name
)
{
this
.
$refs
[
name
].
resetFields
();
this
.
modal1
=
false
;
},
onDragDrop
(
a
,
b
)
{
this
.
checkList
.
splice
(
b
,
0
,
...
this
.
checkList
.
splice
(
a
,
1
));
},
importColumns
()
{
//导入
let
changeId
=
{};
...
...
@@ -347,7 +508,7 @@ export default {
this
.
completeValue
=
""
;
}
});
this
.
addNew
(
changeId
);
this
.
addNew
(
1
,
changeId
);
}
},
upClick
(
value
)
{
...
...
@@ -377,7 +538,7 @@ export default {
//新增的删除,直接删
this
.
checkList
.
splice
(
index
,
1
);
let
objArr
=
{
name
:
row
.
title
,
name
:
row
.
columnDescription
,
code
:
row
.
code
,
id
:
row
.
id
,
};
...
...
@@ -389,71 +550,107 @@ export default {
this
.
checkList
.
splice
(
index
,
1
);
}
},
onIpnt
(
a
,
b
){
console
.
log
(
a
,
b
)
},
setRow
(
row
,
index
)
{
// if (index >= 1) {
// console.log(this.checkList.length)
// for(var i=1;i
<
this
.
checkList
.
length
;
i
++
){
// if (this.checkList[0].columnDescription == this.checkList[i].columnDescription) {
// this.$Message.error("表格名称重复!");
// row.columnDescription = "";
// return;
// }
// if (this.checkList[0].propertyName == this.checkList[i].propertyName) {
// this.$Message.error("表格属性重复!");
// row.propertyName = "";
// return;
// }
// }
// }
if
(
row
.
dataType
==
0
||
row
.
dataType
==
8
)
{
row
.
length
=
50
;
}
else
{
row
.
length
=
0
;
}
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
(
e
)
{
addNew
(
index
,
e
)
{
let
id
=
""
,
code
=
""
,
name
=
""
;
if
(
e
==
"{}"
)
{
id
=
""
;
code
=
""
;
name
=
""
;
}
else
{
name
=
""
,
flag
=
false
;
if
(
index
==
0
&&
e
==
"{}"
)
{
this
.
checkList
.
forEach
((
s
,
index
)
=>
{
if
(
s
.
columnDescription
==
""
)
{
this
.
$Message
.
warning
(
"请填写表格名称!"
);
return
(
flag
=
true
);
}
if
(
s
.
propertyName
==
""
)
{
this
.
$Message
.
warning
(
"请填写表格属性!"
);
return
(
flag
=
true
);
}
});
if
(
flag
==
true
)
{
return
;
}
}
else
if
(
index
==
1
&&
JSON
.
stringify
(
e
)
!=
"{}"
)
{
id
=
e
.
id
;
code
=
e
.
code
;
name
=
e
.
name
;
}
else
{
this
.
$Message
.
warning
(
"请选择导入字段!"
);
return
;
}
let
maxId
=
0
;
this
.
checkList
.
map
((
u
)
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
});
//
let maxId = 0;
//
this.checkList.map((u) => {
//
if (u.mid > maxId) {
//
maxId = u.mid;
//
}
//
});
let
obj
=
{
id
:
id
,
code
:
code
,
mid
:
maxId
+
1
,
field
:
"c"
+
maxId
,
title
:
name
,
note
:
""
,
unitName
:
""
,
// mid: maxId + 1,
// field: "c" + maxId,
systemName
:
0
,
columnDescription
:
name
,
defaultValue
:
""
,
isNullable
:
false
,
unit
:
0
,
link
:
0
,
dataType
:
0
,
required
:
false
,
isunique
:
false
,
isKey
:
false
,
// 是否主键
length
:
50
,
propertyName
:
""
,
//程序中的字段名称
propertyType
:
""
,
// 程序中的字段类型
fieldType
:
3
,
categoryId
:
0
,
//
categoryId: 0,
action
:
1
,
add
:
0
,
//新增标识
};
this
.
checkList
.
push
(
obj
);
},
handleSubmit
()
{
let
keys
=
false
;
let
name
=
""
;
this
.
checkList
.
forEach
((
s
,
index
)
=>
{
if
(
s
.
columnDescription
==
""
)
{
this
.
$Message
.
warning
(
"请填写表格名称!"
);
return
(
keys
=
true
);
}
if
(
s
.
propertyName
==
""
)
{
this
.
$Message
.
warning
(
"请填写表格属性!"
);
return
(
keys
=
true
);
}
});
if
(
keys
==
true
)
{
return
;
}
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
var
data
=
{
base
:
this
.
checkList
,
dtos
:[
{
name
:
"新增"
,
code
:
"Create"
,
list
:[]
},
{
name
:
"编辑"
,
code
:
"Eidt"
,
list
:[]
},
{
name
:
"列表"
,
code
:
"List"
,
list
:[]
},
]
}
this
.
entity
.
content
=
JSON
.
stringify
(
this
.
checkList
);
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
...
...
@@ -478,6 +675,7 @@ export default {
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
content
.
base
=
this
.
checkList
;
this
.
entity
.
id
=
0
;
});
},
...
...
@@ -498,7 +696,7 @@ export default {
},
};
</
script
>
<
style
scoped
>
<
style
scoped
>
.textIcon
{
width
:
100%
;
height
:
20px
;
...
...
@@ -511,4 +709,5 @@ export default {
.textIcon
:hover
{
opacity
:
0.7
;
}
</
style
>
>
</
style
>
>
pages/system/project/atom/edit.vue
View file @
b323d925
...
...
@@ -156,7 +156,7 @@
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew('{}')"
class=
"mt10"
<Button
type=
"dashed"
long
@
click=
"addNew(
0,
'{}')"
class=
"mt10"
>
新增属性
</Button
>
</Col>
...
...
@@ -266,7 +266,7 @@ export default {
this
.
completeValue
=
""
;
}
});
this
.
addNew
(
changeId
);
this
.
addNew
(
1
,
changeId
);
}
},
upClick
(
value
)
{
...
...
@@ -314,18 +314,21 @@ export default {
setRow
(
row
,
index
)
{
this
.
$set
(
this
.
checkList
,
index
,
row
);
},
addNew
(
e
)
{
let
id
=
""
,
addNew
(
index
,
e
)
{
let
id
=
""
,
code
=
""
,
name
=
""
;
if
(
e
==
"{}"
)
{
if
(
index
==
0
&&
e
==
'{}'
)
{
id
=
""
;
code
=
""
;
name
=
""
;
}
else
{
}
else
if
(
index
==
1
&&
JSON
.
stringify
(
e
)
!=
'{}'
)
{
id
=
e
.
id
;
code
=
e
.
code
;
name
=
e
.
name
;
}
else
{
this
.
$Message
.
warning
(
"请选择导入字段!"
);
return
;
}
let
maxId
=
0
;
this
.
checkList
.
map
((
u
)
=>
{
...
...
pages/system/project/atom/index.vue
View file @
b323d925
...
...
@@ -21,7 +21,8 @@
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<!-- fullscreen -->
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
fullscreen
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
...
...
pages/system/project/project/add.vue
View file @
b323d925
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<!--
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Input
v-model=
"entity.type"
>
</Input>
</FormItem
>
-->
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"base.project.type"
v-model=
"entity.type"
></Dictionary>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Input
v-model=
"entity.level"
>
</Input>
</FormItem
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('englishFullName')"
prop=
"englishFullName"
>
<Input
v-model=
"entity.englishFullName"
>
</Input>
</FormItem
...
...
@@ -74,9 +23,6 @@
<Input
v-model=
"entity.englishName"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
>
<!--
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"entity.status"
>
</Input>
</FormItem
>
-->
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"base.project.status"
v-model=
"entity.status"
></Dictionary>
</FormItem>
...
...
@@ -85,22 +31,6 @@
><FormItem
:label=
"l('module')"
prop=
"module"
>
<Input
v-model=
"entity.module"
>
</Input>
</FormItem
></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('upId')"
prop=
"upId"
>
<InputNumber
v-model=
"entity.upId"
></InputNumber>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('tenantId')"
prop=
"tenantId"
>
<InputNumber
v-model=
"entity.tenantId"
></InputNumber>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('inheritCategoryId')"
prop=
"inheritCategoryId"
>
<InputNumber
v-model=
"entity.inheritCategoryId"
></InputNumber>
</FormItem
></Col>
-->
<Col
:span=
"24"
><FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
...
...
@@ -111,9 +41,7 @@
></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
...
...
@@ -126,13 +54,6 @@ export default {
return
{
disabled
:
false
,
entity
:
{
// creationTime: null,
// creatorUserId: null,
// lastModificationTime: null,
// lastModifierUserId: null,
// isDeleted: null,
// deletionTime: null,
// deleterUserId: null,
name
:
""
,
upId
:
this
.
eid
,
level
:
null
,
...
...
pages/system/project/project/edit.vue
View file @
b323d925
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"base.project.type"
v-model=
"entity.type"
></Dictionary>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"base.project.type"
v-model=
"entity.type"
></Dictionary>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Input
v-model=
"entity.level"
>
</Input>
</FormItem
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('englishFullName')"
prop=
"englishFullName"
>
<Input
v-model=
"entity.englishFullName"
>
</Input>
</FormItem
...
...
@@ -68,32 +25,18 @@
><FormItem
:label=
"l('englishName')"
prop=
"englishName"
>
<Input
v-model=
"entity.englishName"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"base.project.status"
v-model=
"entity.status"
></Dictionary>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"base.project.status"
v-model=
"entity.status"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('module')"
prop=
"module"
>
<Input
v-model=
"entity.module"
>
</Input>
</FormItem
></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('upId')"
prop=
"upId"
>
<InputNumber
v-model=
"entity.upId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('tenantId')"
prop=
"tenantId"
>
<InputNumber
v-model=
"entity.tenantId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('inheritCategoryId')"
prop=
"inheritCategoryId"
>
<InputNumber
v-model=
"entity.inheritCategoryId"
></InputNumber>
</FormItem
></Col>
-->
<Col
:span=
"24"
><FormItem
:label=
"l('description')"
prop=
"description"
>
<Input
...
...
@@ -142,9 +85,14 @@ export default {
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
let
datas
=
{
let
datas
=
{
creationTime
:
this
.
entity
.
creationTime
,
creatorUserId
:
this
.
entity
.
creatorUserId
,
description
:
this
.
entity
.
description
,
code
:
this
.
entity
.
code
,
id
:
this
.
entity
.
id
,
englishFullName
:
this
.
entity
.
englishFullName
,
englishName
:
this
.
entity
.
englishName
,
inheritCategoryId
:
this
.
entity
.
inheritCategoryId
,
lastModificationTime
:
this
.
entity
.
lastModificationTime
,
lastModifierUserId
:
this
.
entity
.
lastModifierUserId
,
...
...
@@ -153,9 +101,9 @@ export default {
name
:
this
.
entity
.
name
,
status
:
this
.
entity
.
status
,
tenantId
:
this
.
entity
.
tenantId
,
type
:
this
.
entity
.
type
,
upId
:
this
.
entity
.
upId
}
type
:
this
.
entity
.
type
,
upId
:
this
.
entity
.
upId
,
}
;
Api
.
update
(
datas
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
...
...
pages/system/project/project/index.vue
View file @
b323d925
...
...
@@ -128,7 +128,6 @@ export default {
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
code
:
"project.base.code"
,
easy
:
true
,
high
:
true
,
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment