Commit c060da7d by chenwq

ui改版

1 parent 2e79f94b
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.9", "glsx-components": "^1.4.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
{ {
label: '创建日期', label: '创建日期',
prop: 'createdDate', prop: 'createdDate',
width: '180', // width: '180',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton> <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
...@@ -18,11 +16,12 @@ ...@@ -18,11 +16,12 @@
</el-popover> </el-popover>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button> <!-- <el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton> <GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button> <el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button> <el-button type="text" @click="handleShare(scope.scope)">分享</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -95,6 +94,69 @@ export default { ...@@ -95,6 +94,69 @@ export default {
optionsName: 'goodsStatusList' optionsName: 'goodsStatusList'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: row => {
return row.goodsStatus ? '下架' : '上架'
},
attrs: {
type: 'text'
},
listeners: {
click: this.handleUpOrDown
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
condition: row => {
return !row.goodsStatus
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
condition: row => {
return row.goodsStatus
},
listeners: {
click: row => this.handleEdit(3, row)
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.handleTop
}
},
{
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
listeners: {
click: this.handleShare
}
}
],
// 表格 // 表格
getListApi: this.$apis.proManage.getListApi, getListApi: this.$apis.proManage.getListApi,
tableParams: { tableParams: {
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
{ {
label: '创建日期', label: '创建日期',
prop: 'createdDate', prop: 'createdDate',
width: '180', // width: '180',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!