调整打卡记录页面

This commit is contained in:
huangdeliang
2020-11-30 09:10:02 +08:00
parent e388399ae8
commit 435a54ae36

View File

@ -34,7 +34,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['custom:wxUserLog:add']"
>新增</el-button>
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -44,7 +45,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['custom:wxUserLog:edit']"
>修改</el-button>
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -54,7 +56,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['custom:wxUserLog:remove']"
>删除</el-button>
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -63,7 +66,8 @@
size="mini"
@click="handleExport"
v-hasPermi="['custom:wxUserLog:export']"
>导出</el-button>
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -76,24 +80,32 @@
</el-table-column>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="微信openid" align="center" prop="openid" />-->
<el-table-column label="当天体重" align="center" prop="weight" />
<el-table-column label="当天体重" align="center" prop="weight">
<template slot-scope="scope">
<span>{{`${scope.row.weight} kg` }}</span>
</template>
</el-table-column>
<el-table-column label="微信应用" align="center" prop="appid" :formatter="appidFormat"/>
<el-table-column label="手机号" align="center" prop="phone"/>
<el-table-column label="睡觉时间" align="center" prop="sleepTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.sleepTime, '{y}-{m}-{d}') }}</span>
</template>
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.sleepTime, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="起床时间" align="center" prop="wakeupTime" width="180">
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.wakeupTime, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="运动锻炼" align="center" prop="sport" :formatter="sportFormat"/>
<el-table-column label="按食谱" align="center" prop="diet" :formatter="dietFormat"/>
<el-table-column label="熬夜失眠" align="center" prop="insomnia" :formatter="insomniaFormat"/>
<el-table-column label="起床排便" align="center" prop="defecation" :formatter="defecationFormat"/>
<el-table-column label="饮水量" align="center" prop="water">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.wakeupTime, '{y}-{m}-{d}') }}</span>
<span>{{`${scope.row.water} ml`}}</span>
</template>
</el-table-column>
<el-table-column label="运动情况" align="center" prop="sport" :formatter="sportFormat" />
<el-table-column label="饮食情况" align="center" prop="diet" :formatter="dietFormat" />
<el-table-column label="熬夜失眠" align="center" prop="insomnia" :formatter="insomniaFormat" />
<el-table-column label="排便情况" align="center" prop="defecation" :formatter="defecationFormat" />
<el-table-column label="饮水量" align="center" prop="water" />
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -103,14 +115,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['custom:wxUserLog:edit']"
>修改</el-button>
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['custom:wxUserLog:remove']"
>删除</el-button>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -217,7 +231,14 @@
</template>
<script>
import { listWxUserLog, getWxUserLog, delWxUserLog, addWxUserLog, updateWxUserLog, exportWxUserLog } from "@/api/custom/wxUserLog";
import {
addWxUserLog,
delWxUserLog,
exportWxUserLog,
getWxUserLog,
listWxUserLog,
updateWxUserLog
} from "@/api/custom/wxUserLog";
export default {
name: "WxUserLog",
@ -261,8 +282,7 @@
// 表单参数
form: {},
// 表单校验
rules: {
}
rules: {}
};
},
created() {
@ -409,7 +429,8 @@
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}).catch(function () {
});
},
/** 导出按钮操作 */
handleExport() {
@ -422,7 +443,8 @@
return exportWxUserLog(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}).catch(function () {
});
}
}
};