Commit 4e206966 authored by renjintao's avatar renjintao

index1

parent bc227f50
<template> <template>
<div> <div>
<Table border :columns="columns" :data="list" ref="table" class="tableCommon" stripe></Table> <Table border :columns="columns" :data="list" ref="table" class="tableCommon" stripe>
<div class="footerWidth"><Button type="primary" long>新增人员</Button></div> <template slot-scope="{ row, index }" slot="userId">
<span v-if="edit != index" v-text="row.userId"></span>
<Input v-else type="text" v-model.trim="cur.userId" />
</template>
</Table>
<div class="footerWidth"><Button type="primary" long @click="addList">新增人员</Button></div>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
...@@ -23,13 +29,15 @@ export default { ...@@ -23,13 +29,15 @@ export default {
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: '',
edit: -1,
columns: [{ columns: [{
key: "userId", key: "userId",
title: this.l("userId"), title: this.l("userId"),
align: "left", align: "left",
high: true, high: true,
type: 'user' type: 'user',
slot: 'userId'
}, },
{ {
key: "role", key: "role",
...@@ -38,12 +46,6 @@ export default { ...@@ -38,12 +46,6 @@ export default {
high: true, high: true,
code: 'project.group.role' code: 'project.group.role'
}, },
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
...@@ -51,6 +53,12 @@ export default { ...@@ -51,6 +53,12 @@ export default {
high: true, high: true,
code: 'project.group.status' code: 'project.group.status'
}, },
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
...@@ -132,6 +140,13 @@ export default { ...@@ -132,6 +140,13 @@ export default {
this.detail = () => import('./add') this.detail = () => import('./add')
this.modal = true; this.modal = true;
}, },
addList() {
this.edit = this.list.length;
this.cur = {
userId: null,
};
this.list.push(this.cur);
},
copy(id) { copy(id) {
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
......
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