feat:增加类别

This commit is contained in:
zty 2025-04-22 14:15:43 +08:00
parent db1a7c9592
commit 1cc387b114
1 changed files with 17 additions and 3 deletions

View File

@ -19,6 +19,9 @@
<el-table-column align="left" label="姓名">
<template slot-scope="scope">{{ scope.row.art_name }}</template>
</el-table-column>
<el-table-column align="left" label="类别">
<template slot-scope="scope">{{ scope.row.art_cate }}</template>
</el-table-column>
<el-table-column align="left" label="头像">
<template slot-scope="scope"><img
v-if="scope.row.art_photo"
@ -55,6 +58,16 @@
<el-form-item label="姓名" prop="art_name" style="width: 400px;">
<el-input v-model="userinfo.art_name " placeholder="姓名" />
</el-form-item>
<el-form-item label="类别" prop="art_cate" style="width: 400px;">
<el-select v-model="userinfo.art_cate" placeholder="类别">
<el-option
v-for="item in cateList"
:key="item"
:label="item"
:value = "item"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="头像" prop="path" >
<el-upload
class="avatar-uploader"
@ -80,8 +93,8 @@
</div>
</el-dialog>
<pagination
v-show="tableData.count>0"
:total="tableData.count"
v-show="(tableData.count>0)||0"
:total="tableData.count || 0"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList"
@ -122,6 +135,7 @@ export default {
sort:0,
path:""
},
cateList : ["技能大赛金奖","二级/技师","技能大赛金牌技术能手"],
upHeaders: { Authorization: "JWT " + getToken() },
listQuery: Object.assign({}, listQuery),
listQuery2: Object.assign({}, listQuery2),
@ -186,7 +200,7 @@ export default {
this.userinfo = JSON.parse(JSON.stringify(scope.row))
this.showEditor = true
this.dialogVisible = true
this.dialogType = 'edit'
this.$nextTick(() => {
this.$refs.commonForm && this.$refs.commonForm.clearValidate()
})