Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9a128eb3
authored
Dec 09, 2023
by
Thews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20231209wangwansu
1 parent
85e87296
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
381 additions
and
13 deletions
src/views/metaModelDic/pages/page1.vue
src/views/metaModelDic/pages/page2.vue
src/views/metaModelDic/pages/page3.vue
src/views/metaModelDic/pages/page1.vue
View file @
9a128eb
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
:title=
"title"
:title=
"title"
:visible
.
sync=
"add_dialog"
:visible
.
sync=
"add_dialog"
:center=
"false"
:center=
"false"
width=
"
4
0%"
>
width=
"
6
0%"
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<div
class=
"dialog_content_1"
>
<div
class=
"dialog_content_1"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item"
>
...
@@ -97,6 +97,58 @@
...
@@ -97,6 +97,58 @@
</el-select>
</el-select>
</div>
</div>
</div>
</div>
<el-table
:data=
"tableData2"
stripe
border
height=
"350"
@
cell-dblclick=
"tableDbclick"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"fieldName"
label=
"字段名"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
fieldName
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.fieldName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"chineseName"
label=
"中文名"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
chineseName
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.chineseName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"displayOrder"
label=
"排序"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
displayOrder
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.displayOrder"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"contentLength"
label=
"长度"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
contentLength
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.contentLength"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"controlType"
label=
"控件"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
dicObj
.
controlType
[
scope
.
row
.
controlType
]
}}
</div>
<el-select
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
v-model=
"scope.row.controlType"
>
<el-option
v-for=
"(item, stateListIndex) in stateList"
:key=
"stateListIndex"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<!--
<el-button
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operateDia('edit',scope.row)"
>
编辑
</el-button>
-->
<el-button
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"operateDia('add',scope.row,scope.$index)"
>
添加
</el-button>
<el-button
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operateDia('del',scope.row,scope.$index)"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
<!-- <div class="newBtn">
<el-button class="addItem" icon="el-icon-plus" circle></el-button>
</div> -->
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
...
@@ -125,6 +177,15 @@ export default {
...
@@ -125,6 +177,15 @@ export default {
data
()
{
data
()
{
return
{
return
{
tableData
:
[],
tableData
:
[],
tableData2
:
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
],
selectList
:
[],
selectList
:
[],
add_dialog
:
false
,
add_dialog
:
false
,
title
:
""
,
title
:
""
,
...
@@ -161,6 +222,11 @@ export default {
...
@@ -161,6 +222,11 @@ export default {
1
:
"已发布"
,
1
:
"已发布"
,
2
:
"暂存"
,
2
:
"暂存"
,
},
},
controlType
:
{
0
:
"单行文本框"
,
1
:
"多行文本框"
,
2
:
"下拉框"
,
}
},
},
stateList
:
[
stateList
:
[
{
{
...
@@ -177,6 +243,22 @@ export default {
...
@@ -177,6 +243,22 @@ export default {
},
},
],
],
search_select1
:
[],
search_select1
:
[],
selectTypeList
:
[
{
label
:
"单行文本框"
,
value
:
0
,
},
{
label
:
"多行文本框"
,
value
:
1
,
},
{
label
:
"下拉框"
,
value
:
2
,
},
],
columnIsShow
:
false
,
editIndex
:
-
1
,
// 当前编辑行
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -228,6 +310,17 @@ export default {
...
@@ -228,6 +310,17 @@ export default {
this
.
add_dialog
=
true
;
this
.
add_dialog
=
true
;
this
.
title
=
"编辑字典"
;
this
.
title
=
"编辑字典"
;
this
.
formData
=
item
;
this
.
formData
=
item
;
if
(
this
.
tableData2
.
length
==
0
)
{
this
.
tableData2
=
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
];
}
}
else
if
(
type
==
"create"
)
{
}
else
if
(
type
==
"create"
)
{
this
.
formData
.
state
=
2
;
this
.
formData
.
state
=
2
;
if
(
this
.
formData
.
dicyId
)
{
if
(
this
.
formData
.
dicyId
)
{
...
@@ -319,6 +412,36 @@ export default {
...
@@ -319,6 +412,36 @@ export default {
});
});
})
})
},
},
// 对话表格操作
operateDia
(
type
,
scopeRow
,
index
){
console
.
log
(
type
,
scopeRow
,
index
);
let
arr
=
this
.
tableData2
.
concat
();
let
addData
=
JSON
.
parse
(
JSON
.
stringify
(
arr
[
index
]));
// JSON.parse(JSON.stringify(arr[index]))
switch
(
type
)
{
// 添加
case
'add'
:
addData
.
fieldName
=
''
;
addData
.
chineseName
=
''
;
addData
.
displayOrder
=
''
;
addData
.
contentLength
=
''
;
addData
.
controlType
=
''
;
arr
.
splice
(
index
+
1
,
0
,
addData
);
break
;
// 删除
case
'del'
:
arr
.
splice
(
index
,
1
)
break
;
}
this
.
tableData2
=
arr
;
},
tableDbclick
(
row
,
column
,
cell
,
e
){
if
(
this
.
readOnly
)
{
return
;
}
this
.
editIndex
=
row
.
index
;
this
.
columnIsShow
=
true
;
},
},
},
}
}
</
script
>
</
script
>
...
@@ -331,6 +454,13 @@ export default {
...
@@ -331,6 +454,13 @@ export default {
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
.newBtn
{
margin-top
:
5px
;
.addItem{
background-color
:
#0D867F
;
color
:
#fff
;
}
}
.dialog_content_1
{
.dialog_content_1
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
...
src/views/metaModelDic/pages/page2.vue
View file @
9a128eb
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
:title=
"title"
:title=
"title"
:visible
.
sync=
"add_dialog"
:visible
.
sync=
"add_dialog"
:center=
"false"
:center=
"false"
width=
"
4
0%"
>
width=
"
6
0%"
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<div
class=
"dialog_content_1"
>
<div
class=
"dialog_content_1"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item"
>
...
@@ -106,6 +106,58 @@
...
@@ -106,6 +106,58 @@
</el-select>
</el-select>
</div>
</div>
</div>
</div>
<el-table
:data=
"tableData2"
stripe
border
height=
"350"
@
cell-dblclick=
"tableDbclick"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"fieldName"
label=
"字段名"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
fieldName
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.fieldName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"chineseName"
label=
"中文名"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
chineseName
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.chineseName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"displayOrder"
label=
"排序"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
displayOrder
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.displayOrder"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"contentLength"
label=
"长度"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
contentLength
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.contentLength"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"controlType"
label=
"控件"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
dicObj
.
controlType
[
scope
.
row
.
controlType
]
}}
</div>
<el-select
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
v-model=
"scope.row.controlType"
>
<el-option
v-for=
"(item, stateListIndex) in stateList"
:key=
"stateListIndex"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<!--
<el-button
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operateDia('edit',scope.row)"
>
编辑
</el-button>
-->
<el-button
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"operateDia('add',scope.row,scope.$index)"
>
添加
</el-button>
<el-button
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operateDia('del',scope.row,scope.$index)"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
<!-- <div class="newBtn">
<el-button class="addItem" icon="el-icon-plus" circle></el-button>
</div> -->
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
...
@@ -133,6 +185,15 @@ export default {
...
@@ -133,6 +185,15 @@ export default {
data
()
{
data
()
{
return
{
return
{
tableData
:
[],
tableData
:
[],
tableData2
:
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
],
selectList
:
[],
selectList
:
[],
add_dialog
:
false
,
add_dialog
:
false
,
title
:
""
,
title
:
""
,
...
@@ -169,6 +230,11 @@ export default {
...
@@ -169,6 +230,11 @@ export default {
1
:
"已发布"
,
1
:
"已发布"
,
2
:
"暂存"
,
2
:
"暂存"
,
},
},
controlType
:
{
0
:
"单行文本框"
,
1
:
"多行文本框"
,
2
:
"下拉框"
,
}
},
},
stateList
:
[
stateList
:
[
{
{
...
@@ -184,6 +250,22 @@ export default {
...
@@ -184,6 +250,22 @@ export default {
value
:
2
,
value
:
2
,
},
},
],
],
selectTypeList
:
[
{
label
:
"单行文本框"
,
value
:
0
,
},
{
label
:
"多行文本框"
,
value
:
1
,
},
{
label
:
"下拉框"
,
value
:
2
,
},
],
columnIsShow
:
false
,
editIndex
:
-
1
,
// 当前编辑行
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -227,14 +309,21 @@ export default {
...
@@ -227,14 +309,21 @@ export default {
// 所有操作
// 所有操作
operate
(
type
,
item
){
operate
(
type
,
item
){
this
.
openType
=
type
;
this
.
openType
=
type
;
if
(
type
==
"add"
)
{
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"新建字典"
;
this
.
resetForm
();
}
else
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
add_dialog
=
true
;
this
.
title
=
"编辑字典"
;
this
.
title
=
"编辑字典"
;
this
.
formData
=
item
;
this
.
formData
=
item
;
if
(
this
.
tableData2
.
length
==
0
)
{
this
.
tableData2
=
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
];
}
}
else
if
(
type
==
"create"
)
{
}
else
if
(
type
==
"create"
)
{
this
.
formData
.
state
=
2
;
this
.
formData
.
state
=
2
;
if
(
this
.
formData
.
dicyId
)
{
if
(
this
.
formData
.
dicyId
)
{
...
@@ -324,6 +413,36 @@ export default {
...
@@ -324,6 +413,36 @@ export default {
return
false
//不可勾选
return
false
//不可勾选
}
}
},
},
// 对话表格操作
operateDia
(
type
,
scopeRow
,
index
){
console
.
log
(
type
,
scopeRow
,
index
);
let
arr
=
this
.
tableData2
.
concat
();
let
addData
=
JSON
.
parse
(
JSON
.
stringify
(
arr
[
index
]));
// JSON.parse(JSON.stringify(arr[index]))
switch
(
type
)
{
// 添加
case
'add'
:
addData
.
fieldName
=
''
;
addData
.
chineseName
=
''
;
addData
.
displayOrder
=
''
;
addData
.
contentLength
=
''
;
addData
.
controlType
=
''
;
arr
.
splice
(
index
+
1
,
0
,
addData
);
break
;
// 删除
case
'del'
:
arr
.
splice
(
index
,
1
)
break
;
}
this
.
tableData2
=
arr
;
},
tableDbclick
(
row
,
column
,
cell
,
e
){
if
(
this
.
readOnly
)
{
return
;
}
this
.
editIndex
=
row
.
index
;
this
.
columnIsShow
=
true
;
},
},
},
}
}
</
script
>
</
script
>
...
...
src/views/metaModelDic/pages/page3.vue
View file @
9a128eb
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
:title=
"title"
:title=
"title"
:visible
.
sync=
"add_dialog"
:visible
.
sync=
"add_dialog"
:center=
"false"
:center=
"false"
width=
"
4
0%"
>
width=
"
6
0%"
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<div
class=
"dialog_content_1"
>
<div
class=
"dialog_content_1"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item"
>
...
@@ -106,6 +106,58 @@
...
@@ -106,6 +106,58 @@
</el-select>
</el-select>
</div>
</div>
</div>
</div>
<el-table
:data=
"tableData2"
stripe
border
height=
"350"
@
cell-dblclick=
"tableDbclick"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"fieldName"
label=
"字段名"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
fieldName
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.fieldName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"chineseName"
label=
"中文名"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
chineseName
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.chineseName"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"displayOrder"
label=
"排序"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
displayOrder
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.displayOrder"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"contentLength"
label=
"长度"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
scope
.
row
.
contentLength
}}
</div>
<el-input
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
@
blur=
"columnIsShow = false"
v-model=
"scope.row.contentLength"
></el-input>
</
template
>
</el-table-column>
<el-table-column
prop=
"controlType"
label=
"控件"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-show=
" !columnIsShow|| (editIndex!= scope.row.index)"
>
{{
dicObj
.
controlType
[
scope
.
row
.
controlType
]
}}
</div>
<el-select
v-show=
"columnIsShow&& (editIndex== scope.row.index)"
v-model=
"scope.row.controlType"
>
<el-option
v-for=
"(item, stateListIndex) in stateList"
:key=
"stateListIndex"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<!--
<el-button
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operateDia('edit',scope.row)"
>
编辑
</el-button>
-->
<el-button
icon=
"el-icon-circle-plus-outline"
size=
"mini"
@
click=
"operateDia('add',scope.row,scope.$index)"
>
添加
</el-button>
<el-button
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operateDia('del',scope.row,scope.$index)"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
<!-- <div class="newBtn">
<el-button class="addItem" icon="el-icon-plus" circle></el-button>
</div> -->
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
...
@@ -134,6 +186,15 @@ export default {
...
@@ -134,6 +186,15 @@ export default {
data
()
{
data
()
{
return
{
return
{
tableData
:
[],
tableData
:
[],
tableData2
:
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
],
selectList
:
[],
selectList
:
[],
add_dialog
:
false
,
add_dialog
:
false
,
title
:
""
,
title
:
""
,
...
@@ -185,6 +246,11 @@ export default {
...
@@ -185,6 +246,11 @@ export default {
3
:
"技术架构"
,
3
:
"技术架构"
,
4
:
"安全架构"
,
4
:
"安全架构"
,
},
},
controlType
:
{
0
:
"单行文本框"
,
1
:
"多行文本框"
,
2
:
"下拉框"
,
}
},
},
stateList
:
[
stateList
:
[
{
{
...
@@ -241,6 +307,22 @@ export default {
...
@@ -241,6 +307,22 @@ export default {
},
},
],
],
viewNameList
:
[],
viewNameList
:
[],
selectTypeList
:
[
{
label
:
"单行文本框"
,
value
:
0
,
},
{
label
:
"多行文本框"
,
value
:
1
,
},
{
label
:
"下拉框"
,
value
:
2
,
},
],
columnIsShow
:
false
,
editIndex
:
-
1
,
// 当前编辑行
};
};
},
},
...
@@ -299,14 +381,21 @@ export default {
...
@@ -299,14 +381,21 @@ export default {
// 所有操作
// 所有操作
operate
(
type
,
item
){
operate
(
type
,
item
){
this
.
openType
=
type
;
this
.
openType
=
type
;
if
(
type
==
"add"
)
{
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"新建字典"
;
this
.
resetForm
();
}
else
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
add_dialog
=
true
;
this
.
title
=
"编辑字典"
;
this
.
title
=
"编辑字典"
;
this
.
formData
=
item
;
this
.
formData
=
item
;
if
(
this
.
tableData2
.
length
==
0
)
{
this
.
tableData2
=
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
];
}
}
else
if
(
type
==
"create"
)
{
}
else
if
(
type
==
"create"
)
{
this
.
formData
.
state
=
2
;
this
.
formData
.
state
=
2
;
if
(
this
.
formData
.
dicyId
)
{
if
(
this
.
formData
.
dicyId
)
{
...
@@ -398,6 +487,36 @@ export default {
...
@@ -398,6 +487,36 @@ export default {
return
false
//不可勾选
return
false
//不可勾选
}
}
},
},
// 对话表格操作
operateDia
(
type
,
scopeRow
,
index
){
console
.
log
(
type
,
scopeRow
,
index
);
let
arr
=
this
.
tableData2
.
concat
();
let
addData
=
JSON
.
parse
(
JSON
.
stringify
(
arr
[
index
]));
// JSON.parse(JSON.stringify(arr[index]))
switch
(
type
)
{
// 添加
case
'add'
:
addData
.
fieldName
=
''
;
addData
.
chineseName
=
''
;
addData
.
displayOrder
=
''
;
addData
.
contentLength
=
''
;
addData
.
controlType
=
''
;
arr
.
splice
(
index
+
1
,
0
,
addData
);
break
;
// 删除
case
'del'
:
arr
.
splice
(
index
,
1
)
break
;
}
this
.
tableData2
=
arr
;
},
tableDbclick
(
row
,
column
,
cell
,
e
){
if
(
this
.
readOnly
)
{
return
;
}
this
.
editIndex
=
row
.
index
;
this
.
columnIsShow
=
true
;
},
},
},
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment