diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index d387996..abc0d56 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,7 +17,7 @@ 添加服务 - + - + @@ -60,7 +60,7 @@ }, data() { return { - loading: ture, + loading: true, tableData: [], isShowInfo: false, serviceList: [], @@ -74,53 +74,56 @@ }, methods: { close() { + this.isShowInfo = false this.$emit('close') }, - initDialog(row){ + initDialog(row) { this.isShowInfo = true - if(this.dataInfo){ + if (this.dataInfo) { this.fetchBindList(row.id) } }, - fetchBindList(id){ + fetchBindList(id) { this.loading = true - listBindService({id:id}).then(res=>{ + listBindService({ id: id }).then(res => { this.tableData = res this.loading = false }) }, bindServeClick() { const obj = { - id:'', + id: '', serviceCode: '', serviceName: '', typeCode: '', + typeCodeName: '', description: '', serviceTime: '', remark: '' } this.tableData.push(obj) }, - changeService(val, index){ - const service = this.serviceList.filter(item=>item.id==val)[0] + changeService(val, index) { + const service = this.serviceList.filter(item => item.id == val)[0] this.tableData[index].id = service.id this.tableData[index].serviceCode = service.serviceCode this.tableData[index].serviceName = service.serviceName this.tableData[index].typeCode = service.typeCode + this.tableData[index].typeCodeName = service.typeCodeName this.tableData[index].description = service.description this.tableData[index].serviceTime = service.serviceTime this.tableData[index].remark = service.remark }, - bindService(){ - for(const item of this.tableData){ - const data = { - serviceId: item.id, - productId: this.dataInfo.id - } - bindServ(data).then(res=>{ - // this.$message.success('绑定成功') - }) + bindService() { + const serviceIds = this.tableData.map(item => item.id) + const data = { + serviceIds: serviceIds, + productId: this.dataInfo.id } + bindServ(data).then(res => { + this.$message.success('绑定成功') + this.close() + }) } } } diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index d387996..abc0d56 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,7 +17,7 @@ 添加服务 - + - + @@ -60,7 +60,7 @@ }, data() { return { - loading: ture, + loading: true, tableData: [], isShowInfo: false, serviceList: [], @@ -74,53 +74,56 @@ }, methods: { close() { + this.isShowInfo = false this.$emit('close') }, - initDialog(row){ + initDialog(row) { this.isShowInfo = true - if(this.dataInfo){ + if (this.dataInfo) { this.fetchBindList(row.id) } }, - fetchBindList(id){ + fetchBindList(id) { this.loading = true - listBindService({id:id}).then(res=>{ + listBindService({ id: id }).then(res => { this.tableData = res this.loading = false }) }, bindServeClick() { const obj = { - id:'', + id: '', serviceCode: '', serviceName: '', typeCode: '', + typeCodeName: '', description: '', serviceTime: '', remark: '' } this.tableData.push(obj) }, - changeService(val, index){ - const service = this.serviceList.filter(item=>item.id==val)[0] + changeService(val, index) { + const service = this.serviceList.filter(item => item.id == val)[0] this.tableData[index].id = service.id this.tableData[index].serviceCode = service.serviceCode this.tableData[index].serviceName = service.serviceName this.tableData[index].typeCode = service.typeCode + this.tableData[index].typeCodeName = service.typeCodeName this.tableData[index].description = service.description this.tableData[index].serviceTime = service.serviceTime this.tableData[index].remark = service.remark }, - bindService(){ - for(const item of this.tableData){ - const data = { - serviceId: item.id, - productId: this.dataInfo.id - } - bindServ(data).then(res=>{ - // this.$message.success('绑定成功') - }) + bindService() { + const serviceIds = this.tableData.map(item => item.id) + const data = { + serviceIds: serviceIds, + productId: this.dataInfo.id } + bindServ(data).then(res => { + this.$message.success('绑定成功') + this.close() + }) } } } diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index d438b89..a449c8b 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -124,7 +124,7 @@ -
+
{{ param.paramName }}
diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index d387996..abc0d56 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,7 +17,7 @@ 添加服务
- + - + @@ -60,7 +60,7 @@ }, data() { return { - loading: ture, + loading: true, tableData: [], isShowInfo: false, serviceList: [], @@ -74,53 +74,56 @@ }, methods: { close() { + this.isShowInfo = false this.$emit('close') }, - initDialog(row){ + initDialog(row) { this.isShowInfo = true - if(this.dataInfo){ + if (this.dataInfo) { this.fetchBindList(row.id) } }, - fetchBindList(id){ + fetchBindList(id) { this.loading = true - listBindService({id:id}).then(res=>{ + listBindService({ id: id }).then(res => { this.tableData = res this.loading = false }) }, bindServeClick() { const obj = { - id:'', + id: '', serviceCode: '', serviceName: '', typeCode: '', + typeCodeName: '', description: '', serviceTime: '', remark: '' } this.tableData.push(obj) }, - changeService(val, index){ - const service = this.serviceList.filter(item=>item.id==val)[0] + changeService(val, index) { + const service = this.serviceList.filter(item => item.id == val)[0] this.tableData[index].id = service.id this.tableData[index].serviceCode = service.serviceCode this.tableData[index].serviceName = service.serviceName this.tableData[index].typeCode = service.typeCode + this.tableData[index].typeCodeName = service.typeCodeName this.tableData[index].description = service.description this.tableData[index].serviceTime = service.serviceTime this.tableData[index].remark = service.remark }, - bindService(){ - for(const item of this.tableData){ - const data = { - serviceId: item.id, - productId: this.dataInfo.id - } - bindServ(data).then(res=>{ - // this.$message.success('绑定成功') - }) + bindService() { + const serviceIds = this.tableData.map(item => item.id) + const data = { + serviceIds: serviceIds, + productId: this.dataInfo.id } + bindServ(data).then(res => { + this.$message.success('绑定成功') + this.close() + }) } } } diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index d438b89..a449c8b 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -124,7 +124,7 @@ -
+
{{ param.paramName }}
diff --git a/src/components/mycomponent/dialog/snCodeRulsDialog.vue b/src/components/mycomponent/dialog/snCodeRulsDialog.vue index dc6cf3f..eba7f1a 100644 --- a/src/components/mycomponent/dialog/snCodeRulsDialog.vue +++ b/src/components/mycomponent/dialog/snCodeRulsDialog.vue @@ -165,7 +165,7 @@ return aryTemp }) // 提交数据 - S_add({ snQuantity: this.addInfo.snQuantity, ruleList: subData }).then(resp => { + S_add({ snQuantity: this.codeLength, ruleList: subData }).then(resp => { this.$message.success('添加成功') this.close() this.reset() diff --git a/src/components/mycomponent/dialog/productBindDialog.vue b/src/components/mycomponent/dialog/productBindDialog.vue index d387996..abc0d56 100644 --- a/src/components/mycomponent/dialog/productBindDialog.vue +++ b/src/components/mycomponent/dialog/productBindDialog.vue @@ -17,7 +17,7 @@ 添加服务
- + - + @@ -60,7 +60,7 @@ }, data() { return { - loading: ture, + loading: true, tableData: [], isShowInfo: false, serviceList: [], @@ -74,53 +74,56 @@ }, methods: { close() { + this.isShowInfo = false this.$emit('close') }, - initDialog(row){ + initDialog(row) { this.isShowInfo = true - if(this.dataInfo){ + if (this.dataInfo) { this.fetchBindList(row.id) } }, - fetchBindList(id){ + fetchBindList(id) { this.loading = true - listBindService({id:id}).then(res=>{ + listBindService({ id: id }).then(res => { this.tableData = res this.loading = false }) }, bindServeClick() { const obj = { - id:'', + id: '', serviceCode: '', serviceName: '', typeCode: '', + typeCodeName: '', description: '', serviceTime: '', remark: '' } this.tableData.push(obj) }, - changeService(val, index){ - const service = this.serviceList.filter(item=>item.id==val)[0] + changeService(val, index) { + const service = this.serviceList.filter(item => item.id == val)[0] this.tableData[index].id = service.id this.tableData[index].serviceCode = service.serviceCode this.tableData[index].serviceName = service.serviceName this.tableData[index].typeCode = service.typeCode + this.tableData[index].typeCodeName = service.typeCodeName this.tableData[index].description = service.description this.tableData[index].serviceTime = service.serviceTime this.tableData[index].remark = service.remark }, - bindService(){ - for(const item of this.tableData){ - const data = { - serviceId: item.id, - productId: this.dataInfo.id - } - bindServ(data).then(res=>{ - // this.$message.success('绑定成功') - }) + bindService() { + const serviceIds = this.tableData.map(item => item.id) + const data = { + serviceIds: serviceIds, + productId: this.dataInfo.id } + bindServ(data).then(res => { + this.$message.success('绑定成功') + this.close() + }) } } } diff --git a/src/components/mycomponent/dialog/productListAddDialog.vue b/src/components/mycomponent/dialog/productListAddDialog.vue index d438b89..a449c8b 100644 --- a/src/components/mycomponent/dialog/productListAddDialog.vue +++ b/src/components/mycomponent/dialog/productListAddDialog.vue @@ -124,7 +124,7 @@ -
+
{{ param.paramName }}
diff --git a/src/components/mycomponent/dialog/snCodeRulsDialog.vue b/src/components/mycomponent/dialog/snCodeRulsDialog.vue index dc6cf3f..eba7f1a 100644 --- a/src/components/mycomponent/dialog/snCodeRulsDialog.vue +++ b/src/components/mycomponent/dialog/snCodeRulsDialog.vue @@ -165,7 +165,7 @@ return aryTemp }) // 提交数据 - S_add({ snQuantity: this.addInfo.snQuantity, ruleList: subData }).then(resp => { + S_add({ snQuantity: this.codeLength, ruleList: subData }).then(resp => { this.$message.success('添加成功') this.close() this.reset() diff --git a/src/views/login/index_2.vue b/src/views/login/index_2.vue index 5e8ae38..a2e7980 100644 --- a/src/views/login/index_2.vue +++ b/src/views/login/index_2.vue @@ -205,8 +205,7 @@ } } return { - select: 1, - + select: 0, register: { verifyCode: '', account: '',