|
@@ -5,92 +5,34 @@
|
|
|
<el-header height="40px">
|
|
|
<el-row>
|
|
|
<el-col :span="18">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.searchText"
|
|
|
- size="small"
|
|
|
- style="width: 300px"
|
|
|
- placeholder="输入关键字"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="clickQuery()"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="clickQuery()"
|
|
|
- >查询</el-button
|
|
|
- >
|
|
|
+ <el-input v-model="queryParams.searchText" size="small" style="width: 300px" placeholder="输入关键字" clearable
|
|
|
+ @keyup.enter.native="clickQuery()" />
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-search" @click="clickQuery()">查询</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="list-opCol">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="clickAdd()"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="clickModify()"
|
|
|
- :disabled="disabledModify"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="clickDelete()"
|
|
|
- :disabled="disabledDelete"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-plus" @click="clickAdd()">添加</el-button>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-edit" @click="clickModify()"
|
|
|
+ :disabled="disabledModify">修改</el-button>
|
|
|
+ <el-button type="danger" size="small" icon="el-icon-delete" @click="clickDelete()"
|
|
|
+ :disabled="disabledDelete">删除</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
- <tfTable
|
|
|
- :table-data="dataList"
|
|
|
- :column="columns"
|
|
|
- :for-id="false"
|
|
|
- :pagination="false"
|
|
|
- :currentpage="pageInfo.current"
|
|
|
- :pagesize="pageInfo.size"
|
|
|
- :total="pageInfo.tableTotal"
|
|
|
- :border="true"
|
|
|
- :multiple="true"
|
|
|
- :fixed="true"
|
|
|
- :isdelete="false"
|
|
|
- :is-select="false"
|
|
|
- :stripe="true"
|
|
|
- @handleCurrentChange="handleCurrentChange"
|
|
|
- @handleSizeChange="handleSizeChange"
|
|
|
- @handleSelectionChange="handleSelectionChange"
|
|
|
- @rowDblclick="showDetail"
|
|
|
- @detail="showDetail"
|
|
|
- />
|
|
|
+ <tfTable :table-data="dataList" :column="columns" :for-id="false" :pagination="false"
|
|
|
+ :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
|
|
|
+ :multiple="true" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
|
|
|
+ @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
|
|
|
+ @handleSelectionChange="handleSelectionChange" @rowDblclick="showDetail" @detail="showDetail" />
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
<!-- 详情页 -->
|
|
|
- <el-dialog
|
|
|
- v-if="dialogVisible"
|
|
|
- v-dialogDrag
|
|
|
- top="20vh"
|
|
|
- :title="dialogTitle"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- width="800px"
|
|
|
- class="dialog"
|
|
|
- >
|
|
|
+ <el-dialog v-if="dialogVisible" v-dialogDrag top="20vh" :title="dialogTitle" :visible.sync="dialogVisible"
|
|
|
+ width="800px" class="dialog">
|
|
|
<tfDetail :detailData="detailData" :editState="editState" ref="dForm" />
|
|
|
<template slot="footer">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- icon="el-icon-check"
|
|
|
- @click="clickSave()"
|
|
|
- v-if="!editState"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
- <el-button type="warning" icon="el-icon-close" @click="clickCancel()">关 闭</el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-check" @click="clickSave()" v-if="!editState">确 定</el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-close" @click="clickCancel()">关 闭</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -138,9 +80,11 @@ export default {
|
|
|
label: "是否启用",
|
|
|
prop: "isdisabled",
|
|
|
align: "center",
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
- return cellValue == 1 ? "是" : "否";
|
|
|
- },
|
|
|
+ renderer: function (h, row, column, value, index) {
|
|
|
+ return <el-switch v-model={value} active-text="是" inactive-text="否" active-value="1" inactive-value="0"
|
|
|
+ inactive-color="lightgray">
|
|
|
+ </el-switch>
|
|
|
+ }
|
|
|
},
|
|
|
],
|
|
|
dataList: [], // 表格数据
|
|
@@ -169,7 +113,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() { },
|
|
|
mounted() {
|
|
|
this.bindList();
|
|
|
},
|