coding151617
This commit is contained in:
parent
ef8f161934
commit
29b39e7ec3
|
@ -32,6 +32,7 @@ const install = (Vue, vm) => {
|
|||
let getDickey = (params = {}) => vm.$u.get('/system/dict/', params); //查询字典
|
||||
let userList = (params = {}) => vm.$u.get('/system/user/', params); ///system/permission/codes/
|
||||
let deptList = (params = {}) => vm.$u.get('/system/dept/', params); //
|
||||
let passChange = (params = {})=>vm.$u.put('/system/user/password/', params);
|
||||
let permissions = (params = {}) => vm.$u.get('/system/permission/codes/', params); //获取全部权限标识
|
||||
|
||||
let hrmUserInfo = (params = {}) => vm.$u.get('/hrm/employee/info/', params); //用户信息
|
||||
|
@ -132,6 +133,7 @@ const install = (Vue, vm) => {
|
|||
bindSecret,
|
||||
loginSecret,
|
||||
apkCheck,
|
||||
passChange,
|
||||
|
||||
userList,
|
||||
deptList,
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "曲阳金隅EHS",
|
||||
"appid" : "__UNI__B00D419",
|
||||
"description" : "曲阳金隅EHS",
|
||||
"versionName" : "1.01.12",
|
||||
"versionCode" : 101012,
|
||||
"versionName" : "1.01.15",
|
||||
"versionCode" : 101015,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
@ -378,6 +378,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/passwordChange",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/visit/visitor",
|
||||
"style": {
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
<view v-for="item in ticketList" :key="item.id">
|
||||
<view class="itemTitle">{{item.title}}</view>
|
||||
<view class="itemCenter">
|
||||
<view class="info-details" v-if="item.ticket_data.name">工单名称:{{item.ticket_data.name}}</view>
|
||||
<view class="info-details">所属工作流:{{item.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{item.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{item.create_time}} </view>
|
||||
|
@ -82,6 +83,7 @@
|
|||
<view v-for="item in copyList" :key="item.id">
|
||||
<view class="itemTitle">{{item.title}}</view>
|
||||
<view class="itemCenter">
|
||||
<view class="info-details" v-if="item.ticket_data.name">工单名称:{{item.ticket_data.name}}</view>
|
||||
<view class="info-details">所属工作流:{{item.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{item.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{item.create_time}} </view>
|
||||
|
@ -203,6 +205,7 @@
|
|||
category: 'cc'
|
||||
};
|
||||
that.$u.api.getTickets(params).then(res => {
|
||||
that.copyCount = res.count;
|
||||
that.copyList = res.results.splice(0, 2);
|
||||
})
|
||||
},
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<u-tag text="访客" v-if="vuex_user.type === 'visitor'"/>
|
||||
</view>
|
||||
</view>
|
||||
<view>{{vuex_version}}</view>
|
||||
<view @click="checkVersion">{{vuex_version}}</view>
|
||||
<!-- <button type="default" class="modify-info" @click="goInto('myDataChange')">完善资料</button> -->
|
||||
</view>
|
||||
</view>
|
||||
|
@ -58,6 +58,12 @@
|
|||
<text class="title-text">我的人员库</text>
|
||||
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
|
||||
</view>
|
||||
<view class="enter-item" @click="goInto('password')">
|
||||
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
|
||||
mode=""></image>
|
||||
<text class="title-text">修改密码</text>
|
||||
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sign-out">
|
||||
<button type="default" @click="signoutFn" class="sign-out-btn">退出账号</button>
|
||||
|
@ -119,6 +125,11 @@
|
|||
url: '/pages/workSpace/rpj/remployee'
|
||||
})
|
||||
}
|
||||
else if (type == "password") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/passwordChange'
|
||||
})
|
||||
}
|
||||
},
|
||||
getUserInfo() {
|
||||
var promise;
|
||||
|
@ -200,6 +211,87 @@
|
|||
url:'/pages/login/login_?autoLoading=no'
|
||||
})
|
||||
})
|
||||
},
|
||||
checkVersion(){
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.$u.vuex('vuex_version', res.appVersion)
|
||||
// #ifdef APP-PLUS
|
||||
if (res.platform == 'android') {
|
||||
that.$u.vuex('vuex_version', res.appVersion)
|
||||
that.$u.api.apkCheck().then(res1 => {
|
||||
if (res.appVersion < res1.version) {
|
||||
uni.showModal({
|
||||
title: "发现新版本",
|
||||
content: "有新的版本发布, 请下载新版本",
|
||||
confirmText: '立即更新',
|
||||
success: (res2) => {
|
||||
if (res2.confirm) {
|
||||
if(res1.file.indexOf("http") == 0){
|
||||
// this.appdownLoad(res1.file);
|
||||
plus.runtime.openURL(res1.file)
|
||||
}else{
|
||||
// this.appdownLoad(that.vuex_host + res1.file);
|
||||
plus.runtime.openURL(that.vuex_host + res1.file)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: "版本检测",
|
||||
content: "当前版本("+res.appVersion+")已是最新版本",
|
||||
confirmText: '确定',
|
||||
success: (res2) => {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//执行下载app
|
||||
appdownLoad(url) {
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '安装包下载中……'
|
||||
})
|
||||
const downloadTask = uni.downloadFile({
|
||||
url: url, //服务器 app 的下载地址
|
||||
success: (downloadResult) => {
|
||||
uni.hideLoading();
|
||||
console.log(downloadResult)
|
||||
if (downloadResult.statusCode === 200) {
|
||||
uni.showModal({
|
||||
title: '',
|
||||
content: '下载成功,安装新版本',
|
||||
confirmText: '确定',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm == true) {
|
||||
plus.runtime.install( //安装
|
||||
downloadResult.tempFilePath, {
|
||||
force: true
|
||||
},
|
||||
function(res) {
|
||||
utils.showToast('更新成功,重启中');
|
||||
plus.runtime.restart();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<view class="my-data">
|
||||
<uni-nav-bar class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="修改密码"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="wrap-view" style="box-shadow: 0 0 15px 5px #eeeeee;padding-bottom: 20upx;">
|
||||
<view class="item">
|
||||
<view class="title">密码修改:</view>
|
||||
<view class="content"></view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="title"><text class="star">*</text>旧密码</view>
|
||||
<view class="content">
|
||||
<input class="passwordInput" v-model="formData.old_password" placeholder-style="color: #999999;"
|
||||
name="oldPassword" password placeholder="请输入旧密码" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="title"><text class="star">*</text>新密码</view>
|
||||
<view class="content">
|
||||
<input class="passwordInput" v-model="formData.new_password1" placeholder-style="color: #999999;"
|
||||
name="new_password1" password placeholder="请输入新密码" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="title"><text class="star">*</text>确认新密码</view>
|
||||
<view class="content">
|
||||
<input class="passwordInput" v-model="formData.new_password2" placeholder-style="color: #999999;"
|
||||
name="new_password2" password placeholder="请再次输入新密码" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="default" class="save-btn" @click="saveInfo">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nonNullCheck from '../../utils/nonNullCheck.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
old_password: '',
|
||||
new_password1: '',
|
||||
new_password2: '',
|
||||
},
|
||||
hasPhoto:false,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
/* 参数验证 */
|
||||
paramsCheck() {
|
||||
if (!nonNullCheck(this.formData.old_password)) {
|
||||
uni.showToast({
|
||||
title: '请填旧密码',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.new_password1)) {
|
||||
uni.showToast({
|
||||
title: '请填新密码',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.new_password2)) {
|
||||
uni.showToast({
|
||||
title: '请再次填新密码',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
saveInfo(){
|
||||
let that = this;
|
||||
if (!that.paramsCheck()) {
|
||||
return;
|
||||
} else {
|
||||
if(that.formData.new_password1===that.formData.new_password2){
|
||||
uni.showLoading({
|
||||
title: '保存中...',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.passChange(this.formData).then(res=>{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login_'
|
||||
})
|
||||
}).catch(e=>{
|
||||
uni.hideLoading()
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '两次填写的新密码不一致,请确认后再提交',
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
backLogin(){
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
>>>uni-image{
|
||||
height: 200upx;
|
||||
width: 200upx;
|
||||
}
|
||||
.my-data {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
}
|
||||
|
||||
.nav-bar>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.wrap-view {
|
||||
width: 720rpx;
|
||||
margin: 0 auto;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
line-height: 94rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.wrap-top{
|
||||
padding: 20upx 0;
|
||||
line-height: 60upx;
|
||||
}
|
||||
.item {
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.item_bottom_border{
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #212121;
|
||||
width: 180upx;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
color: #414141;
|
||||
|
||||
}
|
||||
|
||||
.content input {
|
||||
height: 100%;
|
||||
}
|
||||
.passwordInput{
|
||||
color: #2c6fd9;
|
||||
}
|
||||
.save-btn {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
background-color: #2c6fd9;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
color: #f3fbff;
|
||||
margin-top: 21rpx;
|
||||
}
|
||||
</style>
|
|
@ -215,7 +215,7 @@
|
|||
that.$u.api.rpjUpdate(that.rpj, that.formData).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
let params = `?rpj=${that.rpj}&rparty=${that.formData.rparty}`;
|
||||
let params = `?rpj=${that.rpj}&rparty=${that.formData.rparty}&rpjName=${that.formData.name}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/rpj/rpjFiles' + params
|
||||
})
|
||||
|
@ -225,7 +225,8 @@
|
|||
that.$u.api.rpjCreate(that.formData).then(res => {
|
||||
debugger;
|
||||
if (res.err_msg) {} else {
|
||||
let params = `?rpj=${res.id}&rparty=${that.formData.rparty}`;
|
||||
that.rpj = res.id;
|
||||
let params = `?rpj=${res.id}&rparty=${that.formData.rparty}&rpjName=${that.formData.name}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/rpj/rpjFiles' + params
|
||||
})
|
||||
|
|
|
@ -78,7 +78,8 @@
|
|||
uploadImgsList: [],
|
||||
fileList :[],
|
||||
rpj:'',
|
||||
rparty:''
|
||||
rparty:'',
|
||||
rpjName:''
|
||||
|
||||
}
|
||||
},
|
||||
|
@ -87,6 +88,7 @@
|
|||
if (params.rpj) {
|
||||
this.rpj = params.rpj;
|
||||
this.rparty = params.rparty;
|
||||
this.rpjName = params.rpjName;
|
||||
}
|
||||
this.showBtns = true;
|
||||
},
|
||||
|
@ -183,7 +185,7 @@
|
|||
|
||||
nextStep() {
|
||||
let that = this;
|
||||
let params = `?rpj=${that.rpj}&rparty=${that.rparty}`;
|
||||
let params = `?rpj=${that.rpj}&rparty=${that.rparty}&rpjName=${that.rpjName}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/rpj/rpjWorkers' + params
|
||||
})
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
this.rpj = params.rpj;
|
||||
this.formData.rpj = params.rpj;
|
||||
this.rparty = params.rparty;
|
||||
this.rpjName = params.rpjName;
|
||||
},
|
||||
onShow() {
|
||||
this.workerList = [];
|
||||
|
@ -229,7 +230,8 @@
|
|||
let ticket = {};
|
||||
ticket.workflow = that.initform.workflow;
|
||||
ticket.ticket_data = {
|
||||
rpj: that.rpj
|
||||
rpj: that.rpj,
|
||||
name:that.rpjName
|
||||
};
|
||||
ticket.transition = id;
|
||||
that.$u.api.ticketCreate(ticket).then((res) => {
|
||||
|
|
|
@ -192,7 +192,6 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.getUserRange();
|
||||
},
|
||||
methods: {
|
||||
showDcoordinatorPicker(){
|
||||
|
@ -237,13 +236,12 @@
|
|||
if (!that.paramsCheck()) {
|
||||
return;
|
||||
} else {
|
||||
// debugger;
|
||||
if (that.formData.id) {
|
||||
that.$u.api.visitUpdate(that.formData.id, that.formData).then(res => {
|
||||
if (res.err_msg) {
|
||||
|
||||
} else {
|
||||
let params = `?visit=${that.formData.id}`;
|
||||
let params = `?visit=${that.formData.id}&visitName=${that.formData.name}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/vpeopleList'+params
|
||||
})
|
||||
|
@ -253,7 +251,8 @@
|
|||
that.$u.api.visitCreate(that.formData).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
let params = `?visit=${res.id}`;
|
||||
that.visit = res.id;
|
||||
let params = `?visit=${res.id}&visitName=${that.formData.name}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/vpeopleList'+params
|
||||
})
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
name: "vpeopleList",
|
||||
data() {
|
||||
return {
|
||||
visitName:'',
|
||||
visitorCount:0,
|
||||
initform: {},
|
||||
vpeopleList: [],
|
||||
|
@ -52,6 +53,7 @@
|
|||
},
|
||||
onLoad(params) {
|
||||
this.visitId = params.visit;
|
||||
this.visitName = params.visitName;
|
||||
},
|
||||
onShow() {
|
||||
this.getVpeopleList();
|
||||
|
@ -116,7 +118,8 @@
|
|||
let ticket = {};
|
||||
ticket.workflow = this.initform.workflow;
|
||||
ticket.ticket_data = {
|
||||
visit: this.visitId
|
||||
visit: this.visitId,
|
||||
name: this.visitName
|
||||
};
|
||||
ticket.transition = id;
|
||||
this.$u.api.ticketCreate(ticket).then((res) => {
|
||||
|
|
Loading…
Reference in New Issue