diff --git a/public/config/project.config.json b/public/config/project.config.json index 2e5e3c4..cd629df 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -1,5 +1,5 @@ { - "title": "后台管理系统", + "title": "智慧型厨房AIOT物联管理平台", "subtitle": "", "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", @@ -8,4 +8,4 @@ "provinceCode": "360000", "cityCode": "361000", "areaCode": "361024" -} \ No newline at end of file +} diff --git a/public/config/project.config.json b/public/config/project.config.json index 2e5e3c4..cd629df 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -1,5 +1,5 @@ { - "title": "后台管理系统", + "title": "智慧型厨房AIOT物联管理平台", "subtitle": "", "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", @@ -8,4 +8,4 @@ "provinceCode": "360000", "cityCode": "361000", "areaCode": "361024" -} \ No newline at end of file +} diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c48b9cf..4e547d4 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -29,9 +29,9 @@ > @@ -84,7 +84,7 @@ 添加产品参数 -
+
@@ -97,10 +97,9 @@
- - - 是否必填 + + 必填
@@ -136,10 +135,8 @@ export default { components: { inputVue, - dialogHeader, InputNumber, - RedStar, - Message + RedStar }, props: { isShowInfo: { @@ -176,33 +173,18 @@ watch: { dataInfo: { handler(vla) { - if (vla != '') { + if (vla !== '') { // 编辑操作 if (!vla.id) return detail({ id: vla.id }).then(res => { - this.categoryInfo.id = res.id - this.categoryInfo.categoryCode = res.categoryCode - this.categoryInfo.categoryName = res.categoryName - this.categoryInfo.pCategoryCode = res.pCategoryCode - this.categoryInfo.remark = res.remark - this.categoryInfo.qualifyIds = res.qualifyIds - this.categoryInfo.productParams = this.dealAry2(res.productParams) + this.categoryInfo.id = res.data.id + this.categoryInfo.categoryCode = res.data.categoryCode + this.categoryInfo.categoryName = res.data.categoryName + this.categoryInfo.pCategoryCode = res.data.pCategoryCode + this.categoryInfo.remark = res.data.remark + this.categoryInfo.qualifyIds = res.data.qualifyIds + this.categoryInfo.productParams = res.data.productParams }) - // this.categoryInfo.id = vla.id - // this.categoryInfo.categoryCode=vla.categoryCode - // this.categoryInfo.categoryName=vla.categoryName - // this.categoryInfo.pCategoryCode=vla.pCategoryCode - // this.categoryInfo.remark=vla.remark - // this.categoryInfo.qualifyIds=vla.qualifyIds - // this.categoryInfo.productParams=this.dealAry2(vla.productParams) - // this.categoryInfo = { - // id:vla.id, - // categoryCode:vla.categoryCode, - // categoryName:vla.categoryName, - // pCategoryCode:vla.pCategoryCode, - // remark:vla.qualifyIds, - // qualifyIds:vla.qualifyIds - // } } else { this.resetData() } @@ -226,47 +208,10 @@ // 重置数据 // this.resetData() }, - // 数据处理 - dealAry2(productParams) { // number 转 boolean - if (productParams.lenght < 1 || productParams == '') { - return [{ - paramName: '', - paramOrder: 0, - paramRequire: false - }] - } - productParams.forEach(item => { - if (item.paramRequire == '1') { - item.paramRequire = true - } else { - item.paramRequire = false - } - }) - return productParams - }, - dealAry(productParams) { // boolean 转 number - if (productParams.lenght < 1 || productParams == '') { - return [{ - paramName: '', - paramOrder: 0, - paramRequire: false - }] - } - productParams.forEach(item => { - if (item.paramRequire) { - item.paramRequire = '1' - } else { - item.paramRequire = '0' - } - }) - return productParams - }, save() { if (this.title == '品类新增') { - this.categoryInfo.productParams = this.dealAry(this.categoryInfo.productParams) C_add(this.categoryInfo).then(res => { - console.log(res, res != '') - if (res != '') { + if (res.code === 200) { this.$message({ message: '保存成功', type: 'success' @@ -278,10 +223,11 @@ } }) } else { - this.categoryInfo.productParams = this.dealAry(this.categoryInfo.productParams) + // this.categoryInfo.productParams = this.dealAry(this.categoryInfo.productParams) console.log(this.categoryInfo.productParams) + debugger C_update(this.categoryInfo).then(res => { - if (res != '') { + if (res.code === 200) { this.$message({ message: '更新成功', type: 'success' @@ -349,12 +295,12 @@ } .AddContent { - max-height: 180px; + //max-height: 180px; overflow: auto; border-radius: 5px; box-sizing: border-box; - border: 1px solid #999; - padding: 10px; + border: 1px solid #c9c9c9; + padding: 10px 10px 20px; .addBtn { margin-bottom: 10px; diff --git a/public/config/project.config.json b/public/config/project.config.json index 2e5e3c4..cd629df 100644 --- a/public/config/project.config.json +++ b/public/config/project.config.json @@ -1,5 +1,5 @@ { - "title": "后台管理系统", + "title": "智慧型厨房AIOT物联管理平台", "subtitle": "", "theme": "blue", "baseUrl": "http://111.198.10.15:21403/", @@ -8,4 +8,4 @@ "provinceCode": "360000", "cityCode": "361000", "areaCode": "361024" -} \ No newline at end of file +} diff --git a/src/components/mycomponent/dialog/categoryAddDialog.vue b/src/components/mycomponent/dialog/categoryAddDialog.vue index c48b9cf..4e547d4 100644 --- a/src/components/mycomponent/dialog/categoryAddDialog.vue +++ b/src/components/mycomponent/dialog/categoryAddDialog.vue @@ -29,9 +29,9 @@ > @@ -84,7 +84,7 @@ 添加产品参数
-
+
@@ -97,10 +97,9 @@
- - - 是否必填 + + 必填
@@ -136,10 +135,8 @@ export default { components: { inputVue, - dialogHeader, InputNumber, - RedStar, - Message + RedStar }, props: { isShowInfo: { @@ -176,33 +173,18 @@ watch: { dataInfo: { handler(vla) { - if (vla != '') { + if (vla !== '') { // 编辑操作 if (!vla.id) return detail({ id: vla.id }).then(res => { - this.categoryInfo.id = res.id - this.categoryInfo.categoryCode = res.categoryCode - this.categoryInfo.categoryName = res.categoryName - this.categoryInfo.pCategoryCode = res.pCategoryCode - this.categoryInfo.remark = res.remark - this.categoryInfo.qualifyIds = res.qualifyIds - this.categoryInfo.productParams = this.dealAry2(res.productParams) + this.categoryInfo.id = res.data.id + this.categoryInfo.categoryCode = res.data.categoryCode + this.categoryInfo.categoryName = res.data.categoryName + this.categoryInfo.pCategoryCode = res.data.pCategoryCode + this.categoryInfo.remark = res.data.remark + this.categoryInfo.qualifyIds = res.data.qualifyIds + this.categoryInfo.productParams = res.data.productParams }) - // this.categoryInfo.id = vla.id - // this.categoryInfo.categoryCode=vla.categoryCode - // this.categoryInfo.categoryName=vla.categoryName - // this.categoryInfo.pCategoryCode=vla.pCategoryCode - // this.categoryInfo.remark=vla.remark - // this.categoryInfo.qualifyIds=vla.qualifyIds - // this.categoryInfo.productParams=this.dealAry2(vla.productParams) - // this.categoryInfo = { - // id:vla.id, - // categoryCode:vla.categoryCode, - // categoryName:vla.categoryName, - // pCategoryCode:vla.pCategoryCode, - // remark:vla.qualifyIds, - // qualifyIds:vla.qualifyIds - // } } else { this.resetData() } @@ -226,47 +208,10 @@ // 重置数据 // this.resetData() }, - // 数据处理 - dealAry2(productParams) { // number 转 boolean - if (productParams.lenght < 1 || productParams == '') { - return [{ - paramName: '', - paramOrder: 0, - paramRequire: false - }] - } - productParams.forEach(item => { - if (item.paramRequire == '1') { - item.paramRequire = true - } else { - item.paramRequire = false - } - }) - return productParams - }, - dealAry(productParams) { // boolean 转 number - if (productParams.lenght < 1 || productParams == '') { - return [{ - paramName: '', - paramOrder: 0, - paramRequire: false - }] - } - productParams.forEach(item => { - if (item.paramRequire) { - item.paramRequire = '1' - } else { - item.paramRequire = '0' - } - }) - return productParams - }, save() { if (this.title == '品类新增') { - this.categoryInfo.productParams = this.dealAry(this.categoryInfo.productParams) C_add(this.categoryInfo).then(res => { - console.log(res, res != '') - if (res != '') { + if (res.code === 200) { this.$message({ message: '保存成功', type: 'success' @@ -278,10 +223,11 @@ } }) } else { - this.categoryInfo.productParams = this.dealAry(this.categoryInfo.productParams) + // this.categoryInfo.productParams = this.dealAry(this.categoryInfo.productParams) console.log(this.categoryInfo.productParams) + debugger C_update(this.categoryInfo).then(res => { - if (res != '') { + if (res.code === 200) { this.$message({ message: '更新成功', type: 'success' @@ -349,12 +295,12 @@ } .AddContent { - max-height: 180px; + //max-height: 180px; overflow: auto; border-radius: 5px; box-sizing: border-box; - border: 1px solid #999; - padding: 10px; + border: 1px solid #c9c9c9; + padding: 10px 10px 20px; .addBtn { margin-bottom: 10px; diff --git a/src/components/mycomponent/dialog/categoryInfoDialog.vue b/src/components/mycomponent/dialog/categoryInfoDialog.vue index ad5fd28..be10d16 100644 --- a/src/components/mycomponent/dialog/categoryInfoDialog.vue +++ b/src/components/mycomponent/dialog/categoryInfoDialog.vue @@ -1,7 +1,7 @@