提交 d244efa5 作者: wk

项目组织切换

父级 cf851fde
......@@ -84,7 +84,7 @@
isEdit = 0
}
uni.navigateTo({
url: `/pages/gallery/processFormDetailPage/processFormDetailPage?obj_no=${item.obj_no}&check_module_id=${item.check_module_id}&check_tpl_id=${item.check_tpl_id}&project_id=${item.project_id}&title=${item.app_name}&is_edit=${isEdit}`
url: `/pages/gallery/processFormDetailPage/processFormDetailPage?obj_no=${item.obj_no}&check_module_id=${item.check_module_id}&check_tpl_id=${item.check_tpl_id}&project_id=${item.project_id}&title=${item.app_name}&is_edit=${isEdit}&status=${item.status_name}`
})
},
getAllNeedDo() {
......
......@@ -789,15 +789,27 @@
let result = res.data
console.log("项目列表:", result);
if (result.code === 0) {
that.projectList = result.data.list
if (that.projectList.length > 0) {
for (var i = 0; i < that.projectList.length; i++) {
that.projectNames[i] = that.projectList[i].project_name
let curId = uni.getStorageSync("project_id")
console.log("项目id:", curId);
if (curId) {
this.projectSelect = uni.getStorageSync("org_name")
this.projectNames.push(this.projectSelect)
this.projectId = curId
this.projectList.push({
project_id: curId,
project_name: this.projectName
})
} else {
this.projectList = result.data.list
if (that.projectList.length > 0) {
for (var i = 0; i < that.projectList.length; i++) {
that.projectNames[i] = that.projectList[i].project_name
}
that.projectSelect = that.projectList[0].project_name
that.projectId = that.projectList[0].project_id
}
that.projectSelect = that.projectList[0].project_name
that.projectId = that.projectList[0].project_id
that.getFormList()
}
this.getFormList()
} else {
if (result.code === -1) {
uni.showToast({
......
......@@ -25,13 +25,13 @@
</view>
</view>
</view>
<view class="popularity-content" :style="{'margin-top':statusBarHeight+15+'px'}">
<view class="popularity-content" :style="{'top':statusBarHeight+200+'px'}">
<image src="../../static/ic-sjzg.png" class="image" @click="linkToData"></image>
<text class="text" @click="linkToData">数据智管</text>
<image src="../../static/ic-rqyy.png" class="rq-image"></image>
<text class="text">本周人气最佳:{{mostUsed.app_name||"暂无"}}</text>
</view>
<view class="app-content">
<view class="app-content" :style="{'top':statusBarHeight+250+'px'}">
<v-tabs :tabs="tabs" :scroll="true" :value="current" @change="tabChange"></v-tabs>
<view class="app-group-content">
<view class="app-group-item" v-for="(item,index) in getMenuApps()" :key="index">
......@@ -103,7 +103,11 @@
uni.$once("refreshOrg", res => {
this.orgName = uni.getStorageSync("org_name")
})
this.getOrgTree()
if (!uni.getStorageSync("org_name")) {
this.getOrgTree()
} else {
this.orgName = uni.getStorageSync("org_name")
}
this.getMostUsed()
},
methods: {
......@@ -138,7 +142,6 @@
}).then((result) => {
console.log("组织树", result);
if (result.code == 0) {
this.trees = result.data.list[0].children_list
this.orgName = uni.getStorageSync("org_name") || result.data.list[0].name
if (this.role == 'VISITOR') {
this.orgName = "您还未【加入项目】,请前往【我的】加入"
......@@ -521,6 +524,7 @@
}
.popularity-content {
position: absolute;
width: 690rpx;
height: 40px;
border-radius: 40rpx;
......@@ -551,6 +555,7 @@
}
.app-content {
position: absolute;
display: flex;
flex-direction: column;
......@@ -560,6 +565,7 @@
.app-group-item {
display: flex;
width: 630rpx;
padding: 30rpx;
margin: 20rpx 30rpx 0 30rpx;
flex-direction: column;
......
......@@ -4,7 +4,7 @@
<view style="display: flex;flex-direction: column;padding: 32rpx;">
<view class="executor-text">发起时间:{{forms[0].created_at}}</view>
<view class="executor-text">发起人:{{forms[0].created_by_name}}</view>
<view class="executor-text">目前状态:{{forms[forms.length-1].check_item_name}}</view>
<view class="executor-text">目前状态:{{status}}</view>
<view class="executor-text">
目前执行人:{{forms[forms.length-1].executorStr}}
</view>
......
......@@ -78,7 +78,7 @@
},
itemClick(item) {
uni.navigateTo({
url: `/pages/gallery/processFormDetailPage/processFormDetailPage?obj_no=${item.obj_no}&check_module_id=${item.check_module_id}&check_tpl_id=${item.check_tpl_id}&project_id=${item.project_id}&title=${item.app_name}&is_edit=1`
url: `/pages/gallery/processFormDetailPage/processFormDetailPage?obj_no=${item.obj_no}&check_module_id=${item.check_module_id}&check_tpl_id=${item.check_tpl_id}&project_id=${item.project_id}&title=${item.app_name}&is_edit=1&status=${item.status_name}`
})
}
}
......
......@@ -15,7 +15,8 @@
<view v-if="tree.isOpen" style="margin-top: 20rpx;">
<view class="org-item" v-for="(oneLevel,oneIndex) in tree.children_list" :key="oneIndex">
<view class="org">
<image v-if="!oneLevel.project_id&&oneLevel.children_list.length>0"
<image
v-if="!oneLevel.project_id&&oneLevel.children_list&&oneLevel.children_list.length>0"
:src="oneLevel.isOpen?'../../../static/icon_up_arrow.png':'../../../static/icon_drop_arrow.png'"
class="image" @click="toNextChild(index,oneLevel,oneIndex)"></image>
<view class="name" @click="toNextChild(index,oneLevel,oneIndex)">{{oneLevel.name}}
......@@ -70,12 +71,20 @@
}).then((result) => {
console.log("组织树", result);
if (result.code == 0) {
this.trees = result.data.list[0].children_list
var list = result.data.list
if (list && list.length > 0) {
if (list[0].no == '001') {
this.trees = list[0].children_list
} else {
this.trees = list
}
}
}
})
},
toNextLevel(item, index) {
let children = item.children_list
console.log("子集", children);
if (item.isOpen) {
item.isOpen = false
} else {
......
......@@ -57,25 +57,26 @@
onShow() {
this.userInfo = getApp().globalData.userInfo
this.isHasAuth = this.userInfo.identity.code == "PM"
// var org = uni.getStorageSync("org_name")
if (this.isHasAuth) {
this.orgName = uni.getStorageSync("org_name")
this.project_id = uni.getStorageSync("project_id")
if (!this.project_id) {
this.isProject = false
this.type = 'company'
console.log("用户信息", this.userInfo);
let jobs = this.userInfo.user.job_list
console.log("岗位列表", jobs);
let currentComId = this.userInfo.user.comp_id
let job = jobs.find(item =>
item.company_id == currentComId
)
console.log("当前岗位", job);
// console.log("用户信息", this.userInfo);
// let jobs = this.userInfo.user.job_list
// console.log("岗位列表", jobs);
// let currentComId = this.userInfo.user.comp_id
// let job = jobs.find(item =>
// item.company_id == currentComId
// )
// console.log("当前岗位", job);
this.currentJob = job
this.orgName = this.currentJob.org_name
// this.orgName = this.currentJob.org_name
} else {
this.isProject = true
this.type = 'project'
this.orgName = uni.getStorageSync("org_name")
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment