pengjun 2 years ago
parent
commit
14153addac
  1. 11
      src/utlis/validate.js
  2. 52
      src/views/basic-dictionary/ResultStatus.vue

11
src/utlis/validate.js

@ -33,7 +33,7 @@ export const yzstr = (value) => {
if (!reg.test(s1)) {
isyz = false;
} else {
isyz = true;
isyz = true;
}
} else {
//失败
@ -46,4 +46,11 @@ export const yzstr = (value) => {
//正则校验密码
const regex = /^.{6,15}$/;
export const isValid = regex.test();
console.log(isValid);
console.log(isValid);
//颜色转换
// export const Contrcolro = function (v) {
// // 去除开头的#号
// hexColor = hexColor.substring(v);
// // 转换为十进制
// this.form.reportBackgroundColor = parseInt(hexColor, 16);
// }

52
src/views/basic-dictionary/ResultStatus.vue

@ -105,12 +105,14 @@
prop="reportBackgroundColor"
>
<el-color-picker
v-model="form.reportBackgroundColor"
@change="reportBackgroundColorchange"
v-model="form.reportBackgroundColor16"
></el-color-picker>
<!-- <el-input></el-input> -->
<!-- <input type="text" v-model="form.reportBackgroundColor"> -->
<el-input
v-model="form.reportBackgroundColor"
@change="reportBackgroundColorchange1"
style="
width: 85%;
position: absolute;
@ -128,10 +130,14 @@
>
<!-- <el-input v-model="form.reportFontColor"></el-input> -->
<el-color-picker
v-model="form.reportFontColor"
v-model="form.reportFontColor16"
@change="reportFontColorchange"
></el-color-picker>
<el-input
v-model="form.reportFontColor"
@change="reportFontColor1"
maxlength="15"
minlength="6"
style="
width: 85%;
position: absolute;
@ -144,12 +150,11 @@
<el-col :span="12">
<el-form-item label="数据录入背景" label-width="100px">
<el-color-picker
v-model="form.dataInputBackgroundColor"
v-model="form.dataInputBackgroundColor16"
@change="dataInputBackgroundColorchange"
></el-color-picker>
<el-input
v-model="form.dataInputBackgroundColor"
maxlength="12"
minlength="6"
style="
width: 85%;
position: absolute;
@ -167,10 +172,12 @@
prop="dataInputFontColor"
>
<el-color-picker
v-model="form.dataInputFontColor"
v-model="form.dataInputFontColor16"
@change="dataInputFontColorchange"
></el-color-picker>
<el-input
v-model="form.dataInputFontColor"
@change="dataInputFontColor1"
style="
width: 85%;
margin-left: 10px;
@ -215,9 +222,13 @@ export default {
dataInputPrompt: "",
reportPrompt: "",
reportBackgroundColor: "",
reportBackgroundColor16: "",
reportFontColor: "",
reportFontColor16: "",
dataInputBackgroundColor: "",
dataInputBackgroundColor16: "",
dataInputFontColor: "",
dataInputFontColor16: "",
},
dialogVisible: false,
title: 1,
@ -285,7 +296,7 @@ export default {
hexColor = hexColor.substring(1);
this.form.dataInputBackgroundColor = parseInt(hexColor, 16);
},
//
//
reportFontColorchange(v) {
var hexColor = v;
hexColor = hexColor.substring(1);
@ -300,10 +311,33 @@ export default {
this.form.reportBackgroundColor = parseInt(hexColor, 16);
console.log(this.form.reportBackgroundColor);
},
dataInputFontColor1(v) {
this.form.dataInputFontColor16 = "#" + v;
},
//
reportFontColor1(v) {
this.form.reportFontColor16 = "#" + v;
},
//
reportBackgroundColorchange1(v) {
//
this.form.reportBackgroundColor16 = "#" + v;
},
rowclick(row) {
this.form = row;
console.log(row);
// this.form.reportBackgroundColor16 = "#"+row.reportBackgroundColor;
// this.form.reportFontColor16 = "#"+row.reportFontColor;
// this.form.dataInputBackgroundColor16 = "#"+row.dataInputBackgroundColor;
// this.form.dataInputFontColor16 = "#"+row.dataInputFontColor;
this.form.reportBackgroundColor16 = "#" + row.reportBackgroundColor;
this.form.reportFontColor16 = "#" + row.reportFontColor;
this.form.dataInputBackgroundColor16 = "#" + row.dataInputBackgroundColor;
this.form.dataInputFontColor16 = "#" + row.dataInputFontColor;
console.log(this.form);
},
haxadecimal() {
let str = this.form.dataInputFontColor;
this.form.dataInputFontColor = str
@ -384,6 +418,8 @@ export default {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
console.log("22222222222222");
this.dialogVisible = true;
this.title = 2;
}

Loading…
Cancel
Save