Commit b1c965af by zhengxiaokui

zxk

parent b002ec54
<template>
<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
style="text-align: center"
:ref="urls"
......@@ -37,7 +37,7 @@
<slot></slot>
</c-table>
</c-col>
<c-col :span="1">
<c-col v-if="isAdd" :span="1">
<div class="button_contains">
<span class="add_del_button add_button" @click="handleAdd">+</span>
<span class="add_del_button" @click="handleDelete">-</span>
......@@ -97,29 +97,35 @@ export default {
type: Boolean,
default: false,
},
isAdd: {
//添加删除列
type: true,
default: true,
},
},
computed: {},
watch: {
dataSource: {
handler(val, oldVal) {
_.set(this.model, this.urls, val);
// console.log(this.model);
},
immediate: true,
deep: true,
},
},
// watch: {
// dataSource: {
// handler(val, oldVal) {
// console.log("数据变化:", val, this.model);
// // _.set(this.model, this.urls, val);
// // console.log(this.model);
// },
// immediate: true,
// deep: true,
// },
// },
methods: {
//获取表格数据索引,方便删除
tableRowClassName({ row, rowIndex }) {
row.row_index = rowIndex;
},
//记录选中行索引
// 记录选中行索引
handleClick(row, column, event) {
this.rowIndex = row.row_index;
console.log(this.rowIndex);
console.log("选择:" + this.rowIndex);
},
handleAdd() {
......
......@@ -94,7 +94,18 @@
</el-form-item>
</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>
</template>
<script>
......@@ -123,6 +134,7 @@ export default {
title: "机构实体",
width: "180px",
dataIndex: "ptyextkey",
show: "input",
},
{
title: "名称",
......@@ -139,7 +151,12 @@ export default {
},
};
},
methods: { ...Event },
methods: {
...Event,
handleEdit() {
console.log("1111测试");
},
},
created: function () {},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment