Commit acf69ebb by 张杰

Merge branch 'v1.4' into 'master'

仲利V1.4版本需求

See merge request !1
2 parents b11aaeb6 2595ac89
<template>
<el-button :type="type" v-if="hasPermission()" :size="size">
<slot />
</el-button>
<!-- <el-link :type="type" v-if="link && hasPermission()">
<slot />
</el-link> -->
</template>
<script>
export default {
name: "AuthButton",
props: {
uid: {
type: [String, Number],
default: "",
},
type: {
type: [String, Number],
default: "default",
},
link: {
type: Boolean,
default: false,
},
size:{
type:String,
default:''
}
},
data() {
return {};
},
mounted() {
},
methods: {
// 判断是否有权限
hasPermission() {
let id = this.uid;
let list = this.$root.parentCommon.getAuthData();
console.log(list[0])
let idx = list.findIndex((k) => k.id == id);
if (idx < 0) {
return false;
} else {
return true;
}
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<el-link class="el_link" :underline="false" :type="type" v-if="hasPermission()">
<slot />
</el-link>
</template>
<script>
export default {
name: "AuthLink",
props: {
uid: {
type: [String, Number],
default: "",
},
type: {
type: [String, Number],
default: "default",
},
link: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
mounted() {
},
methods: {
// 判断是否有权限
hasPermission() {
let id = this.uid;
let list = this.$root.parentCommon.getAuthData();
let idx = list.findIndex((k) => k.id == id);
if (idx < 0) {
return false;
} else {
return true;
}
},
},
};
</script>
<style lang="scss" scoped>
.el_link:hover {
text-decoration: none;
}
</style>
\ No newline at end of file
export const Validator = {
/*手机号码格式校验正则*/
PHONEREG: /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/,
/*同时包含字母和数字*/
ISNUMANDLETTERS: /^[a-zA-Z0-9]+$/,
/*特殊字符正则*/
SPECIALLETTER:new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"),
/*邮箱地址格式正则*/
//EMAILREG:/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
EMAILREG:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
/*判断是否为中文*/
ISCHINESE:/^[\u0391-\uFFE5]+$/,
/*判断是否为英文字母*/
ISENGLISH:/^[a-zA-Z]+$/,
/*是否包含空格*/
ISHAVENULL:/^[^\s]*$/,
/*保留两位小数*/
TWODECIMAL: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
/*判断是否为正整数*/
ISDECIMAL:/^[0-9]*$/,
// 只能输入负数
ISNEGATIVENUMBER:/^-[0-9]+.?[0-9]*/,
/**
* 账号管理-手机号码校验
*/
checkPhoneNumber:function(str){
return Validator.PHONEREG.test(str);
}
};
......@@ -25,9 +25,9 @@
<el-form-item label="报警类型:">
<el-select v-model="searchForm.alarmType" class="small_select">
<el-option label="全部" value=""></el-option>
<el-option label="黑区报警" value="1"></el-option>
<el-option label="黑区报警" value="3"></el-option>
<el-option label="聚集报警" value="2"></el-option>
<el-option label="二押报警" value="3"></el-option>
<el-option label="二押报警" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="报警状态:">
......
......@@ -117,7 +117,7 @@ export default {
tableColumns: [
{
label: "业务工单号",
prop: "tempId",
prop: "bizOrderNo",
},
{
label: "所属大区",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!