This commit is contained in:
cosarty 2024-12-13 21:15:51 +08:00
parent 28b7beece6
commit 59a10c0c9e
2 changed files with 25 additions and 6 deletions

View File

@ -49,6 +49,21 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="viceImage"
header-align="center"
align="center"
label="背景图">
<template slot-scope="scope">
<div class="demo-image__preview">
<el-image
style="width: 36px; height: 36px"
:src="scope.row.viceImage"
:preview-src-list="[scope.row.viceImage]"
/>
</div>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="productPrice" prop="productPrice"

View File

@ -136,14 +136,14 @@
</el-form-item> </el-form-item>
<el-form-item label="热门新品图" prop="hotImage"> <!-- <el-form-item label="热门新品图" prop="hotImage">
<el-switch v-model="dataForm.hotImage" :active-value="1" :inactive-value="0"></el-switch> <el-switch v-model="dataForm.hotImage" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item> </el-form-item> -->
<el-form-item label="认领状态" prop="status"> <!-- <el-form-item label="认领状态" prop="status">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0"></el-switch> <el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
@ -293,12 +293,16 @@ export default {
if (!this.dataForm.id){ if (!this.dataForm.id){
plantCreateApi(this.dataForm).then(res => { plantCreateApi(this.dataForm).then(res => {
this.$message.success('添加成功') this.$message.success('添加成功')
this.$router.go(0); setTimeout(() => {
this.$router.go(0);
}, 1000);
}); });
}else { }else {
plantUpdateApi(this.dataForm).then(res => { plantUpdateApi(this.dataForm).then(res => {
this.$message.success('更新成功') this.$message.success('更新成功')
this.$router.go(0); setTimeout(() => {
this.$router.go(0);
}, 1000);
}); });
} }