|
|
@@ -21,7 +21,26 @@
|
|
|
maxlength="30"/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div class="flexcc" style="margin-top: 80px;">
|
|
|
+ <div class="form-row">
|
|
|
+ <el-form-item
|
|
|
+ prop="siteLabelBackground"
|
|
|
+ class="form-item colorPanel"
|
|
|
+ label="Color:">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="form.siteLabelBackground"
|
|
|
+ class="label-color-view">
|
|
|
+ <el-radio-button
|
|
|
+ v-for="(item,index) in labelColors"
|
|
|
+ :label="item"
|
|
|
+ :key="index"
|
|
|
+ class="label-color-item"
|
|
|
+ :style='"background-color:" + item + ";"'>
|
|
|
+ {{index}}
|
|
|
+ </el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="flexcc" style="margin-top: 50px;">
|
|
|
<el-button
|
|
|
class="button"
|
|
|
type="primary"
|
|
|
@@ -59,15 +78,28 @@ export default {
|
|
|
loading: false,
|
|
|
form: {
|
|
|
siteLabelId: "",
|
|
|
- siteLabelName: ""
|
|
|
+ siteLabelName: "",
|
|
|
+ siteLabelBackground: ""
|
|
|
},
|
|
|
rules: {
|
|
|
siteLabelName: {
|
|
|
required: true,
|
|
|
message: "Label name is required",
|
|
|
trigger: "blur"
|
|
|
+ },
|
|
|
+ siteLabelBackground: {
|
|
|
+ required: true,
|
|
|
+ trigger: "change",
|
|
|
+ message: "Please select a color"
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ labelColors: [
|
|
|
+ "#001489", "#0025f9", "#417df5", "#24B4F3", "#74E1FE",
|
|
|
+ "#127946", "#009E81", "#14CE14", "#15e815", "#ABDC00",
|
|
|
+ "#bf3f00", "#df3700", "#ff5500", "#ef9801", "#F9B70D",
|
|
|
+ "#9F0511", "#B41519", "#C92A17", "#E63726", "#EB725F",
|
|
|
+ "#542038", "#A73EA7", "#CE4DCE", "#AC7EEB", "#CAA9DC"
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -83,7 +115,8 @@ export default {
|
|
|
init() {
|
|
|
this.form = {
|
|
|
siteLabelId: "",
|
|
|
- siteLabelName: ""
|
|
|
+ siteLabelName: "",
|
|
|
+ siteLabelBackground: ""
|
|
|
}
|
|
|
this.loading = false;
|
|
|
this.$nextTick(() => {
|
|
|
@@ -172,8 +205,24 @@ export default {
|
|
|
margin-left: 10px;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
-.form-item >>> label {
|
|
|
+.form-item.colorPanel {
|
|
|
+ overflow-x: auto;
|
|
|
+}
|
|
|
+.form-item.colorPanel >>> .el-form-item__label {
|
|
|
+ left: 0;
|
|
|
padding: 0;
|
|
|
+ position: sticky;
|
|
|
+}
|
|
|
+.form-item.colorPanel >>> .el-form-item__error {
|
|
|
+ top: 0 !important;
|
|
|
+ display: flex;
|
|
|
+ text-align: left;
|
|
|
+ line-height: normal;
|
|
|
+ position: relative !important;
|
|
|
+ margin-left: 0px !important;
|
|
|
+}
|
|
|
+.form-item >>> .el-form-item__content {
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
.flex-item {
|
|
|
min-width: 200px;
|
|
|
@@ -189,4 +238,33 @@ export default {
|
|
|
max-width: none;
|
|
|
}
|
|
|
}
|
|
|
+.label-color-view {
|
|
|
+ width: 410px;
|
|
|
+}
|
|
|
+.label-color-item {
|
|
|
+ margin: 1px;
|
|
|
+ border: none !important;
|
|
|
+ border-radius: 2px;
|
|
|
+}
|
|
|
+.label-color-item >>> .el-radio-button__inner {
|
|
|
+ width: 80px;
|
|
|
+ height: 40px;
|
|
|
+ user-select: none;
|
|
|
+ border: none !important;
|
|
|
+ color: transparent !important;
|
|
|
+ box-shadow: none !important;
|
|
|
+ background: transparent !important;
|
|
|
+}
|
|
|
+.label-color-item.is-active::before {
|
|
|
+ color: #fff;
|
|
|
+ width: 80px;
|
|
|
+ height: 40px;
|
|
|
+ content: "\e6da";
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 40px;
|
|
|
+ position: absolute;
|
|
|
+ font-family: element-icons;
|
|
|
+}
|
|
|
</style>
|