默认报餐表显示

This commit is contained in:
ryoeiken 2020-11-26 15:00:44 +08:00
parent 820bb00831
commit 02229ed732
3 changed files with 45 additions and 41 deletions

View File

@ -87,6 +87,7 @@ public class FtFoodDefaultDaoController extends BaseController {
@Log(title = "默认报餐管理", businessType = BusinessType.UPDATE) @Log(title = "默认报餐管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody FtFoodDefaultDao ftFoodDefaultDao) { public AjaxResult edit(@RequestBody FtFoodDefaultDao ftFoodDefaultDao) {
ftFoodDefaultDao.setUpdatedAt(new Date());
return toAjax(iFtFoodDefaultDaoService.updateById(ftFoodDefaultDao) ? 1 : 0); return toAjax(iFtFoodDefaultDaoService.updateById(ftFoodDefaultDao) ? 1 : 0);
} }

View File

@ -52,6 +52,8 @@ private static final long serialVersionUID=1L;
private Long createdBy; private Long createdBy;
/** 更新日期 */ /** 更新日期 */
@Excel(name = "更新日期" , width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedAt; private Date updatedAt;
/** 更新人 */ /** 更新人 */

View File

@ -18,16 +18,16 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
icon="el-icon-plus" <!-- icon="el-icon-plus"-->
size="mini" <!-- size="mini"-->
@click="handleAdd" <!-- @click="handleAdd"-->
v-hasPermi="['fantang:foodDefault:add']" <!-- v-hasPermi="['fantang:foodDefault:add']"-->
>新增 <!-- >新增-->
</el-button> <!-- </el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -39,26 +39,26 @@
>修改 >修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="danger" <!-- type="danger"-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handleDelete" <!-- @click="handleDelete"-->
v-hasPermi="['fantang:foodDefault:remove']" <!-- v-hasPermi="['fantang:foodDefault:remove']"-->
>删除 <!-- >删除-->
</el-button> <!-- </el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <el-button
type="warning" type="warning"
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['fantang:foodDefault:export']" v-hasPermi="['fantang:foodDefault:export']"
>导出 >导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -67,9 +67,9 @@
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="id" align="center" prop="id" v-if="false"/> <el-table-column label="id" align="center" prop="id" v-if="false"/>
<el-table-column label="报餐类型" align="center" prop="type" :formatter="typeFormat"/> <el-table-column label="报餐类型" align="center" prop="type" :formatter="typeFormat"/>
<el-table-column label="创建日期" align="center" prop="createdAt" width="180"> <el-table-column label="更新日期" align="center" prop="updatedAt" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -82,14 +82,14 @@
v-hasPermi="['fantang:foodDefault:edit']" v-hasPermi="['fantang:foodDefault:edit']"
>修改 >修改
</el-button> </el-button>
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
@click="handleDelete(scope.row)" <!-- @click="handleDelete(scope.row)"-->
v-hasPermi="['fantang:foodDefault:remove']" <!-- v-hasPermi="['fantang:foodDefault:remove']"-->
>删除 <!-- >删除-->
</el-button> <!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -201,11 +201,12 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
listFoodDefault(this.queryParams).then(response => { listFoodDefault(this.queryParams).then(response => {
console.log(response.rows)
this.foodDefaultList = response.rows; this.foodDefaultList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
listFood(this.queryParams).then(response => { listFood().then(response => {
this.foodListOptions = response.rows; this.foodListOptions = response.rows;
}) })
}, },