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 139ca94f
authored
Dec 11, 2023
by
Thews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20231211汪皖苏
1 parent
d533039a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
35 deletions
src/api/index.js
src/views/metaModelDic/pages/page1.vue
src/views/metaModelDic/pages/page2.vue
src/api/index.js
View file @
139ca94
...
...
@@ -117,4 +117,14 @@ export function getYMXZDGLUpdate(params) {
// 删除字典
export
function
getYMXZDGLDel
(
params
)
{
return
post
(
'/ynMolDicy/deleteYnMolProy'
,
params
);
}
\ No newline at end of file
}
// 获取字典数据
export
function
getYMXZDGLProyList
(
params
)
{
return
post
(
'/ynMolDicy/getYnMolProyList'
,
params
);
}
// 删除字典数据
export
function
getYMXZDGLProyDel
(
params
)
{
return
post
(
'/ynMolDicy/deleteYnMolProy'
,
params
);
}
src/views/metaModelDic/pages/page1.vue
View file @
139ca94
...
...
@@ -140,15 +140,15 @@
<
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-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
class=
"newBtn"
>
<el-button
class=
"addItem"
icon=
"el-icon-plus"
circle
@
click=
"operateDia('add')"
></el-button>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
...
...
@@ -167,6 +167,8 @@ import {
getYMXZDGLDel
,
getYMXZDGLUpdate
,
query_jia_gou_gui_shu
,
getYMXZDGLProyList
,
getYMXZDGLProyDel
,
}
from
"@/api/index.js"
;
export
default
{
...
...
@@ -177,15 +179,7 @@ export default {
data
()
{
return
{
tableData
:
[],
tableData2
:
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
],
tableData2
:
[],
selectList
:
[],
add_dialog
:
false
,
title
:
""
,
...
...
@@ -310,17 +304,7 @@ export default {
this
.
add_dialog
=
true
;
this
.
title
=
"编辑字典"
;
this
.
formData
=
item
;
if
(
this
.
tableData2
.
length
==
0
)
{
this
.
tableData2
=
[
{
fieldName
:
""
,
chineseName
:
""
,
displayOrder
:
""
,
controlType
:
""
,
contentLength
:
""
,
}
];
}
this
.
getProyList
(
item
);
}
else
if
(
type
==
"create"
)
{
this
.
formData
.
state
=
2
;
if
(
this
.
formData
.
dicyId
)
{
...
...
@@ -415,9 +399,9 @@ export default {
// 对话表格操作
operateDia
(
type
,
scopeRow
,
index
){
console
.
log
(
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]))
let
addData
=
{}
;
// JSON.parse(JSON.stringify(arr[index]))
switch
(
type
)
{
// 添加
case
'add'
:
...
...
@@ -426,11 +410,23 @@ export default {
addData
.
displayOrder
=
''
;
addData
.
contentLength
=
''
;
addData
.
controlType
=
''
;
arr
.
splice
(
index
+
1
,
0
,
addData
);
arr
.
splice
(
arr
.
length
,
0
,
addData
);
break
;
// 删除
case
'del'
:
arr
.
splice
(
index
,
1
)
// arr.splice( index, 1)
this
.
$confirm
(
"确认删除吗"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
getYMXZDGLProyDel
(
scopeRow
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"删除成功"
);
this
.
getProyList
(
this
.
formData
);
}
});
});
break
;
}
this
.
tableData2
=
arr
;
...
...
@@ -442,6 +438,21 @@ export default {
this
.
editIndex
=
row
.
index
;
this
.
columnIsShow
=
true
;
},
// 获取字典属性接口
getProyList
(
item
)
{
console
.
log
(
item
);
let
params
=
{
type
:
item
.
type
,
typeId
:
item
.
typeId
,
}
getYMXZDGLProyList
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
res
);
this
.
tableData2
=
res
.
data
;
}
});
},
},
}
</
script
>
...
...
src/views/metaModelDic/pages/page2.vue
View file @
139ca94
...
...
@@ -149,15 +149,15 @@
<
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-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
class=
"newBtn"
>
<el-button
class=
"addItem"
icon=
"el-icon-plus"
circle
@
click=
"operateDia('add',scope.row)"
></el-button>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
...
...
@@ -427,7 +427,7 @@ export default {
addData
.
displayOrder
=
''
;
addData
.
contentLength
=
''
;
addData
.
controlType
=
''
;
arr
.
splice
(
index
+
1
,
0
,
addData
);
arr
.
splice
(
arr
.
length
,
0
,
addData
);
break
;
// 删除
case
'del'
:
...
...
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