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

修改bug

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