@@ -114,7 +114,7 @@ export default { | |||||
} else if (type === 'today') { | } else if (type === 'today') { | ||||
const e = { | const e = { | ||||
start: moment() | start: moment() | ||||
.subtract(1, 'day') | |||||
.subtract(0, 'day') | |||||
.format('YYYY-MM-DD 00:00:00'), | .format('YYYY-MM-DD 00:00:00'), | ||||
end: todayEnd | end: todayEnd | ||||
} | } | ||||
@@ -123,7 +123,7 @@ export default { | |||||
} else if (type === '7d') { | } else if (type === '7d') { | ||||
const e = { | const e = { | ||||
start: moment() | start: moment() | ||||
.subtract(7, 'days') | |||||
.subtract(6, 'days') | |||||
.format('YYYY-MM-DD 00:00:00'), | .format('YYYY-MM-DD 00:00:00'), | ||||
end: todayEnd | end: todayEnd | ||||
} | } | ||||
@@ -7,10 +7,10 @@ | |||||
:key="index" | :key="index" | ||||
class="bg-img" | class="bg-img" | ||||
> | > | ||||
<!-- {{item.id?CONFIG('webHost')+item.url:item.url}} --> | |||||
<!-- :src="item.id?CONFIG('webHost')+item.url:item.url" --> | |||||
<image | <image | ||||
v-if="showfile()" | v-if="showfile()" | ||||
:src="item.id?CONFIG('webHost')+item.url:item.url" | |||||
:src="item.url" | |||||
mode="aspectFill" | mode="aspectFill" | ||||
></image> | ></image> | ||||
<view v-if="!readonly" @tap.stop="delImg(index)" class="cu-tag bg-red" style="width: 18px; height: 18px; font-size: 24px"> | <view v-if="!readonly" @tap.stop="delImg(index)" class="cu-tag bg-red" style="width: 18px; height: 18px; font-size: 24px"> | ||||
@@ -40,6 +40,12 @@ export default { | |||||
number: { default: 1 }, | number: { default: 1 }, | ||||
readonly: {}, | readonly: {}, | ||||
value: { default: () => [] }, | value: { default: () => [] }, | ||||
size:{ | |||||
default: 20 | |||||
},//MB | |||||
type:{ | |||||
default: "all" | |||||
} | |||||
}, | }, | ||||
data(){ | data(){ | ||||
@@ -116,34 +122,6 @@ export default { | |||||
}) | }) | ||||
}, | }, | ||||
/** | |||||
* @description 控制promise.all并发数量 | |||||
* @param limit 并发数 | |||||
* @param array 参数列表 | |||||
* @param apiFn 执行函数 | |||||
* @returns {Promise<Awaited<unknown>[]>} | |||||
*/ | |||||
async promiseAllLimit(limit, array, apiFn) { | |||||
const ret = [] // 用于存放所有的promise实例 | |||||
const executing = [] // 用于存放目前正在执行的promise | |||||
for (const item of array) { | |||||
const p = apiFn(item) | |||||
ret.push(p) | |||||
if (limit <= array.length) { | |||||
// then回调中,当这个promise状态变为fulfilled后,将其从正在执行的promise列表executing中删除 | |||||
const e = p.then(() => executing.splice(executing.indexOf(e), 1)) | |||||
executing.push(e) | |||||
if (executing.length >= limit) { | |||||
// 一旦正在执行的promise列表数量等于限制数,就使用Promise.race等待某一个promise状态发生变更, | |||||
// 状态变更后,就会执行上面then的回调,将该promise从executing中删除, | |||||
// 然后再进入到下一次for循环,生成新的promise进行补充 | |||||
await Promise.race(executing) | |||||
} | |||||
} | |||||
} | |||||
return Promise.all(ret) | |||||
}, | |||||
imgToBase64(url){ | imgToBase64(url){ | ||||
return new Promise((resolve,reject)=>{ | return new Promise((resolve,reject)=>{ | ||||
if(!url){ | if(!url){ | ||||
@@ -167,18 +145,19 @@ export default { | |||||
}, | }, | ||||
validate(array){ | validate(array){ | ||||
// let type = array.every(item=>{ | |||||
// return item.type && item.type.substring(0,6) == "image/" | |||||
// }) | |||||
// if(!type){ | |||||
// this.TOAST('文件类型错误'); | |||||
// return false | |||||
// } | |||||
let type = this.type!="all"?array.every(item=>{ | |||||
return this.type.split(",").includes(item.type) | |||||
}):true | |||||
if(!type){ | |||||
this.TOAST('文件格式错误'); | |||||
return false | |||||
} | |||||
console.log(array,this.size *1024 *1024) | |||||
let size = array.every(item=>{ | let size = array.every(item=>{ | ||||
return item.size && item.size <= 100 * 1024 * 1024 | |||||
return item.size && item.size <= this.size *1024 *1024 | |||||
}) | }) | ||||
if(!size){ | if(!size){ | ||||
this.TOAST('文件大小不得超过100M'); | |||||
this.TOAST('文件大小不能超过'+this.size+'M'); | |||||
return false | return false | ||||
} | } | ||||
return true | return true | ||||
@@ -186,8 +165,8 @@ export default { | |||||
viewImg(index) { | viewImg(index) { | ||||
uni.previewImage({ | uni.previewImage({ | ||||
urls: this.imgList.map(item=>item.id?this.CONFIG('webHost')+item.url:item.url), | |||||
current: this.imgList[index].id?this.CONFIG('webHost')+this.imgList[index].url:this.imgList[index].url, | |||||
urls: this.imgList.map(item=>item.url), | |||||
current: this.imgList[index].url, | |||||
}); | }); | ||||
}, | }, | ||||
@@ -219,7 +198,6 @@ export default { | |||||
// }, | // }, | ||||
}, | }, | ||||
created() { | created() { | ||||
console.log(123) | |||||
this.imgList = JSON.parse(JSON.stringify(this.value.map(item=>{ | this.imgList = JSON.parse(JSON.stringify(this.value.map(item=>{ | ||||
item.isUploaded = true | item.isUploaded = true | ||||
return item | return item | ||||
@@ -132,71 +132,6 @@ | |||||
}, | }, | ||||
ceshi() { | |||||
function apiFn(params) { | |||||
return new Promise((resolve, reject) => { | |||||
this.LOADING('正在上传…'); | |||||
this.HTTP_UPLOAD2('StuInfoFresh/upload', params.url, { | |||||
folderId: this.folderId | |||||
}).then((data) => { | |||||
this.HIDE_LOADING(); | |||||
if (data) { | |||||
// this.HTTP_GET('StuInfoFresh/upload', {fileId:data}) | |||||
this.imgList[params.index] = [{ | |||||
id: data.F_Id, | |||||
name: data.F_FileName, | |||||
url: data.F_FilePath, | |||||
type: data.F_FileType | |||||
}] | |||||
reslove(this.imgList[params.index]) | |||||
} else { | |||||
reject('上传失败!') | |||||
} | |||||
}) | |||||
}) | |||||
} | |||||
let array = this.imgList.map(item => { | |||||
if (item.id) { | |||||
return "" | |||||
} else { | |||||
return { | |||||
url: "learun/adms/annexes/upload" | |||||
} | |||||
} | |||||
}) | |||||
this.promiseAllLimit(2, [1, 2, 3, 4, 5, 6, 7, 8, 9], a).then(res => { | |||||
console.log(res) | |||||
}) | |||||
}, | |||||
/** | |||||
* @description 控制promise.all并发数量 | |||||
* @param limit 并发数 | |||||
* @param array 参数列表 | |||||
* @param apiFn 执行函数 | |||||
* @returns {Promise<Awaited<unknown>[]>} | |||||
*/ | |||||
async promiseAllLimit(limit, array, apiFn) { | |||||
const ret = [] // 用于存放所有的promise实例 | |||||
const executing = [] // 用于存放目前正在执行的promise | |||||
for (const item of array) { | |||||
const p = apiFn(item) | |||||
ret.push(p) | |||||
if (limit <= array.length) { | |||||
// then回调中,当这个promise状态变为fulfilled后,将其从正在执行的promise列表executing中删除 | |||||
const e = p.then(() => executing.splice(executing.indexOf(e), 1)) | |||||
executing.push(e) | |||||
if (executing.length >= limit) { | |||||
// 一旦正在执行的promise列表数量等于限制数,就使用Promise.race等待某一个promise状态发生变更, | |||||
// 状态变更后,就会执行上面then的回调,将该promise从executing中删除, | |||||
// 然后再进入到下一次for循环,生成新的promise进行补充 | |||||
await Promise.race(executing) | |||||
} | |||||
} | |||||
} | |||||
return Promise.all(ret) | |||||
}, | |||||
validate(array) { | validate(array) { | ||||
// let type = array.every(item=>{ | // let type = array.every(item=>{ | ||||
// return item.type && item.type.substring(0,6) == "image/" | // return item.type && item.type.substring(0,6) == "image/" | ||||
@@ -1043,6 +1043,15 @@ | |||||
} | } | ||||
} | } | ||||
,{ | |||||
"path" : "pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list", | |||||
"style" : | |||||
{ | |||||
"navigationBarTitleText": "老生缴费", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
} | |||||
], | ], | ||||
// 全局样式 | // 全局样式 | ||||
@@ -0,0 +1,276 @@ | |||||
<template> | |||||
<view class="page"> | |||||
<!-- 主列表页 --> | |||||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx"> | |||||
<!-- 顶部条目/分页信息栏 --> | |||||
<l-customlist-banner @buttonClick="sideOpen = false">{{ tips }}</l-customlist-banner> | |||||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||||
<l-customlist :tips="loadState" showTips> | |||||
<!-- 单条记录 --> | |||||
<view class="customlist-item" v-for="item of list" :key="item.ID" @click="tapLi(item)"> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">学号:</text> | |||||
{{ item.StuNo }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">姓名:</text> | |||||
{{ item.StuName }} | |||||
</view> | |||||
<!-- <view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">班级:</text> | |||||
{{ displayListItem(item, 'ClassNo') }} | |||||
</view> --> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">性别:</text> | |||||
{{ displayListItem(item, 'GenderNo') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">缴费状态:</text> | |||||
{{ displayListItem(item, 'PayStatus') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">开票状态:</text> | |||||
{{ displayListItem(item, 'InvoiceStatus') }} | |||||
</view> | |||||
<view class="customlist-item-field"> | |||||
<text class="customlist-item-field-title">缴费年度:</text> | |||||
{{ item.PayYear }} | |||||
</view> | |||||
</view> | |||||
</l-customlist> | |||||
</l-scroll-list> | |||||
</view> | |||||
<!-- 关闭侧边抽屉按钮 --> | |||||
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose"><l-icon type="pullright" color="blue" /></view> | |||||
<!-- 侧边栏,用于设置查询条件 --> | |||||
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> | |||||
<view v-if="ready" class="padding"> | |||||
<l-input v-model="queryData.StuNo" title="学号" placeholder="请填写学号" right /> | |||||
<l-input v-model="queryData.StuName" title="学生姓名" placeholder="请填写学生姓名" right /> | |||||
<!-- 重置查询条件按钮 --> | |||||
<view class="padding-tb"><l-button @click="searchChange" line="orange" class="block" block>查询</l-button></view> | |||||
</view> | |||||
</scroll-view> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
/* | |||||
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 上海力软信息技术有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-10-12 17:22 | |||||
* 描 述:班级自诊打卡 | |||||
*/ | |||||
/** | |||||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||||
* { "path": "pages/EducationalAdministration/Thermography/list", "style": { "navigationBarTitleText": "表单列表页" } } | |||||
* | |||||
* (navigationBarTitleText 字段为本页面的标题文本,可以修改) | |||||
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) | |||||
*/ | |||||
import moment from 'moment'; | |||||
import get from 'lodash/get'; | |||||
import set from 'lodash/set'; | |||||
import pickBy from 'lodash/pickBy'; | |||||
import mapValues from 'lodash/mapValues'; | |||||
export default { | |||||
data() { | |||||
return { | |||||
// 数据项的数据类型、结构 | |||||
scheme: { | |||||
ClassNo: { | |||||
type: 'select', | |||||
dataSource: '1', | |||||
dataSourceId: 'bjsj,classname,classno' | |||||
}, | |||||
GenderNo:{ | |||||
type: 'dataItem', | |||||
dataType: 'dataDictionary' | |||||
}, | |||||
PayStatus:{ | |||||
type: 'dataItem', | |||||
dataType: 'dataDictionary' | |||||
}, | |||||
InvoiceStatus:{ | |||||
type: 'dataItem', | |||||
dataType: 'dataDictionary' | |||||
} | |||||
}, | |||||
defaultQueryData: {}, | |||||
queryData: { | |||||
StuNo: '', | |||||
StuName: '' | |||||
}, | |||||
user:null, | |||||
// 数据源 | |||||
dataSource: { | |||||
ClassNo: [], | |||||
GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersexbit).map(t => ({ value: t.value, text: t.text })), | |||||
PayStatus:Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||||
InvoiceStatus:Object.values(this.GET_GLOBAL('dataDictionary').InvoiceStatus).map(t => ({ value: t.value, text: t.text })), | |||||
}, | |||||
// 页面相关参数 | |||||
ready: false, | |||||
tips: '加载中...', | |||||
loadState: '向下翻以加载更多', | |||||
sideOpen: false, | |||||
// 列表与分页信息 | |||||
page: 1, | |||||
total: 2, | |||||
rows: 10, | |||||
list: [], | |||||
}; | |||||
}, | |||||
async onLoad() { | |||||
console.log(this.GET_GLOBAL('dataDictionary')) | |||||
await this.init(); | |||||
}, | |||||
onUnload() { | |||||
this.OFF('stuInfoFreshPayFee'); | |||||
}, | |||||
methods: { | |||||
// 页面初始化 | |||||
async init() { | |||||
this.ON('stuInfoFreshPayFee', this.refreshList); | |||||
this.user = this.GET_GLOBAL('loginUser'); | |||||
this.queryData.StuNo = this.user.account | |||||
// 拉取加载列表和数据源 | |||||
await Promise.all([ | |||||
this.FETCH_DATASOURCE('bjsj').then(data => { | |||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
text: t.classname, | |||||
value: t.classno | |||||
})); | |||||
}), | |||||
() => {} | |||||
]); | |||||
await this.fetchList(); | |||||
// 初始化查询条件 | |||||
this.defaultQueryData = this.COPY(this.queryData); | |||||
this.ready = true; | |||||
}, | |||||
tapLi(data) { | |||||
this.NAV_TO('./single', data, true); | |||||
}, | |||||
// 拉取列表 | |||||
async fetchList(isConcat=true) { | |||||
if (this.page > this.total) { | |||||
return; | |||||
} | |||||
let _postParam = { | |||||
pagination: { | |||||
rows: this.rows, | |||||
page: this.page, | |||||
sidx: 'ClassNo,StuNo', | |||||
sord: 'ASC' | |||||
}, | |||||
queryJson: JSON.stringify(this.queryData) | |||||
}; | |||||
this.LOADING('加载数据中…'); | |||||
await this.HTTP_GET('/learun/payfee/getpayfeelist', _postParam,'加载数据时出错').then(res => { | |||||
this.HIDE_LOADING(); | |||||
// console.log(res) | |||||
this.total = res.total; | |||||
this.page = res.page + 1; | |||||
this.list = isConcat?this.list.concat(res.rows):res.rows; | |||||
this.tips = `已加载 ${Math.min(res.page, res.total)} / ${res.total} 页,共 ${res.records} 项`; | |||||
this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多'; | |||||
}) | |||||
}, | |||||
// 刷新清空列表 | |||||
async refreshList(isConcat=true) { | |||||
this.page = 1; | |||||
this.total = 2; | |||||
this.list = []; | |||||
await this.fetchList(isConcat); | |||||
}, | |||||
// 列表下拉 | |||||
pullDown() { | |||||
this.refreshList().then(() => { | |||||
this.$refs.list.stopPullDown(); | |||||
}); | |||||
}, | |||||
// 设置搜索条件 | |||||
async searchChange() { | |||||
this.sideOpen = false | |||||
await this.refreshList(false); | |||||
}, | |||||
// 显示列表中的标题项 | |||||
displayListItem(item, field) { | |||||
const fieldItem = this.scheme[field]; | |||||
const value = item[field]; | |||||
switch (fieldItem.type) { | |||||
case 'currentInfo': | |||||
case 'organize': | |||||
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, ''); | |||||
case 'radio': | |||||
case 'select': | |||||
const selectItem = this.dataSource[field].find(t => t.value === String(value)); | |||||
return get(selectItem, 'text', ''); | |||||
case 'dataItem': | |||||
const sex = this.dataSource[field].find(t => t.value === String(value)); | |||||
return get(sex, 'text', ''); | |||||
case 'checkbox': | |||||
if (!value || value.split(',').length <= 0) { | |||||
return ''; | |||||
} | |||||
const checkboxItems = value.split(','); | |||||
return this.dataSource[field] | |||||
.filter(t => checkboxItems.includes(t.value)) | |||||
.map(t => t.text) | |||||
.join(','); | |||||
case 'datetime': | |||||
if (!value) { | |||||
return ''; | |||||
} | |||||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm'); | |||||
default: | |||||
return value === null || value === undefined ? '' : value; | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
</script> | |||||
<style lang="less" scoped> | |||||
@import '~@/common/css/sidepage.less'; | |||||
@import '~@/common/css/customlist.less'; | |||||
</style> |
@@ -0,0 +1,82 @@ | |||||
<template> | |||||
<view class="lr-form-container"> | |||||
<view> | |||||
<l-select v-model="queryData.PayFeeStatus" :range="dataSource.PayStatus" title="线上缴费状态" placeholder="请选择" /> | |||||
</view> | |||||
<view> | |||||
<l-input v-model="queryData.StudentLoan" :disabled="disabled" title="贷款回执码" placeholder="请填写贷款回执码" right /> | |||||
</view> | |||||
<view> | |||||
<l-select v-model="queryData.OnsitePayFeeStatus" :range="dataSource.OnsitePayStatus" title="现场缴费状态" placeholder="请选择" /> | |||||
</view> | |||||
<view class="btn" @click="tapBtn"> | |||||
提交 | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
export default{ | |||||
data() { | |||||
return { | |||||
disabled: false, | |||||
// 数据源 | |||||
dataSource: { | |||||
PayStatus: Object.values(this.GET_GLOBAL('dataDictionary').PayStatus).map(t => ({ value: t.value, text: t.text })), | |||||
OnsitePayStatus: Object.values(this.GET_GLOBAL('dataDictionary').OnsitePayStatus).map(t => ({ value: t.value, text: t.text })) | |||||
}, | |||||
queryData: { | |||||
StudentLoan: '', | |||||
PayFeeStatus: '', | |||||
OnsitePayFeeStatus: '', | |||||
StudentLoanStatus: '0' | |||||
}, | |||||
pageInfo:{} | |||||
} | |||||
}, | |||||
methods:{ | |||||
init() { | |||||
// console.log(this.dataSource) | |||||
this.pageInfo = this.GET_PARAM(); //获取页面传递参数 | |||||
this.LOADING('加载数据中…'); | |||||
this.HTTP_GET('StuInfoFresh/form', this.pageInfo.ID,'加载数据时出错').then(res => { | |||||
this.HIDE_LOADING(); | |||||
// console.log(res) | |||||
if(res){ | |||||
let data = res.StuInfoFresh; | |||||
this.queryData.StudentLoan = data.StudentLoan == null? '' : data.StudentLoan; | |||||
this.queryData.PayFeeStatus = data.PayFeeStatus == null? '' : data.PayFeeStatus; | |||||
this.queryData.OnsitePayFeeStatus = data.OnsitePayFeeStatus == null? '' : data.OnsitePayFeeStatus; | |||||
this.disabled = data.StudentLoanStatus == "1"? true : false; | |||||
} | |||||
}) | |||||
}, | |||||
tapBtn() { | |||||
if(this.queryData.StudentLoan.trim() != ""){ | |||||
this.queryData.StudentLoanStatus = 1; | |||||
} | |||||
let _postData = { | |||||
keyValue: this.pageInfo.ID, | |||||
strEntity: JSON.stringify(this.queryData) | |||||
} | |||||
this.LOADING('提交数据中…'); | |||||
this.HTTP_POST('StuInfoFresh/save', _postData,'加载数据时出错').then(res => { | |||||
this.HIDE_LOADING(); | |||||
console.log(res) | |||||
if(res){ | |||||
this.TOAST('提交数据成功'); | |||||
this.EMIT('stuInfoFreshPayFee'); | |||||
this.NAV_BACK() | |||||
} | |||||
}) | |||||
} | |||||
}, | |||||
created() { | |||||
this.init() | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="less" scoped> | |||||
</style> | |||||
@@ -81,7 +81,7 @@ export default { | |||||
scheme: { | scheme: { | ||||
DutySchedule: { | DutySchedule: { | ||||
Date: { type: 'datetime', title: '时间', dateformat: '0' }, | Date: { type: 'datetime', title: '时间', dateformat: '0' }, | ||||
Person: { type: 'text', title: '值班人' }, | |||||
Person: { type: 'text', title: '值班人',verify: 'NotNull', }, | |||||
Remark: { type: 'textarea', title: '备注' }, | Remark: { type: 'textarea', title: '备注' }, | ||||
}, | }, | ||||
@@ -1,8 +1,8 @@ | |||||
<template> | <template> | ||||
<view class="page"> | <view class="page"> | ||||
<l-title>设置密码</l-title> | <l-title>设置密码</l-title> | ||||
<!-- <l-input v-model="oldPwd" title="旧密码" placeholder="请输入旧密码" password></l-input> --> | |||||
<l-input v-model="newPwd" title="新的密码" placeholder="请输入新密码" password></l-input> | |||||
<l-input v-model="oldPwd" title="旧密码" placeholder="请输入身份证后八位" password></l-input> | |||||
<l-input v-model="newPwd" title="新密码" placeholder="请输入新密码" password></l-input> | |||||
<l-input v-model="confirmPwd" title="确认输入" placeholder="请再次输入新密码" password></l-input> | <l-input v-model="confirmPwd" title="确认输入" placeholder="请再次输入新密码" password></l-input> | ||||
<view class="passwordDes"> | <view class="passwordDes"> | ||||
<text>新密码必须8-20位同时包含1.[大小写字母]、2.[数字]、3.[特殊符号!@#$%^&*]</text> | <text>新密码必须8-20位同时包含1.[大小写字母]、2.[数字]、3.[特殊符号!@#$%^&*]</text> | ||||
@@ -27,10 +27,10 @@ export default { | |||||
// 提交修改 | // 提交修改 | ||||
async submit() { | async submit() { | ||||
const { auth, oldPwd, newPwd, confirmPwd } = this | const { auth, oldPwd, newPwd, confirmPwd } = this | ||||
// if (oldPwd.length < 6) { | |||||
// this.CONFIRM('操作失败', '旧密码输入不正确,请重新确认') | |||||
// return | |||||
// } | |||||
if (oldPwd.length < 6) { | |||||
this.CONFIRM('操作失败', '旧密码输入不正确,请重新确认') | |||||
return | |||||
} | |||||
// if (newPwd.length < 6 || newPwd.length > 16) { | // if (newPwd.length < 6 || newPwd.length > 16) { | ||||
// this.CONFIRM('操作失败', '新密码不符合要求,请修改后重试') | // this.CONFIRM('操作失败', '新密码不符合要求,请修改后重试') | ||||
// return | // return | ||||
@@ -46,20 +46,21 @@ export default { | |||||
} | } | ||||
const success = await this.HTTP_POST( | const success = await this.HTTP_POST( | ||||
'learun/adms/user/modifypw', | |||||
'learun/adms/user/modifypwiden', | |||||
{ | { | ||||
newpassword: this.MD5(newPwd), | newpassword: this.MD5(newPwd), | ||||
// oldpassword: this.MD5(oldPwd) | |||||
oldpassword: oldPwd | |||||
}, | }, | ||||
'未能成功修改密码' | '未能成功修改密码' | ||||
) | ) | ||||
console.log(success) | |||||
if (!success) { | if (!success) { | ||||
return | return | ||||
} | } | ||||
this.NAV_BACK() | this.NAV_BACK() | ||||
this.TOAST('密码修改成功') | |||||
setTimeout(()=>{ | |||||
this.TOAST('密码修改成功') | |||||
},100) | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -183,22 +183,22 @@ export default { | |||||
if(!success){ | if(!success){ | ||||
return | return | ||||
} | } | ||||
var logininfo = { | |||||
account: this.username, | |||||
token: success.baseinfo.token, | |||||
date: moment().format('yyyy-MM-dd hh:mm:ss') | |||||
}; | |||||
// var logininfo = { | |||||
// account: this.username, | |||||
// token: success.baseinfo.token, | |||||
// date: moment().format('yyyy-MM-dd hh:mm:ss') | |||||
// }; | |||||
this.SET_STORAGE("token",success.baseinfo.token) | this.SET_STORAGE("token",success.baseinfo.token) | ||||
// this.SET_STORAGE('logininfo', logininfo); | // this.SET_STORAGE('logininfo', logininfo); | ||||
// this.SET_STORAGE('userinfo', success); | // this.SET_STORAGE('userinfo', success); | ||||
this.username = "" | |||||
this.password = "" | |||||
if (success.pwd === true) { | |||||
this.SET_STORAGE('pwd', true); | |||||
this.TOAST("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); | |||||
} else { | |||||
this.SET_STORAGE('pwd', false); | |||||
} | |||||
// this.username = "" | |||||
// this.password = "" | |||||
// if (success.pwd === true) { | |||||
// this.SET_STORAGE('pwd', true); | |||||
// this.TOAST("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); | |||||
// } else { | |||||
// this.SET_STORAGE('pwd', false); | |||||
// } | |||||
location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; | location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; | ||||
}) | }) | ||||
}, | }, | ||||
@@ -13,7 +13,8 @@ | |||||
<l-input title="班级" placeholder="请填写" :value="StuInfoFreshEntity.ClassNo" disabled right /> | <l-input title="班级" placeholder="请填写" :value="StuInfoFreshEntity.ClassNo" disabled right /> | ||||
<l-input title="身份证号" placeholder="请填写" :value="StuInfoFreshEntity.IdentityCardNo" disabled right /> | <l-input title="身份证号" placeholder="请填写" :value="StuInfoFreshEntity.IdentityCardNo" disabled right /> | ||||
<l-input title="出生日期" placeholder="请填写" :value="StuInfoFreshEntity.Birthday" disabled right /> | <l-input title="出生日期" placeholder="请填写" :value="StuInfoFreshEntity.Birthday" disabled right /> | ||||
<l-input title="户口类别" placeholder="请填写" :value="StuInfoFreshEntity.ResidenceNo" disabled right /> | |||||
<!-- <l-input title="户口类别" placeholder="请填写" :value="StuInfoFreshEntity.ResidenceNo" disabled right /> --> | |||||
<l-select v-model="StuInfoFreshEntity.ResidenceNo" disabled :range="dataSource.ResidenceNo" title="户口类别" placeholder="请选择" /> | |||||
<l-input title="政治面貌" placeholder="请填写" :value="displayListItem(StuInfoFreshEntity, 'PartyFaceNo')" disabled right /> | <l-input title="政治面貌" placeholder="请填写" :value="displayListItem(StuInfoFreshEntity, 'PartyFaceNo')" disabled right /> | ||||
</view> | </view> | ||||
<view class="welT" style="padding-top: 10px;">采集照片信息</view> | <view class="welT" style="padding-top: 10px;">采集照片信息</view> | ||||
@@ -21,8 +22,13 @@ | |||||
v-if="uploadVisiable" | v-if="uploadVisiable" | ||||
ref="upload" | ref="upload" | ||||
:number="1" | :number="1" | ||||
:size="100" | |||||
type="image/jpeg,image/jpg" | |||||
:value.sync="photo" | :value.sync="photo" | ||||
/> | /> | ||||
<view class="passwordDes"> | |||||
<text>照片要求:1 . 单色背景,正面,免冠近期证件照 2 . 文件格式JPG 3 . 文件大小165320KB以下</text> | |||||
</view> | |||||
<view class="welLine"></view> | <view class="welLine"></view> | ||||
<view class="welT" style="padding-top: 10px;">自然信息</view> | <view class="welT" style="padding-top: 10px;">自然信息</view> | ||||
<view class="welLine"></view> | <view class="welLine"></view> | ||||
@@ -63,8 +69,8 @@ | |||||
<view class="welDel" @click="del('StuInfoFreshEmergePeopleEntities', i)"><text class="text-xxl cuIcon cuIcon-move"></text></view> | <view class="welDel" @click="del('StuInfoFreshEmergePeopleEntities', i)"><text class="text-xxl cuIcon cuIcon-move"></text></view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="welT" style="padding-top: 10px;">附件</view> | |||||
<uploadFile v-if="uploadVisiable" :number="10" :folderId="queryData.ID" :value="fileList"></uploadFile> | |||||
<!-- <view class="welT" style="padding-top: 10px;">附件上传</view> | |||||
<uploadFile v-if="uploadVisiable" :number="10" :folderId="queryData.ID" :value="fileList"></uploadFile> --> | |||||
<view class="btn" @click="submit">保存</view> | <view class="btn" @click="submit">保存</view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
@@ -81,7 +87,7 @@ export default { | |||||
data() { | data() { | ||||
return { | return { | ||||
photo:[], | photo:[], | ||||
fileList:[], | |||||
// fileList:[], | |||||
uploadVisiable:false, | uploadVisiable:false, | ||||
imgSrc: '', | imgSrc: '', | ||||
scheme: { | scheme: { | ||||
@@ -99,7 +105,8 @@ export default { | |||||
dataSource:{ | dataSource:{ | ||||
GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersex).map(t => ({ value: t.value, text: t.text })), | GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersex).map(t => ({ value: t.value, text: t.text })), | ||||
FamilyRelation: Object.values(this.GET_GLOBAL('dataDictionary').FamilyRelation).map(t => ({ value: t.value, text: t.text })), | FamilyRelation: Object.values(this.GET_GLOBAL('dataDictionary').FamilyRelation).map(t => ({ value: t.value, text: t.text })), | ||||
PartyFaceNo:[] | |||||
PartyFaceNo:[], | |||||
ResidenceNo:Object.values(this.GET_GLOBAL('dataDictionary').ResidenceNo).map(t => ({ value: t.value, text: t.text })), | |||||
}, | }, | ||||
StuInfoFreshFamilyEntities:{ | StuInfoFreshFamilyEntities:{ | ||||
Name: '', | Name: '', | ||||
@@ -128,7 +135,7 @@ export default { | |||||
}; | }; | ||||
}, | }, | ||||
methods: { | methods: { | ||||
init() { | |||||
async init() { | |||||
// console.log(this.API) | // console.log(this.API) | ||||
let _this = this; | let _this = this; | ||||
Promise.all([ | Promise.all([ | ||||
@@ -142,7 +149,7 @@ export default { | |||||
() => {} | () => {} | ||||
]); | ]); | ||||
_this.LOADING('加载数据…'); | _this.LOADING('加载数据…'); | ||||
_this.HTTP_GET('StuInfoFresh/stuInfoFreshEntity', _this.userInfo.account, '加载数据时出错').then(res => { | |||||
_this.HTTP_GET('StuInfoFresh/stuInfoFreshEntity', _this.userInfo.account, '加载数据时出错').then(async(res)=> { | |||||
this.HIDE_LOADING(); | this.HIDE_LOADING(); | ||||
_this.StuInfoFreshEntity = _this.COPY(res.StuInfoFreshEntity)||{}; | _this.StuInfoFreshEntity = _this.COPY(res.StuInfoFreshEntity)||{}; | ||||
_this.queryData.StuInfoFreshFamilyEntities = _this.COPY(res.StuInfoFreshFamilyList); | _this.queryData.StuInfoFreshFamilyEntities = _this.COPY(res.StuInfoFreshFamilyList); | ||||
@@ -150,8 +157,14 @@ export default { | |||||
_this.queryData.ID = res.StuInfoFreshEntity.ID; | _this.queryData.ID = res.StuInfoFreshEntity.ID; | ||||
_this.queryData.Photo = res.StuInfoFreshEntity.Photo; | _this.queryData.Photo = res.StuInfoFreshEntity.Photo; | ||||
_this.photo = res.StuInfoFreshEntity.Photo?[{url:res.StuInfoFreshEntity.Url,id:res.StuInfoFreshEntity.Photo}]:[]; | |||||
_this.fileList = res.StuInfoFreshEntity.FilesList||[] | |||||
let resFile = await this.FETCH_FILEINFO(res.StuInfoFreshEntity.Photo) | |||||
let url = "" | |||||
if(resFile.F_FolderId){ | |||||
url = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(resFile.F_FolderId, true) | |||||
} | |||||
// id:res.StuInfoFreshEntity.Photo | |||||
_this.photo = (res.StuInfoFreshEntity.Photo&&url)?[{url,id:res.StuInfoFreshEntity.Photo}]:[]; | |||||
// _this.fileList = res.StuInfoFreshEntity.FilesList||[] | |||||
_this.refreshComponent() | _this.refreshComponent() | ||||
_this.queryData.telephone = res.StuInfoFreshEntity.telephone; | _this.queryData.telephone = res.StuInfoFreshEntity.telephone; | ||||
_this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress; | _this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress; | ||||
@@ -160,6 +173,12 @@ export default { | |||||
}); | }); | ||||
}, | }, | ||||
async submit() { | async submit() { | ||||
let validateRes = this.validate() | |||||
if(validateRes.length>0){ | |||||
this.CONFIRM('表单验证失败', validateRes.join('\n')) | |||||
return | |||||
} | |||||
this.LOADING('正在提交数据…'); | this.LOADING('正在提交数据…'); | ||||
let res = await this.$refs["upload"].uploadImage() | let res = await this.$refs["upload"].uploadImage() | ||||
if(res&&res.length){ | if(res&&res.length){ | ||||
@@ -170,8 +189,11 @@ export default { | |||||
this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => { | this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => { | ||||
this.HIDE_LOADING(); | this.HIDE_LOADING(); | ||||
if (res) { | if (res) { | ||||
this.NAV_TO("/pages/my/newpassword") | |||||
this.TOAST('保存成功'); | |||||
// this.NAV_TO("/pages/my/newpassword") | |||||
setTimeout(()=>{ | |||||
this.TOAST('保存成功'); | |||||
},100) | |||||
this.NAV_BACK() | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
@@ -183,7 +205,24 @@ export default { | |||||
del(str, num) { | del(str, num) { | ||||
this.queryData[str].splice(num, 1) | this.queryData[str].splice(num, 1) | ||||
}, | }, | ||||
validate(){ | |||||
let array = [] | |||||
if(!this.photo.length)array.push("[采集照片信息]:不能为空") | |||||
// if(!this.queryData.RegionNo)array.push("[籍贯]:不能为空") | |||||
// if(!this.queryData.FamilyAddress)array.push("[家庭住址]:不能为空") | |||||
if(!this.queryData.telephone)array.push("[联系电话]:不能为空") | |||||
if(!this.queryData.StuInfoFreshFamilyEntities.length|| | |||||
!this.queryData.StuInfoFreshFamilyEntities.every((item)=>{ | |||||
return item.Name&&(item.Relation||item.Relation===0)&&(item.Sex||item.Sex===0)&&(item.Age||item.Age===0)&&(item.Politicy||item.Politicy===0) | |||||
}) | |||||
)array.push("[家庭成员]:未完善") | |||||
// if(!this.queryData.StuInfoFreshEmergePeopleEntities.length|| | |||||
// !this.queryData.StuInfoFreshEmergePeopleEntities.every((item)=>{ | |||||
// return item.Name&&(item.Relation||item.Relation===0)&&item.Telephone&&item.Mobile&&item.Address | |||||
// }) | |||||
// )array.push("[紧急联系人]:未完善") | |||||
return array | |||||
}, | |||||
refreshComponent(){ | refreshComponent(){ | ||||
// this.uploadVisiable = false | // this.uploadVisiable = false | ||||
this.$nextTick(()=>{ | this.$nextTick(()=>{ | ||||
@@ -331,6 +370,13 @@ export default { | |||||
line-height: 0; | line-height: 0; | ||||
} | } | ||||
.passwordDes{ | |||||
color: #606266; | |||||
font-size: 14px; | |||||
padding: 8px; | |||||
text-indent:2em; | |||||
} | |||||
#files { | #files { | ||||
opacity: 0; | opacity: 0; | ||||
-webkit-opacity: 0; | -webkit-opacity: 0; | ||||
@@ -183,23 +183,24 @@ export default { | |||||
if(!success){ | if(!success){ | ||||
return | return | ||||
} | } | ||||
var logininfo = { | |||||
account: this.username, | |||||
token: success.baseinfo.token, | |||||
date: moment().format('yyyy-MM-dd hh:mm:ss') | |||||
}; | |||||
// var logininfo = { | |||||
// account: this.username, | |||||
// token: success.baseinfo.token, | |||||
// date: moment().format('yyyy-MM-dd hh:mm:ss') | |||||
// }; | |||||
this.SET_STORAGE("token",success.baseinfo.token) | this.SET_STORAGE("token",success.baseinfo.token) | ||||
location.href = "http://" + window.location.host | |||||
// this.SET_STORAGE('logininfo', logininfo); | // this.SET_STORAGE('logininfo', logininfo); | ||||
// this.SET_STORAGE('userinfo', success); | // this.SET_STORAGE('userinfo', success); | ||||
this.username = "" | |||||
this.password = "" | |||||
if (success.pwd === true) { | |||||
this.SET_STORAGE('pwd', true); | |||||
this.TOAST("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); | |||||
} else { | |||||
this.SET_STORAGE('pwd', false); | |||||
} | |||||
location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; | |||||
// this.username = "" | |||||
// this.password = "" | |||||
// if (success.pwd === true) { | |||||
// this.SET_STORAGE('pwd', true); | |||||
// this.TOAST("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); | |||||
// } else { | |||||
// this.SET_STORAGE('pwd', false); | |||||
// } | |||||
// location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; | |||||
}) | }) | ||||
}, | }, | ||||