Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
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
zhouqian
vue-gjjs
Commits
b1c965af
Commit
b1c965af
authored
Dec 04, 2021
by
zhengxiaokui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zxk
parent
b002ec54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
16 deletions
+39
-16
EditTable.vue
src/components/EditTable.vue
+20
-14
Ptyp.vue
src/views/Business/Letopn/Ptyp.vue
+19
-2
No files found.
src/components/EditTable.vue
View file @
b1c965af
<
template
>
<
template
>
<c-row>
<c-row>
<c-col
:span=
"
21
"
style=
"margin-bottom: 18px"
:offset=
"1"
>
<c-col
:span=
"
isAdd ? 21 : 22
"
style=
"margin-bottom: 18px"
:offset=
"1"
>
<c-table
<c-table
style=
"text-align: center"
style=
"text-align: center"
:ref=
"urls"
:ref=
"urls"
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<slot></slot>
<slot></slot>
</c-table>
</c-table>
</c-col>
</c-col>
<c-col
:span=
"1"
>
<c-col
v-if=
"isAdd"
:span=
"1"
>
<div
class=
"button_contains"
>
<div
class=
"button_contains"
>
<span
class=
"add_del_button add_button"
@
click=
"handleAdd"
>
+
</span>
<span
class=
"add_del_button add_button"
@
click=
"handleAdd"
>
+
</span>
<span
class=
"add_del_button"
@
click=
"handleDelete"
>
-
</span>
<span
class=
"add_del_button"
@
click=
"handleDelete"
>
-
</span>
...
@@ -97,29 +97,35 @@ export default {
...
@@ -97,29 +97,35 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
isAdd
:
{
//添加删除列
type
:
true
,
default
:
true
,
},
},
},
computed
:
{},
computed
:
{},
watch
:
{
// watch: {
dataSource
:
{
// dataSource: {
handler
(
val
,
oldVal
)
{
// handler(val, oldVal) {
_
.
set
(
this
.
model
,
this
.
urls
,
val
);
// console.log("数据变化:", val, this.model);
// console.log(this.model);
// // _.set(this.model, this.urls, val);
},
// // console.log(this.model);
immediate
:
true
,
// },
deep
:
true
,
// immediate: true,
},
// deep: true,
},
// },
// },
methods
:
{
methods
:
{
//获取表格数据索引,方便删除
//获取表格数据索引,方便删除
tableRowClassName
({
row
,
rowIndex
})
{
tableRowClassName
({
row
,
rowIndex
})
{
row
.
row_index
=
rowIndex
;
row
.
row_index
=
rowIndex
;
},
},
//记录选中行索引
//
记录选中行索引
handleClick
(
row
,
column
,
event
)
{
handleClick
(
row
,
column
,
event
)
{
this
.
rowIndex
=
row
.
row_index
;
this
.
rowIndex
=
row
.
row_index
;
console
.
log
(
this
.
rowIndex
);
console
.
log
(
"选择:"
+
this
.
rowIndex
);
},
},
handleAdd
()
{
handleAdd
()
{
...
...
src/views/Business/Letopn/Ptyp.vue
View file @
b1c965af
...
@@ -94,7 +94,18 @@
...
@@ -94,7 +94,18 @@
</el-form-item>
</el-form-item>
</c-col>
</c-col>
</c-col>
</c-col>
<c-edit-table
:model=
"model"
v-bind=
"ptsaddg"
>
</c-edit-table>
<c-edit-table
:model=
"model"
v-bind=
"ptsaddg"
>
<el-table-column
label=
"操作"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
@
click=
"handleEdit(scope.$index, scope.row)"
type=
"primary"
>
详情
</el-button
>
</
template
>
</el-table-column>
</c-edit-table>
</c-row>
</c-row>
</template>
</template>
<
script
>
<
script
>
...
@@ -123,6 +134,7 @@ export default {
...
@@ -123,6 +134,7 @@ export default {
title
:
"机构实体"
,
title
:
"机构实体"
,
width
:
"180px"
,
width
:
"180px"
,
dataIndex
:
"ptyextkey"
,
dataIndex
:
"ptyextkey"
,
show
:
"input"
,
},
},
{
{
title
:
"名称"
,
title
:
"名称"
,
...
@@ -139,7 +151,12 @@ export default {
...
@@ -139,7 +151,12 @@ export default {
},
},
};
};
},
},
methods
:
{
...
Event
},
methods
:
{
...
Event
,
handleEdit
()
{
console
.
log
(
"1111测试"
);
},
},
created
:
function
()
{},
created
:
function
()
{},
};
};
</
script
>
</
script
>
...
...
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