|
|
@@ -162,32 +162,37 @@ |
|
|
|
<div class="yiyun_col-6 fl">
|
|
|
|
<div class="bianju_item_fr">
|
|
|
|
<el-form-item label="项目负责人:">
|
|
|
|
<span>{{ nowProject.userCnName }}</span>
|
|
|
|
<span>{{nowProject.ProjCreateUserName}}</span>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="yiyun_col-6 fl">
|
|
|
|
<div class="bianju_item_fr">
|
|
|
|
<el-form-item label="创建时间:">
|
|
|
|
<span>{{ nowProject.strCreateTime }}</span>
|
|
|
|
<span>{{ nowProject.ProjCreateTime }}</span>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="yiyun_col-12 fl" v-for="prop in listProjProp" :key="prop.projPropID">
|
|
|
|
<div class="yiyun_col-12 fl" v-for="prop in listProjProp" :key="prop.TempPropId">
|
|
|
|
<div class="bianju_item_fr">
|
|
|
|
<el-form-item :label='prop.propName+":"'>
|
|
|
|
<el-input v-model="prop.propValue" placeholder="输入" class="labelinputbefore" v-if="isShowInfoEdit"></el-input>
|
|
|
|
<span v-if="!isShowInfoEdit">{{ prop.propValue }}</span>
|
|
|
|
<el-form-item :label='prop.PropertyName+":"'>
|
|
|
|
<el-input v-model="prop.PropValue" placeholder="输入" class="labelinputbefore" v-if="isShowInfoEdit"></el-input>
|
|
|
|
<span v-if="!isShowInfoEdit">{{ prop.PropValue }}</span>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="yiyun_col-12 fl mt-10">
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_col-6">
|
|
|
|
<div class="pageImgBox ml-110">
|
|
|
|
<img v-lazy="coverSrc" alt="" />
|
|
|
|
<file-Uploader v-show="isShowSaveAllBtn" :mutiple="false" label="编辑封面" :auto="true" accept="image" ref="webUploadlist" :btn-id="filePicker" :companyId="uploadCompId" :typeId="uploadTypeCover" @upload-success="coverUploadSuccess" :url="chunkUploadUrl" class="listUpdateBtn">
|
|
|
|
</file-Uploader>
|
|
|
|
<div class="pageImgBox">
|
|
|
|
<img :src="coverSrc | resolveAvator" alt="" />
|
|
|
|
<file-uploader
|
|
|
|
v-show="isShowSaveAllBtn"
|
|
|
|
:on-success="coverUploadSuccess"
|
|
|
|
class="listUpdateBtn editCoverBtn"
|
|
|
|
>
|
|
|
|
<span>编辑</span>
|
|
|
|
</file-uploader>
|
|
|
|
<span class="faceBtn" v-show="isShowSaveAllBtn" @click="setSystemCover">使用随机封面</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@@ -518,7 +523,14 @@ |
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import * as prjService from '@/services/project'
|
|
|
|
import { wrapOssProtocol} from "@/services/oss";
|
|
|
|
import FileUploader from "@/components/file-uploader";
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
export default {
|
|
|
|
components:{
|
|
|
|
FileUploader
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
isProjManager: {
|
|
|
|
type: Boolean,
|
|
|
@@ -531,6 +543,10 @@ |
|
|
|
projId:{
|
|
|
|
type:String,
|
|
|
|
default:''
|
|
|
|
},
|
|
|
|
createUserId:{
|
|
|
|
type:String,
|
|
|
|
default:''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
@@ -579,7 +595,7 @@ |
|
|
|
isShowSetUsers: false, // 分配工作人员面板
|
|
|
|
isShowProjInfo: true, // 项目概况
|
|
|
|
isShowInfoEdit: false, // 项目概况编辑
|
|
|
|
isShowEditProjBtn: false, // 编辑项目概况按钮
|
|
|
|
isShowEditProjBtn: true, // 编辑项目概况按钮
|
|
|
|
isShowSaveAllBtn: false, // 保存全部信息按钮
|
|
|
|
currWorkName: "", // 分配人员时工作名称
|
|
|
|
currentProjId:"",
|
|
|
@@ -587,8 +603,7 @@ |
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted: function () {
|
|
|
|
this.listProjFolder();
|
|
|
|
this.listDeptUsers();
|
|
|
|
//this.listDeptUsers();
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
/**
|
|
|
@@ -684,48 +699,72 @@ |
|
|
|
/**
|
|
|
|
* 保存项目概况
|
|
|
|
*/
|
|
|
|
saveProjectInfo: function () {
|
|
|
|
async saveProjectInfo(){
|
|
|
|
|
|
|
|
|
|
|
|
var CustomProps=[];
|
|
|
|
|
|
|
|
this.listProjProp.forEach(item=>{
|
|
|
|
var prop = {};
|
|
|
|
prop.Id=item.ProjPropId;
|
|
|
|
prop.PropValue=item.PropValue;
|
|
|
|
CustomProps.push(prop);
|
|
|
|
})
|
|
|
|
|
|
|
|
var updateData = {
|
|
|
|
ProjId: this.currentProjId,
|
|
|
|
ImgeUrl:this.nowProject.ShowImgUrl,
|
|
|
|
Projprops: CustomProps,
|
|
|
|
};
|
|
|
|
console.log(updateData)
|
|
|
|
const res=await prjService.EditProject(updateData);
|
|
|
|
this.projInfo(this.currentProjId);
|
|
|
|
this.isShowSaveAllBtn = false;
|
|
|
|
this.isShowInfoEdit = false;
|
|
|
|
this.isShowEditProjBtn = true;
|
|
|
|
// 提交到数据库进行保存数据
|
|
|
|
var thisApp = this;
|
|
|
|
var updateData = {
|
|
|
|
listProjProp: this.listProjProp,
|
|
|
|
projId: this.currentProjId,
|
|
|
|
showImageUrl:this.nowProject.showImgUrl,
|
|
|
|
userId: sessionStorage.userId
|
|
|
|
};
|
|
|
|
thisApp
|
|
|
|
.$axios({
|
|
|
|
method: "put",
|
|
|
|
url: encodeURI(process.env.API_HOST + "projects/prop"),
|
|
|
|
data: updateData
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500
|
|
|
|
});
|
|
|
|
thisApp.$emit("editSuccess");
|
|
|
|
} else {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "温馨提示",
|
|
|
|
message: response.data.message,
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 5000
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
this.isShowEditProjBtn = true;
|
|
|
|
},
|
|
|
|
// saveProjectInfo: function () {
|
|
|
|
// this.isShowSaveAllBtn = false;
|
|
|
|
// this.isShowInfoEdit = false;
|
|
|
|
// this.isShowEditProjBtn = true;
|
|
|
|
// // 提交到数据库进行保存数据
|
|
|
|
// var thisApp = this;
|
|
|
|
// var updateData = {
|
|
|
|
// listProjProp: this.listProjProp,
|
|
|
|
// projId: this.currentProjId,
|
|
|
|
// showImageUrl:this.nowProject.showImgUrl,
|
|
|
|
// userId: sessionStorage.userId
|
|
|
|
// };
|
|
|
|
// thisApp
|
|
|
|
// .$axios({
|
|
|
|
// method: "put",
|
|
|
|
// url: encodeURI(process.env.API_HOST + "projects/prop"),
|
|
|
|
// data: updateData
|
|
|
|
// })
|
|
|
|
// .then(response => {
|
|
|
|
// if (response.data.state == 1) {
|
|
|
|
// thisApp.$notify({
|
|
|
|
// title: "恭喜您",
|
|
|
|
// message: response.data.message,
|
|
|
|
// type: "success",
|
|
|
|
// offset: 100,
|
|
|
|
// duration: 2500
|
|
|
|
// });
|
|
|
|
// thisApp.$emit("editSuccess");
|
|
|
|
// } else {
|
|
|
|
// thisApp.$notify({
|
|
|
|
// title: "温馨提示",
|
|
|
|
// message: response.data.message,
|
|
|
|
// type: "success",
|
|
|
|
// offset: 100,
|
|
|
|
// duration: 5000
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// .catch(error => {
|
|
|
|
// console.log(error);
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
/**
|
|
|
|
* 初始底部弹框
|
|
|
|
*/
|
|
|
@@ -1058,26 +1097,40 @@ |
|
|
|
* 加载需要分配的文件夹
|
|
|
|
*/
|
|
|
|
listProjFolder: function () {
|
|
|
|
var thisApp = this;
|
|
|
|
thisApp
|
|
|
|
.$axios({
|
|
|
|
method: "get",
|
|
|
|
url: encodeURI(
|
|
|
|
process.env.API_HOST + "projects/info/" + this.currentProjId
|
|
|
|
)
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
if (response.data != '')
|
|
|
|
{
|
|
|
|
thisApp.nowProject = response.data.data.projectData;
|
|
|
|
thisApp.listNewFolder = response.data.data.listFolder;
|
|
|
|
thisApp.listProjProp = response.data.data.listProjProp;
|
|
|
|
thisApp.coverSrc=thisApp.imgSrc+ thisApp.nowProject.showImgUrl;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var thisApp = this;
|
|
|
|
// thisApp
|
|
|
|
// .$axios({
|
|
|
|
// method: "get",
|
|
|
|
// url: encodeURI(
|
|
|
|
// process.env.API_HOST + "projects/info/" + this.currentProjId
|
|
|
|
// )
|
|
|
|
// })
|
|
|
|
// .then(response => {
|
|
|
|
// if (response.data != '')
|
|
|
|
// {
|
|
|
|
// thisApp.nowProject = response.data.data.projectData;
|
|
|
|
// thisApp.listNewFolder = response.data.data.listFolder;
|
|
|
|
// thisApp.listProjProp = response.data.data.listProjProp;
|
|
|
|
// thisApp.coverSrc=thisApp.imgSrc+ thisApp.nowProject.showImgUrl;
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// .catch(error => {
|
|
|
|
// console.log(error);
|
|
|
|
// });
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 加载项目信息
|
|
|
|
*/
|
|
|
|
async projInfo(id){
|
|
|
|
const projectInfoRes= await prjService.QueryProjectInfoByProjId(id);
|
|
|
|
this.nowProject=projectInfoRes.Data;
|
|
|
|
this.nowProject.ProjCreateTime=dayjs(this.nowProject.ProjCreateTime).format('YYYY-MM-DD HH:mm:ss')
|
|
|
|
this.listProjProp=projectInfoRes.Data.CustomProps;
|
|
|
|
this.coverSrc=projectInfoRes.Data.ShowImgUrl;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 获取全部的Dept数据
|
|
|
@@ -1134,16 +1187,19 @@ |
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 封面上传成功时
|
|
|
|
*/
|
|
|
|
coverUploadSuccess: function (file) {
|
|
|
|
this.nowProject.showImgUrl = file.filePath;
|
|
|
|
this.coverSrc = this.imgSrc + file.filePath;
|
|
|
|
const filePath = wrapOssProtocol(file.ossUrl);
|
|
|
|
this.coverSrc = filePath;
|
|
|
|
this.nowProject.ShowImgUrl=filePath;
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置系统封面
|
|
|
|
*/
|
|
|
|
|
|
|
|
setSystemCover: function () {
|
|
|
|
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png";
|
|
|
|
this.nowProject.showImgUrl = this.srcIndex;
|
|
|
@@ -1156,6 +1212,20 @@ |
|
|
|
this.srcIndex = 1;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setSystemCoverRandom: function() {
|
|
|
|
var temp=Math.ceil(Math.random()*10);
|
|
|
|
while(this.srcIndex ===temp){
|
|
|
|
temp=Math.ceil(Math.random()*10);
|
|
|
|
}
|
|
|
|
this.srcIndex=temp;
|
|
|
|
if(this.srcIndex===10){
|
|
|
|
this.coverSrc = "static\\img\\faceImg\\face" + this.srcIndex + ".png";
|
|
|
|
}else{
|
|
|
|
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png";
|
|
|
|
}
|
|
|
|
this.nowProjData.ShowImgUrl = this.srcIndex;
|
|
|
|
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
isProjManager(val) {
|
|
|
@@ -1171,10 +1241,10 @@ |
|
|
|
}
|
|
|
|
},
|
|
|
|
projId(val){
|
|
|
|
//console.log(val);
|
|
|
|
this.currentProjId=val;
|
|
|
|
this.listProjFolder();
|
|
|
|
this.listDeptUsers();
|
|
|
|
this.projInfo(val);}
|
|
|
|
//this.listDeptUsers();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|