diff --git a/src/views/Home.vue b/src/views/Home.vue index d1e2566..b6c0dbd 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -279,13 +279,13 @@ label-width="100px" > - + - + - + diff --git a/src/views/basic-dictionary/SampleContainer.vue b/src/views/basic-dictionary/SampleContainer.vue index 80acc89..f793e46 100644 --- a/src/views/basic-dictionary/SampleContainer.vue +++ b/src/views/basic-dictionary/SampleContainer.vue @@ -93,7 +93,12 @@ prop="containerColor" style="width: 90%; margin-top: -40px" > - + @@ -231,8 +236,17 @@ export default { }, methods: { colorchange(v) { - this.form.containerColor = parseInt(v) + var hexColor = v; + + // 去除开头的#号 + hexColor = hexColor.substring(1); + + // 转换为十进制 + this.form.containerColor = parseInt(hexColor, 16); + console.log(this.form.containerColor); + // this.form.containerColor = parseInt(v) + // console.log(this.form.containerColor); }, //取消排序 cancellation() { @@ -360,7 +374,7 @@ export default { newlyspecimen({ displayName: this.form.displayName, containerColorName: this.form.containerColorName, - containerColor: Number(this.form.containerColor), + containerColor: this.form.containerColor, }).then((res) => { this.$message.success("新增成功"); this.getlist(); @@ -370,7 +384,7 @@ export default { specimenediting(this.form.id, { displayName: this.form.displayName, containerColorName: this.form.containerColorName, - containerColor: Number(this.form.containerColor), + containerColor: this.form.containerColor, }).then((res) => { this.$message.success("修改成功"); this.getlist(); diff --git a/src/views/fee-settings/Item.vue b/src/views/fee-settings/Item.vue index 5cbbb27..c494c3d 100644 --- a/src/views/fee-settings/Item.vue +++ b/src/views/fee-settings/Item.vue @@ -308,7 +308,7 @@ - +