Commit 001b8ddb by chenwq

商品管理-loading

1 parent 9be7e5f1
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane> <el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane> <el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs> </el-tabs>
<div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" class="container edit-container"> <div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" v-loading="loading" class="container edit-container">
<div class="flex"> <div class="flex">
<div class="home-set-form flex-grow"> <div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index"> <div v-for="(item, index) in externalFormList" :key="index">
...@@ -323,6 +323,7 @@ export default { ...@@ -323,6 +323,7 @@ export default {
name: 'editProduct', name: 'editProduct',
data() { data() {
return { return {
loading: false,
dialogTableVisible: false, dialogTableVisible: false,
associationRadio: '', associationRadio: '',
templateSelection: [], templateSelection: [],
...@@ -1564,15 +1565,21 @@ export default { ...@@ -1564,15 +1565,21 @@ export default {
deleteAttrList.forEach(item => { deleteAttrList.forEach(item => {
delete params[item] delete params[item]
}) })
this.$apis.proManage.insertOrUpdateProApi(params).then(res => { this.loading = true
this.$message({ this.$apis.proManage
message: res.code == '0' ? '操作成功' : res.message, .insertOrUpdateProApi(params)
type: res.code == '0' ? 'success' : 'error' .then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.cancelJump()
}
})
.finally(() => {
this.loading = false
}) })
if (res.code == '0') {
this.cancelJump()
}
})
}, },
cancelJump() { cancelJump() {
this.$router.push({ this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!