|
@@ -51,10 +51,31 @@
|
|
@cancel="publicShow = false"
|
|
@cancel="publicShow = false"
|
|
></van-picker>
|
|
></van-picker>
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
+ <!-- 项目级别 -->
|
|
|
|
+ <van-field label="项目级别" @click="levelShow = true" readonly clickable>
|
|
|
|
+ <template #input>
|
|
|
|
+ <span>{{projectDetail.levelLabel}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-field>
|
|
|
|
+ <van-popup v-model="levelShow" position="bottom">
|
|
|
|
+ <van-picker
|
|
|
|
+ show-toolbar
|
|
|
|
+ value-key="label"
|
|
|
|
+ :columns="levelList"
|
|
|
|
+ @confirm="levelConfirm"
|
|
|
|
+ @cancel="levelShow = false"
|
|
|
|
+ ></van-picker>
|
|
|
|
+ </van-popup>
|
|
<!-- 参与人 -->
|
|
<!-- 参与人 -->
|
|
<van-field label="全部参与人" @click="userNamesShow = true" readonly clickable v-show="projectDetail.isPublic == 0">
|
|
<van-field label="全部参与人" @click="userNamesShow = true" readonly clickable v-show="projectDetail.isPublic == 0">
|
|
<template #input>
|
|
<template #input>
|
|
- <span>{{projectDetail.userNames}}</span>
|
|
|
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'">
|
|
|
|
+ <span v-for="item,index in projectDetail.userNames.split(',')" :key="item">
|
|
|
|
+ <ww-open-data type='userName' :openid='item'></ww-open-data>
|
|
|
|
+ <span v-if="index != (projectDetail.userNames.split(',').length - 1)">,</span>
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ <span v-else>{{projectDetail.userNames}}</span>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
<van-popup v-model="userNamesShow" position="bottom">
|
|
<van-popup v-model="userNamesShow" position="bottom">
|
|
@@ -72,7 +93,8 @@
|
|
<!-- 项目经理 -->
|
|
<!-- 项目经理 -->
|
|
<van-field label="项目经理" @click="inchargerShow = true" readonly clickable>
|
|
<van-field label="项目经理" @click="inchargerShow = true" readonly clickable>
|
|
<template #input>
|
|
<template #input>
|
|
- <span>{{projectDetail.inchargerName}}</span>
|
|
|
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='projectDetail.inchargerName'></ww-open-data></span>
|
|
|
|
+ <span v-else>{{projectDetail.inchargerName}}</span>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
<van-popup v-model="inchargerShow" position="bottom">
|
|
<van-popup v-model="inchargerShow" position="bottom">
|
|
@@ -82,7 +104,12 @@
|
|
:columns="inchargerList"
|
|
:columns="inchargerList"
|
|
@confirm="inchargerConfirm"
|
|
@confirm="inchargerConfirm"
|
|
@cancel="inchargerShow = false"
|
|
@cancel="inchargerShow = false"
|
|
- ></van-picker>
|
|
|
|
|
|
+ >
|
|
|
|
+ <template #option="item">
|
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
|
|
|
|
+ <span v-else>{{item.name}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-picker>
|
|
</van-popup>
|
|
</van-popup>
|
|
<!-- 开始日期 -->
|
|
<!-- 开始日期 -->
|
|
<van-field label="计划开始日期" @click="startDateShow = true" readonly clickable>
|
|
<van-field label="计划开始日期" @click="startDateShow = true" readonly clickable>
|
|
@@ -147,6 +174,8 @@ export default {
|
|
categoryShow: false,
|
|
categoryShow: false,
|
|
publicList: ['普通项目','公共项目'],
|
|
publicList: ['普通项目','公共项目'],
|
|
publicShow: false,
|
|
publicShow: false,
|
|
|
|
+ levelList: [],
|
|
|
|
+ levelShow: false,
|
|
userName: null,
|
|
userName: null,
|
|
allUserList: [],
|
|
allUserList: [],
|
|
userList: [],
|
|
userList: [],
|
|
@@ -166,6 +195,7 @@ export default {
|
|
}else{
|
|
}else{
|
|
this.getCategoryList()
|
|
this.getCategoryList()
|
|
}
|
|
}
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
back() {
|
|
back() {
|
|
@@ -190,6 +220,11 @@ export default {
|
|
this.projectDetail.isPublic = key
|
|
this.projectDetail.isPublic = key
|
|
this.publicShow = false
|
|
this.publicShow = false
|
|
},
|
|
},
|
|
|
|
+ levelConfirm(value,key){
|
|
|
|
+ this.projectDetail.level = value.id
|
|
|
|
+ this.projectDetail.levelLabel = value.label
|
|
|
|
+ this.levelShow = false
|
|
|
|
+ },
|
|
onSearch(val) {
|
|
onSearch(val) {
|
|
console.log(val);
|
|
console.log(val);
|
|
this.userList = [];
|
|
this.userList = [];
|
|
@@ -232,18 +267,14 @@ export default {
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
formData.append("id", this.projectDetail.id);
|
|
formData.append("id", this.projectDetail.id);
|
|
formData.append("name", this.projectDetail.projectName);
|
|
formData.append("name", this.projectDetail.projectName);
|
|
- if(this.projectDetail.projectCode){
|
|
|
|
- formData.append("code", this.projectDetail.projectCode);
|
|
|
|
- }
|
|
|
|
|
|
+ formData.append("code", this.projectDetail.projectCode ? this.projectDetail.projectCode : '');
|
|
if(this.projectDetail.projectMainId && this.user.timeType.mainProjectState == '1') {
|
|
if(this.projectDetail.projectMainId && this.user.timeType.mainProjectState == '1') {
|
|
formData.append("projectMainId", this.addForm.projectMainId);
|
|
formData.append("projectMainId", this.addForm.projectMainId);
|
|
}
|
|
}
|
|
if(this.projectDetail.category) {
|
|
if(this.projectDetail.category) {
|
|
formData.append("category", this.projectDetail.category);
|
|
formData.append("category", this.projectDetail.category);
|
|
}
|
|
}
|
|
- if(this.projectDetail.projectDesc) {
|
|
|
|
- formData.append("projectDesc", this.projectDetail.projectDesc);
|
|
|
|
- }
|
|
|
|
|
|
+ formData.append("projectDesc", this.projectDetail.projectDesc ? this.projectDetail.projectDesc : '');
|
|
formData.append("isPublic", this.projectDetail.isPublic);
|
|
formData.append("isPublic", this.projectDetail.isPublic);
|
|
if(this.projectDetail.userId.length != 0 && this.projectDetail.isPublic == 0) {
|
|
if(this.projectDetail.userId.length != 0 && this.projectDetail.isPublic == 0) {
|
|
for(let i in this.projectDetail.userId) {
|
|
for(let i in this.projectDetail.userId) {
|
|
@@ -336,6 +367,17 @@ export default {
|
|
this.currentStartDate = new Date(res.data.planStartDate)
|
|
this.currentStartDate = new Date(res.data.planStartDate)
|
|
this.currentEndDate = new Date(res.data.planEndDate)
|
|
this.currentEndDate = new Date(res.data.planEndDate)
|
|
this.getUserList()
|
|
this.getUserList()
|
|
|
|
+ if(this.user.timeType.projectLevelState == 1){
|
|
|
|
+ this.getLevelList()
|
|
|
|
+ }else{
|
|
|
|
+ this.levelList = [
|
|
|
|
+ {label: '正常' ,id: 1},
|
|
|
|
+ {label: '紧急' ,id: 2},
|
|
|
|
+ {label: '重要' ,id: 3},
|
|
|
|
+ {label: '重要且紧急' ,id: 4},
|
|
|
|
+ ]
|
|
|
|
+ this.projectDetail.levelLabel = this.levelList[this.projectDetail.level - 1].label
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.$toast.fail('获取失败');
|
|
this.$toast.fail('获取失败');
|
|
}
|
|
}
|
|
@@ -361,6 +403,17 @@ export default {
|
|
}
|
|
}
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
},
|
|
},
|
|
|
|
+ getLevelList(){
|
|
|
|
+ this.$axios.get("/project-level/list", {})
|
|
|
|
+ .then(res => {
|
|
|
|
+ if(res.code == "ok") {
|
|
|
|
+ this.levelList = res.data
|
|
|
|
+ this.projectDetail.levelLabel = this.levelList.filter(u => u.id == this.projectDetail.level)[0].label
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast.fail('获取失败');
|
|
|
|
+ }
|
|
|
|
+ }).catch(err=> {this.$toast.clear();console.log(err)});
|
|
|
|
+ },
|
|
getUserList(){
|
|
getUserList(){
|
|
this.$axios.post("/user/getEmployeeList", {departmentId: -1,pageIndex: 1,pageSize: -1})
|
|
this.$axios.post("/user/getEmployeeList", {departmentId: -1,pageIndex: 1,pageSize: -1})
|
|
.then(res => {
|
|
.then(res => {
|