Merge branch 'master' of ehs_mp2

This commit is contained in:
caoqianming 2023-04-04 23:02:08 +08:00
commit 03990b8fba
51 changed files with 199531 additions and 478 deletions

190437
common/city.data.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,7 @@ const install = (Vue, vm) => {
let getDickey = (params = {}) => vm.$u.get('/system/dict/', params); //查询字典
let userList = (params = {}) => vm.$u.get('/system/user/', params); ///system/permission/codes/
let deptList = (params = {}) => vm.$u.get('/system/dept/', params); //
let passChange = (params = {})=>vm.$u.put('/system/user/password/', params);
let permissions = (params = {}) => vm.$u.get('/system/permission/codes/', params); //获取全部权限标识
let hrmUserInfo = (params = {}) => vm.$u.get('/hrm/employee/info/', params); //用户信息
@ -79,6 +80,8 @@ const install = (Vue, vm) => {
let rpartyList = (data = {}) => vm.$u.get(`/rpm/rparty/`, data); //相关方列表
let remployee = (data = {}) => vm.$u.get(`/rpm/remployee/`, data); //相关方人员表
let remployeeCreate = (data = {}) => vm.$u.post(`/rpm/remployee/`, data); //相关方人员表
let remployeeDetail = (id, data = {}) => vm.$u.get(`/rpm/remployee/${id}/`, data); //人员详情
let remployeeUpdate = (id, data = {}) => vm.$u.put(`/rpm/remployee/${id}/`, data); //人员编辑
let rcertificate = (data = {}) => vm.$u.get(`/rpm/rcertificate/`, data); //相关方证书
let rpjFileList = (data = {}) => vm.$u.get(`/rpm/rpj_file/`, data); //相关方wenjian
let rpjList = (data = {}) => vm.$u.get(`/rpm/rpj/`, data); //rpj查询
@ -100,8 +103,10 @@ const install = (Vue, vm) => {
let vmVisitor = (data = {}) => vm.$u.get(`/vm/visitor/`, data); //来访人员列表
let visitorRegister = (data = {}) => vm.$u.post(`/vm/visitor/register/`, data); //来访人员/司机注册
let visitSubmit = (data = {}) => vm.$u.post(`/vm/visit/${id}/submit/`, data); //司机直接提交不走工单
let visitorList = (data = {}) => vm.$u.get(`/vm/visitor/`, data);
let visitorDetail = (id, data = {}) => vm.$u.get(`/vm/visitor/${id}/`, data); //来访人员详情
let visitorCreate = (data = {}) => vm.$u.post(`/vm/visitor/`, data); //来访人员添加
let visitorUpdate = (data = {}) => vm.$u.put(`/vm/visitor/${id}/`, data); //来访人员编辑
let visitorUpdate = (id, 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); //来访人员编辑
@ -128,6 +133,7 @@ const install = (Vue, vm) => {
bindSecret,
loginSecret,
apkCheck,
passChange,
userList,
deptList,
@ -149,6 +155,8 @@ const install = (Vue, vm) => {
visitUpdate,
visitSubmit,
vmVisitor,
visitorList,
visitorDetail,
visitorCreate,
visitorUpdate,
visitDelete,
@ -161,6 +169,8 @@ const install = (Vue, vm) => {
rpartyList,
remployee,
remployeeCreate,
remployeeDetail,
remployeeUpdate,
rcertificate,
rpjItem,
rpjList,

293
components/canvas.vue Normal file
View File

@ -0,0 +1,293 @@
<template>
<view class="uni-list list-pd">
<view v-if="visibleSync" class="cat-signature" :class="{ visible: show }" @touchmove.stop.prevent="moveHandle">
<!-- <view class="mask" @tap="close" /> -->
<view class="content">
<canvas class="firstCanvas" :canvas-id="canvasId" name="autograph" @touchmove="move"
@touchstart="start($event)" @touchend="end" @touchcancel="cancel" @longtap="tap"
disable-scroll="true" @error="error" />
<view class="btns">
<view class="btn btn_cancel" @tap="close">取消</view>
<view class="btn btn_clear" @tap="clear">清除</view>
<view class="btn btn_save" @tap="save">保存</view>
</view>
</view>
</view>
</view>
</template>
<script>
var content = null;
var touchs = [];
var canvasw = 0;
var canvash = 0;
//
uni.getSystemInfo({
success: function(res) {
canvasw = res.windowWidth;
canvash = (canvasw * 9) / 16;
}
});
export default {
name: 'cat-signature',
props: {
visible: {
type: Boolean,
default: false
},
canvasId: {
type: String,
default: 'firstCanvas'
}
},
data() {
return {
show: false,
visibleSync: false,
signImage: '',
hasDh: false
};
},
watch: {
visible(val) {
this.visibleSync = val;
this.show = val;
this.getInfo();
}
},
created(options) {
this.visibleSync = this.visible;
this.getInfo();
setTimeout(() => {
this.show = this.visible;
}, 100);
},
methods: {
getInfo() {
//Canvas
content = uni.createCanvasContext(this.canvasId, this);
//线
content.setStrokeStyle('#000');
//线
content.setLineWidth(5);
//线
content.setLineCap('round');
//线
content.setLineJoin('round');
},
//
close() {
this.show = false;
this.hasDh = false;
this.$emit('close');
},
moveHandle() {},
//
start(e) {
let point = {
x: e.touches[0].x,
y: e.touches[0].y
};
touchs.push(point);
this.hasDh = true;
},
//
move: function(e) {
let point = {
x: e.touches[0].x,
y: e.touches[0].y
};
touchs.push(point);
if (touchs.length >= 2) {
this.draw(touchs);
}
},
//
end: function(e) {
//
for (let i = 0; i < touchs.length; i++) {
touchs.pop();
}
},
//
cancel: function(e) {
// console.log("" + e)
},
//
tap: function(e) {
// console.log("" + e)
},
error: function(e) {
// console.log("" + e)
},
//
draw: function(touchs) {
let point1 = touchs[0];
let point2 = touchs[1];
// console.log(JSON.stringify(touchs))
content.moveTo(point1.x, point1.y);
content.lineTo(point2.x, point2.y);
content.stroke();
content.draw(true);
touchs.shift();
},
//
clear: function() {
//
content.clearRect(0, 0, canvasw, canvash);
content.draw(true);
// this.close()
this.hasDh = false;
this.$emit('clear');
},
save() {
var that = this;
if (!this.hasDh) {
uni.showToast({
title: '请先签字',
icon: 'none'
});
return;
}
uni.showLoading({
title: '生成中...',
mask: true
});
setTimeout(() => {
uni.canvasToTempFilePath({
canvasId: this.canvasId,
success: function(res) {
that.signImage = res.tempFilePath;
uni.hideLoading();
// that.$emit('save', res.tempFilePath);
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function(resImg) {
debugger;
// console.log("resImg:"+resImg)
that.$emit('save', res.tempFilePath,resImg);
}
})
that.hasDh = false;
that.show = false;
},
fail: function(err) {
console.log(err);
uni.hideLoading();
}
},
this
);
}, 100);
}
}
};
</script>
<style lang="scss">
.cat-signature.visible {
visibility: visible;
}
.cat-signature {
display: block;
// position: fixed;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
overflow: hidden;
z-index: 11;
// height: 100vh;
visibility: hidden;
.mask {
display: block;
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s;
}
.content {
display: block;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
width: 94%;
height: 500upx;
background: #fff;
border-radius: 8upx;
box-shadow: 0px 0px 2px #333;
// canvas
.firstCanvas {
background-color: #fff;
width: 100%;
height: 400upx;
border-radius: 8upx;
}
// canvas
.btns {
padding: 0 15px;
height: 80upx;
overflow: hidden;
position: absolute;
bottom: 10upx;
left: 0;
right: 0;
margin: auto;
display: flex;
justify-content: space-between;
.btn {
width: 30%;
text-align: center;
font-size: 28upx;
height: 80upx;
line-height: 80upx;
// background-color: #999;
color: #007aff;
border-radius: 10upx;
}
.btn_cancel{
color: #ffa500;
border: 1upx solid #ffa500;
}
.btn_clear{
border: 1upx solid #007aff;
}
.btn_save{
color:#ffffff;
background: #007aff;
border: 1upx solid #007aff;
}
}
}
}
.visible .mask {
display: block;
opacity: 1;
}
.uni-list:after {
//
background-color: #ffffff;
}
</style>

View File

@ -0,0 +1,328 @@
<template>
<view>
<view class="mask" :class="{'maskShow' : showPicker}" @click="hide" @click.stop.prevent @touchmove.stop.prevent catchtouchmove="true"></view>
<view class="cpicker-content" :class="{'cpickerShow' : showPicker}">
<view class="city-head" @click.stop.prevent @touchmove.stop.prevent catchtouchmove="true">
<view class="city-head-title">{{headtitle}}</view>
<text v-if="rightIcon" class="rightIcon iconfont icon-quxiao" @click="hide('self')"></text>
</view>
<scroll-view id="nav-bar" class="nav-bar"scroll-x="true" scroll-with-animation="true" :scroll-left="scrollLeft" >
<view
v-for="(item,index) in tabbars"
class="nav-item"
:key="index"
:id="'tab'+index"
@click="changeTab(index)"
:class="{'current': index === tabCurrentIndex}"
><text class="nav-bar-title">{{item.text}}</text></view>
</scroll-view>
<view class="city_content">
<scroll-view class="panel-scroll-box" :scroll-y="enableScroll" :cscrollTop="scrollTop" :current="tabCurrentIndex" :scroll-top="scrollTop">
<block v-for="(item,index) in showData" :key="index">
<view class="flex-row-c-c" @click="changCity(tabCurrentIndex,item)">
<icon type="success_no_circle" v-if="tabbars[tabCurrentIndex].value==item.value" :id="'show'+tabCurrentIndex" class="ischeck" size="14" color="#00B1B7" ></icon>
<text class="city-text">{{item.text}}</text>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
let windowWidth = 0,scrollTimer = false, tabBar;
export default {
name: 'UniCityNvue',
props: {
headtitle: { // 使tab
type: String,
default: ''
},
pickerSize: { // 使tab
type: [String, Number],
default: 1
},
data: { // id使id[]
type:Array,
default:function(){
return [];
},
},
provincedata: { // id使id[]
type:Array,
default:function(){
return [];
},
}
},
data() {
return {
isFirst: true,
rightIcon:true,
scrollLeft: 500, //
scrollTop:0,
enableScroll: true,
tabCurrentIndex: 0, //
tabbars:this.provincedata,
showData:this.data,
pickersize: this.pickerSize,
showPicker: false
}
},
watch: {
showPicker(){
if(this.isFirst){
this.isFirst = false;
}
},
provincedata(val){
this.tabbars=val;
}
},
methods: {
show(){
this.showPicker = true;
windowWidth = uni.getSystemInfoSync().windowWidth;
if(this.provincedata.length>0&&this.provincedata.length<this.pickerSize&&this.isFirst&&this.provincedata[this.provincedata.length-1].value!=""){
this.showData=this.findSameId(this.data,this.tabbars[this.provincedata.length],this.tabbars[this.provincedata.length-1]);
var current={
text:"请选择",
value:"",
}
this.tabbars.push(current);
this.tabCurrentIndex=this.provincedata.length-1;
this.scrollTop=0;
this.setScroll(this.tabCurrentIndex);
}else{
console.log(this.tabbars)
this.showData=this.findSameId(this.data,this.tabbars[this.provincedata.length-1],this.tabbars[this.provincedata.length-2]);
this.$nextTick(()=>{
this.tabCurrentIndex=this.provincedata.length-1;
this.scrollTop=0;
this.setScroll(this.tabCurrentIndex);
})
}
},
findSameId(tree, currentTab,preTab) {
let retNode = null;
function deepSearch(tree, currentTab,preTab) {
for (var i = 0; i < tree.length; i++) {
if (tree[i].children && tree[i].children.length > 0) {
deepSearch(tree[i].children, currentTab,preTab);
}
var flag=currentTab==undefined?true:(currentTab.value===""?true:false);
var value=tree[i].value+"";
var text=tree[i].text;
if (preTab!=null&&flag&&preTab.text=== text&&preTab.value+"" ===value) {
retNode=tree[i].children;
break;
}else if (currentTab!=null&&currentTab.text=== text&&currentTab.value+"" === value) {
retNode=tree;
break;
}
}
}
deepSearch(tree, currentTab,preTab);
return retNode==null?tree:retNode;
},
hide(){
this.showPicker = false;
},
//tab
changeTab(e){
let index = e;
this.setScroll(index);
//300ms,swipertabbar
this.tabCurrentIndex = index;
this.showData=this.findSameId(this.data,this.tabbars[index],index===0?this.tabbars[index]:this.tabbars[index-1]);
setTimeout(()=>{
this.getScroll("show"+index);
}, 10)
},
//size
getElSize(id) {
return new Promise((res, rej) => {
let el = uni.createSelectorQuery().in(this).select('#' + id);
el.fields({
size: true,
scrollOffset: true,
rect: true
}, (data) => {
res(data);
}).exec();
});
},
changCity(index,item) {
if(this.tabbars[index].value!=item.value){
this.tabbars[index].text=item.text;
this.tabbars[index].value=item.value;
if(index<(this.tabbars.length-1)){
this.tabbars.splice(index+1,this.tabbars.length-index-1)
}
if(item.children && item.children.length > 0){
if(this.tabbars.length<this.pickersize){
var current={
text:"请选择",
value:""
}
this.showData=item.children;
this.tabbars.push(current);
this.tabCurrentIndex++;
this.scrollTop=0;
this.setScroll(index);
}else{
this.$emit('funcvalue',this.tabbars);
this.hide();
}
}else{
this.$emit('funcvalue',this.tabbars);
this.hide();
}
}
},
async setScroll(index){
let width = 0;
let nowWidth = 0;
for (let i = 0; i <= index; i++) {
let result = await this.getElSize('tab' + i);
width += result.width;
if(i === index){
nowWidth = result.width;
}
}
if ((width+nowWidth)>windowWidth) {
this.scrollLeft=width+nowWidth;
}else{
this.scrollLeft = 0;
}
},
getScroll(id) {
uni.createSelectorQuery().in(this).select('.panel-scroll-box').boundingClientRect((data)=>{
uni.createSelectorQuery().in(this).select('#' + id).boundingClientRect((res)=>{
if(res != undefined && res != null && res != ''){
this.scrollTop=res.top-data.top;
}
}).exec()
}).exec();
}
}
}
</script>
<style scoped lang="scss">
.mask {
visibility: hidden;
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 1000;
background: rgba(0, 0, 0, .6);
opacity: 0;
transition: all .3s ease;
}
.maskShow {
visibility: visible;
opacity: 1;
}
.cpicker-content {
position: fixed;
right: 0;
bottom: 0;
left: 0;
background-color: #FFFFFF;
transition: all .3s ease;
transform: translateY(100%);
z-index: 3000;
}
.cpickerShow {
transform: translateY(0);
}
.city-head {
width: 750rpx;
height: 88rpx;
flex-direction: column;
border-bottom-width: 1px;
border-bottom-color: #F4F4F4;
border-bottom-style: solid;
}
.city-head-title {
font-size: 15px;
line-height: 88rpx;
align-items: center;
text-align: center;
}
.rightIcon {
position: absolute;
right: 15px;
top: 9px;
font-size: 30px;
color: #BEBEBE;
}
.nav-bar {
position: relative;
z-index: 10;
height: 90upx;
white-space: nowrap;
box-shadow: 0 2upx 8upx rgba(0,0,0,.06);
background-color: #fff;
}
.nav-bar::-webkit-scrollbar {
display: none;
}
.nav-item {
display: inline-flex!important;
flex-direction: row!important;
width: 170rpx;
padding: 7px 0px;
line-height: 26px;
align-items: center;
justify-content: center;
color: #303133;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
}
.nav-bar-title {
font-size: 12px;
}
.current {
// color: $base-bgcolor;
// border-color: $base-bgcolor;
border-bottom-width: 4rpx;
border-bottom-style: solid;
}
.current:after {
width: 50%;
}
.panel-scroll-box {
height: 516rpx;
margin-top: 8px;
}
.flex-row-c-c {
display: block;
flex-direction: row;
padding-left: 25px;
}
.city-text {
flex-direction: row;
height: 35px;
line-height: 35px;
font-size: 13px;
}
.hide {
opacity: 0;
}
.ischeck {
display: inline-flex!important;
flex-direction: column;
margin-right: 5px;
vertical-align: middle;
}
</style>

View File

@ -0,0 +1,64 @@
<template>
<view class="componentWrap">
<uni-nav-bar
@clickLeft="goBack()"
class="nav-bar" leftText="人员选择"
height="110rpx" leftWidth="200rpx"
leftIcon="left" backgroundColor="#2cade8" color="#fff"
border fixed statusBar shadow
></uni-nav-bar>
<view class="apply-info">
<view> 返回上一级 </view>
<view> 返回上一级 </view>
<view> 返回上一级 </view>
<view> 返回上一级 </view>
<view> 返回上一级 </view>
<view> 返回上一级 </view>
<view> 返回上一级 </view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
onLoad() {},
onShow() {},
methods: {
goBack() {
uni.navigateBack({
delta: 1
});
}
}
};
</script>
<style scoped>
>>> .uni-navbar__header,
>>> .uni-status-bar {
background-image: linear-gradient(254deg, #0ca7ee 0%, #005aff 100%, #2a8cff 100%, #54bdff 100%),
linear-gradient(#e60012, #e60012);
}
>>> uni-image {
height: 200upx;
width: 200upx;
}
.componentWrap {
background-color: #f3fbff;
padding-bottom: 227rpx;
}
.apply-info {
width: 720rpx;
margin: 0 auto;
background-color: #FFFFFF;
border-radius: 10rpx;
padding: 25rpx 32rpx;
box-sizing: border-box;
margin-top: 24rpx;
}
</style>

View File

@ -2,8 +2,8 @@
"name" : "曲阳金隅EHS",
"appid" : "__UNI__B00D419",
"description" : "曲阳金隅EHS",
"versionName" : "1.01.07",
"versionCode" : 10107,
"versionName" : "1.01.36",
"versionCode" : 101036,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -17,7 +17,8 @@
"modules" : {
"VideoPlayer" : {},
"Push" : {},
"Speech" : {}
"Speech" : {},
"Camera" : {}
},
/* */
"distribute" : {
@ -121,6 +122,20 @@
"mode" : "history",
"base" : "/h5/"
},
"title" : "曲阳金隅EHS"
"title" : "曲阳金隅EHS",
"devServer" : {
"port" : 8080,
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://222.222.144.147:6013/api/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {
"^/api" : "/api" // /api
}
}
}
}
}
}

View File

@ -16,7 +16,7 @@
"navigationBarTitleText": "曲阳金隅EHS-密码登录",
"enablePullDownRefresh": false
}
},{
}, {
"path": "pages/login/userRegister",
"style": {
"navigationBarTitleText": "曲阳金隅EHS-新用户注册",
@ -146,13 +146,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/workSpace/newWork/userList",
"style": {
"navigationBarTitleText": "选择人员",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -160,7 +160,7 @@
"style": {
"navigationBarTitleText": "添加人员",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -168,7 +168,7 @@
"style": {
"navigationBarTitleText": "新增违章",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -232,7 +232,7 @@
"style": {
"navigationBarTitleText": "曲阳金隅EHS-来访项目",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -240,7 +240,7 @@
"style": {
"navigationBarTitleText": "新建来访项目",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -248,7 +248,7 @@
"style": {
"navigationBarTitleText": "选择人员",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -256,7 +256,15 @@
"style": {
"navigationBarTitleText": "来访项目查看",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
"path": "pages/workSpace/opls/normal",
"style": {
"navigationBarTitleText": "普通作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
@ -264,7 +272,7 @@
"style": {
"navigationBarTitleText": "动火作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -272,7 +280,7 @@
"style": {
"navigationBarTitleText": "高处作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -280,7 +288,7 @@
"style": {
"navigationBarTitleText": "临时用电许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -288,7 +296,7 @@
"style": {
"navigationBarTitleText": "动土作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -296,7 +304,7 @@
"style": {
"navigationBarTitleText": "预热器清堵作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -304,7 +312,7 @@
"style": {
"navigationBarTitleText": "吊装作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -312,7 +320,7 @@
"style": {
"navigationBarTitleText": "篦冷机清大块作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -320,7 +328,7 @@
"style": {
"navigationBarTitleText": "清库作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -328,7 +336,7 @@
"style": {
"navigationBarTitleText": "有限空间作业许可证",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -336,7 +344,7 @@
"style": {
"navigationBarTitleText": "人员确定",
"navigationStyle": "custom",
"enablePullDownRefresh": false
"enablePullDownRefresh": false
}
},
{
@ -348,7 +356,7 @@
},
{
"path": "pages/my/myInfo",
"style": {
"style": {
"navigationBarTitleText": "个人信息",
"navigationStyle": "custom",
"enablePullDownRefresh": false
@ -356,7 +364,7 @@
},
{
"path": "pages/my/myInfoChange",
"style": {
"style": {
"navigationBarTitleText": "个人信息完善",
"navigationStyle": "custom",
"enablePullDownRefresh": false
@ -364,7 +372,7 @@
},
{
"path": "pages/my/myCertificates",
"style": {
"style": {
"navigationBarTitleText": "我的证书",
"navigationStyle": "custom",
"enablePullDownRefresh": false
@ -372,13 +380,55 @@
},
{
"path": "pages/my/clock_in",
"style": {
"style": {
"navigationBarTitleText": "打卡记录",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/my/passwordChange",
"style": {
"navigationBarTitleText": "修改密码",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/workSpace/visit/visitor",
"style": {
"navigationBarTitleText": "我的访客库",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/workSpace/rpj/remployee",
"style": {
"navigationBarTitleText": "我的人员库",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/comm/userSelect/index",
"style": {
"navigationBarTitleText": "人员选择",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
],
,{
"path" : "pages/my/signature",
"style" :
{
"navigationBarTitleText": "我的电子签名",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "曲阳金隅EHS",

103
pages/comm/city/city.vue Normal file
View File

@ -0,0 +1,103 @@
<template>
<picker @change="bindPickerChange" @columnchange="columnchange" :range="array" range-key="name" :value="value" mode="multiSelector">
<slot></slot>
</picker>
</template>
<script>
import AllAddress from './data.js'
let selectVal = ['','','']
export default {
data() {
return{
value: [0,0,0],
array: [],
index: 0
}
},
created() {
this.initSelect()
},
methods:{
//
initSelect() {
this.updateSourceDate() //
.updateAddressDate() //
.$forceUpdate() //
},
//
columnchange(d) {
this.updateSelectIndex(d.detail.column, d.detail.value) //
.updateSourceDate() //
.updateAddressDate() //
.$forceUpdate() //
},
/**
* 更新源数据
* */
updateSourceDate() {
this.array = []
this.array[0] = AllAddress.map(obj => {
return {
name: obj.name
}
})
this.array[1] = AllAddress[this.value[0]].city.map(obj => {
return {
name: obj.name
}
})
this.array[2] = AllAddress[this.value[0]].city[this.value[1]].area.map(obj => {
return {
name: obj
}
})
return this
},
/**
* 更新索引
* */
updateSelectIndex(column, value){
let arr = JSON.parse(JSON.stringify(this.value))
arr[column] = value
if(column === 0 ) {
arr[1] = 0
arr[2] = 0
}
if(column === 1 ) {
arr[2] = 0
}
this.value = arr
return this
},
/**
* 更新结果数据
* */
updateAddressDate() {
selectVal[0] = this.array[0][this.value[0]].name
selectVal[1] = this.array[1][this.value[1]].name
selectVal[2] = this.array[2][this.value[2]].name
return this
},
/**
* 点击确定
* */
bindPickerChange(e) {
this.$emit('change', {
index: this.value,
data: selectVal
})
return this
}
}
}
</script>
<style>
</style>

4914
pages/comm/city/data.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,267 @@
<template>
<view class="componentWrap">
<uni-nav-bar
@clickLeft="goBack()"
class="nav-bar" leftText="人员选择"
height="110rpx" leftWidth="200rpx"
leftIcon="left" backgroundColor="#2cade8" color="#fff"
border fixed statusBar shadow
></uni-nav-bar>
<view class="list-wrap">
<button @click="backPreLevel"> 返回上一级 </button>
<view>
<view v-for="(dept,index) in showDepts" :key="dept.id" class="listItem" @click="deptClick(dept,index)">
<image class="deptImage" src="../../../static/common/wenjianjia.png"></image>
<view class="itemName"> {{dept.name}}</view>
</view>
<radio-group @change="(e) => radioChange(e)">
<label class="listItem"v-for="(user,index1) in userLists" :key="user.id">
<view>
<radio :value="user.id" :id="user.id" :name=user.name :checked="user.checked" />
</view>
<image class="userImage" src="../../../static/login/userRegister.png"></image>
<view>{{user.name}}</view>
</label>
</radio-group>
</view>
</view>
<view class="bottomBlock">
<text v-if="selectedUser.length>0" class="checkUserShow">已选人员{{selectedUser[0].name}}</text>
<button size="mini" type="primary" class="submitBtn" @click="submitClick">确定</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
type:'',
typeName:'',
level:'dept',
showDepts:[],
deptLists:[],
userLists:[],
rpartyLists:[],
selectedUser:[],
currentDept:'',
currentIndex:'',
currentParent:'',
currentId:''
};
},
onLoad(params) {
this.currentId = this.type = params.type;
this.typeName = params.typeName;
},
onShow() {
this.getDept();
this.getRparty();
},
methods: {
getDept(){
let that = this;
that.$u.api.deptList({
page: 0,
type__in: 'dept',
query: '{id, name, parent, type}'
}).then(res => {
console.log(res);
that.showDepts = res;
that.deptLists = res;
})
},
getRparty(){
let that = this;
that.$u.api.deptList({
page: 0,
type__in: 'rparty',
query: '{id, name, parent, type}'
}).then(res => {
console.log(res);
that.rpartyLists = res;
})
},
//
deptClick(dept,index){
let that = this;
let showDepts = [];
let params = {
page: 0,
depts: dept.id,
is_active: true,
query: '{id, name, belong_dept}'
};
if(that.level == 'dept'){
that.level = 'rparty';
that.currentIndex = index;
//
showDepts = that.rpartyLists.filter(item=>{
return item.parent==dept.id;
})
//
if(that.deptLists[index].childreUser){
that.userLists =that.deptLists[index].childreUser;
that.userLists
for(let i = 0;i<that.userLists.length;i++){
if(that.userLists[i].id==that.currentId){
that.userLists[i].checked = true
}
}
}else{
that.$u.api.userList(params).then(res=>{
let arr = [];
res.forEach(userItem=>{
let obj = {};
obj = userItem;
obj.checked = false;
arr.push(obj)
})
that.deptLists[index].childreUser = arr;
that.userLists =arr;
})
}
}else if(that.level == 'rparty'){
that.level = 'user';
showDepts = [];
//
that.$u.api.userList(params).then(res=>{
let arr = [];
res.forEach(userItem=>{
let obj = {};
obj = userItem;
if(that.currentId!==''&&that.currentId==userItem.id){
obj.checked = true;
}else{
obj.checked = false;
}
arr.push(obj)
})
that.userLists =arr;
})
}
that.currentDept = dept.id;
that.currentParent = dept.parent;
that.showDepts = showDepts;
},
//
backPreLevel(){
let that = this;
if(that.level == 'user'){//
//
that.level = 'rparty';
that.showDepts = that.deptList;
that.currentDept = that.currentParent;
//
that.showDepts = that.rpartyLists.filter(item=>{
return item.parent==that.currentDept;
})
that.userLists = that.deptLists[that.currentIndex].childreUser;
}else if(that.level == 'rparty'){
that.level = 'dept';
that.showDepts = that.deptLists;
//
that.userLists = [];
}
},
radioChange(e,item){
let that = this;
let value = e.detail.value;
that.currentId = value;
that.selectedUser = that.userLists.filter(item=>{
return item.id == value;
})
},
submitClick(){
debugger;
let pages = getCurrentPages(); //
let nowPage = pages[ pages.length - 1]; //
let prevPage = pages[ pages.length - 2 ]; //
prevPage.$vm.formData[this.type] = this.selectedUser[0].id;
prevPage.$vm[this.typeName] = this.selectedUser[0].name;
// uni.navigateBack({
// delta: 1
// });
// let obj={};
// obj.type=this.type;
// obj.id=this.selectedUser[0].id;
// obj.name=this.selectedUser[0].name;
// uni.$emit('Selection',obj)
uni.navigateBack({
delta: 1
});
},
goBack() {
uni.navigateBack({
delta: 1
});
}
}
};
</script>
<style scoped>
>>> .uni-navbar__header,
>>> .uni-status-bar {
background-image: linear-gradient(254deg, #0ca7ee 0%, #005aff 100%, #2a8cff 100%, #54bdff 100%),
linear-gradient(#e60012, #e60012);
}
>>> uni-image {
height: 200upx;
width: 200upx;
}
.componentWrap {
background-color: #f3fbff;
padding-bottom: 227rpx;
}
.list-wrap {
width: 720rpx;
margin: 0 auto;
background-color: #FFFFFF;
border-radius: 10rpx;
padding: 25rpx 32rpx;
box-sizing: border-box;
margin-top: 24rpx;
}
.listItem{
display: flex;
width: 100%;
padding: 28upx;
align-items: center;
border-bottom: 1upx solid #dddddd;
}
.deptImage{
width: 37upx;
height: 33upx;
margin-right: 28upx;
}
.userImage{
width: 50upx;
height: 50upx;
margin-right: 28upx;
}
.itemName{
line-height: 100%;
}
.bottomBlock{
width: 100%;
height: 150upx;
position: fixed;
bottom: 0;
background-color: #015efe;
color: #ffffff;
z-index: 100;
}
.checkUserShow{
padding-left:20upx;
line-height: 150upx;
}
.submitBtn{
position: absolute;
bottom: 40upx;
right: 30upx;
background-color: #ff7000;
}
</style>

View File

@ -102,7 +102,7 @@
</label>
</radio-group>
</view>
<view class="btn" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
<view class="btn" v-if="type=='handle'" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
<button class="mini-btn" size="mini" type="primary" @click="eventHandle">处理</button>
</view>
<img-view ref="imgPreView" :imgSrc="preImgSrc" @cancelPreView="cancelPreView"></img-view>
@ -139,29 +139,26 @@
},
onLoad(params) {
this.eventId = params.eventId;
this.type = params.type;
},
onShow() {
this.getEventItem();
},
methods: {
radioChange(val) {
this.form.mark=val
this.form.mark=val.detail.value;
},
cancelPreView(){
this.preImgSrc = '';
},
//preview
/* preView(srcImg){
preView(srcImg){
let imgs = [];
imgs.push(srcImg)
uni.previewImage({
urls: imgs,
current: 0,
});
}, */
preView(srcImg){
this.preImgSrc = srcImg;
this.$refs.imgPreView.open();
},
cancelPreImg(){
this.preImg = false;
@ -183,6 +180,7 @@
eventHandle() {
debugger;
console.log(this.form)
this.mark = parseInt(this.form.mark);
this.$u.api.eventtHandle(this.eventId, this.form).then(res => {
this.goBack()
})

View File

@ -19,14 +19,30 @@
<view>{{ticketDetail.title}}</view>
</view>
</view>
<view class="form-item" @click="logView">
<view class="form-item border-bottom" @click="logView">
<view class="form-left">
<text class="form-left-text">工单状态</text>
<text class="form-left-text">工单节点</text>
</view>
<view class="form-right" style="color:blue">
<view v-if="ticketDetail.state">{{ticketDetail.state_.name}}</view>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="form-left-text">工单状态</text>
</view>
<view class="form-right" style="color:red">
<view v-if="ticketDetail.state">{{act_states[ticketDetail.act_state]}}</view>
</view>
</view>
<view class="form-item" v-if="ticketDetail.participant_&&ticketDetail.participant_.length>0">
<view class="form-left">
<text class="form-left-text">可处理人</text>
</view>
<view class="form-right">
<text v-for="(item,index) in ticketDetail.participant_">{{item.name}} <text v-if="index!==ticketDetail.participant_.length-1"></text></text>
</view>
</view>
</view>
<block v-if="cateType==='visit'">
<view class="ticket-info">
@ -331,6 +347,23 @@
</view>
</view>
</block>
<block v-if="type=='handle'&&oplDetail.ticket_.act_state==2">
<view class="ticket-info">
<view style="display: flex;flex-direction: column;">
<view style="display: block;">{{tLog[0].state_.name}}</view>
<view style="color:gray;font-size: 28rpx;">
<span v-if="tLog[0].participant">{{tLog[0].participant_.name}}-</span>
<span v-if="tLog[0].transition_attribute==1" style="color:green">同意-</span>
<span v-if="tLog[0].transition_attribute==2" style="color:red">拒绝-</span>
<span>{{tLog[0].create_time}}</span>
</view>
<view style="color:gray;font-size: 28rpx;">
<span>{{tLog[0].suggestion}}</span>
</view>
</view>
</view>
</block>
<block v-if="type=='handle'">
<view class="ticket-info">
<view class="form-item" v-if="ticketDetail.state_&&ticketDetail.state_.key==='opl_close'">
@ -341,28 +374,28 @@
<uni-data-select v-model="form.close_note" :localdata="noteOption" label="选择关闭原因"></uni-data-select>
</view>
<view class="form-item" v-if="ticketDetail.state_&&ticketDetail.state_.key==='opl_close'">
<!-- <view class="form-left-text">
<text class="star">*</text>
<text>关闭处理</text>
</view> -->
<uni-data-select v-model="form.close_dos" :localdata="dosOption" label="关闭处理"></uni-data-select>
</view>
<view class="form-item" style="height: 300rpx;">
<view class="form-item" style="height: 300rpx;" v-if="oplDetail.ticket_.act_state!==2">
<view class="form-left-text">
<text class="star">*</text>
<text>审批意见</text>
</view>
<textarea class="apply-reason-text" v-model="form.name" maxlength="250" placeholder="请输入" />
<textarea class="apply-reason-text" v-model="form.suggestion" maxlength="250" placeholder="请输入" />
</view>
<view class="btn" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
<view class="left-content">
<view class="left-content" v-if="oplDetail.ticket_.act_state!==2">
<button class="mini-btn" size="mini" type="primary" @click="addNode">加签</button>
<button class="mini-btn" size="mini"
v-if="ticketDetail.state_&&ticketDetail.state_.enable_deliver" type="primary" plain
@click="deliverNode">转交
</button>
</view>
<view class="left-content" v-else>
<button class="mini-btn" size="mini" type="primary" @click="oplChuLi()">前往编辑</button>
</view>
<view class="right-time">
<button v-for="item in operationBtn" :key="item.id" class="mini-btn" size="mini"
:type="item.attribute_type===2?'warn':'primary'" @click="operationSubmit(item.id)"
style="margin-left:8upx">
@ -494,6 +527,14 @@
40: "进行中",
50: "已完成",
},
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
noteOption: [{
value: 10,
text: '作业正常结束'
@ -523,14 +564,19 @@
}
},
onLoad(params) {
debugger;
console.log(params)
// debugger;
// console.log(params)
that = this;
that.ticketId = params.ticketId;
that.projectId = params.projectId;
that.cateType = params.cateType;
that.type = params.type;
},
mounted() {
this.$u.api.getTicketLog(this.ticketId).then((res) => {
this.tLog = res;
});
},
onShow() {
if (this.cateType === 'visit') {
this.getVisit();
@ -541,6 +587,7 @@
}
this.getticketItem();
this.getBtns();
},
methods: {
closeDialog() {
@ -548,10 +595,11 @@
},
//
logView() {
this.$u.api.getTicketLog(this.ticketId).then((res) => {
this.logDialog = true;
this.tLog = res;
});
this.logDialog = true;
// this.$u.api.getTicketLog(this.ticketId).then((res) => {
// this.logDialog = true;
// this.tLog = res;
// });
},
//
getticketItem() {
@ -561,9 +609,9 @@
},
//访
getVisit() {
debugger;
// debugger;
this.$u.api.visitItem(this.projectId).then(res => {
debugger;
// debugger;
this.visitDetail = res;
})
},
@ -694,7 +742,6 @@
params.ticket_data.close_note = this.form.close_note;
params.ticket_data.close_dos = this.form.close_dos;
}
debugger;
uni.showLoading({
mask: true,
title: '正在提交...'
@ -727,7 +774,20 @@
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjDetail?rpjId=' + that.projectId
})
}
},
oplChuLi(){
debugger;
let item = this.oplDetail;
let params=null,oplCateCode = null;
let transition = this.operationBtn[0].id;
oplCateCode = item.cate_code;
console.log(transition)
params = `?oplId=${item.id}&oplcateId=${item.cate}&operationId=${item.operation}&type=edit&transition=${transition}`;
let url = '/pages/workSpace/opls/' + oplCateCode + params
uni.navigateTo({
url: url
})
},
}
}

View File

@ -10,6 +10,11 @@
<text class="text">{{ticketCount}}</text>
<view class="status">待办工单</view>
</view>
<view @click="goIntoTargetPage('copy')"
style="width: 25%;height: 100%;display: flex;flex-direction: column;justify-content: center;">
<text class="text">{{copyCount}}</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">{{eventCount}}</text>
@ -25,7 +30,7 @@
</view>
<text class="title-text-left">待审批</text>
</view>
<view class="" @click="goIntoTargetPage('daiban')">
<view class="" @click="goIntoTargetPage('duty')">
<text class="title-text-right">查看更多</text>
<uni-icons type="right" :size="11" color="#ababab"></uni-icons>
</view>
@ -35,10 +40,17 @@
<view v-for="item in ticketList" :key="item.id">
<view class="itemTitle">{{item.title}}</view>
<view class="itemCenter">
<view class="info-details" v-if="item.ticket_data.name">工单名称{{item.ticket_data.name}}</view>
<view class="info-details">所属工作流{{item.workflow_.name}}</view>
<view class="info-details">工单状态{{item.state_.name}}</view>
<view class="info-details">工单节点{{item.state_.name}}</view>
<view class="info-details">工单状态{{act_states[item.act_state]}}</view>
<view class="info-details">提交时间{{item.create_time}} </view>
<view class="info-details">更新时间{{item.update_time}} </view>
<!-- <view class="info-details">可处理人{{item.update_time}} </view> -->
<view class="info-details" v-if="item.participant_&&item.participant_.length>0">
可处理人
<text v-for="(val,index) in item.participant_">{{val.name}} <text v-if="index!==item.participant_.length-1"></text></text>
</view>
</view>
<view class="bottom-btns">
<view class="shenhezhong bottom-btn" @click="ticketHandle(item,'handle')"
@ -46,6 +58,50 @@
<image src="../../static/my/my_apply/blue-time.png" mode=""></image>
处理
</view>
<view class="shenhezhong bottom-btn" @click="ticketHandle(item,'handle')"
v-if=" item.act_state===2&&item.create_by==vuex_user.id">
<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="copy">
<view class="copy01">
<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="" @click="goIntoTargetPage('cc')">
<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="copyList.length>0">
<view v-for="item in copyList" :key="item.id">
<view class="itemTitle">{{item.title}}</view>
<view class="itemCenter">
<view class="info-details" v-if="item.ticket_data.name">工单名称{{item.ticket_data.name}}</view>
<view class="info-details">所属工作流{{item.workflow_.name}}</view>
<view class="info-details">工单状态{{item.state_.name}}</view>
<view class="info-details">提交时间{{item.create_time}} </view>
<view class="info-details">更新时间{{item.update_time}} </view>
</view>
<view class="bottom-btns">
<view class="shenhejieshu bottom-btn" @click="ticketHandle(item,'show')">
<image src="../../static/my/my_apply/tongguo.png" mode=""></image>
查看
@ -110,10 +166,20 @@
limitedOperation:false,
limitedRpj:false,
limitedVisit:false,
copyList: [],
ticketList: [],
eventList: [],
eventCount: 0,
ticketCount: 0,
copyCount:0,
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
// 2022218
mytopimg: require("@/static/home/bgimg-top.jpg"),
}
@ -125,8 +191,6 @@
// #endif
},
onShow() {
// debugger;
// console.log(this.vuex_perm)
if(this.vuex_user.type==='visitor'||this.vuex_user.type==='driver'){
this.limitedVisit = true;
}else{
@ -134,6 +198,7 @@
this.cateAggForm.start_create = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
this.getTicketAgg();
this.getTicket();
this.getcopy();
this.getEventAgg();
this.getEvent();
}
@ -150,6 +215,18 @@
that.ticketList = res.results.splice(0, 2);
})
},
getcopy() {
let that = this;
that.copyList = []
let params = {
category: 'cc'
};
that.$u.api.getTickets(params).then(res => {
that.copyCount = res.count;
that.copyList = res.results.splice(0, 2);
})
},
getEvent() {
let that = this;
let params = {
@ -180,12 +257,17 @@
})
},
goIntoTargetPage(type) {
// debugger;
if(this.limitedVisit==true){
}else{
if (type == "daiban") {
let params = `?type=${type}`;
if (type == "duty") {
uni.navigateTo({
url: "./list/ticket"
url: "./list/ticket"+params
})
}
if (type == "cc") {
uni.navigateTo({
url: "./list/ticket"+params
})
}
if (type == "warning") {
@ -194,7 +276,6 @@
})
}
}
},
ticketHandle(row, type) {
let projectId = null;
@ -280,15 +361,16 @@
font-size: 26rpx;
color: #383838;
}
.daiban01 {
.daiban01 ,.copy01{
width: 720rpx;
background-color: #ffffff;
border-radius: 10rpx;
margin: 0 auto;
margin-top: 88rpx;
}
.copy01{
margin-top: 20upx;
}
.title {
display: flex;
justify-content: space-between;

View File

@ -29,10 +29,14 @@
<view class="info-details">触发时间{{event.create_time}} </view>
</view>
<view class="bottom-btns">
<view class="shenhezhong bottom-btn" @click="eventHandle(event,'handle')">
<view class="shenhezhong bottom-btn" v-if="event.handle_user == null" @click="eventHandle(event,'handle')">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
处理
</view>
<view class="shenhejieshu bottom-btn" @click="eventHandle(event,'show')">
<image src="../../../static/my/my_apply/tongguo.png" mode=""></image>
查看
</view>
</view>
</view>
</view>
@ -102,8 +106,8 @@
}
})
},
eventHandle(val) {
let params = `?eventId=${val.id}`;
eventHandle(val,type) {
let params = `?eventId=${val.id}&type=${type}`;
uni.navigateTo({
url: '../detail/eventHandle' + params,
})
@ -184,6 +188,8 @@
font-family: PingFang-SC-Medium;
font-size: 28rpx;
line-height: 83rpx;
display: flex;
justify-content: space-around;
}
.shenhezhong {
@ -256,4 +262,8 @@
margin-right: 10rpx;
vertical-align: middle;
}
.shenhejieshu {
color: #15a306;
}
</style>

View File

@ -29,14 +29,18 @@
</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.state_.name}}</view>
<view class="info-details">工单状态<text :style="{color:val.act_state===2 ? 'red' : ''}">{{act_states[val.act_state]}}</text></view>
<view class="info-details" v-if="val.participant_&&val.participant_.length>0">可处理人
<text v-for="(item,index) in val.participant_">{{item.name}} <text v-if="index!==val.participant_.length-1"></text></text>
</view>
<view class="info-details">提交时间{{val.create_time}} </view>
<view class="info-details">更新时间{{val.update_time}} </view>
</view>
<view class="bottom-btns">
<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">
v-if="(val.act_state===1&&val.state_.type===0)||(val.act_state===3&&val.state_.type===0)||val.act_state===2">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
处理
</view>
@ -78,21 +82,33 @@
return {
params: {
search: '',
pageSize: 10,
pageNum: 1,
page_size: 10,
page: 1,
category: 'duty'
},
userId:'',
ticketTypye:'duty',
totalNum: 0,
ticketList: [],
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
}
},
onLoad(params) {
this.ticketTypye = params.type;
this.params.category = params.type;
},
//
onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
if (this.params.pageNum < totalPage) {
this.params.pageNum += 1;
const totalPage = Math.ceil(this.totalNum / this.params.page_size);
if (this.params.page < totalPage) {
this.params.page += 1;
this.getTicketLists();
} else {
uni.showToast({
@ -107,7 +123,7 @@
},
//
onPullDownRefresh() {
this.params.pageNum = 1;
this.params.page = 1;
this.ticketList = [];
this.getTicketLists();
},
@ -158,12 +174,12 @@
})
},
searchHandle() {
this.params.pageNum = 1;
this.params.page = 1;
this.ticketList = [];
this.getTicketLists()
},
resetSearch() {
this.params.pageNum = 1;
this.params.page = 1;
this.params.search = "";
this.ticketList = [];
this.getTicketLists();
@ -172,7 +188,7 @@
// debugger;
this.ticketTypye = index;
this.ticketList = [];
this.params.pageNum = 1;
this.params.page = 1;
if (index === 'duty') {
this.params.category = 'duty';
} else if (index === 'owner') {

View File

@ -510,7 +510,7 @@
// #ifdef APP-PLUS
let secret = that.ranStr(12)
let mySecret = {
'username': obj.username,
'username': obj.phone,
'secret': secret
}
that.$u.api.bindSecret({

View File

@ -106,16 +106,71 @@
obj.type= that.type;
if (!that.checkedParams(obj)) return;
that.$u.api.visitorRegister(obj).then(res => {
uni.hideLoading();
uni.showToast({
title:"注册成功,请重新登录",
uni.hideLoading();
uni.showToast({
title:"注册成功",
icon: "none"
})
uni.reLaunch({
url: '/pages/login/login_?autoLoading=no'
})
})
/* uni.reLaunch({
url: '/pages/login/login_?autoLoading=no'
}) */
that.$u.vuex('vuex_token', res.access)
that.$u.vuex('vuex_refresh', res.refresh);
that.$u.api.getUserInfo().then(user => {
if (user.avatar) {
user.avatar = this.vuex_host + user.avatar
}
that.$u.vuex('vuex_user', user)
if (user.avatar) {
user.avatar = this.vuex_host + user.avatar
}
let perms = [];
for (let key in user.perms) {
perms.push(key);
}
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))
}).catch(e => {})
// #endif
that.getUserRange();
})
},
ranStr(e) {
//e,
@ -135,6 +190,60 @@
codeChange(text) {
this.codeTips = text;
},
getUserRange() {
let that = this;
that.$u.api.deptList({
page: 0,
type__in: 'rparty,dept',
query: '{id, name, parent, type}'
}).then(res => {
let list1 = res;
let list2 = [];
let reqList = [];
list1.forEach(function(item) {
reqList.push(that.$u.api.userList({
page: 0,
belong_dept: item.id,
is_active: true,
query: '{id, name, belong_dept}'
}))
})
Promise.all(reqList).then(res => {
for (let i = 0; i < res.length; i++) {
list1[i].children = res[i]
}
list1.forEach(item => {
if (item.type == 'dept') {
list2.push({
...item
})
}
})
that.$u.vuex('vuex_userRange', that.parseData(list1))
that.$u.vuex('vuex_userRange2', that.parseData(list2))
})
})
},
parseData(data) {
// * parent
const obj = {};
data.forEach((item) => {
obj[item.id] = item;
});
const parentList = [];
data.forEach((item) => {
const parent = obj[item.parent];
if (parent) {
// *
parent.children = parent.children || [];
parent.children.unshift(item);
} else {
parentList.push(item);
}
});
return parentList;
},
//
getCode(e) {
// debugger;

View File

@ -16,10 +16,21 @@
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
<view class="clock_in_-item">
<view class="center-info">
<view class="info-details">触发模式{{val.detail.openTypeStr}}</view>
<view class="info-details">打卡类型<text v-if="val.type==10">上班打卡</text><text v-else>下班打卡</text></view>
<view class="info-details">其他信息{{val.detail.deviceName}}</view>
<view class="info-details">打卡时间{{val.update_time}}</view>
<view class="info-details">
触发设备
{{trigger_[val.trigger]}}
</view>
<view class="info-details">触发地点{{val.detail.deviceName}}</view>
<view class="info-details">打卡时间{{val.create_time}}</view>
<view class="info-details">考勤推测
<text v-if="val.type==10" class="nomalState type01">上班打卡</text>
<text v-else-if="val.type==20" class="nomalState type02">下班打卡</text>
<span v-if="(val.type==10 || val.type==20)&&val.exception_type!==null">-</span>
<text v-if="val.exception_type==10" class="nomalState type1">在岗时间短</text>
<text v-else-if="val.exception_type==20" class="nomalState type2">在岗时间长</text>
<text v-else-if="val.exception_type==30" class="nomalState type3">缺卡</text>
<text v-else-if="val.exception_type==40" class="nomalState type4">加班</text>
</view>
</view>
</view>
</view>
@ -35,11 +46,16 @@
return {
params: {
employee: '',
pageSize: 10,
pageNum: 1,
page_size: 10,
page: 1,
month: '',
year:''
},
trigger_:{
"door": "门禁",
"location": "定位",
"panel":"面板机"
},
totalNum: 0,
activeIndex:true,//
lists: [],
@ -50,10 +66,10 @@
},
//
onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
if (this.params.pageNum < totalPage) {
this.params.pageNum += 1;
const totalPage = Math.ceil(this.totalNum / this.params.page_size);
if (this.params.page < totalPage) {
this.params.page += 1;
this.getLists();
} else {
uni.showToast({
title: "已全部加载",
@ -82,7 +98,7 @@
},
//
onPullDownRefresh() {
this.params.pageNum = 1;
this.params.page = 1;
this.lists = [];
this.getLists();
},
@ -98,7 +114,7 @@
}else{
that.activeIndex=false;
}
that.params.pageNum = 1;
that.params.page = 1;
that.lists = [];
that.getLists();
},
@ -114,7 +130,7 @@
that.activeIndex = index;
that.params.month = that.currentMonth;
that.params.year = that.currentYear;
that.params.pageNum = 1;
that.params.page = 1;
that.lists = [];
that.getLists();
},
@ -180,5 +196,44 @@
line-height: 40rpx;
color: #5b5b5b;
}
.nomalState {
font-size: 12px;
padding: 0 9px;
height: 24px;
line-height: 23px;
border-radius: 5px;
vertical-align: top;
display: inline-block;
}
.nomalState.type1{
color: #F8DD4E;
background-color: #f9f7e6;
border: 1px solid #f3f0d5;
}
.nomalState.type2{
color: #FF0000;
background-color: #f7e7e7;
border: 1px solid #fbe0e0;
}
.nomalState.type3{
color: #FA8435;
background-color: #fef6ed;
border: 1px solid #fde9cc;
}
.nomalState.type4{
color: #44CEF6;
background-color: #f0f9fb;
border: 1px solid #d2f9ff;
}
.nomalState.type01{
color: #536dfe;
background-color: #edf0fe;
border: 1px solid #dce1fe;
}
.nomalState.type02{
color: #67c23a;
background-color: #f0f9eb;
border: 1px solid #e1f3d8;
}
</style>

View File

@ -24,7 +24,7 @@
<u-tag text="访客" v-if="vuex_user.type === 'visitor'"/>
</view>
</view>
<view>{{vuex_version}}</view>
<view @click="checkVersion">{{vuex_version}}</view>
<!-- <button type="default" class="modify-info" @click="goInto('myDataChange')">完善资料</button> -->
</view>
</view>
@ -35,23 +35,41 @@
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
<view class="enter-item" @click="goInto('myData')">
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeshenqing.png"
mode=""></image>
<text class="title-text">我的资料</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
<view class="enter-item" @click="goInto('clockIn')">
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeshenqing.png"
mode=""></image>
<text class="title-text">我的打卡记录</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
<view class="enter-item">
<view class="enter-item" @click="goInto('visitor')">
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
mode=""></image>
<text class="title-text">我的访客库</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
<view class="enter-item" @click="goInto('remployee')" v-if="vuex_user.type=='remployee'">
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
mode=""></image>
<text class="title-text">我的人员库</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
<view class="enter-item" @click="goInto('signature')" >
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
mode=""></image>
<text class="title-text">我的电子签名</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
<view class="enter-item" @click="goInto('password')">
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
mode=""></image>
<text class="title-text">修改密码</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view>
</view>
<view class="sign-out">
<button type="default" @click="signoutFn" class="sign-out-btn">退出账号</button>
@ -88,21 +106,41 @@
url: '/pages/my/myCertificates'
})
}
if (type == "myData") {
else if (type == "myData") {
uni.navigateTo({
url: '/pages/my/myInfo'
})
}
if (type == "myDataChange") {
else if (type == "myDataChange") {
uni.navigateTo({
url: '/pages/my/myInfoChange'
})
}
if (type == "clockIn") {
else if (type == "clockIn") {
uni.navigateTo({
url: '/pages/my/clock_in'
})
}
else if (type == "visitor") {
uni.navigateTo({
url: '/pages/workSpace/visit/visitor'
})
}
else if (type == "remployee") {
uni.navigateTo({
url: '/pages/workSpace/rpj/remployee'
})
}
else if (type == "signature") {
uni.navigateTo({
url: '/pages/my/signature'
})
}
else if (type == "password") {
uni.navigateTo({
url: '/pages/my/passwordChange'
})
}
},
getUserInfo() {
var promise;
@ -184,6 +222,87 @@
url:'/pages/login/login_?autoLoading=no'
})
})
},
checkVersion(){
let that = this;
uni.getSystemInfo({
success(res) {
that.$u.vuex('vuex_version', res.appVersion)
// #ifdef APP-PLUS
if (res.platform == 'android') {
that.$u.vuex('vuex_version', res.appVersion)
that.$u.api.apkCheck().then(res1 => {
if (res.appVersion < res1.version) {
uni.showModal({
title: "发现新版本",
content: "有新的版本发布, 请下载新版本",
confirmText: '立即更新',
success: (res2) => {
if (res2.confirm) {
if(res1.file.indexOf("http") == 0){
// this.appdownLoad(res1.file);
plus.runtime.openURL(res1.file)
}else{
// this.appdownLoad(that.vuex_host + res1.file);
plus.runtime.openURL(that.vuex_host + res1.file)
}
} else {
return false
}
}
})
}else{
uni.showModal({
title: "版本检测",
content: "当前版本("+res.appVersion+")已是最新版本",
confirmText: '确定',
success: (res2) => {
}
})
}
})
}
// #endif
}
})
},
//app
appdownLoad(url) {
var that = this;
uni.showLoading({
title: '安装包下载中……'
})
const downloadTask = uni.downloadFile({
url: url, // app
success: (downloadResult) => {
uni.hideLoading();
console.log(downloadResult)
if (downloadResult.statusCode === 200) {
uni.showModal({
title: '',
content: '下载成功,安装新版本',
confirmText: '确定',
showCancel: false,
success: function(res) {
if (res.confirm == true) {
plus.runtime.install( //
downloadResult.tempFilePath, {
force: true
},
function(res) {
utils.showToast('更新成功,重启中');
plus.runtime.restart();
}
);
}
}
});
}
}
});
}
}
}

View File

@ -29,6 +29,7 @@
</view>
<view class="btn">
<button type="default" class="save-btn" @click="saveInfo">保存</button>
<button plain="true" class="back-btn" @click="backLogin">返回登陆页</button>
</view>
</view>
</template>
@ -130,7 +131,11 @@
})
}
},
backLogin(){
uni.reLaunch({
url:'/pages/login/login_'
})
},
}
}
</script>
@ -207,4 +212,12 @@
color: #f3fbff;
margin-top: 21rpx;
}
.back-btn{
width: 400rpx;
height: 80rpx;
border-radius: 40rpx;
font-size: 30rpx;
line-height: 80rpx;
margin-top: 21rpx;
}
</style>

194
pages/my/passwordChange.vue Normal file
View File

@ -0,0 +1,194 @@
<template>
<view class="my-data">
<uni-nav-bar class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="修改密码"
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="wrap-view" style="box-shadow: 0 0 15px 5px #eeeeee;padding-bottom: 20upx;">
<view class="item">
<view class="title">密码修改</view>
<view class="content"></view>
</view>
<view class="item item_bottom_border">
<view class="title"><text class="star">*</text>旧密码</view>
<view class="content">
<input class="passwordInput" v-model="formData.old_password" placeholder-style="color: #999999;"
name="oldPassword" password placeholder="请输入旧密码" />
</view>
</view>
<view class="item item_bottom_border">
<view class="title"><text class="star">*</text>新密码</view>
<view class="content">
<input class="passwordInput" v-model="formData.new_password1" placeholder-style="color: #999999;"
name="new_password1" password placeholder="请输入新密码" />
</view>
</view>
<view class="item item_bottom_border">
<view class="title"><text class="star">*</text>确认新密码</view>
<view class="content">
<input class="passwordInput" v-model="formData.new_password2" placeholder-style="color: #999999;"
name="new_password2" password placeholder="请再次输入新密码" />
</view>
</view>
</view>
<view class="btn">
<button type="default" class="save-btn" @click="saveInfo">保存</button>
</view>
</view>
</template>
<script>
import nonNullCheck from '../../utils/nonNullCheck.js';
export default {
data() {
return {
formData: {
old_password: '',
new_password1: '',
new_password2: '',
},
hasPhoto:false,
}
},
onShow() {
},
methods: {
/* 参数验证 */
paramsCheck() {
if (!nonNullCheck(this.formData.old_password)) {
uni.showToast({
title: '请填旧密码',
icon: "none"
})
return false;
}
if (!nonNullCheck(this.formData.new_password1)) {
uni.showToast({
title: '请填新密码',
icon: "none"
})
return false;
}
if (!nonNullCheck(this.formData.new_password2)) {
uni.showToast({
title: '请再次填新密码',
icon: "none"
})
return false;
}
return true;
},
saveInfo(){
let that = this;
if (!that.paramsCheck()) {
return;
} else {
if(that.formData.new_password1===that.formData.new_password2){
uni.showLoading({
title: '保存中...',
mask: true
})
this.$u.api.passChange(this.formData).then(res=>{
uni.hideLoading()
uni.showToast({
title: '保存成功',
icon: 'none'
})
uni.reLaunch({
url: '/pages/login/login_'
})
}).catch(e=>{
uni.hideLoading()
})
}else{
uni.showToast({
title: '两次填写的新密码不一致,请确认后再提交',
icon: "none"
})
}
}
},
backLogin(){
uni.navigateBack({
delta: 1
})
},
}
}
</script>
<style scoped>
>>>.uni-navbar__header,
>>>.uni-status-bar {
background-image: linear-gradient(254deg,
#0ca7ee 0%,
#005aff 100%,
#2a8cff 100%,
#54bdff 100%),
linear-gradient(#e60012,
#e60012);
}
>>>uni-image{
height: 200upx;
width: 200upx;
}
.my-data {
background-color: #f3fbff;
padding-bottom: 227rpx;
}
.nav-bar>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.wrap-view {
width: 720rpx;
margin: 0 auto;
background-color: #ffffff;
border-radius: 10rpx;
line-height: 94rpx;
font-family: PingFang-SC-Medium;
font-size: 30rpx;
}
.wrap-top{
padding: 20upx 0;
line-height: 60upx;
}
.item {
margin: 0rpx 32rpx;
display: flex;
margin-top: 20rpx;
}
.item_bottom_border{
border-bottom: 1rpx solid #eeeeee;
}
.title {
color: #212121;
width: 180upx;
}
.content {
flex: 1;
color: #414141;
}
.content input {
height: 100%;
}
.passwordInput{
color: #2c6fd9;
}
.save-btn {
width: 400rpx;
height: 80rpx;
background-color: #2c6fd9;
border-radius: 40rpx;
font-size: 30rpx;
line-height: 80rpx;
color: #f3fbff;
margin-top: 21rpx;
}
</style>

176
pages/my/signature.vue Normal file
View File

@ -0,0 +1,176 @@
<template>
<view>
<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>
<view class="imgs">
<image class="img" :src="img1" mode="widthFix" style="margin: 0px 24px;"></image>
</view>
<view style="display: flex;justify-content: space-around;">
<button type="primary" @tap="doss" style="width: 40%;">生成签名</button>
<button type="primary" @tap="checks" style="width: 40%;">选择签名</button>
</view>
<catSignature canvasId="canvas1" @close="close" @save="save" :visible="isShow" ref="eleSignature"/>
</view>
</view>
</template>
<script>
import catSignature from '@/components/canvas.vue';
export default {
components: {
catSignature
},
data() {
return {
userInfo:{},
isShow: false,
img1:"",
header:'',
tempFilePath:''
}
},
mounted() {
this.header = {Authorization: "Bearer " + this.vuex_token};
this.getUserInfo();
console.log(this.vuex_user)
},
methods: {
getUserInfo() {
let that = this;
that.$u.api.hrmUserInfo().then(res => {
that.userInfo = res;
that.img1 = this.vuex_host+res.signature;
})
},
doss() {
this.isShow = true;
// debugger;
console.log(this.vuex_apifile)
},
close() {
this.isShow = false;
},
checks(){
let that = this;
uni.chooseImage({
count:1,
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function(res) {
// debugger;
that.signImage = res.tempFilePath;
console.log(res);
that.img1 = res.tempFilePaths[0];
that.imgUp(res.tempFilePaths[0]);
}
});
},
imgUp(tempFilePaths){
// debugger;
let that = this;
uni.uploadFile({
url: this.vuex_apifile,
filePath: tempFilePaths,
name: 'file',
header: this.header,
success: resImg => {
let data = this.toJson && this.$u.test.jsonString(resImg.data) ? JSON.parse(resImg.data) : resImg.data;
let pData = JSON.parse(data)
let sform = {
"signature": pData.path,
"id_number":that.userInfo.id_number,
"photo": that.userInfo.photo,
}
that.img1 = this.vuex_host+pData.path;
console.log(sform.signature)
alert(sform.signature)
that.$u.api.hrmUpdateInfo(sform).then(res=>{
debugger;
console.log('签名更新成功')
})
},
fail: e => {
debugger;
},
complete: resImg => {
debugger;
}
});
},
save(val,data) {
let that = this;
that.img1 = that.$refs.eleSignature.signImage;
that.isShow = false;
uni.uploadFile({
url: this.vuex_apifile,
filePath: data.file,
name: 'file',
header: this.header,
success: resImg => {
let data = this.toJson && this.$u.test.jsonString(resImg.data) ? JSON.parse(resImg.data) : resImg.data;
let pData = JSON.parse(data)
// console.log(""+data)
// console.log(""+pData)
// debugger;
console.log("签名地址:"+pData.path)
let sform = {
"signature": pData.path,
"id_number":that.userInfo.id_number,
"photo": that.userInfo.photo,
}
sform.signature = pData.path;
that.$u.api.hrmUpdateInfo(sform).then(res=>{
debugger;
console.log('签名更新成功')
})
},
fail: resImg => {
debugger;
console.log(resImg)
},
complete: resImg => {
debugger;
console.log(resImg)
}
});
},
base64toFile(urlString, fileName) {
const dataArr = urlString.split(",");
const byteString = atob(dataArr[1]);
const options = {
type: "image/png",
endings: "native"
};
const u8Arr = new Uint8Array(byteString.length);
for (let i = 0; i < byteString.length; i++) {
u8Arr[i] = byteString.charCodeAt(i);
}
return new File([u8Arr], fileName + ".png", options);//
},
dataURLtoFile(dataURI, type) {
let binary = atob(dataURI.split(",")[1]);
let array = [];
for (let i = 0; i < binary.length; i++) {
array.push(binary.charCodeAt(i));
}
return new Blob([new Uint8Array(array)], { type: type });
},
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;
}
</style>

View File

@ -1,28 +1,32 @@
<template>
<view class="my-data">
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="添加人员"
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" :leftText="leftText"
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="wrap-view">
<view class="item">
<text class="star">*</text>
<view class="title">姓名</view>
<view class="content">
<input type="text" v-model="formData.name" maxlength="20" placeholder="请输入" />
</view>
</view>
<view class="item">
<text class="star">*</text>
<view class="title">手机号</view>
<view class="content">
<input type="text" v-model="formData.phone" maxlength="20" placeholder="请输入" />
</view>
</view>
<view class="item">
<text class="star">*</text>
<view class="title">身份证号</view>
<view class="content">
<input type="text" v-model="formData.id_number" maxlength="20" placeholder="请输入" />
</view>
</view>
<view class="item" style="height: fit-content;">
<text class="star">*</text>
<view class="title">证件照</view>
<view style="flex: 3;">
<u-upload :action="vuex_apifile" :header="upHeader" ref="uUpload"
@ -48,36 +52,93 @@
phone: "",
id_number: ""
},
leftText: '添加人员',
rparty:'',
upHeader:'',
fileList:[]
}
},
onLoad(params) {
if(params.type == 'edit'){
this.leftText = '编辑人员';
this.formData.id = params.id;
}
if(params.rparty){
this.rparty = params.rparty;
}
if(this.rparty && this.formData.id){
this.getRemployee()
}
else if(this.formData.id){
this.getVisitor()
}
this.getHeader();
},
methods: {
getHeader(){
this.upHeader = {Authorization: "Bearer " + this.vuex_token}
},
getRemployee(){
this.$u.api.remployeeDetail(this.formData.id).then(res=>{
this.formData = res
this.fileList = [this.vuex_host+res.photo]
})
},
getVisitor(){
this.$u.api.visitorDetail(this.formData.id).then(res=>{
this.formData = res
this.fileList = [this.vuex_host+res.photo]
})
},
saveVisitor(){
if(this.rparty!==''){
let obj = {...this.formData};
obj.rparty = this.rparty;
this.$u.api.remployeeCreate(obj).then(res=>{
uni.navigateBack({
delta: 1
if(this.formData.id){
this.$u.api.remployeeUpdate(obj.id, obj).then(res=>{
uni.showToast({
title:'保存成功',
icon: 'none'
})
uni.navigateBack({
delta: 1
})
})
})
}else{
this.$u.api.remployeeCreate(obj).then(res=>{
uni.showToast({
title:'保存成功',
icon: 'none'
})
uni.navigateBack({
delta: 1
})
})
}
}else{
this.$u.api.visitorCreate(this.formData).then(res=>{
if(this.formData.id){
this.$u.api.visitorUpdate(this.formData.id, this.formData).then(res=>{
uni.showToast({
title:'保存成功',
icon: 'none'
})
uni.navigateBack({
delta: 1
})
})
}
else{this.$u.api.visitorCreate(this.formData).then(res=>{
uni.showToast({
title:'创建成功',
icon: 'none'
})
uni.navigateBack({
delta: 1
})
})
}
}
},
goBack() {

View File

@ -99,11 +99,9 @@
<text class="form-left-text">部门协调员</text>
</view>
<view class="form-right">
<ba-tree-picker ref="dcoordinator_Picker" :multiple='false' @select-change="select_coordinator_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showDcoordinatorPicker" style="position: relative;display: flex;">
<text type="text">{{dcoordinator_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showDcoordinatorPicker" type="arrowright" color="#999999"/>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -199,7 +197,10 @@
this.$refs.dept_ter_Picker._show();
},
showDcoordinatorPicker(){
this.$refs.dcoordinator_Picker._show();
let params='?type=coordinator&typeName=dcoordinator_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
cancel(){
this.$refs.treePicker._hide();

View File

@ -19,17 +19,6 @@
<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>
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
</image>
<view class="right-btn" @click="searchHandle">搜索</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">
@ -94,12 +83,16 @@
remployee:false,
}
},
onLoad() {
this.params.create_by = this.vuex_user.id;
},
//
onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.page_size);
if (this.params.page < totalPage) {
this.params.page += 1;
let that = this;
let totalPage = Math.ceil(that.totalNum / that.params.page_size);
if (that.params.page < totalPage) {
that.params.page += 1;
that.getLists();
} else {
uni.showToast({
title: "已全部加载",
@ -111,9 +104,11 @@
if(this.vuex_user.type==='remployee'){
this.remployee = true;
}
this.lists = [];
this.params.create_by = this.vuex_user.id;
this.getLists();
if(this.params.page == 1){
this.lists = [];
this.getLists();
}
},
//
onPullDownRefresh() {
@ -125,8 +120,8 @@
getLists() {
let that = this;
that.$u.api.operationList(that.params).then(res => {
that.totalNum = res.count;
that.lists = that.lists.concat(res.results);
this.totalNum = res.count;
})
},
operationHandle(val,type) {
@ -141,7 +136,6 @@
url: '/pages/workSpace/operation/operationCreate' + params,
})
}
},
operationDetail(val){
let operation = val.id;//id
@ -191,8 +185,8 @@
.empty-view {
height: 120rpx;
}
>>>.uni-navbar__header,
>>>.uni-status-bar,
.uni-navbar__header,
.uni-status-bar,
.search-wrap {
background-image: linear-gradient(270deg,
#0ca7ee 0%,

View File

@ -96,7 +96,7 @@
})
},
addCate(row,type) {
// debugger;
debugger;
let params=null,oplCateCode = null;
if(type==='edit'){
oplCateCode = row.cate_code;

View File

@ -3,14 +3,14 @@
<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 title"> <text class="blueLine"></text>{{formData.cate_name}}作业许可证信息</view>
<view class="item">
<view class="title">编号</view>
<view class="content">
<text>{{formData.number}}</text>
</view>
</view>
<view class="item">
<view class="item" v-if="formData.level">
<view class="title">作业级别</view>
<view class="content">
<text>{{formData.level}}</text>
@ -31,7 +31,7 @@
<view class="item">
<view class="title">状态</view>
<view class="content">
<!-- <text v-if="formData.ticket_">{{formData.ticket_.state_.name}}</text> -->
<text v-if="formData.ticket_">{{formData.ticket_.state_.name}}</text>
</view>
</view>
<view class="item">
@ -52,6 +52,12 @@
<text>{{formData.monitor_.name}}</text>
</view>
</view>
<!-- <view class="item" v-if="formData.participant_&&formData.participant_.length>0">
<view class="title">可处理人</view>
<view class="content">
<text v-for="(val,index) in formData.participant_">{{val.name}} <text v-if="index!==formData.participant_.length-1"></text></text>
</view>
</view> -->
<view class="item">
<view class="title">风险分析</view>
<view class="content">
@ -80,18 +86,21 @@
</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 class="workersWrap">
<view class="workersItem itemTitle">
<text class="workerCell">姓名</text>
<text class="workerCell">职责</text>
<text class="workerCell">证书</text>
<text class="workerCell">操作</text>
</view>
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
<text class="visitorCell" @click="viewWorker(item)" style="color:blue">{{item.worker_name}}</text>
<text class="visitorCell">{{item.duty}}</text>
<text class="visitorCell">{{item.certificates.length}}</text>
<view class="visitorCell">
<view class="workersItem" v-for="item in workerList" :key="item.id">
<text class="workerCell" @click="viewWorker(item)" style="color:blue">{{item.worker_name}}</text>
<text class="workerCell">{{item.duty}}</text>
<!-- <text class="workerCell">{{item.certificates.length}}</text> -->
<view class="workerCell">
<view class="certificate" @click="preView(cert.file)" style="color:blue" v-for="cert in item.certificates_" :key="cert.id">{{cert.number}}</view>
</view>
<view class="workerCell">
<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>
@ -100,22 +109,49 @@
</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 class="workersWrap">
<view class="workersItem itemTitle">
<text class="workerCell">检测部位</text>
<text class="workerCell">可燃气体(V%LEL)</text>
<text class="workerCell">检验结论</text>
</view>
<view class="visitorsItem" v-for="item1 in gasList" :key="item1.id">
<text class="visitorCell">{{item1.check_place}}</text>
<text class="visitorCell"></text>
<text class="visitorCell">
<view class="workersItem" v-for="item1 in gasList" :key="item1.id">
<text class="workerCell">{{item1.check_place}}</text>
<text class="workerCell"></text>
<text class="workerCell">
<span v-if="item1.is_ok">正常</span>
<span v-else>异常</span>
</text>
</view>
</view>
</view>
<view id="workerWrap" v-if="detailLimited">
<view class="workerContainer">
<view class="workerInfo">
<view class="infoTitle">姓名</view><view>{{workerItem.worker_.name}}</view>
</view>
<view class="workerInfo">
<view class="infoTitle">手机</view><view>{{workerItem.worker_.phone}}</view>
</view>
<view class="workerInfo">
<view class="infoTitle">工作职责</view><view>{{workerItem.duty}}</view>
</view>
<view class="workerInfo">
<view class="infoTitle">证书编号</view>
<view>
<view v-for="item in workerItem.certificates_"
style="color: blue;"
@click="preView(item.file)"
>{{item.number}}</view>
</view>
</view>
</view>
<icon class="closeDetailIcon" type="cancel" size="36" color="#fefefe" @click="closeWorkerDetail"/>
</view>
<view class="preBigImgWrap" v-if="preImg" @click="cancelPreImg">
<image class="bigImg" :src="preImgSrc" mode="widthFix"></image>
</view>
<!-- <img-view ref="imgPreView" :imgSrc="preImgSrc" @cancelPreView="cancelPreView"></img-view> -->
</view>
</template>
@ -142,6 +178,10 @@
"STARTED": "进行中",
"SUCCESS": "已完成"
},
preImgSrc:'',
workerItem:{},
preImg:false,
detailLimited:false,
workerList:[],
gasList:[],
act_states: {
@ -163,9 +203,12 @@
this.getgasList();//
},
methods: {
cancelPreImg(){
this.preImg = false;
},
//operation
getOpl() {
debugger;
//debugger;
let that = this;
that.$u.api.oplItem(that.oplId).then((res) => {
that.formData ={...res} ;
@ -209,13 +252,14 @@
let that = this;
let form = {};
form.type = type;
form.code = res.result;
form.employee = row.visitor_.employee;
form.employee = row.worker_.id;
if(type==10){
uni.scanCode({
success: function (res) {
form.code = res.result;
that.$u.api.thirdBltBind(form).then(res=>{
debugger;
//debugger;
console.log(res)
uni.showToast({
title: res,
icon: "none"
@ -225,7 +269,7 @@
});
}else{
that.$u.api.thirdBltBind(form).then(res=>{
debugger;
//debugger;
uni.showToast({
title: res,
icon: "none"
@ -240,12 +284,73 @@
})
},
viewWorker(item) {
uni.showToast({
title: item.id,
icon: 'none'
})
}
this.workerItem = item;
this.detailLimited = true;
},
closeWorkerDetail(){
this.detailLimited = false;
this.workerItem = null;
},
preView(srcImg){
this.preImg = true;
this.preImgSrc = this.vuex_host+srcImg;
console.log(this.preImgSrc)
// this.$refs.imgPreView.open();
},
cancelPreView(){
this.preImgSrc = '';
},
viewcertificate(item){
let vuex_host = this.vuex_host;
uni.showModal({
title: '证书',
content:item.name+'-'+item.number,
confirmText:'下载',
success: function (res) {
if (res.confirm) {
//
console.log('点击下载');
console.log(item.file);
//debugger;
let downloadFileUrl = vuex_host+item.file;
console.log(vuex_host)
console.log(downloadFileUrl)
uni.downloadFile({
url:downloadFileUrl,
success:(data)=> {
console.log(data);
console.log('下载反馈');
if(data.statusCode==200){
uni.saveFile({
tempFilePath: data.tempFilePath,
success: function (ress) {
console.log('保存成功')
console.log(ress)
//debugger;
uni.showToast({
title: '文件已保存',
icon: 'none',
duration:3000,
})
//debugger;
},
fail(err) {
console.log(err);
}
})
}
},
fail(err) {
console.log(err.errMsg)
}
});
} else if (res.cancel) {
console.log('取消');
}
}
});
},
}
}
</script>
@ -324,11 +429,11 @@
display: flex;
/* justify-content: space-between; */
}
.visitorsWrap{
.workersWrap{
}
.visitorsItem{
.workersItem{
display: flex;
font-size: 28upx;
align-items:center;
@ -339,12 +444,13 @@
font-size: 32upx;
line-height: 40upx;
}
.itemTitle>.visitorCell{
.itemTitle>.workerCell{
color: #212121;
}
.visitorCell{
.workerCell{
flex: 1;
color: #666666;
overflow: hidden;
text-align: center;
}
.blueLine{
@ -364,6 +470,7 @@
color: #ffffff;
font-size: 25upx;
text-align: center;
margin-right: 20upx;
}
.bindBtn2{
width: 80upx;
@ -376,4 +483,63 @@
font-size: 25upx;
text-align: center;
}
.certificate{
word-break:keep-all;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
#workerWrap{
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0,0,0,.6);
}
.workerContainer{
position: relative;
width: 90%;
left: 5%;
background: #ffffff;
padding: 40upx;
top: 50%;
transform: translateY(-50%);
max-height: 80%;
overflow-y: scroll;
border-radius: 20upx;
}
.workerInfo{
display: flex;
margin: 20upx 0;
}
.infoTitle{
width: 170upx;
}
.closeDetailIcon{
position: absolute;
bottom: 5%;
left: 50%;
transform: translateX(-50%);
}
.preBigImgWrap{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 100;
display: block;
background-color: rgba(0, 0, 0, 0.8);
}
.bigImg{
min-width: 90%;
max-width: 100%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50% ,-50%);
}
</style>

View File

@ -69,11 +69,9 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -83,11 +81,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -107,7 +103,6 @@
</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">
@ -131,7 +126,6 @@
</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">
@ -154,7 +148,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -201,6 +196,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -218,6 +214,9 @@
this.formData.operation = this.operationId;
this.getOperation();
}
if(params.transition){
this.transition = params.transition;
}
},
onShow() {
@ -230,10 +229,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -432,7 +437,6 @@
// let imgId = item.response.id?item.response.id:item.id;
// that.formData.create_imgs.push(imgId)
})
if (that.oplId !== null) {
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
uni.hideLoading();
@ -453,6 +457,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -69,11 +69,9 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -83,11 +81,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -107,7 +103,6 @@
</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">
@ -131,7 +126,6 @@
</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">
@ -152,7 +146,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -210,6 +205,7 @@
dept_do_name:'请选择作业部门',
charger_name:'请选择作业负责人',
monitor_name:'请选择作业监护人',
transition:'',//
}
},
onLoad(params) {
@ -229,7 +225,9 @@
this.formData.operation = this.operationId;
this.getOperation();
}
if(params.transition){
this.transition = params.transition;
}
},
onShow() {
this.getdept();
@ -241,10 +239,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -455,6 +459,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -80,14 +80,10 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
<view class="form-item border-bottom">
@ -96,11 +92,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -120,7 +114,6 @@
</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">
@ -144,7 +137,6 @@
</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">
@ -165,7 +157,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -224,6 +217,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -243,7 +237,9 @@
this.formData.operation = this.operationId;
this.getOperation();
}
if(params.transition){
this.transition = params.transition;
}
},
onShow() {
this.getdept();
@ -255,10 +251,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -469,6 +471,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -79,11 +79,9 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -93,11 +91,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -117,7 +113,6 @@
</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">
@ -141,7 +136,6 @@
</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">
@ -162,7 +156,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -224,6 +219,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -240,6 +236,9 @@
console.log('s', this.vuex_user.belong_dept)
this.formData.dept_do = this.vuex_user.belong_dept
}
if(params.transition){
this.transition = params.transition;
}
this.formData.cate = this.oplcateId;
this.formData.operation = this.operationId;
},
@ -257,10 +256,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -504,6 +509,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -78,13 +78,10 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
</view>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
<view class="form-item border-bottom" style="position: relative;">
@ -93,13 +90,10 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
<view class="form-item border-bottom" style="height: fit-content;">
@ -118,7 +112,6 @@
</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">
@ -142,7 +135,6 @@
</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">
@ -163,7 +155,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -222,6 +215,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -241,7 +235,9 @@
this.formData.operation = this.operationId;
this.getOperation();
}
if(params.transition){
this.transition = params.transition;
}
},
onShow() {
this.getdept();
@ -253,10 +249,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -467,6 +469,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -0,0 +1,613 @@
<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="form-info">
<view class="form-item border-bottom" style="height: 100rpx;">
<view class="">
<text class="form-left-text">关联作业</text>
</view>
<view class="form-right">
<view>{{operationName}}</view>
</view>
</view>
<view class="form-item" style="height: 100rpx;">
<view class="">
<text class="form-left-text">许可证类型</text>
</view>
<view class="form-right">
<view>普通作业</view>
</view>
</view>
</view>
<view class="form-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.start_time"
type="datetime"
:hide-second="true"
/>
</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 form-date">
<uni-datetime-picker
v-model="formData.end_time"
type="datetime"
:hide-second="true"
/>
</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" style="position: relative;">
<ba-tree-picker ref="deptDoPicker" :multiple='false' @select-change="deptDoChange" title="选择作业部门"
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children"/>
<view @click="showDeptDoPicker" style="position: relative;display: flex;">
<text type="text" @click="showDeptDoPicker">{{dept_do_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showDeptDoPicker" type="arrowright" color="#999999"/>
</view>
</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" style="position: relative;">
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</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" style="position: relative;">
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
<view class="form-item border-bottom" style="height: fit-content;">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">风险选择</text>
<!-- risks_checked -->
</view>
<view class="form-right">
<checkbox-group @change="checkboxRiskChange">
<label v-for="(item,index) in risklist" :key="item.value">
<checkbox :value="item.id" :checked="item.checked" />{{item.name}}
</label>
</checkbox-group>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="form-left-text">其他风险</text>
</view>
<view class="form-right">
<input type="text" v-model="formData.other_risk" maxlength="50" placeholder="请输入" />
</view>
</view>
<view class="form-item border-bottom" style="height: fit-content;">
<view class="form-left">
<text class="star">*</text>
<text class="form-left-text">措施选择</text>
<!-- measures_checked -->
</view>
<view class="form-right">
<checkbox-group @change="checkboxMeasuresChange">
<label v-for="(item,index) in measurelist" :key="item.value"
style="margin-right: 20rpx;margin-bottom: 20rpx;">
<checkbox :value="item.id" :checked="item.checked" />{{item.name}}
</label>
</checkbox-group>
</view>
</view>
<view class="form-item border-bottom">
<view class="form-left">
<text class="form-left-text">其他应急处置</text>
</view>
<view class="form-right">
<input type="text" v-model="formData.other_emr" maxlength="50" placeholder="请输入" />
</view>
</view>
</view>
<view class="form-info">
<view class="form-item " style="height: fit-content;">
<view class="form-left">
<text class="form-left-text">照片</text>
</view>
<view style="flex: 3;">
<u-upload :action="vuex_apifile" :header="header" ref="uUpload"
:file-list="fileList" max-count="9" @on-success="imgUpSuccess"></u-upload>
</view>
</view>
</view>
</view>
<view class="btn">
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
<script>
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
import nonNullCheck from '../../../utils/nonNullCheck.js';
import resetData from '../../../utils/common.js';
export default {
name: "clear",
components: {
baTreePicker
},
data() {
return {
formData: {
id: "",
operation: "",
level:"",
cate: "",
start_time: null,
end_time: null,
dept_do: '',
charger: '',
monitor: '',
other_emr: '',
other_risk: '',
risks_checked: [],
measures_checked: [],
create_imgs:[],
},
header: {},
oplId: null,
oplCateCode: null,
operationName: '',
oplCateName: '',
fileList: [],
risklist: [],
measurelist: [],
range: [],
//
depRange: [],
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
this.operationId = params.operationId;
this.oplcateId = params.oplcateId;
this.type = params.type;
if (params.oplId) {
this.oplId = params.oplId;
this.formData.id = params.oplId;
this.getOplDetail()
}else{
console.log('s', this.vuex_user.belong_dept)
this.formData.dept_do = this.vuex_user.belong_dept
this.formData.cate = this.oplcateId;
this.formData.operation = this.operationId;
this.getOperation();
}
if(params.transition){
this.transition = params.transition;
}
},
onShow() {
this.getdept();
this.getRange();
this.getHeader();
},
methods: {
showDeptDoPicker() {
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
this.dept_do_name = names;
},
select_charger_Change(ids, names) {
this.formData.charger = ids[0];
this.charger_name = names;
},
select_monitor_Change(ids, names) {
this.formData.monitor = ids[0];
this.monitor_name = names;
},
imgUpSuccess(data,index,lists){
debugger;
console.log(data)
console.log(index)
console.log(lists);
this.fileList=lists;
},
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
//operation
getOperation() {
let that = this;
that.$u.api.operationItem(that.operationId).then((res) => {
that.formData.start_time = res.start_time; //
that.formData.end_time = res.end_time; //
that.operationName = res.name; //
this.getOplcates()
});
},
getOplDetail(){
let that = this;
that.$u.api.oplItem(that.oplId).then((res) => {
that.formData = res; //
that.operationName = res.operation_.name;
that.dept_do_name = res.dept_do_.name;
that.charger_name = res.charger_.name;
that.monitor_name = res.monitor_.name;
res.create_imgs_.forEach(item=>{
that.fileList.push({
url: that.vuex_host+item.path,
progress: 0,
id:item.id,
error: false,
file: item
})
})
this.getOplcates()
});
},
//ID===>
getOplcates() {
let that = this;
that.$u.api.oplCateItem(that.oplcateId).then((res) => {
console.log(res); //
that.risklist = [];
that.measurelist = [];
that.oplCateName = res.name;
that.oplCateCode = res.code;
let risklist = res.risk_options_;
let measurelist = res.measure_options_;
risklist.forEach(item => {
let obj = {};
obj = item;
obj.checked = false;
that.risklist.push(obj)
})
measurelist.forEach(item => {
let obj = {};
obj = item;
obj.checked = false;
that.measurelist.push(obj)
})
this.editCheckShow()
});
},
editCheckShow() {
// debugger;
let that = this;
that.risklist.forEach(item => {
if (this.formData.risks_checked.indexOf(item.id) > -1) {
item.checked = true;
} else {
item.checked = false;
}
})
that.measurelist.forEach(item => {
if (this.formData.measures_checked.indexOf(item.id) > -1) {
item.checked = true;
} else {
item.checked = false;
}
})
},
//
getRange() {
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.range = range
})
},
//dept
getdept() {
let that = this;
that.$u.api.deptList({
page: 0
}).then(res => {
that.depRange = that.redata(res);
console.log(that.depRange)
})
},
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;
},
checkboxRiskChange(e) {
let values = e.detail.value;
this.formData.risks_checked = values;
},
checkboxMeasuresChange(e) {
let values = e.detail.value;
this.formData.measures_checked = values;
},
select(row) {},
goBack() {
uni.navigateBack({
delta: 1
})
},
edit(row) {},
saveSubmit() {
// debugger;
uni.showLoading({
title: '提交中'
});
let that = this;
let params = null;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
if (that.oplId !== null) {
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
uni.hideLoading();
params = `?oplId=${that.oplId}&oplCateCode=${that.oplCateCode}`;
uni.navigateTo({
url: '/pages/workSpace/operation/workerList' + params
})
})
} else {
that.$u.api.oplCreate(that.formData).then(res => {
uni.hideLoading();
params = `?oplId=${res.id}&oplCateCode=${that.oplCateCode}`;
uni.navigateTo({
url: '/pages/workSpace/operation/workerList' + params
})
})
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</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;
}
.form-info {
width: 720upx;
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;
}
.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;
}
.form-item {
font-family: PingFang-SC-Medium;
font-size: 30rpx;
height: 200rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
}
.form-left-text {
color: #212121;
margin-bottom: 33rpx;
}
.form-left {
width: 100%;
}
.form-right {
margin-left: 20rpx;
flex: 1;
color: #414141;
}
.form-right input {
font-size: 30rpx;
}
.form-date>>>.uni-date__x-input {
height: 97rpx;
font-size: 30rpx;
}
.form-date>>>.uni-icons {
display: none;
}
.form-right>>>.uni-label-pointer {
min-width: 50%;
display: inline-block;
margin-bottom: 20rpx;
}
.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-right {
flex: 1;
color: #414141;
}
.border-bottom {
border-bottom: 1rpx solid #eeeeee;
}
</style>

View File

@ -69,11 +69,9 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -83,11 +81,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择部门协调员"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -107,7 +103,6 @@
</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">
@ -131,7 +126,6 @@
</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">
@ -152,7 +146,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -210,6 +205,7 @@
dept_do_name:'请选择作业部门',
charger_name:'请选择作业负责人',
monitor_name:'请选择作业监护人',
transition:'',//
}
},
onLoad(params) {
@ -229,7 +225,9 @@
this.formData.operation = this.operationId;
this.getOperation();
}
if(params.transition){
this.transition = params.transition;
}
},
onShow() {
this.getdept();
@ -241,10 +239,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -455,6 +459,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -79,12 +79,10 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
</view>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
<view class="form-item border-bottom">
@ -93,11 +91,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -117,7 +113,6 @@
</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">
@ -141,7 +136,6 @@
</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">
@ -162,7 +156,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -216,6 +211,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -232,6 +228,9 @@
console.log('s', this.vuex_user.belong_dept)
this.formData.dept_do = this.vuex_user.belong_dept
}
if(params.transition){
this.transition = params.transition;
}
this.formData.cate = this.oplcateId;
this.formData.operation = this.operationId;
},
@ -249,10 +248,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -497,6 +502,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -79,11 +79,9 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -93,11 +91,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view><view class="form-item border-bottom" style="height: fit-content;">
@ -116,7 +112,6 @@
</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">
@ -140,7 +135,6 @@
</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">
@ -161,7 +155,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -219,6 +214,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -235,6 +231,9 @@
console.log('s', this.vuex_user.belong_dept)
this.formData.dept_do = this.vuex_user.belong_dept
}
if(params.transition){
this.transition = params.transition;
}
this.formData.cate = this.oplcateId;
this.formData.operation = this.operationId;
},
@ -252,10 +251,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -501,6 +506,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -69,12 +69,10 @@
<text class="form-left-text">作业负责人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="charger_Picker" :multiple='false' @select-change="select_charger_Change" title="选择作业负责人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showChargerPicker" style="position: relative;display: flex;">
<text type="text" @click="showChargerPicker">{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showChargerPicker" type="arrowright" color="#999999"/>
</view>
<text type="text" >{{charger_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
<view class="form-item border-bottom">
@ -83,11 +81,9 @@
<text class="form-left-text">作业监护人</text>
</view>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="monitor_Picker" :multiple='false' @select-change="select_monitor_Change" title="选择作业监护人"
:localdata="vuex_userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showMonitorPicker" style="position: relative;display: flex;">
<text type="text" @click="showMonitorPicker">{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showMonitorPicker" type="arrowright" color="#999999"/>
<text type="text" >{{monitor_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
</view>
@ -209,7 +205,6 @@
</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">
@ -233,7 +228,6 @@
</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">
@ -254,7 +248,8 @@
</view>
<view class="btn">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
<button v-if="formData.ticket_.act_state===2" type="primary" class="save-btn" @click="saveChange">提交</button>
<button v-else type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
</view>
</template>
@ -326,6 +321,7 @@
dept_do_name:'',
charger_name:'',
monitor_name:'',
transition:'',//
}
},
onLoad(params) {
@ -342,6 +338,9 @@
console.log('s', this.vuex_user.belong_dept)
this.formData.dept_do = this.vuex_user.belong_dept
}
if(params.transition){
this.transition = params.transition;
}
this.formData.cate = this.oplcateId;
this.formData.operation = this.operationId;
},
@ -359,10 +358,16 @@
this.$refs.deptDoPicker._show();
},
showChargerPicker() {
this.$refs.charger_Picker._show();
let params='?type=charger&typeName=charger_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
showMonitorPicker() {
this.$refs.monitor_Picker._show();
let params='?type=monitor&typeName=monitor_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
deptDoChange(ids, names) {
this.formData.dept_do = ids[0];
@ -614,6 +619,42 @@
}
},
saveChange(){
uni.showLoading({
mask: true,
title: '正在提交...'
})
let that = this;
let params = new Object();
params.ticket_data = {};
params.transition = that.transition;
that.formData.create_imgs = [];
that.fileList.forEach(item=>{
debugger;
if(item.id){
console.log(item.id);
that.formData.create_imgs.push(item.id)
}else{
console.log(item.response.id)
that.formData.create_imgs.push(item.response.id)
}
})
that.$u.api.oplUpdate(that.oplId, that.formData).then(res => {
debugger;
console.log(this.formData.ticket)
console.log(params)
this.$u.api.ticketHandle(this.formData.ticket, params).then(res => {
debugger;
console.log('已处理')
uni.switchTab({
url: '/pages/home/home_'
});
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
})
},
}
}
</script>

View File

@ -0,0 +1,153 @@
<template>
<view class="clockInContainer">
<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="tabbar-title">
<view :class="{'text-title':true, 'active':activeIndex}" @click="changeList(1)">本月</view>
<view style="display: flex;">
<view>选择月份</view>
<picker mode="date" :value="date" fields="month" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
</picker>
</view>
</view> -->
<view class="content">
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
<view class="clock_in_-item">
<view class="center-info">
<view class="info-details">姓名{{val.name}}</view>
<view class="info-details">手机号{{val.phone}}</view>
<view class="info-details">创建时间{{val.create_time}}</view>
</view>
<view class="bottom-btns">
<view class="shenhezhong shenhe-status" @click="remployeeHandle(val,'edit')">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
编辑
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'visitor',
data() {
return {
totalNum: 0,
activeIndex:true,//
lists: [],
currentMonth:'',
currentYear:'',
date:'选择其他月',
}
},
onShow() {
let that = this;
that.getLists();
},
methods: {
getLists() {
let that = this;
that.$u.api.remployee({'page':0}).then(res => {
that.lists = res
})
},
goBack() {
uni.navigateBack({
delta: 1
})
},
remployeeHandle(val, type) {
if(type=='edit'){
uni.navigateTo({
url:`/pages/workSpace/newWork/addUser?id=${val.id}&type=edit&rparty=${val.rparty}`
})
}
}
}
}
</script>
<style scoped>
.empty-view {
height: 120rpx;
}
>>>.uni-navbar__header,
>>>.uni-status-bar,
.search-wrap {
background-image: linear-gradient(270deg,
#0ca7ee 0%,
#005aff 100%,
#2a8cff 100%,
#54bdff 100%),
linear-gradient(#e60012,
#e60012);
}
.tabbar-title{
display: flex;
justify-content: space-between;
}
.clockInContainer {
background-color: #f3fbff;
}
.clockInContainer>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.content {
padding: 14rpx;
padding-top: 10upx;
}
.item-wrap {
margin-bottom: 14rpx;
}
.clock_in_-item {
width: 720rpx;
background-color: #ffffff;
border-radius: 10rpx;
margin: 0 auto;
padding: 24rpx 21rpx;
box-sizing: border-box;
}
.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;
display: flex;
}
.shenhezhong {
flex: 1;
color: #2c6fd9;
}
.shenhezhong image {
width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
vertical-align: middle;
}
</style>

View File

@ -215,7 +215,7 @@
that.$u.api.rpjUpdate(that.rpj, that.formData).then(res => {
if (res.err_msg) {
} else {
let params = `?rpj=${that.rpj}&rparty=${that.formData.rparty}`;
let params = `?rpj=${that.rpj}&rparty=${that.formData.rparty}&rpjName=${that.formData.name}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjFiles' + params
})
@ -225,7 +225,8 @@
that.$u.api.rpjCreate(that.formData).then(res => {
debugger;
if (res.err_msg) {} else {
let params = `?rpj=${res.id}&rparty=${that.formData.rparty}`;
that.rpj = res.id;
let params = `?rpj=${res.id}&rparty=${that.formData.rparty}&rpjName=${that.formData.name}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjFiles' + params
})

View File

@ -90,8 +90,10 @@
<text class="visitorCell">{{item.duty}}</text>
<text class="visitorCell">{{item.rcertificates.length}}</text>
<view class="visitorCell">
<view v-if="formData.state == 40">
<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>
@ -180,11 +182,11 @@
let that = this;
let form = {};
form.type = type;
form.code = res.result;
form.employee = row.visitor_.employee;
form.employee = row.remployee;
if(type==10){
uni.scanCode({
success: function (res) {
form.code = res.result;
that.$u.api.thirdBltBind(form).then(res=>{
debugger;
uni.showToast({
@ -196,14 +198,13 @@
});
}else{
that.$u.api.thirdBltBind(form).then(res=>{
debugger;
form.code = res.result;
uni.showToast({
title: res,
icon: "none"
})
})
}
}
},
goBack() {
uni.navigateBack({

View File

@ -78,7 +78,8 @@
uploadImgsList: [],
fileList :[],
rpj:'',
rparty:''
rparty:'',
rpjName:''
}
},
@ -87,6 +88,7 @@
if (params.rpj) {
this.rpj = params.rpj;
this.rparty = params.rparty;
this.rpjName = params.rpjName;
}
this.showBtns = true;
},
@ -183,7 +185,7 @@
nextStep() {
let that = this;
let params = `?rpj=${that.rpj}&rparty=${that.rparty}`;
let params = `?rpj=${that.rpj}&rparty=${that.rparty}&rpjName=${that.rpjName}`;
uni.navigateTo({
url: '/pages/workSpace/rpj/rpjWorkers' + params
})

View File

@ -19,17 +19,6 @@
<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>
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
</image>
<view class="right-btn" @click="searchHandle">搜索</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">
@ -73,8 +62,8 @@
return {
params: {
search: '',
pageSize: 10,
pageNum: 1,
page_size: 10,
page: 1,
create_by: ''
},
totalNum: 0,
@ -97,12 +86,17 @@
remployee:false,
}
},
onLoad() {
this.dataTypye='isMy';
this.params.create_by = this.vuex_user.id;
},
//
onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
if (this.params.pageNum < totalPage) {
this.params.pageNum += 1;
let that = this;
let totalPage = Math.ceil(that.totalNum / that.params.page_size);
if (that.params.page < totalPage) {
that.params.page += 1;
that.getLists();
} else {
uni.showToast({
title: "已全部加载",
@ -111,20 +105,18 @@
}
},
onShow() {
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();
if(this.params.page == 1){
this.lists = [];
this.getLists();
}
},
//
onPullDownRefresh() {
this.params.pageNum = 1;
this.params.page = 1;
this.lists = [];
this.getLists();
},
@ -132,8 +124,8 @@
getLists() {
let that = this;
that.$u.api.rpjList(that.params).then(res => {
that.lists = that.lists.concat(res.results);
this.totalNum = res.count;
that.lists = that.lists.concat(res.results);
})
},
rpjHandle(val, type) {
@ -173,12 +165,12 @@
})
},
searchHandle() {
this.params.pageNum = 1;
this.params.page = 1;
this.lists = [];
this.getLists()
},
resetSearch() {
this.params.pageNum = 1;
this.params.page = 1;
this.params.search = "";
this.lists = [];
this.getLists();

View File

@ -114,6 +114,7 @@
this.rpj = params.rpj;
this.formData.rpj = params.rpj;
this.rparty = params.rparty;
this.rpjName = params.rpjName;
},
onShow() {
this.workerList = [];
@ -228,8 +229,10 @@
let that = this;
let ticket = {};
ticket.workflow = that.initform.workflow;
ticket.title = that.rpjName;
ticket.ticket_data = {
rpj: that.rpj
rpj: that.rpj,
name:that.rpjName
};
ticket.transition = id;
that.$u.api.ticketCreate(ticket).then((res) => {

View File

@ -62,17 +62,11 @@
<text class="form-left-text">接待人</text>
</view>
<view class="form-right">
<ba-tree-picker ref="dcoordinator_Picker" :multiple='false' @select-change="select_coordinator_Change" title="选择接待人"
:localdata="vuex_userRange2" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<view @click="showDcoordinatorPicker" style="position: relative;display: flex;">
<text type="text" >{{receptionist_name}}</text>
<uni-icons style="position: absolute; right: 0;" type="arrowright" color="#999999"/>
</view>
</view>
<!-- <view class="form-right">
<uni-data-select v-model="formData.receptionist" :localdata="userRange">
</uni-data-select>
</view> -->
</view>
<view class="form-item border-bottom" v-if="formData.purpose!==50">
<view class="form-left">
@ -92,15 +86,23 @@
</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="number" v-model="formData.count_people" maxlength="50" placeholder="来访人数(整数)" />
</view>
</view>
<view class="form-item" style="height: fit-content;" >
<view class="form-left">
<text class="form-left-text">车辆照片</text>
</view>
<view class="form-right">
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" :file-list="fileList" max-count="9" @on-success="imgUpSuccess" @on-remove="imgRemove"></u-upload>
</view>
</view>
<view class="btn" v-if="showBtns">
<button type="primary" class="save-btn" @click="nextHandle">下一步</button>
</view>
@ -110,14 +112,10 @@
</template>
<script>
import baTreePicker from "../../comm/ba-tree-picker/ba-tree-picker.vue";
import nonNullCheck from '../../../utils/nonNullCheck.js';
import resetData from '../../../utils/common.js';
export default {
name: "visit",
components:{
baTreePicker
},
data() {
return {
formData: {
@ -130,7 +128,9 @@
company: '', //访
level: 10, //访
count_people: 1, //访
vehicle_photos:[],
},
fileList:[],
datetimerange: [],
depRange: [],
publishRangeCon: '',
@ -192,22 +192,38 @@
}
},
onShow() {
// this.getUserRange();
this.getHeader();
},
methods: {
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
imgUpSuccess(data,index,list){
this.formData.vehicle_photos.push(data.id);
},
imgRemove(index,list,inde){
this.formData.vehicle_photos.splice(index,1);
console.log(this.formData.imgs)
},
showDcoordinatorPicker(){
this.$refs.dcoordinator_Picker._show();
},
cancel(){
this.$refs.treePicker._hide();
},
select_coordinator_Change(ids, names){
this.formData.receptionist = ids[0];
this.receptionist_name = names;
//type:idtypeName
let params='?type=receptionist&typeName=receptionist_name'
uni.navigateTo({
url:"../../comm/userSelect/index"+params
})
},
getVisitItem() {
this.$u.api.visitItem(this.visitId).then(res => {
this.formData = res;
if(res.vehicle_photos_){
for(let i = 0; i<res.vehicle_photos_.length;i++){
this.fileList.push(this.vuex_host+res.vehicle_photos_[i].path)
}
// this.fileList=res.vehicle_photos_;
}
this.datetimerange = [res.visit_time, res.leave_time]
})
},
@ -237,13 +253,12 @@
if (!that.paramsCheck()) {
return;
} else {
// debugger;
if (that.formData.id) {
that.$u.api.visitUpdate(that.formData.id, that.formData).then(res => {
if (res.err_msg) {
} else {
let params = `?visit=${that.formData.id}`;
let params = `?visit=${that.formData.id}&visitName=${that.formData.name}`;
uni.navigateTo({
url: '/pages/workSpace/visit/vpeopleList'+params
})
@ -253,7 +268,9 @@
that.$u.api.visitCreate(that.formData).then(res => {
if (res.err_msg) {
} else {
let params = `?visit=${res.id}`;
that.visit = res.id;
that.formData.id = res.id;
let params = `?visit=${res.id}&visitName=${that.formData.name}`;
uni.navigateTo({
url: '/pages/workSpace/visit/vpeopleList'+params
})
@ -347,11 +364,6 @@
background-color: #f3fbff;
padding-bottom: 227rpx;
}
/* >>>.uni-status-bar {
height: 0 !important;
} */
>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}

View File

@ -64,6 +64,12 @@
<text>{{formData.count_people}}</text>
</view>
</view>
<view class="item">
<view class="title">车辆照片</view>
<view class="content">
<image v-for="item in formData.vehicle_photos_" :src="item.path" @click="preView(item.path)"></image>
</view>
</view>
</view>
<view class="wrap-view wrap-top">
<view class="item title"> <text class="blueLine"></text>人员列表</view>
@ -79,18 +85,76 @@
<span v-if="item.is_main"></span>
</text>
<view class="visitorCell">
<view v-if="formData.state == 40">
<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>
<view id="visitorWrap" v-if="visitorDetailLimited">
<view class="visitorContainer">
<view class="visitorInfo">
<view class="infoTitle">姓名</view><view>{{visitorItem.visitor_.name}}</view>
</view>
<view class="visitorInfo">
<view class="infoTitle">手机</view><view>{{visitorItem.visitor_.phone}}</view>
</view>
<view class="visitorInfo">
<view class="infoTitle">头像</view>
<image :src="visitorItem.photo" @click="preView(visitorItem.photo)"></image>
</view>
<!-- <view class="visitorInfo">
<view class="infoTitle">返乡时间</view><view>{{visitorItem.return_date}}</view>
</view> -->
<view class="visitorInfo">
<view class="infoTitle">来源地</view><view>{{visitorItem.come_place}}</view>
</view>
<!-- <view class="visitorInfo">
<view class="infoTitle">行程轨迹</view><view>{{visitorItem.trip_desc}}</view>
</view>
<view class="visitorInfo">
<view class="infoTitle">管控措施</view><view>{{visitorItem.measure}}</view>
</view>
<view class="visitorInfo">
<view class="infoTitle">检测日期</view><view>{{visitorItem.test_date}}</view>
</view>
<view class="visitorInfo">
<view class="infoTitle">是否已报备</view><view>{{visitorItem.is_reported?'已报备':'未报备'}}</view>
</view> -->
<view class="visitorInfo">
<view class="infoTitle">是否主访客</view><view>{{visitorItem.is_main?'是':'否'}}</view>
</view>
<!-- <view class="visitorInfo">
<view class="infoTitle">健康码</view>
<view v-if="visitorItem.health_code==''">未上传</view>
<image v-else :src="visitorItem.health_code" @click="preView(visitorItem.health_code)"></image>
</view>
<view class="visitorInfo">
<view class="infoTitle">行程码</view>
<view v-if="visitorItem.travel_code==''">未上传</view>
<image v-else :src="visitorItem.travel_code" @click="preView(visitorItem.travel_code)"></image>
</view>
<view class="visitorInfo">
<view class="infoTitle">核酸报告</view>
<view v-if="visitorItem.test_report==''">未上传</view>
<image v-else :src="visitorItem.test_report" @click="preView(visitorItem.test_report)"></image>
</view> -->
</view>
<icon class="closeDetailIcon" type="cancel" size="36" color="#fefefe" @click="closeVisitorDetail"/>
</view>
<img-view ref="imgPreView" :imgSrc="preImgSrc" @cancelPreView="cancelPreView"></img-view>
</view>
</template>
<script>
import imgView from "@/components/image-view/image-view.vue";
export default {
name: "visit",
components: {
imgView
},
data() {
return {
formData:{},
@ -114,6 +178,9 @@
10: "一般",
20: "重要",
},
preImgSrc:null,
visitorItem:null,
visitorDetailLimited:false,
}
},
onLoad(params) {
@ -126,6 +193,10 @@
this.getVpeopleList();
},
methods: {
preView(srcImg){
this.preImgSrc = srcImg;
this.$refs.imgPreView.open();
},
//
getVpeopleList() {
let that = this;
@ -137,8 +208,14 @@
})
},
getVisitItem() {
let that = this;
this.$u.api.visitItem(this.visitId).then(res => {
this.formData = res;
let photos = res.vehicle_photos_;
photos.forEach(item=>{
item.path = that.vuex_host+item.path;
})
that.formData.vehicle_photos_ = photos;
})
},
bindBtl(row,type){
@ -167,11 +244,28 @@
})
},
viewPeople(item) {
uni.showToast({
title: item.id,
icon: 'none'
})
}
this.visitorItem = item;
this.visitorItem.photo = item.visitor_.photo!==''?this.vuex_host + item.visitor_.photo:'';
// this.visitorItem.health_code = item.health_code!==''?(this.vuex_host + item.health_code):'';
// this.visitorItem.travel_code = item.travel_code!==''?this.vuex_host + item.travel_code:'';
// this.visitorItem.test_report = item.test_report!==''?this.vuex_host + item.test_report:'';
this.visitorDetailLimited = true;
},
closeVisitorDetail(){
this.visitorDetailLimited = false;
this.visitorItem = null;
},
preView(srcImg){
let imgs = [];
imgs.push(srcImg)
uni.previewImage({
urls: imgs,
current: 0,
});
},
cancelPreView(){
this.preImgSrc = '';
},
}
}
</script>
@ -286,4 +380,37 @@
color: #ffffff;
font-size: 25upx;
}
#visitorWrap{
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0,0,0,.6);
}
.visitorContainer{
position: relative;
width: 90%;
left: 5%;
background: #ffffff;
padding: 40upx;
top: 50%;
transform: translateY(-50%);
max-height: 80%;
overflow-y: scroll;
border-radius: 20upx;
}
.visitorInfo{
display: flex;
margin: 20upx 0;
}
.infoTitle{
width: 170upx;
}
.closeDetailIcon{
position: absolute;
bottom: 5%;
left: 50%;
transform: translateX(-50%);
}
</style>

View File

@ -19,17 +19,6 @@
<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>
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
</image>
<view class="right-btn" @click="searchHandle">搜索</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">
@ -41,11 +30,6 @@
<view class="info-details">来访事由{{purposeOptions[val.purpose]}}</view>
<view class="info-details">状态{{stateOptions[val.state]}}</view>
<view class="info-details">创建时间{{val.create_time}}</view>
<!-- <view class="info-details">作业区域{{val.area_.name}} </view>
<view class="info-details">更新时间{{val.update_time}} </view>
<view class="info-details">属地部门{{val.dept_ter_.name}} </view>
<view class="info-details">业务部门{{val.dept_bus_.name}} </view>
<view class="info-details">创建人{{val.create_by_.name}} </view> -->
</view>
<view class="bottom-btns" style="display: flex;">
<view class="shenhezhong shenhe-status" @click="visitHandle(val,'edit')" v-if="val.state===10&&dataTypye==='isMy'">
@ -74,8 +58,8 @@
return {
params: {
search: '',
pageSize: 10,
pageNum: 1,
page_size: 10,
page: 1,
create_by: ''
},
totalNum: 0,
@ -102,9 +86,12 @@
},
//
onReachBottom() {
const totalPage = Math.ceil(this.totalNum / this.params.pageSize);
if (this.params.pageNum < totalPage) {
this.params.pageNum += 1;
let that = this;
let totalPage = Math.ceil(that.totalNum / that.params.page_size);
if (that.params.page < totalPage) {
that.params.page += 1;
that.getLists();
} else {
uni.showToast({
title: "已全部加载",
@ -112,17 +99,23 @@
})
}
},
onLoad() {
this.dataTypye='isMy';
this.params.create_by = this.vuex_user.id;
},
onShow() {
if(this.vuex_user.type==='employee'){
this.employee = true;
}
this.lists = [];
this.params.create_by = this.vuex_user.id;
this.getLists();
if(this.params.page == 1){
this.lists = [];
this.getLists();
}
},
//
onPullDownRefresh() {
this.params.pageNum = 1;
this.params.page = 1;
this.lists = [];
this.getLists();
},
@ -130,8 +123,8 @@
getLists() {
let that = this;
that.$u.api.visitList(that.params).then(res => {
that.totalNum = res.count;
that.lists = that.lists.concat(res.results);
this.totalNum = res.count;
})
},
visitHandle(val,type) {
@ -148,9 +141,7 @@
this.$u.api.visitDelete(val.id).then(res => {
this.resetSearch()
})
}
}
},
changeList(index){
let that = this;
@ -168,12 +159,12 @@
})
},
searchHandle() {
this.params.pageNum = 1;
this.params.page = 1;
this.lists = [];
this.getLists()
},
resetSearch() {
this.params.pageNum = 1;
this.params.page = 1;
this.params.search = "";
this.lists = [];
this.getLists();

View File

@ -0,0 +1,153 @@
<template>
<view class="clockInContainer">
<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="tabbar-title">
<view :class="{'text-title':true, 'active':activeIndex}" @click="changeList(1)">本月</view>
<view style="display: flex;">
<view>选择月份</view>
<picker mode="date" :value="date" fields="month" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
</picker>
</view>
</view> -->
<view class="content">
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
<view class="clock_in_-item">
<view class="center-info">
<view class="info-details">姓名{{val.name}}</view>
<view class="info-details">手机号{{val.phone}}</view>
<view class="info-details">创建时间{{val.create_time}}</view>
</view>
<view class="bottom-btns">
<view class="shenhezhong shenhe-status" @click="visitorHandle(val,'edit')">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
编辑
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'visitor',
data() {
return {
totalNum: 0,
activeIndex:true,//
lists: [],
currentMonth:'',
currentYear:'',
date:'选择其他月',
}
},
onShow() {
let that = this;
that.getLists();
},
methods: {
getLists() {
let that = this;
that.$u.api.visitorList({'page':0}).then(res => {
that.lists = res
})
},
goBack() {
uni.navigateBack({
delta: 1
})
},
visitorHandle(val, type) {
if(type=='edit'){
uni.navigateTo({
url:`/pages/workSpace/newWork/addUser?id=${val.id}&type=edit`
})
}
}
}
}
</script>
<style scoped>
.empty-view {
height: 120rpx;
}
>>>.uni-navbar__header,
>>>.uni-status-bar,
.search-wrap {
background-image: linear-gradient(270deg,
#0ca7ee 0%,
#005aff 100%,
#2a8cff 100%,
#54bdff 100%),
linear-gradient(#e60012,
#e60012);
}
.tabbar-title{
display: flex;
justify-content: space-between;
}
.clockInContainer {
background-color: #f3fbff;
}
.clockInContainer>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.content {
padding: 14rpx;
padding-top: 10upx;
}
.item-wrap {
margin-bottom: 14rpx;
}
.clock_in_-item {
width: 720rpx;
background-color: #ffffff;
border-radius: 10rpx;
margin: 0 auto;
padding: 24rpx 21rpx;
box-sizing: border-box;
}
.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;
display: flex;
}
.shenhezhong {
flex: 1;
color: #2c6fd9;
}
.shenhezhong image {
width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
vertical-align: middle;
}
</style>

View File

@ -42,6 +42,7 @@
name: "vpeopleList",
data() {
return {
visitName:'',
visitorCount:0,
initform: {},
vpeopleList: [],
@ -52,6 +53,7 @@
},
onLoad(params) {
this.visitId = params.visit;
this.visitName = params.visitName;
},
onShow() {
this.getVpeopleList();
@ -115,8 +117,10 @@
});
let ticket = {};
ticket.workflow = this.initform.workflow;
ticket.title = this.visitName;
ticket.ticket_data = {
visit: this.visitId
visit: this.visitId,
name: this.visitName
};
ticket.transition = id;
this.$u.api.ticketCreate(ticket).then((res) => {

View File

@ -8,14 +8,14 @@
<view class="content"></view>
</view>
<view class="item item_bottom_border">
<view class="title">访客</view>
<view class="title"><text class="star">*</text>访客</view>
<view class="content">
<uni-data-select name="visitor" :localdata="userRange" v-model="formData.visitor">
</uni-data-select>
</view>
</view>
<view class="item item_bottom_border">
<view class="title">返乡时间</view>
<!-- <view class="item item_bottom_border">
<view class="title"><text class="star">*</text>返乡时间</view>
<view class="content">
<uni-datetime-picker
v-model="formData.return_date"
@ -23,28 +23,46 @@
:hide-second="true"
/>
</view>
</view> -->
<view class="item item_bottom_border">
<view class="title"><text class="star">*</text>来源地</view>
<view class="content" @click="toggleMaskLocation">
<text class="cell-tip">
<text class="choose-text">{{addressByPcrs}}</text>
<text class="iconfont icon-xiangxia"></text>
</text>
</view>
<gk-city
:headtitle="headtitle"
:provincedata="provincedata"
:data="selfData"
mode="cityPicker"
ref="cityPicker"
@funcvalue="getpickerParentValue"
:pickerSize="4"></gk-city>
</view>
<view class="item item_bottom_border">
<view class="title">来源地</view>
<view class="title"><text class="star">*</text>具体地址</view>
<view class="content">
<input type="text" v-model="formData.come_place" maxlength="20" placeholder="请输入来源地" />
<!-- <pickerAddress @change="cityChange"><i>{{cityTitle}}</i></pickerAddress> -->
<input type="text" v-model="formData.come_place" maxlength="20" placeholder="请输入来源地具体地址" />
</view>
</view>
<view class="item item_bottom_border">
<view class="title">行程轨迹</view>
<!-- <view class="item item_bottom_border">
<view class="title"><text class="star">*</text>行程轨迹</view>
<view class="content">
<input type="text" v-model="formData.trip_desc" maxlength="20" placeholder="请输入行程轨迹" />
</view>
</view>
<view class="item item_bottom_border">
<view class="title">管控措施</view>
</view> -->
<!-- <view class="item item_bottom_border">
<view class="title"><text class="star">*</text>管控措施</view>
<view class="content">
<uni-data-select name="measure" :localdata="measureRange" v-model="formData.measure">
</uni-data-select>
</view>
</view>
<view class="item item_bottom_border">
<view class="title">核酸检测日期</view>
<view class="title"><text class="star">*</text>核酸日期</view>
<view class="content">
<uni-datetime-picker
v-model="formData.test_date"
@ -52,40 +70,38 @@
:hide-second="true"
/>
</view>
</view>
<view class="item item_bottom_border">
<view class="title">是否报备</view>
</view> -->
<!-- <view class="item item_bottom_border">
<view class="title"><text class="star">*</text>是否报备</view>
<view class="content">
<u-switch v-model="formData.is_reported"></u-switch>
</view>
</view>
</view> -->
<view class="item item_bottom_border">
<view class="title">是否主访客</view>
<view class="title"><text class="star">*</text>是否主访客</view>
<view class="content">
<u-switch v-model="formData.is_main"></u-switch>
</view>
</view>
<view class="item item_bottom_border" style="height: fit-content;">
<view class="title">健康码</view>
<!-- <view class="item item_bottom_border" style="height: fit-content;">
<view class="title"><text class="star">*</text>健康码</view>
<view style="flex: 3;">
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" max-count="1" @on-success="imgUpdataHealth"></u-upload>
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataHealth" :list="healthFileList"></imgUpload> -->
//<imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataHealth" :list="healthFileList"></imgUpload>
</view>
</view>
<view class="item item_bottom_border" style="height: fit-content;">
<view class="title">行程码</view>
</view> -->
<!-- <view class="item item_bottom_border" style="height: fit-content;">
<view class="title"><text class="star">*</text>行程码</view>
<view style="flex: 3;">
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" max-count="1" @on-success="imgUpdataTravel"></u-upload>
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataTravel" :list="travelFileList"></imgUpload> -->
</view>
</view>
<view class="item item_bottom_border" style="height: fit-content;">
<view class="title">核酸报告</view>
<view class="title"><text class="star">*</text>核酸报告</view>
<view style="flex: 3;">
<u-upload :action="vuex_apifile" :header="header" ref="uUpload" max-count="1" @on-success="imgUpdataReport"></u-upload>
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataReport" :list="reportFileList"></imgUpload> -->
</view>
</view>
</view> -->
</view>
<view class="btn">
<button type="default" class="save-btn" @click="formSubmit">确定</button>
@ -96,26 +112,39 @@
<script>
import imgUpload from '@/components/linzq-imgUpload/linzq-imgUpload.vue';
import nonNullCheck from '../../../utils/nonNullCheck.js';
import pickerAddress from '../../comm/city/city.vue';
import provinceData from '@/common/city.data.js';
export default {
components: {
imgUpload
imgUpload,
pickerAddress
},
data() {
return {
formData: {
visit: '',
visitor: '',
return_date: '',
// return_date: '',
come_place: '',
trip_desc: '',
test_date:'',
measure: '',
health_code: '',
travel_code: '',
test_report: '',
// trip_desc: '',
// test_date:'',
// measure: '',
// health_code: '',
// travel_code: '',
// test_report: '',
is_main: false,
is_reported: false,
// is_reported: false,
},
selfData:provinceData,
headtitle:"请选择所在地",
addressByPcrs:"请选择所在地",
provincedata:[
{
text:'北京市',
value:''
}
],
// cityTitle: '',
head: {
Authorization: "Bearer " + this.vuex_token
},
@ -135,7 +164,7 @@
}
},
onLoad(params) {
debugger;
// debugger;
if (params.visitId) {
this.formData.visit = params.visitId;
this.visitId = params.visitId;
@ -146,11 +175,6 @@
this.getUserRange();
},
methods: {
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
@ -165,9 +189,6 @@
imgUpdataReport(data){
this.formData.test_report = data.path;
},
/* imgUpdataReport(data){
this.formData.test_report = data[0];
}, */
//
getUserRange() {
let that = this;
@ -187,6 +208,23 @@
})
},
// cityChange(data) { //
// this.cityTitle = data.data.join('-')
// this.cityForm.province = this.cityTitle.split('-')[0] //
// this.cityForm.city = this.cityTitle.split('-')[1] //
// this.cityForm.district = this.cityTitle.split('-')[2] //
// this.cityForm.city = this.cityTitle // this.cityForm.city
// },
toggleMaskLocation(){
this.$nextTick(()=>{
this.$refs["cityPicker"].show();
})
},
getpickerParentValue(data){
console.log(data.map(o=>{return o.value})); //value
this.provincedata=data;
this.addressByPcrs=data.map(o=>{return o.text}).join(" ")
},
/* 参数验证 */
paramsCheck() {
if (!nonNullCheck(this.formData.visitor)) {
@ -196,18 +234,86 @@
})
return false;
}
// if (!nonNullCheck(this.formData.return_date)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
if (this.addressByPcrs=="请选择所在地") {
uni.showToast({
title: '请选择所在地',
icon: "none"
})
return false;
}
if (!nonNullCheck(this.formData.come_place)) {
uni.showToast({
title: '请填写来源地具体地址',
icon: "none"
})
return false;
}
// if (!nonNullCheck(this.formData.trip_desc)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
// if (!nonNullCheck(this.formData.measure)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
// if (!nonNullCheck(this.formData.test_date)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
// if (!nonNullCheck(this.formData.health_code)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
// if (!nonNullCheck(this.formData.travel_code)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
// if (!nonNullCheck(this.formData.test_report)) {
// uni.showToast({
// title: '',
// icon: "none"
// })
// return false;
// }
return true;
},
formSubmit(val) {
let that = this;
that.$u.api.vpeopleCreate(that.formData).then(res => {
if (res.err_msg) {} else {
uni.navigateBack({
delta: 1
})
}
})
if (!that.paramsCheck()) {
return;
} else {
that.formData.come_place = that.addressByPcrs+that.formData.come_place;
that.$u.api.vpeopleCreate(that.formData).then(res => {
if (res.err_msg) {} else {
uni.navigateBack({
delta: 1
})
}
})
}
},
goBack() {
uni.navigateBack({
@ -219,17 +325,12 @@
}
</script>
<style scoped>
<style scoped lang="scss">
>>>.uni-navbar__header,
>>>.uni-status-bar {
background-image: linear-gradient(254deg,
#0ca7ee 0%,
#005aff 100%,
#2a8cff 100%,
#54bdff 100%),
linear-gradient(#e60012,
#e60012);
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
}
>>>uni-image{
height: 200upx;
width: 200upx;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View File

@ -278,11 +278,16 @@ export default {
// fileList()fileList
// watchthis.lists
// sometrueeverytrue
let tmp = this.lists.some(val => {
return val.url == value.url;
})
// (tmpfalse)
!tmp && this.lists.push({ url: value.url, error: false, progress: 100,id:value.id});
if(value.url){
let tmp = this.lists.some(val => {
return val.url == value.url;
})
// (tmpfalse)
!tmp && this.lists.push({ url: value.url, error: false, progress: 100,id:value.id});
}else{
this.lists.push({ url: value, error: false, progress: 100});
}
});
}
},