数据统计显示图表、新增用户手机号只能纯数字等修复

dev
Jo 3 years ago
parent dfa2603ef9
commit 99e0ca9b57
  1. 2
      src/pages/account/login/index.vue
  2. 11
      src/pages/data/list/index.vue
  3. 24
      src/pages/stat/list/index.vue
  4. 24
      src/pages/user/list/index.vue

@ -33,7 +33,7 @@
</div>
</div>
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%">
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="576px">
<p class="tips">依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台</p>
<el-form ref="form" label-width="60px">
<el-form-item label="手机号">

@ -331,7 +331,14 @@ export default {
})
this.listData = list
this.total = res.pageList.total
}).catch(res => { })
if (this.$route.query.preview) {
this.preview({
id: this.$route.query.id,
name: this.$route.query.name
})
this.$router.replace('list')
}
}).catch(res => {})
},
initData() {
this.page = 1
@ -389,7 +396,7 @@ export default {
previewCurrentChange(val) {
this.currentRow = val
},
preview(row, isDefault) {
preview(row) {
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
// +1
this.$post(this.api.saveRecord, {

@ -97,7 +97,11 @@
<el-table :data="monthData" class="table" stripe header-align="center" row-key="id" :span-method="objectSpanMethod" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="80" align="center"></el-table-column>
<el-table-column prop="year" width="80" label="年份" align="center"></el-table-column>
<el-table-column prop="type" width="80" label="类别" align="center"></el-table-column>
<el-table-column prop="type" width="80" label="类别" align="center">
<template slot-scope="scope">
<span class="meta">{{scope.row.type}}</span>
</template>
</el-table-column>
<el-table-column prop="1" label="1月" align="center"></el-table-column>
<el-table-column prop="2" label="2月" align="center"></el-table-column>
<el-table-column prop="3" label="3月" align="center"></el-table-column>
@ -218,12 +222,13 @@ export default {
for(let n in list[i]){
let item = {
year: i,
type: n,
type: n
}
result.push(item)
}
}
this.yearLen = len
// debugger
this.monthData = result
this.$nextTick(() => {
this.initChart(list)
@ -539,6 +544,21 @@ export default {
}
}
}
.meta:after {
content: '';
display: inline-block;
width: 12px;
height: 12px;
margin-left: 5px;
vertical-align: middle;
background-color: #55D3DE;
}
/deep/.el-table__body-wrapper tr:nth-child(2n) .meta:after {
background-color: #7ED321;
}
/deep/.el-table__body-wrapper tr:nth-child(3n) .meta:after {
background-color: #1A78F6;
}
.chart{
width: calc(100% - 240px);
height: 132px;

@ -216,13 +216,13 @@ export default {
trigger: 'blur'
}
],
// phone: [
// {
// pattern: /^1[3456789]\d{9}$/,
// message: '',
// trigger: 'blur'
// }
// ],
phone: [
{
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号',
trigger: 'blur'
}
],
email: [
{
pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/,
@ -338,7 +338,7 @@ export default {
}).catch(() => {})
},
accountChange(){
if(this.form.account !== this.originalAccount){
if(this.form.account && this.form.account !== this.originalAccount){
// type: 012
this.$post(`${this.api.checkAccount}?account=${this.form.account}&type=2&platformId=${Setting.platformId}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => {
this.accountRepeat = false
@ -350,7 +350,7 @@ export default {
}
},
workNumberChange(){
if(this.form.workNumber !== this.originalWorkNumber){
if(this.form.workNumber && this.form.workNumber !== this.originalWorkNumber){
this.$post(`${this.api.checkAccount}?workNumber=${this.form.workNumber}&type=2&platformId=${Setting.platformId}`).then(res => {
this.workNumberRepeat = false
}).catch(res => {
@ -361,7 +361,7 @@ export default {
}
},
phoneChange(){
if(this.form.phone !== this.originalPhone){
if(this.form.phone && this.form.phone !== this.originalPhone){
this.$post(`${this.api.checkEmailOrPhone}?phone=${this.form.phone}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => {
this.phoneRepeat = false
}).catch(res => {
@ -372,7 +372,7 @@ export default {
}
},
emailChange(){
if(this.form.email !== this.originalEmail){
if(this.form.email && this.form.email !== this.originalEmail){
this.$post(`${this.api.checkEmailOrPhone}?email=${this.form.email}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => {
this.emailRepeat = false
}).catch(res => {
@ -406,7 +406,7 @@ export default {
accountId,
userName: data.userName,
roleIds: data.roleId.map(e => e.roleId),
phone: data.phone ? data.phone : '暂未绑定',
phone: data.phone,
workNumber: data.workNumber,
email: data.email,
schoolId: data.schoolId,

Loading…
Cancel
Save