This commit is contained in:
shijing 2022-10-10 14:41:47 +08:00
parent 8bd6c3551e
commit 45d9e359b5
14 changed files with 655 additions and 762 deletions

View File

@ -1,549 +0,0 @@
<template>
<view class="custom-banner">
<view class="tabbar-title">
<view class="search-body">
<image class="left-img" src="../../static/project_manegment/fangdajing.png" mode=""></image>
<input class="search-input" type="text" v-model="itemName" placeholder="请输入事项名称" />
<view class="right-btn" @click="caseSearch">
搜索
</view>
</view>
<!-- <view class="right-pick" @click="showDrawer">
<image class="right-img" src="../../static/project_manegment/shaixuan.png" mode=""></image>
<text>筛选</text>
</view> -->
</view>
<u-popup v-model="show" mode="right" :zoom='true' width="600rpx" :mask='true' :closeable='false'
:safe-area-inset-bottom='true'>
<scroll-view style="height: 100%;padding-top:20rpx" scroll-y="true">
<view class="hetong-drawer">
<view class="top-search">
<view class="top-title">
<text>筛选</text>
<uni-icons class="close-btn" @click="closeDrawer" type="closeempty" size="25" color="#d7d7d7">
</uni-icons>
</view>
<!-- 合同状态 -->
<view class="hetong-status">
<view class="search-title">
合同状态
</view>
<view class="search-content">
<view :class="{'search-content-item-status':true,'active':eventStatus==''}"
@click="getCurrentStatus()">
全部
</view>
<view :class="{'search-content-item-status':true,'active':eventStatus=='3'}"
@click="getCurrentStatus('3')">
审核中
</view>
<view :class="{'search-content-item-status':true,'active':eventStatus=='0'}"
@click="getCurrentStatus('0')">
已退回
</view>
<view :class="{'search-content-item-status':true,'active': eventStatus=='1'}"
@click="getCurrentStatus('1')">
审核通过
</view>
<view :class="{'search-content-item-status':true,'active': eventStatus=='2'}"
@click="getCurrentStatus('2')">
已作废
</view>
<view :class="{'search-content-item-status':true,'active': eventStatus=='4'}"
@click="getCurrentStatus('4')">
未提交
</view>
</view>
</view>
<!-- 提交时间 -->
<!-- <view class="hetong-time">
<view class="search-title">
提交时间
</view>
<view class="search-content-time">
<view class="search-content-item-time">
<uni-datetime-picker type="daterange" :value="beginTime" :border="false"
:clear-icon="false" @change="changeBeginTime" />
</view>
</view>
</view>
--><!-- 所属模块 -->
<!-- <view class="hetong-type">
<view class="search-title">
所属模块
</view>
<view class="search-content-type">
<view @click="changeModule(-1)" class="search-content-item-type">
<text :class="{'active': currentId==-1}">全部</text>
</view>
<view v-for="(val,index) in moduleMenu" :key="val.id" @click="changeModule(index)"
class="search-content-item-type">
<text :class="{'active': currentId==val.id}">{{val.label}}</text>
</view>
</view>
</view>
-->
<view class="empty-view">
</view>
</view>
<view class="bottom-btn" @click="resetSearch">
<view class="reset">
重置
</view>
<view class="queding" @click="quedingSearch">
确定
</view>
</view>
</view>
</scroll-view>
</u-popup>
</view>
</template>
<script>
export default {
name: "customTitleBanner",
data() {
return {
itemName: "",
eventStatus: "",
submissionTimeFrom: "", //
submissionTimeFromTo: "", //
moduleId: "",
moduleMenu: [],
show:false,
beginTime:'',
currentId: -1,
}
},
props: {
obj:{
type: Object,
default:null
}
},
created() {
this._getModuleMenu()
},
// mounted() {
// this.getSystemInfo()
// },
methods: {
// getSystemInfo(){
// let _this = this;
// uni.getSystemInfo({
// success(res){
// let statusBarHeight = res.statusBarHeight;
// }
// })
// },
caseSearch() {
this.$emit("caseSearch", this.itemName)
},
handleModuleMenus(arr) {
for (let val of arr) {
this.moduleMenu.push({
id: val.id,
label: val.label,
children:val.children || [],
})
if (val.children) {
this.handleModuleMenus(val.children)
}
}
},
/* 查询所属模块 */
_getModuleMenu() {
getModuleMenu().then(res => {
if (res.statusCode === 200) {
this.moduleMenu = [];
let moduleMenus = res.data.data;
this.handleModuleMenus(moduleMenus)
} else {
uni.showToast({
title: res.data.message,
icon: 'none'
})
}
}).catch(err => {
uni.showToast({
title: '网络异常, 请求失败',
icon: 'none'
})
})
},
_handleData(arr){
for(let val of arr){
this.moduleId +=val.id +",";
if(val.children && val.children.length> 0){
this._handleData(val.children)
}
}
},
changeModule(index) {
let val = this.moduleMenu[index];
if (index!==-1) {
this.currentId = val.id;
this.moduleId = val.id +",";
if(val.children && val.children.length> 0){
this._handleData(val.children)
}
this.moduleId = this.moduleId.slice(0,this.moduleId.length-1);
} else {
this.moduleId = "";
this.currentId = -1;
}
},
/* 打开弹框 */
showDrawer() {
this.eventStatus = this.obj.eventStatus;
this.moduleId = this.obj.moduleId;
this.currentId = this.obj.moduleId;
if(this.obj.moduleId && this.obj.moduleId.indexOf(",")!==-1){
this.currentId = this.obj.moduleId.split(",")[0];
}
if(this.moduleId===""){
this.currentId = -1;
}
this.submissionTimeFrom = this.obj.submissionTimeFrom;
this.submissionTimeFromTo = this.obj.submissionTimeFromTo;
// this.$refs.showRight.open();
this.show = true;
},
closeDrawer() {
this.show = false;
// this.$refs.showRight.close();
},
/* 重置 */
resetSearch() {
this.eventStatus = "";
this.moduleId = "";
this.currentId = -1;
this.submissionTimeFrom = "";
this.submissionTimeFromTo = "";
},
/* 确认 */
quedingSearch() {
let queryData = {};
if (this.eventStatus) {
queryData.eventStatus = this.eventStatus;
}
if (this.moduleId) {
queryData.moduleId = this.moduleId;
}
if (this.submissionTimeFrom && this.submissionTimeFromTo) {
queryData.submissionTimeFrom = this.submissionTimeFrom;
queryData.submissionTimeFromTo = this.submissionTimeFromTo;
}
this.$emit('quedingSearch', queryData);
this.closeDrawer();
},
/* 处理合同查询参数 */
getCurrentStatus(status) {
if (status) {
this.eventStatus = status;
} else {
this.eventStatus = "";
}
},
changeBeginTime(time) {
this.submissionTimeFrom = time[0] + ' 00:00:00';
this.submissionTimeFromTo = time[1] + ' 00:00:00';
},
}
}
</script>
<style scoped>
.search-body {
width: 560rpx;
height: 78rpx;
background-color: #ffffff;
border-radius: 39rpx;
border: 1rpx solid #EEEEEE;
padding: 13rpx;
padding-left: 20rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.search-body .search-input {
height: 100%;
flex: 1;
padding-left: 12rpx;
font-size: 28rpx;
display: table-cell;
vertical-align: middle;
box-sizing: border-box;
}
.left-img {
width: 24rpx;
height: 24rpx;
}
.right-img {
width: 32rpx;
height: 31rpx;
vertical-align: middle;
margin-right: 9rpx;
}
.right-btn {
width: 110rpx;
height: 58rpx;
line-height: 58rpx;
background-image: linear-gradient(0deg,
#2da0f3 0%,
#54bcff 100%);
border-radius: 29rpx;
font-size: 28rpx;
color: #ffffff;
text-align: center;
}
>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.tabbar-title {
background-color: #FFFFFF;
height: 100rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
line-height: 74rpx;
color: #505050;
padding-top: 27rpx;
padding-left: 27rpx;
padding-right: 27rpx;
}
.text-title {
position: relative;
}
.active.text-title::after {
content: "";
display: block;
width: 60%;
height: 6rpx;
background-color: #215ece;
border-radius: 6rpx;
position: absolute;
bottom: 20rpx;
left: 50%;
transform: translateX(-50%);
}
/* 筛选框 */
.right-drawer {
position: relative;
}
>>>.uni-drawer__content {
width: 600rpx !important;
}
/* >>>.uni-drawer {
top: 290rpx!important;
} */
.top-search {
padding: 35rpx;
}
.top-title {
display: flex;
justify-content: space-between;
}
.top-title text {
color: #333333;
}
.close-btn>>>.uni-icons {
width: 23rpx;
height: 23rpx;
}
.search-title {
font-size: 28rpx;
color: #676767;
padding-bottom: 29rpx;
}
.search-content {
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
}
/* 合同状态 */
.hetong-status {
padding-top: 30rpx;
}
.search-content-item-status {
width: 130rpx;
height: 48rpx;
background-color: #f7f7f7;
color: #9e9e9e;
border-radius: 24rpx;
font-size: 24rpx;
line-height: 48rpx;
text-align: center;
margin-right: 22rpx;
margin-bottom: 25rpx;
}
.search-content-item-status.active {
background-image: linear-gradient(#2c6fd9,
#2c6fd9),
linear-gradient(#029ef3,
#029ef3);
background-blend-mode: normal,
normal;
color: #ffffff;
}
/* 合同时间 */
.hetong-time {
padding-top: 37rpx;
}
.search-content-time {
display: flex;
justify-content: flex-start;
align-items: center;
}
.search-content-time>>>.uni-date-x {
height: 54rpx;
background-color: #f7f7f7;
border-radius: 27rpx;
font-size: 24rpx;
color: #797979;
}
.search-content-item-time>>>uni-icons {
display: none;
}
.center-line {
width: 36rpx;
height: 1rpx;
background-color: #b3b3b3;
margin: 0 12rpx;
}
/* 合同类型 */
.hetong-type {
padding-top: 50rpx;
}
.search-content-type {
display: flex;
flex-wrap: wrap;
}
.search-content-item-type {
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.search-content-item-type text {
min-width: 130rpx;
display: block;
border-radius: 24rpx;
font-size: 24rpx;
line-height: 48rpx;
background-color: #f7f7f7;
color: #9e9e9e;
height: 48rpx;
box-sizing: border-box;
text-align: center;
padding: 0 20rpx;
}
.search-content-item-type text.active {
background-image: linear-gradient(#2c6fd9,
#2c6fd9),
linear-gradient(#029ef3,
#029ef3);
background-blend-mode: normal,
normal;
color: #ffffff;
}
.bottom-btn {
display: flex;
height: 88rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
}
.bottom-btn view {
flex: 1;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
.reset {
background-color: #f2f2f2;
color: #888888;
}
.queding {
background-image: linear-gradient(#2c6fd9,
#2c6fd9),
linear-gradient(#029ef3,
#029ef3);
background-blend-mode: normal, normal;
color: #ffffff;
}
.empty-view {
height: 100rpx;
}
</style>

View File

@ -0,0 +1,66 @@
<template>
<view class="preBigImgWrap" v-if="preImg" @click="cancelPreImg">
<image class="bigImg" :src="imgSrc" mode="widthFix"></image>
</view>
</template>
<script>
export default {
name:"image-view",
props:{
//
imgSrc: {
type: String,
default: ''
},
},
data() {
return {
preImg:false,
};
},
onShow(){
this.preImg = true;
},
methods:{
open(){
this.preImg = true;
},
close(){
this.preImg = false;
},
//
preview(index,urls) {
uni.previewImage({
urls: urls,
current: index,
});
},
cancelPreImg(){
this.close();
this.$emit('cancelPreView',false)
},
},
}
</script>
<style scoped>
.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

@ -2,26 +2,35 @@
<view>
<view class="fanku_con">
<view class="img_z">
<view class="imgadf center" @click="ongetimg()">
<image style="width: 58rpx;height: 58rpx;" src="./tupianadd.png" mode=""></image>
<text style="margin-top: 5rpx;">上传图片</text>
</view>
<view style="position: relative;" v-for="(item,index) in img_list" :key="index">
<image @click="preview(index,img_list)" style="width: 120rpx;height: 120rpx;margin-left: 20rpx;margin-bottom: 20rpx;background-color:rgba(0,0,0,0.1);border-radius: 10rpx;"
<view style="position: relative;" v-for="(item,index) in img_list" :key="index" class="imgItemWrap">
<image @click="preview(item)" class="imgItem"
style=""
:src="item"></image>
<image class="shancs" src="./shanchus2.png" mode="" @click="selec(index)"></image>
</view>
<view class="imgadf center imgItemWrap" @click="ongetimg()" v-if="img_list.length<count">
<image style="width: 58rpx;height: 58rpx;" src="./tupianadd.png" mode=""></image>
<text style="margin-top: 5rpx;">上传图片</text>
</view>
</view>
</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 {
components: {
// imgUpload,
imgView
},
data() {
return {
img_list: []
img_list: [],
preImgSrc:'',
imgsList:[],
}
},
props: {
@ -30,6 +39,11 @@
type: Number,
default: false
},
//
list: {
type: Array,
default: []
},
//
url: {
type: String,
@ -47,6 +61,10 @@
}
},
computed: {},
mounted() {
// debugger;
this.img_list = this.list;
},
methods: {
ongetimg() { //
var that = this
@ -73,15 +91,19 @@
filePath: item, //
name: that.name,
header: that.header,
success: res => {
success: (imgres) => {
// debugger;
console.log("imageData:"+JSON.parse(imgres.data));
let resData = JSON.parse(imgres.data);
if (that.img_list.length >= that.count) //
return uni.showToast({
title: '最多上传' + that.count + '张图片',
icon: 'none',
position: 'bottom'
});
that.img_list.push(JSON.parse(res.data).data.url); //plus
that.$emit('obtain_img', that.img_list)
that.img_list.push(this.vuex_host+resData.path); //plus
that.imgsList.push(resData.id); //plus
that.$emit('obtain_img', that.imgsList)
}
});
uni.hideLoading() //
@ -91,13 +113,16 @@
},
//
selec(index) {
this.img_list.splice(index, 1)
this.$emit('obtain_img', this.img_list)
this.img_list.splice(index, 1);
this.imgsList.splice(index, 1);
this.$emit('obtain_img', this.imgsList)
},
cancelPreView(){
this.preImgSrc = '';
},
//
preview(index, urls) {
console.log(index)
console.log(urls)
/* preview(index, urls) {
uni.previewImage({
urls: urls,
current: index,
@ -111,6 +136,11 @@
}
}
});
}, */
//
preview(img) {
this.preImgSrc = img;
this.$refs.imgPreView.open();
}
}
}
@ -118,63 +148,61 @@
<style>
page {
background-color: #181E38;
padding-top: 66rpx;
box-sizing: border-box;
}
.fanku_con {
width: 690rpx;
background: rgba(0, 0, 0, 0.1);
border-radius: 10rpx;
margin-left: 30rpx;
padding-top: 20rpx;
padding-bottom: 70rpx;
box-sizing: border-box;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
}
.img_z {
display: flex;
flex-wrap: wrap;
margin-top:30rpx;
box-sizing: border-box;
}
.imgItemWrap{
width: 200upx;
height: 200upx;
overflow: hidden;
margin: 10upxpx;
background: #f4f5f6;
position: relative;
border-radius: 20upx;
display: flex;
margin: 10rpx;
align-items: center;
justify-content: center;
}
.imgItem{
width: 200rpx;
height: 200rpx;
background-color:rgba(0,0,0,0.1);
border-radius: 20rpx;
}
.imgadf {
width: 120rpx;
height: 120rpx;
background-color: rgba(255, 255, 255, 0.5);
/* margin-left: 29rpx; */
margin-left: 20rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
width: 200rpx;
height: 200rpx;
background-color: #f4f5f6;
border-radius: 20rpx;
font-size: 20rpx;
color: #666666;
flex-direction: column;
}
.img_z {
display: flex;
flex-wrap: wrap;
margin-top: 90rpx;
padding-right: 10rpx;
box-sizing: border-box;
}
.shancs {
width: 35rpx;
height: 35rpx;
width: 40rpx;
height: 40rpx;
position: absolute;
top: -10rpx;
right: -10rpx;
top: 10rpx;
right: 10rpx;
background-color: #FFFFFF;
border-radius: 100%;
}
.dianhua_on {
width: 364rpx;
height: 74rpx;
background: linear-gradient(to right, #F55C63, #F78361);
border-radius: 38rpx;
font-size: 28rpx;
color: #FFFFFF;
margin-top: 130rpx;
margin-left: 192rpx;
}
.center {
display: flex;
justify-content: center;

View File

@ -243,6 +243,14 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/workSpace/visit/vpeopleSelect",
"style": {
"navigationBarTitleText": "选择人员",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/workSpace/visit/visitDetail",
"style": {

View File

@ -29,12 +29,12 @@
<view v-else-if="!item.isLastLevel&&!item.isShowChild" class="switch-off"
:style="{'border-top-color':switchColor}">
</view>
<view v-else class="item-last-dot" :style="{'border-top-color':switchColor}">
<view v-else class="item-last-dots" :style="{'border-top-color':switchColor}">
</view>
</view>
<view class="uni-flex-item uni-inline-item" @tap.stop="_onItemSelect(item, index)">
<view class="item-name"> {{item.name+(item.childCount?"("+item.childCount+")":'')}}
</view>
<!-- <view class="item-name"> {{item.name+(item.childCount?"("+item.childCount+")":'')}}</view> -->
<view class="item-name"> {{item.name}}</view>
<view class="item-check" v-if="selectParent?true:item.isLastLevel">
<view class="item-check-yes" v-if="item.checkStatus==1"
:class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
@ -541,12 +541,12 @@
border-left: 15rpx solid #666;
}
.item-last-dot {
.item-last-dots {
position: absolute;
width: 10rpx;
height: 10rpx;
border-radius: 100%;
/* background: #666; */
background:none!important;
}
.item-icon {

View File

@ -73,8 +73,9 @@
<text class="form-left-text">事件截图</text>
</view>
<view class="form-right" style="">
<image mode="aspectFit" class="form-img" :src="eventDetail.global_img"></image>
<image mode="aspectFit" class="form-img form-img-face" v-if="eventDetail.face_img!==null&&eventDetail.face_img!==undefined" :src="eventDetail.face_img"></image>
<image mode="aspectFit" class="form-img" :src="eventDetail.global_img" @click="preView(eventDetail.global_img)"></image>
<image mode="aspectFit" class="form-img form-img-face" v-if="eventDetail.face_img!==null&&eventDetail.face_img!==undefined"
:src="eventDetail.face_img" @click="preView(eventDetail.face_img)"></image>
</view>
</view>
</view>
@ -104,19 +105,26 @@
<view class="btn" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
<button class="mini-btn" size="mini" type="primary" @click="eventHandle">处理</button>
</view>
<img-view ref="imgPreView" :imgSrc="preImgSrc" @cancelPreView="cancelPreView"></img-view>
</view>
</view>
</template>
<script>
import imgView from "@/components/image-view/image-view.vue";
export default {
name: "eventHandle",
components:{
imgView
},
data() {
return {
form: {
handle_desc: '',
mark: 10
},
preImgSrc:'',
// preImg:false,
eventId: null,
eventDetail: {},
}
@ -130,10 +138,7 @@
}
},
onLoad(params) {
debugger;
console.log(params)
this.eventId = params.eventId;
// that.type = params.type;
},
onShow() {
this.getEventItem();
@ -142,6 +147,25 @@
radioChange(val) {
this.form.mark=val
},
cancelPreView(){
this.preImgSrc = '';
},
//preview
/* 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;
},
//
getEventItem() {
this.$u.api.eventtItem(this.eventId).then((res) => {
@ -310,4 +334,5 @@
width: 150upx;
display: inline-block;
}
</style>

View File

@ -126,6 +126,7 @@
},
onShow() {
debugger;
console.log(this.vuex_perm)
if(this.vuex_user.type==='visitor'){
this.limitedVisit = true;
}else{
@ -151,11 +152,6 @@
},
getEvent() {
let that = this;
// let date = new Date();
// let years = date.getFullYear();
// let months = date.getMonth() + 1;
// let days = date.getDate();
// that.eventList = []
let params = {
page: 1,
page_size: 2,
@ -166,7 +162,7 @@
return item.handle_user === null;
});
that.eventList = eventList.splice(0, 2);
// console.log(that.eventList[0].cates_.name)
})
},
getTicketAgg() {

View File

@ -61,32 +61,66 @@
<view class="item">
<view class="title">证件照</view>
<view class="content">
<image :src="userInfo.photo"></image>
<!-- <u-upload ref="uUpload" :file-list="fileList" :max-count="1" ></u-upload> -->
<image :src="userInfo.photo" @click="preView(userInfo.photo)"></image>
</view>
</view>
<!-- <imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdata" :list="fileList"></imgUpload> -->
</view>
<img-view ref="imgPreView" :imgSrc="preImgSrc" @cancelPreView="cancelPreView"></img-view>
</view>
</template>
<script>
import imgView from "@/components/image-view/image-view.vue";
// import imgUpload from '@/components/linzq-imgUpload/linzq-imgUpload.vue';
export default {
components: {
// imgUpload,
imgView
},
data() {
return {
userInfo: {}
userInfo: {},
// fileList:[],
preImgSrc:'',
head: {
Authorization: "Bearer " + this.vuex_token
},
}
},
onLoad(){
this.getHeader();
},
onShow() {
this.getUserInfo();
},
methods: {
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
getUserInfo() {
this.$u.api.hrmUserInfo().then(res => {
let that = this;
that.$u.api.hrmUserInfo().then(res => {
if(res.photo){
res.photo = this.vuex_host + res.photo
res.photo = that.vuex_host + res.photo
}
console.log(res)
this.userInfo = res;
that.userInfo = res;
that.fileList.push(res.photo);
})
},
preView(srcImg){
this.preImgSrc = srcImg;
this.$refs.imgPreView.open();
},
cancelPreView(){
this.preImgSrc = '';
},
imgUpdata(){
},
goBack() {
uni.navigateBack({

View File

@ -47,10 +47,11 @@
<text class="star">*</text>
<text class="form-left-text">所在部门</text>
</view>
<view class="form-right">
<uni-data-picker placeholder="请选择业务部门" popup-title="请选择业务部门" :localdata="depRange"
v-model="formData.dept" >
</uni-data-picker>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="dept_Picker" :multiple='false' @select-change="dept_Change" title="请选择所在部门"
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children" />
<text type="text">{{dept_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showPicker" type="arrowright" color="#999999"/>
</view>
</view>
<view class="form-item border-bottom">
@ -77,8 +78,9 @@
<view class="item item_bottom_border" style="height: fit-content;" >
<view class="title">照片</view>
<view style="flex: 3;">
<u-upload action="http://10.99.5.79:20309/api/file/" :header="header" ref="uUpload"
:file-list="fileList" max-count="1" @on-success="imgUpSuccess" ></u-upload>
<!-- <u-upload :action="vuex_apifile" :header="header" ref="uUpload" :file-list="fileList" max-count="9" @on-success="imgUpSuccess" ></u-upload> -->
<imgUpload :count="9" :header="header" :url="vuex_apifile" @obtain_img="imgUpdata" :list="fileList"></imgUpload>
</view>
</view>
<view class="btn" v-if="showBtns">
@ -90,9 +92,16 @@
</template>
<script>
import imgUpload from '@/components/linzq-imgUpload/linzq-imgUpload.vue';
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,
imgUpload
},
data() {
return {
formData: {
@ -103,6 +112,7 @@
dept: '', //
description: '', //访
place: '', //访
imgs:[],
},
head: {
Authorization: "Bearer " + this.vuex_token
@ -124,6 +134,7 @@
],
depRange: [],
areaRange: [],
dept_name:'请选所在部门',
}
},
onLoad(params) {
@ -147,6 +158,23 @@
this.getAreaRange();
},
methods: {
imgUpdata(data){
this.formData.imgs = data;
},
showPicker() {
this.$refs.dept_Picker._show();
},
cancel(){
this.$refs.dept_Picker._hide();
},
//ids
dept_Change(ids, names) {
// debugger;
// console.log(ids, names);
this.formData.dept = ids[0];
this.dept_name = names;
},
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
@ -156,9 +184,7 @@
getdept() {
let that = this;
that.$u.api.deptList({page: 0}).then(res => {
that.depRange = that.redata(res);
console.log(that.depRange)
that.depRange = resetData(res);
})
},
//
@ -192,32 +218,6 @@
day = day > 9 ? day : '0' + day;
this.formData.time=year+'-'+month+'-'+day+' '+hours+':'+minutes+':'+seconds;
},
redata(postList) {
let posts = [];
postList.forEach((item) => {
let obj = new Object();
obj = {
...item
};
obj.value = item.id;
obj.text = item.name;
obj.parentId = item.parent;
posts.push(obj);
});
let obj = posts.reduce((res, v) => ((res[v.id] = v), res), {}); //Object
let arr = [];
for (let item of posts) {
if (item.parentId == null) {
arr.push(item);
continue;
}
let parent = obj[item.parentId];
parent.children = parent.children ? parent.children : [];
parent.children.push(item);
}
console.log(arr);
return arr;
},
bindStartDateChange: function(e) {
this.formData.start_time = e.detail.value
},

View File

@ -71,11 +71,11 @@
<text class="star">*</text>
<text class="form-left-text">属地部门</text>
</view>
<view class="form-right">
<uni-data-picker placeholder="请选择属地部门" popup-title="请选择属地部门" :localdata="depRange"
v-model="formData.dept_ter" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
</uni-data-picker>
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="dept_ter_Picker" :multiple='false' @select-change="select_dept_ter_Change" title="请选择属地部门"
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children" />
<text type="text">{{dept_ter_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showDeptTerPicker" type="arrowright" color="#999999"/>
</view>
</view>
<view class="form-item border-bottom">
@ -102,18 +102,7 @@
<uni-icons style="position: absolute; right: 0;" @click="showDcoordinatorPicker" type="arrowright" color="#999999"/>
</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="dept_ter_Picker" :multiple='false' @select-change="select_dept_ter_Change" title="请选择属地部门"
:localdata="depRange" valueKey="id" textKey="name" childrenKey="children" />
<text type="text">{{dept_ter_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showDeptTerPicker" type="arrowright" color="#999999"/>
</view>
</view>
<view class="btn" v-if="showBtns">
<button type="primary" class="save-btn" @click="saveSubmit">下一步</button>
</view>
@ -338,6 +327,18 @@
//
getUserRange() {
let that = this;
/* that.$u.api.deptList({page: 0}).then(res => {
that.userRange = resetData(res)[0].children;
let depts = that.userRange;
for (let i=0;i<depts.length;i++){
// depts[i].children = [{id:0,name:'name'}]
that.$u.api.userList({page: 0,belong_dept:depts[i].id}).then(res => {
depts[i].children = res;
that.userRange = depts;
})
}
that.userRange = depts;
}) */
that.$u.api.deptList({page: 0}).then(res => {
that.userRange = resetData(res);
let userRange = that.userRange[0];
@ -347,7 +348,8 @@
depts[i].children = res;
})
}
userRange.children = depts;
that.userRange.children = depts;
that.userRange = depts;
})
},
/* 参数验证 */

View File

@ -61,10 +61,16 @@
<view class="form-left">
<text class="form-left-text">接待人</text>
</view>
<view class="form-right">
<view class="form-right" style="position: relative;">
<ba-tree-picker ref="dcoordinator_Picker" :multiple='false' @select-change="select_coordinator_Change" title="选择部门协调员"
:localdata="userRange" valueKey="id" textKey="name" childrenKey="children" :selectParent='false'/>
<text type="text">{{dcoordinator_name}}</text>
<uni-icons style="position: absolute; right: 0;" @click="showDcoordinatorPicker" type="arrowright" color="#999999"/>
</view>
<!-- <view class="form-right">
<uni-data-select v-model="formData.receptionist" :localdata="userRange">
</uni-data-select>
</view>
</view> -->
</view>
<view class="form-item border-bottom" v-if="formData.purpose!==50">
<view class="form-left">
@ -102,9 +108,14 @@
</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: {
@ -155,6 +166,7 @@
value: 20
}],
userRange: [],
dcoordinator_name:'请选择接待人',
}
},
watch: {
@ -181,9 +193,20 @@
this.getUserRange();
},
methods: {
showDcoordinatorPicker(){
this.$refs.dcoordinator_Picker._show();
},
cancel(){
this.$refs.treePicker._hide();
},
select_coordinator_Change(ids, names){
this.formData.receptionist = ids[0];
this.dcoordinator_name = names;
},
//
getUserRange() {
this.$u.api.userList({
let that = this;
/* this.$u.api.userList({
page: 0
}).then(res => {
let user = [];
@ -198,6 +221,18 @@
user.push(obj);
})
this.userRange = user
}) */
that.$u.api.deptList({page: 0}).then(res => {
that.userRange = resetData(res);
let userRange = that.userRange[0];
let depts = userRange.children;
for (let i=0;i<depts.length;i++){
that.$u.api.userList({page: 0,belong_dept:depts[i].id}).then(res => {
depts[i].children = res;
})
}
that.userRange.children = depts;
that.userRange = depts;
})
},
getVisitItem() {

View File

@ -3,6 +3,11 @@
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="人员选择"
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="apply-info">
<view class="list-title">
<view class="selectCount">已选{{vpeopleList.length}}</view>
<button v-if="vpeopleList.length>0" type="primary" class="select" @click="checkPeople">继续选择</button>
<button v-else type="primary" class="select" @click="checkPeople">选择人员</button>
</view>
<view class="row" v-for="(row,index) in vpeopleList" :key="index" @tap="select(row)">
<view class="center" style="display: flex;">
<view class="name-tel" style="width: 80%;">
@ -20,34 +25,10 @@
</view>
</view>
</view>
<button type="primary" class="select" @click="checkPeople">选择人员</button>
</view>
<button type="primary" class="addNew" @click="add">新增人员</button>
<view class="dialogWrap" v-if="limitedPeople">
<view class="dialogCont">
<view class="dialogTitle">
<view>选择来访人员</view>
<view class="dialogCloseImg" @click="closeDialog"></view>
</view>
<form @submit="formSubmit">
<view class="uni-form-item uni-column">
<view class="title">访客</view>
<uni-data-select name="visitor" :localdata="userRange" v-model="formData.visitor">
</uni-data-select>
</view>
<view class="uni-form-item uni-column">
<view class="title">是否主访客</view>
<view>
<switch name="is_main" v-model="formData.is_main" />
</view>
</view>
<view class="uni-btn-v">
<button class="mini-btn" type="primary" size="mini" form-type="submit">确定</button>
</view>
</form>
</view>
</view>
<view class="apply-info" style="min-height: fit-content;display: flex;">
<view class="apply-info" style="min-height: fit-content;display: flex;position: fixed;bottom: 0;">
<button v-for=" item in initform.transitions" :key="item.id" @click="submitticket(item.id)" type="primary" style="width: 25%;">{{item.name}}
</button>
<button type="warn" style="width: 25%;">退出</button>
@ -61,59 +42,27 @@
name: "vpeopleList",
data() {
return {
limitedPeople: false,
formData: {
visit: '',
visitor: '',
is_main: true,
},
visitorCount:0,
initform: {},
vpeopleList: [],
userRange: [],
healthFileList:[],
travelFileList:[],
reportFileList:[],
}
},
onLoad(params) {
this.visitId = params.visit;
},
onShow() {
this.getUserRange();
this.getVpeopleList();
this.getInit();
},
methods: {
formSubmit(val) {
let that = this;
that.formData.visit = that.visitId;
that.$u.api.vpeopleCreate(that.formData).then(res => {
if (res.err_msg) {} else {
that.getVpeopleList();
this.limitedPeople = false;
}
})
},
remove(row){
this.$u.api.vpeopleDelete(row.id).then(res => {
this.getVpeopleList();
})
},
//
getUserRange() {
let that = this;
that.$u.api.vmVisitor({
page: 0
}).then(res => {
that.userRange = [];
let user = [];
let obj = {};
res.forEach(item => {
obj = item;
obj.value = item.id;
obj.text = item.name;
user.push(obj);
})
that.userRange = user
})
},
//
getVpeopleList() {
let that = this;
@ -134,10 +83,11 @@
})
},
checkPeople() {
this.limitedPeople = true;
},
closeDialog() {
this.limitedPeople = false;
let that = this;
let params =`?visitId=${that.visitId}`;
uni.navigateTo({
url: '/pages/workSpace/visit/vpeopleSelect'+params
})
},
select(row) {},
goBack() {
@ -204,7 +154,18 @@
box-sizing: border-box;
margin-top: 12px;
}
.list-title{
display: flex;
padding-bottom: 20rpx;
justify-content: start;
border-bottom: 1upx solid #eeeeee;
}
.selectCount{
height: 70rpx;
line-height:70rpx;
margin-right: 20rpx;
font-size: 36rpx;
}
.row {
padding: 10upx;
margin-bottom: 20upx;
@ -226,17 +187,17 @@
box-shadow: 0 0 6px 2px rgba(0, 0, 0, .3);
z-index: 100;
position: fixed;
bottom: 20px;
bottom: 60px;
right: 20px;
}
.select {
margin: auto;
margin: 0;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
width: 400rpx;
height: 80rpx;
line-height: 80rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 30rpx;
border-radius: 35rpx;
}
.save-btn {
@ -258,15 +219,11 @@
}
.dialogCont {
width: 80vw;
width: 100vw;
position: absolute;
top: 50%;
margin: auto;
background-color: #ffffff;
left: 10vw;
transform: translateY(-50%);
padding: 20rpx;
border-radius: 20rpx;
}
.dialogTitle {
@ -278,7 +235,8 @@
}
.uni-form-item {
height: 160rpx;
display: flex;
align-items: center;
}
.uni-form-item>.title {

View File

@ -0,0 +1,290 @@
<template>
<view class="my-data">
<uni-nav-bar @clickLeft="goBack()" class="nav-bar" height="110rpx" leftWidth="200rpx" leftText="人员选择"
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<view class="wrap-view" style="box-shadow: 0 0 15px 5px #eeeeee;padding-bottom: 20upx;">
<view class="item">
<view class="title">信息修改</view>
<view class="content"></view>
</view>
<view class="item item_bottom_border">
<view class="title">访客</view>
<view class="content">
<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="content">
<uni-datetime-picker
v-model="formData.return_date"
type="date"
:hide-second="true"
/>
</view>
</view>
<view class="item item_bottom_border">
<view class="title">来源地</view>
<view class="content">
<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="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 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="content">
<uni-datetime-picker
v-model="formData.test_date"
type="date"
:hide-second="true"
/>
</view>
</view>
<view class="item item_bottom_border">
<view class="title">是否报备</view>
<view class="content">
<switch name="is_main" v-model="formData.is_reported" />
</view>
</view>
<view class="item item_bottom_border">
<view class="title">是否主访客</view>
<view class="content">
<switch name="is_main" v-model="formData.is_main" />
</view>
</view>
<view class="item item_bottom_border" style="height: fit-content;">
<view class="title">健康码</view>
<view style="flex: 3;">
<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 style="flex: 3;">
<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 style="flex: 3;">
<imgUpload :count="1" :header="header" :url="vuex_apifile" @obtain_img="imgUpdataReport" :list="reportFileList"></imgUpload>
</view>
</view>
</view>
<view class="btn">
<button type="default" class="save-btn" @click="formSubmit">保存</button>
</view>
</view>
</template>
<script>
import imgUpload from '@/components/linzq-imgUpload/linzq-imgUpload.vue';
import nonNullCheck from '../../../utils/nonNullCheck.js';
export default {
components: {
imgUpload
},
data() {
return {
formData: {
visit: '',
visitor: '',
return_date: '',
come_place: '',
trip_desc: '',
test_date:'',
measure: '',
health_code: '',
travel_code: '',
test_report: '',
is_main: false,
is_reported: false,
},
head: {
Authorization: "Bearer " + this.vuex_token
},
userRange: [],
measureRange: [
{value:'集中隔离',text:'集中隔离'},
{value:'居家隔离',text:'居家隔离'},
{value:'居家健康检测',text:'居家健康检测'},
{value:'排除风险',text:'排除风险'},
],
healthFileList:[],
travelFileList:[],
reportFileList:[],
hasPhoto:false,
header:'',
visitId:''
}
},
onLoad(params) {
debugger;
if (params.visitId) {
this.formData.visit = params.visitId;
this.visitId = params.visitId;
}
},
onShow() {
this.getHeader();
this.getUserRange();
},
methods: {
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
getHeader() {
this.header = {
Authorization: "Bearer " + this.vuex_token
}
},
imgUpdataHealth(data){
// debugger;
console.log(data)
this.formData.health_code = data[0];
},
imgUpdataTravel(data){
this.formData.travel_code = data[0];
},
imgUpdataReport(data){
this.formData.test_report = data[0];
},
//
getUserRange() {
let that = this;
that.$u.api.vmVisitor({
page: 0
}).then(res => {
that.userRange = [];
let user = [];
let obj = {};
res.forEach(item => {
obj = item;
obj.value = item.id;
obj.text = item.name;
user.push(obj);
})
that.userRange = user
})
},
/* 参数验证 */
paramsCheck() {
if (!nonNullCheck(this.formData.visitor)) {
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
})
}
})
},
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;
}
.my-data {
background-color: #f3fbff;
padding-bottom: 227rpx;
}
.nav-bar>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.wrap-view {
width: 720rpx;
margin: 0 auto;
background-color: #ffffff;
border-radius: 10rpx;
line-height: 94rpx;
font-family: PingFang-SC-Medium;
font-size: 30rpx;
}
.wrap-top{
padding: 20upx 0;
line-height: 60upx;
}
.item {
margin: 0rpx 32rpx;
display: flex;
margin-top: 20rpx;
}
.item_bottom_border{
border-bottom: 1rpx solid #eeeeee;
}
.title {
color: #212121;
flex: 1;
}
.content {
flex: 3;
color: #414141;
}
.content input {
height: 100%;
}
.save-btn {
width: 400rpx;
height: 80rpx;
background-color: #2c6fd9;
border-radius: 40rpx;
font-size: 30rpx;
line-height: 80rpx;
color: #f3fbff;
margin-top: 21rpx;
}
</style>

View File

@ -114,8 +114,8 @@
}
},
onShow() {
debugger;
console.log(this.vuex_perm)
// debugger;
// console.log(this.vuex_perm)
this.limitedRpj = this.vuex_perm.includes('rpj.create')>-1||this.vuex_perm.includes('superuser')>-1;
this.limitedOperation = this.vuex_perm.includes('operation.create')>-1||this.vuex_perm.includes('superuser')>-1;
},