Commit 17536cda authored by 刘帅阳's avatar 刘帅阳

修改bug

parent b3c078af
......@@ -294,7 +294,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancel">取 消</el-button>
<el-button class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
<el-button class="submitBtn" type="primary" :loading="submitLoading" @click="submitForm">确 定</el-button>
</div>
</el-dialog>
<!-- 代言人导入对 话框 -->
......@@ -439,6 +439,7 @@ export default {
callback()
}
return {
submitLoading: false,
queryShop: true,
clearable: true,
userTypeList: [
......@@ -933,26 +934,33 @@ export default {
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
this.submitLoading = true
this.form.deptIdPrepares = this.form.deptId.join(',')
if (this.form.businessId !== undefined) {
const addParams = JSON.parse(JSON.stringify(this.form))
updateSysuser(addParams).then(response => {
this.submitLoading = false
this.$message({
message: '修改成功',
type: 'success'
})
this.open = false
this.getList()
}).catch(() => {
this.submitLoading = false
})
} else {
const params = JSON.parse(JSON.stringify(this.form))
addSysuser(params).then(response => {
this.submitLoading = false
this.newId = response.data.businessId
this.$message({
message: '新增成功', type: 'success'
})
this.open = false
this.getList()
}).catch(() => {
this.submitLoading = false
})
}
}
......
......@@ -849,7 +849,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="addDialogCancel">取 消</el-button>
<el-button class="submitBtn" type="primary" @click="addDialogSubmitForm">确 定</el-button>
<el-button class="submitBtn" type="primary" :loading="submitLoading" @click="addDialogSubmitForm">确 定</el-button>
</div>
</el-dialog>
</div>
......@@ -885,6 +885,7 @@ export default {
name: 'Index',
data() {
return {
submitLoading: false,
formTitle: '',
saveFile: {},
formModel: {
......@@ -1125,18 +1126,22 @@ export default {
addDialogSubmitForm() {
this.$refs['formModel'].validate(valid => {
if (valid) {
this.submitLoading = true
const formData = new FormData()
formData.append('file', this.saveFile)
formData.append('type', this.formModel.type)
formData.append('unitId', this.formModel.unitId)
formData.append('newsVideoId', this.formModel.newsVideoId)
handleAddForm(formData).then(res => {
this.submitLoading = false
this.$message({
message: '新增成功',
type: 'success'
})
this.formOpen = false
this.loadData()
}).catch(() => {
this.submitLoading = false
})
}
})
......
......@@ -328,6 +328,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.getUserList()
this.reset()
this.open = true
this.title = '添加商家'
......
......@@ -60,8 +60,8 @@ module.exports = {
proxy: {
[process.env.VUE_APP_BASE_API]: {
// target: `http://106.3.99.36:20081/`,
// target: `http://192.168.1.23:8090/`, // 飞龙后端
target: `http://192.168.10.10:8099/`,
// target: `http://192.168.1.23:8090/`,
target: `http://127.0.0.1:8099/`,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment