details
206
App.vue
|
|
@ -5,6 +5,14 @@
|
|||
appid: 'wxf7d6140f507466be'
|
||||
},
|
||||
onLaunch() {
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
let client = plus.push.getClientInfo();
|
||||
let qyjyClientId = client.clientid;
|
||||
uni.setStorageSync('qyjyClientId', qyjyClientId)
|
||||
|
||||
console.log("设备唯一标识:",qyjyClientId)
|
||||
// #endif
|
||||
var that = this
|
||||
// 1.1.0版本之前关于http拦截器代码,已平滑移动到/common/http.interceptor.js中
|
||||
// 注意,需要在/main.js中实例化Vue之后引入如下(详见文档说明):
|
||||
|
|
@ -24,11 +32,11 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
this.$u.api.wxmplogin({
|
||||
that.$u.api.wxmplogin({
|
||||
code: loginRes.code
|
||||
}).then(res => {
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
this.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_token', res.access)
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
|
|
@ -37,7 +45,7 @@
|
|||
uni.reLaunch({
|
||||
url: "/pages/home/home"
|
||||
})
|
||||
this.$u.vuex('vuex_user', res)
|
||||
that.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
// this.$u.vuex('vuex_user.avatar', this.vuex_user.avatar +
|
||||
// '?token=' + this.vuex_token)
|
||||
|
|
@ -88,9 +96,19 @@
|
|||
success: function(res) {
|
||||
let secret = res.data
|
||||
if (secret) {
|
||||
uni.showToast({
|
||||
title: JSON.parse(secret).username,
|
||||
icon: "none"
|
||||
})
|
||||
that.$u.api.loginSecret(JSON.parse(secret)).then(res => {
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
let perms = [];
|
||||
for (let key in user.perms) {
|
||||
perms.push(key);
|
||||
}
|
||||
console.log(perms);
|
||||
that.$u.vuex('vuex_perm', perms)
|
||||
// 修改资源请求地址
|
||||
})
|
||||
uni.reLaunch({
|
||||
|
|
@ -104,7 +122,71 @@
|
|||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
|
||||
// 根据设备唯一标识进行自动登录
|
||||
uni.showToast({
|
||||
title: qyjyClientId,
|
||||
icon: "none"
|
||||
})
|
||||
/* that.$u.api.loginCOde(qyjyClientId).then(res => {
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}).catch(res=>{
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login_'
|
||||
})
|
||||
}) */
|
||||
// #endif
|
||||
|
||||
|
||||
|
||||
|
||||
uni.showLoading({
|
||||
title: '自动登录中...',
|
||||
mask: true
|
||||
})
|
||||
uni.getStorage({
|
||||
key: 'mySecret',
|
||||
success: function(res) {
|
||||
let secret = res.data
|
||||
if (secret) {
|
||||
|
||||
uni.showToast({
|
||||
title: JSON.parse(secret).username,
|
||||
icon: "none"
|
||||
})
|
||||
let a=JSON.parse(secret).username;
|
||||
console.log(a)
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
let perms = [];
|
||||
for (let key in user.perms) {
|
||||
perms.push(key);
|
||||
}
|
||||
console.log(perms);
|
||||
that.$u.vuex('vuex_perm', perms)
|
||||
if(res.type==='employee'||res.type==='remployee'){
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}
|
||||
// 修改资源请求地址
|
||||
})
|
||||
}
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -112,4 +194,120 @@
|
|||
<style lang="scss">
|
||||
@import "uview-ui/index.scss";
|
||||
@import "common/demo.scss";
|
||||
.star {
|
||||
color: red;
|
||||
}
|
||||
uni-page-body{
|
||||
min-height: 100%;
|
||||
}
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
background-color: #f3fbff;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal, normal;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.tabbar-title{
|
||||
background-color: #FFFFFF;
|
||||
height: 55px;
|
||||
display: flex;
|
||||
padding: 0 17px;
|
||||
box-sizing: border-box;
|
||||
font-size: 17px;
|
||||
line-height: 55px;
|
||||
color: #505050;
|
||||
}
|
||||
.tabbar-title {
|
||||
background-color: #FFFFFF;
|
||||
height: 100upx;
|
||||
display: flex;
|
||||
/* justify-content: space-between; */
|
||||
padding: 0 32upx;
|
||||
box-sizing: border-box;
|
||||
font-size: 32rpx;
|
||||
line-height: 100rpx;
|
||||
color: #505050;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
position: relative;
|
||||
margin-right: 40upx;
|
||||
}
|
||||
|
||||
.active.text-title::after {
|
||||
content: "";
|
||||
width: 46rpx;
|
||||
height: 4rpx;
|
||||
background-image: linear-gradient(90deg,
|
||||
#164cc3 0%,
|
||||
#2c6fd9 100%),
|
||||
linear-gradient(#085f56,
|
||||
#085f56);
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
border-radius: 2rpx;
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
|
||||
.search-body {
|
||||
width: 600upx;
|
||||
height: 78upx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39upx;
|
||||
padding: 13upx;
|
||||
padding-left: 25upx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.right-btn.allBtn {
|
||||
margin: 13rpx 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ const install = (Vue, vm) => {
|
|||
let getUserInfo = (params = {}) => vm.$u.get('/system/user/info/', params); //获取用户信息
|
||||
|
||||
let getCode = (data = {}) => vm.$u.post('/auth/sms_code/', data); //获取短信验证码
|
||||
let uploadFile = (data = {}) => vm.$u.post('/file/', data); //获取短信验证码
|
||||
|
||||
let codeLogin = (data = {}) => vm.$u.post('/auth/login_sms_code/', data); //短信验证码登录
|
||||
|
||||
|
|
@ -20,7 +21,6 @@ const install = (Vue, vm) => {
|
|||
let loginOut = () => vm.$u.post('/auth/logout/'); //账户密码退出
|
||||
let loginSecret = (data = {}) => vm.$u.post('/auth/login_secret/', data); //App密钥登录
|
||||
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||
|
||||
let wxmplogin = (data = {}) => vm.$u.post('auth/login_wxmp/', data); //微信登录
|
||||
|
||||
let bindmp = (data = {}) => vm.$u.post('/system/user/bind_wxmp/', data); //微信小程序绑定
|
||||
|
|
@ -29,20 +29,21 @@ const install = (Vue, vm) => {
|
|||
let bindSecret = (data = {}) => vm.$u.post('/system/user/bind_secret/', data); //App密钥绑定
|
||||
let apkCheck = ()=>vm.$u.get('/system/apk/'); //apk检查
|
||||
|
||||
|
||||
let getDickey = (params = {}) => vm.$u.get('/system/dict/', params); //查询字典
|
||||
let userList = (params = {}) => vm.$u.get('/system/user/', params); //
|
||||
let userList = (params = {}) => vm.$u.get('/system/user/', params); ///system/permission/codes/
|
||||
let deptList = (params = {}) => vm.$u.get('/system/dept/', params); //
|
||||
let permissions = (params = {}) => vm.$u.get('/system/permission/codes/', params); //获取全部权限标识
|
||||
|
||||
let userInfo = (params = {}) => vm.$u.get('/hrm/employee/info/', params); //用户信息
|
||||
let hrmUserInfo = (params = {}) => vm.$u.get('/hrm/employee/info/', params); //用户信息
|
||||
let hrmCertificate = (params = {}) => vm.$u.get('/hrm/certificate/', params); //用户证书
|
||||
let hrmUpdateInfo = (data = {}) => vm.$u.post('/hrm/employee/improve_info/', data); //作业新建
|
||||
|
||||
let getTickets = (params = {}) => vm.$u.get('/wf/ticket/', params); //工单查询/wf/ticket/{id}/
|
||||
let ticketCreate = (data = {}) => vm.$u.post('/wf/ticket/', data); //工单
|
||||
let getTicketItem = (id) => vm.$u.get(`/wf/ticket/${id}/`); //工单详情
|
||||
let getTicketTransitions = (id) => vm.$u.get(`/wf/ticket/${id}/transitions/`); //工单按钮查询
|
||||
let workflowInit = (key) => vm.$u.get(`/wf/workflow/${key}/init_key/`); //工单按钮查询
|
||||
|
||||
let ticketDutyAgg = (data = {}) => vm.$u.get(`/wf/ticket/duty_agg/`,data); //工单待办聚合
|
||||
|
||||
let addNode = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node/`, data); //加签
|
||||
let addNodeEnd = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node_end/`, data); //加签处理
|
||||
|
|
@ -60,13 +61,20 @@ const install = (Vue, vm) => {
|
|||
let oplCateItem = (id) => vm.$u.get(`/opm/opl_cate/${id}/`); //作业许可证类型详情
|
||||
let oplCreate = (data = {}) => vm.$u.post('/opm/opl/', data); //添加新许可证
|
||||
let oplUpdate = (id,data = {}) => vm.$u.put(`/opm/opl/${id}/`, data); //编辑许可证
|
||||
let oplWorker = (data = {}) => vm.$u.get('/opm/opl_worker/', data); //作业许可证类型
|
||||
let oplWorker = (data = {}) => vm.$u.get('/opm/opl_worker/', data); //作业许可证工作人员
|
||||
let oplWorkerCreate = (data = {}) => vm.$u.post('/opm/opl_worker/', data); //作业许可证类型
|
||||
let oplGasList = (data = {}) => vm.$u.get('/opm/gas_check/', data); //气体检测记录
|
||||
let oplGasCreate = (data = {}) => vm.$u.post('/opm/gas_check/', data); //作业许可证类型
|
||||
let oplMtartMtask = (id) => vm.$u.post(`/opm/opl/${id}/start_mtask/`); //作业开始监控
|
||||
let oplStopMtask = (id) => vm.$u.post(`/opm/opl/${id}/stop_mtask/`); //作业结束监控
|
||||
|
||||
let rpartyList = (data = {}) => vm.$u.get(`/rpm/rparty/`, data); //相关方列表
|
||||
let rpjFileList = (data = {}) => vm.$u.get(`/rpm/rpj_file/`, data); //相关方wenjian
|
||||
let rpjList = (data = {}) => vm.$u.get(`/rpm/rpj/`, data); //rpj查询
|
||||
let rpjItem = (id) => vm.$u.get(`/rpm/rpj/${id}`); //rpj查询
|
||||
let rpjItem = (id) => vm.$u.get(`/rpm/rpj/${id}/`); //rpj查询
|
||||
let rpjCreate = (data={}) => vm.$u.post(`/rpm/rpj/`,data); //rpj创建/rpm/rpj_member/
|
||||
let rpjUpdate = (id,data={}) => vm.$u.put(`/rpm/rpj/${id}/`,data); //rpj更新
|
||||
let rpjMembers = (data = {}) => vm.$u.get(`/rpm/rpj_member/`, data); //入场项目工作人员
|
||||
|
||||
let areaLists = (data = {}) => vm.$u.get('/am/area/', data); //作业区域
|
||||
|
||||
|
|
@ -75,15 +83,24 @@ const install = (Vue, vm) => {
|
|||
let visitCreate = (data = {}) => vm.$u.post(`/vm/visit/`, data); //新增来访项目
|
||||
let visitUpdate = (id, data = {}) => vm.$u.put(`/vm/visit/${id}/`, data); //编辑来访项目
|
||||
let vmVisitor = (data = {}) => vm.$u.get(`/vm/visitor/`, data); //来访人员列表
|
||||
let visitorCreate = (data = {}) => vm.$u.post(`vm/visitor/`, data); //来访人员添加
|
||||
let visitorUpdate = (data = {}) => vm.$u.put(`vm/visitor/${id}/`, data); //来访人员编辑
|
||||
let visitorRegister = (data = {}) => vm.$u.post(`/vm/visitor/register/`, data); //来访人员/司机注册
|
||||
let visitSubmit = (data = {}) => vm.$u.post(`/vm/visit/${id}/submit/`, data); //司机直接提交不走工单
|
||||
let visitorCreate = (data = {}) => vm.$u.post(`/vm/visitor/`, data); //来访人员添加
|
||||
let visitorUpdate = (data = {}) => vm.$u.put(`/vm/visitor/${id}/`, data); //来访人员编辑
|
||||
let vmVpeople = (data = {}) => vm.$u.get(`/vm/vpeople/`, data); //来访人员列表
|
||||
let vpeopleCreate = (data = {}) => vm.$u.post(`vm/vpeople/`, data); //来访人员添加
|
||||
let vpeopleUpdate = (data = {}) => vm.$u.put(`vm/vpeople/${id}/`, data); //来访人员编辑
|
||||
let vpeopleCreate = (data = {}) => vm.$u.post(`/vm/vpeople/`, data); //来访人员添加
|
||||
let vpeopleUpdate = (data = {}) => vm.$u.put(`/vm/vpeople/${id}/`, data); //来访人员编辑
|
||||
|
||||
let eventCateAgg = (data = {}) => vm.$u.post(`/ecm/event/cate_agg/`, data); //事件聚合统计
|
||||
let eventList = (data = {}) => vm.$u.get(`/ecm/event/`, data); //事件列表
|
||||
let eventtItem = (id) => vm.$u.get(`/ecm/event/${id}/`); //事件详情
|
||||
let eventtHandle = (id,data={}) => vm.$u.get(`/ecm/event/${id}/handle/`, data); //事件处理
|
||||
|
||||
let thirdBltBind = (data={}) => vm.$u.post(`/third/tdevice/blt_bind/`, data); //解绑卡
|
||||
|
||||
vm.$u.api = {
|
||||
userInfo,
|
||||
|
||||
getUserInfo ,
|
||||
uploadFile,
|
||||
getCode,
|
||||
codeLogin,
|
||||
login,
|
||||
|
|
@ -99,7 +116,7 @@ const install = (Vue, vm) => {
|
|||
deptList,
|
||||
ticketCreate,
|
||||
ticketAccept,
|
||||
getDickey,
|
||||
ticketDutyAgg,
|
||||
getTickets,
|
||||
getTicketItem,
|
||||
workflowInit,
|
||||
|
|
@ -109,15 +126,22 @@ const install = (Vue, vm) => {
|
|||
visitItem,
|
||||
visitCreate,
|
||||
visitUpdate,
|
||||
visitSubmit,
|
||||
vmVisitor,
|
||||
visitorCreate,
|
||||
visitorUpdate,
|
||||
visitorRegister,
|
||||
vmVpeople,
|
||||
vpeopleCreate,
|
||||
vpeopleUpdate,
|
||||
|
||||
rpartyList,
|
||||
rpjItem,
|
||||
rpjList,
|
||||
rpjCreate,
|
||||
rpjUpdate,
|
||||
rpjFileList,
|
||||
rpjMembers,
|
||||
|
||||
oplCateItem,
|
||||
operationItem,
|
||||
|
|
@ -133,10 +157,24 @@ const install = (Vue, vm) => {
|
|||
oplWorkerCreate,
|
||||
oplGasList,
|
||||
oplGasCreate,
|
||||
oplMtartMtask,
|
||||
oplStopMtask,
|
||||
|
||||
hrmUserInfo,
|
||||
hrmCertificate,
|
||||
hrmUpdateInfo,
|
||||
|
||||
areaLists
|
||||
areaLists,
|
||||
|
||||
eventList,
|
||||
eventtItem,
|
||||
eventCateAgg,
|
||||
eventtHandle,
|
||||
|
||||
getDickey,
|
||||
permissions,
|
||||
|
||||
thirdBltBind,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
<script>
|
||||
//映射vuex中控制loading显示隐藏的状态到此组件
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["loadingState"]),
|
||||
},
|
||||
watch: {
|
||||
// 监听vuex中的loadingState变化
|
||||
loadingState(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.open();
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
// console.log(newVal, oldVal, "监听到loadingState变化");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.show = true;
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
//显示加载框
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "曲阳金隅EHS",
|
||||
"appid" : "__UNI__B00D419",
|
||||
"description" : "曲阳金隅EHS",
|
||||
"versionName" : "1.00.01",
|
||||
"versionCode" : 10001,
|
||||
"versionName" : "1.00.07",
|
||||
"versionCode" : 10007,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
@ -16,7 +16,8 @@
|
|||
},
|
||||
"modules" : {
|
||||
"VideoPlayer" : {},
|
||||
"Push" : {}
|
||||
"Push" : {},
|
||||
"Speech" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
|
|
@ -60,7 +61,8 @@
|
|||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"UIBackgroundModes" : [ "audio" ],
|
||||
"dSYMs" : false
|
||||
"dSYMs" : false,
|
||||
"urlschemewhitelist" : "http://10.99.5.79:20309/"
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
|
|
@ -68,14 +70,38 @@
|
|||
"ifly" : {}
|
||||
},
|
||||
"ad" : {},
|
||||
"push" : {
|
||||
"unipush" : {
|
||||
"version" : "2",
|
||||
"offline" : false
|
||||
"push" : {}
|
||||
},
|
||||
"orientation" : [ "portrait-primary" ],
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/logo.png",
|
||||
"app@3x" : "unpackage/res/icons/logo.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/logo.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/logo.png",
|
||||
"settings@2x" : "unpackage/res/icons/logo.png",
|
||||
"settings@3x" : "unpackage/res/icons/logo.png",
|
||||
"notification@2x" : "unpackage/res/icons/logo.png",
|
||||
"notification@3x" : "unpackage/res/icons/logo.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"orientation" : [ "portrait-primary" ]
|
||||
"splashscreen" : {
|
||||
"androidStyle" : "default",
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/logo.png",
|
||||
"xhdpi" : "",
|
||||
"xxhdpi" : ""
|
||||
},
|
||||
"iosStyle" : "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
|
|
|
|||
89
pages.json
|
|
@ -45,6 +45,13 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/employeeSelect",
|
||||
"style": {
|
||||
"navigationBarTitleText": "曲阳金隅EHS",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/list/ticket",
|
||||
"style": {
|
||||
|
|
@ -60,7 +67,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/list/warning",
|
||||
"path": "pages/home/list/event",
|
||||
"style": {
|
||||
"navigationBarTitleText": "曲阳金隅EHS-实时报警",
|
||||
"navigationStyle": "custom",
|
||||
|
|
@ -75,6 +82,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/detail/eventHandle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "事件处理",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/detail/addNode",
|
||||
"style": {
|
||||
|
|
@ -114,6 +129,30 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/rpj/rpjDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "入厂项目详情",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/rpj/rpjFiles",
|
||||
"style": {
|
||||
"navigationBarTitleText": "安全审核项目",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/rpj/rpjWorkers",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人员选择",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/workSpace/newWork/userList",
|
||||
|
|
@ -131,6 +170,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/newWork/addViolation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增违章",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/operation/operationList",
|
||||
"style": {
|
||||
|
|
@ -147,6 +194,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/operation/operationDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "作业详情",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/operation/oplCate",
|
||||
"style": {
|
||||
|
|
@ -155,6 +210,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/operation/oplDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "许可证详情",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/operation/workerList",
|
||||
"style": {
|
||||
|
|
@ -187,6 +250,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/visit/visitDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "来访项目查看",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/opls/fire",
|
||||
"style": {
|
||||
|
|
@ -217,6 +288,22 @@
|
|||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/myInfoChange",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人信息完善",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/myCertificates",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的证书",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,305 @@
|
|||
<template>
|
||||
<view class="event-handle">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="报警处理"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
|
||||
<block>
|
||||
<view class="event-info">
|
||||
<view class="form-item">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">{{eventDetail.voice_msg}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">事件类型:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view v-for="cate in eventDetail.cates_">{{cate.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">事件对象:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view v-if="eventDetail.obj_cate==='opl'">作业</view>
|
||||
<view v-else-if="eventDetail.obj_cate==='people'">人员</view>
|
||||
<view v-else>其他</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">报警区域:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view v-if="eventDetail.area_">{{eventDetail.area_.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="eventDetail.obj_cate==='people'">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">触发人:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view v-if="eventDetail.employee_">{{eventDetail.employee_.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="eventDetail.obj_cate==='people'">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">触发人部门:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view v-if="eventDetail.employee_">{{eventDetail.employee_.belong_dept_.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="eventDetail.obj_cate==='opl'">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">触发事件:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view v-if="eventDetail.opl_nmae">{{eventDetail.operation_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">触发时间:</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<view>{{eventDetail.create_time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" v-if="eventDetail.global_img_f!==null&&eventDetail.global_img_f!==undefined">
|
||||
<view class="form-left form-left-img">
|
||||
<text class="form-left-text">事件截图:</text>
|
||||
</view>
|
||||
<view class="form-right" style="">
|
||||
<image class="form-img" :src="eventDetail.global_img_f"></image>
|
||||
<image class="form-img" v-if="eventDetail.face_img_f!==null&&eventDetail.face_img_f!==undefined" :src="eventDetail.face_img_f"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="event-info">
|
||||
<view class="form-item" style="height: 300rpx;">
|
||||
<view class="form-left-text">
|
||||
<text class="star">*</text>
|
||||
<text>处理描述</text>
|
||||
</view>
|
||||
<textarea class="apply-reason-text" v-model="form.handle_desc" maxlength="250" placeholder="请输入处理意见" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-left-text">
|
||||
<text class="star">*</text>
|
||||
<text>事件标记</text>
|
||||
</view>
|
||||
<radio-group @change="radioChange">
|
||||
<label class="radio">
|
||||
<radio value="10" />正常
|
||||
</label>
|
||||
<label class="radio">
|
||||
<radio value="20" />误报
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view class="btn" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
|
||||
<button class="mini-btn" size="mini" type="primary" @click="eventHandle">处理</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "eventHandle",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
handle_desc: '',
|
||||
mark: 10
|
||||
},
|
||||
eventId: null,
|
||||
eventDetail: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
startDate() {
|
||||
return this.getDate('start');
|
||||
},
|
||||
endDate() {
|
||||
return this.getDate('end');
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
debugger;
|
||||
console.log(params)
|
||||
this.eventId = params.eventId;
|
||||
// that.type = params.type;
|
||||
},
|
||||
onShow() {
|
||||
this.getEventItem();
|
||||
},
|
||||
methods: {
|
||||
//报警详情
|
||||
getEventItem() {
|
||||
this.$u.api.eventtItem(this.eventId).then((res) => {
|
||||
this.eventDetail = res;
|
||||
debugger;
|
||||
console.log(res)
|
||||
});
|
||||
},
|
||||
|
||||
eventHandle() {
|
||||
debugger;
|
||||
console.log(this.form)
|
||||
this.$u.api.eventtHandle(this.eventId, this.form).then(res => {
|
||||
if (res.err_msg) {} else {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 主体 */
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
.handleBtn {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.event-handle {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
}
|
||||
|
||||
|
||||
>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.event-info {
|
||||
width: 720rpx;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.star {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.top-title-text {
|
||||
padding-left: 24rpx;
|
||||
position: relative;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 34rpx;
|
||||
line-height: 72rpx;
|
||||
color: #383838;
|
||||
}
|
||||
|
||||
.top-title-text::before {
|
||||
content: "";
|
||||
width: 6rpx;
|
||||
height: 29rpx;
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%);
|
||||
border-radius: 3rpx;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -4rpx;
|
||||
top: 22rpx;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
min-height: 80upx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-left-img {
|
||||
height: 80upx;
|
||||
line-height: 80upx;
|
||||
}
|
||||
|
||||
.form-left-text {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.form-right {
|
||||
margin-left: 20rpx;
|
||||
flex: 1;
|
||||
color: #414141;
|
||||
}
|
||||
|
||||
.form-right input {
|
||||
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.form-right {
|
||||
flex: 1;
|
||||
color: #414141;
|
||||
}
|
||||
|
||||
.form-date>>>.uni-date__x-input {
|
||||
height: 97rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.form-date>>>.uni-icons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.event-handle>>>uni-input {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.apply-reason-text {
|
||||
width: 653rpx;
|
||||
height: 179rpx;
|
||||
background-color: #f6f8fc;
|
||||
border: solid 1rpx #e5e5e5;
|
||||
margin-top: 21rpx;
|
||||
padding: 14rpx 24rpx;
|
||||
font-size: 26rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.apply_require {
|
||||
margin-top: 0rpx !important;
|
||||
}
|
||||
|
||||
.form-img {
|
||||
width: 600upx;
|
||||
height: 300upx;
|
||||
}
|
||||
|
||||
/* radios */
|
||||
|
||||
uni-radio-group {
|
||||
margin-left: 30upx;
|
||||
}
|
||||
|
||||
.uni-label-pointer {
|
||||
width: 150upx;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="back">上一级</view>
|
||||
<view>{{nowRouter}}</view>
|
||||
<view class="deptWrap">
|
||||
<view v-for="item in subDept" :key="item.id" @click="toSub(item)">
|
||||
<image style="width: 50upx;height: 50upx;"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<view v-for="user in userList" :key="user.id">{{user.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var that;
|
||||
export default {
|
||||
name: "emplyeeIndex",
|
||||
data() {
|
||||
return {
|
||||
depRange: [],
|
||||
subDept:[],//部门
|
||||
userList:[],//用户
|
||||
nowRouter:''
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.getdept();
|
||||
},
|
||||
methods: {
|
||||
//获取dept
|
||||
getdept() {
|
||||
let that = this;
|
||||
that.$u.api.deptList({page: 0}).then(res => {
|
||||
that.subDept = that.depRange = that.redata(res);
|
||||
debugger;
|
||||
console.log(that.depRange);
|
||||
debugger;
|
||||
})
|
||||
},
|
||||
toSub(item){//部门id
|
||||
this.nowRouter = item.name;
|
||||
if(item.children){
|
||||
debugger;
|
||||
console.log(item)
|
||||
this.subDept = item.children;
|
||||
this.getUseList(item.id);
|
||||
}
|
||||
},
|
||||
//获取用户
|
||||
getUseList(id) {
|
||||
this.$u.api.userList({page: 0,belong_dept:id}).then(res => {
|
||||
debugger;
|
||||
this.userList = res
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
redata(postList) {
|
||||
let posts = [];
|
||||
postList.forEach((item) => {
|
||||
let obj = new Object();
|
||||
obj = {
|
||||
...item
|
||||
};
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
obj.parentId = item.parent;
|
||||
posts.push(obj);
|
||||
});
|
||||
let obj = posts.reduce((res, v) => ((res[v.id] = v), res), {}); //Object
|
||||
let arr = [];
|
||||
for (let item of posts) {
|
||||
if (item.parentId == null) {
|
||||
arr.push(item);
|
||||
continue;
|
||||
}
|
||||
let parent = obj[item.parentId];
|
||||
parent.children = parent.children ? parent.children : [];
|
||||
parent.children.push(item);
|
||||
}
|
||||
console.log(arr);
|
||||
return arr;
|
||||
},
|
||||
onnodeclick(e) {
|
||||
console.log(e);
|
||||
},
|
||||
onpopupopened(e) {
|
||||
console.log('popupopened');
|
||||
},
|
||||
onpopupclosed(e) {
|
||||
console.log('popupclosed');
|
||||
},
|
||||
onchange(e) {
|
||||
console.log('onchange:', e);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -7,35 +7,55 @@
|
|||
<view class="navigate-title">
|
||||
<view @click="goIntoTargetPage('daiban')"
|
||||
style="width: 25%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
|
||||
<text class="text">2</text>
|
||||
<view class="status" >待办工单
|
||||
</view>
|
||||
<text class="text">{{ticketCount}}</text>
|
||||
<view class="status">待办工单</view>
|
||||
</view>
|
||||
<view @click="goIntoTargetPage('warning')"
|
||||
style="width: 25%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
|
||||
<text class="text">1</text>
|
||||
<view class="status">
|
||||
实时报警
|
||||
</view>
|
||||
<text class="text">{{eventCount}}</text>
|
||||
<view class="status">事件提醒</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="daiban">
|
||||
<view class="daiban01">
|
||||
<view @click="goInto('daiban')" class="title">
|
||||
<view class="title">
|
||||
<view class="left-content">
|
||||
<view class="img-view">
|
||||
<image src="../../static/home/daiban.png" mode="" class="img"></image>
|
||||
</view>
|
||||
<text class="title-text-left">待审批</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" @click="goIntoTargetPage('daiban')">
|
||||
<text class="title-text-right">查看更多</text>
|
||||
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="daiban02">
|
||||
<view class="listWrap" v-if="ticketList.length>0">
|
||||
<view v-for="item in ticketList" :key="item.id">
|
||||
<view class="itemTitle">{{item.title}}</view>
|
||||
<view class="itemCenter">
|
||||
<view class="info-details">所属工作流:{{item.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{item.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{item.create_time}} </view>
|
||||
<view class="info-details">更新时间:{{item.update_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong bottom-btn" @click="ticketHandle(item,'handle')"
|
||||
v-if="(item.act_state===1||item.act_state===3)&&item.state_.type===0">
|
||||
<image src="../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
<view class="shenhejieshu bottom-btn" @click="ticketHandle(item,'show')">
|
||||
<image src="../../static/my/my_apply/tongguo.png" mode=""></image>
|
||||
查看
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listWrap" v-else>
|
||||
<view class="emptyList">暂无代办工单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tongzhi">
|
||||
|
|
@ -44,14 +64,34 @@
|
|||
<view class="img-view">
|
||||
<image src="../../static/home/tongzhi.png" mode="" class="img"></image>
|
||||
</view>
|
||||
<text class="title-text-left">实时报警</text>
|
||||
<text class="title-text-left">实时事件</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" @click="goIntoTargetPage('warning')">
|
||||
<text class="title-text-right">查看更多</text>
|
||||
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="listWrap" v-if="eventList.length>0">
|
||||
<view v-for="event in eventList" :key="event.id">
|
||||
<view class="itemTitle" v-if="event.cates_">事件类型:
|
||||
<text v-for="cate in event.cates_">{{cate.name}}</text>
|
||||
</view>
|
||||
<view class="itemCenter">
|
||||
<view class="info-details">触发时间:{{event.create_time}}</view>
|
||||
<view class="info-details">事件信息:{{event.voice_msg}}</view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong bottom-btn" @click="eventHandle(event)">
|
||||
<image src="../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listWrap" v-else>
|
||||
<view class="emptyList">今日暂无事件</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -62,36 +102,117 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
tzList: [],
|
||||
// top-obj,负责显示上面的那4个展示
|
||||
topObj: {},
|
||||
approvalObj1: null,
|
||||
approvalObj2: null,
|
||||
|
||||
cateAggForm: {
|
||||
start_create: '',
|
||||
is_handled: false,
|
||||
completed: true
|
||||
},
|
||||
limitedOperation:false,
|
||||
limitedRpj:false,
|
||||
limitedVisit:false,
|
||||
ticketList: [],
|
||||
eventList: [],
|
||||
eventCount: 0,
|
||||
ticketCount: 0,
|
||||
// 2022年2月18日
|
||||
mytopimg: require("@/static/home/bgimg-top.jpg"),
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
|
||||
},
|
||||
// #ifdef APP-PLUS
|
||||
this.showHeader = false;
|
||||
this.statusHeight = plus.device.uuid; //uniapp打包安卓调用设备唯一标识方法
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
|
||||
debugger;
|
||||
if(this.vuex_user.type==='visitor'){
|
||||
this.limitedVisit = true;
|
||||
}else{
|
||||
let date = new Date();
|
||||
this.cateAggForm.start_create = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
||||
this.getTicketAgg();
|
||||
this.getTicket();
|
||||
this.getEventAgg();
|
||||
this.getEvent();
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
getTicket() {
|
||||
let that = this;
|
||||
that.ticketList = []
|
||||
let params = {
|
||||
category: 'duty'
|
||||
};
|
||||
that.$u.api.getTickets(params).then(res => {
|
||||
that.ticketList = res.results.splice(0, 2);
|
||||
})
|
||||
},
|
||||
getEvent() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let years = date.getFullYear();
|
||||
let months = date.getMonth()+1;
|
||||
let days = date.getDate();
|
||||
that.eventList = []
|
||||
let params = {
|
||||
page: 1,
|
||||
start_create: years+'-'+months+'-'+days
|
||||
};
|
||||
that.$u.api.eventList(params).then(res => {
|
||||
let eventList = res.results.filter(item => {
|
||||
return item.handle_user === null;
|
||||
});
|
||||
that.eventList = eventList.splice(0, 2);
|
||||
// console.log(that.eventList[0].cates_.name)
|
||||
})
|
||||
},
|
||||
getTicketAgg() {
|
||||
this.$u.api.ticketDutyAgg().then(res => {
|
||||
if (res.err_msg) {} else {
|
||||
this.ticketCount = res.total_count;
|
||||
}
|
||||
})
|
||||
},
|
||||
getEventAgg() {
|
||||
this.$u.api.eventCateAgg(this.cateAggForm).then(res => {
|
||||
if (res.err_msg) {} else {
|
||||
this.eventCount = res.total_count;
|
||||
}
|
||||
})
|
||||
},
|
||||
goIntoTargetPage(type) {
|
||||
if (type == "daiban") {
|
||||
uni.navigateTo({
|
||||
url: "./list/ticket"
|
||||
})
|
||||
}
|
||||
if (type == "warning") {
|
||||
uni.navigateTo({
|
||||
url: "./list/warning"
|
||||
})
|
||||
debugger;
|
||||
if(this.limitedVisit==true){
|
||||
}else{
|
||||
if (type == "daiban") {
|
||||
uni.navigateTo({
|
||||
url: "./list/ticket"
|
||||
})
|
||||
}
|
||||
if (type == "warning") {
|
||||
uni.navigateTo({
|
||||
url: "./list/event"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
ticketHandle(val, type) {
|
||||
let projectId = val.ticket_data.visit ? val.ticket_data.visit : val.ticket_data.rpj ? val.ticket_data.rpj :
|
||||
val.ticket_data.opl; //项目、许可证Id visit
|
||||
let catetype = val.workflow_.key;
|
||||
const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&type=${type}`;
|
||||
uni.navigateTo({
|
||||
url: './detail/ticketHandle' + params,
|
||||
})
|
||||
},
|
||||
eventHandle(val){
|
||||
let params = `?eventId=${val.id}`;
|
||||
uni.navigateTo({
|
||||
url: './detail/eventHandle' + params,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -262,7 +383,7 @@
|
|||
line-clamp: 2;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break:break-all;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.tongzhi .bottom-content {
|
||||
|
|
@ -278,4 +399,60 @@
|
|||
.bottom-content .liulan {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.listWrap {
|
||||
padding: 20upx 50upx;
|
||||
}
|
||||
|
||||
.itemTitle {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30upx;
|
||||
line-height: 72upx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.itemCenter {
|
||||
padding-bottom: 10rpx;
|
||||
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 26upx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
/* btns */
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 60rpx;
|
||||
display: flex;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
flex: 1;
|
||||
/* border-right: 1upx solid #eeeeee; */
|
||||
}
|
||||
|
||||
/* .bottom-btns>.bottom-btn:last-child{
|
||||
border-right: none;
|
||||
} */
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhejieshu {
|
||||
color: #15a306;
|
||||
}
|
||||
|
||||
.bottom-btn image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,257 @@
|
|||
<template>
|
||||
<view class="event-wrap">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="实时报警" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="/static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="searchWord" placeholder="请输入关键字" />
|
||||
<view class="right-btn" @click="getSearch">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="event in eventList" :key="event.id">
|
||||
<view class="event-item">
|
||||
<view class="center-info">
|
||||
<view class="info-details">{{event.voice_msg}}</view>
|
||||
<view class="info-details">事件类型:
|
||||
<text v-for="cate in event.cates_">{{cate.name}}</text>
|
||||
</view>
|
||||
<view class="info-details">报警区域:{{event.area_.name}}</view>
|
||||
<view class="info-details" v-if="event.obj_cate==='people'&&event.employee_!=null">触发人:{{event.employee_.name}}</view>
|
||||
<view class="info-details" v-else-if="event.obj_cate==='opl'">触发事件:{{event.operation_name}}</view>
|
||||
<!-- <view class="info-details" v-if="event.obj_cate==='people'&&event.employee_!=null">触发人部门:{{event.employee_.belong_dept_.name}} </view> -->
|
||||
<view class="info-details">触发时间:{{event.create_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong bottom-btn" @click="eventHandle(event,'handle')">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'warning',
|
||||
data() {
|
||||
return {
|
||||
searchWord: '',
|
||||
eventStatus: "",
|
||||
pageSize: 10,
|
||||
page: 1,
|
||||
totalNum: 0,
|
||||
eventList: [],
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
this.page += 1;
|
||||
this.getEvent();
|
||||
/* const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
this.getEvent();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
icon: 'none'
|
||||
})
|
||||
} */
|
||||
},
|
||||
onShow() {
|
||||
this.page = 1;
|
||||
this.eventList = [];
|
||||
this.getEvent();
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.eventList = [];
|
||||
this.getEvent();
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
getEvent() {
|
||||
let that = this;
|
||||
let params = {page: this.page};
|
||||
that.$u.api.eventList(params).then(res => {
|
||||
that.eventList = res.results;
|
||||
console.log(that.eventList);
|
||||
debugger;
|
||||
if(res.results.length>0){}else{
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
eventHandle(val) {
|
||||
let params = `?eventId=${val.id}`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/eventHandle' + params,
|
||||
})
|
||||
},
|
||||
getSearch() {},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.empty-view {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
.event-wrap {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
||||
.event-wrap>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.event-item {
|
||||
width: 720rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right-time {
|
||||
font-size: 24rpx;
|
||||
line-height: 72rpx;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bottom-btn image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,49 +2,26 @@
|
|||
<view class="my_duty">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="我的代办" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" v-show="isHetongShow" type="text" v-model="params.search"
|
||||
placeholder="请输入合同编号" />
|
||||
<input class="search-input" v-show="!isHetongShow" type="text" v-model="params.search"
|
||||
placeholder="请输入项目代码" />
|
||||
<view class="right-btn" @click="searchHandle">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 主体 导航栏 -->
|
||||
<view class="tabbar-title">
|
||||
<view :class="{'text-title':true, 'active':isHetongShow}" @click="changeList('hetong')">我的代办</view>
|
||||
<view :class="{'text-title':true, 'active':!isHetongShow}" @click="changeList('xiangmu')">全部工单</view>
|
||||
<!-- <view class="right-pick" @click="showDrawer">
|
||||
<image class="right-img" src="../../static/project_manegment/shaixuan.png" mode=""></image>
|
||||
<text>筛选</text>
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="params.search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
<input class="search-input" type="text" v-model="params.search"
|
||||
placeholder="请输入关键字" />
|
||||
<view class="right-btn" @click="searchHandle">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-btn allBtn" @click="searchShowAll">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-view">
|
||||
<view></view>
|
||||
</view>
|
||||
-->
|
||||
<view class="content">
|
||||
<!-- 主体 导航栏 -->
|
||||
<view class="tabbar-title">
|
||||
<view :class="{'text-title':true, 'active':ticketTypye==='duty'}" @click="changeList('duty')">代办</view>
|
||||
<view :class="{'text-title':true, 'active':ticketTypye==='owner'}" @click="changeList('owner')">我的</view>
|
||||
<view :class="{'text-title':true, 'active':ticketTypye==='worked'}" @click="changeList('worked')">已处理</view>
|
||||
<view :class="{'text-title':true, 'active':ticketTypye==='cc'}" @click="changeList('cc')">抄送</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content" v-if="ticketList.length>0">
|
||||
<view class="item-wrap" v-for="(val,index) in ticketList" :key="val.id">
|
||||
<view class="duty-item">
|
||||
<view class="top-info">
|
||||
|
|
@ -57,11 +34,26 @@
|
|||
<view class="info-details">更新时间:{{val.update_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="ticketHandle(val,'handle')" v-if="(val.act_state===1||val.act_state===3)&&val.state_.type===0">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
<view class="shenhejieshu shenhe-status" @click="ticketHandle(val,'show')" v-else>
|
||||
<block v-if="ticketTypye === 'duty'">
|
||||
<view class="shenhezhong bottom-btn" @click="ticketHandle(val,'handle')"
|
||||
v-if="(val.act_state===1||val.act_state===3)&&val.state_.type===0">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="ticketTypye === 'owner'">
|
||||
<view class="shenhezhong bottom-btn" @click="ticketHandle(val,'handle')"
|
||||
v-if="vuex_user.id===val.create_by&&val.state_.type===1">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
关闭
|
||||
</view>
|
||||
<view class="shenhezhong bottom-btn" @click="ticketHandle(val,'handle')"
|
||||
v-if="vuex_user.id===scope.row.create_by&&val.state_.type!==1&&val.state_.enable_retreat">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
撤回
|
||||
</view>
|
||||
</block>
|
||||
<view class="shenhejieshu bottom-btn" @click="ticketHandle(val,'show')">
|
||||
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
|
||||
查看
|
||||
</view>
|
||||
|
|
@ -69,6 +61,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content" v-else>
|
||||
<view style="text-align: center;"> 暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -77,22 +72,23 @@
|
|||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
params:{
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
category:'duty'
|
||||
category: 'duty'
|
||||
},
|
||||
isHetongShow:false,
|
||||
userId:'',
|
||||
ticketTypye:'duty',
|
||||
totalNum: 0,
|
||||
ticketList: [],
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
this.getTicketLists();
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
@ -107,7 +103,7 @@
|
|||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getTicketLists();
|
||||
},
|
||||
|
|
@ -119,36 +115,56 @@
|
|||
this.totalNum = res.count;
|
||||
})
|
||||
},
|
||||
ticketHandle(val,type) {
|
||||
let projectId = val.ticket_data.visit?val.ticket_data.visit:val.ticket_data.rpj?val.ticket_data.rpj:val.ticket_data.opl;//项目、许可证Id visit
|
||||
ticketHandle(val, type) {
|
||||
let projectId = val.ticket_data.visit ? val.ticket_data.visit : val.ticket_data.rpj ? val.ticket_data.rpj :
|
||||
val.ticket_data.opl; //项目、许可证Id visit
|
||||
let catetype = val.workflow_.key;
|
||||
const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&type=${type}`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/ticketHandle' + params,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//接单
|
||||
ticketAccept(val) {
|
||||
let that = this;
|
||||
that.$u.api.ticketAccept(val.id).then(res => {
|
||||
that.getTicketLists();
|
||||
})
|
||||
},
|
||||
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getTicketLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.params.pageNum = 1;
|
||||
this.params.search = "";
|
||||
this.ticketList = [];
|
||||
this.getTicketLists();
|
||||
},
|
||||
searchShowAll(){
|
||||
debugger;
|
||||
uni.navigateTo({
|
||||
url: './ticketAll',
|
||||
})
|
||||
changeList(index) {
|
||||
// debugger;
|
||||
this.ticketTypye = index;
|
||||
this.ticketList = [];
|
||||
this.params.pageNum = 1;
|
||||
if (index === 'duty') {
|
||||
this.params.category = 'duty';
|
||||
} else if (index === 'owner') {
|
||||
this.params.category = 'owner';
|
||||
} else if (index === 'worked') {
|
||||
this.params.category = 'worked';
|
||||
} else if (index === 'cc') {
|
||||
this.params.category = 'cc';
|
||||
}
|
||||
this.getTicketLists();
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -159,10 +175,10 @@
|
|||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar ,
|
||||
.search-wrap{
|
||||
background-image: linear-gradient(254deg,
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar,
|
||||
.search-wrap {
|
||||
background-image: linear-gradient(270deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
|
|
@ -170,7 +186,7 @@
|
|||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
|
||||
.my_duty {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
|
@ -181,6 +197,7 @@
|
|||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
padding-top: 230upx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
|
|
@ -192,7 +209,7 @@
|
|||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
padding: 24rpx 21rpx 0 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
|
@ -226,129 +243,28 @@
|
|||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
flex: 1;
|
||||
border-right: 1upx solid #eeeeee;
|
||||
}
|
||||
.bottom-btns>.bottom-btn:last-child{
|
||||
border-right: none;
|
||||
}
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
|
||||
.shenhejieshu {
|
||||
color: #15a306;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
.bottom-btn image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,normal;
|
||||
padding-bottom: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 600upx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
.right-btn.allBtn{
|
||||
margin: 13rpx 0;
|
||||
}
|
||||
|
||||
|
||||
/* 主体-导航栏样式*/
|
||||
.tabbar-title {
|
||||
background-color: #FFFFFF;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
/* justify-content: space-between; */
|
||||
padding: 0rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 32rpx;
|
||||
line-height: 100rpx;
|
||||
color: #505050;
|
||||
}
|
||||
|
||||
.text-title {
|
||||
position: relative;
|
||||
margin-right: 40upx;
|
||||
}
|
||||
|
||||
.active.text-title::after {
|
||||
content: "";
|
||||
width: 46rpx;
|
||||
height: 4rpx;
|
||||
background-image: linear-gradient(90deg,
|
||||
#164cc3 0%,
|
||||
#2c6fd9 100%),
|
||||
linear-gradient(#085f56,
|
||||
#085f56);
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
border-radius: 2rpx;
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 32rpx;
|
||||
height: 31rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: 9rpx;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,369 +0,0 @@
|
|||
<template>
|
||||
<view class="my-apply">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="实时报警" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="/static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" v-show="isHetongShow" type="text" v-model="contractCode"
|
||||
placeholder="请输入合同编号" />
|
||||
<input class="search-input" v-show="!isHetongShow" type="text" v-model="incomeGeneratingProjectCode"
|
||||
placeholder="请输入项目代码" />
|
||||
<view class="right-btn" @click="search">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty-view"></view>
|
||||
|
||||
<view class="content">
|
||||
<view class="item-wrap" @click="intoUpdatePage(val)" v-for="(val,index) in applyList" :key="val.pkId">
|
||||
<view class="apply-item">
|
||||
<view class="top-info">
|
||||
<!-- <image class="left-img" src="../../../static/common/avatar.png" mode=""></image> -->
|
||||
<view class="info-title">{{val.itemName}}</view>
|
||||
<!-- <view class="right-time">
|
||||
2021.10.06
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="center-info">
|
||||
<view class="info-details">所属模块:{{val.menuName}}</view>
|
||||
<view class="info-details">申请人:{{val.applicantName}}</view>
|
||||
|
||||
<view class="info-details">所属部门:{{val.applicationDeptName}}</view>
|
||||
<view class="info-details" v-if="val.eventStatus != 4">提交时间:{{val.submissionTime}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view v-if="val.eventStatus == 3" class="shenhezhong shenhe-status">
|
||||
<image src="/static/profile/my_apply/blue-time.png" mode=""></image>
|
||||
审核中
|
||||
</view>
|
||||
<view v-if="val.eventStatus == 4" class="no-submit shenhe-status">
|
||||
<image class="" src="/static/profile/my_apply/orange-time.png" mode=""></image>
|
||||
未提交
|
||||
</view>
|
||||
<view v-if="val.eventStatus == 1" class="tongguo shenhe-status">
|
||||
<image class="" src="/static/profile/my_apply/tongguo.png" mode=""></image>
|
||||
审核通过
|
||||
</view>
|
||||
<view v-if="val.eventStatus == 2" class="zuofei shenhe-status">
|
||||
<image class="" src="/static/profile/my_apply/zuofei.png" mode=""></image>
|
||||
已作废
|
||||
|
||||
</view>
|
||||
<view v-if="val.eventStatus == 0" class="return shenhe-status">
|
||||
<image class="" src="/static/profile/my_apply/return.png" mode=""></image>
|
||||
已退回
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'warning',
|
||||
data() {
|
||||
return {
|
||||
itemName: "",
|
||||
moduleId: "",
|
||||
submissionTimeFrom: "",
|
||||
submissionTimeFromTo: "",
|
||||
eventStatus: "",
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
totalNum: 0,
|
||||
|
||||
applyList: [],
|
||||
obj: {
|
||||
eventStatus: '',
|
||||
moduleId: '',
|
||||
submissionTimeFrom: '',
|
||||
submissionTimeFromTo: ''
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
this._getMyApplyList(false);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this._getMyApplyList(true);
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this._getMyApplyList(true);
|
||||
},
|
||||
methods: {
|
||||
intoUpdatePage(val) {
|
||||
// this.$store.commit("clearAllData"); /* 清空选择人员时留存的数据 */
|
||||
const routeObj = routeArray.find(item => {
|
||||
return item.pcRoute == val.menuID;
|
||||
})
|
||||
if (routeObj !== undefined && routeObj !== null && routeObj !== "") {
|
||||
const params =
|
||||
`?pkId=${val.pkId}&itemId=${val.itemId}&execId=${val.execId}&eventStatus=${val.eventStatus}&detail=${true}`;
|
||||
uni.navigateTo({
|
||||
url: routeObj.appAdd + params,
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "路由异常, 无法跳转, 请检查correspondingRoute.js中是否配置"
|
||||
})
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
caseSearch(itemName) {
|
||||
|
||||
this.pageNum = 1;
|
||||
this.eventStatus = "";
|
||||
this.moduleId = "";
|
||||
this.submissionTimeFrom = '';
|
||||
this.submissionTimeFromTo = "";
|
||||
this.itemName = itemName;
|
||||
this._getMyApplyList(true);
|
||||
},
|
||||
quedingSearch(queryData) {
|
||||
this.pageNum = 1;
|
||||
this.itemName = "";
|
||||
this.obj = {
|
||||
eventStatus: queryData.eventStatus,
|
||||
moduleId: queryData.moduleId,
|
||||
submissionTimeFrom: queryData.submissionTimeFrom,
|
||||
submissionTimeFromTo: queryData.submissionTimeFromTo
|
||||
}
|
||||
this.eventStatus = queryData.eventStatus;
|
||||
this.moduleId = queryData.moduleId;
|
||||
this.submissionTimeFrom = queryData.submissionTimeFrom;
|
||||
this.submissionTimeFromTo = queryData.submissionTimeFromTo;
|
||||
this._getMyApplyList(true);
|
||||
},
|
||||
_getMyApplyList(flag) {
|
||||
const params = {
|
||||
myApplyApproval: {
|
||||
isMyApplyOrApproval: 0,
|
||||
moduleId: ""
|
||||
},
|
||||
queryRequest: {
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum,
|
||||
}
|
||||
}
|
||||
if (this.itemName) {
|
||||
params.myApplyApproval.itemName = this.itemName;
|
||||
}
|
||||
if (this.eventStatus) {
|
||||
params.myApplyApproval.eventStatus = this.eventStatus;
|
||||
}
|
||||
if (this.moduleId) {
|
||||
params.myApplyApproval.moduleId = this.moduleId;
|
||||
}
|
||||
if (this.submissionTimeFrom && this.submissionTimeFromTo) {
|
||||
params.myApplyApproval.submissionTimeFrom = this.submissionTimeFrom;
|
||||
params.myApplyApproval.submissionTimeFromTo = this.submissionTimeFromTo;
|
||||
}
|
||||
getMyApplyList(params).then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
const data = res.data.data.rows;
|
||||
this.totalNum = res.data.data.total;
|
||||
if (flag === true) {
|
||||
this.applyList = data;
|
||||
} else {
|
||||
this.applyList = this.applyList.concat(data);
|
||||
}
|
||||
} else {
|
||||
this.applyList = [];
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
this.applyList = [];
|
||||
uni.showToast({
|
||||
title: '网络异常, 请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.empty-view {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
.my-apply {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
||||
.my-apply>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.apply-item {
|
||||
width: 720rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right-time {
|
||||
font-size: 24rpx;
|
||||
line-height: 72rpx;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.no-submit {
|
||||
color: #f7870f;
|
||||
}
|
||||
|
||||
.tongguo {
|
||||
color: #15a306;
|
||||
}
|
||||
|
||||
.zuofei {
|
||||
color: #565656;
|
||||
}
|
||||
|
||||
.return {
|
||||
color: #e2053e;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -70,8 +70,18 @@
|
|||
<view class="Wxtitle">
|
||||
<view class="WxtitleIn">访客注册</view>
|
||||
</view>
|
||||
<view class="wx" @click="userRegister">
|
||||
<image src="/static/login/userRegister.png" mode=""></image>
|
||||
<view class="registerWrap">
|
||||
<view class="visitorReg" @click="userRegister('visitor')">
|
||||
<image src="/static/login/userRegister.png" mode=""></image>
|
||||
<text>访客</text>
|
||||
</view>
|
||||
<view class="driverRegWrap">
|
||||
<view class="driverReg" @click="userRegister('driver')">
|
||||
<image src="/static/login/driver.png" mode=""></image>
|
||||
</view>
|
||||
<text>司机</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -292,9 +302,10 @@
|
|||
this.isMessage = true;
|
||||
}
|
||||
},
|
||||
userRegister(){
|
||||
userRegister(type){
|
||||
let params = `?type=${type}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/userRegister'
|
||||
url: '/pages/login/userRegister'+params
|
||||
})
|
||||
},
|
||||
ranStr(e) {
|
||||
|
|
@ -312,32 +323,104 @@
|
|||
//返回随机组合字符串
|
||||
return n
|
||||
},
|
||||
//获取客户端ID
|
||||
getClientId() {
|
||||
//获取客户端ID和版本号
|
||||
var clientid = '';
|
||||
// #ifdef APP-PLUS
|
||||
// 苹果系统
|
||||
plus.device.getInfo({
|
||||
success: function(e) {
|
||||
clientid = e.uuid;
|
||||
uni.setStorageSync('clientid', clientid);
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
// 安卓系统
|
||||
plus.device.getAAID({
|
||||
success: function(e) {
|
||||
clientid = e.aaid;
|
||||
console.log(clientid);
|
||||
uni.setStorageSync('clientid', clientid);
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
//老版本、安卓模拟器
|
||||
if (clientid == '') {
|
||||
clientid = plus.device.uuid;
|
||||
uni.setStorageSync('clientid', clientid);
|
||||
}
|
||||
// #endif
|
||||
return clientid;
|
||||
},
|
||||
|
||||
formSubmit(e) {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
var that = this;
|
||||
const obj = e.target.value;
|
||||
if (!that.checkedParams(obj)) return;
|
||||
debugger;
|
||||
console.log(obj)
|
||||
that.$u.api.login(obj).then(res => {
|
||||
uni.hideLoading();
|
||||
that.$u.vuex('vuex_token', res.access)
|
||||
that.$u.vuex('vuex_refresh', res.refresh)
|
||||
// let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
// that.$u.api.bindmp(data).then(res=>{})
|
||||
that.$u.api.userInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
that.$u.api.getUserInfo().then(user => {
|
||||
that.$u.vuex('vuex_user', user)
|
||||
let perms = [];
|
||||
for (let key in user.perms) {
|
||||
perms.push(key);
|
||||
}
|
||||
console.log(perms);
|
||||
that.$u.vuex('vuex_perm', perms)
|
||||
})
|
||||
that.$u.api.hrmUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_employee', res)
|
||||
if(res.type==='employee'){
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}else{
|
||||
//非企业员工
|
||||
if(res.id_number==''||res.photo==''||res.id_number==null||res.photo==null){
|
||||
//信息不完善,进入信息完善页面
|
||||
uni.reLaunch({
|
||||
url: '/pages/my/myInfoChange'
|
||||
})
|
||||
}else{
|
||||
//信息完善
|
||||
if(res.type==='remployee'){
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// #ifdef APP-PLUS
|
||||
let secret = that.ranStr(12)
|
||||
let mySecret = {'username': obj.username, 'secret': secret}
|
||||
that.$u.api.bindSecret({secret: secret}).then(res=>{
|
||||
uni.setStorageSync('mySecret', JSON.stringify(mySecret))
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}).catch(e=>{})
|
||||
// #endif
|
||||
/* let secret = that.ranStr(12)
|
||||
let mySecret = {'username': obj.username, 'secret': secret}
|
||||
that.$u.api.bindSecret({secret: secret}).then(res=>{
|
||||
uni.setStorageSync('mySecret', JSON.stringify(mySecret))
|
||||
}).catch(e=>{}) */
|
||||
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
|
|
@ -395,10 +478,18 @@
|
|||
})
|
||||
}
|
||||
} else {
|
||||
// this.$u.toast('倒计时结束后再发送');
|
||||
this.$u.toast('请输入手机号');
|
||||
}
|
||||
},
|
||||
agreementFn(e){
|
||||
if(e == 1){
|
||||
that.content = that.userContent;
|
||||
that.agreement = true;
|
||||
}else if(e == 2){
|
||||
that.content = that.privacyContent;
|
||||
that.agreement = true;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -643,4 +734,32 @@
|
|||
padding-left: 12rpx;
|
||||
padding-right: 12rpx;
|
||||
}
|
||||
.registerWrap{
|
||||
display: flex;
|
||||
margin-top: 40upx;
|
||||
}
|
||||
.visitorReg{
|
||||
margin-right: 50upx;
|
||||
}
|
||||
.visitorReg,.driverRegWrap{
|
||||
display: flex;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.visitorReg>image{
|
||||
width: 90upx;
|
||||
height: 90upx;
|
||||
}
|
||||
.driverReg{
|
||||
width: 80upx;
|
||||
height: 80upx;
|
||||
border-radius: 40upx;
|
||||
background: #0075ff;
|
||||
margin-bottom: 8upx;
|
||||
}
|
||||
.driverReg>image{
|
||||
width: 46upx;
|
||||
height: 46upx;
|
||||
margin: 16upx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -4,24 +4,25 @@
|
|||
<image style="display: block;width: 100%;height: 100%;" :src="myTopBgSrc"></image>
|
||||
</view>
|
||||
<view class="handle-area">
|
||||
<view class="login-area" v-if="isPassword">
|
||||
<view class="login-area">
|
||||
<form style="display: block;" @submit="formSubmit">
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
|
||||
<image class="login-icon" src="../../static/login/avatar.png"></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="username" placeholder="请输入您的账号" />
|
||||
type="text" name="name" v-model="name" placeholder="请输入您的姓名" />
|
||||
</view>
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/password.png" mode=""></image>
|
||||
<image class="login-icon" src="../../static/login/avatar.png"></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="password" placeholder="请输入您的姓名" />
|
||||
type="number" name="phone" v-model="phone" placeholder="请输入您的手机号" />
|
||||
</view>
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
|
||||
<image class="login-icon" src="../../static/login/password.png"></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="number" name="username" placeholder="请输入您的手机号" />
|
||||
type="text" name="code" v-model="code" placeholder="请输入验证码" />
|
||||
<button class="getMessageCode" @click="getCode">{{codeTips}}</button>
|
||||
</view>
|
||||
|
||||
<!-- <u-verification-code seconds="30" ref="uCode" @change="codeChange"></u-verification-code> -->
|
||||
<view class="">
|
||||
<button type="default" form-type="submit" class="login-btn">注册</button>
|
||||
</view>
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
<view class="privacy">
|
||||
<view class="privacyIn">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox @change="checkboxChange" v-model="checkedShow"></u-checkbox>
|
||||
<u-checkbox v-model="checkedShow"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="privacyCon">
|
||||
我已阅读并同意《<text style="color: #2d8cff;" @click="agreementFn(1)">用户协议</text>》和《<text
|
||||
|
|
@ -50,188 +51,35 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
wxcode: null,
|
||||
agreement: false,
|
||||
checkedShow: true,
|
||||
key: "",
|
||||
img: "",
|
||||
username: '',
|
||||
password: '',
|
||||
phoneNumber: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
message: '',
|
||||
code: "",
|
||||
isShow: true,
|
||||
myTopBgSrc: require("../../static/login/my-bg.jpg"),
|
||||
content: '',
|
||||
userContent: '',
|
||||
privacyContent: '',
|
||||
wxShow: false,
|
||||
isPassword: true,
|
||||
isMessage: false,
|
||||
codeTips: "获取验证码",
|
||||
testUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf7d6140f507466be&redirect_uri=http%3A%2F%2Fqyjy.ctc-zc.com&response_type=code&scope=snsapi_base#wechat_redirect',
|
||||
|
||||
type:'',
|
||||
content:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
that = this;
|
||||
onLoad(params) {
|
||||
this.type = params.type;
|
||||
},
|
||||
methods: {
|
||||
checkboxChange(e) {
|
||||
uni.setStorageSync('privacyShow', e.value)
|
||||
},
|
||||
//第三方登录
|
||||
loginFn() {
|
||||
if (that.checkedShow == false) {
|
||||
uni.showToast({
|
||||
title: '请勾选用户协议和隐私政策',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return false;
|
||||
}
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success(res) {
|
||||
if (res.authResult.unionid) {
|
||||
appLogin(res.authResult.unionid).then(res1 => {
|
||||
console.log(res1)
|
||||
if (res1.statusCode == 200) {
|
||||
if (res1.data.massage == 1) {
|
||||
uni.navigateTo({
|
||||
url: 'BangWx?unionid=' + res.authResult.unionid
|
||||
})
|
||||
} else {
|
||||
uni.setStorageSync('my_token', res1.data.oAuth2AccessToken
|
||||
.access_token);
|
||||
that.updateCidFn(res1.data.userName);
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
duration: 2000,
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: "请求失败",
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登录失败请重新登录',
|
||||
duration: 2000,
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
mpLogin() {
|
||||
// #ifdef H5
|
||||
this.getWxCode()
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.showLoading({
|
||||
title: '微信登录中...',
|
||||
mask: true
|
||||
})
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
this.$u.api.wxmplogin({
|
||||
code: loginRes.code
|
||||
}).then(res => {
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
this.$u.api.getUserInfo().then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "none"
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: "/pages/home/home"
|
||||
})
|
||||
this.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
// this.$u.vuex('vuex_user.avatar', this.vuex_user.avatar +
|
||||
// '?token=' + this.vuex_token)
|
||||
})
|
||||
}).catch(e => {
|
||||
uni.setStorageSync('wxmp_openid', e.data.wxmp_openid)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "暂未绑定微信!",
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 获取code
|
||||
// 先判断url中有没有code,如果有code,表明已经授权,如果没有code,跳转微信授权链接
|
||||
getWxCode() {
|
||||
// 截取地址中的code,如果没有code就去微信授权,如果已经获取到code了就直接把code传给后台获取openId
|
||||
let code = this.getUrlCode('code')
|
||||
if (code === null || code === '') {
|
||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + this.vuex_appid +
|
||||
'&redirect_uri=' + encodeURIComponent(this.vuex_login) +
|
||||
'&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
|
||||
// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code,这里需要用encodeURIComponent对链接进行处理。
|
||||
// 如果配置参数一一对应,那么此时已经通过回调地址刷新页面后,你就会再地址栏中看到code了。
|
||||
// http://127.0.0.1/pages/views/profile/login/login?code=001BWV4J1lRzz00H4J1J1vRE4J1BWV4q&state=1
|
||||
} else {
|
||||
this.wxcode = code
|
||||
this.wxcodeLogin()
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
updateCidFn(username) {
|
||||
var data = {
|
||||
userCid: uni.getStorageSync('setcid'),
|
||||
username: username
|
||||
}
|
||||
updateCid(data).then(res => {
|
||||
console.log(res, 'zhiixngle ')
|
||||
if (res.statusCode == 200) {
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
duration: 2000,
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '../../index/index'
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
//检查form表单是否填写完整
|
||||
checkedParams(obj) {
|
||||
/*
|
||||
Azuma
|
||||
1234qwer
|
||||
*/
|
||||
if (obj.username == "" || obj.username == undefined || obj.username == null) {
|
||||
let that =this;
|
||||
if (obj.name == "" || obj.name == undefined || obj.name == null) {
|
||||
myShowToast('用户名不能为空');
|
||||
return false;
|
||||
};
|
||||
if (obj.password == "" || obj.password == undefined || obj.password == null) {
|
||||
myShowToast('密码不能为空');
|
||||
if (obj.phone == "" || obj.phone == undefined || obj.phone == null) {
|
||||
myShowToast('手机号不能为空');
|
||||
return false;
|
||||
};
|
||||
if (obj.code == "" || obj.code == undefined || obj.code == null) {
|
||||
myShowToast('验证码不能为空');
|
||||
return false;
|
||||
};
|
||||
if (that.checkedShow == false) {
|
||||
|
|
@ -247,55 +95,100 @@
|
|||
};
|
||||
return true;
|
||||
},
|
||||
changeLogType(index) {
|
||||
if (index === 'password') {
|
||||
this.isPassword = true;
|
||||
this.isMessage = false;
|
||||
} else {
|
||||
this.isPassword = false;
|
||||
this.isMessage = true;
|
||||
}
|
||||
},
|
||||
formSubmit(e) {
|
||||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
var that = this;
|
||||
const obj = e.target.value;
|
||||
let obj = e.target.value;
|
||||
obj.type= that.type;
|
||||
if (!that.checkedParams(obj)) return;
|
||||
debugger;
|
||||
console.log(obj)
|
||||
that.$u.api.login(obj).then(res => {
|
||||
that.$u.api.visitorRegister(obj).then(res => {
|
||||
uni.hideLoading();
|
||||
that.$u.vuex('vuex_token', res.access)
|
||||
that.$u.vuex('vuex_refresh', res.refresh)
|
||||
// let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
// that.$u.api.bindmp(data).then(res=>{})
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
that.$u.api.getUserInfo().then(user => {
|
||||
that.$u.vuex('vuex_user', user)
|
||||
let perms = [];
|
||||
for (let key in user.perms) {
|
||||
perms.push(key);
|
||||
}
|
||||
console.log(perms);
|
||||
that.$u.vuex('vuex_perm', perms)
|
||||
})
|
||||
// #ifdef APP-PLUS
|
||||
let secret = that.ranStr(12)
|
||||
let mySecret = {'username': obj.username, 'secret': secret}
|
||||
that.$u.api.bindSecret({secret: secret}).then(res=>{
|
||||
uni.setStorageSync('mySecret', JSON.stringify(mySecret))
|
||||
}).catch(e=>{})
|
||||
// #endif
|
||||
if(res.type==='employee'){
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}else{
|
||||
//非企业员工
|
||||
if(res.id_number==''||res.photo==''||res.id_number==null||res.photo==null){
|
||||
//信息不完善,进入信息完善页面
|
||||
uni.reLaunch({
|
||||
url: '/pages/my/myInfoChange'
|
||||
})
|
||||
}else{
|
||||
//信息完善
|
||||
if(res.type==='remployee'){
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home_'
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
uni.showToast({
|
||||
title: '账户密码错误',
|
||||
title: e.err_msg,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
ranStr(e) {
|
||||
//形参e,需要产生随机字符串的长度
|
||||
//如果没有传参,默认生成32位长度随机字符串
|
||||
e = e || 32;
|
||||
//模拟随机字符串库
|
||||
var t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",
|
||||
a = t.length,//字符串t的长度,随机数生成最大值
|
||||
n = "";
|
||||
for (let i = 0; i < e; i++) {
|
||||
//随机生成长度为e的随机字符串拼接
|
||||
n += t.charAt(Math.floor(Math.random() * a));
|
||||
}
|
||||
//返回随机组合字符串
|
||||
return n
|
||||
},
|
||||
|
||||
codeChange(text) {
|
||||
this.codeTips = text;
|
||||
},
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
getCode(e) {
|
||||
debugger;
|
||||
if (this.phoneNumber !== '') {
|
||||
console.log(this.phone);
|
||||
if (this.phone !== '') {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.getCode({
|
||||
phone: 16619852123
|
||||
phone: this.phone
|
||||
}).then(res => {
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<u-tag text="访客" v-if="vuex_user.type === 'visitor'"/>
|
||||
</view>
|
||||
</view>
|
||||
<button type="default" class="modify-info" @click="goInto('myData')">完善资料</button>
|
||||
<!-- <button type="default" class="modify-info" @click="goInto('myDataChange')">完善资料</button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="enter-list">
|
||||
|
|
@ -66,14 +66,13 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo();
|
||||
// this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
|
||||
goInto(type) {
|
||||
if (type == "certificate") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/my_apply/my_apply'
|
||||
url: '/pages/my/myCertificates'
|
||||
})
|
||||
}
|
||||
if (type == "myData") {
|
||||
|
|
@ -81,12 +80,17 @@
|
|||
url: '/pages/my/myInfo'
|
||||
})
|
||||
}
|
||||
if (type == "myDataChange") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/myInfoChange'
|
||||
})
|
||||
}
|
||||
},
|
||||
getUserInfo() {
|
||||
var promise;
|
||||
var that = this;
|
||||
promise = new Promise(function(resolve, reject) {
|
||||
authUser().then(res => {
|
||||
that.$u.api.authUser().then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
const principal = res.data.principal;
|
||||
that.username = principal.realname;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<view class="list-body">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="400rpx" leftText="我的证书"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="oplCate-info" v-if="certificates.length>0">
|
||||
<view class="uni-list-cell uni-list-cell-pd" v-for="row in certificates" :key="row.id" @click="download(row.file_f)">
|
||||
<view>
|
||||
<view class="name">{{row.name}}</view>
|
||||
</view>
|
||||
<image class="oplAddImg" :src="require('@/static/common/downIcon.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center;padding-top: 200upx;">暂无证书</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "myCertificates",
|
||||
data() {
|
||||
return {
|
||||
certificates: [],
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
debugger;
|
||||
console.log(this.vuex_perm)
|
||||
this.certificates = [];
|
||||
this.getCertificates();
|
||||
},
|
||||
methods: {
|
||||
getCertificates(e) {
|
||||
let that = this;
|
||||
that.certificates =[];
|
||||
that.$u.api.hrmCertificate({page: 0,employee__user:this.vuex_user.id})
|
||||
.then((res) => {
|
||||
that.certificates = res
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
//下载文件
|
||||
download(urls) {
|
||||
let that = this
|
||||
uni.downloadFile({
|
||||
url: urls, //下载地址,后端接口获取的链接
|
||||
success: (data) => {
|
||||
console.log(data.tempFilePath)
|
||||
console.log(JSON.stringify(data))
|
||||
if (data.statusCode === 200) {
|
||||
uni.saveFile({ //文件保存到本地
|
||||
tempFilePath: data.tempFilePath, //临时路径
|
||||
success: function(res) {
|
||||
console.log(JSON.stringify(res))
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
title: '文件已保存!',
|
||||
duration: 3000,
|
||||
});
|
||||
uni.openDocument({
|
||||
fileType: 'docx',
|
||||
filePath: res.savedFilePath,
|
||||
success: function(res) {
|
||||
console.log('打开文档成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
title: '失败请重新下载',
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
.list-body {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 113px;
|
||||
height: 100%;
|
||||
min-height:100vh;
|
||||
}
|
||||
|
||||
.oplCate-info {
|
||||
width: 360px;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
padding: 12px 16px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.oplCate-info-title {
|
||||
font-size: 32upx;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
height: 70upx;
|
||||
}
|
||||
|
||||
.row {
|
||||
padding: 10upx;
|
||||
margin-bottom: 20upx;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.uni-list-cell {
|
||||
display: flex;
|
||||
padding: 10upx;
|
||||
padding: 30upx 0;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.uni-list-cell:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.oplEditImg {
|
||||
width: 40rpx;
|
||||
height: 40upx;
|
||||
background-size: cover;
|
||||
background-image: url('@/static/workSpace/new_apply/update.png');
|
||||
}
|
||||
.oplAddImg {
|
||||
width: 40rpx;
|
||||
height: 40upx;
|
||||
}
|
||||
|
||||
.add {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 120upx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: auto;
|
||||
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
height: 80rpx;
|
||||
color: #fff;
|
||||
font-size: 30upx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,40 +2,51 @@
|
|||
<view class="my-data">
|
||||
<uni-nav-bar @clickLeft="goBack()" 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">
|
||||
<view class="item item_bottom_border">
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item">
|
||||
<view class="title">姓名</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.name}}</text>
|
||||
<!-- <input type="text" v-model="principal.mobile" maxlength="20" placeholder="请输入" /> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="item">
|
||||
<view class="title">编号</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="item">
|
||||
<view class="title">身份证号</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.id_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="item">
|
||||
<view class="title">手机号</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.phone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">邮箱</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.email}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">学历</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.qualification}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="item">
|
||||
<view class="title">性别</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.gender}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="item">
|
||||
<view class="title">岗位</view>
|
||||
<view class="content">
|
||||
<text>{{userInfo.post_name}}</text>
|
||||
|
|
@ -47,35 +58,13 @@
|
|||
<text>{{userInfo.belong_dept_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<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">手机号</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="userInfo.phone" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="title">邮箱</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="userInfo.email" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" style="height: fit-content;">
|
||||
<view class="title">证件照</view>
|
||||
<view style="flex: 3;">
|
||||
<uni-file-picker v-model="userInfo.mobile" file-mediatype="image" mode="grid" file-extname="png,jpg"
|
||||
:limit="5" ref="files" :auto-upload="false" @select="select" />
|
||||
<view class="content">
|
||||
<image :src="userInfo.photo_f"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button type="default" class="save-btn">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -83,7 +72,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
|
@ -91,7 +80,7 @@
|
|||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
this.$u.api.userInfo().then(res => {
|
||||
this.$u.api.hrmUserInfo().then(res => {
|
||||
this.userInfo = res;
|
||||
})
|
||||
},
|
||||
|
|
@ -100,15 +89,6 @@
|
|||
delta: 1
|
||||
})
|
||||
},
|
||||
genderChange(e) {
|
||||
const idx = e.detail.value;
|
||||
this.selectedGender = this.genderRange[idx].name;
|
||||
},
|
||||
deptChange(e) {
|
||||
const idx = e.detail.value;
|
||||
this.deptGender = this.deptRange[idx].name;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -124,7 +104,10 @@
|
|||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
>>>uni-image{
|
||||
height: 200upx;
|
||||
width: 200upx;
|
||||
}
|
||||
.my-data {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
|
|
@ -143,7 +126,10 @@
|
|||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.wrap-top{
|
||||
padding: 20upx 0;
|
||||
line-height: 60upx;
|
||||
}
|
||||
.item {
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
|
|
@ -164,19 +150,4 @@
|
|||
color: #414141;
|
||||
|
||||
}
|
||||
|
||||
.content input {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
background-color: #2c6fd9;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
color: #f3fbff;
|
||||
margin-top: 21rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,203 @@
|
|||
<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">手机号</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="userInfo.phone" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border">
|
||||
<view class="title">身份证号</view>
|
||||
<view class="content">
|
||||
<input type="text" v-model="userInfo.id_number" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border" style="height: fit-content;" v-if="!hasPhoto">
|
||||
<view class="title">证件照</view>
|
||||
<view style="flex: 3;">
|
||||
<u-upload action="http://10.99.5.79:20309/api/file/" :header="header" ref="uUpload"
|
||||
:file-list="fileList" max-count="1" @on-success="imgUpSuccess" ></u-upload>
|
||||
</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 {
|
||||
userInfo: {},
|
||||
fileList:[],
|
||||
fileListS:[],
|
||||
hasPhoto:false,
|
||||
head: {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getHeader();
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
getUserInfo() {
|
||||
let that = this;
|
||||
that.$u.api.hrmUserInfo().then(res => {
|
||||
that.userInfo = res;
|
||||
if(res.photo===null){
|
||||
that.hasPhoto = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
genderChange(e) {
|
||||
const idx = e.detail.value;
|
||||
this.selectedGender = this.genderRange[idx].name;
|
||||
},
|
||||
deptChange(e) {
|
||||
const idx = e.detail.value;
|
||||
this.deptGender = this.deptRange[idx].name;
|
||||
},
|
||||
imgUpSuccess(data){
|
||||
debugger;
|
||||
console.log(data)
|
||||
this.userInfo.photo =data.path;
|
||||
},
|
||||
imgUpSuccessS(data){
|
||||
this.userInfo.signature =data.path;
|
||||
},
|
||||
/* 参数验证 */
|
||||
paramsCheck() {
|
||||
if (!nonNullCheck(this.userInfo.phone)) {
|
||||
uni.showToast({
|
||||
title: '请填写手机号码',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.userInfo.id_number)) {
|
||||
uni.showToast({
|
||||
title: '请填写身份证号',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.userInfo.photo)) {
|
||||
uni.showToast({
|
||||
title: '请选择证件照',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
saveInfo(){
|
||||
let that = this;
|
||||
if (!that.paramsCheck()) {
|
||||
return;
|
||||
} else {
|
||||
this.$u.api.hrmUpdateInfo(this.userInfo).then(res=>{
|
||||
debugger;
|
||||
console.log(res)
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/my'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</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;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 3;
|
||||
color: #414141;
|
||||
|
||||
}
|
||||
|
||||
.content input {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
background-color: #2c6fd9;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 80rpx;
|
||||
color: #f3fbff;
|
||||
margin-top: 21rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,804 @@
|
|||
<template>
|
||||
<view class="qingjia-apply">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="新增违章"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="apply-info">
|
||||
<view class="form-content ">
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">发生时间</text>
|
||||
</view>
|
||||
<view class="form-right form-date">
|
||||
<uni-datetime-picker v-model="formData.time" :border="false" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">人员类型</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.type" :localdata="personnelRange" @change="purposeChange">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">所在区域</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.area" :localdata="areaRange">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">当事人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<input type="text" v-model="formData.user" maxlength="50" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">所在部门</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
|
||||
v-model="formData.dept" >
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">具体地点</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<input type="text" v-model="formData.place" maxlength="50" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-content ">
|
||||
|
||||
<view class="form-item border-bottom" style="height: 300rpx;" v-if="formData.purpose!==50">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">违规详述</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<textarea class="apply-reason-text" v-model="formData.description" maxlength="250"
|
||||
placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item_bottom_border" style="height: fit-content;" >
|
||||
<view class="title">照片</view>
|
||||
<view style="flex: 3;">
|
||||
<u-upload action="http://10.99.5.79:20309/api/file/" :header="header" ref="uUpload"
|
||||
:file-list="fileList" max-count="1" @on-success="imgUpSuccess" ></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" v-if="showBtns">
|
||||
<button type="primary" class="save-btn" @click="handleClick">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import nonNullCheck from '../../../utils/nonNullCheck.js';
|
||||
export default {
|
||||
name: "visit",
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
time: '', //来访概述
|
||||
type: 'employee', //来访事由
|
||||
area: '', //接待人
|
||||
user: '', //来访时间
|
||||
dept: '', //离开时间
|
||||
description: '', //来访详述
|
||||
place: '', //来访单位
|
||||
},
|
||||
head: {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
},
|
||||
fileList:[],
|
||||
publishRangeCon: '',
|
||||
menuId: "",
|
||||
itemId: "",
|
||||
detail: false,
|
||||
showBtns:false,
|
||||
visitItem: {},
|
||||
type: '',
|
||||
visitId: '',
|
||||
personnelRange:[
|
||||
{text:"公司员工",value:'employee'},
|
||||
{text:"访客",value:'visitor'},
|
||||
{text:"相关方",value:'remployee'},
|
||||
{text:"司机",value:'driver'},
|
||||
],
|
||||
depRange: [],
|
||||
areaRange: [],
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
if (params.visit) {
|
||||
this.visitId = params.visit;
|
||||
this.type = params.type;
|
||||
this.getVisitItem();
|
||||
if(this.type === 'show'){
|
||||
this.showBtns = false;
|
||||
}else{
|
||||
this.showBtns = true;
|
||||
}
|
||||
} else {
|
||||
this.showBtns = true;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getHeader();
|
||||
this.getDate();
|
||||
this.getdept();
|
||||
this.getAreaRange();
|
||||
},
|
||||
methods: {
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
//获取dept
|
||||
getdept() {
|
||||
let that = this;
|
||||
that.$u.api.deptList({page: 0}).then(res => {
|
||||
that.depRange = that.redata(res);
|
||||
|
||||
console.log(that.depRange)
|
||||
})
|
||||
},
|
||||
//获取作业区域
|
||||
getAreaRange() {
|
||||
this.$u.api.areaLists({page: 0}).then(res => {
|
||||
let range = [];
|
||||
let obj = {};
|
||||
res.forEach(item => {
|
||||
obj = {value: null,text: ''};
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
range.push(obj);
|
||||
})
|
||||
this.areaRange = range
|
||||
})
|
||||
},
|
||||
getVisitItem() {
|
||||
this.$u.api.visitItem(this.visitId).then(res => {
|
||||
this.formData = res;
|
||||
})
|
||||
},
|
||||
getDate() {
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
let hours = date.getHours();
|
||||
let minutes = date.getMinutes();
|
||||
let seconds = date.getSeconds();
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
this.formData.time=year+'-'+month+'-'+day+' '+hours+':'+minutes+':'+seconds;
|
||||
},
|
||||
redata(postList) {
|
||||
let posts = [];
|
||||
postList.forEach((item) => {
|
||||
let obj = new Object();
|
||||
obj = {
|
||||
...item
|
||||
};
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
obj.parentId = item.parent;
|
||||
posts.push(obj);
|
||||
});
|
||||
let obj = posts.reduce((res, v) => ((res[v.id] = v), res), {}); //Object
|
||||
let arr = [];
|
||||
for (let item of posts) {
|
||||
if (item.parentId == null) {
|
||||
arr.push(item);
|
||||
continue;
|
||||
}
|
||||
let parent = obj[item.parentId];
|
||||
parent.children = parent.children ? parent.children : [];
|
||||
parent.children.push(item);
|
||||
}
|
||||
console.log(arr);
|
||||
return arr;
|
||||
},
|
||||
bindStartDateChange: function(e) {
|
||||
this.formData.start_time = e.detail.value
|
||||
},
|
||||
bindEndDateChange: function(e) {
|
||||
this.formData.end_time = e.detail.value
|
||||
},
|
||||
nextHandle(type) {
|
||||
let that = this;
|
||||
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}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/vpeopleList'+params
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$u.api.visitCreate(that.formData).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
let params = `?visit=${res.id}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/vpeopleList'+params
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
purposeChange(item){
|
||||
let that = this;
|
||||
debugger;
|
||||
console.log(item)
|
||||
|
||||
if(item===50){
|
||||
that.formData.receptionist = '';
|
||||
that.formData.company = '';
|
||||
that.formData.description = '';
|
||||
that.formData.name = '货车司机出入';
|
||||
that.formData.level = 10;
|
||||
}else{
|
||||
that.formData.name = '';
|
||||
}
|
||||
},
|
||||
/* 参数验证 */
|
||||
paramsCheck() {
|
||||
if (!nonNullCheck(this.formData.purpose)) {
|
||||
uni.showToast({
|
||||
title: '请输入来访事由',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.name)) {
|
||||
uni.showToast({
|
||||
title: '请输入来访概述',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.visit_time)) {
|
||||
uni.showToast({
|
||||
title: '请选择来访时间',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.leave_time)) {
|
||||
uni.showToast({
|
||||
title: '请选择离开时间',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.receptionist)) {
|
||||
uni.showToast({
|
||||
title: '请选择接待人人',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.level)) {
|
||||
uni.showToast({
|
||||
title: '请选择访问级别',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (!nonNullCheck(this.formData.count_people)) {
|
||||
uni.showToast({
|
||||
title: '请填写来访人数',
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
handleClick(){
|
||||
this.goBack();
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.qingjia-apply {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 227rpx;
|
||||
}
|
||||
|
||||
/* >>>.uni-status-bar {
|
||||
height: 0 !important;
|
||||
} */
|
||||
|
||||
>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.apply-info {
|
||||
width: 720rpx;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
padding: 25rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.star {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.top-title-text {
|
||||
padding-left: 24rpx;
|
||||
position: relative;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 34rpx;
|
||||
line-height: 72rpx;
|
||||
color: #383838;
|
||||
}
|
||||
|
||||
.top-title-text::before {
|
||||
content: "";
|
||||
width: 6rpx;
|
||||
height: 29rpx;
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%);
|
||||
border-radius: 3rpx;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -4rpx;
|
||||
top: 22rpx;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
/* display: flex; */
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
/* line-height: 97rpx; */
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-left-text {
|
||||
color: #212121;
|
||||
margin-bottom: 33rpx;
|
||||
}
|
||||
|
||||
.form-left {
|
||||
/* min-width: 160rpx; */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-right {
|
||||
margin-left: 20rpx;
|
||||
flex: 1;
|
||||
color: #414141;
|
||||
}
|
||||
|
||||
.form-right input {
|
||||
/* height: 100%; */
|
||||
/* height: 60rpx; */
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.form-date>>>.uni-date__x-input {
|
||||
height: 97rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.form-date>>>.uni-icons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.qingjia-apply>>>uni-input {
|
||||
/* height: 100%; */
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.apply-reason-text {
|
||||
width: 653rpx;
|
||||
height: 179rpx;
|
||||
background-color: #f6f8fc;
|
||||
border: solid 1rpx #e5e5e5;
|
||||
margin-top: 21rpx;
|
||||
padding: 14rpx 24rpx;
|
||||
font-size: 26rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.apply_require {
|
||||
margin-top: 0rpx !important;
|
||||
}
|
||||
|
||||
.file-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
padding-top: 13rpx;
|
||||
}
|
||||
|
||||
.file-wrap {
|
||||
|
||||
margin-top: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.file-item {
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
border: solid 1rpx #e5e5e5;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.file-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.file-item .file-icon {
|
||||
width: 37rpx;
|
||||
height: 37rpx;
|
||||
|
||||
}
|
||||
|
||||
.file-item .file-name {
|
||||
font-family: PingFang-SC-Regular;
|
||||
font-size: 20rpx;
|
||||
line-height: 17rpx;
|
||||
color: #313131;
|
||||
margin-top: 11rpx;
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.file-item>>>.uni-icons {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
position: absolute;
|
||||
right: -8rpx;
|
||||
top: -22rpx;
|
||||
/*
|
||||
background-color: #d81e06;
|
||||
border-radius: 50%;
|
||||
font-size: 20rpx !important;
|
||||
padding: 5rpx;
|
||||
*/
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.form-right {
|
||||
flex: 1;
|
||||
color: #414141;
|
||||
}
|
||||
|
||||
/*部门*/
|
||||
uni-data-picker {
|
||||
width: 100%;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.my-data-picker>>>.input-value-border {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
>>>.input-value {
|
||||
font-size: 30rpx !important;
|
||||
;
|
||||
}
|
||||
|
||||
.my-data-picker uni-data-picker {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.my-data-picker {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: -10rpx;
|
||||
}
|
||||
|
||||
/* 主体 */
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
hongtouwenjian-top {
|
||||
box-sizing: border-box;
|
||||
padding-top: 24rpx;
|
||||
padding-right: 15rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-left: 15rpx;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 85rpx;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-title-mark {
|
||||
width: 6rpx;
|
||||
height: 29rpx;
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#f3fbff, #f3fbff);
|
||||
background-blend-mode: normal, normal;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-title-txt {
|
||||
font-size: 34rpx;
|
||||
color: #383838;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item {
|
||||
/* display: flex; */
|
||||
align-items: center;
|
||||
/* height: 100rpx; */
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
box-sizing: border-box;
|
||||
padding-left: 3rpx;
|
||||
padding-right: 12rpx;
|
||||
width: 100%;
|
||||
line-height: 97rpx;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 164rpx;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-left-mark {
|
||||
font-size: 30rpx;
|
||||
color: #f00808;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-left-txt {
|
||||
font-size: 30rpx;
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-middle {
|
||||
margin-left: 20rpx;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-middle-txt {
|
||||
font-size: 30rpx;
|
||||
color: #414141;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-middle-input {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
/* height: 100%; */
|
||||
height: 60rpx;
|
||||
font-size: 30rpx;
|
||||
color: #414141;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.hongtouwenjian-top-c-item-right {
|
||||
width: 22rpx;
|
||||
height: 25rpx;
|
||||
}
|
||||
|
||||
.hongtouwenjian-addbtn {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
padding-right: 19rpx;
|
||||
}
|
||||
|
||||
.hongtouwenjian-addbtn-w {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
background-color: transparent;
|
||||
width: 90rpx;
|
||||
height: 46rpx;
|
||||
line-height: 46rpx;
|
||||
text-align: center;
|
||||
background-color: #0075ff;
|
||||
border-radius: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: #f3fbff;
|
||||
}
|
||||
|
||||
/* 物品列表 */
|
||||
.fixed-assets-listBig {
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.fixed-assets-list {
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.fixed-assets-list .apply-info {
|
||||
padding-top: 0rpx;
|
||||
}
|
||||
|
||||
.fixed-assets-list .top {
|
||||
height: 108rpx;
|
||||
line-height: 108rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.fixed-assets-list .top-left-text {
|
||||
flex: 1;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
font-size: 30rpx;
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.fixed-assets-list .top-right image {
|
||||
width: 26rpx;
|
||||
height: 28rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.fixed-assets-list .top-right view {
|
||||
height: auto;
|
||||
padding-left: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: #8b8b8b;
|
||||
}
|
||||
|
||||
/* .fixed-assets-list .bottomBig{
|
||||
width: 100%;
|
||||
} */
|
||||
.fixed-assets-list .bottom {
|
||||
/* display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center; */
|
||||
padding-top: 25rpx;
|
||||
font-size: 28rpx;
|
||||
color: #616161;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.fixed-assets-list .bottom-left+.bottom-right {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/* 文件上传进度样式*/
|
||||
.u-progress-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.u-progress-dot {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #fb9126;
|
||||
}
|
||||
|
||||
.u-progress-info {
|
||||
font-size: 24rpx;
|
||||
padding-left: 10rpx;
|
||||
letter-spacing: 2rpx
|
||||
}
|
||||
|
||||
.is-hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
margin: 20px 0 5px 0;
|
||||
}
|
||||
|
||||
.data-pickerview {
|
||||
height: 400px;
|
||||
border: 1px #e5e5e5 solid;
|
||||
}
|
||||
|
||||
.popper__arrow {
|
||||
top: -6px;
|
||||
left: 50%;
|
||||
margin-right: 3px;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: #EBEEF5;
|
||||
}
|
||||
|
||||
.popper__arrow {
|
||||
top: -6px;
|
||||
left: 50%;
|
||||
margin-right: 3px;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: #EBEEF5;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
<view class="operation-body">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="作业信息"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
|
||||
<view class="form-info">
|
||||
<view class="form-left-text">
|
||||
<text class="star">*</text>
|
||||
|
|
@ -73,7 +72,7 @@
|
|||
</view>
|
||||
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<view class="form-left" @click="selectUser">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">部门协调员</text>
|
||||
</view>
|
||||
|
|
@ -146,6 +145,7 @@
|
|||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
debugger;
|
||||
if(params.operationId){
|
||||
this.operationId = params.operationId;
|
||||
this.type = params.type;
|
||||
|
|
@ -160,6 +160,7 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.getdept();
|
||||
this.getRange();
|
||||
this.getUserRange();
|
||||
|
|
@ -168,7 +169,7 @@
|
|||
methods: {
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
|
||||
debugger;
|
||||
let that = this;
|
||||
that.$u.api.operationItem(that.operationId).then((res) => {
|
||||
that.formData.id = res.id; //
|
||||
|
|
@ -350,7 +351,11 @@
|
|||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
selectUser(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/employeeSelect'
|
||||
})
|
||||
},
|
||||
onnodeclick(e) {
|
||||
console.log(e);
|
||||
},
|
||||
|
|
@ -400,10 +405,6 @@
|
|||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.star {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.top-title-text {
|
||||
padding-left: 24rpx;
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,268 @@
|
|||
<template>
|
||||
<view class="bodyContainer">
|
||||
<uni-nav-bar @clickLeft="goBack()" 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 wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>项目信息:</view>
|
||||
<view class="item">
|
||||
<view class="title">作业简介</view>
|
||||
<view class="content">
|
||||
<text>{{formData.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">具体地点</view>
|
||||
<view class="content">
|
||||
<text>{{formData.place}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">开始时间</view>
|
||||
<view class="content">
|
||||
<text>{{formData.start_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">结束时间</view>
|
||||
<view class="content">
|
||||
<text>{{formData.end_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">生产状态</view>
|
||||
<view class="content">
|
||||
<text>{{formData.state_work}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">作业区域</view>
|
||||
<view class="content">
|
||||
<text>{{formData.area_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">业务部门</view>
|
||||
<view class="content">
|
||||
<text>{{formData.dept_bus_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">部门协调员</view>
|
||||
<view class="content">
|
||||
<text>{{formData.coordinator_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">属地部门</view>
|
||||
<view class="content">
|
||||
<text>{{formData.dept_ter_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>作业证书列表:</view>
|
||||
<view class="visitorsWrap">
|
||||
<view class="visitorsItem itemTitle">
|
||||
<text class="visitorCell">种类</text>
|
||||
<text class="visitorCell">级别</text>
|
||||
<text class="visitorCell">状态</text>
|
||||
<text class="visitorCell">操作</text>
|
||||
</view>
|
||||
<view class="visitorsItem" v-for="item in oplList" :key="item.id">
|
||||
<text class="visitorCell">{{item.cate_name}}</text>
|
||||
<text class="visitorCell">{{item.level}}</text>
|
||||
<text class="visitorCell">
|
||||
<text v-if="item.ticket_&&item.ticket_.state_">
|
||||
{{item.ticket_.state_.name }}-{{act_states[item.ticket_.act_state]}}
|
||||
</text>
|
||||
</text>
|
||||
<view class="visitorCell">
|
||||
<!-- <text class="bindBtn">绑卡</text> -->
|
||||
<text class="bindBtn" @click="oplDetail(item.id)">查看</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "operationDetail",
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
name:'',
|
||||
place:'',
|
||||
start_time:'',
|
||||
end_time:'',
|
||||
state_work:'',
|
||||
place:'',
|
||||
area_:{},
|
||||
dept_bus_:{},
|
||||
coordinator_:{},
|
||||
dept_ter_:{},
|
||||
},
|
||||
oplList:[],
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
this.operationId = params.operationId;
|
||||
this.getOperation();
|
||||
},
|
||||
onShow() {
|
||||
this.getOplList();
|
||||
},
|
||||
methods: {
|
||||
//获取工作operation
|
||||
getOperation() {
|
||||
debugger;
|
||||
let that = this;
|
||||
that.$u.api.operationItem(that.operationId).then((res) => {
|
||||
that.formData ={...res} ;
|
||||
debugger;
|
||||
});
|
||||
},
|
||||
//
|
||||
//获取已有证书
|
||||
getOplList() {
|
||||
let that = this;
|
||||
that.$u.api.oplLists({operation: that.operationId,page:0}).then(res => {
|
||||
that.oplList =res;
|
||||
})
|
||||
},
|
||||
oplDetail(id){
|
||||
const params = `?oplId=${id}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/operation/oplDetail' + params,
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
uni-page-body {
|
||||
color: #303133;
|
||||
font-size: 15px;
|
||||
height: 100%;
|
||||
background: #f3fbff;
|
||||
}
|
||||
.bodyContainer {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
>>>.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;
|
||||
padding-bottom: 30upx;
|
||||
}
|
||||
.wrap-top{
|
||||
line-height: 60upx;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
.item {
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.item.title{
|
||||
height: 100upx;
|
||||
line-height: 100upx;
|
||||
border-bottom: 1upx solid #dddddd;
|
||||
}
|
||||
.item_bottom_border{
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #212121;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 3;
|
||||
color: #666666;
|
||||
|
||||
}
|
||||
.visitorsWrap{
|
||||
|
||||
}
|
||||
|
||||
.visitorsItem{
|
||||
display: flex;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.itemTitle{
|
||||
height: 80upx;
|
||||
font-size: 32upx;
|
||||
line-height: 80upx;
|
||||
}
|
||||
.itemTitle>.visitorCell{
|
||||
color: #212121;
|
||||
}
|
||||
.visitorCell{
|
||||
flex: 1;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
}
|
||||
.blueLine{
|
||||
height: 24upx;
|
||||
width: 10upx;
|
||||
background: #2a8cff;
|
||||
margin-top: 39upx;
|
||||
margin-right: 12upx;
|
||||
}
|
||||
.bindBtn{
|
||||
width: 80upx;
|
||||
height: 50upx;
|
||||
line-height: 50upx;
|
||||
background: #2a8cff;
|
||||
display: inline-block;
|
||||
border-radius: 16upx;
|
||||
color: #ffffff;
|
||||
font-size: 25upx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,7 +2,24 @@
|
|||
<view class="my_duty">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="作业列表" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="params.search"
|
||||
placeholder="请输入关键字" />
|
||||
<view class="right-btn" @click="searchHandle">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 主体 导航栏 -->
|
||||
<view class="tabbar-title">
|
||||
<view :class="{'text-title':true, 'active':dataTypye==='isMy'}" @click="changeList('isMy')">我的</view>
|
||||
<view :class="{'text-title':true, 'active':dataTypye==='all'}" @click="changeList('all')" v-if="!remployee">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
|
|
@ -12,7 +29,7 @@
|
|||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
|
||||
|
|
@ -30,14 +47,18 @@
|
|||
<view class="info-details">创建人:{{val.create_by_.name}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="operationHandle(val,'edit')" v-if="val.state===10">
|
||||
<view class="shenhezhong shenhe-status" @click="operationHandle(val,'edit')" v-if="val.state===10&&dataTypye==='isMy'">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
编辑
|
||||
</view>
|
||||
<view class="shenhezhong shenhe-status" @click="operationHandle(val,'show')" v-else style="color: #15a306;">
|
||||
<view class="shenhezhong shenhe-status" @click="operationDetail(val)" style="color: #15a306;">
|
||||
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
|
||||
查看
|
||||
</view>
|
||||
<view class="shenhezhong shenhe-status" @click="operationWarning(val)" style="color: orange;">
|
||||
<image src="../../../static/my/my_apply/orange-time.png" mode=""></image>
|
||||
新增违规
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -50,9 +71,12 @@
|
|||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
create_by: ''
|
||||
},
|
||||
totalNum: 0,
|
||||
lists: [],
|
||||
stateOptions: {
|
||||
|
|
@ -62,13 +86,15 @@
|
|||
40: "作业中",
|
||||
50: "已关闭",
|
||||
},
|
||||
dataTypye:'isMy',
|
||||
remployee:false,
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
|
@ -78,25 +104,23 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.vuex_user.type==='remployee'){
|
||||
this.remployee = true;
|
||||
}
|
||||
this.lists = [];
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
this.getLists();
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getLists();
|
||||
},
|
||||
methods: {
|
||||
getLists() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.pageNum = this.pageNum;
|
||||
obj.pageSize = this.pageSize;
|
||||
if (that.search !== '') {
|
||||
obj.search = that.search;
|
||||
}
|
||||
that.$u.api.operationList(obj).then(res => {
|
||||
that.$u.api.operationList(that.params).then(res => {
|
||||
that.lists = that.lists.concat(res.results);
|
||||
this.totalNum = res.count;
|
||||
})
|
||||
|
|
@ -108,19 +132,43 @@
|
|||
url: '/pages/workSpace/operation/operationCreate' + params,
|
||||
})
|
||||
},
|
||||
operationDetail(val){
|
||||
let operation = val.id;//作业id
|
||||
const params = `?operationId=${val.id}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/operation/operationDetail' + params,
|
||||
})
|
||||
},
|
||||
operationWarning(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/addViolation'
|
||||
})
|
||||
},
|
||||
changeList(index){
|
||||
let that = this;
|
||||
that.dataTypye = index;
|
||||
debugger;
|
||||
// console.log(that.vuex_user)
|
||||
if(index==='isMy'){
|
||||
that.params.create_by = that.vuex_user.id;
|
||||
}else{
|
||||
that.params.create_by = '';
|
||||
}
|
||||
that.resetSearch();
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.lists = [];
|
||||
this.getLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.params.pageNum = 1;
|
||||
this.params.search = "";
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
},
|
||||
|
|
@ -132,10 +180,10 @@
|
|||
.empty-view {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar,
|
||||
.search-wrap {
|
||||
background-image: linear-gradient(270deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
|
|
@ -143,7 +191,7 @@
|
|||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
|
||||
.my_duty {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
|
@ -154,6 +202,7 @@
|
|||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
padding-top: 125upx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
|
|
@ -199,76 +248,26 @@
|
|||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
flex: 1;
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
.shenhezhong image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background: #f3fbff;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
/*
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
*/
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,352 @@
|
|||
<template>
|
||||
<view class="bodyContainer">
|
||||
<uni-nav-bar @clickLeft="goBack()" 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 wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>许可证信息:</view>
|
||||
<view class="item">
|
||||
<view class="title">编号</view>
|
||||
<view class="content">
|
||||
<text>{{formData.number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">作业级别</view>
|
||||
<view class="content">
|
||||
<text>{{formData.level}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">预计开始</view>
|
||||
<view class="content">
|
||||
<text>{{formData.start_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">预计结束</view>
|
||||
<view class="content">
|
||||
<text>{{formData.end_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">状态</view>
|
||||
<view class="content">
|
||||
<!-- <text v-if="formData.ticket_">{{formData.ticket_.state_.name}}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">作业部门</view>
|
||||
<view class="content">
|
||||
<text>{{formData.dept_do_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">作业负责人</view>
|
||||
<view class="content">
|
||||
<text>{{formData.charger_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">作业监护人</view>
|
||||
<view class="content">
|
||||
<text>{{formData.monitor_.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">风险分析</view>
|
||||
<view class="content">
|
||||
<text v-for="item in formData.risks_checked_" :key="item.id">
|
||||
{{item.name}}|
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">控制措施</view>
|
||||
<view class="content">
|
||||
<text v-for="item in formData.measures_checked_" :key="item.id">
|
||||
{{item.name}}|
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">监控状态</view>
|
||||
<view class="content contentFlex" v-if="formData.mtask_status==='REVOKED'">
|
||||
<text>已中止</text>
|
||||
<text class="bindBtn" @click="mtaskStateChange('start')">开始</text>
|
||||
</view>
|
||||
<view class="content contentFlex" v-else-if="formData.mtask_status==='STARTED'">
|
||||
<text>进行中</text>
|
||||
<text class="bindBtn" @click="mtaskStateChange('end')">结束</text>
|
||||
</view>
|
||||
<view class="content contentFlex" v-else-if="formData.mtask_status==='SUCCESS'">
|
||||
<text>已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>作业人员:</view>
|
||||
<view class="visitorsWrap">
|
||||
<view class="visitorsItem itemTitle">
|
||||
<text class="visitorCell">姓名</text>
|
||||
<text class="visitorCell">工作职责</text>
|
||||
<text class="visitorCell">操作</text>
|
||||
</view>
|
||||
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
|
||||
<text class="visitorCell">{{item.worker_name}}</text>
|
||||
<text class="visitorCell">{{item.duty}}</text>
|
||||
<view class="visitorCell">
|
||||
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.worker_.blt_===null||item.worker_.blt_===undefined">绑卡</text>
|
||||
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>气体检测记录:</view>
|
||||
<view class="visitorsWrap">
|
||||
<view class="visitorsItem itemTitle">
|
||||
<text class="visitorCell">检测部位</text>
|
||||
<text class="visitorCell">可燃气体(V%LEL)</text>
|
||||
<text class="visitorCell">检验结论</text>
|
||||
</view>
|
||||
<view class="visitorsItem" v-for="item1 in gasList" :key="item1.id">
|
||||
<text class="visitorCell"></text>
|
||||
<text class="visitorCell"></text>
|
||||
<text class="visitorCell">
|
||||
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "oplDetail",
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
number:'',
|
||||
level:'',
|
||||
start_time:'',
|
||||
end_time:'',
|
||||
ticket_:{},
|
||||
dept_do_:{},
|
||||
charger_:{},
|
||||
monitor_:{},
|
||||
risks_checked_:{},
|
||||
measures_checked_:{}
|
||||
},
|
||||
workerList:[],
|
||||
gasList:[],
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
this.oplId = params.oplId;
|
||||
this.getOpl();
|
||||
},
|
||||
onShow() {
|
||||
this.getworkerList();//工作人员
|
||||
this.getgasList();//气体检测记录
|
||||
},
|
||||
methods: {
|
||||
//获取工作operation
|
||||
getOpl() {
|
||||
debugger;
|
||||
let that = this;
|
||||
that.$u.api.oplItem(that.oplId).then((res) => {
|
||||
that.formData ={...res} ;
|
||||
});
|
||||
},
|
||||
//
|
||||
//获取工作人员
|
||||
getworkerList() {
|
||||
let that = this;
|
||||
that.$u.api.oplWorker({opl: that.oplId, page: 0}).then(res => {
|
||||
that.workerList =res;
|
||||
})
|
||||
},
|
||||
//获取气体检测记录
|
||||
getgasList(){
|
||||
let that = this;
|
||||
that.$u.api.oplGasList({opl: that.oplId, page: 0}).then(res => {
|
||||
that.gasList =res;
|
||||
})
|
||||
},
|
||||
mtaskStateChange(type){
|
||||
let that = this;
|
||||
if(type==='start'){
|
||||
that.$u.api.oplMtartMtask(that.oplId).then(res=>{
|
||||
|
||||
})
|
||||
}else{
|
||||
that.$u.api.oplStopMtask(that.oplId).then(res=>{
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
//解绑卡
|
||||
bindBtl(row,type){
|
||||
let that = this;
|
||||
let form = {};
|
||||
form.type = type;
|
||||
form.code = res.result;
|
||||
form.employee = row.visitor_.employee;
|
||||
if(type==10){
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
that.$u.api.thirdBltBind(form).then(res=>{
|
||||
debugger;
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
that.$u.api.thirdBltBind(form).then(res=>{
|
||||
debugger;
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
uni-page-body {
|
||||
color: #303133;
|
||||
font-size: 15px;
|
||||
height: 100%;
|
||||
background: #f3fbff;
|
||||
}
|
||||
.bodyContainer {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
>>>.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;
|
||||
padding-bottom: 30upx;
|
||||
}
|
||||
.wrap-top{
|
||||
line-height: 60upx;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
.item {
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.item.title{
|
||||
height: 100upx;
|
||||
line-height: 100upx;
|
||||
border-bottom: 1upx solid #dddddd;
|
||||
}
|
||||
.item_bottom_border{
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #212121;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 3;
|
||||
color: #666666;
|
||||
}
|
||||
.contentFlex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.visitorsWrap{
|
||||
|
||||
}
|
||||
|
||||
.visitorsItem{
|
||||
display: flex;
|
||||
font-size: 28upx;
|
||||
align-items:center;
|
||||
}
|
||||
|
||||
.itemTitle{
|
||||
height: 80upx;
|
||||
font-size: 32upx;
|
||||
line-height: 40upx;
|
||||
}
|
||||
.itemTitle>.visitorCell{
|
||||
color: #212121;
|
||||
}
|
||||
.visitorCell{
|
||||
flex: 1;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
}
|
||||
.blueLine{
|
||||
height: 24upx;
|
||||
width: 10upx;
|
||||
background: #2a8cff;
|
||||
margin-top: 39upx;
|
||||
margin-right: 12upx;
|
||||
}
|
||||
.bindBtn{
|
||||
width: 80upx;
|
||||
height: 50upx;
|
||||
line-height: 50upx;
|
||||
background: #2a8cff;
|
||||
display: inline-block;
|
||||
border-radius: 16upx;
|
||||
color: #ffffff;
|
||||
font-size: 25upx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -135,6 +135,15 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<view class="form-info">
|
||||
<view class="form-item " style="height: fit-content;">
|
||||
<view class="title">照片</view>
|
||||
<view style="flex: 3;">
|
||||
<u-upload action="http://10.99.5.79:20309/api/file/" :header="header" ref="uUpload"
|
||||
:file-list="fileList" max-count="9" @on-success="imgUpSuccess"></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btn">
|
||||
|
|
@ -161,11 +170,15 @@
|
|||
other_emr: '',
|
||||
other_risk: '',
|
||||
risks_checked: [],
|
||||
measures_checked: [],
|
||||
measures_checked: [],
|
||||
},
|
||||
head: {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
},
|
||||
oplId: null,
|
||||
operationName: '',
|
||||
oplCateName: '',
|
||||
fileList: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
range: [],
|
||||
|
|
@ -207,6 +220,7 @@
|
|||
this.getdept();
|
||||
this.getRange();
|
||||
this.getUserRange();
|
||||
this.getHeader();
|
||||
},
|
||||
methods: {
|
||||
//获取工作operation
|
||||
|
|
@ -236,11 +250,11 @@
|
|||
that.measurelist = [];
|
||||
that.oplCateName = res.name;
|
||||
that.oplcateCode = res.code;
|
||||
let risklist =res.risk_options_;
|
||||
let measurelist =res.measure_options_;
|
||||
let risklist = res.risk_options_;
|
||||
let measurelist = res.measure_options_;
|
||||
if (that.oplId !== null) {
|
||||
that.editCheckShow(risklist, measurelist);
|
||||
}else{
|
||||
} else {
|
||||
risklist.forEach(item => {
|
||||
let obj = {};
|
||||
obj = item;
|
||||
|
|
@ -383,26 +397,31 @@
|
|||
edit(row) {},
|
||||
saveSubmit() {
|
||||
debugger;
|
||||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
let that = this;
|
||||
let params=null;
|
||||
let params = null;
|
||||
console.log(this.formData);
|
||||
if (that.oplId !== null) {
|
||||
that.$u.api.oplUpdate(that.oplId,that.formData).then(res=>{
|
||||
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
params = `?oplId=${that.oplId}`;
|
||||
uni.navigateTo({
|
||||
url:'/pages/workSpace/operation/workerList'+params
|
||||
url: '/pages/workSpace/operation/workerList' + params
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
}else{
|
||||
that.$u.api.oplCreate(that.formData).then(res=>{
|
||||
} else {
|
||||
that.$u.api.oplCreate(that.formData).then(res => {
|
||||
uni.hideLoading();
|
||||
params = `?oplId=${that.oplId}`;
|
||||
uni.navigateTo({
|
||||
url:'/pages/workSpace/operation/workerList'+params
|
||||
url: '/pages/workSpace/operation/workerList' + params
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,324 @@
|
|||
<template>
|
||||
<view class="bodyContainer">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="250rpx" leftText="入厂项目详情"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>基本信息:</view>
|
||||
<view class="item">
|
||||
<view class="title">名称</view>
|
||||
<view class="content">
|
||||
<text>{{formData.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">项目类型</view>
|
||||
<view class="content">
|
||||
<text>{{rpj_states[formData.type]}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">合同编号</view>
|
||||
<view class="content">
|
||||
<text>{{formData.contract_number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">进厂时间</view>
|
||||
<view class="content">
|
||||
<text>{{formData.come_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">离厂时间</view>
|
||||
<view class="content">
|
||||
<text>{{formData.leave_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">所属部门</view>
|
||||
<view class="content">
|
||||
<text>{{formData.belong_dept_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">相关方</view>
|
||||
<view class="content">
|
||||
<text>{{formData.rparty_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>证书:</view>
|
||||
<view class="filesWrap" v-if="certificateList.length>0">
|
||||
<view class="filesItem itemTitle">
|
||||
<text class="fileCell leftFileCell">资质内容</text>
|
||||
<text class="fileCell">文献资料</text>
|
||||
</view>
|
||||
<view class="filesItem" v-for="item1 in certificateList" :key="item1.id">
|
||||
<view class="fileCell leftFileCell" style="text-align: left;">
|
||||
<text v-if="item1.file_cate_"> {{item1.file_cate_.name}}</text>
|
||||
</view>
|
||||
<view class="fileCell">
|
||||
<view v-if="item1.files.length>0">
|
||||
<view v-for="file in item1.files_">{{file.name}}</view>
|
||||
</view>
|
||||
|
||||
<text v-else>暂无</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-else style="text-align: center;">暂无相关证书</view>
|
||||
</view>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>作业人员:</view>
|
||||
<view class="visitorsWrap">
|
||||
<view class="visitorsItem itemTitle">
|
||||
<text class="visitorCell">姓名</text>
|
||||
<text class="visitorCell">工作职责</text>
|
||||
<text class="visitorCell">操作</text>
|
||||
</view>
|
||||
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
|
||||
<text class="visitorCell">{{item.remployee_.name}}</text>
|
||||
<text class="visitorCell">{{item.duty}}</text>
|
||||
<view class="visitorCell">
|
||||
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.remployee_.blt_===null||item.worker_.blt_===undefined">绑卡</text>
|
||||
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "rpjDetail",
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
name:'',
|
||||
type:'',
|
||||
contract_number:'',
|
||||
come_time:'',
|
||||
leave_time:'',
|
||||
belong_dept_name:'',
|
||||
rparty_name:'',
|
||||
},
|
||||
workerList:[],
|
||||
certificateList:[],
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
rpj_states: {
|
||||
10: "建筑施工",
|
||||
20: "设备设施检维修",
|
||||
30: "保安保洁服务",
|
||||
40: "其他",
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
this.rpjId = params.rpjId;
|
||||
this.getRpjDetail();
|
||||
},
|
||||
onShow() {
|
||||
this.getworkerList();//工作人员
|
||||
this.getcertificateList();//证书
|
||||
},
|
||||
methods: {
|
||||
//获取工作operation
|
||||
getRpjDetail() {
|
||||
let that = this;
|
||||
that.$u.api.rpjItem(that.rpjId).then((res) => {
|
||||
that.formData = {...res};
|
||||
});
|
||||
},
|
||||
|
||||
//获取工作人员
|
||||
getworkerList() {
|
||||
let that = this;
|
||||
that.$u.api.rpjMembers({rpj: that.rpjId, page: 0}).then(res => {
|
||||
that.workerList =res;
|
||||
})
|
||||
},
|
||||
|
||||
//获取证书
|
||||
getcertificateList(){
|
||||
let that = this;
|
||||
that.$u.api.rpjFileList({rpj: that.rpjId, page: 0}).then(res => {
|
||||
that.certificateList =res.filter(item=>{
|
||||
return item.files.length>0
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
//解绑卡
|
||||
bindBtl(row,type){
|
||||
let that = this;
|
||||
let form = {};
|
||||
form.type = type;
|
||||
form.code = res.result;
|
||||
form.employee = row.visitor_.employee;
|
||||
if(type==10){
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
that.$u.api.thirdBltBind(form).then(res=>{
|
||||
debugger;
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
that.$u.api.thirdBltBind(form).then(res=>{
|
||||
debugger;
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
uni-page-body {
|
||||
color: #303133;
|
||||
font-size: 15px;
|
||||
height: 100%;
|
||||
background: #f3fbff;
|
||||
}
|
||||
.bodyContainer {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
>>>.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;
|
||||
padding-bottom: 30upx;
|
||||
}
|
||||
.wrap-top{
|
||||
line-height: 60upx;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
.item {
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.item.title{
|
||||
height: 100upx;
|
||||
line-height: 100upx;
|
||||
/* border-bottom: 1upx solid #dddddd; */
|
||||
}
|
||||
.item_bottom_border{
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #212121;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 3;
|
||||
color: #666666;
|
||||
|
||||
}
|
||||
.visitorsWrap,.filesWrap{
|
||||
padding: 0 10px;
|
||||
|
||||
}
|
||||
|
||||
.visitorsItem,.filesItem{
|
||||
display: flex;
|
||||
font-size: 28upx;
|
||||
align-items:center;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
.filesItem{
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
.itemTitle{
|
||||
height: 80upx;
|
||||
font-size: 32upx;
|
||||
line-height: 40upx;
|
||||
}
|
||||
.itemTitle>.visitorCell,.itemTitle>.fileCell{
|
||||
color: #212121;
|
||||
}
|
||||
.visitorCell,.fileCell{
|
||||
flex: 1;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
}
|
||||
.leftFileCell{
|
||||
flex: 2;
|
||||
text-align: left;
|
||||
line-height: 16px;
|
||||
align-items: center;
|
||||
padding: 10upx 0;
|
||||
}
|
||||
.blueLine{
|
||||
height: 24upx;
|
||||
width: 10upx;
|
||||
background: #2a8cff;
|
||||
margin-top: 39upx;
|
||||
margin-right: 12upx;
|
||||
}
|
||||
.bindBtn{
|
||||
width: 80upx;
|
||||
height: 50upx;
|
||||
line-height: 50upx;
|
||||
background: #2a8cff;
|
||||
display: inline-block;
|
||||
border-radius: 16upx;
|
||||
color: #ffffff;
|
||||
font-size: 25upx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,299 @@
|
|||
<template>
|
||||
<view class="list-body">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="400rpx" leftText="资质列表"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in rpjFileList" :key="val.id">
|
||||
<view class="duty-item">
|
||||
<view class="top-info">
|
||||
<view class="info-title" v-if="val.file_cate_">{{val.file_cate_.name}}</view>
|
||||
</view>
|
||||
<view class="center-info" v-if="val.files_.length>0">
|
||||
<view class="info-details">上传文件:</view>
|
||||
<view class="info-details" v-for="val in val.files_">
|
||||
<a :href="val.file">{{val.name}} </a>
|
||||
</view>
|
||||
</view>
|
||||
<view class="center-info" v-else>
|
||||
<view class="info-details">暂无上传文件</view>
|
||||
</view>
|
||||
<!-- <view class="bottom-btns">
|
||||
<view class="uploadFile" @click="rpjHandle(val,'show')">
|
||||
<image src="../../../static/common/addIcon.png" mode=""></image>
|
||||
上传
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" v-if="showBtns">
|
||||
<button type="primary" class="save-btn" @click="nextStep">下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* 这是条件编译,意思是:只在APP中出现如下的代码,小程序是不支持的 */
|
||||
// #ifdef APP-PLUS
|
||||
var file = uni.requireNativePlugin('TX-File');
|
||||
const plug = uni.requireNativePlugin("Html5app-filePicker");
|
||||
const plugin = uni.requireNativePlugin("K-ChooseFilesModule");
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
name: "rpjFiles",
|
||||
watch: {
|
||||
/* 文件下载监听 */
|
||||
lsDownLoadImg(newVal, oldVal) {
|
||||
let val = newVal;
|
||||
if (String(newVal).indexOf(",") > -1) {
|
||||
val = String(newVal).split(",")[0] === "true";
|
||||
}
|
||||
this.$set(this.downFiles, 'downLoadImg' + this.lsFileId, val)
|
||||
},
|
||||
/* 文件下载监听 */
|
||||
principal(newVal, oldVal) {
|
||||
if (!this.itemId) {
|
||||
if (oldVal.roleId === undefined && newVal.roleId !== undefined) {
|
||||
this.formData.itemInfo.applicationDept = newVal.deptId
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
name: '',
|
||||
},
|
||||
head: {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
},
|
||||
showBtns: false,
|
||||
rpjFileList: [],
|
||||
result: [],
|
||||
// 文件进度
|
||||
imgFlag: false,
|
||||
//文件下载
|
||||
downFiles: {},
|
||||
uploadImgsList: [],
|
||||
fileList :[]
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
if (params.rpj) {
|
||||
this.rpj = params.rpj;
|
||||
}
|
||||
this.showBtns = true;
|
||||
},
|
||||
onShow() {
|
||||
this.getHeader();
|
||||
this.getRpjLists();
|
||||
},
|
||||
methods: {
|
||||
getHeader() {
|
||||
this.header = {
|
||||
Authorization: "Bearer " + this.vuex_token
|
||||
}
|
||||
},
|
||||
//获取
|
||||
getRpjLists() {
|
||||
let that = this;
|
||||
that.$u.api.rpjFileList({
|
||||
rpj: that.rpj,
|
||||
page: 0
|
||||
}).then(res => {
|
||||
that.rpjFileList = res;
|
||||
debugger;
|
||||
console.log(res)
|
||||
|
||||
})
|
||||
},
|
||||
/* 文件删除 */
|
||||
delFile(index) {
|
||||
this.formData.leaveApplicationFiles.splice(index, 1);
|
||||
},
|
||||
/* */
|
||||
showValue(res, file) {
|
||||
debugger;
|
||||
console.log(res)
|
||||
console.log(file)
|
||||
console.log(this.uploadImgsList)
|
||||
},
|
||||
rpjHandle() {
|
||||
let that = this;
|
||||
debugger;
|
||||
console.log(this.vuex_token)
|
||||
uni.chooseImage({
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera '], //从相册选择
|
||||
success: function(res) {
|
||||
|
||||
console.log(JSON.stringify(res.tempFilePaths));
|
||||
let tempFilePaths = res.tempFilePaths;
|
||||
tempFilePaths.forEach((item) => {
|
||||
uni.uploadFile({
|
||||
url: 'http://1.203.161.103:2800/api/file/', //服务器地址
|
||||
fileType: "image", //ZFB必填,不然报错
|
||||
filePath: item, //这个就是我们上面拍照返回或者先中照片返回的数组
|
||||
name: 'file',
|
||||
// 请求头一定要加,否则 iOS 图片上传会失败
|
||||
header: {
|
||||
'content-type': 'multipart/form-data; boundary=----WebKitFormBoundarymlJpQcllstnJXOES',
|
||||
'Authorization': 'Bearer ' + that.vuex_token,
|
||||
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
uploads() {
|
||||
const _this = this;
|
||||
return Promise.all(_this.uploadImgsList.map(item => _this.uploadImage(item.picturePath))).then(res => {
|
||||
return res.map(item => ({
|
||||
fileName: item.fileName,
|
||||
filePath: item.url
|
||||
}))
|
||||
})
|
||||
},
|
||||
uploadImage(url) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: this.$u.api.uploadFile, //后台地址
|
||||
filePath: url,
|
||||
name: 'file',
|
||||
success: (uploadFileRes) => {
|
||||
resolve(JSON.parse(uploadFileRes.data));
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//提交
|
||||
async submitFlood() {
|
||||
let photoList = await this.uploads();
|
||||
},
|
||||
|
||||
nextStep() {
|
||||
let that = this;
|
||||
let params = `?rpj=${that.rpj}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/rpj/rpjWorkers' + params
|
||||
})
|
||||
let files = this.$refs.uUpload.lists.filter(val => {
|
||||
return val.progress == 100;
|
||||
})
|
||||
let sData = [];
|
||||
// 如果您不需要进行太多的处理,直接如下即可
|
||||
// files = this.$refs.uUpload.lists;
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
if (files[i].response) {
|
||||
sData.push(files[i].response.data.id)
|
||||
} else {
|
||||
for (var m = 0; m < this.fileList.length; m++) {
|
||||
if (this.fileList[m].url == files[i].url) {
|
||||
sData.push(this.fileList[m].id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
.list-body {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 113px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.duty-item {
|
||||
width: 720rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right-time {
|
||||
font-size: 24rpx;
|
||||
line-height: 72rpx;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
}
|
||||
|
||||
.uploadFile {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.uploadFile image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: auto;
|
||||
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
height: 80rpx;
|
||||
color: #fff;
|
||||
font-size: 30upx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,8 +1,25 @@
|
|||
<template>
|
||||
<view class="my_duty">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="入场项目" leftIcon="left" border
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="入厂项目" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="params.search"
|
||||
placeholder="请输入关键字" />
|
||||
<view class="right-btn" @click="searchHandle">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 主体 导航栏 -->
|
||||
<view class="tabbar-title">
|
||||
<view :class="{'text-title':true, 'active':dataTypye==='isMy'}" @click="changeList('isMy')">我的</view>
|
||||
<view :class="{'text-title':true, 'active':dataTypye==='all'}" @click="changeList('all')" v-if="!remployee">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
|
|
@ -12,24 +29,31 @@
|
|||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in ticketList" :key="val.id">
|
||||
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
|
||||
<view class="duty-item">
|
||||
<view class="top-info">
|
||||
<view class="info-title">{{val.title}}</view>
|
||||
<view class="info-title">{{val.name}}</view>
|
||||
</view>
|
||||
<view class="center-info">
|
||||
<view class="info-details">所属工作流:{{val.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{val.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{val.create_time}} </view>
|
||||
<view class="info-details">更新时间:{{val.update_time}} </view>
|
||||
<view class="info-details">相关方:{{val.rparty_name}}</view>
|
||||
<view class="info-details">合同编号:{{val.contract_number}} </view>
|
||||
<view class="info-details">作业类型:{{typeOptions[val.type]}} </view>
|
||||
<view class="info-details">所属部门:{{val.belong_dept_name}} </view>
|
||||
<view class="info-details">入厂时间:{{val.come_time}} </view>
|
||||
<view class="info-details">离厂时间:{{val.leave_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="ticketHandle(val)">
|
||||
<view class="shenhezhong shenhe-status" @click="rpjHandle(val,'edit')" v-if="val.state===10&&dataTypye==='isMy'">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
编辑
|
||||
</view>
|
||||
<view class="shenhezhong shenhe-status" @click="rpjDetail(val)"
|
||||
style="color: #15a306;">
|
||||
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
|
||||
查看
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -43,19 +67,37 @@
|
|||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
create_by: ''
|
||||
},
|
||||
totalNum: 0,
|
||||
ticketList: [],
|
||||
lists: [],
|
||||
stateOptions: {
|
||||
10: "创建中",
|
||||
20: "审批中",
|
||||
30: "待作业",
|
||||
40: "作业中",
|
||||
50: "已关闭",
|
||||
},
|
||||
typeOptions: {
|
||||
10: "建筑施工",
|
||||
20: "设备设施检维修",
|
||||
30: "保安保洁服务",
|
||||
40: "其他",
|
||||
},
|
||||
dataTypye:'isMy',
|
||||
remployee:false,
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
// this._getMyApplyList(false);
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
|
|
@ -64,61 +106,69 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
debugger;
|
||||
console.log(this.vuex_user);
|
||||
debugger;
|
||||
if(this.vuex_user.type==='remployee'){
|
||||
this.remployee = true;
|
||||
}
|
||||
this.lists = [];
|
||||
this.dataTypye='isMy';
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
this.getLists();
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
this.getLists();
|
||||
},
|
||||
methods: {
|
||||
getTicketLists() {
|
||||
getLists() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.category = 'duty';
|
||||
obj.pageNum = this.pageNum;
|
||||
obj.pageSize = this.pageSize;
|
||||
if (that.search !== '') {
|
||||
obj.search = that.search;
|
||||
}
|
||||
obj.pageSize = this.pageSize;
|
||||
that.$u.api.getTickets(obj).then(res => {
|
||||
that.ticketList = that.ticketList.concat(res.results);
|
||||
that.$u.api.rpjList(that.params).then(res => {
|
||||
that.lists = that.lists.concat(res.results);
|
||||
this.totalNum = res.count;
|
||||
})
|
||||
},
|
||||
ticketHandle(val) {
|
||||
let projectId = '',//项目、许可证Id
|
||||
operation = null;//作业id
|
||||
let catetype = val.workflow_.key;
|
||||
if (catetype === 'visit') {
|
||||
projectId = val.ticket_data.visit;
|
||||
} else if (catetype === 'Fire') {
|
||||
projectId = val.ticket_data.opl;
|
||||
operation = val.ticket_data.operation ? val.ticket_data.operation : null;
|
||||
}
|
||||
const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&operation=${operation}`;
|
||||
rpjHandle(val, type) {
|
||||
const params = `?rpj=${val.id}&type=${type}`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/ticketHandle' + params,
|
||||
url: '/pages/workSpace/rpj/rpjCreate' + params,
|
||||
})
|
||||
},
|
||||
rpjDetail(val){
|
||||
const params = `?rpjId=${val.id}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/rpj/rpjDetail' + params,
|
||||
})
|
||||
},
|
||||
changeList(index){
|
||||
let that = this;
|
||||
that.dataTypye = index;
|
||||
if(index==='isMy'){
|
||||
that.params.create_by = that.vuex_user.id;
|
||||
}else{
|
||||
that.params.create_by = '';
|
||||
}
|
||||
that.resetSearch();
|
||||
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getTicketLists()
|
||||
this.params.pageNum = 1;
|
||||
this.lists = [];
|
||||
this.getLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.ticketList = [];
|
||||
this.getTicketLists();
|
||||
this.params.pageNum = 1;
|
||||
this.params.search = "";
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -130,15 +180,17 @@
|
|||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
>>>.uni-status-bar,
|
||||
.search-wrap {
|
||||
background-image: linear-gradient(270deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
|
||||
.my_duty {
|
||||
background-color: #f3fbff;
|
||||
|
|
@ -150,6 +202,7 @@
|
|||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
padding-top: 125upx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
|
|
@ -195,9 +248,11 @@
|
|||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
flex: 1;
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
|
|
@ -208,7 +263,7 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
/* .my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
|
@ -216,10 +271,11 @@
|
|||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
background-blend-mode: normal, normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background: #f3fbff;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
|
|
@ -265,5 +321,5 @@
|
|||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,375 @@
|
|||
<template>
|
||||
<view class="list-body">
|
||||
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="400rpx" leftText="工作人员选择"
|
||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="apply-info">
|
||||
<view class="row" v-for="(row,index) in workerList" :key="index" @tap="select(row)">
|
||||
<view class="center">
|
||||
<view class="name-tel">
|
||||
<view class="name">姓名:{{row.name}}</view>
|
||||
<view class="tel">手机号:{{row.phone}}</view>
|
||||
<view class="tel">职责:{{row.duty}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="icon bianji" @tap.stop="edit(row)">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button type="primary" class="select" @click="checkPeople">选择人员</button>
|
||||
</view>
|
||||
<button type="primary" class="addNew" @click="add">新增人员</button>
|
||||
<view class="dialogWrap" v-if="limitedPeople">
|
||||
<view class="dialogCont">
|
||||
<view class="dialogTitle">
|
||||
<view>选择作业人员</view>
|
||||
<view class="dialogCloseImg" @click="closeDialog"></view>
|
||||
</view>
|
||||
<form @submit="formSubmit">
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">作业人员</view>
|
||||
<uni-data-select :localdata="workerRange" v-model="formData.remployee" @change="selectWorker">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">项目负责人</view>
|
||||
<view>
|
||||
<switch name="is_manager" v-model="formData.is_manager" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">工作职责</view>
|
||||
<input class="workDuty" type="text" v-model="formData.duty" maxlength="20" placeholder="请输入" />
|
||||
</view>
|
||||
<view class="uni-form-item uni-column">
|
||||
<view class="title">证书</view>
|
||||
<uni-data-select :localdata="workerRange" v-model="formData.rcertificates" @change="selectWorker">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
<view class="uni-btn-v">
|
||||
<button class="mini-btn" type="primary" size="mini" form-type="submit">确定</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
<view class="apply-info" style="min-height: fit-content;display: flex;">
|
||||
|
||||
<button type="primary" plain="true" style="width: 25%;" @click="goBack">上一步</button>
|
||||
<button type="primary" style="width: 25%;" @click="rpjSubmit">提交</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "rpjWorkers",
|
||||
data() {
|
||||
return {
|
||||
rpj:'',
|
||||
limitedPeople: false,
|
||||
formData: {
|
||||
remployee: '',
|
||||
is_manager: '',
|
||||
duty: '',
|
||||
rcertificates: [],
|
||||
},
|
||||
initform: {},
|
||||
workerList: [],
|
||||
workerRange: [],
|
||||
dutyRange: [{
|
||||
value: '10',
|
||||
text: "作业人员"
|
||||
},
|
||||
{
|
||||
value: '20',
|
||||
text: "起重司机"
|
||||
},
|
||||
{
|
||||
value: '30',
|
||||
text: "司索人员"
|
||||
},
|
||||
{
|
||||
value: '40',
|
||||
text: "起重指挥"
|
||||
},
|
||||
{
|
||||
value: '40',
|
||||
text: "电工"
|
||||
},
|
||||
],
|
||||
certificateRange: [],
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
this.rpj = params.rpj;
|
||||
},
|
||||
onShow() {
|
||||
this.workerList = [];
|
||||
this.getWorkerList();
|
||||
this.getWorkerRange();
|
||||
// this.getVpeopleList();
|
||||
},
|
||||
methods: {
|
||||
formSubmit(val) {
|
||||
let that = this;
|
||||
that.formData.opl = that.oplId;
|
||||
that.$u.api.oplWorkerCreate(that.formData).then(res => {
|
||||
if (res.err_msg) {} else {
|
||||
that.getWorkerList();
|
||||
this.limitedPeople = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取所有已注册的工作人员
|
||||
getWorkerRange() {
|
||||
let that = this;
|
||||
that.$u.api.userList({
|
||||
page: 0
|
||||
}).then(res => {
|
||||
let workerRange = [];
|
||||
let obj = {};
|
||||
res.forEach(item => {
|
||||
obj = item;
|
||||
obj.value = item.id;
|
||||
obj.text = item.name;
|
||||
workerRange.push(obj);
|
||||
})
|
||||
that.workerRange = workerRange
|
||||
})
|
||||
},
|
||||
//获取该入厂项目的工作人员
|
||||
getWorkerList() {
|
||||
let that = this;
|
||||
that.workerList = [];
|
||||
that.$u.api.rpjMembers({
|
||||
page: 0,
|
||||
rpj: that.rpj
|
||||
}).then(res => {
|
||||
that.workerList = res
|
||||
})
|
||||
},
|
||||
selectWorker(e) {
|
||||
let that = this;
|
||||
that.formData.worker = e;
|
||||
if(e!==''){
|
||||
that.$u.api.hrmCertificate({
|
||||
employee__user:e,
|
||||
page: 0
|
||||
})
|
||||
.then((res) => {
|
||||
let certificateRange = [];
|
||||
let obj = {};
|
||||
res.forEach(item => {
|
||||
obj = item;
|
||||
obj.chencked = false;
|
||||
certificateRange.push(obj);
|
||||
})
|
||||
that.certificateRange = certificateRange
|
||||
console.log(res);
|
||||
});
|
||||
|
||||
}else{}
|
||||
},
|
||||
checkboxMeasuresChange(e) {
|
||||
let values = e.detail.value;
|
||||
this.formData.certificates = values;
|
||||
},
|
||||
checkPeople() {
|
||||
this.certificateRange = [];
|
||||
this.limitedPeople = true;
|
||||
},
|
||||
closeDialog() {
|
||||
this.limitedPeople = false;
|
||||
},
|
||||
select(row) {},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
add() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/addUser'
|
||||
})
|
||||
},
|
||||
edit(row) {},
|
||||
|
||||
nexStep(){
|
||||
let params = `?oplId=${this.oplId}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/operation/gasList'+params
|
||||
})
|
||||
},
|
||||
|
||||
//提交入场项目
|
||||
rpjSubmit(id) {
|
||||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
let that = this;
|
||||
let ticket = {};
|
||||
ticket.workflow = that.initform.workflow;
|
||||
ticket.ticket_data = {
|
||||
rpj: that.rpj
|
||||
};
|
||||
ticket.transition = id;
|
||||
that.$u.api.ticketCreate(ticket).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.err_msg) {} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
|
||||
}
|
||||
|
||||
.list-body {
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 113px;
|
||||
}
|
||||
|
||||
.apply-info {
|
||||
min-height: 70vh;
|
||||
width: 710upx;
|
||||
margin: 0 auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
padding: 12px 16px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.row {
|
||||
padding: 10upx;
|
||||
margin-bottom: 20upx;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.uni-list-cell {
|
||||
display: flex;
|
||||
padding: 10upx;
|
||||
margin-bottom: 20upx;
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.addNew {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 25px;
|
||||
line-height: 50px;
|
||||
box-shadow: 0 0 6px 2px rgba(0, 0, 0, .3);
|
||||
z-index: 100;
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.select {
|
||||
margin: auto;
|
||||
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
height: 80rpx;
|
||||
color: #fff;
|
||||
font-size: 30upx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dialogWrap {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 110;
|
||||
}
|
||||
|
||||
.dialogCont {
|
||||
width: 80vw;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin: auto;
|
||||
background-color: #ffffff;
|
||||
left: 10vw;
|
||||
transform: translateY(-50%);
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.dialogTitle {
|
||||
font-size: 36rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.uni-form-item {
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.uni-form-item>.title {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.uni-btn-v {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dialogCloseImg {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
background-image: url('../../../static/my/my_apply/zuofei.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.uni-label-pointer {
|
||||
min-width: 50%;
|
||||
display: inline-block;
|
||||
margin-right: 0!important;
|
||||
margin-bottom: 20upx;
|
||||
}
|
||||
.uni-form-item {
|
||||
height:fit-content!important;
|
||||
}
|
||||
.workDuty {
|
||||
font-size: 14px;
|
||||
border: 1px solid #e5e5e5;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
padding: 0 5px;
|
||||
padding-left: 10px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px #e5e5e5;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
height: 35px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<text class="form-left-text">来访事由</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
<uni-data-select v-model="formData.purpose" :localdata="range">
|
||||
<uni-data-select v-model="formData.purpose" :localdata="range" @change="purposeChange">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<input type="text" v-model="formData.name" maxlength="50" placeholder="来访概述" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom" style="height: 300rpx;">
|
||||
<view class="form-item border-bottom" style="height: 300rpx;" v-if="formData.purpose!==50">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">来访详述</text>
|
||||
</view>
|
||||
|
|
@ -40,9 +40,6 @@
|
|||
</view>
|
||||
<view class="form-right form-date">
|
||||
<uni-datetime-picker v-model="formData.visit_time" :border="false" />
|
||||
<!-- <picker mode="date" :value="formData.visit_time" @change="bindStartDateChange">
|
||||
<view class="uni-input">{{formData.visit_time}}</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
|
|
@ -52,14 +49,10 @@
|
|||
</view>
|
||||
<view class="form-right form-date">
|
||||
<uni-datetime-picker v-model="formData.leave_time" :border="false" />
|
||||
<!-- <picker mode="date" :value="formData.leave_time" @change="bindEndDateChange">
|
||||
<view class="uni-input">{{formData.leave_time}}</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">接待人</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
|
|
@ -67,7 +60,7 @@
|
|||
</uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
||||
<view class="form-left">
|
||||
<text class="form-left-text">来访单位</text>
|
||||
</view>
|
||||
|
|
@ -75,7 +68,7 @@
|
|||
<input type="text" v-model="formData.company" maxlength="50" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-item border-bottom" v-if="formData.purpose!==50">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<text class="form-left-text">来访级别</text>
|
||||
|
|
@ -87,7 +80,7 @@
|
|||
</view>
|
||||
<view class="form-item border-bottom">
|
||||
<view class="form-left">
|
||||
<text class="star">*</text>
|
||||
<!-- <text class="star">*</text> -->
|
||||
<text class="form-left-text">来访人数</text>
|
||||
</view>
|
||||
<view class="form-right">
|
||||
|
|
@ -110,14 +103,14 @@
|
|||
return {
|
||||
formData: {
|
||||
name: '', //来访概述
|
||||
purpose: '', //来访事由
|
||||
purpose: 10, //来访事由
|
||||
receptionist: '', //接待人
|
||||
visit_time: '', //来访时间
|
||||
leave_time: '', //离开时间
|
||||
description: '', //来访详述
|
||||
company: '', //来访单位
|
||||
level: '', //来访级别
|
||||
count_people: '', //来访人数
|
||||
level: 10, //来访级别
|
||||
count_people: 1, //来访人数
|
||||
},
|
||||
|
||||
depRange: [],
|
||||
|
|
@ -141,6 +134,9 @@
|
|||
}, {
|
||||
text: "开会",
|
||||
value: 40
|
||||
}, {
|
||||
text: "货车司机",
|
||||
value: 50
|
||||
}],
|
||||
levelRange: [{
|
||||
text: "一般",
|
||||
|
|
@ -245,6 +241,21 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
purposeChange(item){
|
||||
let that = this;
|
||||
debugger;
|
||||
console.log(item)
|
||||
|
||||
if(item===50){
|
||||
that.formData.receptionist = '';
|
||||
that.formData.company = '';
|
||||
that.formData.description = '';
|
||||
that.formData.name = '货车司机出入';
|
||||
that.formData.level = 10;
|
||||
}else{
|
||||
that.formData.name = '';
|
||||
}
|
||||
},
|
||||
/* 参数验证 */
|
||||
paramsCheck() {
|
||||
if (!nonNullCheck(this.formData.purpose)) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,263 @@
|
|||
<template>
|
||||
<view class="bodyContainer">
|
||||
<uni-nav-bar @clickLeft="goBack()" 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 wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>项目信息:</view>
|
||||
<view class="item">
|
||||
<view class="title">来访事由</view>
|
||||
<view class="content">
|
||||
<text>{{formData.purpose}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">来访概述</view>
|
||||
<view class="content">
|
||||
<text>{{formData.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">来访详述</view>
|
||||
<view class="content">
|
||||
<text>{{formData.description}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">来访时间</view>
|
||||
<view class="content">
|
||||
<text>{{formData.visit_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">离开时间</view>
|
||||
<view class="content">
|
||||
<text>{{formData.leave_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">接待人</view>
|
||||
<view class="content">
|
||||
<text>{{formData.receptionist}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">来访单位</view>
|
||||
<view class="content">
|
||||
<text>{{formData.company}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">来访级别</view>
|
||||
<view class="content">
|
||||
<text>{{formData.level}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">部门</view>
|
||||
<view class="content">
|
||||
<text>{{formData.belong_dept_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">来访人数</view>
|
||||
<view class="content">
|
||||
<text>{{formData.count_people}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrap-view wrap-top">
|
||||
<view class="item title"> <text class="blueLine"></text>人员列表:</view>
|
||||
<view class="visitorsWrap">
|
||||
<view class="visitorsItem itemTitle">
|
||||
<text class="visitorCell">姓名</text>
|
||||
<text class="visitorCell">手机号</text>
|
||||
<text class="visitorCell">操作</text>
|
||||
</view>
|
||||
<view class="visitorsItem" v-for="item in visitorsList" :key="item.id">
|
||||
<text class="visitorCell">{{item.visitor_.name}}</text>
|
||||
<text class="visitorCell">{{item.visitor_.phone}}</text>
|
||||
<view class="visitorCell">
|
||||
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.visitor_.blt_===null">绑卡</text>
|
||||
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "visit",
|
||||
data() {
|
||||
return {
|
||||
formData:{},
|
||||
visitorsList:[],
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
if (params.visit) {
|
||||
this.visitId = params.visit;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getVisitItem();
|
||||
this.getVpeopleList();
|
||||
},
|
||||
methods: {
|
||||
//获取已有游客
|
||||
getVpeopleList() {
|
||||
let that = this;
|
||||
that.$u.api.vmVpeople({
|
||||
page: 0,
|
||||
visit: that.visitId
|
||||
}).then(res => {
|
||||
that.visitorsList =res;
|
||||
})
|
||||
},
|
||||
getVisitItem() {
|
||||
this.$u.api.visitItem(this.visitId).then(res => {
|
||||
this.formData = res;
|
||||
})
|
||||
},
|
||||
bindBtl(row,type){
|
||||
let that = this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result);
|
||||
let form = {};
|
||||
form.type = type;
|
||||
form.code = res.result;
|
||||
form.employee = row.visitor_.employee;
|
||||
that.$u.api.thirdBltBind(form).then(res=>{
|
||||
debugger;
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
uni-page-body {
|
||||
color: #303133;
|
||||
font-size: 15px;
|
||||
height: 100%;
|
||||
background: #f3fbff;
|
||||
}
|
||||
.bodyContainer {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
>>>.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;
|
||||
padding-bottom: 30upx;
|
||||
}
|
||||
.wrap-top{
|
||||
line-height: 60upx;
|
||||
margin-top: 20upx;
|
||||
}
|
||||
.item {
|
||||
margin: 0rpx 32rpx;
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.item.title{
|
||||
height: 100upx;
|
||||
line-height: 100upx;
|
||||
border-bottom: 1upx solid #dddddd;
|
||||
}
|
||||
.item_bottom_border{
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #212121;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 3;
|
||||
color: #666666;
|
||||
|
||||
}
|
||||
.visitorsWrap{
|
||||
|
||||
}
|
||||
|
||||
.visitorsItem{
|
||||
display: flex;
|
||||
font-size: 28upx;
|
||||
}
|
||||
|
||||
.itemTitle{
|
||||
height: 80upx;
|
||||
font-size: 32upx;
|
||||
line-height: 80upx;
|
||||
}
|
||||
.itemTitle>.visitorCell{
|
||||
color: #212121;
|
||||
}
|
||||
.visitorCell{
|
||||
flex: 1;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
}
|
||||
.blueLine{
|
||||
height: 24upx;
|
||||
width: 10upx;
|
||||
background: #2a8cff;
|
||||
margin-top: 39upx;
|
||||
margin-right: 12upx;
|
||||
}
|
||||
.bindBtn{
|
||||
width: 80upx;
|
||||
height: 50upx;
|
||||
line-height: 50upx;
|
||||
background: #2a8cff;
|
||||
display: inline-block;
|
||||
border-radius: 16upx;
|
||||
color: #ffffff;
|
||||
font-size: 25upx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -3,6 +3,23 @@
|
|||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="来访项目" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="params.search"
|
||||
placeholder="请输入关键字" />
|
||||
<view class="right-btn" @click="searchHandle">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 主体 导航栏 -->
|
||||
<view class="tabbar-title">
|
||||
<view :class="{'text-title':true, 'active':dataTypye==='isMy'}" @click="changeList('isMy')">我的</view>
|
||||
<view :class="{'text-title':true, 'active':dataTypye==='all'}" @click="changeList('all')" v-if="employee">全部</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
|
|
@ -12,7 +29,7 @@
|
|||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
|
||||
|
|
@ -30,7 +47,7 @@
|
|||
<view class="info-details">创建人:{{val.create_by_.name}} </view> -->
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="visitHandle(val,'edit')" v-if="val.state===10">
|
||||
<view class="shenhezhong shenhe-status" @click="visitHandle(val,'edit')" v-if="val.state===10&&dataTypye==='isMy'">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
编辑
|
||||
</view>
|
||||
|
|
@ -50,9 +67,12 @@
|
|||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
params: {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
create_by: ''
|
||||
},
|
||||
totalNum: 0,
|
||||
lists: [],
|
||||
stateOptions: {
|
||||
|
|
@ -62,14 +82,15 @@
|
|||
40: "作业中",
|
||||
50: "已关闭",
|
||||
},
|
||||
dataTypye:'isMy',
|
||||
employee:false,
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
|
||||
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
|
||||
if (this.params.pageNum < totalPage) {
|
||||
this.params.pageNum += 1;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
|
|
@ -78,7 +99,11 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.vuex_user.type==='employee'){
|
||||
this.employee = true;
|
||||
}
|
||||
this.lists = [];
|
||||
this.params.create_by = this.vuex_user.id;
|
||||
this.getLists();
|
||||
},
|
||||
//下拉刷新
|
||||
|
|
@ -90,22 +115,34 @@
|
|||
methods: {
|
||||
getLists() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.pageNum = this.pageNum;
|
||||
obj.pageSize = this.pageSize;
|
||||
if (that.search !== '') {
|
||||
obj.search = that.search;
|
||||
}
|
||||
that.$u.api.visitList(obj).then(res => {
|
||||
that.$u.api.visitList(that.params).then(res => {
|
||||
that.lists = that.lists.concat(res.results);
|
||||
this.totalNum = res.count;
|
||||
})
|
||||
},
|
||||
visitHandle(val,type) {
|
||||
const params = `?visit=${val.id}&type=${type}`;
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/visitCreate' + params,
|
||||
})
|
||||
let params = `?visit=${val.id}&type=${type}`;
|
||||
if(type==='edit'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/visitCreate' + params,
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/visitDetail' + params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
changeList(index){
|
||||
let that = this;
|
||||
that.dataTypye = index;
|
||||
if(index==='isMy'){
|
||||
that.params.create_by = that.vuex_user.id;
|
||||
}else{
|
||||
that.params.create_by = '';
|
||||
}
|
||||
that.resetSearch();
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
|
|
@ -113,13 +150,13 @@
|
|||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.params.pageNum = 1;
|
||||
this.lists = [];
|
||||
this.getLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.params.pageNum = 1;
|
||||
this.params.search = "";
|
||||
this.lists = [];
|
||||
this.getLists();
|
||||
},
|
||||
|
|
@ -132,9 +169,10 @@
|
|||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar,
|
||||
.search-wrap {
|
||||
background-image: linear-gradient(270deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
|
|
@ -153,6 +191,7 @@
|
|||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
padding-top: 125upx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
|
|
@ -210,64 +249,4 @@
|
|||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background: #f3fbff;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -151,6 +151,9 @@
|
|||
},
|
||||
//提交工单
|
||||
submitticket(id) {
|
||||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
let ticket = {};
|
||||
ticket.workflow = this.initform.workflow;
|
||||
ticket.ticket_data = {
|
||||
|
|
@ -158,6 +161,7 @@
|
|||
};
|
||||
ticket.transition = id;
|
||||
this.$u.api.ticketCreate(ticket).then((res) => {
|
||||
uni.hideLoading();
|
||||
if(res.err_msg){}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/workSpace/workSpace'
|
||||
|
|
|
|||
|
|
@ -5,19 +5,43 @@
|
|||
style="position: absolute;top:0;left:0;bottom:0;right:0;height: 290rpx;background-image: url(../../static/workSpace/bgimg.png);background-position: center bottom;background-size: 100%;">
|
||||
</view>
|
||||
<view class="top-title" style="display: flex;">
|
||||
<block v-for="(item,index) in routerList" :key="index">
|
||||
<!-- <block v-for="(item,index) in routerList" :key="index">
|
||||
<view class="title-item" @click="goInto(index)">
|
||||
<view class="title-icon">
|
||||
<image :src="require('@/static/workSpace/'+item.icon+'')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title-text">{{item.name}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</block> -->
|
||||
<view class="title-item" @click="goInto(0)" v-if="limitedOperation">
|
||||
<view class="title-icon">
|
||||
<image :src="require('@/static/workSpace/specialmatter.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title-text">新增作业</text>
|
||||
</view>
|
||||
<view class="title-item" @click="goInto(1)" v-if="limitedRpj">
|
||||
<view class="title-icon">
|
||||
<image :src="require('@/static/workSpace/hetong.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title-text">新增入厂</text>
|
||||
</view>
|
||||
<view class="title-item" @click="goInto(2)">
|
||||
<view class="title-icon">
|
||||
<image :src="require('@/static/workSpace/renli.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title-text">新增来访</text>
|
||||
</view>
|
||||
<view class="title-item" @click="goInto(3)">
|
||||
<view class="title-icon">
|
||||
<image :src="require('@/static/workSpace/yinzhang.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<text class="title-text">新增违章</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 22rpx;">
|
||||
</view>
|
||||
<view class="my-apply">
|
||||
<view class="my-apply" v-if="limitedOperation">
|
||||
<view class="title">
|
||||
<view class="">
|
||||
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
|
||||
|
|
@ -28,10 +52,9 @@
|
|||
<uni-icons type="right" :size="15" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
|
||||
<view class="my-apply">
|
||||
<view class="my-apply" v-if="limitedRpj">
|
||||
<view class="title">
|
||||
<view class="">
|
||||
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
|
||||
|
|
@ -42,9 +65,8 @@
|
|||
<uni-icons type="right" :size="15" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="my-apply">
|
||||
<view class="title">
|
||||
<view class="">
|
||||
|
|
@ -56,7 +78,6 @@
|
|||
<uni-icons type="right" :size="15" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
|
@ -68,6 +89,9 @@
|
|||
return {
|
||||
name: "",
|
||||
username: "",
|
||||
limitedOperation:false,
|
||||
limitedRpj:false,
|
||||
limitedVisit:false,
|
||||
routerList: [{
|
||||
name: '新增作业',
|
||||
icon: 'specialmatter.png',
|
||||
|
|
@ -89,8 +113,10 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
// this._getMyApply();
|
||||
// this.getUserInfo();
|
||||
debugger;
|
||||
console.log(this.vuex_perm)
|
||||
this.limitedRpj = this.vuex_perm.includes('rpj.create')>-1||this.vuex_perm.includes('superuser')>-1;
|
||||
this.limitedOperation = this.vuex_perm.includes('operation.create')>-1||this.vuex_perm.includes('superuser')>-1;
|
||||
},
|
||||
methods: {
|
||||
goInto(index) {
|
||||
|
|
@ -106,8 +132,11 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/workSpace/visit/visitCreate'
|
||||
})
|
||||
}else if (index == 3) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/addViolation'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
getUserInfo() {
|
||||
var promise;
|
||||
|
|
@ -332,13 +361,13 @@
|
|||
width: 720rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 10rpx;
|
||||
|
||||
border-bottom: 1upx solid #eeeeee;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 660rpx;
|
||||
height: 1rpx;
|
||||
background-color: #eeeeee;
|
||||
height: 1upx;
|
||||
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
|
@ -12,7 +12,7 @@ try{
|
|||
}
|
||||
|
||||
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
|
||||
let saveStateKeys = ['vuex_user', 'vuex_token', 'vuex_appid'];
|
||||
let saveStateKeys = ['vuex_user', 'vuex_token', 'vuex_appid','vuex_perm','vuex_employee'];
|
||||
|
||||
// 保存变量到本地存储中
|
||||
const saveLifeData = function(key, value){
|
||||
|
|
@ -33,11 +33,12 @@ const store = new Vuex.Store({
|
|||
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
||||
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {},
|
||||
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
|
||||
vuex_perm: lifeData.vuex_perm ? lifeData.vuex_perm : [],
|
||||
vuex_appid: 'wxf7d6140f507466be',
|
||||
vuex_login: 'http://qyjy.ctc-zc.com/h5/',
|
||||
vuex_host: 'http://127.0.0.1:8000',
|
||||
//vuex_api: 'http://47.95.0.242:9101/api',
|
||||
vuex_api: 'http://1.203.161.103:2800/api',
|
||||
vuex_api: 'http://10.99.5.79:20309/api',
|
||||
// vuex_apifile: 'http://127.0.0.1:8000/api/file/',
|
||||
|
||||
// vuex_host: 'https://testsearch.ctc.ac.cn',
|
||||
|
|
|
|||
|
|
@ -1,3 +1,41 @@
|
|||
## 1.0.2(2022-07-04)
|
||||
- 修复 在uni-forms下样式不生效的bug
|
||||
## 1.0.1(2021-11-23)
|
||||
- 修复 参数为对象的情况下,url在某些情况显示错误的bug
|
||||
## 1.0.0(2021-11-19)
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-file-picker](https://uniapp.dcloud.io/component/uniui/uni-file-picker)
|
||||
## 0.2.16(2021-11-08)
|
||||
- 修复 传入空对象 ,显示错误的Bug
|
||||
## 0.2.15(2021-08-30)
|
||||
- 修复 return-type="object" 时且存在v-model时,无法删除文件的Bug
|
||||
## 0.2.14(2021-08-23)
|
||||
- 新增 参数中返回 fileID 字段
|
||||
## 0.2.13(2021-08-23)
|
||||
- 修复 腾讯云传入fileID 不能回显的bug
|
||||
- 修复 选择图片后,不能放大的问题
|
||||
## 0.2.12(2021-08-17)
|
||||
- 修复 由于 0.2.11 版本引起的不能回显图片的Bug
|
||||
## 0.2.11(2021-08-16)
|
||||
- 新增 clearFiles(index) 方法,可以手动删除指定文件
|
||||
- 修复 v-model 值设为 null 报错的Bug
|
||||
## 0.2.10(2021-08-13)
|
||||
- 修复 return-type="object" 时,无法删除文件的Bug
|
||||
## 0.2.9(2021-08-03)
|
||||
- 修复 auto-upload 属性失效的Bug
|
||||
## 0.2.8(2021-07-31)
|
||||
- 修复 fileExtname属性不指定值报错的Bug
|
||||
## 0.2.7(2021-07-31)
|
||||
- 修复 在某种场景下图片不回显的Bug
|
||||
## 0.2.6(2021-07-30)
|
||||
- 修复 return-type为object下,返回值不正确的Bug
|
||||
## 0.2.5(2021-07-30)
|
||||
- 修复(重要) H5 平台下如果和uni-forms组件一同使用导致页面卡死的问题
|
||||
## 0.2.3(2021-07-28)
|
||||
- 优化 调整示例代码
|
||||
## 0.2.2(2021-07-27)
|
||||
- 修复 vue3 下赋值错误的Bug
|
||||
- 优化 h5平台下上传文件导致页面卡死的问题
|
||||
## 0.2.0(2021-07-13)
|
||||
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||
## 0.1.1(2021-07-02)
|
||||
|
|
|
|||
|
|
@ -1,142 +1,224 @@
|
|||
'use strict';
|
||||
|
||||
// Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const ERR_MSG_OK = 'chooseAndUploadFile:ok';
|
||||
const ERR_MSG_FAIL = 'chooseAndUploadFile:fail';
|
||||
|
||||
function chooseImage(opts) {
|
||||
const { count, sizeType, sourceType = ['album', 'camera'], extension } = opts
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.chooseImage({
|
||||
count,
|
||||
sizeType,
|
||||
sourceType,
|
||||
extension,
|
||||
success(res) {
|
||||
resolve(normalizeChooseAndUploadFileRes(res, 'image'));
|
||||
},
|
||||
fail(res) {
|
||||
reject({
|
||||
errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL),
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
function chooseVideo(opts) {
|
||||
const { camera, compressed, maxDuration, sourceType = ['album', 'camera'], extension } = opts;
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.chooseVideo({
|
||||
camera,
|
||||
compressed,
|
||||
maxDuration,
|
||||
sourceType,
|
||||
extension,
|
||||
success(res) {
|
||||
const { tempFilePath, duration, size, height, width } = res;
|
||||
resolve(normalizeChooseAndUploadFileRes({
|
||||
errMsg: 'chooseVideo:ok',
|
||||
tempFilePaths: [tempFilePath],
|
||||
tempFiles: [
|
||||
{
|
||||
name: (res.tempFile && res.tempFile.name) || '',
|
||||
path: tempFilePath,
|
||||
size,
|
||||
type: (res.tempFile && res.tempFile.type) || '',
|
||||
width,
|
||||
height,
|
||||
duration,
|
||||
fileType: 'video',
|
||||
cloudPath: '',
|
||||
},
|
||||
],
|
||||
}, 'video'));
|
||||
},
|
||||
fail(res) {
|
||||
reject({
|
||||
errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL),
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
function chooseAll(opts) {
|
||||
const { count, extension } = opts;
|
||||
return new Promise((resolve, reject) => {
|
||||
let chooseFile = uni.chooseFile;
|
||||
if (typeof wx !== 'undefined' &&
|
||||
typeof wx.chooseMessageFile === 'function') {
|
||||
chooseFile = wx.chooseMessageFile;
|
||||
}
|
||||
if (typeof chooseFile !== 'function') {
|
||||
return reject({
|
||||
errMsg: ERR_MSG_FAIL + ' 请指定 type 类型,该平台仅支持选择 image 或 video。',
|
||||
});
|
||||
}
|
||||
chooseFile({
|
||||
type: 'all',
|
||||
count,
|
||||
extension,
|
||||
success(res) {
|
||||
resolve(normalizeChooseAndUploadFileRes(res));
|
||||
},
|
||||
fail(res) {
|
||||
reject({
|
||||
errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL),
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
function normalizeChooseAndUploadFileRes(res, fileType) {
|
||||
res.tempFiles.forEach((item, index) => {
|
||||
if (!item.name) {
|
||||
item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
|
||||
}
|
||||
if (fileType) {
|
||||
item.fileType = fileType;
|
||||
}
|
||||
item.cloudPath =
|
||||
Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
|
||||
});
|
||||
// wx.chooseMessageFile
|
||||
if (!res.tempFilePaths) {
|
||||
res.tempFilePaths = res.tempFiles.map((file) => file.path);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function uploadCloudFiles(res, max = 5, onUploadProgress) {}
|
||||
function uploadFiles(choosePromise, { onChooseFile, onUploadProgress }) {
|
||||
return choosePromise
|
||||
.then((res) => {
|
||||
if (onChooseFile) {
|
||||
const customChooseRes = onChooseFile(res);
|
||||
if (typeof customChooseRes !== 'undefined') {
|
||||
return Promise.resolve(customChooseRes).then((chooseRes) => typeof chooseRes === 'undefined' ? res : chooseRes);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
})
|
||||
.then((res) => {
|
||||
if (res === false) {
|
||||
return {
|
||||
errMsg: ERR_MSG_OK,
|
||||
tempFilePaths: [],
|
||||
tempFiles: [],
|
||||
};
|
||||
}
|
||||
return res
|
||||
// return uploadCloudFiles(res, 5, onUploadProgress);
|
||||
})
|
||||
}
|
||||
function chooseAndUploadFile(opts = { type: 'all' }) {
|
||||
if (opts.type === 'image') {
|
||||
return uploadFiles(chooseImage(opts), opts);
|
||||
}
|
||||
else if (opts.type === 'video') {
|
||||
return uploadFiles(chooseVideo(opts), opts);
|
||||
}
|
||||
return uploadFiles(chooseAll(opts), opts);
|
||||
const {
|
||||
count,
|
||||
sizeType = ['original', 'compressed'],
|
||||
sourceType = ['album', 'camera'],
|
||||
extension
|
||||
} = opts
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.chooseImage({
|
||||
count,
|
||||
sizeType,
|
||||
sourceType,
|
||||
extension,
|
||||
success(res) {
|
||||
resolve(normalizeChooseAndUploadFileRes(res, 'image'));
|
||||
},
|
||||
fail(res) {
|
||||
reject({
|
||||
errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL),
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export {chooseAndUploadFile};
|
||||
function chooseVideo(opts) {
|
||||
const {
|
||||
camera,
|
||||
compressed,
|
||||
maxDuration,
|
||||
sourceType = ['album', 'camera'],
|
||||
extension
|
||||
} = opts;
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.chooseVideo({
|
||||
camera,
|
||||
compressed,
|
||||
maxDuration,
|
||||
sourceType,
|
||||
extension,
|
||||
success(res) {
|
||||
const {
|
||||
tempFilePath,
|
||||
duration,
|
||||
size,
|
||||
height,
|
||||
width
|
||||
} = res;
|
||||
resolve(normalizeChooseAndUploadFileRes({
|
||||
errMsg: 'chooseVideo:ok',
|
||||
tempFilePaths: [tempFilePath],
|
||||
tempFiles: [
|
||||
{
|
||||
name: (res.tempFile && res.tempFile.name) || '',
|
||||
path: tempFilePath,
|
||||
size,
|
||||
type: (res.tempFile && res.tempFile.type) || '',
|
||||
width,
|
||||
height,
|
||||
duration,
|
||||
fileType: 'video',
|
||||
cloudPath: '',
|
||||
}, ],
|
||||
}, 'video'));
|
||||
},
|
||||
fail(res) {
|
||||
reject({
|
||||
errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL),
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function chooseAll(opts) {
|
||||
const {
|
||||
count,
|
||||
extension
|
||||
} = opts;
|
||||
return new Promise((resolve, reject) => {
|
||||
let chooseFile = uni.chooseFile;
|
||||
if (typeof wx !== 'undefined' &&
|
||||
typeof wx.chooseMessageFile === 'function') {
|
||||
chooseFile = wx.chooseMessageFile;
|
||||
}
|
||||
if (typeof chooseFile !== 'function') {
|
||||
return reject({
|
||||
errMsg: ERR_MSG_FAIL + ' 请指定 type 类型,该平台仅支持选择 image 或 video。',
|
||||
});
|
||||
}
|
||||
chooseFile({
|
||||
type: 'all',
|
||||
count,
|
||||
extension,
|
||||
success(res) {
|
||||
resolve(normalizeChooseAndUploadFileRes(res));
|
||||
},
|
||||
fail(res) {
|
||||
reject({
|
||||
errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL),
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function normalizeChooseAndUploadFileRes(res, fileType) {
|
||||
res.tempFiles.forEach((item, index) => {
|
||||
if (!item.name) {
|
||||
item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
|
||||
}
|
||||
if (fileType) {
|
||||
item.fileType = fileType;
|
||||
}
|
||||
item.cloudPath =
|
||||
Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
|
||||
});
|
||||
if (!res.tempFilePaths) {
|
||||
res.tempFilePaths = res.tempFiles.map((file) => file.path);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function uploadCloudFiles(files, max = 5, onUploadProgress) {
|
||||
files = JSON.parse(JSON.stringify(files))
|
||||
const len = files.length
|
||||
let count = 0
|
||||
let self = this
|
||||
return new Promise(resolve => {
|
||||
while (count < max) {
|
||||
next()
|
||||
}
|
||||
|
||||
function next() {
|
||||
let cur = count++
|
||||
if (cur >= len) {
|
||||
!files.find(item => !item.url && !item.errMsg) && resolve(files)
|
||||
return
|
||||
}
|
||||
const fileItem = files[cur]
|
||||
const index = self.files.findIndex(v => v.uuid === fileItem.uuid)
|
||||
fileItem.url = ''
|
||||
delete fileItem.errMsg
|
||||
|
||||
uniCloud
|
||||
.uploadFile({
|
||||
filePath: fileItem.path,
|
||||
cloudPath: fileItem.cloudPath,
|
||||
fileType: fileItem.fileType,
|
||||
onUploadProgress: res => {
|
||||
res.index = index
|
||||
onUploadProgress && onUploadProgress(res)
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
fileItem.url = res.fileID
|
||||
fileItem.index = index
|
||||
if (cur < len) {
|
||||
next()
|
||||
}
|
||||
})
|
||||
.catch(res => {
|
||||
fileItem.errMsg = res.errMsg || res.message
|
||||
fileItem.index = index
|
||||
if (cur < len) {
|
||||
next()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function uploadFiles(choosePromise, {
|
||||
onChooseFile,
|
||||
onUploadProgress
|
||||
}) {
|
||||
return choosePromise
|
||||
.then((res) => {
|
||||
if (onChooseFile) {
|
||||
const customChooseRes = onChooseFile(res);
|
||||
if (typeof customChooseRes !== 'undefined') {
|
||||
return Promise.resolve(customChooseRes).then((chooseRes) => typeof chooseRes === 'undefined' ?
|
||||
res : chooseRes);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
})
|
||||
.then((res) => {
|
||||
if (res === false) {
|
||||
return {
|
||||
errMsg: ERR_MSG_OK,
|
||||
tempFilePaths: [],
|
||||
tempFiles: [],
|
||||
};
|
||||
}
|
||||
return res
|
||||
})
|
||||
}
|
||||
|
||||
function chooseAndUploadFile(opts = {
|
||||
type: 'all'
|
||||
}) {
|
||||
if (opts.type === 'image') {
|
||||
return uploadFiles(chooseImage(opts), opts);
|
||||
}
|
||||
else if (opts.type === 'video') {
|
||||
return uploadFiles(chooseVideo(opts), opts);
|
||||
}
|
||||
return uploadFiles(chooseAll(opts), opts);
|
||||
}
|
||||
|
||||
export {
|
||||
chooseAndUploadFile,
|
||||
uploadCloudFiles
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
<script>
|
||||
export default {
|
||||
name: "uploadFile",
|
||||
emits:['uploadFiles','choose','delFile'],
|
||||
props: {
|
||||
filesList: {
|
||||
type: Array,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="uni-file-picker__container">
|
||||
<view class="file-picker__box" v-for="(item,index) in filesList" :key="index" :style="boxStyle">
|
||||
<view class="file-picker__box-content" :style="borderStyle">
|
||||
<image class="file-image" :src="item.path" mode="aspectFill" @click.stop="prviewImage(item,index)"></image>
|
||||
<image class="file-image" :src="item.url" mode="aspectFill" @click.stop="prviewImage(item,index)"></image>
|
||||
<view v-if="delIcon && !readonly" class="icon-del-box" @click.stop="delFile(index)">
|
||||
<view class="icon-del"></view>
|
||||
<view class="icon-del rotate"></view>
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
<script>
|
||||
export default {
|
||||
name: "uploadImage",
|
||||
emits:['uploadFiles','choose','delFile'],
|
||||
props: {
|
||||
filesList: {
|
||||
type: Array,
|
||||
|
|
@ -116,12 +117,14 @@
|
|||
border
|
||||
} = this.styles
|
||||
let obj = {}
|
||||
const widthDefaultValue = 1
|
||||
const radiusDefaultValue = 3
|
||||
if (typeof border === 'boolean') {
|
||||
obj.border = border ? '1px #eee solid' : 'none'
|
||||
} else {
|
||||
let width = (border && border.width) || 1
|
||||
let width = (border && border.width) || widthDefaultValue
|
||||
width = this.value2px(width)
|
||||
let radius = (border && border.radius) || 5
|
||||
let radius = (border && border.radius) || radiusDefaultValue
|
||||
radius = this.value2px(radius)
|
||||
obj = {
|
||||
'border-width': width,
|
||||
|
|
@ -154,7 +157,7 @@
|
|||
}
|
||||
if(this.disablePreview) return
|
||||
this.filesList.forEach(i => {
|
||||
urls.push(i.path)
|
||||
urls.push(i.url)
|
||||
})
|
||||
|
||||
uni.previewImage({
|
||||
|
|
@ -205,7 +208,7 @@
|
|||
left: 0;
|
||||
margin: 5px;
|
||||
border: 1px #eee solid;
|
||||
border-radius: 8px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
|
@ -270,8 +273,8 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
border-radius: 50%;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
* 获取文件名和后缀
|
||||
* @param {String} name
|
||||
*/
|
||||
export const get_file_ext = (name) => {
|
||||
const last_len = name.lastIndexOf('.')
|
||||
const len = name.length
|
||||
return {
|
||||
name: name.substring(0, last_len),
|
||||
ext: name.substring(last_len + 1, len)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取扩展名
|
||||
* @param {Array} fileExtname
|
||||
*/
|
||||
export const get_extname = (fileExtname) => {
|
||||
if (!Array.isArray(fileExtname)) {
|
||||
let extname = fileExtname.replace(/(\[|\])/g, '')
|
||||
return extname.split(',')
|
||||
} else {
|
||||
return fileExtname
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件和检测是否可选
|
||||
*/
|
||||
export const get_files_and_is_max = (res, _extname) => {
|
||||
let filePaths = []
|
||||
let files = []
|
||||
if(!_extname || _extname.length === 0){
|
||||
return {
|
||||
filePaths,
|
||||
files
|
||||
}
|
||||
}
|
||||
res.tempFiles.forEach(v => {
|
||||
let fileFullName = get_file_ext(v.name)
|
||||
const extname = fileFullName.ext.toLowerCase()
|
||||
if (_extname.indexOf(extname) !== -1) {
|
||||
files.push(v)
|
||||
filePaths.push(v.path)
|
||||
}
|
||||
})
|
||||
if (files.length !== res.tempFiles.length) {
|
||||
uni.showToast({
|
||||
title: `当前选择了${res.tempFiles.length}个文件 ,${res.tempFiles.length - files.length} 个文件格式不正确`,
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
filePaths,
|
||||
files
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取图片信息
|
||||
* @param {Object} filepath
|
||||
*/
|
||||
export const get_file_info = (filepath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getImageInfo({
|
||||
src: filepath,
|
||||
success(res) {
|
||||
resolve(res)
|
||||
},
|
||||
fail(err) {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取封装数据
|
||||
*/
|
||||
export const get_file_data = async (files, type = 'image') => {
|
||||
// 最终需要上传数据库的数据
|
||||
let fileFullName = get_file_ext(files.name)
|
||||
const extname = fileFullName.ext.toLowerCase()
|
||||
let filedata = {
|
||||
name: files.name,
|
||||
uuid: files.uuid,
|
||||
extname: extname || '',
|
||||
cloudPath: files.cloudPath,
|
||||
fileType: files.fileType,
|
||||
url: files.path || files.path,
|
||||
size: files.size, //单位是字节
|
||||
image: {},
|
||||
path: files.path,
|
||||
video: {}
|
||||
}
|
||||
if (type === 'image') {
|
||||
const imageinfo = await get_file_info(files.path)
|
||||
delete filedata.video
|
||||
filedata.image.width = imageinfo.width
|
||||
filedata.image.height = imageinfo.height
|
||||
filedata.image.location = imageinfo.path
|
||||
} else {
|
||||
delete filedata.image
|
||||
}
|
||||
return filedata
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "uni-file-picker",
|
||||
"displayName": "uni-file-picker 文件选择上传",
|
||||
"version": "0.2.0",
|
||||
"version": "1.0.2",
|
||||
"description": "文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"dependencies": ["uni-scss"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
|
|
@ -75,6 +75,10 @@
|
|||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,295 +7,5 @@
|
|||
|
||||
文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间
|
||||
|
||||
> **注意事项**
|
||||
> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
|
||||
> - 组件需要依赖 `sass` 插件 ,请自行手动安装
|
||||
> - 如不绑定服务空间,`autoUpload`默认为`false`且不可更改
|
||||
> - 选择文件目前只支持 `H5` 和 `微信小程序平台` ,且 `微信小程序平台` 使用 `wx.chooseMessageFile()`
|
||||
> - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### FilePicker Props
|
||||
|
||||
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
|
||||
| :-: | :-: | :-: | :-: | :-: |
|
||||
| v-model/value | Array\Object | - | - | 组件数据,通常用来回显 ,类型由`return-type`属性决定 ,**格式见下文** |
|
||||
| disabled | Boolean | false | - | 组件禁用 |
|
||||
| readonly | Boolean | false | - | 组件只读,不可选择,不显示进度,不显示删除按钮 |
|
||||
| return-type | String | array | array/object | 限制 `value` 格式,当为 `object` 时 ,组件只能单选,且会覆盖 |
|
||||
| disable-preview| Boolean | false | - | 禁用图片预览,仅 `mode:grid`生效 |
|
||||
| del-icon | Boolean | true | - | 是否显示删除按钮 |
|
||||
| auto-upload | Boolean | true | - | 是否自动上传,值为`true`则只触发@select,可自行上传|
|
||||
| limit | Number\String | 9 | - | 最大选择个数 ,h5 会自动忽略多选的部分 |
|
||||
| title | String | - | - | 组件标题,右侧显示上传计数 |
|
||||
| mode | String | list | list/grid | 选择文件后的文件列表样式 |
|
||||
| file-mediatype| String | image | image/video/all | 选择文件类型,all 只支持 H5 和微信小程序平台 |
|
||||
| file-extname | Array\String | - | - | 选择文件后缀,字符串的情况下需要用逗号分隔(推荐使用字符串),根据 `file-mediatype` 属性而不同|
|
||||
| list-styles | Object | - | - | `mode:list` 时的样式 |
|
||||
| image-styles | Object | - | - | `mode:grid` 时的样式 |
|
||||
|
||||
|
||||
### value 格式
|
||||
|
||||
三个属性必填,否则影响组件显示
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name":"file.txt",
|
||||
"extname":"txt",
|
||||
"url":"https://xxxx",
|
||||
// ...
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
### list-styles 格式
|
||||
|
||||
```json
|
||||
{
|
||||
"borderStyle":{
|
||||
"color":"#eee", // 边框颜色
|
||||
"width":"1px", // 边框宽度
|
||||
"style":"solid", // 边框样式
|
||||
"radius":"5px" // 边框圆角,不支持百分比
|
||||
},
|
||||
"border":false, // 是否显示边框
|
||||
"dividline":true // 是否显示分隔线
|
||||
}
|
||||
```
|
||||
|
||||
### image-styles 格式
|
||||
|
||||
```json
|
||||
{
|
||||
"height": 60, // 边框高度
|
||||
"width": 60, // 边框宽度
|
||||
"border":{ // 如果为 Boolean 值,可以控制边框显示与否
|
||||
"color":"#eee", // 边框颜色
|
||||
"width":"1px", // 边框宽度
|
||||
"style":"solid", // 边框样式
|
||||
"radius":"50%" // 边框圆角,支持百分比
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### FilePicker Events
|
||||
|
||||
|事件称名 |说明 | 返回值 |
|
||||
|:-: |:-: | :-: |
|
||||
|@select | 选择文件后触发 | 见下文|
|
||||
|@progress|文件上传时触发 | 见下文|
|
||||
|@success |上传成功触发 | 见下文|
|
||||
|@fail |上传失败触发 | 见下文|
|
||||
|@delete |文件从列表移除时触发| 见下文|
|
||||
|
||||
|
||||
#### Callback Params
|
||||
|
||||
```json
|
||||
{
|
||||
"progress" : Number, // 上传进度 ,仅 @progress 事件包含此字段
|
||||
"index" : Number, // 上传文件索引 ,仅 @progress 事件包含此字段
|
||||
"tempFile" : file, // 当前文件对象 ,包含文件流,文件大小,文件名称等,仅 @progress 事件包含此字段
|
||||
"tempFiles" : files, // 文件列表,包含文件流,文件大小,文件名称等
|
||||
"tempFilePaths" : filePaths, // 文件地址列表,@sucess 事件为上传后的线上文件地址
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
### FilePicker Methods
|
||||
|
||||
通过 `$ref` 调用
|
||||
|
||||
| 方法称名 | 说明 | 参数 |
|
||||
| :-: | :-: | :-: |
|
||||
| upload | 手动上传 ,如`autoUpload`为`false` ,必须调用此方法| - |
|
||||
|
||||
### FilePicker Slots
|
||||
|
||||
插槽可定义上传按钮显示样式
|
||||
|
||||
| 插槽名 | 说明 |
|
||||
| :-: | :-: |
|
||||
| default |默认插槽|
|
||||
|
||||
## 组件用法
|
||||
|
||||
### 基础用法
|
||||
|
||||
```html
|
||||
<uni-file-picker
|
||||
v-model="imageValue"
|
||||
fileMediatype="image"
|
||||
mode="grid"
|
||||
@select="select"
|
||||
@progress="progress"
|
||||
@success="success"
|
||||
@fail="fail"
|
||||
/>
|
||||
```
|
||||
|
||||
```javascript
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
imageValue:[]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
// 获取上传状态
|
||||
select(e){
|
||||
console.log('选择文件:',e)
|
||||
}
|
||||
// 获取上传进度
|
||||
progress(e){
|
||||
console.log('上传进度:',e)
|
||||
},
|
||||
|
||||
// 上传成功
|
||||
success(e){
|
||||
console.log('上传成功')
|
||||
},
|
||||
|
||||
// 上传失败
|
||||
fail(e){
|
||||
console.log('上传失败:',e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 选择指定后缀图片,且限制选择个数
|
||||
|
||||
配置 `file-mediatype` 属性为 `image`,限定只选择图片
|
||||
|
||||
配置 `file-extname` 属性为 `'png,jpg'`,限定只选择 `png`和`jpg`后缀的图片
|
||||
|
||||
配置 `limit` 属性为 1 ,则最多选择一张图片
|
||||
|
||||
配置 `mode` 属性为 `grid` ,可以使用九宫格样式选择图片
|
||||
|
||||
|
||||
```html
|
||||
<uni-file-picker
|
||||
v-model="imageValue"
|
||||
file-mediatype="image"
|
||||
mode="grid"
|
||||
file-extname="png,jpg"
|
||||
:limit="1"
|
||||
@progress="progress"
|
||||
@success="success"
|
||||
@fail="fail"
|
||||
@select="select"
|
||||
/>
|
||||
```
|
||||
|
||||
### 手动上传
|
||||
|
||||
配置 `auto-upload` 属性为 `false` ,可以停止自动上传,通过`ref`调用`upload`方法自行选择上传时机
|
||||
|
||||
```html
|
||||
<view>
|
||||
<uni-file-picker ref="files" :auto-upload="false"/>
|
||||
<button @click="upload">上传文件</button>
|
||||
</view>
|
||||
```
|
||||
|
||||
```javascript
|
||||
export default {
|
||||
data() {},
|
||||
methods:{
|
||||
upload(){
|
||||
this.$refs.files.upload()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 单选图片且点击再次选择
|
||||
|
||||
配置 `disable-preview` 属性为 `true`,禁用点击预览图片功能
|
||||
|
||||
配置 `del-icon` 属性为 `false`,隐藏删除按钮
|
||||
|
||||
配置 `return-type` 属性为 `object`,设置 `value` 类型 ,如需绑定 `array`类型 ,则设置`limit:1`,可达到一样的效果
|
||||
|
||||
|
||||
|
||||
```html
|
||||
<uni-file-picker
|
||||
disable-preview
|
||||
:del-icon="false"
|
||||
return-type="object"
|
||||
>选择头像</uni-file-picker>
|
||||
```
|
||||
|
||||
### 自定义样式
|
||||
|
||||
配置 `image-styles` 属性,可以自定义`mode:image`时的回显样式
|
||||
|
||||
配置 `list-styles` 属性,可以自定义`mode:video|| mode:all`时的回显样式
|
||||
|
||||
```html
|
||||
<view>
|
||||
<uni-file-picker fileMediatype="image" :image-styles="imageStyles"/>
|
||||
<uni-file-picker fileMediatype="all" :list-styles="listStyles"/>
|
||||
</view>
|
||||
```
|
||||
|
||||
```javascript
|
||||
export default {
|
||||
data() {
|
||||
imageStyles:{
|
||||
width:64,
|
||||
height:64,
|
||||
border:{
|
||||
color:"#ff5a5f",
|
||||
width:2,
|
||||
style:'dashed',
|
||||
radius:'2px'
|
||||
}
|
||||
},
|
||||
listStyles:{
|
||||
// 是否显示边框
|
||||
border: true,
|
||||
// 是否显示分隔线
|
||||
dividline: true,
|
||||
// 线条样式
|
||||
borderStyle: {
|
||||
width:1,
|
||||
color:'blue',
|
||||
radius:2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 使用插槽
|
||||
|
||||
使用默认插槽可以自定义选择文件按钮样式
|
||||
|
||||
```html
|
||||
<uni-file-picker
|
||||
v-model="value" file-mediatype="all">
|
||||
<button>选择文件</button>
|
||||
</uni-file-picker>
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 组件示例
|
||||
|
||||
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/file-picker/file-picker](https://hellouniapp.dcloud.net.cn/pages/extUI/file-picker/file-picker)
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-file-picker)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||
|
|
@ -0,0 +1 @@
|
|||
https://ide.dcloud.net.cn/build/download/44f97960-16fa-11ed-bcce-fd2237f57dec
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
andrCertfile=D:/workFile/ehs/zc_ehs.keystore
|
||||
andrCertAlias=zc_ehs
|
||||
andrCertPass=/gcnEC4bjgAEyk4AUMQk+w==
|
||||
BIN
uview-ui/unpackage/cache/wgt/__UNI__B00D419/.manifest/google-keystore.keystore
vendored
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var __UniViewStartTime__ = Date.now();
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title>View</title>
|
||||
<link rel="stylesheet" href="view.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="__uniappes6.js"></script>
|
||||
<script src="view.umd.min.js"></script>
|
||||
<script src="app-view.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
var isReady=false;var onReadyCallbacks=[];
|
||||
var isServiceReady=false;var onServiceReadyCallbacks=[];
|
||||
var __uniConfig = {"pages":["pages/login/login_","pages/login/userRegister","pages/home/home_","pages/home/list/ticket","pages/home/list/ticketAll","pages/home/list/warning","pages/home/detail/ticketHandle","pages/home/detail/eventHandle","pages/home/detail/addNode","pages/home/detail/warningHandle","pages/workSpace/workSpace","pages/workSpace/rpj/rpjLisst","pages/workSpace/rpj/rpjCreate","pages/workSpace/newWork/userList","pages/workSpace/newWork/addUser","pages/workSpace/operation/operationList","pages/workSpace/operation/operationCreate","pages/workSpace/operation/oplCate","pages/workSpace/operation/workerList","pages/workSpace/operation/gasList","pages/workSpace/visit/visitList","pages/workSpace/visit/visitCreate","pages/workSpace/opls/fire","pages/workSpace/visit/vpeopleList","pages/my/my","pages/my/myInfo"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"曲阳金隅EHS","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#a6a6a6","selectedColor":"#2c6fd9","borderStyle":"black","backgroundColor":"#ffffff","list":[{"pagePath":"pages/home/home_","iconPath":"static/tabbar/shouye.png","selectedIconPath":"static/tabbar/shouye-select.png","text":"主页"},{"pagePath":"pages/workSpace/workSpace","iconPath":"static/tabbar/gongzuotai.png","selectedIconPath":"static/tabbar/gongzuotai-select.png","text":"工作台"},{"pagePath":"pages/my/my","iconPath":"static/tabbar/wode.png","selectedIconPath":"static/tabbar/wode-select.png","text":"个人中心"}]},"nvueCompiler":"uni-app","nvueStyleCompiler":"weex","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"曲阳金隅EHS","compilerVersion":"3.5.3","entryPagePath":"pages/login/login_","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
|
||||
var __uniRoutes = [{"path":"/pages/login/login_","meta":{"isQuit":true},"window":{"navigationBarTitleText":"曲阳金隅EHS-密码登录","enablePullDownRefresh":false}},{"path":"/pages/login/userRegister","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-新用户注册","enablePullDownRefresh":false}},{"path":"/pages/home/home_","meta":{"isQuit":true,"isTabBar":true},"window":{"enablePullDownRefresh":false}},{"path":"/pages/home/list/ticket","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-待办工单","navigationStyle":"custom"}},{"path":"/pages/home/list/ticketAll","meta":{},"window":{"navigationBarTitleText":"所有工单","navigationStyle":"custom"}},{"path":"/pages/home/list/warning","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-实时报警","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/home/detail/ticketHandle","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-工单处理","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/home/detail/eventHandle","meta":{},"window":{"navigationBarTitleText":"事件处理","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/home/detail/addNode","meta":{},"window":{"navigationBarTitleText":"加签","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/home/detail/warningHandle","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-报警处理","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/workSpace","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"曲阳金隅EHS-工作台","enablePullDownRefresh":false}},{"path":"/pages/workSpace/rpj/rpjLisst","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-入厂项目","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/rpj/rpjCreate","meta":{},"window":{"navigationBarTitleText":"新建入厂项目","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/newWork/userList","meta":{},"window":{"navigationBarTitleText":"选择人员","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/newWork/addUser","meta":{},"window":{"navigationBarTitleText":"添加人员","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/operation/operationList","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-作业列表","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/operation/operationCreate","meta":{},"window":{"navigationBarTitleText":"新建作业","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/operation/oplCate","meta":{},"window":{"navigationBarTitleText":"许可证类型","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/operation/workerList","meta":{},"window":{"navigationBarTitleText":"选择工作人员","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/operation/gasList","meta":{},"window":{"navigationBarTitleText":"气体检测记录","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/visit/visitList","meta":{},"window":{"navigationBarTitleText":"曲阳金隅EHS-来访项目","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/visit/visitCreate","meta":{},"window":{"navigationBarTitleText":"新建来访项目","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/opls/fire","meta":{},"window":{"navigationBarTitleText":"动火许可证","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/workSpace/visit/vpeopleList","meta":{},"window":{"navigationBarTitleText":"人员确定","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/my/my","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"曲阳金隅EHS-个人中心","enablePullDownRefresh":false}},{"path":"/pages/my/myInfo","meta":{},"window":{"navigationBarTitleText":"个人信息","navigationStyle":"custom","enablePullDownRefresh":false}}];
|
||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
|
||||
|
|
@ -0,0 +1 @@
|
|||
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]);
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__B00D419","name":"曲阳金隅EHS","version":{"name":"1.00.02","code":10002},"description":"曲阳金隅EHS","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"VideoPlayer":{},"Push":{},"Speech":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"distribute":{"orientation":["portrait-primary"],"google":{"autoSdkPermissions":true,"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.GET_TASKS\"/>","<uses-permission android:name=\"android.permission.INTERNET\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.READ_SMS\"/>","<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.SEND_SMS\"/>","<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>","<uses-permission android:name=\"android.permission.WRITE_SMS\"/>","<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"],"packagename":"uni.UNIB00D419","aliasname":"zc_ehs","password":"/gcnEC4bjgAEyk4AUMQk+w==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"UIBackgroundModes":["audio"],"dSYMs":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}},"speech":{"ifly":{}},"push":{"description":"管理消息推送能力"}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#ffffff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.5.3","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#a6a6a6","selectedColor":"#2c6fd9","borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#ffffff","list":[{"pagePath":"pages/home/home_","iconPath":"static/tabbar/shouye.png","selectedIconPath":"static/tabbar/shouye-select.png","text":"主页"},{"pagePath":"pages/workSpace/workSpace","iconPath":"static/tabbar/gongzuotai.png","selectedIconPath":"static/tabbar/gongzuotai-select.png","text":"工作台"},{"pagePath":"pages/my/my","iconPath":"static/tabbar/wode.png","selectedIconPath":"static/tabbar/wode-select.png","text":"个人中心"}],"height":"50px"},"launch_path":"__uniappview.html","adid":"127831050401"}}
|
||||
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 243 B |
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M687.29558 28.962342H270.072478c-47.956597 0-86.987919 39.010155-86.98792 86.980864v94.636139h46.016321V115.943911c0-22.598938 18.386772-40.978655 40.971599-40.978655h398.01083l222.976658 225.41788v588.609553c0 22.598232-18.386772 40.978655-40.98571 40.978655H270.072478c-22.584827 0-40.971599-18.380422-40.971599-40.978655V585.258165h-46.016321v303.734524c0 47.962947 39.031322 86.980158 86.98792 86.980158h580.001778c47.962947 0 86.980864-39.017211 86.980863-86.980158V281.474252L687.29558 28.962342z" fill="#509937" /><path d="M548.343509 289.320028h-61.830638v295.938843H283.558463v61.942821H548.343509z" fill="#FFFFFF" /><path d="M420.458074 537.00594V210.096745H94.066051v326.910606h326.392728v-0.001411z m-43.872843-62.638499l-77.224445-0.647699-44.798531-53.974985-44.802765 53.974985-77.232206 0.647699 84.493781-99.85231L132.527284 272.753588l73.63599 0.179211 48.399686 57.197962 48.386281-57.197962 73.636695-0.179211-84.475437 101.760838 84.474732 99.853015z" fill="#509937" /><path d="M471.708909 290.731139v295.938842H268.748151v61.942821h264.789984V290.731139z" fill="#509937" /><path d="M687.361197 61.03336v174.682806c0 35.201568 28.796536 63.991048 63.979054 63.991048h171.780856L687.361197 61.03336z" fill="#509937" /></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="32px" height="32.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#13227a" d="M554.666667 384h234.666666L554.666667 149.333333V384M256 85.333333h341.333333l256 256v512a85.333333 85.333333 0 0 1-85.333333 85.333334H256a85.333333 85.333333 0 0 1-85.333333-85.333334V170.666667c0-47.36 37.973333-85.333333 85.333333-85.333334m213.333333 85.333334H256v682.666666h512v-384h-298.666667V170.666667z" /></svg>
|
||||
|
After Width: | Height: | Size: 604 B |
363
uview-ui/unpackage/cache/wgt/__UNI__B00D419/static/common/js/touch-emulator.js
vendored
Normal file
|
|
@ -0,0 +1,363 @@
|
|||
(function(window, document, exportName, undefined) {
|
||||
"use strict";
|
||||
|
||||
var isMultiTouch = false;
|
||||
var multiTouchStartPos;
|
||||
var eventTarget;
|
||||
var touchElements = {};
|
||||
|
||||
// polyfills
|
||||
if(!document.createTouch) {
|
||||
document.createTouch = function(view, target, identifier, pageX, pageY, screenX, screenY, clientX, clientY) {
|
||||
// auto set
|
||||
if(clientX == undefined || clientY == undefined) {
|
||||
clientX = pageX - window.pageXOffset;
|
||||
clientY = pageY - window.pageYOffset;
|
||||
}
|
||||
|
||||
return new Touch(target, identifier, {
|
||||
pageX: pageX,
|
||||
pageY: pageY,
|
||||
screenX: screenX,
|
||||
screenY: screenY,
|
||||
clientX: clientX,
|
||||
clientY: clientY
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
if(!document.createTouchList) {
|
||||
document.createTouchList = function() {
|
||||
var touchList = new TouchList();
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
touchList[i] = arguments[i];
|
||||
}
|
||||
touchList.length = arguments.length;
|
||||
return touchList;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* create an touch point
|
||||
* @constructor
|
||||
* @param target
|
||||
* @param identifier
|
||||
* @param pos
|
||||
* @param deltaX
|
||||
* @param deltaY
|
||||
* @returns {Object} touchPoint
|
||||
*/
|
||||
function Touch(target, identifier, pos, deltaX, deltaY) {
|
||||
deltaX = deltaX || 0;
|
||||
deltaY = deltaY || 0;
|
||||
|
||||
this.identifier = identifier;
|
||||
this.target = target;
|
||||
this.clientX = pos.clientX + deltaX;
|
||||
this.clientY = pos.clientY + deltaY;
|
||||
this.screenX = pos.screenX + deltaX;
|
||||
this.screenY = pos.screenY + deltaY;
|
||||
this.pageX = pos.pageX + deltaX;
|
||||
this.pageY = pos.pageY + deltaY;
|
||||
}
|
||||
|
||||
/**
|
||||
* create empty touchlist with the methods
|
||||
* @constructor
|
||||
* @returns touchList
|
||||
*/
|
||||
function TouchList() {
|
||||
var touchList = [];
|
||||
|
||||
touchList.item = function(index) {
|
||||
return this[index] || null;
|
||||
};
|
||||
|
||||
// specified by Mozilla
|
||||
touchList.identifiedTouch = function(id) {
|
||||
return this[id + 1] || null;
|
||||
};
|
||||
|
||||
return touchList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Simple trick to fake touch event support
|
||||
* this is enough for most libraries like Modernizr and Hammer
|
||||
*/
|
||||
function fakeTouchSupport() {
|
||||
var objs = [window, document.documentElement];
|
||||
var props = ['ontouchstart', 'ontouchmove', 'ontouchcancel', 'ontouchend'];
|
||||
|
||||
for(var o=0; o<objs.length; o++) {
|
||||
for(var p=0; p<props.length; p++) {
|
||||
if(objs[o] && objs[o][props[p]] == undefined) {
|
||||
objs[o][props[p]] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* we don't have to emulate on a touch device
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function hasTouchSupport() {
|
||||
return ("ontouchstart" in window) || // touch events
|
||||
(window.Modernizr && window.Modernizr.touch) || // modernizr
|
||||
(navigator.msMaxTouchPoints || navigator.maxTouchPoints) > 2; // pointer events
|
||||
}
|
||||
|
||||
/**
|
||||
* disable mouseevents on the page
|
||||
* @param ev
|
||||
*/
|
||||
function preventMouseEvents(ev) {
|
||||
// 注释启用默认事件
|
||||
// ev.preventDefault();
|
||||
// ev.stopPropagation();
|
||||
}
|
||||
|
||||
/**
|
||||
* only trigger touches when the left mousebutton has been pressed
|
||||
* @param touchType
|
||||
* @returns {Function}
|
||||
*/
|
||||
function onMouse(touchType) {
|
||||
return function(ev) {
|
||||
// prevent mouse events
|
||||
preventMouseEvents(ev);
|
||||
|
||||
if (ev.which !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The EventTarget on which the touch point started when it was first placed on the surface,
|
||||
// even if the touch point has since moved outside the interactive area of that element.
|
||||
// also, when the target doesnt exist anymore, we update it
|
||||
if (ev.type == 'mousedown' || !eventTarget || (eventTarget && !eventTarget.dispatchEvent)) {
|
||||
eventTarget = ev.target;
|
||||
}
|
||||
|
||||
// shiftKey has been lost, so trigger a touchend
|
||||
if (isMultiTouch && !ev.shiftKey) {
|
||||
triggerTouch('touchend', ev);
|
||||
isMultiTouch = false;
|
||||
}
|
||||
|
||||
triggerTouch(touchType, ev);
|
||||
|
||||
// we're entering the multi-touch mode!
|
||||
if (!isMultiTouch && ev.shiftKey) {
|
||||
isMultiTouch = true;
|
||||
multiTouchStartPos = {
|
||||
pageX: ev.pageX,
|
||||
pageY: ev.pageY,
|
||||
clientX: ev.clientX,
|
||||
clientY: ev.clientY,
|
||||
screenX: ev.screenX,
|
||||
screenY: ev.screenY
|
||||
};
|
||||
triggerTouch('touchstart', ev);
|
||||
}
|
||||
|
||||
// reset
|
||||
if (ev.type == 'mouseup') {
|
||||
multiTouchStartPos = null;
|
||||
isMultiTouch = false;
|
||||
eventTarget = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* trigger a touch event
|
||||
* @param eventName
|
||||
* @param mouseEv
|
||||
*/
|
||||
function triggerTouch(eventName, mouseEv) {
|
||||
var touchEvent = document.createEvent('Event');
|
||||
touchEvent.initEvent(eventName, true, true);
|
||||
|
||||
touchEvent.altKey = mouseEv.altKey;
|
||||
touchEvent.ctrlKey = mouseEv.ctrlKey;
|
||||
touchEvent.metaKey = mouseEv.metaKey;
|
||||
touchEvent.shiftKey = mouseEv.shiftKey;
|
||||
|
||||
touchEvent.touches = getActiveTouches(mouseEv, eventName);
|
||||
touchEvent.targetTouches = getActiveTouches(mouseEv, eventName);
|
||||
touchEvent.changedTouches = getChangedTouches(mouseEv, eventName);
|
||||
|
||||
eventTarget.dispatchEvent(touchEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* create a touchList based on the mouse event
|
||||
* @param mouseEv
|
||||
* @returns {TouchList}
|
||||
*/
|
||||
function createTouchList(mouseEv) {
|
||||
var touchList = new TouchList();
|
||||
|
||||
if (isMultiTouch) {
|
||||
var f = TouchEmulator.multiTouchOffset;
|
||||
var deltaX = multiTouchStartPos.pageX - mouseEv.pageX;
|
||||
var deltaY = multiTouchStartPos.pageY - mouseEv.pageY;
|
||||
|
||||
touchList.push(new Touch(eventTarget, 1, multiTouchStartPos, (deltaX*-1) - f, (deltaY*-1) + f));
|
||||
touchList.push(new Touch(eventTarget, 2, multiTouchStartPos, deltaX+f, deltaY-f));
|
||||
} else {
|
||||
touchList.push(new Touch(eventTarget, 1, mouseEv, 0, 0));
|
||||
}
|
||||
|
||||
return touchList;
|
||||
}
|
||||
|
||||
/**
|
||||
* receive all active touches
|
||||
* @param mouseEv
|
||||
* @returns {TouchList}
|
||||
*/
|
||||
function getActiveTouches(mouseEv, eventName) {
|
||||
// empty list
|
||||
if (mouseEv.type == 'mouseup') {
|
||||
return new TouchList();
|
||||
}
|
||||
|
||||
var touchList = createTouchList(mouseEv);
|
||||
if(isMultiTouch && mouseEv.type != 'mouseup' && eventName == 'touchend') {
|
||||
touchList.splice(1, 1);
|
||||
}
|
||||
return touchList;
|
||||
}
|
||||
|
||||
/**
|
||||
* receive a filtered set of touches with only the changed pointers
|
||||
* @param mouseEv
|
||||
* @param eventName
|
||||
* @returns {TouchList}
|
||||
*/
|
||||
function getChangedTouches(mouseEv, eventName) {
|
||||
var touchList = createTouchList(mouseEv);
|
||||
|
||||
// we only want to return the added/removed item on multitouch
|
||||
// which is the second pointer, so remove the first pointer from the touchList
|
||||
//
|
||||
// but when the mouseEv.type is mouseup, we want to send all touches because then
|
||||
// no new input will be possible
|
||||
if(isMultiTouch && mouseEv.type != 'mouseup' &&
|
||||
(eventName == 'touchstart' || eventName == 'touchend')) {
|
||||
touchList.splice(0, 1);
|
||||
}
|
||||
|
||||
return touchList;
|
||||
}
|
||||
|
||||
/**
|
||||
* show the touchpoints on the screen
|
||||
*/
|
||||
function showTouches(ev) {
|
||||
var touch, i, el, styles;
|
||||
|
||||
// first all visible touches
|
||||
for(i = 0; i < ev.touches.length; i++) {
|
||||
touch = ev.touches[i];
|
||||
el = touchElements[touch.identifier];
|
||||
if(!el) {
|
||||
el = touchElements[touch.identifier] = document.createElement("div");
|
||||
document.body.appendChild(el);
|
||||
}
|
||||
|
||||
styles = TouchEmulator.template(touch);
|
||||
for(var prop in styles) {
|
||||
el.style[prop] = styles[prop];
|
||||
}
|
||||
}
|
||||
|
||||
// remove all ended touches
|
||||
if(ev.type == 'touchend' || ev.type == 'touchcancel') {
|
||||
for(i = 0; i < ev.changedTouches.length; i++) {
|
||||
touch = ev.changedTouches[i];
|
||||
el = touchElements[touch.identifier];
|
||||
if(el) {
|
||||
el.parentNode.removeChild(el);
|
||||
delete touchElements[touch.identifier];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TouchEmulator initializer
|
||||
*/
|
||||
function TouchEmulator() {
|
||||
if (hasTouchSupport()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fakeTouchSupport();
|
||||
|
||||
window.addEventListener("mousedown", onMouse('touchstart'), true);
|
||||
window.addEventListener("mousemove", onMouse('touchmove'), true);
|
||||
window.addEventListener("mouseup", onMouse('touchend'), true);
|
||||
|
||||
window.addEventListener("mouseenter", preventMouseEvents, true);
|
||||
window.addEventListener("mouseleave", preventMouseEvents, true);
|
||||
window.addEventListener("mouseout", preventMouseEvents, true);
|
||||
window.addEventListener("mouseover", preventMouseEvents, true);
|
||||
|
||||
// it uses itself!
|
||||
window.addEventListener("touchstart", showTouches, true);
|
||||
window.addEventListener("touchmove", showTouches, true);
|
||||
window.addEventListener("touchend", showTouches, true);
|
||||
window.addEventListener("touchcancel", showTouches, true);
|
||||
}
|
||||
|
||||
// start distance when entering the multitouch mode
|
||||
TouchEmulator.multiTouchOffset = 75;
|
||||
|
||||
/**
|
||||
* css template for the touch rendering
|
||||
* @param touch
|
||||
* @returns object
|
||||
*/
|
||||
TouchEmulator.template = function(touch) {
|
||||
var size = 0;
|
||||
var transform = 'translate('+ (touch.clientX-(size/2)) +'px, '+ (touch.clientY-(size/2)) +'px)';
|
||||
return {
|
||||
position: 'fixed',
|
||||
left: 0,
|
||||
top: 0,
|
||||
background: '#fff',
|
||||
border: 'solid 1px #999',
|
||||
opacity: .6,
|
||||
borderRadius: '100%',
|
||||
height: size + 'px',
|
||||
width: size + 'px',
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
display: 'block',
|
||||
overflow: 'hidden',
|
||||
pointerEvents: 'none',
|
||||
webkitUserSelect: 'none',
|
||||
mozUserSelect: 'none',
|
||||
userSelect: 'none',
|
||||
webkitTransform: transform,
|
||||
mozTransform: transform,
|
||||
transform: transform,
|
||||
zIndex: 100
|
||||
}
|
||||
};
|
||||
|
||||
// export
|
||||
if (typeof define == "function" && define.amd) {
|
||||
define(function() {
|
||||
return TouchEmulator;
|
||||
});
|
||||
} else if (typeof module != "undefined" && module.exports) {
|
||||
module.exports = TouchEmulator;
|
||||
} else {
|
||||
window[exportName] = TouchEmulator;
|
||||
}
|
||||
})(window, document, "TouchEmulator");
|
||||
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="48px" height="48.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M535.405714 0h69.485715v95.817143h373.028571a39.497143 39.497143 0 0 1 46.08 35.84 20.48 20.48 0 0 1 0 9.508571v703.634286a151.405714 151.405714 0 0 1-10.971429 73.142857 98.011429 98.011429 0 0 1-59.245714 10.971429H604.891429V1024h-73.142858c-177.005714-32.914286-354.011429-63.634286-531.748571-95.085714V95.817143C178.468571 63.634286 356.937143 32.914286 535.405714 0z" fill="#A33639" /><path d="M604.891429 130.925714h383.268571v762.148572H604.891429v-95.085715h302.08v-47.542857H604.891429v-59.977143h302.08V643.657143H604.891429V585.142857h302.08v-49.005714H604.891429v-59.977143h302.08v-46.811429H604.891429v-59.977142h302.08V321.828571H604.891429v-59.977142h302.08v597.577142H604.891429z" fill="#FFFFFF" /><path d="M645.12 529.554286H950.857143v48.274285H645.12z m0 81.92H950.857143V658.285714H645.12z m0 81.92H950.857143v47.542857H645.12z m-49.005714 81.92H950.857143v47.542857H596.114286z" fill="#A33639" /><path d="M180.662857 317.44c59.245714 0 130.925714-24.137143 180.662857 21.211429a139.702857 139.702857 0 0 1-35.108571 201.142857 166.765714 166.765714 0 0 1-80.457143 10.24v130.925714l-65.097143-5.851429c-0.731429-119.222857-1.462857-236.251429 0-357.668571z" fill="#FFFFFF" /><path d="M245.76 378.148571c21.211429 0 47.542857-5.12 62.171429 15.36a80.457143 80.457143 0 0 1 0 73.142858c-12.434286 22.674286-40.228571 21.211429-62.171429 23.405714-0.731429-37.302857-0.731429-74.605714 0-111.908572z m640 0a81.92 81.92 0 0 1-48.274286-19.748571 423.497143 423.497143 0 0 0-78.262857 24.868571c-19.748571 35.84-38.765714 54.125714-54.857143 54.125715a23.405714 23.405714 0 0 1-10.24 0 20.48 20.48 0 0 1-10.971428-18.285715c0-5.851429 0-21.942857 62.902857-49.005714A446.171429 446.171429 0 0 0 781.165714 292.571429c-8.045714-15.36-24.868571-54.125714-13.165714-73.142858a19.748571 19.748571 0 0 1 19.748571-10.24 23.405714 23.405714 0 0 1 17.554286 8.045715c8.045714 11.702857 7.314286 36.571429 0 73.142857a189.44 189.44 0 0 0 40.96 51.931428 365.714286 365.714286 0 0 1 40.96-4.388571c30.72 0 35.108571 15.36 34.377143 23.405714 0 22.674286-21.211429 22.674286-32.182857 22.674286z m-185.051429 41.691429a40.228571 40.228571 0 0 0 24.137143-16.822857 59.977143 59.977143 0 0 0-24.137143 19.017143zM793.6 219.428571a50.468571 50.468571 0 0 0 3.657143 34.377143 50.468571 50.468571 0 0 0-3.657143-34.377143z m0 95.817143a430.811429 430.811429 0 0 1-17.554286 42.422857 365.714286 365.714286 0 0 1 40.228572-12.434285 228.205714 228.205714 0 0 1-24.137143-29.988572z m94.354286 34.377143a73.142857 73.142857 0 0 0-17.554286 0 40.228571 40.228571 0 0 0 20.48 6.582857 22.674286 22.674286 0 0 0 13.897143 0s0-6.582857-16.822857-6.582857z" fill="#A33639" /></svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="48px" height="48.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M583.256 289.284c93.237 0.45 186.561-0.825 279.797 0 9.396-0.916 18.767 1.843 25.372 7.47 6.609 5.625 9.707 13.48 8.381 21.266 1.535 138.581 0 277.235 0.904 415.886-0.904 15.008 1.714 31.588-8.395 45.018-12.726 7.503-29.242 6.827-44.226 7.503-87.187-0.375-174.371 0-261.741 0l-0.092-497.143z m-49.458-66.776" fill="#B2B2B2" /><path d="M589.105 201.914h321.756v608.691H589.105v-79.832h234.052v-39.864H589.105v-50.466h234.052v-39.36h-233.95v-58.639c38.656 12.213 82.658 11.911 117.176-11.812 37.345-22.706 56.822-65.902 60.051-108.998H638.058c0-43.398 0.504-86.796-0.806-130.096-16.049 3.13-31.997 6.561-47.941 10.093l-0.206-99.717zM238.688 345.736c52.988 2.624 117.079-21.396 161.481 19.174 41.988 52.283 30.888 148.264-31.387 179.45-22.103 11.606-47.535 10.091-71.558 9.181v117.078l-58.033-4.941c-1.509-106.582-1.714-213.263-0.503-319.942z m0 0" fill="#FFFFFF" /><path d="M657.534 270.444c69.717 5.189 124.714 61.39 128.381 131.206-42.793 0.503-85.585 0-128.479 0 0.098-43.902 0.098-87.401 0.098-131.206zM296.618 399.73c19.179-0.807 42.999-4.44 55.919 14.029a73.678 73.678 0 0 1 1.309 65.502c-11.104 20.185-36.231 18.47-55.713 20.892-2.018-33.407-1.818-66.814-1.515-100.423z m643.109-189.136a34.107 34.107 0 0 0-37.746-38.653c-104.259-1.109-208.616 0.605-312.875 0V82.115h-55.308c-150.583 26.242-301.064 53.393-451.545 80.036v698.415c148.766 26.748 297.635 52.075 446.401 79.432h60.554V840.68c97.699 0 195.194-0.503 292.688 0 16.756-0.908 35.226 0 49.455-10.093 11.303-18.062 8.377-40.368 9.388-60.554-1.012-186.511 0.703-373.024-1.012-559.439zM368.782 544.36c-22.103 11.606-47.535 10.091-71.558 9.181v117.078l-58.033-4.941c-1.51-106.582-1.715-213.263-0.504-319.942 52.988 2.624 117.079-21.396 161.481 19.174 41.989 52.283 30.889 148.264-31.386 179.45z m542.079 266.244H589.105v-79.832h234.052v-39.864H589.105v-50.466l0.102-39.36v-58.639l0.104-240.813-0.205-99.717h321.756v608.691z" fill="#D24625" /></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="48px" height="48.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#333333" d="M535.130353 0h69.571765v95.292235c124.536471 1.084235 248.922353-1.325176 373.157647 1.084236a40.448 40.448 0 0 1 44.935529 45.537882c2.048 234.676706 0 469.835294 1.204706 704.150588-1.204706 24.094118 2.288941 50.718118-11.324235 72.282353-16.986353 12.047059-38.881882 10.842353-58.729412 12.047059H604.702118V1024h-72.282353C354.996706 991.352471 177.513412 960.993882 0 929.189647V95.533176C178.326588 63.608471 356.773647 32.527059 535.130353 0z m52.464941 116.374588v83.968h307.2v47.947294h-307.2v60.084706h307.2v47.314824h-307.2v60.687059h307.2v46.742588h-307.2v60.656941h307.2v48.549647h-307.2v59.482353h307.2v48.549647h-307.2v59.452235h307.2v48.549647h-307.2v96.015059h389.872941v-768H587.595294z m-369.543529 212.028236c-17.016471 78.516706-34.032941 156.912941-50.386824 235.429647-10.661647-76.589176-24.485647-152.696471-36.713412-229.135059-20.660706 0.722824-40.96 1.566118-61.138823 2.56 18.462118 105.833412 41.562353 210.823529 61.138823 316.385882 22.889412 1.596235 45.628235 2.921412 68.367059 4.126118 15.781647-76.950588 33.731765-153.750588 47.585883-231.30353 14.064941 79.721412 32.286118 158.72 48.670117 238.351059 23.702588-1.204706 52.946824 9.216 72.643765-1.204706 29.214118-115.561412 52.585412-232.899765 79.36-349.184-23.612235 1.445647-47.224471 2.800941-70.806588 3.644236-14.305882 83.124706-29.123765 166.159059-42.465883 249.524705-17.106824-80.835765-33.129412-161.641412-48.880941-242.748235-22.497882 1.234824-44.875294 2.198588-67.403294 3.553883z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 533 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 596 B |
|
After Width: | Height: | Size: 730 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 45 KiB |
BIN
uview-ui/unpackage/cache/wgt/__UNI__B00D419/static/my/my_apply/blue-time.png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
uview-ui/unpackage/cache/wgt/__UNI__B00D419/static/my/my_apply/orange-time.png
vendored
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
BIN
uview-ui/unpackage/cache/wgt/__UNI__B00D419/static/tabbar/gongzuotai-select.png
vendored
Normal file
|
After Width: | Height: | Size: 898 B |